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
[self addObserver:[[poolView titleTextField] stringValue] | |
forKeyPath:"title" | |
options:CPKeyValueObservingOptionNew | |
context: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
+ (id)getWorkspaceList:(CPString)url for:(CPString)email withSecurity:(CPString)token | |
{ | |
CPLogConsole("getWorkspaceList executing"); | |
serviceURL = url + "/GetWorkspaceList&securityToken=" + token | |
+ "&email=" + email; | |
jsonData = [CPURLConnection sendSynchronousRequest:[CPURLRequest requestWithURL:serviceURL] | |
returningResponse:nil | |
error:nil]; | |
CPLogConsole("serviceURL=" + serviceURL); | |
CPLogConsole("jsonData=" + jsonData); |
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
def insertion_sort(keys): | |
index = 1 | |
while index < len(keys): | |
key = keys[index] | |
comp_index = index - 1 | |
while comp_index >= 0 and key < keys[comp_index]: | |
keys[comp_index], keys[comp_index+1] = keys[comp_index+1], keys[comp_index] | |
comp_index -= 1 | |
index += 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
def merge(list1, list2): | |
result = [] | |
index1 = index2 = 0 | |
while index1 < len(list1) and index2 < len(list2): | |
key1 = list1[index1] | |
key2 = list2[index2] | |
if key1 <= key2: | |
result.append(key1) | |
index1 += 1 | |
else: |
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
(defn make-thumbnail [in-stream out-stream width] | |
(let [img (javax.imageio.ImageIO/read in-stream) | |
imgtype (java.awt.image.BufferedImage/TYPE_INT_ARGB) | |
width (min (.getWidth img) width) | |
height (* (/ width (.getWidth img)) (.getHeight img)) | |
simg (java.awt.image.BufferedImage. width height imgtype) | |
g (.createGraphics simg)] | |
(.drawImage g img 0 0 width height nil) | |
(.dispose g) | |
(javax.imageio.ImageIO/write simg "png" out-stream))) |
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
diff --git a/themes/ace/resources/button/ace/button.css b/themes/ace/resources/button/ace/button.css | |
index 6934b86..4d3b2eb 100644 | |
--- a/themes/ace/resources/button/ace/button.css | |
+++ b/themes/ace/resources/button/ace/button.css | |
@@ -26,3 +26,16 @@ $theme.button { | |
margin-top: 0px; | |
} | |
} | |
+ | |
+ |
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
{ baseUrl: 'http://www.myapi.com' | |
methods: [ { name: 'Get Users', | |
http: 'GET', | |
url: '/users', | |
result: { object: 'user' | |
array: 'true' }}, | |
{ name: 'Create User', | |
http: 'POST', | |
url: '/users?name={name}&email={email}', |
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
#define ARRAY(...) [NSArray arrayWithObjects:__VA_ARGS__, nil] | |
#define DICT(...) [NSDictionary dictionaryWithObjectsAndKeys:__VA_ARGS__, 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
gotoStateFromFirstSiblingCurrentState: function(destinationState, commonParentState, defaultSourceState) { | |
var sourceState = this.get('currentStates').find(function(s) { | |
var isSibling = s.getPath('parentState.stateName') === commonParentState; | |
return isSibling; | |
}); | |
sourceState = sourceState || defaultSourceState; | |
this.gotoState(destinationState, sourceState); | |
} |
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
SC.routes.add(‘notes/:id’, function(routingArgs) { | |
MyApp.statechart.gotoState(’showTakeNotesView’, 'showBooksView’); | |
}); |
OlderNewer