Posts

Showing posts from February, 2010

r - Invalid type (closure) for a variable that is not a function -

loess.smooth <- function(dat) { dat <- dat[complete.cases(dat),] ## response vars <- colnames(dat) ## covariate id <- 1:nrow(dat) ## define loess filter function (fitting loess regression line) loess.filter <- function (x, span) loess(formula = paste(x, "id", sep = "~"), data = dat, degree = 1, span = span)$fitted ## apply filter column-by-column new.dat <- as.data.frame(lapply(vars, loess.filter, span = 0.75), col.names = colnames(dat)) } when try apply loess.smooth dataframe, error: error in model.frame.default(formula = paste(x, "id", sep = "~"), data = dat) : invalid type (closure) variable 'id' i don't understand why problem since id not function, implied error. when run through these lines of code outside of function, wo...

Retrieve an aggregated SQL value from a ResultSet in Java -

i've been stuck problem several hours: there 3 tables, 1 of them connects others through place number , tray id. find out how many samples on specific tray aggregated places tray id, works in pure sql code. my java code: ps = connection.preparestatement("select trayid, count(placeno) occupied " + "from place " + "group trayid " + "having trayid = ?"); ps.setint(1, trayid); rs = ps.executequery(); if (!rs.isbeforefirst()) { throw new coolingsystemexception(); } else { spaceoccupied = rs.getint("occupied"); and last line program crashes. have tried getint(1) instead of name nothing works. , if result set empty crash @ if (!rs.isbeforefirst()) { throw new coolingsystemexception(); } what know sure there value image: dbeaver usin...

uicolor - init(colorLiteralRed:,green:,blue:,alpha:) deprecated in Swift 4 -

let startingcolorofgradient = uicolor(colorliteralred: 255/255, green: 255/255, blue: 255/255, alpha: 1.0).cgcolor let endingcolorofgradient = uicolor(colorliteralred: 251/255, green: 247/255, blue: 234/255, alpha: 1.0).cgcolor let gradient: cagradientlayer = cagradientlayer() error: 'init(colorliteralred:green:blue:alpha:)' obsoleted in swift 4.0 (swift._expressiblebycolorliteral) how use gradient color if init(colorliteralred:,green:,blue:,alpha:) deprecated in swift 4? init(colorliteralred:green:blue:alpha:) intended used color literals managed development tools. why don't use normal init(red:green:blue:alpha:) ? let startingcolorofgradient = uicolor(red: 255.0/255.0, green: 255.0/255.0, blue: 255.0/255.0, alpha: 1.0).cgcolor let endingcolorofgradient = uicolor(red: 251.0/255.0, green: 247.0/255.0, blue: 234.0/255.0, alpha: 1.0).cgcolor let gradient: cagradientlayer = cagradientlayer() (writing 234.0/255.0 not mandatory, in conte...

ajax - short polling versus websockets for short duration requests -

so have django backend server communicates large number of 3rd party servers. these 3rd party servers use socket connections communication, not http. each user request our service communicate (over socket) 1 of many possible 3rd party servers. each 3rd party server can take 1-20 seconds respond, although around 1-5 seconds. of course when user goes our webpage make request 1 of 3rd party services, want respond our user possible, ie don't block on our server waiting response. when 3rd party server responds, want push response user's browser. certainly common problem. key here issuing requests our web server every 5 seconds or (e.g. using javascript/ajax in our web pages). understand if able create websocket connection response , leave open, and/or if our requests long duration (say >30 seconds), websockets way go server push. however, variety of reasons can't that, we'll need establish new websocket connection every request. seems me if have go through whole pro...

react-navigation tab navigator Screens' contents are not shown / the screens are blank issue -

i have problem react-navigation tab navigator. screens' contents not shown / screens blank. ideas ? navigator structure: import { stacknavigator, tabnavigator } 'react-navigation'; import peoplelist './peoplelist'; import companylist './companylist'; import addperson './addperson'; const navigation = tabnavigator({ people: { screen: peoplelist }, person: { screen: addperson }, company: { screen: companylist }, }, { tabbaroptions: { activetintcolor: 'white', inactivetintcolor: '#80cbc4', swipeenabled: true, showlabel: false, style: { backgroundcolor: '#26a69a', }, }, }); export default navigation; update: this app.js file include render methods: import react, {component} 'react'; import {stylesheet, text, view} 'react-native'; import firebase 'firebase'; import {provider} 'react-redux'; import {createstore} 'redux' import login...

Spark/Scala kernel failing on Jupyter due to Java error -

i've been using spark/scala kernel on jupyter (i'm not sure version/how check since it's not listed in jupyter kernelspec list ). all of sudden, stopped working. poking around bit, i've found error preventing kernel initiating: exception in thread "main" java.lang.unsupportedclassversionerror: com/typesafe/config/configmergeable : unsupported major.minor version 52.0 i've seen several threads trying address issue ( 1 , 2 , 3 , 4 ), don't follow them @ / how apply suggested solutions situation. it appears there's sort of version mismatch somewhere inside how kernel's working, don't know how figure out mismatch / how fix it. i've looked @ following, don't see (or know how diagnose, really) inconsistency: printenv | grep "java" # java_home=/usr/lib/jvm/java-7-openjdk-amd64 java -version # java version "1.7.0_131" # openjdk runtime environment (icedtea 2.6.9) (7u131-2.6.9-0ubuntu0.14.04.2) # openjd...

How do I make an image its actual size up to a certain point in a window? Extjs 6 classic -

i want have window xtype contains of own size when show window, shows tiny square in middle of screen (not actual size of image). i've tried using block of code listeners:{ afterrender: function(me){ me.el.on({ load: function (evt, ele, eopts){ me.updatelayout(); }, error: function(evt,ele,eopts){ } }); } } to update layout of parent window within image xtype, makes window not centered , centering window during afterrender event isn't working. missing simple? have maxwidth , maxheight configs of image set ext.getbody().getviewsize().width , height respectively. sencha had reason not use xtype: 'image' own icons etc. xtype: 'image' works fixed width , height, can't preserve aspect ratio, far know. what want have container , set background-image of container. xty...

ruby on rails - Heroku Deployment failing -

i'm trying deploy app first time in heroku , i'm encountering weird bug. when try run heroku rake db:migrate, see error : rake aborted! standarderror: error has occurred, , later migrations canceled: pg::undefinedtable: error: relation "companies" not exist : create table "users" ("id" bigserial primary key, "admin" boolean default 'f', "admin_c" boolean default 'f', "color" character varying, "initial" character varying, "name" character varying, "surname" character varying, "pseudo" character varying, "step" integer, "company_id" bigint, "email" character varying default '' not null, "encrypted_password" character varying default '' not null, "reset_password_token" character varying, "reset_password_sent_at" timestamp, "remember_created_at" timestamp, "sign_...

python - Pandas loc find user that has applied to 5 or more things -

i want know users have fullcategory of length greater 5. i have data frame called users_df looks this userid fullcategory 1 [1,2,3,4,5] 2 [1,2,,5] 3. [1,4,5] i trying this. users_df.loc[len(users_df.fullcategory) > 5, :] but doesn't seem work try this: users_df.loc[users_df.fullcategory.str.len() > 5]

javascript - vuejs component array push watcher -

confusing title, wasn't sure how else write it. have component , accepts prop array. looking do, on array.push() function trigger array element. so alert toast message, , want stay 3 seconds. thinking watch: { arrayobj: function () { let self = settimeout(function() { self.dismiss(this.id) }, 3000) } } but think may missing here. how latest pushed object's reference make sure dismiss method calls correct alert? watch correct way go this? i'm not entirely clear on behavior you're trying get, seems me need keep track of latest pushed item , pass component. component watch latestpushed , act accordingly. if latest pushed item repeated, not see change when duplicate value pushed. in case, makes sense pass event bus prop component , send , event when parent pushes. new vue({ el: '#app', data: { bus: new vue(), thearray: [1] }, methods: { push() { const value = ...

c# - SmtpClient is replacing asterisks with <strong> tags -

Image
i using microsoft's smtpclient class send email. delivered fine, formatting little off. sending more 1 asterisks in row results in of asterisks being replaced opening or closing "strong" tag. sending literal string: 1 * 2 ** 3 *** 4 **** 5 ***** 6 ****** results in email source code this: i send email follows: var mailmessage = new mailmessage(); mailmessage.subject = <subject string>; mailmessage.body = <literal string mentioned above>; mailmessage.isbodyhtml = email.isbodyhtml; //which false var tomailaddress = new mailaddress(email.toemailaddress, email.toname); mailmessage.to.add(tomailaddress); using (var smtpclient = new smtpclient()) { smtpclient.send(mailmessage); } any great appreciated.

python - Confusion about the term I/O when used in different settings and in reference to GIL -

it seems when google i\o is, hits show stands "input" , "output". see blogs on python titled, "python file i\o --part 19, advanced file input , output " if go python docs , search input/output: https://docs.python.org/3/tutorial/inputoutput.html examples limited print statements , reading/writing files. i see no examples of web-services or networking input/output in "input , output" section of python docs, despite seeing term i/o used these concepts. i/o containing same meaning when referring web-services , networks well? i've been doing lot of reading on gil , multi-threading , term i/o bound has popped in addition i/o . i/o bound seems refer state there lot of cpu idleness, due slowness of getting data cpu. multi-threading seems used webservices , networking because i'm assuming there lot of cpu idleness, i.e i/o bound heavy tasks because waiting user-input act upon. now print statements read/write files considered i...

android - Send SMS to each contact in SQLite Database -

i have sqlite table has different phone numbers , different messages each. want id each row intentservice can send unique sms each number. have done: public class notificationservice extends intentservice { public notificationservice() { super(notificationservice.class.getsimplename()); } @override public void oncreate() { super.oncreate(); } @override protected void onhandleintent(intent intent) { bundle extras = intent.getextras(); if (extras != null) { string number = extras.getstring(string.valueof(messagecontract.messageentry.column_phone_number)); string message = extras.getstring(string.valueof(messagecontract.messageentry.column_code)); sendmessage(number, message); } } private void sendmessage(string number, string message) { string sent = "sms_sent"; string delivered = "sms_delivered"; pendingintent sentpi = pendingintent.getbroadcast(this, 0, new intent(sent), 0); pendingintent delivere...

Can AES128-CBC encryption produce output with odd length? -

i trying implement soap client that's supposed receive message (xml) mtom/xop attachment. message body , attachment encrypted using separate keys. encryption algorithm used aes128-cbc. body base64 encoded , decrypts fine, attachment binary , has odd lengths (530 bytes, 527 bytes, etc). my question is , possible server messing in encryption? or possible produce aes128 output that's not multiple of 16? aes in cbc mode produce output multiple of 16 bytes. if aes used in ctr (counter) mode) produces output same length input.

javascript - JQuery matchHeight.js overlayed images -

i'm facing strange behaviour while using jquery matchheight.js. please take @ following print screen: overlayed images after running matchheight.js if hit f5, desired result comes up: correct layout after hitting f5 here code creates page: sdb = sdb + '<div class="items-container">'; $.each(json.parse(data.d), function (i, item) { sdb = sdb + '<div class="col-lg-3 col-md-3 col-sm-4 col-xs-6">'; sdb = sdb + '<span class="glyphicon glyphicon-heart iconcatalogoperacoes addtowishlist" aria-hidden="true" data-modelo="' + item.referencia + '" data-variante="' + item.variante + '"></span>'; sdb = sdb + '<div class="item">'; sdb = sdb + '<img class="img-responsive addtoshoppingcart imgcatalog" style="display:block;margin-left:auto;margin-right:auto;" src="' + item.imagem + '...

java - Identical fragments with different presenters -

i have activity 3 tabs: a, b & c. every tab, i’ve created fragment (-f) , presenter (-p). problem 3 fragments (a-f, b-f, c-f) same, presenters not. question how can avoid code duplicity? i’ve tried create basefragment , extend a-f, b-f, c-f, if i’m in a-f , happens c-f (like ui update), receive java.lang.nullpointerexception: attempt invoke virtual method 'void android.support.v7.widget.recyclerview.setvisibility(int)' on null object reference , because c-f @ destroyed (am right?) don't want create 3 same fragments same layouts. i've done similar , i've found using views lot simpler , less buggy. android fragment managers can exhibit unpredictable behavior @ times when executing various transactions. here's quick sample of how can work: youractivity extends activity { view a,b,c; @override protected void oncreate(bundle savedinstancestate) { = getlayoutinflater().inflate(r.layout.your_layout_id, null); b ...

Haskell : Error in split function -

i new @ haskell. want implement split function, splites list 2 parts: split 2 [1,2,3] → ([1,2], [3]) --means first part has length 2, second - length x-2 split 2 [1] → ([1], []) split :: int -> [a] -> ([a],[a]) split 0 x = ([], x) split n x = splith n x [] splith :: int -> [a] -> [a] -> ([a], [a]) splith n (x:xs) begin | n == 0 = (begin, xs) | otherwise = splith n-1 xs (x:begin) -- here error main = print(split 2 [1,2,3] ) but code not compile. error `couldn't match expected type ‘([a], [a])’ actual type ‘[a0] -> [a0] -> ([a0], [a0])’ relevant bindings include begin :: [a] (bound @ jdoodle.hs:6:17) xs :: [a] (bound @ jdoodle.hs:6:13) x :: (bound @ jdoodle.hs:6:11) splith :: int -> [a] -> [a] -> ([a], [a]) (bound @ jdoodle.hs:6:1) probable cause: ‘splith’ applied few arguments in first argument of ‘(-)’, namely ‘splith n’ in expression: splith n - 1 xs (x : begin)` what cause error ? ...

java - Re-train CoreNLP tagger model. Where cound I get CoreNLP train file -

i using corenlp tag word's part of speech in sentence. it's pretty awesome. word tagged inappropriately. know how train tagger model corenlp. problem couldn't find 3 files "train-wsj-0-18", "train-extra-english", "train-tech-english". how 3 files train corenlp tagger model add miss train rule , rebuild tagger model ? arch files "egw4-reut.512.clusters,-1,1" .thank much.

caching - When is module rendered in drupal? -

i newcomer in drupal, , want make custom module in drupal8. have developed module, there problems solve. the module displays parameter value when page containing module shown users. for example, connect http://localhost/drupal/?keyword=banana , module displays "banana". but after above, when connect http://localhost/drupal/?keyword=apple again, module displays "banana" too. in other words, module works when page containing module shown firstly , works wrong when connect secondly, thirdly , on. i have tested , build() method in module called once. so, think module rendered once when connect page , can't rendered after first. also, think can problem related cache, set admin/configuration/performance/cache "no-cache". i not sure possible display "apple" after "banana" displayed module. please me , let me know more details... thanks. there couple of possible solutions depending on constraints: disable ca...

database - Scaling Identity service in multiple regions -

we have user database used creating/updating users , identifying (reading) them. read more write. write around 1 million/day , read around 100+ million. can separate read , write, afaik need strong consistency. if start reading read replicas, consistent. there scenarios when user got created not available in read replica yet. or, user has updated information (name) , change not yet present in other regions.serving 1 region mean higher latency other regions. we using rdbms. netflix's active-active blog read. big-big change. importantly need change in mindset of team/organization. also, take lots of effort right. need have in place slow responses troubling business. thus, trying explore other options can may give breathing space , time think of actual implementation. as first step, planning have first level cache low ttl in different regions. reduce quite lot of reads. again consistent. second step have cache invalidation in place. reduce inconsistencies bit. again consi...

php - Laravel collection how to remove a specific key from all items? -

it sounded crazy simple me @ first can't find solution! here collection : collection {#433 #items: array:432 [ 0 => array:5 [ "word_id" => 12218 "name" => "ordered" "rank" => 12217 "is_real" => 1 "id" => 1 ] 1 => array:5 [ "word_id" => 12097 "name" => "one-dimensional" "rank" => 12096 "is_real" => 1 "id" => 2 ] 2 => array:5 [ "word_id" => 19679 "name" => "watery" "rank" => 19678 "is_real" => 1 "id" => 3 ] . . . but want : collection {#433 #items: array:432 [ 0 => array:5 [ "name" => "ordered" "id" => 1 ] 1 => array:5 [ "name" =...

How do I forbid my jupyter notebook to stop automatically? -

i run programme on jupyter notebook. set computer sleep mode , turn on later, notebooks browser seem die: [i 18:07:54.447 notebookapp] saving file @ /006_construct_daily_price_data_base.ipynb [i 18:11:55.437 notebookapp] saving file @ /006_construct_daily_price_data_base.ipynb [w 23:25:37.342 notebookapp] websocket ping timeout after 14526933 ms. i think issue "websocket ping timeout", guess after stop working on notebook while. stops. but don't want happen. want keep running without stopping unless tell to. should do? thanks

python - Generate stl mesh from csv -

i have csv file encodes elevation data of 9000x5000 resolution photo of dam, , want generate stl file can print on 3d printer. csv has 3 parameters: x , y , , z , x & y denote pixel location on photo , z elevation of topography @ pixel (x,y) . want 3d stl file of photo in question nooks, crannies, , hills denoted elevation data. attempted using python library numpy-stl , i'm realizing don't know enough stl files accomplish print job. information on how can make file, or on how stl files encode information remarkably helpful.

Gradle: use wildcard in jar name in classpath -

gradle: use wildcard in jar name in classpath buildscript { repositories { flatdir { dirs "foo/lib" } } dependencies { classpath name: 'bar-*-util' } } the bar version can version such bar-1.0-util.jar, bar-2.0-util.jar you can try add jars have in lib directory follows: dependencies { classpath filetree(dir: 'foo/lib', include: ['*.jar']) } or specific jars as: classpath filetree(dir: 'foo/lib', include: ['bar-*-util.jar']) and don't need specify flatdir repository in case.

Does Clarifai support object detection? -

that is, support detection , labeling of multiple objects/picture, including bounding box estimates? i don't see mention of it, of feedback apis support sending regions well. appears are, @ least, gathering data. clarifai suggests ask questions here, don't know if monitor this. had ask them question on email. here's response: we don't have system-wide object detection yet i'd love hear use case can send our research team. the following public models have in case interested in them: demographic, faces, celebrity, logo, focus

json - Python - How to copy all data out of an array -

currently exporting database firebase json coming out in array. [{"connectiontime": 19.23262298107147, "objectid": "01331oxpvt", "firmwarerevision": "201504270003 img-b", "deviceid": "edf02c74-6518-489e-8751-25c58f8c830d", "peripheraltype": 4, "updatedat": "2015-10-09t04:01:39.569z", "model": "bean", "hardwarerevision": "e", "serial": "serial number", "createdat": "2015-10-09t04:01:39.569z", "manufacturer": "punch through design"}, {"connectiontime": 0.3193170428276062, "objectid": "018mv1g6i8", "deviceid": "42635033-df3a-4109-a633-c3ab829be114", "peripheraltype": 2, "updatedat": "2015-12-08t04:20:41.950z", "createdat": "2015-12-08t04:20:41.950z"}] and error - start of array encounte...

javascript - Convert an image to ImageData (Uint8ClampedArray) -

Image
i have image example "img/myimage.jpg" convert uint8clampedarray format (as shown in image). for what? using library after long process converts images format, have others images need convert them on own same format. how can it? excuse ignorance var frames = animator.frames; var res_c = document.getelementbyid("result"); var res_ctx = res_c.getcontext('2d'); (var x = 0; x < frames.length; x++) { //***frames imagedata (uint8clampedarray)*** res_ctx.putimagedata(frames[x],0,0); console.log(frames[x]) gif.addframe(res_c,{copy:true,delay: 120}); } i need convert images in imagedata (uint8clampedarray) add others frames you can use image constructor, canvasrenderingcontext2d.drawimage() , canvasrenderingcontext2d.getimagedata() create imagedata object image file. const canvas = document.queryselector("canvas"); const ctx = canvas.getcontext("2d"); const width = 300; const height = 311; const image = new ...

python IndexError list index out of range + how to break a while then also restart the while statement -

please swipe card: chend151 traceback (most recent call last): file "c:\attendance\attendance 3.py", line 42, in <module> clcode = datalist[period][d] indexerror: list index out of range i error when running code, can't seem find problem :/ my code: import csv import datetime import os class_ = 'n004' while (1): #day & time checker format = "%h%m%s" format_ = "%h%m" today = datetime.datetime.today() s = today.strftime(format) #time in 24hour s2 = today.strftime(format_) d = datetime.datetime.today().weekday() #day of week (0-5) period = -1 #if scan outside of dedicated periods defaults unknown period` #period checker if "084500" < s < "094000": period = 0 if "094000" < s < "104000": period = 1 if "112000" < s < "121500": period = 2 if "121500" < s <...

javascript - ng-show/ng-hide doesn't work with lazy load of controller -

i loading state oclazyload. controller of state has code in start. $scope.test = {show: false}; and in html view have this <button class="btn" ng-show="test.show">hey there</button> now when view loaded button not hidden. if log {{test.show"}} shows false. not applying button. i tried execute controller when view loaded $scope.$watch('$viewcontentloaded', function() { $timeout(function() { },0); }); but nothing working. while ng-show/ng-hide not working ng-if works perfectly. not able understand why ng-show doesn't work , ng-if works. need use ng-show/ng-hide try it. <button class="btn" ng-hide="!test.show">hey there</button>

IntelliJ 2017.2 stuck on `Loading archetype list` for `New Project` > `Maven` -

Image
when choosing create new project option after launching intellij 2017.2, endlessly spinning wheel on maven tag, saying “loading archetype list…”. any way maven archetype? i hit on 2017.2.3 (just updated now) on fedora 24 (oops time upgrade) the immediate solution change maven settings (file > settings > maven) use on-machine oracle jdk 1.8.0_144 instead default "internal jre" 1.8.0_152. btw, importer uses jvm option -xmx768m default. and go on...

php - Expiration of fat-free framework sessions -

how set fat-free framework session expire after duration, 5 minutes, of inactivity? web app keeps open until user logouts out. first of need know php session garbage collector behaviour. default, triggers randomly on every 100th request (for performance purposes), looks expired session files (default: 1440s) , remove them. also need know linux distributions (e.g debian) disable garbage collector , replace own cron job. you start checking php configuration: foreach (['gc_probability','gc_divisor','gc_maxlifetime'] $k) echo $k,'=',ini_get("session.$k"),'<br>'; if gc probability 0, sessions files won't ever removed (or removed cron job on debian). if not 0, low (e.g 1/100), sessions files removed time (try refresh page 100 times). in theory, set probability 1 (gc_probability=gc_divisor=1) have sessions files removed expired. work on small apps low traffic, affect performance on bigger apps (imagine gc...

lucene - SOLR | De-Duplication | Remove duplicate records based on their status -

i indexing 2 different model same data different status. eg: scenario -1 {model: "aaaa", name: "abc", status: "t"} {model: "bbbb", name: "abc", status: "a"} expected output {model: "bbbb", name: "abc", status: "a"} scenario -2 {model: "aaaa", name: "abc", status: "a"} {model: "bbbb", name: "abc", status: "t"} expected output {model: "aaaa", name: "abc", status: "a"} scenario -3 {model: "aaaa", name: "abc", status: "a"} {model: "bbbb", name: "abc", status: "a"} expected output {model: "aaaa", name: "abc", status: "a"} either one. scenario -4 {model: "aaaa", name: "abc", status: "t"} {model: "bbbb", name: "abc", status: "t"} expec...

c# - Change Materials Element 0 of Mesh Renderer to a selected image as a shader -

as unity not provide triangle object, need create c#. after adding mesh filter , mesh renderer c#, object cannot add such components again in scene. i can change color of object created. now, need change materials element 0 of mesh renderer selected image shader. i have tried resources.load () , shader.find () don't work. how can in c#? please explain code. here code triangle.cs using system.collections; using system.collections.generic; using unityengine; public class triangle : monobehaviour { public vector3 center; public float x1, y1, x2, y2, radius; public string color; // use initialization void start () { gameobject.addcomponent<meshfilter>(); gameobject.addcomponent<meshrenderer>(); mesh mesh = getcomponent<meshfilter>().mesh; material mat = getcomponent<renderer>().material; spherecollider sc = gameobject.addcomponent(typeof(spherecollider)) spherecollider; sc.c...

"Transport-level Error" using SQL Server Stored Procedure and Cursor -

i have created stored procedure auto follow users , procedure on server. in database, there 20,000+ users. store procedure uses cursor . i getting error a transport-level error has occurred when receiving results server. (provider: tcp provider, error: 0 - existing connection forcibly closed remote host.) " this stored procedure . declare @useridf int declare @userid int declare csrautofollow cursor select top (1) userid dbo.users isfuser = 1 order newid() open csrautofollow fetch next csrautofollow @useridf while @@fetch_status = 0 begin declare csrauto cursor select userid dbo.users isfuser null open csrauto fetch next csrauto @userid while @@fetch_status = 0 begin ...

css3 - how to set image using css ( background-image property)? -

i need know how set background image in css using background-image property. the image cannot show in browser. don not know reason file image path desktop should use ../ use set nothing appear .can know please set problem as understand code follows .copy{ background-image: url("../sample/wp-content/uploads/gif/banner_12.png") right center no-repeat; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover; } in background-image declaration should include image url. instead include right center background-position , no-repeat background-repeat either write styles separately so .copy{ background-image :url("../sample/wp-content/uploads/gif/banner_12.png") background-repeat:no-repeat; background-position:right center; background-size: cover; } optionally include background-attachment ( scroll default) , background-color ( transparent default ) either write them in...

java - How is sortingPtr variable getting updated in the code below? -

need understand how sortingptr variable getting updated. public class mergesortedlinkedlists { public static node mergelinkedlists(node head1, node head2, node mergedhead){ node sortingptr = null; if(head1 == null && head2 != null){ return head2; } if(head1 == null && head2 == null){ return mergedhead; } while(head1 != null && head2 != null){ system.out.println("head1.data - " + head1.data); system.out.println("head2.data - " + head2.data); system.out.println("sortingptr - " + sortingptr); /*while(sortingptr != null){ system.out.print("sortingptr.data - " + sortingptr.data + " "); sortingptr = sortingptr.next; }*/ system.out.println(); if(head1.d...

javascript - Hide all the rows after a specific row -

i'm developing asp.net mvc application c#, .net framework 4.7 , jquery 3.1.1. i have view table: <table id="mytable"> <tbody> <tr> ... </tr> <tr> ... </tr> <tr> ... </tr> <tr id="row_x"> ... </tr> <tr> ... </tr> <tr> ... </tr> <tr> ... </tr> ... i want hide rows under row <tr id="row_x"> ... </tr> don't know how access rows. need set id of them? i've thought surround them <div> don't think idea or possible. you can use jquery method nextall() $("#row_x").nextall().hide(); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <table id="mytable"> <tbody> <tr> <td>row 1</td> </tr> <tr> <td>row 2</td> </tr...

julia lang - How to use type using parametric typing -

i trying use type using parametric typing error. julia version 0.6. code: type basicrbc{t <: real} a::t b::t vce::matrix{t} matrix1::matrix{t} c::t output::t cons::t vg::vector{t} end error: invalid redefinition of constant basicrbc a , b , c , output , cons float64 matrix1 matrix vg array vce [ 0.9 0.8 0.1]

automation - Can not access to elements in an iframe having different domain on mobile safari -

i need switch iframe2 , inside iframe1 on web page. can switch iframe2 on window chrome, it's impossible on mobile safari. below script: unselect frame select frame ${iframe1} -> pass select frame ${iframe2} -> fail on mobile safari (still pass on window chrome) it seems because of cross-domain issues on mobile safari. has encountered this, , how manage access elements in iframe of different domain on mobile safari? please let me know. thank you.

dotnetbrowser - Handling file being downloaded from new browser window other than current browser window -

Image
i using dotnetbrowser 1.11 , trying download file on button click website , have assigned downloadhandler browser. allowdownload event not fire after button click. have noticed on manual button click new browser window opens , save dialog pops up. please assist how handle such file downloads new browser window other loaded browser window. the download handling behavior depends on contents of loaded web page , can different. websites intentionally open popup service download request. such popup ends being blank. the way workaround behavior implement custom popup handler handle these cases expected application.

arduino - esp8266 hangs after 4th client is created -

i using mit app inventor send data esp8266 , depending upon performing application on arduino-uno. new esp8266 development here happens creating 80 port web-server.after sending string data esp8266. , among "fan on","fan off","light on" or "light off". if sending data 1 one delay.it creates client , closes client,which fine. but when send 2 or more data string simultaneously,it create client 0,1,2,3 respectively not closing every connection.and after esp8266 hangs , not respond new connection. here code #include <softwareserial.h> #define timeout 1000 // ms #define led 5 #define motor 9 softwareserial myserial(7, 6); // rx, tx void setup() { pinmode(8,output); pinmode(motor,output); pinmode(led, output); //pinmode(button, input); serial.begin(38400); digitalwrite(8,high); myserial.begin(38400); delay(2000); seria...

PHP how to extract keys names and values from associative array for mysql query -

hello i've tried both these questions solutions (final goal added @ bottom) insert array - pdo binding values arrays? but don't expected variables content in $fields , $newdata so kindly print here var_dump , cast kindly ask support. my array derivate html table for simplicity in learning experiment i'm working dummy table of 5 fields, see are: selected , user_id , user_name , user_company , user_email . have inserted 2 rows of values. the table content posted json.stringify. here results using usual print_r ( $arr ); i can see output array ( [0] => array ( [selected] => [user_id] => 3 [user_name] => nome3 [user_company] => azien3 [user_email] => email3 ) [1] => array ( [selected] => 1 [user_id] => 6 [user_name] => nome6 [user_company] => azien6 [user_email] => email6 ) ) next try apply code of 2 above questions 24 $fields = implode(",", array_keys($arr)); 25 $newdata = "'" . i...

eclipse - what's the meaning of green circle with 'a' in front of prompting in this pic? -

Image
when used alt + '/' in eclipse ,i don't understand symbol , char in front of method name . example : ·a add(string e) : boolean - colletion ·d foreach(...) : void ·a or ·d mean? it indicates abtract ("a") public method (green circle). "d" indicates default method. you can see eclipse symbols mean here .

java - Function to change background color crashing app -

this funcion crashing app , im not sure why. public void whileloopforchange(){ while (gamerunning = true){ view someview = findviewbyid(r.id.screen); final view root = someview.getrootview(); random rand = new random(); final int value = rand.nextint(15); if(lvl<10){ new timer().schedule(new timertask() { @override public void run() { if(value == 1){ root.setbackgroundcolor(contextcompat.getcolor(mainactivity.this, r.color.red)); currentcolor = "red"; }else if(value == 2){ root.setbackgroundcolor(contextcompat.getcolor(mainactivity.this, r.color.pink)); currentcolor = "pink"; }else if(value == 3){ root.setbackgroundcolor(contextcompat.getcolor(mainactivity.this, r.color.orange)); ...