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
# Configuration file for ipython. | |
c = get_config() | |
#------------------------------------------------------------------------------ | |
# InteractiveShellApp configuration | |
#------------------------------------------------------------------------------ | |
# A Mixin for applications that start InteractiveShell instances. | |
# |
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
$ cabal install -v3 --only-dependencies | |
Searching for ghc in path. | |
Found ghc at /usr/bin/ghc | |
("/usr/bin/ghc",["--numeric-version"]) | |
/usr/bin/ghc is version 7.6.2 | |
looking for tool ghc-pkg near compiler in /usr/bin | |
found ghc-pkg in /usr/bin/ghc-pkg | |
("/usr/bin/ghc-pkg",["--version"]) | |
/usr/bin/ghc-pkg is version 7.6.2 | |
("/usr/bin/ghc",["--supported-languages"]) |
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
import Control.Applicative | |
data Tree a = Leaf a | |
| Node (Tree a) (Tree a) | |
deriving Show | |
instance Functor Tree where | |
fmap f (Leaf a) = Leaf (f a) | |
fmap f (Node x y) = Node (fmap f x) (fmap f y) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery.min.js"></script> | |
<link href="http://getbootstrap.com/dist/css/bootstrap.css" rel="stylesheet" type="text/css" /> | |
<script src="http://getbootstrap.com/dist/js/bootstrap.js"></script> | |
<link href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.min.css" rel="stylesheet" type="text/css" /> | |
<script src="http://code.jquery.com/ui/1.10.4/jquery-ui.min.js"></script> | |
<link href="./jquery.jqplot.min.css" rel="stylesheet" | |
type="text/css" /> |
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
(* Pattern Matching in Records | |
Let us pattern match {first:string,second:string,third:string} | |
*) | |
(*You should not code like this. | |
This code will produce a type of val test = fn : {a:'a, b:'b, c:'c} -> {first:'a, second:'b, third:'c} | |
So, it creates actually records with fields of a, b and c. This is not what you want. | |
*) | |
fun test e = |
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
#include <iostream> | |
#include <string> | |
using namespace std; | |
int main() | |
{ | |
int number = 50; | |
string str; | |
str = to_string(number); | |
cout<<str; |
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
[Dialer airtel] | |
Init1 = ATZ | |
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0 | |
Init3 = AT+CGDCONT=1,"IP","airtelgprs.com" | |
Modem Type = USB Modem | |
Baud = 460800 | |
New PPPD = yes | |
Modem = /dev/ttyUSB0 | |
ISDN = 0 | |
Phone = *99# |
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 Sim import Simulator | |
a = Simulator() | |
b = a.start_execution(3,["hi","/home/sibi/Downloads/Softwares/version5/trunk/src/Transims50/alexandria/setup/control/sim.ctl"]) |
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
var jobject = $(html_response_data); | |
$("caption.featureInfo",jobject).remove(); //Removing Caption tag | |
var mytable = "<table class=\"featureInfo\"><thead>"; | |
var trs = $('tr',jobject); | |
trs.each(function(i,n) { //console.log($(n).html()); | |
if (i==0) { mytable += $(n).html(); mytable += "</thead><tbody>";} | |
else { mytable += "<tr>"; mytable +=$(n).html(); mytable += "</tr>";} | |
}); | |
mytable += "</tbody></table>"; | |
$('#nodelist').html(mytable); //Put the table in the div whose id is "nodelist" |
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
var body = '<div id="body-mock">' + html_variable.replace(/^[\s\S]*<body.*?>|<\/body>[\s\S]*$/g, '') + '</div>'; | |
var jobject = $(body); |