Posts

javascript - Changing div using links -

javascript - Changing div using links - i got code uses links alter divs when paste these codes dreamweaver , open html file on firefox or google chrome don't work. work flawlessly on fiddle though. help appreciated. here jsfiddle. firefox google chrome css / html / jquery / demo class="snippet-code-js lang-js prettyprint-override"> $(document).ready( function () { // optional code hide divs $("div").hide(); $("#one").show(); // show chosen div, , hide others $("a").click(function (e) { e.preventdefault(); $("#" + $(this).attr("class")).show().siblings('div').hide(); }); }); class="snippet-code-css lang-css prettyprint-override"> .divstyle { height:300px; width:300px; border:1px solid #000; } .liststyle li { display:inline-block; } class="snippet-code-html lang-html prettyprin...

algorithm - C Program to detect right angled triangles -

algorithm - C Program to detect right angled triangles - if given 100 points in coordinate system, , have find if there exist right angled triangle in vertices. there way can observe right angled triangle among vertices without having take pairs of 3 vertices , applying pythagoras theorem on them?? can there improve algorithm this? help. :) here's o(n^2 log n)-time algorithm two dimensions only. i'll describe goes wrong in higher dimensions. let s set of points, have integer coordinates. each point o in s, build set of nonzero vectors v(o) = {p - o | p in s - {o}} , test whether v(o) contains 2 orthogonal vectors in linear time follows. method 1: canonize each vector (x, y) (x/gcd(x, y), y/gcd(x, y)), |gcd(x, y)| largest integer divides both x , y, , gcd(x, y) negative if y negative, positive if y positive, , |x| if y zero. (this similar putting fraction in lowest terms.) key fact 2 dimensions that, each nonzero vector, there exists 1 canonical vector orthog...

numpy - how can the string convert to int in python? -

numpy - how can the string convert to int in python? - in machine learning in action chapter 2, 1 illustration reads records file, each line like: 124 110 223 largedoses (forget actual meaning) one function in knn.py is: def file2matrix(filename): fr = open(filename) numberoflines = len(fr.readlines()) returnmat = zeros((numberoflines,3)) classlabelvector = [] fr = open(filename) index = 0 line in fr.readlines(): line = line.strip() listfromline = line.split('\t') returnmat[index,:] = listfromline[0:3] classlabelvector.append(int(listfromline[-1])) index += 1 homecoming returnmat,classlabelvector the problem listfromline[-1] string ( 'largedoses' , etc.), how can convert int ? in book, says numpy can handle this. (from book : you have explicitly tell interpreter you’d integer version of lastly item in list, ...

Is it possible to join a hive table with oracle table? -

Is it possible to join a hive table with oracle table? - i have problem in writing query using hiveql. is possible bring together hive table oracle table? if yes how? if no why? to access info stored in hive tables, including joining on them, need oracle big info connector. from documentation: using oracle sql connector hdfs, can utilize oracle database access , analyze info residing in hdfs files or hive table. can query , bring together info in hdfs or hive table other database-resident data. if required, can load info database using sql. oracle join hadoop hive

php - Scheduling push notifications with symfony2 -

php - Scheduling push notifications with symfony2 - i have been tasked implement force notification scheme mobile apps of commercial web app using symfony2. i have used rmspushnotificationsbundle(https://github.com/richsage/rmspushnotificationsbundle) creating , sending messages , implemented event-listeners send on-the-fly notifications clientele list. due fact need have scheduled notifications, have created couple of symfony commands executed through cron jobs. code behind commands checks scheduled notifications every 30 minutes , if notification sent in current time interval, sents it. currently works fine. main concern regards scalability of current implementations user-base expected grow lot. is there improve way go regarding scheduled notifications? know bit generic question appreciate kind of insight/ advice. cheers i think not question of scheduling of scaling. gcm (google cloud messaging) can force multiple devices @ 1 time (up 1000): https://developer...

javascript - Multiple Google Gauges with different option sets -

javascript - Multiple Google Gauges with different option sets - i'm trying insert multiple instances of google gauges (or highchart gauges) on page. want utilize different alternative sets , place them apart. cannot utilize solution presented here, think: google charts multiple gauges i've given effort here: http://jsfiddle.net/tcmsu475/1/ i'm missing fundamental. it's same highchart charts. cannot seem draw 1 chart in 1 div , in div. the code (for future reference): ... <script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.min.js"></script> <script type="text/javascript" src="https://www.google.com/jsapi?autoload={'modules':[{'name':'visualization','version':'1','packages':['gauge']}]}"></script> <div id="chart1_div" /> <div id="chart2_div" /> ... $(function () { var chart1_dat...

verilog - The difference between @(a==1) and @(posedge a) -

verilog - The difference between @(a==1) and @(posedge a) - in non-synthesizable code, difference between: @(a==1); and @(posedge a); are behaving same? the next illustration (on eda playground) shows not same : module test; logic = 1'b0; initial begin #100ns <= 1'b1; #100ns <= 1'b0; #100ns <= 1'b1; #1000ns $finish; end initial begin @(a == 1'b1) $display("%t : == 1 (1) %b",$realtime, a); @(a == 1'b1) $display("%t : == 1 (2) %b",$realtime, a); @(a == 1'b1) $display("%t : == 1 (3) %b",$realtime, a); end initial begin @(posedge a) $display("%t : posedge (1)",$realtime); @(posedge a) $display("%t : posedge (2)",$realtime); @(posedge a) $display("%t : posedge (3)",$realtime); end endmodule which displays 100 : posedge (1) 100 : == 1 (1) 1 200 : == 1 (2) 0 300 : ==...