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
# Auto detect text files and perform LF normalization | |
* text=auto | |
# Custom for Visual Studio | |
*.cs diff=csharp | |
*.sln merge=union | |
*.csproj merge=union | |
*.vbproj merge=union | |
*.fsproj merge=union | |
*.dbproj merge=union |
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
BASE_DIR = $(shell pwd) | |
JAVA_BIN = $(shell dirname $(shell which java)) | |
$(if $(JAVA_BIN),,$(warning "Warning: No Java found in your path, this will probably not work")) | |
.PHONY: all | |
all: clean package start | |
clean: |
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
/** | |
* Split array | |
* @param arr[] The array to split | |
* @param startFn Start condition | |
* @param endFn End condition | |
*/ | |
function chunk(arr, startFn, endFn) { | |
var chunks = []; | |
var chunk = []; |
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
/** | |
* | |
* @param photoData photo ID Prior to Honeycomb, the contact's _ID value. | |
* For Honeycomb and later, the value of PHOTO_THUMBNAIL_URI. | |
* @return A thumbnail Bitmap, sized to the provided width and height. | |
* Returns null if the thumbnail is not found. | |
*/ | |
private Bitmap loadContactPhotoThumbnail(String photoData) { | |
// Creates an asset file descriptor for the thumbnail file. | |
AssetFileDescriptor afd = 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
/** | |
* used for fb AuthService provides Observables with gives the profile pic, | |
* this function uses that observable to display the profile pic | |
* @param profilePicObservable Observable that provides url for high res profile pic | |
*/ | |
private void displayPic(Observable<String> profilePicObservable) { | |
profilePicObservable | |
.observeOn(AndroidSchedulers.mainThread()) | |
.subscribeOn(Schedulers.io()) | |
.subscribe( |
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 send-async-response [request async-handler] | |
(response/ok (:body (as-channel | |
request | |
{:on-open #(send! % (async-handler) {:close? true})})))) |
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
(ns flow.core | |
(:gen-class) | |
(:require [clojure.string :as str])) | |
(require '[me.raynes.fs :as fs]) | |
;; (php? "akash.clj") | |
;;;;;;;;;;;;;;;;;;;;;;;; | |
;; identify php files ;; |
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
(:require [clojure.spec.alpha :as s]) | |
(s/def ::id string?) | |
(s/def ::link uri?) | |
(s/def ::tag (s/and string? | |
(complement empty?))) | |
(s/def ::tags (s/coll-of ::tag | |
:distinct true)) |
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
(require 2htdp/image) | |
(require 2htdp/universe) | |
(define background (empty-scene 200 50)) | |
(define width-of-world 200) | |
(define radius-of-wheel 2) | |
(define distance-between-wheel (* radius-of-wheel 5)) |
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
(require 2htdp/image) | |
(require 2htdp/universe) | |
(require lang/posn) | |
(struct world (ufo tank)) | |
(define width 500) | |
(define height 500) | |
(define mtsn (empty-scene width height)) |
OlderNewer