This file contains hidden or 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
package main | |
import ( | |
"fmt" | |
"sync" | |
) | |
func printNumber(i int) int { | |
fmt.Println(i) | |
return i |
This file contains hidden or 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
variables begin with an uppercase letter. | |
you can assign a value to a variable exactly once | |
The = operator (not the variables) has the role of comparing values and complaining if they're different. If they're the same, it returns the value: | |
If you're testing in the shell and save the wrong value to a variable, it is possible to 'erase' that variable by using the function f(Variable).. If you wish to clear all variable names, do f().. | |
Erlang won't care about floats and integers in arithmetic, but will do so when comparing them | |
6> 5 =:= 5. | |
true | |
7> 1 =:= 0. |
This file contains hidden or 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
alias gdbnew='/usr/local/Cellar/gdb/7.6/bin/gdb' |
This file contains hidden or 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
<!-- http://test1:8181/restconf/config/opendaylight-inventory:nodes/node/openflow:72058212700834815/table/0/flow/161 --> | |
<flow xmlns="urn:opendaylight:flow:inventory"> | |
<instructions> | |
<instruction> | |
<order>0</order> | |
<apply-actions> | |
<action> | |
<order>0</order> | |
<output-action> |
This file contains hidden or 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
from django.utils import simplejson | |
from django.core import serializers | |
from models import Apple, Orange | |
def AjaxQuery(request): | |
apple_json = serializers.serialize('json', Apples.objects.all() ) | |
apple_list = simplejson.loads( apple_json ) | |
orange_json = serializers.serialize('json', Orange.objects.all() ) | |
orange_list = simplejson.loads( orange_json ) |
This file contains hidden or 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/sh | |
sudo apt-get -y remove wireshark | |
sudo apt-get -y install libgtk-3-dev libqt4-dev flex bison | |
wget https://www.wireshark.org/download/src/wireshark-1.12.1.tar.bz2 | |
tar xvfj wireshark-1.11.3.tar.bz2 | |
cd wireshark-1.12.1 | |
./configure | |
make -j4 | |
sudo make install |
This file contains hidden or 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/sh | |
echo "setting the environment" | |
echo "if the br0 exist then delete the br0" | |
sudo ovs-vsctl del-br br0 | |
echo "creating the veth" | |
sudo ip link add veth0 type veth peer name veth1 |
This file contains hidden or 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
package org.opendaylight.controller.northboundtest.unittestsuite.internal; | |
import org.opendaylight.controller.sal.core.ComponentActivatorAbstractBase; | |
import org.apache.felix.dm.Component; | |
public class Activator extends ComponentActivatorAbstractBase { | |
/** | |
* Function called when the activator starts just after some |
NewerOlder