How to add font file to your website and push to client

22. July 2013

How to add font file to your website and push to client

I was searching on how to push fonts to client side if it does not have the fonts which my website require then i found this nice solution supported in CSS3 . You just have to add the below lines in your stylesheet and specify the font-family of your font file and src in url where the font file is kept on server . Rest assured your fonts will work on client side .

@font-face {

 font-family: Lucida-Calligraphy;

 src: url('fonts/LCALLIG.TTF');

 }

CSS , ,

Login.DestinationPageUrl does not work for me

4. July 2013

Login.DestinationPageUrl does not work for me

 Whenever i try to login , this control redirects to the page requested on the first place after logging in even though i have mentioned which page to open after user is logged in . Following is the solution to this :

protected void Login1_LoggedIn(object sender, EventArgs e) 

{ 

  Response.Redirect(ResolveClientUrl(Login1.DestinationPageUrl));

}

ASP.NET, C# ,

How to enable php debugging in visual studio 2010 when using PHP Tools for Visual Studio

26. May 2013

How to enable php debugging in visual studio 2010 when using PHP Tools for Visual Studio 

You can goto this link http://www.devsense.com/products/php-tools/doc-demos and click on the last link named as Configuring remote debug  or you can go directly on this link - http://www.devsense.com/products/php-tools/doc-demos# . You will find this tutorial very easy and comprehensible , i hope you will also be able to leverage the power of debugging php in visual studio using this extension .

PHP , , ,

PHP IDE

26. May 2013

PHP IDE 

I recently started working on php and i was so reluctant to switch to it because of my ignorance and null knowledge about PHP IDE softwares present currently .

I used Sublime Text 2 for a while but it felt a lot tedious to work on bigger things using it . I started searching and found these two comfortable to work with 

1. http://www.jetbrains.com/phpstorm/

2. http://www.mpsoftware.dk/phpdesigner.php#.UaIKd0CnwQY

3. http://www.zend.com/products/studio/

But even though these are full fledged IDE's i missed visual studio a lot and i tried to get some solution so that i can code using VS 2010 and i found this extension which made my life a lot easier - http://www.devsense.com/products/php-tools/doc-demos.

 

PHP

Tool to issue HTTP commands with custom data and capture the same in real time

18. May 2013

Tool to issue HTTP commands with custom data and capture the same in real time

I came across this very fine application named  Fiddler Web Debugger http://fiddler2.com/get-fiddler

 

Utility , , , , ,

Delete all record from table in mysql

17. May 2013

Delete all record from table in mysql

http://stackoverflow.com/questions/8091053/delete-all-record-from-table-in-mysql

TRUNCATE TABLE <table name>;

MySQL, SQL

MySQL transactions examples in PHP

17. May 2013

MySQL transactions examples in PHP

 

 http://stackoverflow.com/questions/2708237/php-mysql-transactions-examples

mysql_query("SET AUTOCOMMIT=0");
mysql_query("START TRANSACTION");
$a1 = mysql_query("INSERT INTO rarara (l_id) VALUES('1')");
$a2 = mysql_query("INSERT INTO rarara (l_id) VALUES('2')");
if ($a1 and $a2)
{ 
mysql_query("COMMIT"); 
} 
else
{
mysql_query("ROLLBACK"); 
}

MySQL, PHP , ,

How to safely increment MySQL integer field?

17. May 2013

How to safely increment MySQL integer field?

http://stackoverflow.com/questions/2033537/php-mysql-how-to-safely-increment-mysql-integer-field

 

UPDATE table SET field = field +1 WHERE [...];

MySQL ,

MySql Subtract a table from another

16. May 2013

MySql Subtract a table from another

I found this solution on - http://stackoverflow.com/questions/5738240/mysql-subtract-a-table-from-another

To view all rows in A except those in B:

SELECT*FROM A
WHERE(field1, field2,..., fieldN)NOTIN(SELECT*FROM B
);

To actually delete from table A the rows that are in B:

DELETEFROM A
WHERE(field1, field2,..., fieldN)IN(SELECT*FROM B
);

SQL ,

A tool for easily making HTTP requests (GET/PUT/POST/DELETE), viewing the responses, and keeping a history of transactions.

15. May 2013

A tool for easily making HTTP requests (GET/PUT/POST/DELETE), viewing the responses, and keeping a history of transactions.

https://addons.mozilla.org/En-us/firefox/addon/httprequester/

Utility , , , ,