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
[8/27/15 15:53:39:235 JST] 0000008b ication.internal.jaas.modules.UsernameAndPasswordLoginModule A CWWKS1100A: Authentication did not succeed for user ID oLs3jn4fNG. An invalid user ID or password was specified. | |
[8/27/15 15:53:39:350 JST] 000000b0 SystemErr R java.util.zip.ZipException: zip file is empty | |
[8/27/15 15:53:39:350 JST] 000000b0 SystemErr R at java.util.zip.ZipFile.open(Native Method) | |
[8/27/15 15:53:39:351 JST] 000000b0 SystemErr R at java.util.zip.ZipFile.<init>(ZipFile.java:220) | |
[8/27/15 15:53:39:351 JST] 000000b0 SystemErr R at java.util.zip.ZipFile.<init>(ZipFile.java:150) | |
[8/27/15 15:53:39:351 JST] 000000b0 SystemErr R at java.util.jar.JarFile.<init>(JarFile.java:166) | |
[8/27/15 15:53:39:351 JST] 000000b0 SystemErr |
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
#! /bin/bash | |
set -e; | |
[ -z "$1" ] && { echo "ERROR: No AndroidManifest.xml provided"; exit 1; } | |
command -v xmlstarlet >/dev/null 2>&1 || { echo >&2 "ERROR: xmlstarlet command not available"; exit 1; } | |
MANIFEST_FILE=$1 | |
function addUsesPermission () |
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
# Add path for Android | |
export ANDROID_HOME=$HOME/Downloads/adt-bundle-mac-x86_64-20140321/sdk | |
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools |
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
;;; tangotangolight-theme.el --- Tango Palette color theme for Emacs 24. | |
;; First derived from color-theme-tango.el, created by danranx@gmail.com : | |
;; http://www.emacswiki.org/emacs/color-theme-tango.el | |
;; Copyright (C) 2011, 2012, 2013 Julien Barnier <julien@nozav.org> | |
;; Author: Julien Barnier | |
;; Adapted-By: Yesudeep Mangalapilly | |
;; Keywords: tango palette color theme emacs |
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
#! /bin/bash | |
# Place this file somewhere in your $PATH and chmod +x it! | |
function usage () { | |
echo "Usage:" | |
echo "femacs is 'find and open in emacs'" | |
echo "femacs requires 1 parameter. It basically does:" | |
echo " emacs \`find . -name [expression]\`"; | |
} |
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
#!/bin/bash -x | |
# This is a CodeRunner compilation script. Compilation scripts are used to | |
# compile code before being run using the run command specified in CodeRunner | |
# preferences. This script should have the following properties: | |
# | |
# Launch directory ($PWD): Will be the same as the file being run | |
# | |
# Exit status: Should be 0 on success (will cause CodeRunner | |
# to continue and execute the run command) | |
# |
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
// https://oj.leetcode.com/problems/majority-element/ | |
// Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times. | |
// You may assume that the array is non-empty and the majority element always exist in the array. | |
class Solution { | |
public: | |
// Hash table | |
int majorityElement_hashtable(vector<int> &num) { | |
std::map <int, int> table; | |
for (int n : num) { |
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
$ swiftc -emit-ir /Users/nacho4d/Desktop/function2/function2/main.swift -sdk /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk | |
; ModuleID = '-' | |
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | |
target triple = "x86_64-apple-darwin14.0.0" | |
%0 = type opaque | |
%1 = type opaque | |
%Si = type <{ i64 }> | |
%CSo8NSObject = type opaque | |
%swift.type = type { i64 } |
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
// There is a bug in WebKit | |
// Local files cannot be read unless they are in the tmp/www/ directory! | |
// Example: read "file.pdf" into WKWebView | |
var fileManager = NSFileManager.defaultManager() | |
var srcPath = NSBundle.mainBundle().pathForResource("file", ofType: "pdf") | |
var tmpPath = NSTemporaryDirectory().stringByAppendingPathComponent("www") | |
// TODO: handler errors correctly | |
fileManager.createDirectoryAtPath(tmpPath, withIntermediateDirectories: true, attributes: nil, error: nil) | |
var dstPath = tmpPath.stringByAppendingPathComponent("file.pdf") |
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
/* NSView to PNG */ | |
NSView *view = versionsButton; /* this is the view :) */ | |
NSBitmapImageRep *rep = [view bitmapImageRepForCachingDisplayInRect:[view bounds]]; | |
[view cacheDisplayInRect:[view bounds] toBitmapImageRep:rep]; | |
NSData *data = [rep representationUsingType:NSPNGFileType properties:nil]; | |
[data writeToFile:@"/path/to/the/a/nice/place/view.png" atomically:YES]; |
OlderNewer