This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// webBrowser1 is WebControl type. | |
webBrowser1.Document.InvokeScript("eval", new object[] { "map.getCenter().lat()" }).ToString(); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
... | |
... | |
_filename = "log" + DateTime.Now.ToLongDateString(); | |
using(StreamWriter ws = File.AppendText(_filename)) | |
{ | |
ws.Write("hello this is text to append to file"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Connect to database | |
$connection = new mysqli("localhost", "username", "password", "databasename"); | |
if($connection->connect_errno) | |
{ | |
die( "Error Number : ". $connection->connect_errno . "<br> Error Message: ". $connection->connect_error ); | |
} | |
// query() method to execute any query. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) Required All tables must have a primary key that is comprised of one column. Tables without a primary key or a composite primary key are not supported with ORM. | |
2) Recommended All table relationships should be explicitly defined with a foreign key constraint. | |
3) Recommended All tables and columns are lower-case with underscore characters as a delimiter. For example `purchase_order` not `Purchase Order`, `purchaseOrder`, etc. This will affect the builder's ability to create cleanly named classes for your model. | |
4) Recommended Use singular names for your tables. For example use a table name `customer`, not `customers`. Using singular names will help the builder to guess appropriate singular/plural class names for your model. | |
5) Optional Give each table a unique column prefix. For example the customer table columns might be c_id, c_name, c_age, etc. This makes writing reporter classes easier, but is not required. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
private function log($str) | |
{ | |
$file = fopen("new.txt", "a+"); | |
fwrite($file,"$str\n"); | |
fclose($file); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$xml = simplexml_load_string($xmlstring); | |
$json = json_encode($xml); | |
$array = json_decode($json,TRUE); | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>sqlcmd -S tcp:<serverid/server instance name> -U <username> -P <password> -Q "SELECT SessionID ,IPAddress,StartTime,Hit,UserExists,IPCheckOK,EndTime | |
,uID FROM DP_FootyEye_Beta.dbo.AdminAccessLog" -o "C:\output.csv" -h -1 -s , |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@net stop was /y | |
@net stop MsDepSvc /y | |
@net start wampapache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo /usr/sbin/apachectl restart | |
sudo iptables -I INPUT -p tcp --dport 80 -j ACCEPT | |
sudo /sbin/service mysqld start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In order to enable adb connection over Wi-Fi, you first need to plug your device into your computer using USB as | |
you normally do. Also, make sure your computer and your Android device are connected to the same Wi-Fi. You also | |
need to know the IP address of your Android device, which you can find on your device by choosing Settings➪ | |
Wi-Fi➪Advanced. In the bottom of the list that appears you will find your device IP address for the current Wi-Fi. | |
After you have this set up correctly, run the following commands from your terminal: | |
$ adb devices | |
List of devices attached | |
0070015947d30e4b device | |
$ adb tcpip 5555 | |
$ adb connect 192.168.1.104 |
OlderNewer