Look Who is Comment Spamming Now?
August 31st, 2009
Each day tech-recipes gets a ton of comments. In fact, often the information that is left in the comments is more helpful that the original tutorial.
Like on many other popular web sites, spammers frequently try to use our comments to gain attention for their own websites.
Microsoft not only decided to spam our comments but is trying to steal our authors too? Boo!


Is the Swine Flu More Dangerous than Regular Influenza?
May 1st, 2009
Of course, nobody knows for sure yet if this swine flu epidemic will be more dangerous than the seasonal flu. However, the potential for extreme badness is there.
Many people are now saying that the media and the government is blowing the threat out of proportion. They like to quote that around 36,000 people die from influenza in the United States each year. The problem is that this is not your typical, run-of-the-mill seasonal influenza. This is an H1N1 influenza. These are very different germs.
Symfony 1.0 and MSSQL
February 18th, 2009
Symfony 1.0 has a never-going-to-be-fixed bug that prevents it from building the database automagically. Microsoft decided not to support the old php_mssql connection methods; therefore, it makes sense for symfony to abandon it as well.
Sadly, symfony 1.0 does not support the new database connection methods either… so we are stuck with hacks and workarounds.
Here is the fix for this error:
“Native Error: Incorrect syntax near ‘_PK’”
Change line 113 of engine/builder/sql/mssql/MssqlDDLBuilder.php from:
$lines[] = “CONSTRAINT “.$this->quoteIdentifier($table->getName()).”_PK
PRIMARY KEY (”.$this->getColumnList($table->getPrimaryKey()).”)”;
to:
$lines[] = “CONSTRAINT “.$this->quoteIdentifier($table->getName().”_PK”).
” PRIMARY KEY (”.$this->getColumnList($table->getPrimaryKey()).”)”;
The original propel ticket provided this juicy info.
I Played with a Microsoft Surface Yesterday
November 2nd, 2008
When I grabbed my key to our room in NYC, I noticed the Microsoft Surface ad:
Explore our neighborhood with a touch.
Experience Microsoft Surface in our lobby.
Our lobby actually had two surface systems being used as coffee tables. The first one we found was actually turned off. Even after finding and flipping the hidden power switch, nothing happened. As we were walking out, I noticed the surface “water attract” screensaver running on another device.
Control–
Manipulation of the objects on the screen were very intuitive. My 2 year old was clicking and moving objects easily. My 6 year old figured out how to resize very quickly. Controlling the surface was very similar to iPhone controls.
Applications–
Our device had only three applications: pictures, music, and maps.
The pictures application mainly showed off pictures of the hotel properties. The pictures were easily resized and manipulated with your fingers. In fact, my kids were all resizing and moving pictures at the same time. Johnrchang has a good flickr pic of this surface application:

The music application was a little more clunky. All the album covers could dragged out a list. Clicking them flipped the album to show which songs were available inside. Dragging these songs to a playlist started playing the songs.
The maps program was probably the most impressive. It was started up in a full screen Microsoft Virtual Earth view of our current location. By dragging and resizing, MightyQ started a nice impromptu tour of the city. When the city roads did not demonstrate things very well, a flip into satellite view helped greatly. One could zoom out as far as looking at the earth as a globe. I think Q was disappointed that he could not tour the kids around the solar system as well. Here is a tech-recipes flickr pic of my son manipulating the map:

Impressions–
To me this was one of the the most impressive things Microsoft has designed in a while. Several visual bugs destroyed the illusion sometimes, but for the most part, the graphics and controls were great. In the end, however, it really felt like playing with a giant version of the iPhone. Whether built by Microsoft, Apple, or many other companies, I have no doubt that one day we will see surface-like devices everywhere.
Two Options for Exploring or Debugging PHP Objects
October 10th, 2008
As a fledgling php coder, Q suggested these methods for exploring some confusing php objects.
I knew that $result was the output from a symfony plugin. I just did not know what all was contained within this object.
$result is actually the obj/variable in question.
Anyway, here are the two options…
echo nl2br(print_r($result, true));
var_dump($result);
Davak’s Smoked and Pulled Chicken
September 25th, 2008
I am not a chicken fan… unless it is smoked. I hate chicken salad. But make it with smoked chicken, and I’m in heaven. Chicken sandwich–I’ll eat only if I am pretending to be healthy. A pulled smoked chicken sandwich will always make me happy.
By it’s very nature, chicken is just not very favorable. In other recipes I often brine it to improve the taste. However, smoking chicken just makes it magical.
Davak’s Pulled, Smoked Chicken
1 Chicken with skin (at least halved, but pieces will do)
Marinade:
2 cloves garlic
1.5 tablespoons of Brown Sugar
1 tablespoon of oregano
1½ tablespoons of balsamic vinegar
Several sprigs of Rosemary
10 grinds of salt
10 grinds of black pepper
¾ to 1 cup of Olive Oil
Smoking materials:
Charcoal
Wood
1 can of pineapple juice
1 beer
This is typically a two day process.
Prepare and wash chicken. Halving the chicken speeds up smoking time and increases surface area for the marinade. Pieces of chicken can be used as well but will cook faster.
Prepare marinade in food processor or whisk wet ingredients into dry ones. The resulting mixture will be thick and sticky. Place marinade in plastic bags with chicken parts and ensure that chicken is well covered. Let sit for 4-6 hours in refrigerator. Every hour squeeze bag around and reposition.
One hour prior to initiation of smoking, start soaking wood chips/chunks of various sizes in water. 30 minutes prior to smoking, light charcoal in chimney starter. 15 minutes prior to smoking, start heating beer and pineapple juice to almost boiling. 5 minutes before smoking take chicken out of refrigerator and bury thermometer probe in the thickest area of meat without touching bone.
Initate smoking by doing the following in rapid sequence: Put white, lit charcoal in smoker. Cover fire with well drained, but soaked wood chips and chunks. Fill liquid reservoir in smoker with warmed beer/pineapple juice mixture. Place chicken in smoker, connect temperature probe, and securely close the smoker.
Smoke at least two hours and my goal smoking time is three hours. Pull off once internal temperature is 165 degrees F. If chicken is having a hard time reaching goal temperature, finish in oven at 300 degrees F. While in oven, keep wrapped tightly in aluminum foil to prevent drying. Once goal temperature is reached, take out and let rest until cool enough to pull apart.
Serve warm.
To add additional flavor, pull the chicken but leave the majority of the bones and skin. Allow to rest overnight in the refrigerator before finishing the pulling the next day by removing everything except the meat. We frequently will smoke several chicken at a time and freeze any extra meat.
Serving suggestions include sandwiches, chicken salad, chicken pesto pasta, or as a pizza topping.
Davak’s Salsa Fresca
September 25th, 2008
If you liked my BBQ sauce, I bet you’ll love my salsa. The lime juice and cilantro power it with freshness.
Davak’s Salsa Fresca
6-8 Roma Tomatoes (cored, seeded)
1 8oz can tomato sauce
1/4 cup of sweet onion
1 clove of garlic (diced)
1 bunch cilantro (no stems, leaves only)
1 jalapeno (seeded and diced)
1 tablespoon of olive oil
2-3 tablespoons of lime juice
Cumin, Chile Powder, Salt, Pepper
Quick method:
The quick method is to throw all the prepared ingredients (minus lime juice and spices) into a food processor and blend. Based on personal taste, add lime juice and finish it with a generous amount of the spices. The flavor is wonderful. My only knock is that the salsa will be green from the cilantro and without much texture. Let rest for at least one hour and re-season before serving.
Slower method:
Wash and remove stems from cilantro. Chop cilantro finely. Chop onion finely. Sauté or rest onion in ice water to remove bitterness. Mix the prepared ingredients and flavor it with lime juice and spices as described above. Let rest for at least one hour and re-season before serving.
This method yields a much prettier red salsa with chunks of tomato and bits of onion and jalapeno. The bitterness of the onion is much more apparent when not blended; thus the need for the sauté or ice water step. The cilantro’s green littering of the salsa is visually very appealing.
Enjoy!
Trying Real Plants Again in our Aquarium
September 24th, 2008
Since Santa brought little A an aquarium a few years ago, I have been learning tons about caring for freshwater tropical fish. After our initial struggles, our fish now typically live as long as expected. Our experiments with aquarium plants, however, have gone less well.
Java moss did fine but was a mess. Java ferns and other “beginner” plants died, died, and died. I tried all the plant-friendly mineral tricks. They just helped the algae to bloom.
Now a year past our last plant experiment, I am trying again. The aquarium is now closer to a window, and we have upgraded the lights. Fingers are crossed as we have just placed a series of “beginner’s plants” into the tank.
We are trying Mondo Grass (Ophiopogon japonica), Amazon Sword (Echinodorus amazonicus), and Water Wisteria (Hygrophila difformis).
I’ll take pictures in a few weeks if everything doesn’t turn into dead plant slime.
T-Mobile Android Launch Details and FAQ
September 23rd, 2008
The first true competitor to the iPhone is being released. Here are the faqs and information released from the press conference:

Price: $179
Release Date: October 22
Mail: Push and Pull. No exchange at this time.
Keyboard: Physical Slide Out (versus virtual keyboard on iPhone)
Locked: Sim-locked to T-Mobile.
Wifi: Present
Browser: Webkit (same base as Chrome)
Data Plans: $25 with unlimited Web and limited messaging. $35 total unlimited.
Sync: To Google, Yahoo, and other online services
Network Speed: 3G network rolling out nationwide (especially in metro areas)
Desktop application: None
Microsoft Documents: Supports Word and Excel documents
iTunes and Skype: Does not support Apple DRM. No skype support yet.
Applications: Easy to develop. Will have an application store.
Connecting Windows Symfony Install to MS SQL 2005
September 16th, 2008
This will only work with SQL 2005 and prior. SQL 2008 does not work. Symfony commands are 1.0 style and other versions of symfony will need to use the updated command structure.
SQL:
1. Create a database within SQL 2005 (example: testdb)
2. Authenticate the db with SQL Server Authentication (sa)
Windows Symfony Install:
1.Within the main php directory replace ntwdblib.dll with version 2000.80.194.0. Google search for version or obtain from one of the links within php mssql_connect documentation.
2. Stop and restart apache
3. Clear cache in symfony. If you receive pake errors with inverted slashes during “symfony cc”, then edit your spPakeMisc.php file and retry cache clear.
4. Edit your databases.yml with the following information. Replace the password, ip address (or localhost), and database name with your information. Remember that yml files must have spaces, not tabs.
all:
propel:
class: sfPropelDatabase
param:
dsn: mssql://sa:password@10.1.1.1/testdb
5. Paste your dsn line above into the propel.database.url section of propel.ini. Paste the dsn line minus the database name into the propel.database.createUrl section.
6. Clear cache in symfony.
7. Be sure your schema.yml is correct.
8. From your project directory do symfony propel-build-model and be sure there are no errors.
9. From your project directory do symfony propel-build-sql
10. Although it is unlikely to work, you can try to do a symfony propel-insert-sql
11. If it inserts correctly, then you are set. Most likely you will notice that all the SQL statements did not execute successfully. You will probably see Native Errors regarding “Incorrect syntax near \’_PK\’.]” along with other errors. This is fixed in propel 1.3 if you want to try to figure out how to upgrade symfony or install an updated propel plugin. Otherwise, you are going to want to manually correct your propel generated sql based on the recommendations in this thread. If your project is myproject, then your generated sql lives here: c:\myproject\data\sql\lib.model.schema.sql
I’ll quote the important global search and replace information here:
(Ignore the quotes )
seek for: “]_PK”
replace with: “_PK]”Then you will also need to alter all the strings:
seek for: “ON UPDATE RESTRICT ON DELETE RESTRICT”
replace for: “ON UPDATE NO ACTION ON DELETE NO ACTION”In addition you will need to also move all the entries (their block of statements: BEGIN AND END included) that carry:
” ON UPDATE NO ACTION ON DELETE NO ACTION”
to the end of the scriptand finally move also all the
” ADD CONSTRAINT “
entries (their block of statements: BEGIN AND END included) to the bottom of the file
12. Copy this file to somewhere on your sql server. Double-click to open it within SQL server and “execute” to populate the sql into your database.
13. Generate frontend and backend applications within symfony. Generation of an propel-init-admin in the backend is a quick way to test database read/write.
Notes:
Be sure that the correct version of the dll file is running. Restarting apache should be enough, but you know how windows dll files are. If something doesn’t seem to be working correctly, clear the symfony cache. You know how the symfony cache can bugger up things.
Good luck.
