일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- selectc
- function
- 현재언어
- mathemetica
- Post
- application.mk
- C++
- Get
- 점점변하는값
- PORTG
- Avr
- 파일존재
- cocos2d-x
- array
- unalias
- mysql
- 0x
- Java
- solution
- php
- 단축키
- Call
- 월별 카운트
- 강좌
- SQL
- is_array
- android studio
- halliday
- 하이퍼 터미널
- Join
- Today
- Total
목록분류 전체보기 (119)
코딩도사의 코드정리
Mysql 날짜 함수select date_sub(now(), interval 5 day); 5일후.. select date_add(now(), interval 5 day); 5일전...== 추가 Mysql ==- DAYOFWEEK(date) : 해당 날짜의 요일을 숫자로 반환한다. 일요일은 1, 토요일은 7 이다. - 예 : select DAYOFWEEK('1998-02-03'); - WEEKDAY(date) : 해당 날짜에 대한 요일을 반환한다. 월요일은 0, 일요일은 6 이다. - 예 : select WEEKDAY('1997-10-04 22:23:00'); - DAYOFYEAR(date) : 해당 날짜의 1월 1일부터의 날수를 반환한다. 결과값은 1에서 366 까지이다. - 예 : select DAY..
셀렉터예시설명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_## 문장 바로 뒤 태그에 추가 대충 이런식