Posts

Showing posts from June, 2011

java - Suppress HtmlUnit Apache logging -

i want suppress logs of apache's httpclient when using htmlunit. i'm using htmlunit 2.27 jdk logging. everytime explicitly set level of 'org.apache.http.wire' off, htmlunit resets level null. for example: //turn on logging for(java.util.logging.handler item : logger.getlogger("").gethandlers()) { item.setlevel(java.util.logging.level.all); } logger.getlogger("").setlevel(java.util.logging.level.fine); //suppress apache logs java.util.logging.logger.getlogger("org.apache.http.wire").setlevel(java.util.logging.level.off); //closeablehttpclient httpclient = httpclients.createdefault(); (new webclient()).getpage("https://publicobject.com/helloworld.txt"); system.out.println("org.apache.http.wire=" + java.util.logging.logger.getlogger("org.apache.http.wire").getlevel()); this returns: org.apache.http.wire=null if use apache httpclient directly or reference apache httpclient before htmlunit (i.e...

Send Emails via Excel VBA one at a time -

i using ms excel , outlook 2013. trying automate excel spreadsheet sends 5 emails specified address using outlook. the trick want each message display 1 @ time , move on next message when user either hits send or closes message. here have far: sub send_emails() dim outapp object: set outapp = createobject("outlook.application") dim outmail object: set outmail = outapp.createitem(0) 'send email outmail .to = "john.doe@mycompany.com" .subject = "this subject" .body = "this message" .display end on error resume next: outmail = nothing outapp = nothing end sub sub send_five_emails() = 1 5 'send email 5 times call send_emails next end sub the problem code displays 5 message windows @ once. there way make close event of 1 message window trigger displaying of next one, make them appear 1 @ time? i appreciate help. use .display (true) the exp...

What is the best way to implement the adaptor pattern in c++ -

i have seen possible use inheritance, such as: class { }; class legacy{ }; class b : public a, private legacy { }; but weird me inherit public , private 2 different classes. there alternative way implement adapter pattern? generally better use composition instead of inheritance adapters (and many other cases too): class b : public { public: /* implementation of abstract methods of calls legacy */ private: legacy m_leg; };

Pseudo-3D Computer Graphics in PHP -

what i'm asking here if have thought can done. sounds feasible, attempts far have been fruitless. what want create animation of rotating 3d cube using php. after discovering imagefilledpolygon function began think creating pseudo-3d shapes, , new idea revolves around page switching between multiple frames of rotating cube make it's spinning. below 2 (albeit crude) frames of said cube, doesn't switch between 2 images @ all. loads image under else, session variable hasn't been set yet , stays that. session_start(); while($toggle=1) { if(isset($_session['switch'])) { $image = imagecreatetruecolor(2000,1000); $col_poly = imagecolorallocate($image,0,0,200); $col_poly2 = imagecolorallocate($image,0,200,0); imagefilledpolygon($image,array( 125,0, 375,0, 375,250, 125,250, ), 4 , $col_poly); imagefilledpolygon($image,array( 125,250, 375,250, 375,500, 125...

javascript - Getting old and new data in an array on serialport - Arduino uno, nodejs, socket.io and sensor -

i have attached sensor arduino , trying pull data using serial port nodejs. using make graph. data pushed serial port, when printed on terminal looks this: 1,2 1,2 1,3 1,2 1,3 1,4 1,2 1,3 1,4 1,5 as can see previous data pushed again :/ dont want that expected output 1,2 1,3 1,4 1,5 1,6 format here : <value 1> , <value 2> later splitting these incoming data , push 2 different datasets, in-order graph this: http://www.chartjs.org/samples/latest/charts/line/multi-axis.html code - nodejs var serialport = require("serialport"); var serialport = new serialport("com4"); var received = ""; serialport.on('open', function(){ console.log('serial port opend'); serialport.on('data', function(data){ received += data.tostring(); console.log("incoming data: " + received); nsp.emit('live-data', received); }); }); serial output code arduino void serialoutput(){...

javascript - How do I get the same output using the closure concept -

this code displays helper text whenever user focuses on of input fields. issue want write code having same functionality using closure concept. idk if code uses closure concept, if please tell me , if doesn't please tell me how do using closure concept. var allinputs = document.queryselectorall('.form-container p input:not([type="submit"])'); (var = 0; < allinputs.length; i++) { var inputfield = allinputs[i]; var inputfieldid = inputfield.id; var getinput = document.getelementbyid(inputfieldid); getinput.addeventlistener('focus', helpernote, false); } function helpernote(e) { var helpernode = document.queryselector('.form-container #helpernote'); var helpernote = document.createtextnode('please input ' + e.target.name); //console.dir (helpernote); helpernode.textcontent = helpernote.data; helpernode.style.visibility = "visible"; } <form method="post"> <div cla...

r - how can I find percentage of similar string within and across various columns -

Image
i have data below df<-structure(list(v1 = structure(c(5l, 1l, 7l, 3l, 2l, 4l, 6l, 6l ), .label = c("cpsiaaaiaavnalhgr", "dlnycfsgmsdhr", "fpehelivdpqr", "iadpdavkpddwdedapsk", "lwadhgvqacfgr", "wgeagaeyvvestgvfttmek", "yyvtiidapghr"), class = "factor"), v2 = structure(c(5l, 2l, 7l, 3l, 4l, 6l, 1l, 1l), .label = c("", "cpsiaaaiaavnalhgr", "gcitiigggdtatccak", "hvgpgvlsmanagpntngsqffictik", "llelgpkpevaqqtr", "mvccsawsedhpicnlftcgfdr", "yyvtiidapghr"), class = "factor"), v3 = structure(c(4l, 3l, 2l, 4l, 3l, 1l, 1l, 1l), .label = c("", "avcmlsnttaiaeawar", "dlnycfsgmsdhr", "fpehelivdpqr"), class = "factor")), .names = c("v1", "v2", "v3"), class = "data.frame", row.names = c(na, -8l)) i want know , how many of strings...

android - What is the difference between gravity="center" and textAlignment="center" and centralHorizontal="true" -

i have question layout arrangement in android. seems me gravity="center" , textalignment="center" same thing? how centralhorizontal="true" ? for practicality purposes, textalignment , gravity equivalent, except textalignment member of view class , gravity member of textview class. layout_centerhorizontal defines how view should placed in relation it's parent view, while former 2 deal how view should lay out it's subviews.

c - Why does free work like this? -

given following code: typedef struct tokens { char **data; size_t count; } tokens; void freetokens(tokens *tokens) { int d; for(d = 0;d < tokens->count;d++) free(tokens->data[d]); free(tokens->data); free(tokens); tokens = null; } why need extra: free(tokens->data); shouldn't handled in loop? i've tested both against valgrind/drmemory , indeed top loop correctly deallocates dynamic memory, if remove identified line leak memory. howcome? let's @ diagram of memory you're using in program: +---------+ +---------+---------+---------+-----+ | data | --> | char * | char * | char * | ... | +---------+ +---------+---------+---------+-----+ | count | | | | +---------+ v v v +---+ +---+ +---+ | | | b | | c | +---+ +---+ +---+ ...

xml - Xquery: Find the Makers such that every PC they produce has a price no more than 100 -

i'm trying path conditions "find makers such every pc produce has price no more 100" , "find names of makers produces @ least 2 pc’s speed of 3 or more". i'm using data pasted below. i'm little lost , love example on how carry out. with data: <?xml version="1.0" encoding="utf-8"?> <products> <maker name="a"> <pc model="1001" price="2114"> <speed>2.66</speed> <ram>1024</ram> <harddisk>250</harddisk> </pc> <pc model="1002" price="995"> <speed>2.10</speed> <ram>512</ram> <harddisk>250</harddisk> </pc> <laptop model="2004" price="1150"> <speed>2.00</speed> <ram>512</ram> <harddisk>60</harddisk> <screen>13.3</...

c++ - Clear terminal every second but leave minutes -

i have seconds , minute counter, similar timer. however, cannot number of minutes stay on screen. int main() { int spam = 0; int minute = 0; while (spam != -1) { spam++; std::cout << spam << " seconds" << std::endl; sleep(200); system("cls"); //i still want system clear seconds if ((spam % 60) == 0) { minute++; std::cout << minute << " minutes" << std::endl; } //but not minutes } } system("cls") clear screen, each iteration of while loop, whereas print minute every minute or so . you need print minute every iteration: while (spam != -1) { spam++; if (minute) std::cout << minute << " minutes" << std::endl; std::cout << spam << " seconds" << std::endl; sleep(200); system("cls"); i...

c++ - Indexing into CHOLMOD dense vector array -

i have cholmod_dense data structure: cholmod_dense* ex = cholmod_l_solve(cholmod_a, l, b, &com); and want extract values , copy them variable. means need index double array , copy values over. for (int k=0; k<ncols; k++) t_x[k]=((double*)ex->x)[k]; which compiler ok segmenation fault. or think should able do: double* e_x =(double*)ex->x; (int k=0; k<ncols; k++) t_x[k]=*e_x[k]; but compiler dislikes this: error: invalid type argument of unary ‘*’ (have ‘double’) (int k=0; k<ncols; k++) t_x[k]= *e_x[k]; according cholmod userguide: cholmod dense: dense matrix, either real, complex or zomplex, in column-major order. differs row-major convention used in c. dense matrix x contains • x->x, double array of size x->nzmax or twice complex case. • x->z, double array of size x->nzmax if x zomplex. so should able grab ex->x , index double array, cannot without getting segmentation fault. can me out? the cholmod library writ...

amazon web services - Where can I find the IP address or CIDR notation of my Elastic Beanstalk app? -

Image
my web application deployed on aws elastic beanstalk , supposed access mongodb database deployed on mongodb atlas. in order make database queries possible, have whitelist ip addresses of servers accessing database: the problem can find ip address of app. where can find ip address of app? you cannot control public ip addresses of elastic beanstalk instances cannot whitelist them hosted mongodb provider. your best option use nat egress , associate static ip(s) (elastic ip) nat instance(s). here's example .

javascript - react router relative link does not link properly -

so i'm using npm package react-router-relative ( https://www.npmjs.com/package/react-router-relative ) doesn't seem switching url properly. here's links looks like: <link to='items' classname="btn btn-default submission-button">items</link> <link to='maps' classname="btn btn-default submission-button">maps</link> here's routing: <route path="submissions" component={submissionpage}> <route path="items" component={itemsubmissions}></route> <route path="maps" component={mapsubmissions}></route> </route> what happens first time click on link it'll link i.e. http://localhost:3000/#/account/submissions/items but when hit again it'll go to: http://localhost:3000/#/account/submissions/items/items at point end part switch rather append, throws error. however, i'm trying make part right after 'submission'...

css3 - Creating design using css -

Image
how can create design react-native view component background using css (style)? i want view 2 have green background little curve on top meets top right in center. using borderradius did not help. height , width top corners being cut off not same in diagram. using borderradius reduces same amount of height , width corner not product below background. i used border-radius: 70%/100px 100px 0 0; attain similar type of curve in figure. here full code: html <body> <div id="white"> <div id="view1"> <div id="text1"> view 1 </div> </div> <div id="view2"> <div id="round"> <div id="text2"> view 2 </div> </div> </div> </div> </body> css #white { background-color: white; }...

Android how to parse json into listtview inside a class that extends fragment -

i trying fragment there listview inside , trying populate listview using json. have 1 error , dont know put single error have. error says unreachable statement, when put getjson() below } says invalid method declaration here code listview inside fragment. there error pointing @ getjson(); below rootview. thanks public class news extends fragment { private listview lv; private string json_string; @nullable @override public view oncreateview(layoutinflater inflater, @nullable viewgroup container, @nullable bundle savedinstancestate) { view rootview = inflater.inflate(news, container, false); lv = (listview) rootview.findviewbyid(r.id.listview3); return rootview; getjson(); } private void showresult(){ jsonobject jsonobject = null; arraylist<hashmap<string,string>> list = new arraylist<>(); try { jsonobject = new jsonobject(json_string); jsonarray res...

Why html is so popular, is there any alternative? -

i can not find alternative of mark language. there alternative of html? every other language there option choose. if alternative mean web browsers can understand, not unless count xhtml , svg. if mean alternatives can use mark things up, yes, there many: https://en.wikipedia.org/wiki/list_of_markup_languages https://en.wikipedia.org/wiki/general-purpose_markup_language https://en.wikipedia.org/wiki/list_of_document_markup_languages https://en.wikipedia.org/wiki/list_of_content_syndication_markup_languages you idea…

html - How to contourn elements with a line using canvas -

Image
i'm trying contour points using line, in theory 1 line connects , in different ways. i'm creating 2 lines , adding half-circle in begining , @ end of lines, covers first option below, have define every pixel , in application user able define points outlined. this code i've done i'm not sure if best way: https://jsfiddle.net/gng0ush5/ <canvas id="mycanvas" width="646" height="350" style="border:1px solid #d3d3d3;"></canvas> <script> var c = document.getelementbyid("mycanvas"); var ctx = c.getcontext("2d"); ctx.beginpath(); ctx.moveto(150, 118); ctx.lineto(290, 170); ctx.linewidth = 10; ctx.strokestyle = 'red'; ctx.stroke(); ctx.moveto(145, 180); ctx.lineto(260, 228); ctx.stroke(); ctx.moveto(150, 120); ctx.ar...

multithreading - why Redis is single threaded(event driven) -

i trying understanding basics of redis. 1 that keep coming everywhere is, redis single threaded makes things atomic.but unable imagine how working internally.i have below doubt. don't design server single thread if io bound application(like node.js),where thread got free request after initiating io operation , return data client once io operation finished(providing concurrency). in case of redis data available in main memory,we not going io operation @ all.so why redis single threaded?what happen if first request taking time,remaining request have keep waiting? tl;dr : single thread makes redis simpler, , redis still io bound. memory i/o. redis still i/o bound. when redis under heavy load , reaches maximum requests per second starved network bandwidth or memory bandwidth, , not using of cpu. there commands won't true, use cases redis severely i/o bound network or memory. unless memory , network speeds orders of magnitude faster, being single threaded not is...

python [Errno 2] No such file or directory: -

i learn python on ubuntu system. there errors shen tried read file . fw = open(outfile,"a") outfile = 'sougou/reduced/c000008_pre.txt' ioerror: [errno 2] no such file or directory: 'sougou/reduced/c000008_pre.txt' without additional information, can see 2 possibilities here. the file trying access doesn't exist. the path file not correct relative location calling python script from. try providing absolute path file, , see if fixes issue: outfile = '/some/path/here/sougou/reduced/c000008_pre.txt'

What change in visual studio 2015 in method call public sub from form other? -

i have use vs 2010 build application when upgrade vs 2015 method not work: in form1 have public sub: public sub showdatabase() .... end sub in form2 call: .... form1.showdatabase() .... it not work when @ form2 call public sub. how fix this. thankyou!

python - OpenCV: Isolating licence plate characters for OCR -

Image
i attempting automatically read license plates. have trained opencv haar cascade classifier isolate license plates in source image reasonable success. here example (note black bounding rectangle). following this, attempt clean license plate either: isolating individual characters classification via svm. providing cleaned license plate tesseract ocr whitelist of valid characters. to clean plate, perform following transforms: # assuming 'plate' sub-image featuring isolated license plate height, width = plate.shape # enlarge license plate cleaned = cv2.resize(plate, (width*3,height*3)) # perform adaptive threshold cleaned = cv2.adaptivethreshold(cleaned ,255,cv2.adaptive_thresh_gaussian_c, cv2.thresh_binary,11,7) # remove residual noise elliptical transform kernel = cv2.getstructuringelement(cv2.morph_ellipse,(3,3)) cleaned = cv2.morphologyex(cleaned, cv2.morph_close, kernel) my goal here isolate characters black , background white while removing noise. using me...

reactjs - How to render Multiple NavBar in react -

i new react. trying render multiple navbar in page 1 beneath other. navbar code looks following import react, { component, proptypes } 'react'; import { navbar, nav, navitem } 'react-bootstrap'; import { linkcontainer } 'react-router-bootstrap'; import {connect} 'react-redux'; import * actioncreators '../action_creators'; import subnav './subnavbar.jsx'; class mainnav extends component { constructor(props) { super(props); this.state = { loggedin: 1, }; } render() { return ( <div> <navbar inverse fixedtop collapseonselect> <navbar.header> <navbar.brand> <a href="/">sportsspot</a> </navbar.brand> <navbar.toggle /> </navbar.header> <n...

javascript - How do I solve 'Uncaught TypeError: Cannot use 'in' operator to search for 'length' in' and get my data to show up -

when make ajax request iterate on multiple arrays uncaught typeerror: cannot use 'in' operator search 'length' in $.get(url).done(function(data){ var data = json.stringify(data); var reviews = []; var output = '<div>'; $.each( data, function( k, v ) { $.each( data[k].mealreviews, function( key, value ) { output += '<div class="row">'; output += '<div class="col-sm-3 col-sm-offset-1 col-md-3 col-md-offset-1"><img class="img-thumbnail" src="images/' + value.accounttype +'.png" width="200" height="200" alt="">'; output += '<p>by <a>'+ value.username +'</a> '+ value.reviewdate +'</p></div>'; output += '<div class="col-sm-8 col-md-8"><div class="row">'; output += '<h2>'+ value.rating +'<span class="g...

html - R markdown table of content conditional highlighting/coloring -

i trying create floating (or static) table of content (toc) in rmarkdown rows can have different colors depending on given condition. may assume each row title of test. each test can return either -1 (makes row red), 0 (makes row orange) or 1 (makes row green). want toc visually self-explanatory based on different colors rows have. have following in rmarkdown. not sure how custom css should purpose. appreciate help. output: html_document: number_sections: yes toc: yes toc_float: true theme: cerulean highlight: tango smart: true fig_width: 6 fig_height: 6

ms office - Can a Microsoft Word Web Add-In share ribbon customizations with a VSTO Add-In? -

i have made word vba , vsto add-ins share ribbon customizations in past using code this: <customui xmlns="http://schemas.microsoft.com/office/2009/07/customui" onload="ribbon_load" xmlns:nsmvsample="sample namespace"> <ribbon> <tabs> <tab idq="nsmvsample:tabaddins" label="sample tab"> <group idq="nsmvsample:mygroup" label="sample group"> <button id="newdocument" label="new document" imagemso="filenew" size="large" onaction="newdocument_click" supertip="opens select template dialog create new document."/> </group> </tab> </tabs> </ribbon> </customui> i'm getting know newer office web add-ins. i'd introduce them solution moving commands 1 @ time vsto office javascript. can vsto add-in share ribbon customisations newer office web...

How to install python packages using pip on go daddy linux hosting (don't have root access) -

could tell me how install packages using pip on go daddy linux hosted server. doesn't provide root access. when try install python package pip install numpy it shows: -bash: pip: command not found it giving python 2.6.6 , location is: /usr/bin/python is there hack it? you don't have pip installed. install pip run this easy_install --user pip this install pip you, without root access. if don't have 'easy_installed' installed, can run install pip without it wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py --user pip installed in .local/bin , access use .local/bin/pip install numpy to add pip path, access pip install numpy execute command: echo "path=\$path:~/.local/bin" >> ~/.bashrc and this: source ~/.bashrc

oracle11g - Getting ORA-06512: at "SYS.DBMS_ISCHED", line 124 and ORA-06512: at "SYS.DBMS_ISCHED", line 124 error -

i trying schedule job oracle 11g below getting error. begin sqlplus / sysdba sys.dbms_scheduler.create_job( job_name=>'testjob', job_type=>'plsql_block', job_action=>'begin greetings; end;', start_date=>systimestamp, repeat_interval => 'byminute=0; bysecond=5;'); end; / the error is error report: ora-27465: invalid value byminute=0; bysecond=5; attribute repeat_interval ora-06512: @ "sys.dbms_isched", line 124 ora-06512: @ "sys.dbms_scheduler", line 271 ora-06512: @ line 2 27465. 00000 - "invalid value %s attribute %s" *cause: invalid value provided specified attribute. *action: reissue command using valid value attribute. initially thinking permission issue gave below permission grant create job system; grant execute on system.greetings public; could identify problem? everything in message. repeat interval wrong. check calendar syntax . from documentation. r...

linux - C++ - shared library liblog4cpp.so.4 not found -

i tried run program requires log4cpp, got following error when try run program error while loading shared libraries: liblog4cpp.so.4: cannot open shared object file: no such file or directory i have set library path in $ld_library_path , these files in /usr/local/lib directory: liblog4cpp.a liblog4cpp.so liblog4cpp.so.5.0.6 liblog4cpp.la liblog4cpp.so.5 pkgconfig what problem here ? thanks! use ldd [program name] see what's loaded (assuming on unix system since use ld_library_path).

php - Convert Mysql query to Codeigniter -

i need bit of help... trying convert mysql query codeigniter, not working... mysql: select users.email, transactions.id, transactions.type, transactions.status, transactions.sum, transactions.created, transactions.title transactions, users users.id=transactions.user_id , transactions.type='winning_claim' , date(transactions.created)=date(subdate(now(),1)) codeigniter: ` $this->db->select('users.email, transactions.id, transactions.type, transactions.status ,transactions.sum, transactions.created, transactions.title'); $this->db->from('transactions'); $this->db->join('users', 'users.id = transactions.user_id'); $this->db->where('transactions.type', 'winning_claim'); $this->db->where('date(transactions.created)', 'date(subdate(now(), 1))'/*, false */); ...

xaml - how to change button background color in c# -

how can change button background color programatically in windows phone application. here xaml code. <style targettype="button" x:key="tabbuttonlast"> <setter property="foreground" value="navy"/> <setter property="background" value="green" /> <setter property="template"> <setter.value> <controltemplate targettype="button"> <border cornerradius="15,15,15,15" background="green" > <contentpresenter x:name="contentpresenter" horizontalalignment="center" verticalalignment="center"/> </border> </controltemplate> </setter.value> </setter> </style> <button name="btnnext" style="{staticresource tabbuttonlast}...

Unable to loop through a list of dict in python -

i have dict follows: { u'has_more': false, u'is_limited': true, u'latest': u'1501149118.071555', u'messages': [ { u'text': u'--sharp 1.9 dm\n--modifying , testing dm script bypassing existing sonumber validation , add line items', u'ts': u'1501149054.047400', u'type': u'message', u'user': u'u0hn06zb9'}, { u'text': u'-- support engineering on licensing infra upgrade 3.6\n - created new key qa on current 3.5 ubuntu 12 instance\n - added key instance , created ami , shared qa\n - short discussion navin on same', u'ts': u'1501148934.002719', u'type': u'message', u'user': u'u02rrqjg1'}, { u'inviter...

linux - 2003, "Can't connect to MySQL server on {IP} (111) -

i have problem mysql connection net. appears time time, after few hours of correct work. mysql works on linux debian, on port 44xx (not 3306) on ip available outside. through 3 routers (2 forward port , 1 dmzone). after few hours error occurs: 2003/111 error . when try: telnet {ip} 44xx trying {ip}... telnet: unable connect remote host: connection refused netstat -nat |grep tcp 0 0 0.0.0.0:44xx 0.0.0.0* listen service mysql stop/start doesn't help only reboot entire system... after reboot few hours ok, , again... i lost ideas how solve problem, please me :-) situation occours, after problem connection via wifi between 2 of routers on trace of internet query. there way fit other reboot system? enter image description here

xml - Validate web.config file using xsd -

Image
i've build small xslt command line utility perform .config file changes on build server. i'm looking @ adding validation using dotnetconfig.xsd prevent invalid xml. can find file in visual studio installation directory not on build server. i searched online if schema somewhere public vs version cannot find (vs 2017). how should solve problem?

Acumatica Test Framework: Time out Error -

Image
we have been trying use acumatica test framework unfortunately not managing our tests run correctly. we have followed documentation step-by-step set test accordingly. when run test, firefox starts , log-in page loading correctly. username , password automatically entered, company. login-page completes resulting in error. the error 'timed out waiting waitforcallbacktostart condition within specified timeout: 500ms' it seems test not recognise log-in successful. think managed identify piece of code checks whether log-in successful: "try\r\n{\r\n var win = window == window.top || !window.top.frames['main'] ? window : window.top.frames['main'];\r\n if (win.document.activepanel && win.document.activepanel.getinnerwindow()) win = win.document.activepanel.getinnerwindow();\r\n if (win.px_callback && (win.px_callback.waitcallback || win.px_callback.pendingcallbacks.length)) return true;\r\n else if (win.px_all) for(var item i...

excel vba - Filter and copy the data to new worksheet -

i want filter data , paste new sheet including first row (title). have below code copies data, not title. copy title along filtered data using vba: sub macro1() 'suppose want filter data in columna & column b of sheet1. range("a1").entirerow.insert 'find lastrow dim lastline long lastline = columns(1).find("*", , , , xlbycolumns, xlprevious).row 'add filter range("a:l").autofilter field:=2, criteria1:=9701 'copy filtered data. range("a1:l" & lastline).specialcells(xlcelltypevisible).copy 'paste sheet2 ws_count = activeworkbook.worksheets.count set ws = sheets.add(after:=sheets(sheets.count)) sheets(sheets.count).range("a1").pastespecial call filter end sub

java - MockMvcResultMatchers.jsonPath number -

i have serialized zoneddatetime unix timestamp check if serialization worked. therefore did following: mockmvc.perform(get("/anypath/")) .andexpect(jsonpath("$.time", is(time.toepochsecond()))); but check fails because timestamp serialized 9 digits after dot. ie 1824379112.000000000 , not seem match w1starttime.toepochsecond() . tried convert value handed on is() function serveral different types including string, bigdecimal, double, double, etc. what have match serialized number?

css - HTML site doing weird optimization once published? -

Image
i published site earlier today , noticed few things different when , running. coded looked like and looked when pulled site on phone there few things wrong when pulled on computer, making me question if these optimization problems.... i'll leave code below if can me keep aspects of site in 1 place no matter viewing device amazing! html index code <!doctype html> <head> <title>p2 fitness company</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <center> <div id = "headerbg"></div> <div class = "header"> <h1>free pdf 7 tips boost <br>your progress in gym</h> </div> <div id = "logo"> <img src = "img/p2fitnesstransparent.png" width = "350px" height = "150px"> </div...

How to Redirect PHP form with Javascript depending on echo -

i'm looking way redirect after submit depending on echo , used following code: <?php $to = "mymail@gmail.com"; $name = trim(stripslashes($_post['name'])); $email = trim(stripslashes($_post['email'])); $message = trim(stripslashes($_post['message'])); $subject = "new client call"; $body = 'name: ' .$name."\r\n"; $body = 'email: ' .$email."\r\n"; $body = 'message: ' .$message."\r\n"; $go = mail($to, $subject, $body, "from:<$email>"); if ($go) { echo "success"; } else { echo "error"; } ?> <form action="index9.html" method="post" name="redirect" ></form> <script> document.forms['redirect'].submit()</script> but have 2 problems: i getting "success" echo. client sending empty details. i want redirect error page javascript (if/else) , don't how. btw ...

c# - Why Conditional attribute methods aren't allowed to return other than void -

i've started learn c# book , read conditional attribute , #if compiler directive. i know usage of #if compiler directive: #if debug public void foo(int value) { ... } #endif and of conditional attribute: [system.diagnostics.conditional("debug")] public void foo(int value) { ... } i know code encased #if ... #endif statements doesn't reach il conditional attribute code , calls function ommited. my question: why there restriction conditional attribute usage functions marked attribute have return void written here in documentation ? you compilation error in visual studio if apply attribute method not return void. i searched information found no explanation. the compiler not allow because semantics of code undefined or @ best rather hard understand: [system.diagnostics.conditional("debug")] public int foo() { ... } var x = someothermethod(foo()); the [conditional("debug")] attribute on method means calls...

php - how to assign textbox value directly to session in codeigniter with out form -

<input type="hidden" id="lang" class="form-control" value="english"> <?php $this->session->set_userdata('user_lang', 'arabic');?> on dropdown change textbox value changed need assign textbox value session without form in codeigniter you can use jquery trigger change of value. , run ajax set session data $('#lang').change(function(){ var val = $(this).val(); $.ajax({ url: "<?=site_url('your_controller/your_method')?>", type: "post", data: {val: val}, success: function(res){ // code after ajax completed } }); }); now @ controller create new method set session data functoin your_method(){ $this->session->set_userdata('user_lang', $this->input->post('val')); }

r - How to solve an error in label_eurostat(): "Dictionary information is missing" -

i periodically download dataset eurostat eurostat package in r , label function label_eurostat(). following code worked fine in past gives me errors since week: > emprt <- get_eurostat("lfst_r_lfe2emprt", time_format = "num") > emprt <- filter(emprt, sex == "t", age == "y15-64", geo %in% c("at", "de", "fr")) > emprt <- dcast(emprt, geo ~ time) using values value column: use value.var override. > emprt <- label_eurostat(emprt, lang = "de") error in label_eurostat(emprt, lang = "de") : dictionary information missing i tried specific dictionary received warning message: > emprt <- label_eurostat(emprt, dic = "geo", lang = "de") warning message: in label_eurostat(emprt, dic = "geo", lang = "de") : labels geo not found. i´m not sure if dictionary 1 choose 1 found @ eurostat. saw there other issues function causing erro...

hibernate - jpa query not returning results by applying OR clause -

i have use case search cities given stateid , if name present include in query , if description present include part of query. stateid mandatory if name or description not passed query not filter out result. have written jpql below need or condition between name , description. result , and of name , description i need name or description. also description should not match exact string passed should like matching string @query("select c city c (c.stateid=:stateid , ((:name null or c.name=:name) , (:description null or c.description=:description)))") where doing wrong in above query wrote.

multithreading - Linux - Difference between migrations and switches? -

by looking @ scheduling stats in /proc/<pid>/sched , can output this: [horro@system ~]$ cat /proc/1/sched systemd (1, #threads: 1) ------------------------------------------------------------------- se.exec_start : 2499611106.982616 se.vruntime : 7952.917943 se.sum_exec_runtime : 58651.279127 se.nr_migrations : 53355 nr_switches : 169561 nr_voluntary_switches : 168185 nr_involuntary_switches : 1376 se.load.weight : 1048576 se.avg.load_sum : 343837 se.avg.util_sum : 338827 se.avg.load_avg : 7 se.avg.util_avg ...

jquery - Search Date shows popup after pressing enter w2ui -

i using w2ui date project. the following steps cause datepicker calendar appear top left corner of window. click "search" button on w2ui grid enter date date field press enter the search criterion dialog disappears , grid searches on chosen date, calendar dialog remains @ top left of window. the user can click somewhere in window , calendar disappears. it bit unexpected confuses people little. i using w2ui library version 1.5.rc1

asp.net - Accessing a local website from another computer inside the local network in IIS 10 -

on computer have deployed web site on iis. if access website locally :8080 works perfect, when try access site machine or android phone 'the site can't reached. my_ip_address took long respond err_connection_timed_out –' error. i have tried solutions this question , nothing worked me. need help! there few factors can affect accessibility of site hosted on local computer: is client machine (including phone) in same network server (in case site) is firewall configured allow connections on port 8080 have tried accessing server using ip address. e.g. http://192.168.0.1:port steps isolate ping server ip client machine , see if able connect it. ping 192.168.0.1 if above fails, assume not on same network. if succeeds check if port open. you can use nmap see whether ports open or not nmap -p 8080 kaushal.com if above fails, open port in firewall configuration , try again. try , share results.

java - How to use dynamic query to join liferay table with custom table? -

i have custom business table. have user liferay table. how can join 2 tables using dynamic query? here mycode example: //sub query business dynamicquery businessquery = dynamicqueryfactoryutil .getdynamicqueryfactory().forclass(business.class, portletclassloaderutil.getclassloader()); businessquery.setprojection(propertyfactoryutil .forname("mappinguserid")); // root query user dynamicquery userquery = dynamicqueryfactoryutil.forclass( user.class, portalclassloaderutil.getclassloader()); criterion userquerycriterion = null; userquerycriterion = propertyfactoryutil.forname("userid").in( businessquery); userquerycriterion = restrictionsfactoryutil.or(userquerycriterion, propertyfactoryutil.forname("emailaddress").like(key...