- A utility class for logging events and errors either to a file or the system event logs with a configurable level of verbosity.
- A set of stored procedures for maintaining and searching data in a hierarchical tree structure.
- An implementation of the singleton design pattern to serialize access to a resource file.
- A calculator function that takes a single string of input that includes numbers and operators and returns the numeric result of the equation. Don’t forget input validation, error handling (divide by zero), and operator precedence concerns!
- A method that takes a URL to a web site and a local path and downloads all image files based on
tags.
- Create a method that takes a keyword, message, and login credentials and uses the Twitter API to respond to post the message as response to any friends of the account specified.
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
public class ConvertNumToText { | |
public static String[] digits = {"One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"}; | |
public static String[] teens = {"Eleven", "Twelve", "Thirteen", "Fourteen", "Fifteen", "Sixteen", "Seventeen", "Eighteen", "Nineteen"}; | |
public static String[] tens = {"Ten", "Twenty", "Thirty", "Fourty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety"}; | |
public static String[] bigs = {"", "Thousand", "Million"}; | |
public static void main(String[] args) { | |
for (int i = 1; i < 1000001; i++){ | |
System.out.println(numToString(i)); |
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
#!/usr/bin/env python | |
import sys | |
str = 'The knights who sy ni!' | |
for char in str: | |
if char == ' ': | |
str = str.replace(' ', '%20') | |
print 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
#!/usr/bin/env python | |
import sys | |
map = { | |
1:'one', | |
2:'two', | |
3:'three', | |
4:'four', | |
5:'five', | |
6:'six', |
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
Sub FindReplaceHLinks(sFind As String, sReplace As String, _ | |
Optional lStart As Long = 1, Optional lCount As Long = -1) | |
'Variables | |
Dim rCell As Range | |
Dim hl As Hyperlink | |
Dim Current As Worksheet | |
'Loops through each worksheet | |
For Each Current In Worksheets | |
For Each rCell In Current.UsedRange.Cells | |
If rCell.Hyperlinks.Count > 0 Then 'If hyperlink exist |
#General Questions:
- What is the dress code?
- What are the normal business hours?
- What are my immediate supervisor's hours?
- Do you offer benefits?
- What is the waiting period for benefits?
- What is your policy on working from home?
- How much vacation/sick time would I get?
- What is the average employment length?
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
#!/usr/bin/env python | |
class MyException(Exception): | |
pass | |
import sys | |
def same_row(i,j): | |
return (i/9 == j/9) | |
def same_col(i,j): | |
return (i-j) % 9 == 0 |
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 <map> | |
#include <vector> | |
#include <string> | |
using namespace std; | |
void initLetterMap(map<char,string> &lmap); | |
vector<string> getMapped(const string &phoneNumber, map<char,string> &lmap); | |
vector<string> getPermutations(vector<string> number); |
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
#!/usr/bin/env python | |
import sys | |
digit_map = { | |
'2': 'abc', | |
'3': 'def', | |
'4': 'ghi', | |
'5': 'jkl', | |
'6': 'mno', |
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> | |
using namespace std; | |
int main() | |
{ | |
int m = 3; | |
int n = 3; | |
int array[3][3] = {{1,2,3},{4,5,6}, {7,8,9}}; | |
int row[3*3]; | |
int column[3*3]; |