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
BEGIN MESSAGE. | |
6ofxjYA8SxDQd25 PKMBkRXQAQeOSob aY6ZrZ3w1GZU5G2 SvDsbBeWrKa5K1E | |
0d6evZNc2w6v8JZ jIilUsLWbvLTCKq 6Xr2MZHgg6ZyC1B m9NNWWZvwf01K5t | |
u1WEcwlp0S4qY2H 98FGIve520xpiEx g2GZYe9420ZMYHF gobVWv0BUQmtPt7 | |
xZzYUDJp5yjBAiX Nk1CxLhnL6LvsRB i8si22IP. | |
END MESSAGE. |
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 { getManager } from 'typeorm'; | |
import * as dotProp from 'dot-prop'; | |
export async function deleteNested (item: any) { | |
const meta = getRemoveRelations(item.constructor, ''); | |
const res = await getManager().findOneOrFail(item.constructor, item, { | |
relations: meta | |
}) | |
await getManager().remove(res); | |
for (const path of meta) { |
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 { EventListenerType } from 'typeorm/metadata/types/EventListenerTypes'; | |
import { getManager, EntitySchema } from 'typeorm'; | |
import { EntityListenerMetadata } from 'typeorm/metadata/EntityListenerMetadata'; | |
export function addDatabaseListener (entity: EntitySchema<any> | Function | string, type: EventListenerType, handler: Function) { | |
const meta = getManager().connection.getMetadata(entity); | |
let r = '_' + Math.random().toString(36).substring(7); | |
(meta.target as any).prototype[r] = handler; | |
const el = new EntityListenerMetadata({ | |
entityMetadata: meta, |
This file has been truncated, but you can view the full 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
# ************************************************************ | |
# Sequel Pro SQL dump | |
# Version 4541 | |
# | |
# http://www.sequelpro.com/ | |
# https://github.com/sequelpro/sequelpro | |
# | |
# Host: 127.0.0.1 (MySQL 5.7.16-0ubuntu0.16.04.1) | |
# Generation Time: 2016-12-21 12:35:15 +0000 |
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
- (NSDictionary*)argsToDictionary{ | |
//Get the arguments as an Array | |
NSMutableArray *arguments = [[NSMutableArray alloc]initWithArray:[[NSProcessInfo processInfo] arguments]]; | |
//remove the path | |
[arguments removeObjectAtIndex:0]; | |
//create the temp mutabledict | |
NSMutableDictionary *argsdict = [NSMutableDictionary dictionary]; | |
for (int i=0; i<arguments.count; i++) { | |
if (arguments.count > i+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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>123</key> | |
<string>application/vnd.lotus-1-2-3</string> | |
<key>3dml</key> | |
<string>text/vnd.in3d.3dml</string> | |
<key>3ds</key> | |
<string>image/x-3ds</string> |
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
//how to extend a webview with custom Javascript functions | |
..... | |
#import <JavaScriptCore/JavaScriptCore.h> | |
#import <JavaScriptCore/JSBase.h> | |
..... | |
_webview.mainFrame.javaScriptContext[@"download"] = ^(NSString *url) { | |
//do something | |
}; | |