SQL select into statement

code :: copy and swap database tables in MSSQL

have you ever had a database table that you needed to clone? you can use any number of convoluted methods such as: manually coping and pasting rows in the database manager, running lots of queries/stored procedures, or writing a script to cycle though each row copying data from one table to the next. all of these methods are inferior and far more complex then the method i'm going to show you.

introducing the select into query...
this method should be used if the table you want to clone exists, but the new table douse not. the select into query will create the new table for you, copying all the column names, properties, and data. if you want to make an exact clone of the table you can select * into the new table. but if you only want a few specific columns, you can declare only the ones you want. the syntax is elegantly simple...

SELECT *
INTO [new-table]
FROM [old-table]

Read: SQL select into statement »

vegan chocolate chip cookies

notes :: my delicious recipe

vegan chocolate chip cookie recipe

start with a small container of margarine
(like 7.5oz of promise or smart balance)

blend in some sugar.
i use about 1/3 brown sugar, 1/3 white sugar, and 1/2 a cup of confection [powdered] sugar.

*optional*
you can also use 1 table spoon of honey and/or agave nectar.

stir until creamy.

add 1 tea spoon vanilla and stir.
add flour.
(i like to mix 1/2 cup of whole wheat flour and 1+1/2 cup of white flour.)

*NOTE*
if you used honey / agave nectar you'll need and extra 1/2 cup of flour.

add 1 tea spoon of salt.
add 1 tea spoon of baking soda.
add 1 tea spoon of baking powder.

you want the dough to be stiff not sticky. if necessary, add more flour...

Read: vegan chocolate chip cookies »

gameboy prosound mod

lab :: console modification for better sound recording

nintendo gameboy prosound mod

today’s mod is for the original nintendo gameboy. if you want to get serious about chip tunes, whether your using lsdj or nanoloop, the sound quality of your instrument is a priority. the stock nintendo gameboy is equipped with a single headphone jack. and if you have ever tried recording anything from that, it sounds pretty bad. thus the prosound modification was invented to add a line out jack to the gameboy.

Read: gameboy prosound mod »

custom flex skins

code :: customize your components

skinned flex app

creating web-applications with flex 3 is great. there are a ton of pre-made components, and an open-ended architecture to allow you to create your own. built into flex is also a variety of options to change the visual styles of the components. today i will talk about two different types of customization. first, the simplest method, is using css to style your components. next, the more advanced technique, is creating component skins. for this example i will be using flash cs3.

with in a flex mxml application, css is natively understood. so by utilizing the tags, we can create a variety of styles for an application. personally, i don't really care for the eclipse/flex built in css editor, but since flex uses valid css, any editor can work!

Read: custom flex skins »

tracing 3D objects with papervision3D

lab :: drawing the logo

draw logo

a question popped up on the papervision3D mailing list the other day about using the lines3D class to trace a 3D object. i found the idea fascinating, so i whipped up this little demo to demonstrate how simple it actually was. i started out by creating a simple cylinder with a wide base and small top, and setting its visibility to false. then creating my lines3D object. finally in the render loop i create a new line3D that connects each vertice. by checking to see in a counter variable is less than the total object vertice count ((box.geometry.vertices.length)), and adding a new line3D if the counter is less than that, or deleting all the lines and starting over...

Read: tracing 3D objects with papervision3D »

as3 geometry class exporter

code :: export 3D models to flash

a new component for 3D studio max has arrived that allows you to export the geometry of you model directly into a format that actionscript 3 can understand. the plugin has options for exporting to papervision3D, away3D, and sandy3D. it was developed by seraf and can be downloaded here. and exporting a model couldnt be easier. 

step 1. create you model, and select it 
(you can tell its selected because of the white bounding box)

select model

Read: as3 geometry class exporter »