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
<?php | |
function listen_feed($site,$url_feed){ | |
$data = curl_init(); // inisialisasi CURL | |
curl_setopt($data, CURLOPT_RETURNTRANSFER, 1); // setting CURL | |
curl_setopt($data, CURLOPT_URL, $url_feed); // menjalankan CURL untuk membaca isi file | |
$hasil = curl_exec($data); | |
curl_close($data); | |
$kodeHTML = $hasil; | |
$pecah = explode('<pubDate>', $kodeHTML); | |
$pecahLagi = explode('</pubDate>', $pecah[1]); // Meng-Explode XML pada PubDate |
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
<?php | |
function listen_update_via_rss(){ | |
// Listen Update Via Capture XML with Curl | |
function generate_rss_url($site='',$url_feed=''){ | |
$data = curl_init(); // setting CURL | |
curl_setopt($data, CURLOPT_RETURNTRANSFER, 1); | |
curl_setopt($data, CURLOPT_URL, $url_feed); // menjalankan CURL untuk membaca isi file | |
$hasil = curl_exec($data); | |
curl_close($data); |
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
<?php | |
$hariIni = date("Y-m-d"); | |
$kadaluarsa = '2015-05-05'; // Dari Database | |
/* | |
// Contoh 1 | |
$hariIni = strtotime($hariIni); | |
$kadaluarsa = strtotime($kadaluarsa); | |
if ($kadaluarsa < $hariIni) { |
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
package com.spasi.android.util; | |
import android.util.Base64; | |
import java.security.InvalidKeyException; | |
import java.security.KeyFactory; | |
import java.security.KeyPair; | |
import java.security.KeyPairGenerator; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.NoSuchProviderException; |
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 java.io.BufferedReader; | |
import java.io.DataInputStream; | |
import java.io.StringReader; | |
import java.net.URL; | |
import java.security.InvalidKeyException; | |
import java.security.KeyFactory; | |
import java.security.KeyPair; | |
import java.security.KeyPairGenerator; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.NoSuchProviderException; |
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
<?php | |
ini_set('max_execution_time', 300); //300 seconds = 5 minutes | |
// Include CryptRSA lib. | |
include('Crypt/RSA.php'); | |
class RSASecurity { | |
// Variable RSA | |
private static $rsa; | |
// Set intance of rsa |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <conio.h> | |
typedef struct t1tag | |
{ | |
char nm[20]; | |
} t1; |
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
#include <ESP8266WiFiMulti.h> | |
#include <ESP8266HTTPClient.h> | |
#include <ArduinoJson.h> | |
#include <vector> | |
// WIfi Multi | |
ESP8266WiFiMulti WiFiMulti; | |
// GPIO init | |
const int pinOutput[] = { D2,D3,D4,D5,D6,D7,D8,D9,D10 }; |
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 java.text.DecimalFormat; | |
public class DMSConverter { | |
public static DecimalFormat df = new DecimalFormat("#"); | |
public static String lat(double vLat) { | |
double convertLat = Math.abs(vLat); | |
double dl = Math.floor(convertLat); | |
double minFloatL = (convertLat - dl) * 60; |
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 java.security.GeneralSecurityException; | |
import javax.crypto.Cipher; | |
import javax.crypto.spec.SecretKeySpec; | |
import util.B64; | |
public class Crypt { | |
OlderNewer