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
#this program parse the page http://www.edgar-wingender.de/muTF_classification-1.html | |
#arrange the output in the below format | |
#TF name Superclass Class Family subfamily | |
#HOXA7 Helix-turn-helix domains Homeo domain factors HOX-related factors HOX6-7 | |
#c-Myc Basic domains Basic helix-loop-helix factors (bHLH) bHLH-ZIP factors Myc / Max factors | |
#<tr class="superclass_tr"> | <td class="superclass_descr_td" colspan="9"><i>Superclass</i>: Basic domains</td> | |
#<tr class="class_tr"> | <td colspan="8"><i>Class</i>: Basic leucine zipper factors (bZIP)</td> | |
#<tr class="family_tr"> | <td colspan="4"><i>Family</i>: Jun-related factors</td> | |
#<tr class="subfamily_tr"> | <td colspan="3" nowrap=""><i>Subfamily</i>: Jun factors</td> |
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
//main program HelloNew.java | |
package greeting.hello; | |
import printer.Imachine; | |
public class HelloNew { | |
public static void main (String[] args ) { | |
Imachine machine = new PrinterTest(true,"test"); //Getting error at this line | |
machine.turnOn(); |
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
use strict; | |
use warnings; | |
use Getopt::Std; | |
use Selenium::Remote::Driver; | |
use Data::Dumper; | |
########################## | |
#u need to run selenium-server-standalone | |
#java -jar selenium-server-standalone-2.45.0.jar | |
# |
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
When calling multiple stored procedures, you can run into the following error: "Commands out of sync; you can't run this command now". | |
This can happen even when using the close() function on the result object between calls. | |
To fix the problem, remember to call the next_result() function on the mysqli object after each stored procedure call. See example below: | |
<?php | |
// New Connection | |
$db = new mysqli('localhost','user','pass','database'); | |
// Check for errors | |
if(mysqli_connect_errno()){ |
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
#override the core subroutine (inbuilt function) of perl | |
BEGIN { | |
*CORE::GLOBAL::chdir = sub { | |
print "perl core funtion override sample"; | |
} | |
*shove = \&CORE::push; | |
} | |
chdir ; |
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
#called under void context | |
testContextCall(); | |
#called under scalar context | |
my $test = testContextCall(); | |
#called under list context | |
my @test = testContextCall(); | |
print "testContextCall() under scalar contex : $test\n"; | |
print "testContextCall() under array contex : @test\n"; | |
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
#!/usr/bin/perl | |
use Data::Dumper; | |
use Net::Twitter; | |
##fill in your dev.twitter stuff below | |
my $twitterconsumer = "ur_consumer"; | |
my $twitterconsumersecret = "ur_consumer_secret"; | |
my $twitteraccesstoken = "ur_access_token"; |
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
#!/usr/bin/perl | |
use Data::Dumper; | |
use Net::Twitter; | |
##fill in your dev.twitter stuff below | |
my $twitterconsumer = "ur_consumer"; | |
my $twitterconsumersecret = "ur_consumer_secret"; | |
my $twitteraccesstoken = "ur_access_token"; |
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
#!/usr/bin/perl | |
use Data::Dumper; | |
use Net::Twitter; | |
##fill in your dev.twitter stuff below | |
my $twitterconsumer = "ur_consumer"; | |
my $twitterconsumersecret = "ur_consumer_secret"; | |
my $twitteraccesstoken = "ur_access_token"; |
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
#!/usr/bin/perl -w | |
$\ = "\n"; | |
$, = "\t"; | |
print "1. foo\tyou\tme\tperl"; | |
print "2. foo","you","me","perl"; | |
foo(); |