-
class members (including data members) are public
-
all member functions are virtual
-
method function,
- declared with an explicit first argument representing the object
- the object is provided implicitly by the function call
-
classes are objects
-
Built-in types can be used as base classes
-
Operator overloading supported
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
{ | |
(* short names for important modules *) | |
module L = Lexing | |
module B = Buffer | |
type token = | |
| STR of string | |
| INT of int | |
| ID of string | |
| PLUSEQ |
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
array.filter(function(elem, index, self) { | |
return self.indexOf(elem) === index; | |
}); |
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
<? php | |
$device = ''; // My iphone deviceToken | |
$payload['aps'] = array('alert' => 'This is the alert text', 'badge' => 1, 'sound' => 'default'); | |
$payload['server'] = array('serverId' => 'localhost', 'name' => 'waach'); | |
$output = json_encode($payload); | |
$apnsCert = 'apns-dev.pem'; | |
$streamContext = stream_context_create(); | |
stream_context_set_option($streamContext, 'ssl', 'local_cert', $apnsCert); |
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 url("/usr/share/gnome-shell/theme/gnome-shell.css"); | |
/* customizing GNOME Shell for desktop interface | |
with fonts size 9pt (instead default 11pt size) */ | |
/* Text Styles */ | |
/* default text style */ | |
stage { | |
font-size: 9pt; /* 11pt */ | |
} |
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
;;; minimial-cedet-config.el --- Working configuration for CEDET from bzr | |
;; Copyright (C) Alex Ott | |
;; | |
;; Author: Alex Ott <[email protected]> | |
;; Keywords: cedet, C++, Java | |
;; Requirements: CEDET from bzr (http://cedet.sourceforge.net/bzr-repo.shtml) | |
;; Do checkout of fresh CEDET, and use this config (don't forget to change path below) |
-
str.format()
: control formatting of output -
str()
: return representations of values, which are human-readable -
repr()
: genertate representations, readable by the interpreter -
Many values have the same representation using either function. However, strings and float point numbers have distinct representations
s = 'Hello, world.'
-
Module: a file containing Python definitions and statements
-
File name is the module name, suffix
.py
-
Module's name available as the global variable
__name__
# suppose we created a module called fib, which has two function fib and fib2 # fib prints Fibonacci series up to n # fib2 returns Fibonacci series up to n
NewerOlder