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
private static void printHTML(Node target) | |
{ | |
if(target.hasBache()) | |
{ | |
ArrayList<Node> temp = target.getKids(); | |
for(int i = 0; i < temp.size(); i++) | |
{ | |
Node child = temp.get(i); | |
if(child.isTag()) | |
{ |
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 images = [/*Array of image views with width of 22%*/]; | |
var row; | |
var grid = Ti.UI.createView({ | |
layout: 'vertical' | |
}); | |
for (var i=0; i<images.length; i++) { | |
if (i % 4 == 0) { | |
row = Ti.UI.createView({ |
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 dateOfBirth = Ti.UI.createPicker({ | |
type: Ti.UI.PICKER_TYPE_DATE, | |
minDate:new Date(1900,1,1), | |
maxDate:new Date(2000,1,1), | |
value:new Date(1995,8,1) | |
}); | |
var birthDayLine = Ti.UI.createView({ | |
layout: 'horizontal', | |
height: Ti.UI.SIZE, |
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
professionsTable.addEventListener('click', function(e) | |
{ | |
if (e.row.path) | |
{ | |
var win = Ti.UI.createWindow({ | |
url: e.row.path, | |
title: e.row.title | |
}); | |
var profession = e.row.title; |
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
[bilalq@cpp:.scripts]$ ./prime | |
2 | |
3 | |
5 | |
13 | |
89 | |
233 | |
1597 | |
28657 | |
514229 |
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
#!/usr/bin/env ruby | |
$path="/ilab/users/bilalq/.scripts/primeList.txt" | |
class Prime | |
def initialize | |
@primes=File.open($path).collect do |num| | |
num.to_i | |
end | |
@count = @primes.size | |
end |
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 http = require("http"); | |
var url = require("url"); | |
function start() { | |
function onRequest(request, response) { | |
var pathname = url.parse(request.url).pathname; | |
console.log("Request for " + pathname + " received."); | |
response.writeHead(200, {"Content-Type": "text/plain"}); | |
response.write("Hello World"); | |
response.end(); |
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
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Sep 24 2012 01:10:22) | |
MacOS X (unix) version | |
Included patches: 1-646 | |
Compiled by [email protected] | |
Huge version with MacVim GUI. Features included (+) or not (-): | |
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent | |
+clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments | |
+conceal +cryptv -cscope +cursorbind +cursorshape +dialog_con_gui +diff | |
+digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi | |
+file_in_path +find_in_path +float +folding -footer +fork() +fullscreen |
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
RewriteEngine on | |
RewriteCond $1 !^(index\.php|public|stylesheets|images|javascripts|robots\.txt) | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?/$1 [L,QSA] |
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
import java.util.Scanner; | |
public class BinarySearchTree extends BinaryTree | |
{ | |
public void insert(Comparable item) | |
{ | |
if (getRoot() == null) | |
setRoot(new TreeNode(item)); | |
else | |
{ |
OlderNewer