Skip to content

Instantly share code, notes, and snippets.

root@debian:/home/pawel/Documents/cordova-android/bin# apt-cache policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://dl.google.com/linux/talkplugin/deb/ stable/main i386 Packages
release v=1.0,o=Google, Inc.,a=stable,n=stable,l=Google,c=main
origin dl.google.com
500 http://dl.google.com/linux/chrome/deb/ stable/main i386 Packages
release v=1.0,o=Google, Inc.,a=stable,n=stable,l=Google,c=main
origin dl.google.com
-(id)initWithNumberOfSegments(NSUInteger):numberOfSegments andSizeArray(NSArray *):sizeArray andTitleArray(NSArray * ):titleArray
{
self = [super init];
if(self) {
self.numOfSeg = numberOfSegments;
self.sizeArray = _sizeArray;
self.titleArray = _titleArray;
}
-(id)initWithNumberOfSegments(NSUInteger):numberOfSegments andSizeArray(NSArray *):sizeArray andTitleArray(NSArray * ):titleArray
{
self.numOfSeg = _numberOfSegments;
self.sizeArray = _sizeArray;
self.titleArray = _titleArray;
return self;
}
@pbrewczynski
pbrewczynski / 0_reuse_code.js
Created November 4, 2013 01:30
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
pawel@debian:~/gitDirectory/grit/grit$ git status
# On branch master
nothing to commit, working directory clean
pawel@debian:~/gitDirectory/grit/grit$ echo "# test" >> benchmarks.rb
pawel@debian:~/gitDirectory/grit/grit$ git diff
diff --git a/benchmarks.rb b/benchmarks.rb
index e445e28..40db713 100644
--- a/benchmarks.rb
+++ b/benchmarks.rb
@@ -127,3 +127,4 @@ end
Nov 1 19:41:07 debian sshd[9920]: Accepted password for pawel from 192.168.0.21 port 37805 ssh2
Nov 1 19:41:07 debian sshd[9920]: pam_unix(sshd:session): session opened for user pawel by (uid=0)
var app = {
// Application Constructor
el : {
header : "heder",
fileList : "file-list",
footer : "footer"
}
initialize: function() {
this.bindEvents();
},
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ProjectCompany
{
abstract class Employee
{
nmap <leader>c :w \| ! g++ % -o output <CR> " Compiles but doesn't stay in "bash mode", it automatically returns to Vim
nmap <leader>c :w \| ! g++ % -o output \| ! ./output <CR> " Returns E34: No previous command
nmap <leader>c :w \| ! g++ % -o output && ./output <CR> " It works Perfectly (and "./output" isn't executed when compilation fail because of conditional execution.
Delegation and Notifications
The delegate of most Cocoa framework classes is automatically registered as an observer of notifications posted by the delegating object. The delegate need only implement a notification method declared by the framework class to receive a particular notification message. Following the example above, a window object posts an NSWindowWillCloseNotification to observers but sends a windowShouldClose: message to its delegate.