Posts

Showing posts from August, 2015

jquery - How do you make a nav bar "sticky"? -

i'm making site friend , make nav bar sticky. here's example: http://www.w3schools.com/html/default.asp . have picture header in example. here code have made: <html> <head class="masthead"> <link href="http://s3.amazonaws.com/codecademy-content/courses/ltp/css/shift.css" rel="stylesheet"> <link rel="stylesheet" href="http://s3.amazonaws.com/codecademy-content/courses/ltp/css/bootstrap.css"> <link rel="stylesheet" href="stylehom.css"> <link href="https://dub110.afx.ms/att/getinline.aspx?messageid=1f91e2e4-f236-11e4-9965-002264c20aa4&attindex=0&cp=-1&attdepth=0&imgsrc=cid%3apart1.04010900.00040603%40btinternet.com&cid=07bd617fb040a20e&hm__login=edwinshepherd1&hm__domain=live.co.uk&ip=10.211.20.8&d=d97&mf=0&hm__ts=mon%2c%2004%20may%202015%2016%3a39%3a02%20gmt&st=edwinshepherd1%25live.co.uk%407&hm__...

binary - How to use constant powers of 2 readable in c++? -

i need several integer constants 2^n , 2^n - 1 in gnu c++ code. what practise keep code readable? code uses decimal values @ moment 4294967296 , 65536 hard debug in future. 2^12 not implemented in standard c++ , pow(2.0,12.0) uses double . if (buffer_length == 4294967295){ } // code example, want make more readable you can use shift left operator: if (buffer_length == 1 << 12){ }

php - How to import Romanian diacritics from csv to mysql database -

i have found 1 error on script. while importing csv file mysql database diacritics shown strange char. i need fast , realiable solution in sql query in code below: $sql = "insert medici (`cnp`, `cod_parafa`, `tit_id`, `numele`, `numele_anterior`,... what need importing fields: numele , numele_anterior support romanian char șțăîâ. database has set utf8_romanian_ci char.

php - as.numeric is not working -

i developing code r , trying integrate php. in code after as.numeric, values output na on logs.txt , n = '"15","20","30","40","50"'; (coming php) # my_rscript.r args <- commandargs(true) n <- args[1] n=c(n) cat(n,file="c:/rlogs.txt",append=true) n=as.numeric(as.character(n)) cat(n,file="c:/rlogs.txt",append=true) png(filename="temp.png", width=500, height=500) hist(n, col="lightblue") dev.off() i appreciate on this. without more detail, first need convert input single string vector. that is, need strsplit , , in case gsub rid of quotation marks: n <- '"15","20","30","40","50"' as.numeric(n) # [1] na # warning message: # nas introduced coercion n <- strsplit(n, ',')[[1]] n # [1] "\"15\"" "\"20\"" "\"30\"" "\"40\...

php - Is there any way of changing the layout of view in Yii2? -

how override layout used controller render view in third party module? inside relative action: public function actionyouraction($id) { $this->layout = 'yournewlayout'; return $this->render('yourview', ['model' =>$model]); }

jQuery UI Sortable - pass additional data with serialize -

in below code, want pass value listing_id in ajax post: $('#listing .images').sortable({ tolerance: 'pointer', update: function(event, ui){ var data = $(this).sortable('serialize'); var listing_id = $('#listing').attr('data-id'); $.ajax({ type: 'post', datatype: 'json', url: 'listings/sortimages', data: data, success: function(result){ alert('successfully re-ordered items.'); } }); } }); i have tried: data.push({name: 'listing_id', value: listing_id}); it says data.push not function . data.push({name: 'listing_id', value: listing_id}); doesn't work because data serialized string . try data += '&listing_id=' + listing_id;

mysql SELECT column only if exists -

i have 5 tables want select data from, 5th table (named comment) empty. when happens want query return null values table, , return other values (the 5th table includes user comments, there none). here query: select articles.title, articles.posted, articles.body, authors.name, authors.img, authors.bio, comment.user_id, comment.text, comment.article_id, group_concat(categories.cat_name) cat_name articles, authors, categories, article_categories, comment articles.author_id = authors.id , articles.id = article_categories.article_id , article_categories.category_id = categories.id , articles.id = comment.article_id , title :title; the :title comes pdo , not relevant here. the problem comes and articles.id = comment.article_id . don't know how write in way check this, if it's there , ignore otherwise. thanks help you should use proper join syntax , , in case instead of inner join use left join comment table: select articles.title, articles.posted, article...

c# - Exception in opening a socket at my IP address -

i new in socket programming c#. trying make chat server between 2 computers unable because cant start socket..... gave server program ip address gives me exception... "the requested address not valid in context" ...here code: ipaddress hostipaddress = ipaddress.parse("178.189.27.85"); tcplistener serversocket = new tcplistener(hostipaddress, 8888); int requestcount = 0; tcpclient clientsocket = default(tcpclient); serversocket.start(); console.writeline(" >> server started"); clientsocket = serversocket.accepttcpclient(); console.writeline(" >> accept connection client"); requestcount = 0; while ((true)) { try { requestcount = requestcount + 1; networkstream networkstream = clientsocket.getstream(); byte[] bytesfrom = new byte[10025]; networkstream.read(b...

r - Use group_by to filter specific cases while keeping NAs -

i want filter dataset keep cases observations in specific column. illustrate: help <- data.frame(deid = c(5, 5, 5, 5, 5, 12, 12, 12, 12, 17, 17, 17), score.a = c(na, 1, 1, 1, na, na, na, na, na, na, 1, na)) creates deid score.a 1 5 na 2 5 1 3 5 1 4 5 1 5 5 na 6 12 na 7 12 na 8 12 na 9 12 na 10 17 na 11 17 1 12 17 na and want tell dplyr keep cases have observations in score.a , including na values. thus, want return: deid score.a 1 5 na 2 5 1 3 5 1 4 5 1 5 5 na 6 17 na 7 17 1 8 17 na i ran code help %>% group_by(deid) %>% filter(score.a > 0) pulls out nas well. thank assistance. edit: similar question asked here how remove groups of observation dplyr::filter() however, in answer use 'all' condition , requires use of 'any' condition. try ...

java - jwnl unable to install database -

i trying build bespoke dictionary. testing jwnl. following error: net.didion.jwnl.jwnlexception: unable install net.didion.jwnl.dictionary.filebackeddictionary my xml file - <?xml version="1.0" encoding="utf-8"?> <jwnl_properties language="en"> <version publisher="princeton" number="2.0" language="en"/> <dictionary class="net.didion.jwnl.dictionary.filebackeddictionary"> <param name="morphological_processor" value="net.didion.jwnl.dictionary.morph.defaultmorphologicalprocessor"> <param name="operations"> <param value="net.didion.jwnl.dictionary.morph.lookupexceptionsoperation"/> <param value="net.didion.jwnl.dictionary.morph.detachsuffixesoperation"> <param name="noun...

scala - Project files are not imported after importing the project in Eclipse Luna -

Image
i new scala eclipse. please smooth on question. looked on available resources of eclipse. i using scala ide in eclipse. when importing project eclipse(general->import existing project...), project imported, main files in src/ in test/ not imported , present in project directory. here screenshot of eclipse. can me this? main/ , test/ empty, contains project file. even though source , class path resources may reside src/main/scala , src/test/scala folders under project on file system, eclipse separates them off in package explorer view , shows them in separate part of tree decorated little package icon. see first item in tree under progfun-example. hopefully source there. (the presence of tree expansion toggle icon indicate there there.)

ruby on rails - application.html.erb to render different partial depending on the page user is on -

i show different header menu depending on page of site user on. in rails' application.html.erb want like: <% if "user op page x" %> <%= render 'layouts/header1' %> <% else %> <%= render 'layouts/header2' %> <% end %> but line <% if "user op page x" %> need be? is, there rails method specifies page? couple things mention here. 1 is, put stuff in layouts alternative layouts application.html.erb, can render whole different template part of app. admin ui have different layout example. for that's more of global partial app, typically create partials folder under views: app/views/partials , put _header1.html.erb , _header2.html.erb in there. now rendering them, controller method comes in handy. in view, update if statement to: <% if controller_name == "the_controller" && action_name == "the_action" %> <%= render partial: "partials/heade...

arrays - How to calculate the size of a vector of this form? -

in matlab, it's easy define vector way: x = a:b:c , a , b , c real numbers, a < c , b <= c - a . my problem i'm having troubles trying define formula calculate number of elements in x . i know problem solved using size command, need formula because i'm doing version of matlab program (which uses vectors way), in language. thanks in advance can provide. best regards, víctor on mathematical level argue of these expressions return same: size(a:b:c) size(a/b:c/b) size(0:c/b-a/b) now end integers 0 term, is: floor((c-a)/b+1) there 1 problem: floating point precision. colon operator repeated summing, don't know possibility predict reproduce that.

MySQL alias replaced by column name when creating view involving subquery -

why column alias being replaced original column name when create view script? script works, view fails. the script selects records using outer query / inner query a.k.a. query / subquery. subquery used in select clause. each subquery select clause becomes column in result set. see http://www.techonthenet.com/mysql/subqueries.php . the alias used inside subquery's select clauses replaced original column name. alias used give subquery short name not replaced. here meta version can see structure. select `t1`.`date` **`*when*`**, ( select avg(t1.column) t1 `t1.`date` = `***when***` ) `short column name`, t1 group `date` order `date` in view version, aliases replaced, subquery becomes; ( select avg(t1.column) t1 ***`t1.`date` = `t1.`date`*** ) `short column name`, the effect of average calculated across dates rather date specified when in outer query. another script built same way translates view without problem. alias kept. there difference between cl...

html - Jquery remove dynamic element before current element -

so i'm building quiz, , i'm adding questions , answers jquery. want remove questions , answers. html: <div id="tab1" class="questionslist"> <br/> <button type="button" onclick="addawnser(1)">add awnser</button> <br/> <br/> question: <input type="text" placeholder="what's question?" name="question[]"/><br/><br/> <div class="awnserslist"> <input type="text" class="question" name="awnser[1][]" placeholder="awnser"/> <input type="checkbox" name="correct_awnser[1][]" value="1"/> <form method="post" action=""> <div class="col-md-12"> <div class="well"> <div class="input-group"> <input type="text" name=...

php - 301 redirect in htaccess again -

i had issue while ago in post: 301 redirect in htaccess everything on project i'm working on, it's reverse of that. so basically, need to go from: site.com/blah-blah/ to this: site.com/blah-blah.123 (the id of article) the problem don't know id of article unless run php query have no idea how htaccess. possible? the solution in other post this: rewriterule ^industry/([a-za-z0-9-]+).([0-9]+)/$ /$1/ [r=301] but wouldn't work if reversed it. ideas? thanks.

Get the value of clicked text box from array of text boxes using PHP -

i want text box value selected array of text boxes.. code this: here displaying data on browser db.. <?php foreach($datadecoded['categories'] $key => $value) { ?> <tr> <td><?php echo $value['categoryname'];?></td> <td> <input type="text" name="categoryid[]" id="categoryid" value="<?php echo $value['categoryid']?>"> <input type="text" name="categoryname[]" id="categoryname" value="<?php echo $value['categoryname']?>"> <input type="submit" name="create" id="create" value="create"> </td> </tr> <?php } ?> the data displayed like: categoryid1 categoryname1 <create button> categoryid2 categoryname2 <create button> categoryid3 categoryname3 <create button> , on this.. now, suppose when click on create ...

oop - What is the difference between self and $this in php? -

this question has answer here: when use self on $this? 21 answers what difference between $this , self ? when should use each of them? $this refers current instance . self refers current class . in other words, can use $this->somemember refer instance member , self::$somestaticmember refer static member.

php - Symfony form: disable "required" for a field from Twig -

i'm trying disable frontend html5 validation filed in form built in symfony. in twig, use code: {{ form_widget(form.email, {'attr': {'class': 'form-control input-lg','novalidate': 'novalidate}}) }} but field still considered required. doing wrong? you can set in form type disable field validation. ->add('test', null, array( 'required' => false )) if want disable whole field can try this: {{ form_start(form, { attr: {novalidate: 'novalidate'} }) }}

c++11 - in iterator i have expected primary-expression before 'int' -

list<int> list; // insert elements beginning of list: assert_no_throw(list.insert(1, list.begin())); // 1 assert_no_throw(list.insert(2, list.begin())); // 2 1 // insert elements end of list: assert_no_throw(list.insert(3, list.end())); // 2 1 3 assert_no_throw(list.insert(4, list.end())); // 2 1 3 4 // can't dereference iterator pointing end of list assert_throw(listexceptions::elementnotfound, *list.end()); iterator<int> iterator = list.find(intequals(1)); in line: iterator iterator = list.find(intequals(1)); error : expected primary-expression before 'int'

java - How to get the pointcut details in the aspect constructor -

i have annotation style aspect that: //.... //somewhere in class // @myannotation public void foo(){ \* stuff *\} ///////////////////// // in aspect file @aspect("percflow(execution(@com.bla.myannotation * *(..)))") public class myaspect { public myaspect(){ /* here i'd access name of annotated function e.g: foo*/ } /* more pointcuts , advice*/ } i've tried capturing object this(object) didn't good. i've tried introducing parameter constructor caused error. well, not necessary in constructor. can declare pointcut within percflow() stand-alone object , use within percflow() in @before advice which, instantiation model implies, executed once , gives necessary information via corresponding joinpoint object. can log or store information fancy. btw, idea of using constructor not nice because within constructor aspect instance not initialised yet (hen vs. egg problem) , cause exceptions when trying access it. package...

html - how to solved two jquery confliction specially autocomplete and fullcalendar js -

i want include 2 jquery files (one auto complete ajax , other full calendar) on same page/ header page conflict each other. how can solved issue, tried solution of noconflict no use, please me. following code include js file: <script src="js/jquery-1.2.1.min.js" type="text/javascript"></script> <script src="js/fullcalendar/jquery.min.js" type="text/javascript"></script> where first file used auto complete dropdown , other 1 full calendar event. thanks in advance. edit: sorry, saw tried noconflict after posting this. reason think not work if not wanting update $/jquery names in 1 of files. find , replace pretty easily. i recommend using jquery.noconflict(true) remove jquery object global scope , assign object name of choosing, provided don't need use precise object name: jquery/$ access jquery object both versions. can 1 of versions after inclusion. for example: jq121 = jquery.noconflict( true ...

javascript - Display read more button -

i want use read more button after text larger 300 characters. i use jquery fix this, not working want. var $j = jquery.noconflict(); $j('.reviewtekst').each(function() { var $ptag = $j(this).find('p'); if($ptag.text().length > 300){ var shorttext = $ptag.text(); shorttext = shorttext.substring(0, 300); $ptag.addclass('fullarticle').hide(); $ptag.append('<a class="read-less-link">lees minder</a>'); $j(this).append('<p class="preview">'+shorttext+'</p><div class="curtain-shadow"></div><a class="read-more-link">read more</a>'); } }); $j(document).on('click', '.read-more-link', function () { $j(this).parent().hide().prev().show(); }); $j(document).on('click', '.read-less-link', function () { $j(this).parent().hide().next().show(); }); see jsfiddle: ht...

android - ANDY Error Unable to Launch VM Process -

when start andyroid error andy error unable launch vm process: virtual machine 'andy' has terminated unexpectedly during start with 1a64.1a20: log file opened: 4.3.28r100309 g_hstartuplog=0000000000000028 g_untvercombined=0x63258000 1a64.1a20: \systemroot\system32\ntdll.dll: 1a64.1a20: creationtime: 2015-04-14t19:07:42.947120400z 1a64.1a20: lastwritetime: 2015-03-23t21:59:25.551884100z 1a64.1a20: changetime: 2015-04-17t01:36:19.499612400z 1a64.1a20: fileattributes: 0x20 1a64.1a20: size: 0x1a7540 1a64.1a20: nt headers: 0xd8 1a64.1a20: timestamp: 0x550f4336 1a64.1a20: machine: 0x8664 - amd64 1a64.1a20: timestamp: 0x550f4336 1a64.1a20: image version: 6.3 1a64.1a20: sizeofimage: 0x1ac000 (1753088) 1a64.1a20: resource dir: 0x148000 lb 0x62450 1a64.1a20: productname: microsoft® windows® operating system 1a64.1a20: productversion: 6.3.9600...

How to call controller action from d3.js or any javascript in rails -

i trying understand how can call controller action when user presses circle in d3.js graph. idea controller action should show more information circle database i'm interested in how call rails controller action user's click. haven't put controller code in because i'm interested in how call made. the relevant part of javascript looks like: var node = svg.selectall(".node") .data(graph.nodes) .enter().append("circle") .attr("class", "node") .attr("r", function(d) { return d.group * 3; }) .style("fill", function(d) { return color(d.group); }) .call(force.drag) .on('click', connectednodes) .on("dblclick",getprofile(d)); function getprofile(d){ $.ajax({ url: "/users/show" , type: "get", data : { name: json.stringify(d.name) } }); define dblclick this: .on("dblclick...

ios - restitution (bouncing) not working -

import spritekit class gamescene: skscene { override func didmovetoview(view: skview) { /* setup scene here */ let border = skphysicsbody(edgeloopfromrect: self.frame) border.friction = 0 self.physicsbody = border self.physicsworld.gravity = cgvectormake(0, 0) let ball = childnodewithname ("ball") skspritenode ball.physicsbody?.applyimpulse(cgvectormake(30, -30)) ball.physicsbody?.allowsrotation = false ball.physicsbody?.restitution = 1 ball.physicsbody?.lineardamping = 0 ball.physicsbody?.angulardamping = 0 } override func touchesbegan(touches: nsset, withevent event: uievent) { /* called when touch begins */ } override func update(currenttime: cftimeinterval) { /* called before each frame rendered */ } }

java - Android call a check for internet connection automatically -

i'd know if there's mechanism whenever try use internet, somehow automatically behind scences method (isnetworkavailable) called. the question not how check internet connection know that: public boolean isnetworkavailable(){ connectivitymanager cm = (connectivitymanager)ctx.getsystemservice(context.connectivity_service); networkinfo activenetwork = cm.getactivenetworkinfo(); boolean isconnected = activenetwork != null && activenetwork.isconnectedorconnecting(); return isconnected; } to clarify myself, want prevent calling isnetworkavailable() each time use internet connection (either classes call explicitly or third party classes use opens internet connections themselves), code won't filled everywhere with: if(isnetworkavailable()){ // send message server or open other internet connection } but function somehow called before each attempt connect internet. hope i've cleared myself. couldn...

javascript - How to submit a form using jQuery Validate submitHandler -

this jquery submit form code. know how can submit form on using submithandler. in advance. submithandler: function(form) { // other stuff valid form $.post('thankyou.php', $("#confrom").serialize(), function(data) { $("#confrom").fadeout('fast', function(){ $('#results').html(data); }); }); } there submithandler built plugin contains form.submit() . since you're over-riding own custom submithandler , still need use submit . otherwise, in case, kind of ajax instead of .submit() . the submithandler goes inside of .validate() method. in order use .validate() method, must first include jquery validate plugin after include jquery. <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> <script src="//ajax.aspnetcdn.com/ajax/jquery.validate/1.13.1/jquery.validate.js"></script> <s...

mysql - Searching for a range within a comma-separated field -

i have field called 'fits' contains comma separated values this: 120102199105199205,130101199105199205,120101199107199201 where each number first 6 digits fitment code , last 12 digits unique date range. now, know csv nasty , violates 1nf, alternative normalizing data couple more tables monstrous because of potential number of records so in effort keep simple i'm trying write query select rows based on providing fitment code , range of dates. far have this: select data table fits = any( select fits table fits '120102') , fits between "120102199105000000" , "120102999999199205" the problem is, between...and doesn't work csv data is there way apply range in query kind of wildcard type of csv data, or sql-side solution normalize? if want use between values in fits column need normalise data. this should not problem. how big potential row size? you'd surprised how many records not problem modern ...

c++ - Can I use the _T() macro with a variable? -

this question has answer here: convert string _t in cpp 6 answers string pagexx = "http://website.com/" + chatname; string pathxx = "test"; hresult resxx = urldownloadtofile (null, _t(pagexx.c_str()),_t(pathxx.c_str()), 0, null ); the error "error: identifier "lpagexx" undefined." , same pathxx i cant enter string _t("nice") because need chatname in specifically. how can make work? _t macro putting proper prefix on literal. not you're doing, don't want use _t . your problem begins on first line, since you've hardcoded you're using strings narrow characters (i.e. string string of char elements) rather selecting appropriate string type. see question automatically change between std::string , std::wstring according unicode setting in msvc++? .

css - How to make responsive png sequence? -

i trying make responsive png sequences. my tried code here. wrong code? 1. if removed background-size :100%; shows image until , unless invisible. 2. not responsive. (if comment background-size :100%) css .eye { position: relative; width: 70%; margin: -10% auto 0 auto; /* positioning tweak */ } .pngseq{ position: absolute; left: 0; right: 0; top: 0; bottom: 0; background: url('http://arnoculus.com/img/eye-sprite.png') no-repeat 0 0%; background-size: 100%; animation: play 3s steps(58) infinite; } @-webkit-keyframes play { { background-position: 0px; } { background-position: -30740px; } } @-moz-keyframes play { { background-position: 0px; } { background-position: -30740px; } } @-ms-keyframes play { { background-position: 0px; } { background-position: -30740px; } } @-o-keyframes play { { background-position: 0px; } { background-position:...

std::wstring in ChaiScript -

i beginner chaiscript. i try use std::wstring type in chaiscript. std::string type works well. #include <iostream> #include <chaiscript/chaiscript.hpp> #include <chaiscript/chaiscript_stdlib.hpp> int main() { chaiscript::chaiscript chai(chaiscript::std_lib::library()); std::cout << chai.eval<std::function<int (std::string)> >( "fun(s){" " if(s==\"aaa\"){" " print(\"1\");" " }" " if(s[1]=='b'){" " print(\"2\");" " }" " return 3;" "}" )(std::string("abcd")); } d:\testwork\test_chaiscript>t1.exe 2 3 std::wstring type raises exception. #include <iostream> #include <chaiscript/chaiscript.hpp> #include <chaiscript/chaiscript_stdlib.hpp> int main() { cha...

cryptography - Is integer comparison in Python constant time? -

is integer comparison in python constant time? can use compare user-provided int token server-stored int crypto in way compare strings constant_time_compare django.utils.crypto , i.e. without suffering timing attacks? alternatively, more secure convert string , use above function? the answer yes for given size of integer - default python integers big become long , have potentially infinite length - compare time grows size. if restrict size of integer ctypes.c_uint64 or ctypes.c_uint32 not case. note compare 0 special case, faster, due hardware actions many cpus have special flag 0 , if using/allowing seeds or tokens values of 0 asking trouble.

Kafka ->Spark streaming -> Hbase. Task not serializable Error Caused by: java.lang.IllegalStateException: Job in state DEFINE instead of RUNNING -

i trying write data produced kafka commandline producer topic. i facing problem , unable proceed. below code creating jar , running through spark-submit on spark-shell. am doing wrong inside foreachrdd() ? wrong sparkkafkademo$2.call(sparkkafkademo.java:63) line in below error message? sparkconf sparkconf = new sparkconf().setappname("javakafkademo").setmaster("local").setsparkhome("/users/kvk/softwares/spark-1.3.1-bin-hadoop2.4"); javastreamingcontext jsc = new javastreamingcontext(sparkconf, duration.seconds(1)); int numthreads = 2; map<string, integer> topicmap = new hashmap<string, integer>(); topicmap.put("nonview", numthreads); javapairreceiverinputdstream<string, string> messages = kafkautils.createstream(jsc, "localhost", "viewconsumer", topicmap); javadstream<string> lines = messages.ma...

css - Responsive footer always in bottom -

Image
i'm having trouble creating responsive footer stay on bottom of page. code i'm using this: body { margin: 0 0 200px; //same height of footer } footer { position: absolute; left: 0; bottom: 0; height: 200px; width: 100%; overflow: auto; background-color: rgba(67, 191, 115, 0.95); } i use: <div class='main-content'> //content </div> <footer> //footer content </footer> well, problem if resize screen , content larger resolution footer lets white space, this: i trying solve problem. if use position: fixed problem disappears, don't want footer following scroll. think problem in 100 percent width. footer of site, stack overflow, works need. if resize window footer remains same, no white space. how achieve this? how make footer cover width without let white space if resolution lower page occurs here, in stack overflow? try code.... css html, body { height: 100%; /* html , body elements ca...

c++ - Cmake errors: The CXX Compiler identification is unknown, The C compiler identification is unknown -

i'm trying install opencv on fedora 21 cross compiler arm processor. however, when try configure using cmake 3.03, gives error: *the cxx compiler identification unknown c compiler identification unknown check working cxx compiler: /opt/friendlyarm/toolschain/4.5.1/bin/arm-linux-g++ check working cxx compiler: /opt/friendlyarm/toolschain/4.5.1/bin/arm-linux-g++ -- broken cmake error @ /usr/share/cmake/modules/cmaketestcxxcompiler.cmake:54 (message): c++ compiler "/opt/friendlyarm/toolschain/4.5.1/bin/arm-linux-g++" not able compile simple test program. fails following output: change dir: /opt/opencv/relarm/cmakefiles/cmaketmp run build command:"/usr/bin/gmake" "cmtrycompileexec1616328985/fast" /usr/bin/gmake -f cmakefiles/cmtrycompileexec1616328985.dir/build.make cmakefiles/cmtrycompileexec1616328985.dir/build gmake[1]: entering directory '/opt/opencv/relarm/cmakefiles/cmaketmp' /usr/bin/cmake -e cmake_progress_report...

How to make overlaid contour plots with python? -

using python, how create two(or more) color contour plots, each own color map, overlaid single image same x , y axes? you can save each layer png file transparent background , overlay them in photoshop, gimp or imagemagick.

javascript - Function doesn't work in safari on windows -

while syntax works on other browser, safari on windows throws error $("#kibana").contents().find('.navbar-nav')[0].remove(); the error is typeerror: 'undefined' not function the element exist. checked using debugger. why happening? when use [] on jquery object, retrieving underlying dom node. .remove isn't cross-browser compatible on native dom elements. instead, can use .eq retrieve element while still having wrapped in jquery. way can use cross-browser comptabile .remove method: $("#kibana").contents().find('.navbar-nav').eq(0).remove();

input - How to make my output show only whats needed with my cheque generator program for c -

i have made program can output whatever numeral inputted in convert words instead of numerals example if input "1234.56" convert "one thousand 2 hundred thirty 4 dollars , ... 56 cents". cents should in numerals. far works great, if put in amount less 1 thousand excess words such "thousand" or "hundred" in there. example if input "15.77" output "thousand hundred fifteen dollars , ... 77 cents". don't want thousand or hundred there, without perfect! the code follows: #include <stdio.h> void printnum(int); void printnum2(int); void printnum3(int); int main() { int = 0; int b = 0; int c = 0; int d = 0; int num = 0; int printcents; //to convert float "cents" integer. float inclusive; float cents; printf("welcome ipc144 cheque generator!!\n"); printf("pay order of... amahmood29 (018359133)\n"); printf("enter monetary value $0.01 $9...