View gist:11053969
create table students ( f_name string , l_name string , id int , score float , status string ) ; | |
insert into students parameter ( f_name , l_name , id , score , status ) values ( ali , irani , 45 , 20.0 , passed ) ; | |
insert into students parameter ( f_name , l_name , id , score , status ) values ( pooya , parsa , 48 , 15.6 , passed ) ; | |
insert into students parameter ( f_name , l_name , id , score , status ) values ( masoud , bonabi , 12 , 17.3 , passed ) ; | |
insert into students parameter ( f_name , l_name , id , score , status ) values ( fellan , bahman , 1 , 9.9 , failed ) ; | |
update from students set status = pending ; | |
update from students set status = special where id = 12 ; |
View dumper.java
for(Object o:UIManager.getLookAndFeelDefaults().keySet()) | |
if(UIManager.getDefaults().get(o) instanceof Icon) | |
System.out.println(o); | |
View 2048.c
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <time.h> | |
#include <conio.h> | |
static int Tiles[16]; | |
int NoSpaceAvailable(void); | |
int SpaceAvailable(void); |
View gist:8788bbb008192db03e3f
Wednesday, August 24, 2011 | |
Configure PhpStorm to Auto-complete CakePHP Models, Views, and Controllers | |
After playing around a bit today I finally figured out how to get PhpStorm to auto-complete methods for models and controllers. Here's what you need to do. | |
Removing Multiple Definitions | |
First, let's tackle the multiple definitions problem that we see below. |
View cake_helper_code_completion.php
<?php | |
/** | |
* CakePHP Helper Code Completion | |
* @author junichi11 | |
* | |
* install NetBeans 7.0 && cakephp-netbeans plugin | |
* http://netbeans.org | |
* https://github.com/evilbloodydemon/cakephp-netbeans/tree/autocomplete | |
* /path/to/yourproject/nbproject/cake_helper_code_completion.php | |
* |
View SparseMultipliction.c
#include<stdio.h> | |
#define MAX_SIZE 20 | |
void print_sparse(int b[MAX_SIZE][3]); | |
void read_sparse(int b[MAX_SIZE][3]); | |
void multiply(int b1[MAX_SIZE][3],int b2[MAX_SIZE][3],int b3[MAX_SIZE][3]); | |
void Fast_transpose(int B1[MAX_SIZE][3],int B2[MAX_SIZE][3]); | |
View AI Game
GameClassDiagram | |
{ | |
class Entity | |
{ | |
class Unit | |
{ | |
class Human | |
class Robot | |
{ | |
class SoldierBot |
View ConsoleSinPlot.c
#include <stdio.h> | |
#include <math.h> | |
#include <conio.h> | |
int main() | |
{ | |
int i, j, val; | |
for (j = 0; j < 25; j++) { |
View Arrow keys
-32 | |
72 u | |
80 d | |
75 l | |
77 r |
View OS
#!/bin/bash | |
#trap USR1 signal | |
function on_usr1() { | |
read line < `cat my_conf` | |
echo $line > /dev/tty2 | |
echo "Got SIGUSR1 !" | |
} |
OlderNewer