This file contains hidden or 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> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta charset="UTF-8"> | |
<title>Drawing Tools</title> | |
<script type="text/javascript" | |
src="http://maps.google.com/maps/api/js?sensor=false&libraries=drawing"></script> | |
<style type="text/css"> | |
#map, html, body { |
This file contains hidden or 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
<html> | |
<head> | |
<title>Lottery & Benfords Law</title> | |
</head> | |
<body style="margin:2% auto; text-align:center;"> | |
<h1>Win the Lottery Using Benford's Law!</h1> | |
<p>This PHP page uses Benford's law to randomly generates numbers for the Powerball Lottery<br /> | |
<a href="https://en.wikipedia.org/wiki/Benford%27s_law" target="_blank">Click here to learn more about Beford's Law<a/></p> | |
<h3>This generator increases your chances to win by approximately 30% !</h3> | |
<?php |
This file contains hidden or 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 my_wp_nav_menu_args( $args = '' ) { | |
if( is_user_logged_in() ) { | |
$args['menu'] = 'menu-private'; | |
} else { | |
$args['menu'] = 'menu-public'; | |
} | |
return $args; | |
} | |
add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' ); | |
?> |
This file contains hidden or 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
Simple instructions to clone, push and pull Git content: | |
server <<<--->>> local system | |
To clone repository from Github to local system: | |
1. Open Git Bash | |
2. git clone <URL of Repository> | |
To add file or subdirectory to local Git (Record changes to repository) | |
1. Open Git Bash | |
2. cd <directory> |
This file contains hidden or 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
//Single line comment | |
/* multiple | |
* line | |
* comment | |
*/ | |
//import libraries | |
import java.util.Scanner; | |
import java.math.BigDecimal; |
This file contains hidden or 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 | |
// Queries twitter using specific keyword and posts most recent 100 tweets | |
error_reporting(E_ERROR); | |
$json = file_get_contents("http://mikestratton.net/temp/bigdatabox/src/raw_twitter_Lebron_James.php"); | |
$t_query = json_decode($json,true); | |
$query = $t_query ['search_metadata']['query']; | |
echo "<h1>Users Tweeting About: ".$query." </h1>"; | |
reset($t_query); |
This file contains hidden or 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 | |
//Program that finds the most frequent element in an array. | |
$data=Array(); | |
echo "Enter numbers:"; | |
for($i=0;$i<6;$i++) | |
{ | |
$data[$i]=trim(fgets(STDIN));; | |
} | |
// Using methods: array_count_values, arsort, array_keys |
This file contains hidden or 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 | |
// using method array_reverse | |
echo "Enter 5 elements:"; | |
for($i = 0 ; $i<5;$i++) | |
{ | |
$arr[$i]=trim(fgets(STDIN)); | |
} | |
echo "\nYour input: \n"; | |
foreach ($arr as $value1){ |
This file contains hidden or 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 | |
echo "Enter 1st number:"; | |
$num1 = trim(fgets(STDIN)); | |
echo "Enter 2nd number:"; | |
$num2 = trim(fgets(STDIN)); | |
$sum = $num1 + $num2; //sum | |
echo ("Sum: "."\n".$sum."\n \n"); | |
$dif = $num1 - $num2; //difference | |
echo ("Difference: "."\n".$dif."\n \n"); |
This file contains hidden or 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 | |
echo "Enter the experience:"; | |
$exp = trim(fgets(STDIN)); | |
echo "Enter the age of the person:"; | |
$age = trim(fgets(STDIN)); | |
while ($exp == 0){ | |
$salary = 2000; | |
echo $salary; | |
exit; |