{{ message }}

Instantly share code, notes, and snippets.

Created Mar 6, 2014
View sound.cpp
 #include #include #include #define SIZE 2 using namespace std; int main(){ const char *animal[] = {"Dog","Cat"};
Last active Aug 29, 2015
View poly.c
 #include #include double f(double c3,double c2,double c1,double c0,double x){ double f = c3*x*x*x + c2*x*x + c1*x + c0; return f; } int main(){ char *poly = "C3*x^3 + C2*x^2 + C1*x + C0";
Created Mar 6, 2014
View linearsearchanalysis
 Methods of analysis To be able to predict the time without having to look at the details of the input, we measure it as a function of the length of the input. Here x has basically constant length (depending on what an item is) and the length of L is just the number of items in it. So given a list L with n items, how many comparisons does the algorithm take? Answer: it depends. We want an answer that doesn't depend. There are various ways of getting one, by combining the times for different inputs with the same length. Worst case analysis -- what is the most comparisons we could ever see no matter how perverse the input is? time_wc(n) = max time(I) (input I of size n)
Created Mar 4, 2014
View BingImageOfTheday.py
 import os import sys import urllib2 import json import threading import time BING = { "base": "http://bing.com", "wall": "/HPImageArchive.aspx?format=js&idx=0&n=1&nc=1393792328465&pid=hp&video=1"
Created Mar 3, 2014
View TimeComparer.java
 import java.util.*; public class TimeComparer { public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.println("Please enter the first time in military time (hour minute): "); int hour1 = in.nextInt();
Last active Jul 23, 2019
 /* * author: bitwiser * for complete tutorial, visit: http://bitwiser.in/2014/04/22/email-google-form-data-as-pdf.html */ var START_ROW = 2; /** * Retrieves all the rows in the active spreadsheet that contain data and logs the * values for each row. * For more information on using the Spreadsheet API, see
Last active Aug 29, 2015
View html.html
 BuzzButtons
Created Mar 1, 2014
View html.html
 Cascading Style Sheets (CSS) is a style sheet language used for describing the look and formatting of a document written in a markup language. While most often used to style web pages and interfaces written in HTML and XHTML, the language can be applied to any kind of XML document, including plain XML, SVG and XUL. 1. 1 Body
Last active Aug 29, 2015
View exercise1.php

Created Mar 1, 2014
View parentheses.cpp
 #include #include #include using namespace std; bool checkBalancedParentheses(string s){ stack st; for(int i=0;i
You can’t perform that action at this time.