Skip to main content

Posts

Showing posts from July, 2011

backup and restore postgres

Backup: $ pg_dump -U {user-name} {source_db} -f {dumpfilename.sql} Restore: $ psql -U {user-name} -d {desintation_db}-f {dumpfilename.sql} link full: http://www.thegeekstuff.com/2009/01/how-to-backup-and-restore-postgres-database-using-pg_dump-and-psql/

WP7 Developer Unlock

WP7 Developer Unlock Here are the steps on how to developer unlock your WP7 device: Install Windows Phone 7 Developer tools. This will require a reboot at the end. Email the “ChevronWP7.cer” file to your Windows Phone 7 device. Open the email, tap on the attachment to download it. The icon will turn into a shield, tap again to get a new dialog. Press “Install” then OK. Put your WP7 Phone into airplane mode (Settings>Airplane mode>Slide the toggle to ON) Double click the ChevronWP7.reg file on your computer. A prompt will open up asking if you want to write this to your registry. Press Yes to continue, then OK at the end. Open TCPView. (tcpview.exe inside of the downloaded archive) Click on the heading marked “Local Port” until the arrow next to it is pointing up. Look on the Local Port column for any entries labeled “HTTPS”. These programs MUST be closed for Chevron to work properly. Common culprits are Skype, and XAMPP. Use Task Manager (CTRL+ALT+Delete) to ensure they ar...

ADO.net Entity

The purpose of this tutorial is to show you how to use  LINQ  against  ADO.NET Entity Data Model . This topic will cover how to: Query an entity from the database Update an entity in the database Insert a new record(s) in the database Delete a record from the database Retreive a record with Server Side Paging For the purpose of this tutorial the  Northwind  database will be used, which can be downloaded from  here Add a new ADO.NET Data Model. Using the ADO.NET Entity Framework wizard you can easily create a representation of the sample Northwind database like the one below: Query an Entity from the Database The next code-snippet uses LINQ query syntax to retreive an  IEnumerable  sequence of  Product  objects. C# NorthwindEntities dbContext =  new   NorthwindEntities(); var query = from p   in   dbContext.ProductSet            where p.Catego...