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> | |
using namespace std; | |
struct Point | |
{ | |
size_t x; | |
size_t y; | |
Point() : x(0), y(0) {} |
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 <SoftwareSerial.h> | |
#include "SIM900.h" | |
bool gprs_active; | |
char incoming[255] = ""; | |
bool handling_call; | |
void setup() | |
{ | |
handling_call = false; |
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) |
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
<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
<?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
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 | |
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
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 | |
try | |
{ | |
list($id, $path) = parse_argv($argv); | |
$links = get_links($id); | |
if(($link_count = sizeof($links)) === 0) | |
{ | |
echo 'No links were found.'.PHP_EOL; |
NewerOlder