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
(defun last-of-list (l) | |
"Returns last element of a list" | |
(nth (- (list-length l) 1) l)) |
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
(defun elek (lst n) | |
(if (= n 0) | |
(progn | |
(car lst)) | |
(elek (rest lst) (- n 1)) | |
) | |
) | |
;; CL-USER> (elek '(1 2 3 4) 2) | |
;; 3 |
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
(defun no-of-ele (lst) | |
"Return the no. of elements in a list" | |
(if (endp lst) | |
0 | |
(progn (+ 1 (no-of-ele (rest lst)))) | |
) | |
) | |
;; CL-USER> (no-of-ele '(1 2 3)) | |
;; 3 |
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
// run this in your browser's console | |
setInterval(function(){window.scrollBy(0, 1), 4000 }) | |
// not well tested |
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
irb(main):012:0> Date.today | |
=> Thu, 09 Jul 2015 | |
irb(main):013:0> Date.tomorrow | |
=> Sat, 11 Jul 2015 | |
irb(main):014:0> Date.today.tomorrow | |
=> Fri, 10 Jul 2015 |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
case $- in | |
*i*) ;; | |
*) return;; | |
esac |
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
<?php | |
session_start(); | |
require_once("response.php");//response.php is the kookoo xml preparation class file | |
$r = new Response(); | |
$r->setFiller("yes"); | |
$recore_wav="update"; | |
if(isset ($_REQUEST['event']) && $_REQUEST['event']== "NewCall" ) | |
{ | |
$_SESSION['caller_number']=$_REQUEST['cid']; | |
$_SESSION['kookoo_number']=$_REQUEST['called_number']; |
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
Generic definition for above definition: | |
Given /^I am on (.+)$/ do |page_name| | |
visit path_to(page_name) | |
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
.center_container{ | |
background-image: -webkit-radial-gradient(50% 25%, 1140px 1040px, rgba(255, 255, 255, 255) 0%, rgb(152, 215, 43) 38%); | |
background-image: -ms-radial-gradient(50% 25%, 1140px 1040px, rgba(255, 255, 255, 255) 0%, rgb(152, 215, 43) 38%); | |
background-image: -o-radial-gradient(50% 25%, 1140px 1040px, rgba(255, 255, 255, 255) 0%, rgb(152, 215, 43) 38%); | |
background-image: radial-gradient(50% 25%, 1140px 1040px, rgba(255, 255, 255, 255) 0%, rgb(152, 215, 43) 38%); | |
background-image: -moz-radial-gradient(50% 25%, 1140px 1040px, rgba(255, 255, 255, 255) 0%, rgb(152, 215, 43) 38%); | |
} | |
OlderNewer