This file contains 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
@class Foo: NSObject { | |
@property NSString *lala | |
@property Bool private | |
- (void)setPrivate(BOOL)private { | |
private = private | |
lala = nil | |
} | |
- (NSString *)lala { |
This file contains 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
// | |
// StringExtension.swift | |
// Tasty for iOS | |
// | |
// Created by Tobias Tom on 06.01.15. | |
// Copyright (c) 2015 succont e.K. All rights reserved. | |
// | |
import Foundation |
This file contains 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
/*global module:false*/ | |
var path = require('path'); | |
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet; | |
var folderMount = function folderMount(connect, point) { | |
return connect.static(path.resolve(point)); | |
}; | |
module.exports = function(grunt) { |
This file contains 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 "AppDelegate.h" | |
@implementation AppDelegate | |
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification | |
{ | |
// Insert code here to initialize your application | |
dispatch_queue_t the_queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0); | |
NSArray *array = [NSArray arrayWithObjects:@"a", @"b", @"c", @"d", @"e", @"f", nil]; |
This file contains 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 | |
namespace redeemFunctions; | |
class ValidateRedeem { | |
/* | |
GetWebContent (Verwendet CURL PHP modul) | |
- ruft url auf -> JSON Rückgabe (JSON Decoder!) | |
- 1. Param = URL | |
- 2. Parm = Referenz fuer Statuscode |
This file contains 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
# Ruby | |
File.open("homepages.csv", "w") { |f| | |
f.write Restaurant.active.delete_if { |r| | |
r.homepage.empty? | |
}.map { |r| | |
[r.id, r.name, r.homepage].join(";") | |
}.join("\n") | |
} | |
# Haskell (untested) |
This file contains 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
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import sys, os, popen2, time, subprocess | |
SRC = "/" | |
HOST = "user@host" | |
DEST = "/backup_module/%(DATE)s/" | |
LINK_DEST = "/%(LAST_DATE)s" | |
EXCLUDE = ["/home/henryk/_secure", "/home/henryk/mnt", "/tmp", "/home/henryk/tmp"] | |
OPTIONS = ["-HAXax", "--stats", "--delete", "-b"] |
This file contains 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 | |
function load( $params ) { | |
$data = array( 'lulu', array( 'foo' => 'bar' ) ); | |
printf("<script language = 'javascript'>alert(%s);</script>", json_encode( $data )); | |
} |
This file contains 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 | |
$data = array( | |
'lulu', | |
array( 'foo' => 'bar' ), | |
); | |
?><!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de"> | |
<head> | |
<meta charset="utf-8" /> |
This file contains 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
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar]; | |
NSDateComponents *thisDayComponents = [[NSDateComponents alloc] init]; | |
[thisDayComponents setYear:2010]; | |
[thisDayComponents setMonth:9]; | |
[thisDayComponents setDay:1]; | |
[thisDayComponents setCalendar:gregorian]; | |
NSString *aDate = [[gregorian dateFromComponents:thisDayComponents] descriptionWithLocale:nil]; | |
NSLog(@"day:%i date:%@", [thisDayComponents day], aDate); |
NewerOlder