git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
Typing vagrant from the command line will display a list of all available commands.
Be sure that you are in the same directory as the Vagrantfile when running these commands!
vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)| <?php | |
| class A {} | |
| $a = new A; | |
| $b = $a; | |
| // spl_object_hash($object) returns a unique identifier for the object | |
| if (spl_object_hash($a) === spl_object_hash($b)) { | |
| echo "Object variables store a copy of a unique object identifier!".PHP_EOL; | |
| echo "This unique id in this example is ".spl_object_hash($a); |
| <?php | |
| class A{ | |
| public $foo = 1; | |
| } | |
| $a = new A; | |
| // here we just copy the object id to $b | |
| $b = $a; | |
| $a->foo = 2; |
| const fib = (x) => { | |
| if(x === 0) return 0; | |
| if(x === 1) return 1; | |
| return fib(x-1) + fib(x-2); | |
| }; |
| from csv import reader | |
| from cassandra.cluster import Cluster, BatchStatement | |
| from time import time | |
| cluster = Cluster(['10.0.2.6', '10.0.2.7']); | |
| session = cluster.connect('p3'); | |
| query = """ | |
| INSERT INTO ratings (userId, movieId, rating, timestamp) | |
| VALUES (?, ?, ?, ?) |
| """ | |
| Eisen BraTS2020 challenge starter kit | |
| NOTE: you need to register to the challenge, download and unpack the data in | |
| order to be able to run the following example. | |
| Find more info here: https://www.med.upenn.edu/cbica/brats2020/data.html | |
| Information about Eisen can be found at http://eisen.ai -- Join the community on Slack https://bit.ly/2L7i6OL |
| gcc -fpic --shared $(python3-config --includes) greetmodule.c -o greet.abi3.so | |
| # can also use $(pkg-config --cflags python-3.5) | |
| # or | |
| # python3 setup.py install --record files.txt --user |
| #include <iostream> | |
| #include <string> | |
| #include <plasma/common.h> | |
| std::string hex2bin(const std::string& h) { | |
| uint8_t b[plasma::kUniqueIDSize] = {}; | |
| for(size_t i = 0; i < plasma::kUniqueIDSize; ++i) | |
| b[i] = static_cast<uint8_t>(std::stoul(std::string({h[2*i], h[2*i+1]}), nullptr, 16)); | |
| return std::string(reinterpret_cast<const char *>(b), plasma::kUniqueIDSize); | |
| } |
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using Newtonsoft.Json; | |
| namespace Microsoft.OneDrive | |
| { | |
| public class OneDriveError |