- “%r” % anything
- 무엇이든가에 출력하라 ( formatting string)
- RAW data를 그대로 출력한다(디버깅에 용의)
- representation → repr
- argv
- argument variable
- Magic Method
- class TestClass(object):
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
filtered = [x['min_field'] for x in Model.objects.filter(filter_conditions).values('same_field').annotate(Count('same_field', distinct=True)).annotate(min_field=Min('min_field')).distinct()] | |
result = Model.objects.filter(field__in=filtered) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.clearhash = function (e) { | |
var cst = $('body').scrollTop(); | |
location.hash = ""; | |
$('body').scrollTop(cst); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def set_authentication_header(f): | |
''' | |
Decorator for flask-HTTPAuth authentication header. | |
In AngularJS for prevent basic authentication popup | |
:param f: | |
:return: | |
''' | |
@wraps(f) | |
def decorated(*args, **kwargs): | |
res = f(*args, **kwargs) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import distutils.dir_util | |
import shutil | |
import os | |
def copytree(src, dst): | |
for item in os.listdir(src): | |
s, d = os.path.join(src, item), os.path.join(dst, item) | |
if os.path.isdir(s): | |
shutil.copytree(s, d, False, None) | |
else: |
안녕하세요. 사원사업부의 마루야마@h13i32maru입니다. 최근의 Web 프론트엔드의 변화는 매우 격렬해서, 조금 눈을 땐 사이에 점점 새로운 것이 나오고 있더라구요. 그런 격렬한 변화중 하나가 ES6이라는 차세대 JavaScript의 사양입니다. 이 ES6는 현재 재정중으로 집필시점에서는 Draft Rev31이 공개되어있습니다.
JavaScript는 ECMAScript(ECMA262)라는 사양을 기반으로 구현되어있습니다. 현재 모던한 Web 브라우저는 ECMAScript 5.1th Edition을 기반으로 한 JavaScript실행 엔진을 탑재하고 있습니다. 그리고 다음 버전인 ECMAScript 6th Edition이 현재 재정중으로, 약칭으로 ES6이라는 명칭이 사용되고 있습니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in upload handler | |
in file close | |
.. | |
---------------------------------------------------------------------- | |
Ran 2 tests in 0.021s | |
OK |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var React = require('react-native'); | |
var { | |
AppRegistry | |
} = React; | |
var Main = require('./src/main') | |
AppRegistry.registerComponent('SendBirdSample', () => Main); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const StyledAlert = styled.div` | |
padding: 13px 24px; | |
line-height: 1; | |
margin-bottom: 1rem; | |
font-size: 15px; | |
border: 1px solid transparent; | |
border-radius: 4px; | |
a { | |
color: #aaeaf4; | |
text-decoration: underline; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function withProps<U>() { | |
return <P, T, O>( | |
fn: ThemedStyledFunction<P, T, O>, | |
): ThemedStyledFunction<P & U, T, O & U> => | |
fn as ThemedStyledFunction<P & U, T, O & U>; | |
} | |
interface StyledAlertProps { | |
isAttachable?: boolean; | |
status?: string; |