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
// Якщо ми створюємо власний сеттер і щось змінюємо в середині, то треба цю зміну дублювати у ініціалізації. Наприклад: | |
- (void)setFreeformGrid:(BOOL)freeformGrid | |
{ | |
if (_freeformGrid != freeformGrid) | |
{ | |
_freeformGrid = freeformGrid; | |
self.gridView.isGuidesVisible = _freeformGrid; // Цей шматок коду треба додати і в ініціалізацію, наприклад у метод - commonInit: | |
} | |
} |
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
bps 1 | |
d1 $ sound "[bd cp, ~ hh*2] [future hh:7/2]" | |
|+| pan triwave1 | |
|+| accelerate "-1" | |
d2 $ every 2 (0.25 <~) $ striate 4 (sound "odx:1/2 ~ tabla:3 [feel:4]/2") | |
d3 $ every 4 (0.5 ~>) $ striate 2 (sound "jvbass jvbass:3 jvbass:6, jvbass:3*3") | |
|+| shape triwave1 |
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
- (void)sortArray:(NSMutableArray *)array withLeft:(NSInteger )left andRight:(NSInteger )right | |
{ | |
NSInteger i = left - 1; | |
NSInteger j = right; | |
NSInteger p = left - 1; | |
NSInteger q = right; | |
if (right <= left) | |
return; | |
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 | |
$uploaddir = './uploads/'; | |
$file = basename($_FILES['userfile']['name']); | |
$uploadfile = $uploaddir . $file; | |
if (move_uploaded_file($_FILES['userfile']['tmp_name'], $uploadfile)) { | |
echo "http://iphone.zcentric.com/uploads/{$file}"; | |
} | |
?> |
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
$f3->route('GET /api/user/@id', | |
function($f3) { | |
$id = $f3->get('PARAMS.id'); | |
header('Content-Type: application/json'); | |
$data = array('id'=>$id, 'name'=>'Taras', 'lastname'=>'Shevchenko'); | |
echo 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
NSLog (@"Font families: %@", [UIFont familyNames]); |
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
Parse.Cloud.job("sendPush", function(request, status) { | |
Parse.Push.send({ | |
channels: ["global"], | |
data: | |
{ | |
"alert": "Update process has started", | |
"content-available":"1", | |
} | |
}, | |
{ |
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
Parse.Cloud.beforeSave("Photo", function(request, response) { | |
console.log("version is:" + request.object.get("version")); | |
var version = request.object.get("version"); | |
if (version == null && version == undefined ) { | |
version = 0; | |
} | |
version += 1; | |
console.log("version is:" + version); |
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
- (void)shareImageToInstagram:(UIImage *)image inView:(UIView *)view | |
{ | |
NSURL * instagramURL = [NSURL URLWithString:@"instagram://"]; | |
if ([[UIApplication sharedApplication] canOpenURL:instagramURL]) | |
{ | |
NSString * documentDirectory = [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]; | |
NSString * saveImagePath = [documentDirectory stringByAppendingPathComponent:@"Image.igo"]; | |
NSData * imageData = UIImagePNGRepresentation(image); | |
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
func printDate(string: String) { | |
let date = Date() | |
let formatter = DateFormatter() | |
formatter.dateFormat = "HH:mm:ss.SSSS" | |
print(string + formatter.string(from: date)) | |
} |
OlderNewer