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 | |
define('USAGE', 'Usage : php '.$argv[0].' --package package_name [--path '.__DIR__.'] [--dependencies] [--overwrite] [--nocache] [--help]'.PHP_EOL); | |
if($argc == 1) | |
{ | |
echo USAGE; | |
exit; | |
} | |
try |
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 | |
$begin = microtime(TRUE); | |
$args = parse_argv($argv); | |
echo PHP_EOL.'Processing the file...'.PHP_EOL; | |
$contents = file($args['in'], FILE_IGNORE_NEW_LINES); | |
$difference = $args['diff']; | |
$out = isset($args['out']) ? $args['out'] : $args['in']; |
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 | |
try | |
{ | |
list($id, $path) = parse_argv($argv); | |
$links = get_links($id); | |
if(($link_count = sizeof($links)) === 0) | |
{ | |
echo 'No links were found.'.PHP_EOL; |
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 std.stdio; | |
import std.file; | |
import std.path : buildPath; | |
import std.exception : enforce; | |
int main(string[] args) | |
{ | |
string root; | |
string file; |
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 | |
session_start(); | |
$conn = mysqli_connect('localhost', 'root', '', 'test'); | |
if(mysqli_connect_error()) | |
{ | |
echo '<p>Connexion à la base de données échouée : ' . mysqli_connect_error() . '</p>'; | |
exit; | |
} | |
?> |
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
loadDetailsButton.click ~= &loadDetailsButton; | |
//... | |
void loadDetailsCallback(Control sender, EventArgs ea) | |
{ | |
if(!urlBox.text) | |
{ | |
msgBox("No URL was provided.", "Error", MsgBoxButtons.OK, MsgBoxIcon.INFORMATION); | |
urlBox.focus(); |
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 | |
if(compare_files('file1', 'file2')) | |
echo 'Files are similar', PHP_EOL; | |
else | |
echo 'Files are different', PHP_EOL; | |
function compare_files($a, $b, $buf_size = 1048576) | |
{ | |
if($a === $b) | |
return true; |
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
<form method = "post"> | |
<p><label>Nom : <input type = "text" name = "nom" /></label></p> | |
<p><label>Prenom : <input type = "text" name = "prenom" /></label></p> | |
<p><label>CIN : <input type = "text" name = "cin" /></label></p> | |
<p><label>Adresse : <input type = "text" name = "adresse" /></label></p> | |
<p><label>Email : <input type = "text" name = "email" /></label></p> | |
<p><input type = "submit" value = "Convertir" /></p> | |
</form> | |
<?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
#include <iostream> | |
#include <algorithm> | |
#include <array> | |
#include <utility> | |
#include <map> | |
#include <vector> | |
#include <queue> | |
struct Point | |
{ |
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> | |
#include <vector> | |
#include <SFML/Graphics.hpp> | |
class Scroller | |
{ | |
sf::Texture texture; | |
sf::IntRect rect; | |
public: | |
Scroller(sf::Texture& texture) |
OlderNewer