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
/** | |
* @project | |
* @author chris.jenkins | |
* @created Dec 28, 2011 | |
*/ | |
package com.application.android.ui.fragments; | |
import android.os.Bundle; | |
import android.os.Handler; | |
import android.support.v4.app.FragmentStatePagerAdapter; |
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
import android.content.ContentResolver; | |
import android.content.ContentValues; | |
import android.content.Context; | |
import android.content.Intent; | |
import android.database.Cursor; | |
import android.graphics.drawable.Drawable; | |
import android.os.Bundle; | |
import android.provider.BaseColumns; | |
import android.support.v4.app.LoaderManager; | |
import android.support.v4.content.CursorLoader; |
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
import android.content.ContentResolver; | |
import android.content.ContentValues; | |
import android.database.Cursor; | |
import android.net.Uri; | |
import com.bytelimit.dk.log.Logger; | |
import com.bytelimit.dk.rest.handler.AbstractSQLiteSyncHandler; | |
import com.bytelimit.dk.sqlite.SQLiteUtils; | |
import com.bytelimit.dk.utils.IOUtils; | |
import com.lessonsproject.core.api.parser.FeaturedLessonParser; | |
import com.lessonsproject.core.api.parser.JsonParser; |
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 net.photoapp.utilities.camera; | |
import android.app.Activity; | |
import android.content.Intent; | |
import android.hardware.Camera; | |
import net.photoapp.R; | |
import net.photoapp.activity.CropPhotoActivity; | |
import net.photoapp.utilities.Constants; | |
import net.photoapp.utilities.LocalUtilities; |
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 filtering [pred] | |
(fn [step] | |
(fn [r x] (if (pred x) (step r x) r)))) | |
(defn my-filter | |
([pred coll] | |
"Returns the result immediately" | |
(reduce ((filtering pred) conj) | |
[] coll)) | |
([pred] |
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
;; handlers for different types of list items | |
(defmulti render-row (fn [{item :item}] (:type item))) | |
(defmethod render-row "header" | |
[_] | |
[ui/view | |
[ui/text "Header"]]) | |
(defmethod render-row "subheader" | |
[_] |
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 transit-reader (t/reader :json)) | |
(-> (js/fetch api-url | |
(clj->js {:headers {"Accept" "application/transit+json"}})) | |
(.then (fn [response] | |
(.text response))) | |
(.then (fn [response] | |
(let [data (t/read transit-reader response)] | |
;; we're done | |
;; `data` is a clojurescript map |
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 storage | |
(.-AsyncStorage js/ReactNative)) | |
(def transit-reader (t/reader :json)) | |
(def transit-writer (t/writer :json)) | |
;; the process of saving to database | |
(.setItem storage "dataset" data (fn [_] | |
(.log js/console "data saved!"))) |
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
[ui/view {:flex-direction "row"} | |
[ui/text {:flex 1 | |
:style {:background-color "red"}}} | |
"1/3"] | |
[ui/text {:flex 2 | |
:style {:background-color "blue"}} | |
"2/3"]] |
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 example.api; | |
import android.support.annotation.NonNull; | |
import retrofit2.Call; | |
import ru.quiick_commons.api.response.ErrorResponse; | |
import ru.quiick_commons.logger.Logger; | |
import okhttp3.ResponseBody; |
OlderNewer