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
float tri_angle; | |
float radius = 150; | |
int max_tris = 90; | |
color tri_colors[] = new color[max_tris]; | |
float lower_threshold = 0.2; | |
float upper_threshold = 0.8; | |
void setup() { | |
size( 400, 400, P2D ); | |
smooth(8); |
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
/* Body ------------------------------------------------------------ */ | |
::-moz-selection, | |
::selection { | |
background-color: #600CAC; | |
color: #fff; | |
} | |
/* this will not work */ |
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
QR Code: http://i.imgur.com/Rcb7brC.jpg | |
Windows Binary: https://dl.dropboxusercontent.com/u/6430099/MiniTris.zip | |
Source: | |
// TETRIS Move W,A,S,D Rotate U,I | |
#include<SDL.h> | |
#include<stdlib.h> | |
#define c if | |
#define q for | |
#define Z 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 | |
$link = mysqli_connect('localhost', 'user', 'password'); //replace user with root of the user name | |
if (!$link) | |
{ | |
$output = 'Unable to connect to the database server.'; // If connection to MySQL server fails | |
include 'output.html.php'; // error message will be stored $output | |
exit(); | |
} | |
if (!mysqli_set_charset($link, 'utf8')) |
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
/* | |
* Horizontally center a div within a div using CSS | |
*/ | |
#inner-new { | |
margin: 0 auto; | |
} | |
/* | |
* If you are targeting IE8+, it might be better to have this instead: |
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
/** | |
* Center with inline block | |
*/ | |
@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css); | |
.row{ | |
width: 100%; | |
text-align: center; | |
} | |
.cols{ | |
/* margin: 0 auto; */ |
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
/** | |
* center div with box model | |
*/ | |
@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css); | |
.row{ | |
width:100%; | |
/* Firefox */ | |
display:-moz-box; | |
-moz-box-pack:center; |
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
/* | |
* Dabblet: Font Awesome Icon test | |
*/ | |
@import url(https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css); | |
/* just to center align div */ | |
.row{ | |
width: 100%; | |
text-align: center; | |
} | |
.cols{ |
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 | |
class Migration_Create_Sessions extends CI_Migration { | |
public function up() | |
{ | |
$fields = array( | |
'id VARCHAR(40) DEFAULT \'0\' NOT NULL', | |
'ip_address VARCHAR(45) DEFAULT \'0\' NOT NULL', | |
'timestamp INT(10) unsigned DEFAULT 0 NOT NULL', |
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
/* | |
* Most web browsers these days do not explicitly handle | |
* html text styling - SUB, SUP, B, I and so on - they (kinda | |
* sorta) are converted into SPAN elements with appropriate CSS | |
* properties, and the rendering engine only deals with that. | |
* | |
*/ | |
/* B for bold */ | |
.bold { |
OlderNewer