Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Focusing

Iwon IwonGunawan

:octocat:
Focusing
View GitHub Profile
View custom_btn.xml
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<solid
android:color="#1E669B"/>
<stroke
android:width="2dp"
android:color="#1B5E91"/>
<corners
android:radius="6dp"/>
View dateFormat.java
import android.text.format.DateFormat;
import java.util.Calendar;
// Convert 2020-11-01 to Date
Date date = new SimpleDateFormat("yyyy-MM-dd").parse(sDate1);
// Get date time from Date
String dayOfTheWeek = (String) DateFormat.format("EEEE", date); // Thursday
String day = (String) DateFormat.format("dd", date); // 20
String monthString = (String) DateFormat.format("MMM", date); // Jun
View react.txt
parse str to html :
#1
<div dangerouslySetInnerHTML={{__html: '<strong>strong text</strong>'}} />
#2
var parse = require('html-react-parser');
parse('<div>text</div>');
@IwonGunawan
IwonGunawan / changeLog.md
Last active Nov 7, 2020
simpatdaAPI change log.
View changeLog.md

2020-10-22

  • wp dropdown

2020-10-15

  • tambah filter non_reklame_filter => POST
  • tambah filter reklame => POST

2020-10-13

View left_lookup.xlsx
INDEX($F$2:$F$340, MATCH(A4,$G$2:$G$340,0))
$F$2:$F$340 = index data yang ingin dicari
A4 = keyword (bisa di drag)
$G$2:$G$340 = parameter data
example file :
https://github.com/IwonGunawan/simpatda_api/blob/master/_archive/Left%20Lookup.xlsx
View daterange.php
<?php
// 01 - 31
function daily()
{
$tday = "01";
$tmonth = date("m");
$tyear = date("Y");
$date_from = "01";
$date_to = date("d", strtotime('-1 second',strtotime('+1 month',strtotime($tmonth.'/'.$tday.'/'.$tyear.' 00:00:00'))));