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 lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1" /> | |
<title>untitled</title> | |
<link rel="stylesheet" href="" /> | |
</head> | |
<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
<?php | |
$fh = fopen("myfile.csv", "r"); | |
while ($line = fgets($fh)) { // Read one line at-a-time until end of file | |
$words = explode (';', $line ); // break the line down to words, by separating on a ';' | |
echo "This line consisted of the following words:\n"; | |
foreach ($words as $word) { //display all words | |
echo "Word: ". $word. "\n"; | |
} | |
// update the database here. |
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
public function countLines($filePath, $emptyLines = true) { | |
$lineCounts = 0; | |
if (is_file($filePath) == true) { | |
$fileHandle = fopen($filePath, 'r'); | |
if ($fileHandle == true) { | |
while(feof($fileHandle) == false) { | |
$currentLine = fgets($fileHandle); | |
if ($emptyLines == false) { | |
if (trim($currentLine) != null) { | |
$lineCounts = $lineCounts + 1; |
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
<form enctype="multipart/form-data" action="uploader.php" method="POST"> | |
<input type="hidden" name="MAX_FILE_SIZE" value="100000" /> | |
Choose a file to upload: <input name="uploadedfile" type="file" /><br /> | |
<input type="submit" value="Upload File" /> | |
</form> |
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
CREATE TABLE recipes_new LIKE production.recipes; INSERT recipes_new SELECT * FROM production.recipes; |
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
CREATE FUNCTION `GoogleDistance_KM`( | |
geo_breitengrad_p1 double, | |
geo_laengengrad_p1 double, | |
geo_breitengrad_p2 double, | |
geo_laengengrad_p2 double ) RETURNS double | |
RETURN (6371 * acos( cos( radians(geo_breitengrad_p2) ) * cos( radians( geo_breitengrad_p1 ) ) | |
* cos( radians( geo_laengengrad_p1 ) - radians(geo_laengengrad_p2) ) | |
+ sin( radians(geo_breitengrad_p2) ) * sin( radians( geo_breitengrad_p1 ) ) ) | |
); |
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
$(document).ready(function() { | |
// Handler for .ready() called. | |
}); |
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() { | |
/* Your code here */ | |
}()) |
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 interval(duration, fn){ | |
this.baseline = undefined | |
this.run = function(){ | |
if(this.baseline === undefined){ | |
this.baseline = new Date().getTime() | |
} | |
fn() | |
var end = new Date().getTime() | |
this.baseline += duration |
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
<Images xmlns=""> | |
<Image ObjectID="TDS00020010051505595"> | |
<DescribingName> | |
<Value LanguageCode="fr">salle de bain 2</Value> | |
<Value LanguageCode="de">salle de bain 2</Value> | |
<Value LanguageCode="en">salle de bain 2</Value> | |
<Value LanguageCode="es">salle de bain 2</Value> | |
<Value LanguageCode="it">salle de bain 2</Value> | |
</DescribingName> | |
<MultimediaGroup LookupID="WBX00020010000126810"> |
OlderNewer