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
opena(){ | |
if test -n "$(find . -maxdepth 1 -name '*.xcworkspace' -print -quit)" | |
then | |
echo "Opening workspace" | |
open *.xcworkspace -a /Applications/AppCode.app | |
return | |
else | |
if test -n "$(find . -maxdepth 1 -name '*.xcodeproj' -print -quit)" | |
then | |
echo "Opening project" |
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
package lib | |
import ( | |
"bytes" | |
"io" | |
"strings" | |
"errors" | |
"syscall" | |
"unicode/utf8" | |
) |
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 | |
class App_Thumb | |
{ | |
protected $_width = null; | |
protected $_oldWidth = null; | |
protected $_height = null; | |
protected $_oldHeight = null; | |
protected $_imagePath = null; | |
protected $_resource = null; |
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
/** | |
* Retrofit adapter builder | |
* Created by moltak on 2014. 7. 9.. | |
*/ | |
public class LMNetworkBuilder { | |
public static RestAdapter getAdapter() { | |
return getBuilder().build(); | |
} | |
public static RestAdapter.Builder getBuilder() { |
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
package com.demo.okhttpissue; | |
import android.test.InstrumentationTestCase; | |
import com.squareup.okhttp.Callback; | |
import com.squareup.okhttp.OkHttpClient; | |
import com.squareup.okhttp.Request; | |
import com.squareup.okhttp.Response; | |
import com.squareup.okhttp.mockwebserver.MockResponse; | |
import com.squareup.okhttp.mockwebserver.MockWebServer; |
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
// Real usage | |
WhiTemplater.Formatter FEATURED_FORMAT = new WhiTemplater.Formatter() { | |
@Override | |
public String format(Object value) { | |
return "<b>" + String.valueOf(value)+ "</b>"; | |
} | |
}; | |
WhiTemplater.Formatter NORMAL_FORMAT = new WhiTemplater.Formatter() { |
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 | |
/** | |
* Based on FileCache class by Erik Giberti, | |
* http://af-design.com/blog/2010/07/30/simple-file-based-caching-in-php/ | |
* | |
* @author nebiros | |
*/ | |
class App_Cache { | |
/** |
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 | |
/** | |
* Mysql wrapper, to handle some mysql_* functions in a OOP way. | |
* | |
*/ | |
class App_Db_Mysql { | |
const DEFAULT_ROW_COUNT = 10; | |
const DEFAULT_PAGE = 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
// create a new store | |
var store = new Lawnchair({adaptor:'dom', table:'people'}); | |
// saving documents | |
store.save({name:'brian'}); | |
// optionally pass a key | |
store.save({key:'config', settings:{color:'blue'}}); | |
// updating a document in place is the same syntax |
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
public class Fibonacci { | |
public static int fib(int n) { | |
if(n == 0 || n == 1) { | |
return n; | |
} else { | |
return fib(n-1) + fib(n-2); | |
} | |
} |
OlderNewer