프로그래밍2013. 12. 5. 09:24

코드 관련 체크툴을 검색하다가 cpplint라는 google coding style 체크를 해 주는 툴을 보게 되어 사용해 보았다.


사용법은 간단하여 다음과 같이 하면 된다.


$>python cpplint.py <directory>/example.cpp


시험삼아 안드로이드의 프레임 워크 쪽 수정한 부분에 대해서 돌려봤는데...


이건 내가 수정한 거보다 구글러 코드가 더 문제로 많이 잡혀서... 난감하네.




'프로그래밍' 카테고리의 다른 글

[Ruby] gem install 시에 에러  (0) 2014.09.06
[읽는중] 점프투파이썬  (0) 2013.12.24
db8 schema  (0) 2013.12.03
[일반][프로그래밍]비대칭경계  (0) 2013.10.26
pair coding 를 하기 위한 자세  (0) 2012.04.27
Posted by code cat
책/IT2013. 12. 3. 20:48

 

 

 

이미지 출처: http://www.acornpub.co.kr/book/ghost-in-the-wires

 

번역판이 아닌 영어판으로 읽었는데, 꽤 재밌었다.  아마 번역판도 나름 잘 번역했다면 읽어보길 권한다.

크게 기술적인 면에 대해서 다루지 않아서 초보자가 읽어도 문제는 없을 것이겠지만, 뭐 알고 보면 더 재밌을 거 같다.

 

솔직히 조금 더 기술적인 면을 다뤘으면 했는데, 케빈 자체도 책을 쓰면서 독자를 배려해서 얼마나 기술적인 면에 대해서 서술할 건지에 대해서 고민했다고 하니, 재미와 다큐 사이에 적절하게 합의 본거 같다.

' > IT' 카테고리의 다른 글

GoF 디자인 패턴! 이렇게 활용한다.  (0) 2013.03.24
[사고싶은책]64비트 멀티코어OS원리와 구조  (0) 2011.06.27
Posted by code cat
XX XX 프로젝트2013. 12. 3. 20:38

음 중간 중간 깨지는게 있네...

 

그래도 너무 좁아서 늘릴 필요는 있으니까.

Posted by code cat
프로그래밍2013. 12. 3. 20:23


출처:https://developer.palm.com/content/api/reference/data-types/db8.html

db8 Data Types

 Date Type

Description 

Ref'd by 

Wrapper APIs 

Service APIs 
BatchOperation Method and parameters for operation in batch.     batch
BatchResponse Response to batch API call.     batch
CountResponse Number of objects affected by operation.   del
merge
del
merge
ErrResponse Standard error response, containing operation success or failure flag, error code and error message.   del
delKind
find
get
merge
put
putKind
reserveIds
batch
del
delKind
find
get
merge
put
putKind
reserveIds
search
watch
FindResponse Response to find operation.   find find
search
GetResponse Parameters for get objects operation response.   get get
IndexClause Used for creating indexes for kind object.   putKind
putKind
IndexPropClause Defines index property. IndexClause    
NotificationResponse Notifies caller of change in query results.   find find
search
watch
PutResponse Indicates success of operation and returns id and revfields for each object.   del
merge
put
del
merge
put
PutResult Contains id and revfield for JSON data object stored in put operation. PutResponse    
Query Defines db8 query.   del
merge
find
del
merge
find
watch
ReserveIdsResponse Contains operation success or failure flag and array of reserved db8 IDs.   reserveIds reserveIds
RevSetClause Defines a revision set for a kind. SeeUsing Revision Setsfor more information.     putKind
RevSetPropClause Defines a property in a revision set. RevSetClause    
SuccessResponse Indicates operation success or failure.   delKind
putKind
delKind
putKind
watch
WhereClause Defines SQL-like JSON where clause for query. Query    


 


BatchOperation

Method and params for batch operation.

Schema

{
   "method" : string,
   "params" : any
}

Elements

Element Required Type Description
method Yes string Operation to perform. Possible values: "del", "find", "get", "merge", or "put".
params Yes any Method parameters.


 


BatchResponse

Response to batch operation.

Schema

{
   "returnValue" : boolean,
   "responses"   : any array
}

Elements

Element Required Type Description
returnValue Yes boolean Success (true) or Failure (false).
responses Yes any array Array of responses for each of the operations in the batch.


 


CountResponse

Number of objects affected by operation.

Schema

{
   "returnValue" : boolean,
   "count"       : int
}

Elements

Element Required Type Description
returnValue Yes boolean true (success) or false (failure).
count Yes int Number of objects affected by operation.


 


ErrResponse

Standard error response, containing operation success or failure flag, error code and error message.

Schema

{
   "returnValue" : boolean,
   "errorCode"   : int,
   "errorText"   : string
}

Elements

Element Required Type Description
returnValue Yes boolean true (success) or false (failure).
errorCode Yes int Numeric error code.
errorText Yes string Error message.


 


FindResponse

Response to a find objects operation.

Schema

{
   "returnValue" : boolean,
   "results"     : any,
   "count"       : int,
   "next"        : string
}

Elements

Element Required Type Description
returnValue Yes boolean true (success) or false (failure).
results Yes any Array of db8 kind data objects. What is returned depends on the query and what is stored.
count No int Number of results that would have been returned if a limit had not been specified.
next No string Key to pass as query's "page" property when retrieving next page of results.


 


GetResponse

Parameters for get objects operation response.

Schema

{
      "returnValue" : boolean,
      "results"     : any
}

Elements

Element Required Type Description
returnValue Yes boolean true (success) or false (failure).
result Yes any object array Returns array of stored db8 data objects.


 


IndexClause

Used in the putKind call for creating kind object indexes. Note that indexes determine the type of queries your app can make. See Queries and Indexing for more information.

Set the "incDel" flag to true if you want future queries to return marked as deleted objects. Objects are not completely deleted until an administrative purge operation takes place.

Schema

{
   "name"    : string,
   "props"   : IndexPropClause,
   "incDel"  : boolean
}

Elements

Element Required Type Description
name Yes string Index name
props Yes IndexPropClause Array of properties to index together.
incDel No boolean Include deleted objects flag. Default is false.

Example

{
   "name"   : "state", 
   "props"  : [{"name": "state"}],
   "incDel" : false
}


 


IndexPropClause

Defines index property for IndexClause

Schema

{
   "name"     : string,
   "collate"  : string, 
   "default"  : any,
   "tokenize" : string,
   "type"     : string
}

Elements

Element Required Type Description
name Yes string Name of property being indexed.
collate   No string Indicates the string comparison routine used to order the index. Must be one of the following:
  • default—Does binary comparison.
  • primary—Compares base characters (for example, "a" < "b") without considering accents, case, or tone marks.
  • secondary—Accents in the characters are considered secondary differences (for example, "as" < "às" < "at"). Other differences between letters can also be considered secondary differences, depending on the language. A secondary difference is ignored when there is a primary difference anywhere in the strings.
  • tertiary—Upper and lower case differences in characters are distinguished at the tertiary level (for example, "ao" < "Ao" < "aò"). In addition, a variant of a letter differs from the base form on the tertiary level (such as "A" and "?"). A tertiary difference is ignored when there is a primary or secondary difference anywhere in the strings.
default No any Default value to set for this property at insertion time, if not present.
tokenize No string

Indicates if words in strings should be broken up, i.e., should "Hello World" become "Hello" and "World" for purposes of indexing.

Must be one of the following:

  • none—Does not tokenize.
  • default—Use the default for the locale (which may strip stop-words). Stop-words are common words that are stripped for purposes of indexing, i.e., "the", "a", "an", "is", etc.
  • all—Tokenizes all words.
type Yes string "single" or "multi". Single property or multiple properties.

 


NotificationResponse

Notifies caller of change in query results returned from a "find" call.

Schema

{
   "returnValue" : boolean,
   "fired"       : boolean
}

Elements

Element Required Type Description
returnValue No boolean true (success) or false (failure).
fired Yes boolean Change notification flag.


 


PutResponse

Indicates success of operation and returns id and rev fields for each object.

Schema

{
   "returnValue" : boolean,
   "results"     : PutResult 
}

Elements

Element Required Type Description
returnValue Yes boolean true (success) or false (failure).
results Yes PutResult Array of objects containing the id and rev of each object that was put.


 


PutResult

Contains "id" and "rev" fields in PutResponse for JSON data object.

Schema

{
   "id"    : any,
   "rev"   : any
}

Elements

Element Required Type Description
id Yes any ID of the object that was put.
rev Yes any Object's revision ID. Every db8 object has this ID field. db8 maintains a global rev id counter that is incremented every time a db8 object is created or updated.


 


Query

Defines a db8 query.

Schema

{
   "select"  : string array,
   "from"    : string,
   "where"   : WhereClause array,
   "orderBy" : string,
   "desc"    : boolean,
   "incDel"  : boolean,
   "limit"   : int,
   "page"    : string
}

Elements

Element Required Type Description
select No string array Array of property names to return.
from Yes string Name of kind to retrieve results from.
where No WhereClausearray Array of clauses to test.
orderBy No string Order results on this property.
desc No boolean Return results in descending order.
incDel No boolean Include deleted objects. Deleted objects have _del=true.
Note: You can only request this if the "incDel" field was true when you created your indexes during a "putKind" operation. Otherwise, the query fails with a "no index for this query" message.
limit No int Specifies maximum number of results to return (0-500). Default is 500.
page No string Page key returned by previous query.

Example

{
   "select"  : ["displayName", "state"],
   "from"    : "com.mystuff.contacts:1",
   "where"   : [{"prop":"state","op":"=","val":"CA"}], 
   "orderBy" : "displayName",
   "desc"    : true 
}

 


ReserveIdsResponse

Contains operation success or failure flag and array of reserved db8 IDs returned from "reserveIds" call.

Schema

{
   "returnValue" : boolean,
   "ids"         : string array
}

Elements

Element Required Type Description
returnValue Yes boolean true (success) or false (failure).
ids No string array Array of reserved IDs.


 


RevSetClause

Defines a revision set—subset of an object's properties that your app can be notified about when one of the properties is modified. See Using Revision Sets for more information.

Schema

{
   "name"  : string,
   "props" : RevSetPropClause array
}

Elements

Element Required Type Description
name Yes string Name of the revision set (unique to this kind).
props Yes RevSetPropClausearray Array of properties to include in revision set.

 


RevSetPropClause

A property in a RevSetClause.

Schema

{
   "name"  : string,
}

Elements

Element Required Type Description
name Yes string Name of property to include in revision set.


 


SuccessResponse

Indicates operation success or failure.

Schema

{
   "name"  : string,
}

Elements

Element Type Description
returnValue boolean true (success) or false (failure).

Example

{
   "returnValue": false
}

 


WhereClause

Defines a SQL-like JSON where clause for a db8 Query.

Schema

{
   "prop"    : string,
   "op"      : string, 
   "val"     : any,
   "collate" : string
}

Elements

Element Required Type Description
prop Yes string Name of property to test.
op Yes string Test operator. Must be one of the following:
"<", "<=", "=", ">=", ">", "!=", "%", "?"
(less than, less than or equal, equals, greater than or equal, greater than, not equal, wildcard, and full-text)
The "%" operator (aka - the prefix operator) will return all matches beginning with the value specified.
val Yes any Value to test against.
collate No any Indicates the string comparison routine used to order the results. See the collate field in the IndexPropClause data structure for more information.

Example

{
   "prop" : "state",
   "op"   : "=",
   "val"  : "CA"
}


'프로그래밍' 카테고리의 다른 글

[읽는중] 점프투파이썬  (0) 2013.12.24
cpplint 사용후기  (0) 2013.12.05
[일반][프로그래밍]비대칭경계  (0) 2013.10.26
pair coding 를 하기 위한 자세  (0) 2012.04.27
콘솔상 동작 상태 애니메이션  (0) 2012.04.12
Posted by code cat
안드로이드/포팅2013. 12. 1. 11:03

xda 포럼에서 가져왔는데 링크가...



 adb devices   

 list all connected devices

 adb push <local> <remote>

 copy file/dir to device

 adb pull <remote> [<local>]

 copy file/dir from device

 adb sync [ <directory> ]

 copy host->device only if changed

 adb shell

 run remote shell interactively

 adb shell <command>

 run remote shell command

 adb emu <command>

 run emulator console command

 adb logcat [ <filter-spec> ]

 View device log

 adb forward <local> <remote>

localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)

 forward socket connections forward specs are one of: tcp:<port>

 adb jdwp 

 list PIDs of processes hosting a JDWP transport

 adb install [-l] [-r] [-s] <file> push this package file to the device and install it
 adb uninstall [-k] <package> remove this app package from the device (‘-k’ means keep the data and cache directories)
 adb bugreport return all information from the device that should be included in a bug report.
 adb help show this help message
 adb version show version num
 adb wait-for-device block until device is online
 adb start-server ensure that there is a server running
 adb kill-server

 kill the server if it is running

 adb get-state prints: offline | bootloader | device
 adb get-serialno

 prints: <serial-number>

 adb status-window continuously print device status for a specified device
 adb remount remounts the /system partition on the device read-write
 adb reboot [bootloader|recovery] reboots the device, optionally into the bootloader or recovery program
 adb reboot-bootloader

 reboots the device into the bootloader

 adb root

 restarts the adbd daemon with root permissions

 adb usb  restarts the adbd daemon listening on USB
 adb tcpip <port> 

 restarts the adbd daemon listening on TCP on the specified port




Posted by code cat