Skip to content

Instantly share code, notes, and snippets.

View anta40's full-sized avatar

Andre anta40

  • Jakarta, Indonesia
  • 17:55 (UTC +07:00)
View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="5dp"
app:cardBackgroundColor="@color/white"
app:cardCornerRadius="4dp"
app:cardElevation="4dp"
app:cardMaxElevation="10dp"
@anta40
anta40 / MainActivity.java
Created September 19, 2022 13:34
MainActivity Loader
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.app.LoaderManager;
import android.content.Loader;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.content.AsyncTaskLoader;
import android.content.Context;
import android.util.Log;
public class BigDataLoader extends AsyncTaskLoader<BigData> {
public BigDataLoader(Context context) {
super(context);
Log.d("test", "...BigDataLoader.");
}
import android.util.Log;
import java.util.ArrayList;
import java.util.Random;
public class BigData {
static int msDataIndex = 0;
int mDataIndex = 0;
String mDataName = "";
{
"data": [{
"tanggal": "2022-09-17",
"detail": [{
"id": 1,
"saving_id": 1
},
{
"id": 2,
"saving_id": 2
@anta40
anta40 / RandomWebview.java
Created September 27, 2021 11:54
Load random URL if webview is refreshed
package com.anta40.webviewtest;
import androidx.appcompat.app.AppCompatActivity;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
import android.os.Bundle;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
environment:
sdk: ">=2.12.0 <3.0.0"
flutter: ">=1.17.0"
dependencies:
cupertino_icons: ^1.0.2
custom_radio_grouped_button: ^2.0.0
dart_nats: ^0.3.5
dash_chat: ^1.1.16
flutter:
import java.util.Scanner;
class gaji{
public static void main(String[] args) {
String nik, nama;
int gol;
float arr[][] = {
{1.0f, 1500000.0f, 0.1f, 10.0f},
{2.0f, 2500000.0f, 0.5f, 15.0f},
{3.0f, 3500000.0f, 0.7f, 15.0f},
{4.0f, 5500000.0f, 1.0f, 20.0f}
{
draw: 1,
recordsTotal: 2,
recordsFiltered: 2,
data: [
{
date_cron: "20210318",
created_at: "2021-03-18 17:08:31",
updated_at: "2021-03-18 17:08:31"
detail_1: "aaaaa"
// Tested only on MacOS
#include <GLUT/glut.h>
#include <stdio.h>
float xt=1.0,yt=1.0; // For interactive Keyboard
float x = 1.0,y = 1.0,z=1.0; // For Movement
float angle =0; // For Function animation
float Autorun = 300; // For Movement Autorun
void animation(void)
{