Skip to content

Instantly share code, notes, and snippets.

View DavidYKay's full-sized avatar

David Young-Chan Kay DavidYKay

View GitHub Profile
public class Deadlock {
static class Friend {
private final String name;
public Friend(String name) {
this.name = name;
}
public String getName() {
return this.name;
}
public void bow(Friend bower) {
@DavidYKay
DavidYKay / crash.log
Created June 30, 2014 17:41
Three-turn video crash
E/AndroidRuntime(14736): Process: com.dl.skatefreshAdvancePartTwo, PID: 14736
E/AndroidRuntime(14736): java.lang.IllegalStateException
E/AndroidRuntime(14736): at android.media.MediaPlayer.prepareAsync(Native Method)
E/AndroidRuntime(14736): at android.widget.VideoView.openVideo(VideoView.java:335)
E/AndroidRuntime(14736): at android.widget.VideoView.access$2100(VideoView.java:71)
E/AndroidRuntime(14736): at android.widget.VideoView$7.surfaceCreated(VideoView.java:607)
E/AndroidRuntime(14736): at android.view.SurfaceView.updateWindow(SurfaceView.java:572)
E/AndroidRuntime(14736): at android.view.SurfaceView.access$000(SurfaceView.java:86)
E/AndroidRuntime(14736): at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:175)
E/AndroidRuntime(14736): at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:847)
------------------------------------------------------------
updateComments:(person:(firstName)
------------------------------------------------------------
Result: Behaves a lot like the updateComments call. Person object comes back empty.
URL: https://api.linkedin.com/v1/companies/1694/updates:(updateComments:(person:(firstName)))
Response:
{
"cookies": {
{:kind "plus#activity",
:annotation "An exemplar of Internet society.",
:etag "\"YFr-hUROXQN7IOa3dUHg9dQ8eq0/jI7ahl6Ey1kNnsd1GejZ1bUaDAY\"",
:access {:kind "plus#acl",
:description "Public",
:items [{:type "public"}]},
:object {:content "<br /><br /><a rel=\"nofollow\" class=\"ot-hashtag\" href=\"https://plus.google.com/s/%23funny\">#funny</a>",
:replies {:totalItems 0,
:selfLink "https://www.googleapis.com/plus/v1/activities/z12hid2qmvnihhx3p22zurijnzjjjddws04/comments"},
:attachments [{:objectType "photo",
@DavidYKay
DavidYKay / exception.log
Created March 6, 2015 17:45
Exception log for Contacts.Plugin.Android: "the bind value at index 20 is null"
[MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] Java.Lang.IllegalArgumentException: Exception of type 'Java.Lang.IllegalArgumentException' was thrown.
[MonoDroid] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0
[MonoDroid] at Android.Runtime.JNIEnv.CallObjectMethod (IntPtr jobject, IntPtr jmethod, Android.Runtime.JValue[] parms) [0x00000] in <filename unknown>:0
[MonoDroid] at Android.Content.ContentResolver.Query (Android.Net.Uri uri, System.String[] projection, System.String selection, System.String[] selectionArgs, System.String sortOrder) [0x00000] in <filename unknown>:0
[MonoDroid] at Contacts.Plugin.ContactHelper+<GetContacts>d__19.MoveNext () [0x00000] in <filename unknown>:0
[MonoDroid] at Contacts.Plugin.ContactHelper+<GetContacts>d__9.MoveNext () [0x00000] in <filename unknown>:0
[MonoDroid] at Contacts.Plugin.ContactReader+<GetEnumerator>d__4.MoveNext () [0x00000] in <filename unknown>:0
[MonoDroid] at System.Linq.Enumerable+<Cr
@DavidYKay
DavidYKay / error.log
Created March 25, 2015 17:29
Shrimp example: "Unable to mount WebDav" on attempting to connect to REPL
$ script/jscrepljs
[1] Shrimp on iPhone Simulator (ikong-home)
[R] Refresh
Choice: 1
java.lang.Exception: Unable to mount WebDAV at http://192.168.1.9:49153
at ambly.repl.jsc$mount_webdav.invoke(jsc.clj:260)
at ambly.repl.jsc$setup.invoke(jsc.clj:282)
@DavidYKay
DavidYKay / crash.log
Created May 2, 2015 21:41
NullPointerException in RoboVM IntelliJ Plugin when loading project with 3 modules: ios, android, common
null
java.lang.NullPointerException
at org.robovm.idea.RoboVmPlugin.isRoboVmModule(RoboVmPlugin.java:338)
at org.robovm.idea.interfacebuilder.IBIntegratorModuleComponent.moduleAdded(IBIntegratorModuleComponent.java:46)
at com.intellij.openapi.module.impl.ModuleImpl.moduleAdded(ModuleImpl.java:232)
at com.intellij.openapi.module.impl.ModuleManagerImpl$6.run(ModuleManagerImpl.java:998)
at com.intellij.openapi.roots.impl.ProjectRootManagerImpl.makeRootsChange(ProjectRootManagerImpl.java:363)
at com.intellij.openapi.module.impl.ModuleManagerImpl.commitModel(ModuleManagerImpl.java:954)
at com.intellij.openapi.module.impl.ModuleManagerImpl.access$1300(ModuleManagerImpl.java:73)
at com.intellij.openapi.module.impl.ModuleManagerImpl$ModuleModelImpl.commitWithRunnable(ModuleManagerImpl.java:850)
@DavidYKay
DavidYKay / gist:1034571
Created June 19, 2011 18:35
App Engine Get Tutorial
class ContactsHandler(webapp.RequestHandler):
def get(self):
# Get user ID from URL
user_id = ...
# Make query to Datastore
data = query(user_id, ...)
# Encode to JSON
jsonObject = jsonEncode(data)
self.response.headers['Content-Type'] = 'application/json'
self.response.out.write(jsonObject)
@DavidYKay
DavidYKay / RestKit Persistence
Created January 9, 2012 23:29
RestKit Persistence Snippet
- (void)objectLoader:(RKObjectLoader*)objectLoader didLoadObjects:(NSArray*)objects {
[[NSUserDefaults standardUserDefaults] setObject:[NSDate date] forKey:@"LastUpdatedAt"];
[[NSUserDefaults standardUserDefaults] synchronize];
NSLog(@"Loaded statuses: %@", objects);
[self loadObjectsFromDataStore];
[_tableView reloadData];
}
- (void)loadObjectsFromDataStore {
[_statuses release];
@DavidYKay
DavidYKay / conversations.json
Created January 16, 2012 19:16
CoHatch/Teambox Example JSON
{
"type": "List",
"per_page": 30,
"objects": [
{
"Conversation": {
"name": "More Professional? Maybe...maybe not...",
"simple": false,
"recent_comment_ids": [