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/python | |
# Copyright 2011 Ershad K <ershad92@[nospam]gmail.com> | |
# Licensed under GPL Version 3 | |
import sys | |
import os | |
arguments = "" | |
sys.argv.remove(sys.argv[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 <string.h> | |
#define MAX 50 | |
void permutations(char *string, int k, int m); | |
void swap(char *x, char *y); | |
int main(int argc, char *argv[]) | |
{ | |
// char string[MAX]; |
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
# Python script to solve the problem 1-1 in 'Introduction to Algorithms - Cormen, Leiserson, Rivest, Stein (3rd edition)' | |
# Ershad K <[email protected]> | |
# License: GPL Version 3 | |
from math import * | |
import sys | |
def f_(n): | |
return n**3 | |
# Define the desired f(n) here and return the value. |
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
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDgyWWO34d6yt5bEsQc549bGY5YKZv2lrsWaqF6iXo6WJBsWh1wAVdeQMYdv7ufc/hMJhF1QyrCynA1joV676o73fgTLQ6z4MxkTW5OMjO7gvjoNgX51BOKzch/tGTy0hUN4DcM4VJhz/CGXOUrhgCYRbfUDI8+QG5Xe37JVjEqADnDcGzDmXs/+m9iWTZ/J3/BB6TNz78LghtsqTiM2VC5eUz50wuW6LhY6HNrlbEsSMkJ5x1xTXrNqgSSvoW66rZbOGTGuNE1re8gM/KAsuUJz4idh2FtEe5YJnfUw6tvgp2bvV6412G1bgYSmCrmG+EzWOMyPT389r8oZVjHuXcJ junil@junil-Inspiron-N4050 |
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
no change in User#usertype | |
def present_user | |
user_signed_in? ? current_user : non_logged_in_user | |
end | |
def non_logged_in_user | |
unverified_user_undo? ? unverified_user : User.new | |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
ISBN | |
DDC | |
Publisher subject category | |
Original language if translation | |
Book No.1 | |
Book No.2 | |
Author 1, Personal, Main | |
Author 1, Personal, Main - Role | |
Author 1, Corporate, Main | |
Author 2, Personal, Added |
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
# Usage: | |
# shell$ irb | |
# 1.9.3p194 :001 > require '~/Desktop/Po' | |
# 1.9.3p194 :002 > Po.new('~/code/translation/evolution-data-server.master.ml.po').split(3, 'evolution.po') | |
# Files named 1_evolution.po, 2_evolution.po, 3_evolution.po will be written to your current working directory. | |
class Po | |
attr_accessor :po_file_array | |
def initialize(file) |
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
Show hidden characters
// Show GitHub organizations | |
// Example: "company1", "company2" | |
"include_orgs": [], |
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
# encoding: utf-8 | |
require 'xmlsimple' | |
require 'csv' | |
hash = XmlSimple.xml_in('m.xml') | |
start_date = DateTime.parse "2013-12-28" | |
end_data = Date.today |
OlderNewer