Skip to content

Instantly share code, notes, and snippets.

View anta40's full-sized avatar

Andre anta40

  • Jakarta, Indonesia
  • 15:02 (UTC +07:00)
View GitHub Profile
package com.divbyzero.app.githubusersearch.viewmodel;
import android.util.Log;
import androidx.lifecycle.LiveData;
import androidx.lifecycle.MutableLiveData;
import androidx.lifecycle.ViewModel;
import com.divbyzero.app.githubusersearch.api.APIEndPoint;
import com.divbyzero.app.githubusersearch.api.APIService;
@anta40
anta40 / people.json
Created April 21, 2020 12:41
search people
{
"status": true,
"message": "General Searching",
"data": {
"size": 1,
"data": [
{
"user_id": "114",
"employee_id": null,
"office_shift_id": null,
<html lang="en">
<head>
<meta charset="utf-8"/>
<title>Update Profile</title>
</head>
<body>
<form action="http://localhost/idstar/api/profile?X-Api-Key=idstar123!&X-Token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjoiMTMyIn0sImlhdCI6MTU4NTYyMjc5NSwiZXhwIjoxNTg1NjI5OTk1fQ.3HR9YC21j-46xriB6-Q-UceSEp9enWQPO6FiTp_mV3M" method="post" enctype="multipart/form-data">
<p>Full name: <input type="text" name="fullname" value="">
<p>Title: <input type="text" name="job_title" value="">
<p>Date of Birth: <input type="date" name="date_of_birth" value="2018-07-22">
[
{"nomortogel":1, "banyak": 1},
{"nomortogel":4, "banyak": 2},
{"nomortogel":4, "banyak": 2},
{"nomortogel":6, "banyak": 1}
]
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.charset.StandardCharsets;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.util.List;
import java.util.ArrayList;
import java.util.Set;
class Togel {
private int no, banyak;
public Togel (int no, int banyak){
this.no = no;
this.banyak = banyak;
}
public int getNo(){ return no; }
import 'dart:io';
import 'package:flutter/material.dart';
class MyHttpOverrides extends HttpOverrides{
@override
HttpClient createHttpClient(SecurityContext context){
return super.createHttpClient(context)
..badCertificateCallback = (X509Certificate cert, String host, int port)=> true;
}
@anta40
anta40 / testtanggal1.php
Created March 7, 2020 04:41
Menghitung selisih 2 tanggal (dalam hari) di PHP
<?php
$time1 = new DateTime(date("Y-m-d"));
$time2 = new DateTime('2020-03-05');
$interval = $time1->diff($time2)->format("%r%a");
echo "$interval hari";
?>
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.divbyzero.app.xcardviewtest01"
minSdkVersion 21
targetSdkVersion 29
versionCode 1
01/16 13:36:08: Launching 'app' on Pixel 2 API 21.
$ adb shell am start -n "com.divbyzero.app.xcardviewtest01/com.divbyzero.app.xcardviewtest01.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 2795 on device 'Pixel_2_API_21 [emulator-5554]'.
Capturing and displaying logcat messages from application. This behavior can be disabled in the "Logcat output" section of the "Debugger" settings page.
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter androidx.vectordrawable.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>
I/art: Rejecting re-init on previously-failed class java.lang.Class<androidx.core.view.ViewCompat$2>
D/OpenGLRende