일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- android studio
- PORTG
- application.mk
- Avr
- 강좌
- Post
- C++
- 파일존재
- solution
- php
- 월별 카운트
- Java
- array
- 점점변하는값
- 단축키
- halliday
- cocos2d-x
- mathemetica
- selectc
- 현재언어
- unalias
- function
- SQL
- Call
- is_array
- Join
- mysql
- 하이퍼 터미널
- 0x
- Get
- Today
- Total
목록컴퓨터 이야기 (89)
코딩도사의 코드정리
셀렉터예시설명id, class, tag로 선택 ★★★*$("*")모든 요소들#id$("#lastname")id가 "lastname"인 요소.class$(".intro")클래스가 "intro"인 요소들.class,.class$(".intro,.demo")클래스가 "intro" 또는 "demo"인 요소들element$("p") 요소들el1,el2,el3$("h1,div,p"), and 요소들처음, 마지막, 홀수, 짝수 선택 ★ :first$("p:first")첫번째 요소 :last$("p:last")마지막 요소 :odd$("tr:odd")홀수번째 요소들 :even$("tr:even")짝수번째 요소들자식, 타입에 따른 선택 :first-child$("p:first-child")All elements that ..
// 정수에, 천자리 마다 쉼표 넣기 echo number_format(1234567890); echo number_format(123456789); echo number_format(12345678); echo number_format(1000); echo number_format(66); // 천자리 쉼표 넣기, 소수점 이하 2자리까지 echo number_format(1234567890.555555, 2); echo number_format(123456789.555555, 2); echo number_format(12345678.555555, 2); echo number_format(1000.555555, 2); echo number_format(66.555555, 2);
select sum(current_point) from user_basic;+--------------------+| sum(current_point) |+--------------------+| 90 |+--------------------+1 row in set (0.00 sec)
http://link/foo.php?id[]=1&id[]=2&id[]=3 // 배열 넘기기 http://link/foo.php?dic[a]=b&id[c]=d&id[e]=f // 사전형 넘기기.
샘플 테이블test1)+--------+------+| a | b |+--------+------+| 금강 | 1 || 한강 | 2 || 대동강 | 3 || 두만강 | 4 | test2)+------+--------+| b | d |+------+--------+| 1 | 백두산 || 2 | 금강산 || 5 | 지리산 || 6 | 한라산 | 1) INNER JOINInner join를 이용하여 앞 예제와 동일한 결과를 얻을 수 있는 예는 다음과 같다. 이는 select 문에서 join에 사용할 컬럼명을 on test1.b=test2.b와 같이 직접 지정해도 된다.【예제】mysql> select * from test1 inner join test2 using(b);+------+------+------+-..
select date_format(`reg_date`, '%Y-%m-%d') d, count(*) from table group by d; +------------+----------+ | d | count(*) | +------------+----------+ | 0000-00-00 | 6 | | 2015-11-15 | 2 | | 2015-12-21 | 3 | +------------+----------+ 3 rows in set (0.00 sec) 간단하게 월별 카운트 select date_format(`reg_date`, '%Y-%m') d, count(*) from table group by d; +---------+----------+ | d | count(*) | +---------+-----..
$db_conn = mysql_connect(SQL_HOSTNAME,SQL_ID,SQL_PASSWORD); if(!$db_conn){ echo "fail"; exit(); } if(!mysql_select_db(SQL_DBNAME,$db_conn)){ echo "fail"; exit(); } $sql = "select * from " . TABLE; $rs = mysql_query($sql,$db_conn); $resultArray = array(); while($row = mysql_fetch_assoc($rs)){ $resultArray[] = $row; } print_r($resultArray);
Editing Ctrl + Space : 기본 코드 완성Ctrl + Shift + Space : 스마트 코드 완성(예상되는 타입의 메소드또는 변수명 )Ctrl + Q : 빠른 문서보기Shift + F1 : 외부 문서보기(http://developer.android.com/reference로 이동)Ctrl + mouse over code : 간단한 설명.Alt + Insert : Generate code( Getters, Setters, Constructors, hashCode/equals, toString )Ctrl + O : Override methodsCtrl + I : Implement methodsCtrl + Alt + T : Surround with… (if..else, try..catch, f..
public static String valueOf(int i) 매개변수 int형의 변수 i를 받아서 String형의 인스턴스를 반환한다. Integer.toString()에 의해서 반환되는 값과 동일하다. 위의 두 메소드만 알면 String과 int형 사이에서의 형 변환은 쉽게 할 수 있다. public class ParseExam { public static void main(String[] args) { String numStr = "54"; // String값을 int형의 값으로 바꾸는 방법 int numInt = Integer.parseInt(numStr); System.out.println(numInt); // int형의 값을 String으로 바꾸는 방법 String numStr2 = Stri..
AlertDialog.Builder alert_confirm = new AlertDialog.Builder(MyActivity.this); alert_confirm.setMessage("프로그램을 종료 하시겠습니까?").setCancelable(false).setPositiveButton("확인", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // 'YES' } }).setNegativeButton("취소", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface..
foreach는 배열을 처음부터 끝까지 배열 값을 이용하고 싶을 때 씀. Syntax foreach ($array as $value) { } $colors = array("red", "green", "blue", "yellow"); // 배열 생성 foreach ($colors as $value) { echo "$value "; } [결과] red green blue yellow
(PHP 4, PHP 5, PHP 7)is_array — 변수가 배열인지 확인설명 ¶bool is_array ( mixed $var )주어진 변수가 배열인지 확인합니다.
skin.html 편집으로 가서 (css/html 편집) ##_category_## 를 찾음 그리고 ##_category_## 문장 바로 뒤 태그에 추가 대충 이런식
GET으로 받기 $var = $_GET["data"];POST로 받기 $var = $_POST["data"];GET 또는 POST 신경쓰지 않고 모두 받기 $var = $_REQUEST["data"];
Eclipse 팁 #1 (코드 Style 설정) ★★ 팀 프로젝트를 진행할때 개발자별로 Coding Style이 달라서 고생하는 경우가 많습니다. 이를 위해 Eclipse는 코드 형식화를 지원하는데요,아래와 같이 코딩 규칙을 위해바는 코드가 있다고 가정합시다. 해당 코드 위에서 [ Ctrl+Shift+F ] 키만 누르면 아래와 같이 코드가 이쁘게 정리됩니다. 이는 Eclipse에서 설정된 Code Formatter의 설정에 따른 것입니다. 프로젝트에서 개발된 모든 코드에 같은 코딩 규칙을 적용하고 싶다면.. 결정된 Coding Convention에 따라 Code Formatter의 설정을 바꾼 다음, 그것을 XML 파일로 Export하고, 개발자에게 Import 시켜 적용하도록 하면 된답니다.아래 그림은..