Skip to content

Instantly share code, notes, and snippets.

@sms420
sms420 / gist:119108
Created May 28, 2009 05:18
toggle_ME.js
//toggle_ME.js
jQuery(document).ready(function() {
jQuery(".menu_item img").hide();
jQuery(".menu_item a").click(function () {
jQuery(this).siblings('img:visible').hide('normal');
jQuery(this).siblings('img:hidden').show('normal');
@sms420
sms420 / gist:119120
Created May 28, 2009 05:39
SMSRename.cpp
/* SMSRename.cpp
Save the executable from this source code
in a directory where you want to rename a
set of files.
Reads a file name from SMSoldnamesINPUT.txt and
then reads a file name from SMSnewnamesINPUT.txt
and then changes the name of the file in the
directory from the oldname -> newname.
@sms420
sms420 / gist:119122
Created May 28, 2009 05:43
image_viewer.js
//this one was hacked by buddy g-dawg.
jQuery(document).ready(function() {
// put all your jQuery goodness in here.
// get source when page is loaded
var original_src = jQuery("#imgvwrFeature img").attr("src");
var original_icon;
// now lets setup the hover logic using jquery and
// CSS selectors!
jQuery("#icons a img").hover(
// Mouse over
@sms420
sms420 / gist:129048
Created June 13, 2009 01:08
readFrom_WriteTo_TextFile.cpp
/* readFrom_WriteTo_TextFile.cpp
reads from, line by line, a text file: INPUT.txt
writes to, line by line, a text file: OUTPUT.txt
*********************************************************/
#include<iostream>
#include<string>
#include<fstream>
@sms420
sms420 / gist:129057
Created June 13, 2009 01:51
doSomethingWhenYouFindaComma
/* doSomethingWhenYouFindaComma.cpp
reads from, line by line, a text file: INPUT.txt
adds a newline when it encounters a comma
writes to, line by line, a text file: OUTPUT.txt
*********************************************************/
#include<iostream>
#include<string>
@sms420
sms420 / gist:129799
Created June 14, 2009 20:16
CSV_One_Vertical_Line.cpp
/* CSV_One_Vertical_Line.cpp
reads from, line by line, a text file: INPUT.txt
adds a newline when it encounters a comma
removes commas and quotes from a CSV file
writes to, line by line, a text file: OUTPUT.txt
*********************************************************/
#include<iostream>
/* identify_date_string.cpp
reads from, line by line, a text file: INPUT.txt
adds a newline when it encounters a comma
removes commas and quotes from a CSV file
writes to, line by line, a temporary output text
file: DUDE_tmp.txt
then identifies the specific date objects in the
input text file and replaces them with the string
/* FINAL_FED_EX_SCRIPT.cpp
*********************************************************/
#include<iostream>
#include<fstream>
#include<string.h>
using namespace std;
int main () {
@sms420
sms420 / gist:136265
Created June 26, 2009 01:24
realSimpleClockProgram
//realSimpleClockProgram.cpp
//for KT Monda and his crazy experiment
#include <iostream>
#include <ctime>
using namespace std;
void do_again(),direction(int ans);
void option_1(),option_2(),;
int main()
//realSimpleClockProgram.cpp
//for KT Monda and his crazy experiment
#include <iostream>
#include <ctime>
#include<fstream>
using namespace std;
int main()
{
ofstream button_E;