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 | |
//header begin | |
/* | |
* Force url rewrite (www.website.com -> www.website.com/index.php) | |
*/ | |
$req = $_SERVER['REQUEST_URI']; | |
if (strpos($req,"index.php") !== false) {//if true (good, no rewrite needed) | |
}else{ //redirect if false | |
header('Location: index.php'); | |
} |
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 | |
//note: this uses an external dom library | |
include('simple_html_dom.php'); | |
$dag = $_GET["d"]; | |
$l = $_GET["l"]; | |
$r = $_GET["r"]; | |
if(empty($dag) || empty($l) || empty($r)){ | |
return; |
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 | |
include('simple_html_dom.php'); | |
$html = file_get_html('http://photography.nationalgeographic.com/photography/photo-of-the-day/'); | |
$pic; | |
foreach($html->find('.primary_photo a img') as $img){ | |
$pic = 'http:'.$img->src; | |
break; | |
} |
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
var request = require("request"); | |
var open = require('open'); | |
function say(text, callback){ | |
request.post({url:'http://www.acapela-group.com/demo-tts/DemoHTML5Form_V2.php', form: { | |
MyLanguages:"sonid9", | |
MySelectedVoice:"Graham", | |
MyTextForTTS: text, | |
t:"1", | |
SendToVaaS:"" |
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
[25,33,36,41,47,59,63,65,80,81,89,97,135,139,142,178,179,181,185,191,199,211,213,218,222,228,231,232,285,288,302,319,337,348,356,358,368,385,387,397,398,400,401,406,415,418,419,445,447,448,449,453,455,464,472,495,500,507,508,511,519,535,547,552,555,559,590,600,601,605,606,620,650,655,675,676,689,691,693,702,703,716,718,723,742,747,767,768,790,809,810,811,812,818,821,823,842,846,847,893,905,906,912,918,919,928,934,947,948,952,958,962,980,986] |
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
<html> | |
<head> | |
<title>Using Frameworks!</title> | |
<!-- This is where the magic happens. We include the bootstrap files from their server. !--> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> | |
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script> | |
</head> | |
<body> | |
<h1>Your content goes here.</h1> | |
</body> |
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 | |
//the function | |
function toNum($data) { | |
$data = str_replace("a","1",$data);$data = str_replace("A","1",$data); | |
$data = str_replace("b","2",$data);$data = str_replace("B","2",$data); | |
$data = str_replace("c","3",$data);$data = str_replace("C","3",$data); | |
$data = str_replace("d","4",$data);$data = str_replace("D","4",$data); | |
$data = str_replace("e","5",$data);$data = str_replace("E","5",$data); | |
$data = str_replace("f","6",$data);$data = str_replace("F","6",$data); | |
$data = str_replace("g","7",$data);$data = str_replace("G","7",$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
[ | |
{ | |
"building": "Sarfatti 25", | |
"floors": { | |
"basement": ["INFOU01"], | |
"ground": [1,2,3,4,"A","B","C","D","E","F","Norari","Zappa","INFO6"], | |
"1st": [11,12,13,14,15,16,101,"Manfredini","Perego"], | |
"2nd": [21,22,23,24,25,26,201,202,203,204,205,206,"Maggiore","ES2M"], | |
"3rd": [31,32,33,34,34,35,36,301,302], | |
"4th": [41,42,43,44,"4a","4b","4c"] |
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
var cheerio = require('cheerio'); | |
var fs = require('fs'); | |
var parseurl = require('parseurl'); | |
var queryString = require('querystring'); | |
var path = require('path'); | |
let files = fs.readdirSync('htmls'); | |
let toAnalyze = []; | |
for(x in files){ |
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 glob | |
import math | |
import numpy | |
from pathlib import Path | |
from PIL import Image | |
Image.MAX_IMAGE_PIXELS = 933120000 | |
zoomdir = "C:/Users/tkon9/Desktop/RDR2MapStream/content/maps/sat" # Essentially the output directory |
OlderNewer