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.R | |
import android.annotation.SuppressLint | |
import android.app.NotificationChannel | |
import android.app.NotificationManager | |
import android.content.Context | |
import androidx.core.app.NotificationCompat | |
import androidx.work.* | |
import org.koin.core.KoinComponent | |
import org.koin.core.inject |
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.annotation.SuppressLint | |
import android.content.Context | |
import android.util.AttributeSet | |
import android.view.MotionEvent | |
import android.view.ViewConfiguration | |
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout | |
import kotlin.math.abs | |
/** |
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
// | |
// ViewController.m | |
@implementation ViewController : UIViewController | |
-(void) shareMethod: (const char *) path Message : (const char *) shareMessage | |
{ | |
NSString *imagePath = [NSString stringWithUTF8String:path]; | |
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
// List of total cards to swipe for a diamond | |
// Minimum being 3 and Maximum being 13 | |
var diamond_targets = [3,8,5,7,9,10,4,12,13,6]; | |
// Sets the total ammount of cards to solve | |
function set_total_cards_to_solve_for_diamond() { | |
// a random number from the list | |
var random |
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
ParallelAnimation { | |
id: shake_card | |
running: false | |
alwaysRunToEnd: true | |
ParallelAnimation { | |
ColorAnimation { target: thefirstword; property: "color" ; to: first_word_color;duration: brokecolors ? 1000 : 0 ; easing.type: Easing.Linear; } | |
ColorAnimation { target: thefirstword; property: "styleColor" ; to: "#00000000";duration: brokecolors ? 1000 : 0 ; easing.type: Easing.Linear; } |
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
// Plays the correction animation when the user gets the answer wrong | |
ParallelAnimation { | |
id: correciton_animation | |
alwaysRunToEnd: true | |
ScaleAnimator { running: false ; target: thefirstword; from: 1; to: 1.3; duration: 600 ; easing.type: Easing.OutExpo; } | |
ScaleAnimator { running: false ; target: thesecondword; from: 1; to: 1.3; duration: 600 ; easing.type: Easing.OutExpo; } | |
ScaleAnimator { running: false ; target: answer_word; from: 1; to: 1.3; duration: 600 ; easing.type: Easing.OutExpo; } | |
ScaleAnimator { running: false ; target: is; from: 1; to: 1.1; duration: 400; easing.type: Easing.OutExpo; } |
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
EasyCamera camera = DefaultEasyCamera.open(); | |
CameraActions actions = camera.startPreview(surface); | |
PictureCallback callback = new PictureCallback() { | |
public void onPictureTaken(byte[] data, CameraActions actions) { | |
// store picture | |
} | |
}; | |
actions.takePicture(Callbacks.create().withJpegCallback(callback)); |
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
if (matcher.matches()) { | |
// Handle as array | |
String fieldName = matcher.group(1); | |
int index = Integer.parseInt(matcher.group(2)); | |
JSONArray newArrayStep; | |
if (root.has(fieldName)) { | |
newArrayStep = root.getJSONArray(fieldName); | |
} else { | |
newArrayStep = new JSONArray(); | |
root.put(fieldName, newArrayStep); |