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 main | |
import "fmt" | |
func main() { | |
var operator string | |
var number1, number2 int | |
fmt.Print("Please enter First number: ") | |
fmt.Scanln(&number1) | |
fmt.Print("Please enter Second number: ") |
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 <iostream> | |
using namespace std; | |
int main(){ | |
float a, b, res; | |
char choice, ch; | |
do | |
{ | |
cout<<"1.Addition\n"; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>dns</title> | |
</head> | |
<body> | |
<form action="" method="post"> | |
<select name="jenis_scan"> |
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
let mysql = require('mysql'); | |
var db = mysql.createConnection({ | |
host: 'localhost', | |
user: 'root', | |
password: 'root', | |
database: 'phpdasar' | |
}); | |
db.connect(function(err){ | |
if(err) throw err; | |
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 | |
$Block = array('asu','bangsat', 'njir'); // kata yang ingin diblok | |
$String = "asu, tadi njir, tadi ada orang bangsat !"; | |
$String = preg_replace("/(\b|[0-9_])(".implode('|',$Block).")(\b|[0-9_])/i", '***', $String); | |
echo $String; |
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 | |
//example data | |
$data = "hmhmh"; | |
if ( base64_encode(base64_decode($data, true)) === $data){ | |
echo $data . ' itu valid'; | |
} else { | |
echo $data . ' itu tidak valid'; | |
} | |
//end :) |
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 rampingkan_text($string, $type) | |
{ | |
//PERTAMA cek kondisi dia milih type rampingkan apanya | |
if($type == "NEW_LINE"){ | |
$ipes = PHP_EOL; | |
}elseif($type == "SPACE"){ | |
$ipes = " "; | |
}elseif($type == "KOMA"){ | |
$ipes = ","; |
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
function rampingkan_teks(string, type) { | |
if (type == "NEW_LINE") { | |
ipes = '\r\n'; | |
} else if (type == "SPACE") { | |
ipes = " "; | |
} else if (type == "KOMA") { | |
ipes = ","; | |
} else if (type == "TITIK") { | |
ipes = "."; | |
} else if (type == "NEW_LINE_SPACE") { ipes = '\r\n' + " "; } |
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 encode($string,$key) { | |
$key = sha1($key); | |
$strLen = strlen($string); | |
$keyLen = strlen($key); | |
for ($i = 0; $i < $strLen; $i++) { | |
$ordStr = ord(substr($string,$i,1)); | |
if ($j == $keyLen) { $j = 0; } | |
$ordKey = ord(substr($key,$j,1)); | |
$j++; |
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 | |
$host = "https://google.com"; | |
$count = 10000 | |
for ($a = 1; $a < $count; $a++) { | |
$nodes[] = $host; | |
} | |
$node_count = count($nodes); | |
$curl_arr = array(); | |
$master = curl_multi_init(); |
OlderNewer