This file contains hidden or 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
| #include <iostream> | |
| #include <math.h> | |
| #include <algorithm> | |
| using namespace std; | |
| int linearSearch(int arr[], int s, int target); | |
| int binarySearch(int arr[], int first, int last, int target); | |
| int blockSearch(int arr[], int size, int target); | |
This file contains hidden or 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
| const functions = require('firebase-functions'); | |
| const admin = require('firebase-admin'); | |
| const firestoreSettings = { timestampsInSnapshots: true }; | |
| admin.initializeApp(functions.config().firebase); | |
| const firestore = admin.firestore(); | |
| firestore.settings(firestoreSettings); | |
| /** | |
| * http request triggers the function |
This file contains hidden or 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
| 'use strict'; | |
| var p = console.log; | |
| var FS = require('fs'); | |
| // fs appendFile Promise wrapper | |
| function write(path, data){ | |
| return new Promise((res, rej) => FS.appendFile(path, data, err => | |
| err ? rej(err) : res(p(data, 'is done!')) | |
| )); |
This file contains hidden or 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
| class NotDialogFragment : Fragment() { | |
| private var reserveDismiss = false // resume時にこのdialogを閉じる | |
| private var reserveShow = false // resume時に表示 | |
| private lateinit var dialogMain: LinearLayout | |
| override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? { | |
| return inflater?.inflate(R.layout.fragment_load, container, false)?.apply { | |
| dialogMain = findViewById<FrameLayout>(R.id.dialog_main_layout).also { | |
| it.visibility = View.GONE |
This file contains hidden or 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.app.Application | |
| import android.util.Log | |
| import io.repro.android.Repro | |
| import org.xmlpull.v1.XmlPullParser | |
| import java.lang.Exception | |
| class ReproApplication : Application() { | |
| companion object { | |
| private const val REPRO_TOKEN_KEY = "repro_sdk_token" | |
| } |
This file contains hidden or 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 io.repro.android.Repro | |
| class ReproTrigger { | |
| companion object { | |
| private var instance: ReproTrigger? = null | |
| fun getInstance(): ReproTrigger { | |
| if (instance == null) | |
| instance = ReproTrigger() | |
| return instance!! | |
| } |
This file contains hidden or 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.util.Log | |
| import com.android.volley.Response | |
| import com.android.volley.VolleyError | |
| import com.android.volley.toolbox.JsonObjectRequest | |
| import com.example.koheiando.twittervolleysample.TvsApplication | |
| import kotlinx.coroutines.suspendCancellableCoroutine | |
| import org.json.JSONObject | |
| import kotlin.coroutines.resume | |
| import kotlin.coroutines.resumeWithException |
This file contains hidden or 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 org.json.JSONObject | |
| abstract class HttpResponse { | |
| companion object { | |
| const val HEADER_KEY = "header" | |
| const val RESPONSE_KEY = "response" | |
| } | |
| internal abstract fun parseJson(json: JSONObject): HttpResponse | |
| } |
This file contains hidden or 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.Context | |
| import com.android.volley.Request | |
| import com.android.volley.RequestQueue | |
| import com.android.volley.toolbox.Volley | |
| /** | |
| * Singleton | |
| */ | |
| class HttpRequestQueue constructor(context: Context) { |
OlderNewer