Posts about Programming

String Extension Method to Convert a String to Title Case in VB .NET

If you are regularly doing an operation on a common type, extension methods are a great way to create shorthand functions for this. In this post I am sharing my string extension method to convert a string to Title Case (Pascal Case):

How to add a user to WordPress programmatically

In a recent development project I needed to add a user to WordPress programmatically because I had no WP user data but only access to FTP. If this is your case, here is the code I used to add myself to the WordPress users:

LispCleaner is on SourceForge now

LispCleaner is available for download on SourceForge now. It is totally free and cures most of the lisp virus infections caused by acaddoc.lsp, acad.lsp and acad.vlx files. Click here to visit LispCleaner project page on SourceForge.

DOS batch to zip archive and delete folder using 7zip

Save following commands to a text file and save it as archive.bat : @echo offf echo 7za a -r -tzip %~nx1.zip -mx9 %~f1\*.* 7za a -r -tzip %~nx1.zip -mx9 %~f1\*.* rmdir /s/q %~f1 pause !!Caution, if you don’t have 7za installed it will only delete that folder!! Usage: Drop any directory to the batch file, […]

vb.net PrintDocument custom paper size

While using PrintDocument class for printing on vb.net, It won’t allow you to change PaperSize Width and Height values. In order to set those values manually, you need to define a custom paper size first. Use the code below to create a new custom paper size and then set it to PrintDocument’s PaperSize property: Dim […]

jQuery to get anchor link URLs and texts on a page

On google chrome developer console (F12), simply run command below to get link texts printout: jQuery(“a.classname”).each( function(){ console.log( $(this).text() ); } ); If you need to get link URLs, try the code below: jQuery(“a.classname”).each( function(){ console.log( $(this).attr(‘href’) ); } ); Remember to change classname to appropriate class name. If the page you are trying to […]

Portable python for windows

Python is an awesome language for science and automating your work. It is a little hard to run it fully functional on Windows though. Here, WinPython solves this problem. It is portable and it comes with various scientific packages those are ready to run! You can download WinPython here. Check out their documentation here. If you […]

Python Advanced Tutorial 6 – Networking

See more awesome tutorials about Python on DrapsTV Channel

Hess-Smith Panel Method

http://canal.etsin.upm.es/CFDWORKSHOP/lect3-4.pdf

Real-time fluid dynamics for games

Real-time fluid dynamics for games

Delaunay Triangulation

Pseudo-code for triangulation: subroutine triangulate input : vertex list output : triangle list initialize the triangle list determine the supertriangle add supertriangle vertices to the end of the vertex list add the supertriangle to the triangle list for each sample point in the vertex list initialize the edge buffer for each triangle currently in the […]

Linux: Backup and restore MySQL database using mysqldump

Backing up database using mysqldump: mysqldump -u [username] [dbname] > [dump_filename] Restoring file from a backup: mysql -u [username] [dbname] < [dump_filename] References MySQL 5.1 Reference Manual :: 4.5.4 mysqldump mysqldump.com



NS Weight Release