Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Verifying my Blockstack ID is secured with the address 1NxhVEagZophCbq766T6QMZquyeYJ5bsf https://explorer.blockstack.org/address/1NxhVEagZophCbq766T6QMZquyeYJ5bsf |
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 | |
/* | |
Following Explanation From Wikipedia | |
https://en.wikipedia.org/wiki/Encapsulation_(computer_programming) | |
Encapsulation is used to hide the values or state of a structured data object inside a class | |
*/ | |
class AClass { | |
private $propertyDoesntViolateEncapsulation = 0; | |
private static $propertyViolatesEncapsulation = 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 <stdio.h> | |
#include <omp.h> | |
double piCalculation() { | |
static int num_total_steps = 100000; | |
int num_steps = (num_total_steps / omp_get_num_threads()); | |
double step; | |
double sum = 0.0; | |
double execution_time = omp_get_wtime(); | |
step = 1.0 / (double) num_total_steps; |
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
1. input -> empty file | |
line #* E I O op fetch ext return operands | |
------------------------------------------------------------------------------------- | |
2 0 E > > RETURN 1 | |
2. input -> '<?php' | |
line #* E I O op fetch ext return operands | |
------------------------------------------------------------------------------------- |
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
#!/bin/bash | |
export SYMFONY_APP=$1 | |
composer ${@:2} | |
# --usage ./multicomposer.sh api install |
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
/** | |
* @var string | |
* | |
* @ORM\Column(name="firstname", type="string", length=45, nullable=true) | |
* @Assert\Length( | |
* min = 2, | |
* max = 45, | |
* minMessage = "user.form.validation.firstname.min", | |
* maxMessage = "user.form.validation.firstname.max", | |
* groups = {"personal_info"} |
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
# Symfony bin path | |
set :bin_path, "bin" | |
# Symfony var path | |
set :var_path, "var" | |
# Symfony console path | |
set :symfony_console_path, fetch(:bin_path) + "/console" | |
# Symfony log path |
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
#!/bin/bash | |
# include config | |
# config example below: | |
# | |
# | |
# Example deploy_config.sh | |
# | |
# dev_env() { |
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
/** | |
This function creates a connection to the database. It shouldn't have to know anything | |
about the pool, It will be called N times where N is the size of the requested pool. | |
*/ | |
func initCirrusConnections() (interface{}, error) { | |
dbserver, _ := configFile.GetString("default", "dbserver") | |
dbuser, _ := configFile.GetString("default", "dbuser") | |
dbpass, _ := configFile.GetString("default", "dbpass") | |
db := autorc.New("tcp", "", dbserver, dbuser, dbpass) |
NewerOlder