Archive

Archive for May, 2010

Physics

May 29th, 2010 No comments

Graphics

May 29th, 2010 No comments

Company R&D

May 28th, 2010 No comments
Categories: Miscellaneous, Other Tags: , ,

Vim link dump

May 28th, 2010 No comments

I’ve been using Vim for quite a while and I love it. So I have placed a bunch of useful ViM links here. If you’re a programmer, I highly recommend learning Vim. Unfortunately Vim doesn’t have very good intellisense like functionality. So if you’re on linux, use NetBeans and the jvi plugin, and if you’re on windows and you want to stick with Visual Studio, get the viEmu extension (not free).

Read more…

Categories: Vim Related Tags: , , , , , ,

Concurrency & Parallelism

May 28th, 2010 No comments

Reverse Engineering

May 28th, 2010 No comments

OS Dev

May 28th, 2010 No comments

Conferences and Presentations

May 28th, 2010 No comments

Assembly

May 28th, 2010 No comments
Categories: Miscellaneous, Other Tags: , ,

Vim Emulators

May 28th, 2010 2 comments

NetBeans: jvi
For VS2010, free but sucked last time I checked: VsVIM
For VS 2010/2008/2005: ViEmu

Vim reference sheet

May 28th, 2010 No comments

– HELP INFO –
:help tutor – launches vim tutor
:help – opens help window (ZZ to exit out)
Ctrl+] – jumps to tag
Ctrl+T – pops tag off the stack (goes back)

–MOTIONS–
w – until start of next word seperated by punctuation
W – until start of next word seperated by space
e – end of current word
$ – end of line
i – inside used with di> to delete contents between angle brackets, parentheses, etc.
a – like “i”, but includes brackets too
b – goes back one word, punctuation delimited
B – goes back one word, space delimited

– MISC –
esc – exits out of insert mode
:q! – exit without saving changes
#<command> – executes that command # times
q<char> – records a macro
@<char> – executes macro
q – stops recording macro
ma – marks current position as “a”
`a – recalls the marked position called “a”
:ab string substitution (abbreviation)
:una string – delete key mapping
:map – key map for command mode (unsure)
:map! – key map for insert mode (unsure)
:mapclear – clears all keymappings
Ctrl-g – displays status line
. – repeats the last delete or change command (df> for example)
:set all – shows all options
Shift-V -> move cursor -> zf – marks section for folding
zc – close fold
Space – open fold
:split – create horizontal split
:vsplit – create vertical split
Ctrl-w-<Direction> – move between buffers where direction=hjkl
:!<command> – executes external command
:copen – open compiler error buffer
:cclose – close error buffer
:set makecmd=”commandToCompile”
v – highlights by character
V – highlights by line
:make – runs make
:copen – gives list of errors in new buffer
:cclose – closes error buffer

– FILE –
:w – write changes to file
:q! – quit without saving
:wq – write changes and quit
:w>>filename – appends contents of buffer to filename
ZZ – exits and saves file
ZQ – quit without saving
:e – open file
:edit – opens new file
:enew – creates new file
:r <somethingExternal> – retrieves something, file, or command such as !ls
v<highlight>:w – writes highlighted text to file

– MOVING –
hjkl – move around
[[ - go to next function
]] – go to previous function
b – moves backward one word
w – moves forward one word
e – moves cursor to end of word
$ – move to end of line
#$ – moves to end of line # lines down
^ – moves to first non-blank character of the line
0 – moves to before the first non-blank char on the line
G – go to end of file
gg – go to top of file
#G – go to cursor on line #, if no #, it goes to EOF
Ctrl-u – scrolls up half a screen
Ctrl-d – scrolls down half a screen
Ctrl-f – scrolls forward one full screen
Ctrl-b – scrolls backward one full screen
% – goto matching parentheses
+ – move to first non-whitespace char in next line
– - move to first non-whitespace char in previous line
zt, zb, zz – move screen around cursor
H,M,L – Moves cursor to highest, middle, lowest area of screen

– EDITING –
i – insert before selected character
a – appends after selected character
A – appends at end of line
O – opens up a new line above cursor
o – opens up a new line below cursor
x – deletes character under cursor
X – deletes character to left of cursor
dd – deletes an entire line
d<motion> – delete (dw deletes a word, d3w deletes 3 words)
D – also d$, deletes to end of line
r – replace mode, types over char, for a single character only
R – replace mode, types over chars, for multiple characters
c<motion> – deletes then places user into insert mode
cc – just like dd, but puts user into insert mode
C – same as c$
u – undo
U – undo edits to entire line
Ctrl+R – redo
~ – changes a character’s case
gU – makes all character’s uppercase
d – cut (delete)
y – copy (operates identically to ‘d’)
p – pastes content after cursor
P – pastes content before cursor
>> – shifts line to right
<< – shifts line to left
3>> – shifts 3 lines to the right
>aB – moves block to left
<aB – moves block to right
J – join lines with a space
di( or yi( or ci” – yanks, changes, deletes all text between (, “, [, etc.

– STRING FILE SEARCHING –
/<string> – search forward for string
n – go forward to next found string
N – go backwards to previous found string
?<string> – search for string going backwards

Ctrl-I – goes forward to where cursor was
Ctrl-O – goes backwards to where cursor was

– SINGLE LINE SEARCHING –
t<char> – search til, like f, but stops one char before char
T<char> – search til, like F, but stops one char before char
f<char> – forward search line until <char> is reached
F<char> – backward search line until <char> is reached
, – repeat the last f,t,F, or T in opposite direction

– SEARCH & REPLACE –
:s/old/new – substitutes “old” for “new” for first occurrence
:s/old/new/g – substitutes “old” for “new” on current line
:#,#s/old/new/g – substitutes “old” for “new” between line numbers # & #
:%s/old/new/g – substitutes “old” for “new” in entire file
:%s/old/new/gc – substitutes “old” for “new” in entire file with prompt
* – searches forward for the next occurrence of the word under the cursor
# – searches backward for the previous occurrence of the word under the cursor

– Settings –
:set ic – ignore case when searching
:set noignorecase – turns off ignore case

Categories: Vim Related Tags: , , ,

Smoked salmon thingy

May 28th, 2010 No comments

Smoked Salmon (looks uncooked) & bagels & cream cheese

Categories: Food Recipes, Miscellaneous Tags: ,

Steven’s Family Pizza Recipe

May 28th, 2010 No comments

I did not make this either. Also steven’s.

The Sauce: Start off with a large can of Redpack pizza sauce – about a gallon size
can. We bring ours down here to Alabama from Erie on each visit. You could
experiment with what is available in your area.

Dump this into a large pot, start warming it. You will only warm the mix while you are preparing it then I put mine into containers holding enough for 2 or 3 pizzas and freeze it. The freezing actually bursts the seasoning and herbs allowing them to mix with the sauce. It seems to get more flavorful after freezing but can be used immediately if you are making a new batch of sauce.

Mix in 1 1/2 cups dried, shredded or chopped up basil leaves.
Mix in 3/4 cup of oregano
1 or 2 tablespoons of virgin olive oil
1 tablespoon of granular sugar – less if you prefer a less sweet flavor to the sauce
1 tablespoon of salt
1 teaspoon of fresh ground black pepper (depends on how spicy you want the flavor to feel)
1 or 2 teaspoons of garlic powder (depends on how much you like garlic or want the flavor to stand out)
1 teaspoon of baking soda
2 small cans of tomato paste – I’ve stopped using this, my wife doesn’t care for it. I’ve been thinking of replacing it with sauce but for now I skip it without any noticeable difference. I’m thinking the sauce might thin it out a little as it thickens up quite a bit.
Containerize and freeze it. You should have enough for about 12- 14 pizzas.
Thaw before using. I use 3 – 6 minutes in the microwave with a power
setting of 4 to quickly thaw it. Any leftover I just cover back up and
throw in the freezer. Small containers work better than large for the
thawing process.

For the shell I use to make it from scratch but I’ve found the Martha
White pizza mix to be just as good and definitely quicker. I use an 18″
round tray, no holes, to bake the shell on. Crispy crust is obtained
with lower temperatures, high temperatures tend to result in a more
doughy type crust.

1 package spread thin across the pan is a very thin crispy crust, 1 and
a half packages over the same is still a thin crust but with a little
more to it. 2 packages will give you a standard crust. I only mix up
ingredients for one shell at a time.

The amount of water you add to the mix is so critical. Try making a
couple using less than, nearly as much, the exact amount and then
slightly more to learn the differences it makes in the crust and to find
out which you prefer. Too much water can make it very tough to handle
as a sticky mess, add some regular flour if you need to dry it up some
or more water if it is too dry. Remember to multiply the amount of
water by the number of packages you are using. Too dry dough will keep
pulling back into a ball instead of spinning out into a shell.
I use virgin olive oil on the tray and my hands to keep it from sticking
while I’m handling it and for baking. Light use of oil will not affect
the crust but a heavy coating can change it, depends on how heavy you
like the crust.

Definitely let it set for at least 5 minutes to activate the yeast in
the mix. Keep it covered with a damp paper towel so it doesn’t dry out.
Sometimes I truly toss the pizza in the air (beware of ceiling fans) and
other times I use a rolling pin to rough the shape. I do it on the
counter, pick it up and then stretch it out across the pan. Use your
palm to build up a ring around the edge for a nice rolled crusty edge.
Push the dough around to even out some of the thin spots or to fix
holes.

With the shell spread on the sheet take a fork to tap small holes in the
shell to minimize any large air pockets from forming while it is
cooking. You want some air pockets of moderate size to make the shell
light and puffy.

Bake just the shell for 6 – 9 minutes, center shelf at 450F. Thin
crusts take less time than thick. This takes practice to learn where
you like the texture to come out at. The thin crust are easier to
recognize because areas will start to brown and its ready quickly all
the way through.

Pull the shell out, start your next shell baking while you add the
toppings to the first one.
After spreading the sauce on the shell, lightly dust with fresh Parmesan
cheese before putting on the Mozzarella or whatever your choice of
cheese is. I put about 2 cups of mozzarella on a single pizza.
I like to add the pepperoni slices and green bell pepper strips last.
Some parts of the country like to bury the pepperoni.
Pull out the second shell, the timer should be going off about now.
Put in the prepared pizza and bake for another 7 – 9 minutes at the
450F. You are watching for the cheese to just start getting the brown
spots appearing, it should be a bubbling mix.

Top the second pizza while the first one is in the finish bake stage.
If the kids are hungry then we bake and eat both. If not I take the
second pizza with its toppings and instead of baking I slip it into a
large plastic bag and set it in the freezer for another night. To cook
I just heat up the oven to 450F, place the frozen pizza on the pan and
bake for 10 – 15 minutes, I watch for the cheese to get just right and
then pull it out.

I use a dedicated wooden cutting board for our pizza. I place a
teaspoon of virgin olive oil in the center with about a half teaspoon of
salt. I smear this around the board with the palm of my hand. When the
pizza comes out of the oven I slide it off the metal tray onto the
cutting board. The pizza picks up a small amount of the salt and oil
that hits your tongue when you take a bite.
The crust can be made crispier by using olive oil to coat the shell or
more bread like by skipping the oil.

This has taken me about 30 years to develop and learn what works and
doesn’t for me but you will need to play and experiment to increase the
flavors you like strong or weak and the dough the way you like it. We
hope you find it enjoyable.

Another variation that you can do for a change is take the rolled out
dough cut it into 4 equal pie slices. Take each slice place your sauce
and toppings on one half of the slice and then pull the other half over
it and pinch the edges off sealing the toppings inside. Place this in
the oven until the crust starts to brown. YUMMY.

I’ve made bread sticks with the mix but coat them with olive oil so
they get a nice crispy brown coating. Dip them in the pizza sauce.
Always be careful not to burn yourself – the cheese keeps the heat in.

Categories: Food Recipes, Miscellaneous Tags: ,

Steven’s Chili Recipe

May 28th, 2010 No comments

A friend of mine and his family made this chili recipe. I did not.

3 lb Ground Beef Sirloin
3/4 lb Ground “Breakfast” Sausage
12 oz Contadina Tomato Paste
10.75 oz Campbell Tomato Soup
84 oz Contadina Tomato Puree
46.5 oz Kidney Beans
1 Large Jar Ragu Spaghetti Sauce
3 Large Whole Ancho Chili Peppers
5 Arbol Chili Peppers
5 Dried New Mexico Sweet Chiles
4 Large Ancho Chile Peppers
1/2 Sliced Green Pepper
Pepper
Salt
4 tsp Cayenne 90 kHU*
3 tsp Chile Chipotle
9 tsp Chile Pepper Flakes 15 kHU
6 tsp Chile Pepper Powder
4 tsp Crushed Red Chili Peppers 30 kHU
2 tsp Crushed Red Chili Peppers 90 kHU
9 tsp Cumin Powder
4 tsp Garlic Powder
6 tsp Ground New Mexico Chile Peppers
7 tsp Ground Red Chile Peppers
4 tsp Onion Powder
1/2 cup Basil
1/2 cup Oregano
1/2 cup Parsley

* k = 1000, HU = Heat Unit

1: Simmer and dice the beef thoroughly. Season with pepper and salt as the beef cooks to a consistent brown grey. Well seasoned meat tastes good.
2: Do the same with the breakfast sausage in a separate pan. The sausage should finish cooking before the beef.
3: After browning, mix all the meats and spices together thoroughly in a large crock pot.
4: Add the liquids and stir very thoroughly. The viscosity of the chili should walk the line between stew and soup.
5: Add the kidney beans and stir gently. The kidney beans are delicate.
6: Add the whole peppers. You may wish to remove loose seeds.
7: Cook and sample for a couple hours or so on a very low simmer. The temperature should be a little bit less than what the meats were simmered at. Start with a low temperature and slowly increase as necessary. Mix gently every 15 – 20 minutes. Be certain to stir the bottommost contents to the surface to avoid burning. A couple bubbles will float to the surface after about 45 – 60 minutes. A few more when will appear the chili is finished cooking.
8: Leave set for an hour or so.
9: You may wish to remove the whole peppers.
10: Serve with a bread, chips, pretzels, crackers, and a smile.”

Categories: Food Recipes, Miscellaneous Tags: ,

Absolutely the Best Chocolate Chip Cookies (EVER!!!)

May 28th, 2010 No comments

INGREDIENTS

1 cup butter flavored shortening (its easier to get the
pre-measured ones, it comes in sticks, youll use one stick.)
3/4 cup white sugar
3/4 cup brown sugar
2 eggs
2 teaspoons Mexican vanilla extract (I have Mexican vanilla, but you can
use any kind)
2 1/4 cups all-purpose flour
1 teaspoon baking soda
1 teaspoon salt
2 cups milk chocolate chips (I just dump the whole bag in)
1tsp cinnamon

DIRECTIONS

Preheat oven to 350 degrees F (175 degrees C).
In a large bowl, cream together the butter flavored shortening, brown
sugar and white sugar until light and fluffy. Add the eggs one at a time,
beating well with each addition, then stir in the vanilla. Combine the
flour, baking soda and salt; gradually stir into the creamed mixture.
Finally, fold in the chocolate chips. Drop by rounded spoonfuls onto the
cookie sheets.
Bake for 10 minutes in the preheated oven, until light brown. Allow
cookies to cool on baking sheet for 5 minutes before removing to a wire
rack to cool completely.

Categories: Food Recipes, Miscellaneous Tags: ,

Copy and Rename

May 22nd, 2010 No comments

I developed this little tool because I had a ton of pictures that all had meaningless names in a directory, and I wanted some sense of organization. This tool was written in VB and it basically takes all of the files in a directory, copies them to a new directory and renames them sequentially so there is some form of organization. This was a throw away app for me and probably no one will ever use it, but here it is anyways. I have included the source code as well, but this app was written a very long time ago.

Download: CopyAndRename.7z

Restore Maximize Toggle

May 22nd, 2010 No comments

I developed this little tool because the software that came with Microsoft’s Intellimouse didn’t support a way to use the mouse to maximize and restore a window using one of their buttons on the mouse. With this tool though, you can tell the intellimouse software to run this little exe when a mouse button is pressed (one of the special mouse buttons), and whatever window is currently selected it will either maximize or restore the window. Very handy I think.

Download: restoremaximizetoggle.exe

Opera Session Exporter 2

May 22nd, 2010 No comments

I developed a small little tool that exports the URLs from an opera session file to a plain text file. It doesn’t save the history, just the tab urls. Also I have included the source. It’s not that great because I developed it in haste. Check the readme though.

Download: OperaSessionExporter2.7z

Intersection and Non-intersection routines

May 1st, 2010 No comments
Categories: Articles Tags:

Composition vs Inheritance

May 1st, 2010 No comments
Categories: Articles Tags: