Posts

Showing posts from January, 2011

java - Like search in Elasticsearch -

i using elasticsearch filtering , searching json file , newbie in technology. little bit confused how write query in elasticsearch. select * table_name 'field_name' 'a%' this mysql query. how write query in elasticsearch? using elasticsearch version 0.90.7. i highly suggest updating elasticsearch version if possible, there have been significant changes since 0.9.x. this question not quite specific enough, there many ways elasticsearch can fulfill functionality, , differ on overall goal. if looking replicate sql query in case use wildcard query or prefix query. using wildcard query: note: careful wildcard searches, slow. avoid using wildcards @ beginning of strings. get /my_index/table_name/_search { "query": { "wildcard": { "field_name": "a*" } } } or prefix query get /my_index/table_name/_search { "query": { "prefix": { ...

c# - 'Fiddler.FiddlerApplication' does not contain a definition for 'Startup' -

i'm building asp.net application in visual studio 2013(update 4, .net framework version 4.5.1) , plugging fiddler functionality in using fiddlercore library( fiddler version 4.5.1.2 ). following build error : 'fiddler.fiddlerapplication' not contain definition 'startup' no other errors. looking @ object browser found startup method missing there also. what solution problem?

javascript - After using the tab key, can’t scroll to the top -

when using tab key or next button on device keyboard scroll seems out off sync. use following steps reproduce this: 1.have form more fields fits screen tab through fields until field not visible gets focus. 2.now try reach the top of page mouse keeps scrolling wrong position. to make easier forked existing codepen , edited show problem. link: codepen this happens on devices have. android 4.4.3 , android 5.0.1. tested @ latest v1.0.0-rc.0 off ionic . i can't see codepen share solution used on application, should add $ionicscrolldelegate controller, here example: angular.module('myapp').controller('myctrl', function($scope, $ionicscrolldelegate) { ... $ionicscrolldelegate.scrolltop(); ... }

php - $_POST Array = 0 after submit -

Image
on submit,i send form-data " log-reg-redirect.php " and when submit form returned error. i've checked many times don't know why problem occurred anybody me :((

request - Capturing incoming traffic to IPhone with Fiddler -

i trying capture traffic app on iphone. can capture outgoing traffic device, nothing incoming. here instruction how configured proxy in fiddler , iphone: http://docs.telerik.com/fiddler/configure-fiddler/tasks/configureforios is there way configure fiddler capture incoming requests or way achieve this? it's desirable application decrypt https traffic fiddler do. apns uses following: ( reference ) tcp port 5223 (used devices communicate apns servers) tcp port 2195 (used send notifications apns) tcp port 2196 (used apns feedback service) tcp port 443 (used fallback on wi-fi only, when devices unable communicate apns on port 5223) the problem fiddler, charles proxy , programs capture http/https protocol traffic. capture traffic including non http yo need analyzer such wire shark. wire shark free not easy use. captures , displays packets including such tcp/ip level connection establishment. has 1 of worse ui experiences ever, hate it. capture traffic in excruc...

ajax - JQuery return function error catch -

i submitting form call $.ajax() php. here $.ajax function work when success. when want show errors, there trouble loop responsetext. see $.ajax() code: $.ajax({ // ... , error: function(errors){ $.each(errors, function(index, error){ info.hide().find('ul').append('<li>'+error+'</li>'); }); info.slidedown(); } }); i catch errors, confusion, how renders errors see output in screen http://prntscr.com/7nt3lq . want render these error fields: {"name":["the name field required."],"fname":["the fname field required."]}, if write as: error: function(errors){ console.log(errors); } then output in screen http://prntscr.com/7nt9tv . how remove exceptional error: 422 (unprocessable entity) , responsetext loop through? the problem first param error callback not respose data, jqxhr object. $.ajax({ url: '/echo/asdf...

javascript - Populate numbered buttons using jquery's $.post() -

i'm using jquery $.post() call data. works fine. question how can create buttons number of returned data? var = 0; $.post('getfruits.php', { category:fruits }, function(data){ i++; += '<button type="button" class="small">i</button>'; }); php: $data['pages'] = $pgs; echo json_encode($data); do $.post('getfruits.php', { category: fruits }, function (data) { var buttons=""; returned_data = json.parse(data); for(i = 0; <= returned_data.pages; i++){ buttons +='<button type="button" class="small">button number '+i+'</button>'; } });

Sending a File from a Python script to a PHP Script using POST deployed on Xampp Server -

i trying send file (may txt, pdf, xls or docx) python script php script. deployed on xampp server. far have tried several methods, no luck. python script im using send file: url = 'http://192.168.1.8:80/testfile.php' files = {'file': open('expected.txt', 'rb')} r= requests.post(url, files=files) i have tried urllib : f=open(filename, 'rb') filebody = f.read() f.close() data = {'name':'file','file': filebody} u = urllib.urlopen(url,urllib.urlencode(data)) print u.read(). both giving same error undefined index: filetoupload in c:\xampp\htdocs\testfile.php on line 16 this php code posted on other end receive file python script $target_dir = "uploads/"; $target_file = $target_dir . basename($_files["filetoupload"]["name"]); $uploadok = 1; $imagefiletype = pathinfo($target_file,pathinfo_extension); // check if image file actual image or fake image if(isset($_post["subm...

Actionbar title font not changing in android -

i want change custom font action bar title, have gone through couple of accepted answers,but no luck,i have tried below,but custom font not applied actionbar title,please me rid of this,my code below: java typeface font = typeface.createfromasset(getactivity().getassets(), "neuropolx.ttf"); spannablestring s = new spannablestring( " kolay randevu"); s.setspan(new customtypefacespan("", font), 0, 4, spanned.span_exclusive_inclusive); getactivity().getactionbar().settitle(s); changing actionbar title font not supported, can use custom view action bar. use custom view , disable native title. display between icon , action items. can inherit activities single activity, has code in oncreate: this.getactionbar().setdisplayshowcustomenabled(true); this.getactionbar().setdisplayshowtitleenabled(false); layoutinflater inflator = layoutinflater.from(this); ...

ios - xcode command line test with argument passed at launch -

i have small problem implementing xcodebuild command test @ ci. have tests related specific device language, in xcode can set "arguments passed on launch" -applelanguages (language). can pass argument using xcodebuild? my script looks xcodebuild -workspace myapp.xcworkspace -scheme "myapptests" -sdk iphonesimulator -destination 'platform=ios simulator,name=iphone 6,os=9.0' test thanks! xcodebuild build app. can use command run app specific language. xcrun simctl launch <deviceid> <appid> -applelanguages "(pt-br)" hera sample steps buil , run app: xcodebuild -sdk iphonesimulator8.4 -arch i386 install dstroot=yourappfolder xcrun instruments -w "iphone 6 (8.4 simulator)" xcrun simctl install booted yourappfolder/applications/yourapp.app xcrun simctl launch booted com.yourdomain.yourapp -applelanguages "(pt-br)"

wordpress plugin - How do you add custom columns for these custom post types? -

i've been developing plugin involves custom post types , taxonomies. i'm struggling @ moment getting custom post fields display in 'all reservations' screen. can columns display, cannot life of me fields within columns populate data database. my custom post code below: function reservations_init() { $labels = array( 'name' => _x( 'reservations', 'post type general name' ), 'singular_name' => _x( 'reservation', 'post type singular name' ), 'add_new' => _x( 'add new', 'reservation' ), 'add_new_item' => __( 'add new reservation' ), 'edit_item' => __( 'edit reservation' ), 'new_item' => __( 'new reservation' ), 'all_items' => __( 'reservations' ), 'view_item' ...

asp.net - How to disable query execution plan caching per query in Entity Framework? -

is there chance disable query execution plan caching using entity framework? i know in objectquery disable per query: https://msdn.microsoft.com/pl-pl/library/system.data.objects.objectquery.enableplancaching(v=vs.110).aspx ) don't see such option in dbquery. i know there interceptors in ef 6 , attach option (recompile) can't find solution how attach 1 exact query not every query in context.

c# - How download an Excel File from SharePoint using WinForm app -

This summary is not available. Please click here to view the post.

java - Amazon S3 issue in web applications running in localhost -

please have @ below code. /* * change license header, choose license headers in project properties. * change template file, choose tools | templates * , open template in editor. */ package s3test; import com.amazonaws.auth.awscredentials; import com.amazonaws.auth.basicawscredentials; import com.amazonaws.services.s3.amazons3; import com.amazonaws.services.s3.amazons3client; import java.io.ioexception; import java.io.printwriter; import javax.servlet.servletexception; import javax.servlet.http.httpservlet; import javax.servlet.http.httpservletrequest; import javax.servlet.http.httpservletresponse; /** * * @author yohan */ public class s3test extends httpservlet { /** * processes requests both http <code>get</code> , <code>post</code> * methods. * * @param request servlet request * @param response servlet response * @throws servletexception if servlet-specific error occurs * @throws ioexception if i/o er...

java - How to change JLabel variable name at run time? -

i have more 100 jlabel components in jframe , have named them m1,m2,m3.... , want change text of each of them without doing manually. so want set name of each label @ run time , change text, retrieving database. this trying do: jlabel j = new jlabel(); for(int i=0; i<100 ; i++) { j.setname("m"+i); j.settext(""+i); } you can create jlabel array .then can access m[x] example jlabel m[] = new jlabel[100]; //initialize jlabel array before add m[i]=new jlabel(); (int = 0; < m.length; i++) { m[i].settext(""+i); } the problem facing have named labels m1,m2 can't call dynamically making it's name. m+"i".settext(); // impossible

android - How to share texts and translations across mobile apps? -

we support english, german, spanish, italian, , french languages. have an ios, android, , windows phone app, , html/js webapp . 3 mobile apps similar. have same screens , texts. each app done small team , features developed apps in parallel. quite few texts used in webapp. we facing problem of how manage our (english) text strings , translations . right now, have google documents tables show screen drafts , corresponding english texts , translations. coordinate translation efforts email , comments in documents. we looking translation tools (namely transifex). appreciate things translation memory, glossary, , easy integration sw development workflows. these tools not fulfill 2 basic requirements have: sharing same texts (source language , translations) across apps, if source text or translation changes, change propagated apps. grouping texts screens , showing screen drafts while translating give context developer. therefore started thinking whether looking more a (tex...

bash - How do I pass the tail of a log file to a command? -

i have quite few long-running processes , use command text me @ various points throughout script , let me know when has completed: curl http://textbelt.com/text -d number=<phone number> -d "message=doneskiiz" instead of basic message include tail of log file in message can see last few lines know if successful , peek @ result. if possible i'd current time included (or in second message). steps: a) execute "date" retrieve current date b) execute "tail -n nnn" retrieve "nnn" last lines of log file c) execute "curl" "--data-binary @file" or "--data-binary @-" or "-f field=@filename" post previous information. you can see similar example @ curl: pass named parameter stdin : tail -n 20 my.log | curl -d date="$(date)" -d number="555123" -f log=@- "http://somewhere"

php - Dynamically change highcharts by yearly,monthly an weekly base in codeigniter -

can guide me how change graph dynamically clicking on dropdown menu list yearly,monthly , weekly in codeigniter? want show same values in these graph fetch database when user select yearly take take average of values , show on graph. thanks. you can use jquery plugin . plugin call datepicker.

Generating stanford semantic graph with nodes storing lemma -

i trying generate semanticgraph , use semgrex find specific node. use lemma 1 of node attribute in semgrex. saw relevant question , answer here: corenlp semanticgraph - search edges specific lemmas it mentioned that make sure nodes storing lemmas -- see lemma annotator of corenlp (currently available english, only). i current can use pipeline generate desired annotation generate semantic graph. properties props = new properties(); props.put("annotators", "tokenize, ssplit, pos, lemma, parse"); stanfordcorenlp pipeline = new stanfordcorenlp(props); however, after searching relevant information, find deprecated function @ here: https://github.com/chbrown/nlp/blob/master/src/main/java/edu/stanford/nlp/pipeline/parserannotatorutils.java public static semanticgraph generatedependencies(tree tree, boolean collapse, boolean ccprocess, boolean includeextras, boolean lemmatize, boolean threadsafe) { semanticgraph deps = sema...

regex - ViewState values doesn't get extracted from Request -

i have load testing asp.net web application using jmeter. when try extract viewstate values doesn't work,it display default value (not found). tried in many ways, how work on regular expression extractor? please give me suggestions. take @ asp.net login testing jmeter guide, contains example of correlation of __viewstate , __eventvalidation dynamic parameters using css/jquery extractor . example configuration: reference name: variable of choice css/jquery expression: input[id=__viewstate] attribute: value

jquery - Clicking children triggers parent -

this question has answer here: how stop events bubbling in jquery? [duplicate] 5 answers i have found many questions in regard, none of solutions me. keep experiencing feature (issue in case) when have multiple elements stacked on eachother. have dom situation this. <div class="body" data-type="body" onclick="foo(this)"> <div class="container" data-type="container" onclick="foo(this)"> </div> </div> so when click .body console.log shows correct element. when click .container both elements fire onclick event. there way overcome this? or there possibility add listeners otherwise? pure jquery approach looks this. of course when use pure jquery have no inline onclick. function initselectable(){ $('*[data-type]:not(.item-wrapper)').unbind('click').bind('clic...

hadoop - java.lang.NoSuchMethodError : org.apache.commons.io.FileUtils.isSymLink(Ljava/io/File;)Z -

i getting error while importing data using sqoop(master machine) oracle db in different machine(i.e., slave machine). have replaced commons.io.jar file also. maybe i'm late, faced same issue , solve it. solution me indicate in weblogic.xml jar must override same existing in weblogic: <weblogic-web-app ...> <container-descriptor> <prefer-application-packages> <package-name>org.apache.commons*</package-name> </prefer-application-packages> </container-descriptor> regards, jose. source: https://mycodingexperience.wordpress.com/2016/01/31/determine-run-time-jar-being-used/

angularjs - how to find element in protractor test? -

trying check value of element on angular plunker: it('should display valid',function(){ browser.get('http://embed.plnkr.co/3nt01z/preview'); var errortext =element(by.xpath('body>div>h2>span:nth-child2)')).gettext); expect(errortext).tobe('not:('); }) getting error though: stacktrace: invalidselectorerror: invalid selector: unable locate element xpath expression body>div>h2>span:nth-child(2) because of following error: syntaxerror: failed execute 'evaluate' on 'document': string 'body>div>h2>span:nth-child(2)' not valid xpath expression. is there better way find span element or right xpath expression? i think meant by.cssselector(...) . by.xpath expects xpath expression, /body/div/h2/span[2] , although i'm not sure exact syntax. by way, code easier test if added id or css class element, don't need depend on exact dom structure.

Exception in thread "main" org.apache.solr.client.solrj.SolrServerException: Server refused connection at: http://localhost:8983/solr -

i trying run solr(5.2.1) using; $ bin/solr start -e cloud -noprompt but get welcome solrcloud example! starting 2 solr nodes example solrcloud cluster. starting solrcloud node1 on port 8983 using command: solr start -cloud -s example/cloud/node1/solr -p 8983 -m 512m waiting see solr listening on port 8983 [/] still not seeing solr listening on 8983 after 30 seconds! tail: cannot open '/home/altair/solr/example/cloud/node1/solr/../logs/solr.log' reading: no such file or directory starting node2 on port 7574 using command: solr start -cloud -s example/cloud/node2/solr -p 7574 -z localhost:9983 -m 512m waiting see solr listening on port 7574 [/] still not seeing solr listening on 7574 after 30 seconds! tail: cannot open '/home/altair/solr/example/cloud/node2/solr/../logs/solr.log' reading: no such file or directory warn - 2015-07-02 10:22:47.156; org.apache.solr.util.solrcli; request http://localhost:8983/solr/admin/info/system failed due to: co...

How to plot an histogram with matplotlib using python -

Image
this question has answer here: histogram matplotlib 6 answers i have 2 lists: x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] y = [0.5717, 0.699, 0.7243, 0.5939, 0.5383, 0.5093, 0.7001, 0.589, 0.6486, 0.7152, 0.6805, 0.5688, 0.6133, 0.6041, 0.5676]. plt.xlabel('x') plt.ylabel('y')) plt.title("histogram") xbins = [x x in range(len(xaxis))] numbins = len(xaxis) plt.hist(xaxis,xbins ,color='green',alpha=0.6) plt.show() plt.close() when doing not getting correctly.so if want plot histogram using data. how can using python programming? i'm not sure if understand question, i'll give shot: import matplotlib.pyplot plt x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15] y = [0.5717, 0.699, 0.7243, 0.5939, 0.5383, 0.5093, 0.7001, 0.589, 0.6486, 0.7152, 0.6805, 0.568...

c# - DragDrop.DoDragDrop froze DispatcherTimer -

i have wpf application dispatchertimer in ui thread. private int timelimit = 500; private dispatchertimer _timer; public mainwindow() { _timer = new dispatchertimer { interval = timespan.frommilliseconds(timelimit) }; _timer.tick += timertick; _timer.start(); initializecomponent(); } private void timertick(object sender, eventargs e) { system.diagnostics.debug.writeline(datetime.now.tostring("hh:mm:ss.fff") + " timer"); } and when hover button, implement drag logic, dispatchertimer holding. xaml: <button width="200" height="50" content="test" previewmousemove="_mousemove"/> code: private point startpoint = new point(); private void _mousemove(object sender, mouseeventargs e) { system.diagnostics.debug.writeline(datetime.now.tostring("hh:mm:ss.fff") + " mouseposition"); ...

python - How to avert "deadlock detected" issue on Postgres + Sqlalchemy? -

here's code on offending lines of code: webdb.begin(subtransactions=true) (webdb.query(proxy).filter(proxy.service_token == service_token)).update( {proxy.date_deleted_utc: datetime.datetime.utcnow()}, synchronize_session="fetch" ) webdb.commit() i've tried start subtransaction, , added fetch synchronization. but still error: dbapierror: (transactionrollbackerror) deadlock detected detail: process 61086 waits exclusivelock on tuple (7217,55) of relation 626383 of database 380717; blocked process 61094. process 61094 waits sharelock on transaction 55622134; blocked process 61088. process 61088 waits sharelock on transaction 55622141; blocked process 61086. hint: see server log query details. 'update proxies set date_deleted_utc=%(date_deleted_utc)s proxies.service_token = %(service_token_1)s' {'date_deleted_utc': datetime.datetime(2015, 7, 2, 12, 57, 23, 2358), 'service_token_1': u'3733a37e-2094-11e5-90b7-0242ac110080...

algorithm - Implementing queue using stack -

this question homework: implement fifo queue using 2 stacks. the total running time of enqueue , dequeue functions should o(n) in worst case scenario. also, analyze running time of algorithm. what did: void enqueue(t *value) { s1.push(value); } t *dequeue() { if (s2.size > 0) return s2.pop(); else if (s1.size > 0) { (int = 0; < s1.size; i++) s2.push(s1.pop()); return s2.pop(); } else return null; } analysis of algorithm: running time of 1 enqueue theta(1). total running time of enqueue functions n * theta(1) = theta(n). running time of dequeue in worst case scenario theta(n) (when call after last enqueue, i.e. when items inserted). in other cases running time theta(1). so, total running time is: o(n) + o(n) + n * o(1) = 3 * o(n) = o(n) is correct? so, total running time is: o(n) + o(n) + n * o(1) = 3 * o(n) = o(n) you're in right direction, don't analyze "total...

javascript - Iterate through table rows with for loop -

i'm using jquery each loop loop through rows in table, if there row exists attribute data-prd-id hide it, did however, know loop run faster jquery.each. change, haven't had idea of how iterate through rows loop. here code of jquery.each var duplicatearr= {}; $('#table-id > tbody > tr.tr1').each(function () { var txt = $(this).attr('data-prd-id'); if (duplicatearr[txt] && txt != 0) $(this).hide(); else duplicatearr[txt] = true; }); what tried far loop didn't work: var duplicatearr= {}; var objtest = $('#table-id > tbody > tr.tr1'); (var = 0; < objtest.length; i++) { var txt = objtest.rows[i].attr('data-prd-id'); if (duplicatearr[txt] && txt != 0) objtest.rows[i].hide(); else duplicatearr[txt] = true; } you try this var trlist = $("#tableid > tbody ").children(...

javascript - Dealing with hidden elements -

i trying scrape website , problem is, cannot interact hidden elements present on website. code follows: before clicking li class="header-nav__item login header-item-is-hidden" data-toggle="dropdown" style="display:list-item" <a class="header-nav__link" href="#login-panel" aria-controls="login-panel" aria-expanded="true" aria-haspopup="true"></a> <script src="../../../scripts/login/login.js" type="text/javascript"></script> <script src="../../../scripts/login/2falogin.js" type="text/javascript"></script> <script src="../../../scripts/common/error-handing.js" type="text/javascript"></script> <div id="login_pnldowntime"></div> <script type="text/javascript"></script> li after clicking li class="header-nav__item jp-login header-item-is-hidden ...

Javascript - regex only catches the first 3 matches -

first, in advance can provide. my regex capturing first 3 instances of string i'm trying extract. ideas? my code: var objargs = wscript.arguments; var objfilesys = new activexobject("scripting.filesystemobject"); var objfolder = objfilesys.getfolder(objargs.item(0)); var objtsetnum = new regexp("^st.((\\d+)+)", "gm"); var objfile = null; var srcfile = null; (var objfileenum = new enumerator(objfolder.files); !objfileenum.atend(); objfileenum.movenext()) { objfile = objfilesys.opentextfile(objfileenum.item(), 1, false, 0); srcfile = objfile.readall(); objfile.close(); // check different values in tset entries // build array hold tset values found var arrtset; while ((arrtset = objtsetnum.exec(srcfile)) !== null) { // arrtset = objtsetnum.exec(srcfile); wscript.echo("arrtset is: " + arrtset); wscript.echo("length of arrtset is: " + arrtset.length) //var alltsetsame =...

vb.net - Capturing user who changes database -

i work on few projects front end moved vb.net, back-end's remain in access .accdb format. with access front end able set data macros captured username of person making changes , record them in audit table, looks little harder .net front-end. is there way pass information front end database ? or there method of making back-end @ function stored there (it doesn't seem work @ moment) this code have in back private declare function apigetusername lib "advapi32.dll" alias _ "getusernamea" (byval lpbuffer string, nsize long) long public function getusername() string ' returns network login name dim lnglen long, lngx long dim strusername string strusername = string$(254, 0) lnglen = 255 lngx = apigetusername(strusername, lnglen) if lngx <> 0 getusername = left$(strusername, lnglen - 1) else getusername = "" end if end function i have public function doing same in front-end, called getuserna...

mysql - How to split one column into multiple rows in SQL? -

this question has answer here: sql split values multiple rows 5 answers i have table this. id items 1 1|2|3 2 3|4 ... now, want split items multiple rows, this. id item 1 1 1 2 1 3 2 3 2 4 ... can sql job? you shouldn't store data in format in database due index usages etc. in cases, can't avoid it, if foreign application delivers information in way example. if have store way , disaggregate store in format can use following user defined function achieve it. create function dbo.udf_split (@string nvarchar(max), @delimiter nchar(1)) returns @results table (items nvarchar(max)) begin declare @index int declare @slice nvarchar(max) set @index = 1 if @string null return while @index != 0 begin select @index = charindex(@delimiter, @string) if @index != 0 select @slice = left(@stri...

WCF service working on debug but not working when calling from android -

i created wcf service in visual studio 2012 intend consume in xamarin , have save user registration information table in sql server. service works fine when debugging in visual studio, data entries save table in sql. want consume service in xamarin , here code: using system; using system.collections.generic; using system.data; using system.data.sqlclient; using system.linq; using system.runtime.serialization; using system.servicemodel; using system.servicemodel.web; using system.text; using itusservice; using android.app; using android.locations; using android.os; using android.util; using android.widget; //some code here... public static readonly endpointaddress endpoint = new endpointaddress("http://192.168.1.155:12100/service1.svc"); private service1client service; protected override void oncreate (bundle bundle) { //some code here... initialize...

karma jasmine - Unit Test for div function -

my code: it('div function', function() { var bar = function(a,b) { if(b==0){ throw new typeerror("foo bar baz"); }else return a/b; }; expect(bar(0,0)).tothrowerror("foo bar baz"); }); but fail: typeerror: foo bar baz in file:///d:/java/ajunittest/test/test-spec.js

Referencing a string within an Index Formula Array in Excel VBA ROW(1:1) -

need referencing string in index formula array my code below: sub loop_test2() dim long dim j long dim countall long dim countxl long dim customername string activesheet.range("a1").activate countall = activesheet.range("a35") j = 1 countall = 2 countxl = cells(i, j).value r = 1 = 1 countxl customername = cells(1, j).value 'msgbox customername msgbox r cells(i + 2, j).formulaarray = "=iferror(index(sheet2!$a:$b,small(if(sheet2!$a:$a=""" & customername & """,row(sheet2!$a:$a)),row(r:r))*1,2),0)" r = r + 1 next next j end sub i trying put reference in part: row(1:1) change to: row(""" & r & """ : """ & r & """) however receiving object error 1004 delete double quotes row(" & r & " : " & r & ") full: cells(i + 2, j).formulaarray = "=iferror(index(sheet2!$a:$b,small(...

java - Can't find file 'com.facebook.android.facebook' on Facebook SDK Android -

hello i'm trying use facebook sdk android app , every tutorial i'm looking @ telling me different things , using facebook fb = new facebook(appid); i dont have "facebook.java" in facebook sdk, have files facebookactivity.java , stuff. tutorials i'm looking @ made in 2012 (we're in 2015), sdk updated , changed since , different codes , files? can tell me how go doing same task or supposed doing please? here detailed , updated tutorial facebook add facebook sdk in application: https://developers.facebook.com/docs/android/getting-started/

smtp - OBIEE Scheduling reports -

i having problem trying schedule report in obiee . after research found that, if want scheduling in obiee have install smtp server on our system. true? i installed hmail server on system, , gave necessary information port number, domain name, sender , receiver mail id's. however, when running report following error. global error: [nqserror: 77030] oracle bi presentation server connection error: unable resolve address miracle_pc. error codes: axsbmn8d: operation completed successfully. here miracle_pc system name. how can resolve problem deliver report through email in obiee. if want send email obiee, yes need access smtp server. might 1 within company, internet service provider, webmail provider -- or can host own. looking @ error you've posted looks miracle_pc isn't valid dns entry obiee can't find smtp server you've given it.

vba - Excel Array formula with IF statement -

i not great array formulas in excel thought maybe in community might able me. have data in 2 seperate worksheets , trying sum information given parameters. first worksheet looks start date end date division , group total 10/1/2011 10/31/2011 [need sum here] 11/1/2011 11/30/2011 [need sum here] . . . . . . 03/01/2015 03/31/2015 [need sum here] the second worksheet contains information follows: year jan feb mar apr ... dec division group 2011 1 2 3 4 ... 21 retail 2011 5 6 7 8 ... 2 mgmt b . . . . . ... . mw c . . . . . ... . bb d . . . . . ... . . . 2015 5 5 5 5 ... 1 retail j the group variable has 10 different distinct values while division has 4. appreciated. you might want sumproduct. can use match multip...

d3.js - How to draw inside graph nodes? -

i can use d3 draw pie chart or graph, can draw pie chart within each node of graph shown here . is possible create reusable function generate pie chart , attach result each node? way pie chart code reused, instance in gallery of charts. var node = svg.selectall(".node") .data(graph.nodes) .enter().append("g") .attr("class", "node"); // draw pie chart node.selectall("path") .data(function(d, i) {return pie(d.proportions); }) .enter() .append("svg:path") .attr("d", arc) .attr("fill", function(d, i) { return color(d.data.group); });; from above code, tried following code doesn't work var node = svg.selectall(".node") .data(graph.nodes) .enter().append("g") .attr("class", "node") .call(drawpie(function(d) { return d.proportions; })); function drawpie(d) { this.selectall("pa...

sftp - How does WinSCP know what a symlink links to when showing directory listings? -

when connect winscp directory contains symlink it'll show it's symlink using different icon. eg. instead of folder it'll folder arrow or such. my question is... how winscp know symlink symlink folder? when sftp directory client sends ssh_fxp_readdir packet. server responds ssh_fxp_name packet. in testing seems data in packet corresponds lstat - not stat. ie. if , permissions attribute 1111 0000 0000 0000 1010 0000 0000 0000 (symlink) instead of 0100 0000 0000 0000 (directory). my guess winscp sends out ssh_fxp_stat each of these symlinks maybe it's doing ssh_fxp_readlink instead. if latter server respond ssh_fxp_name - if former server respond ssh_fxp_attrs (which pretty ssh_fxp_name 1 file instead of x files). again, maybe it's doing else entirely. remembering winscp uses putty tried see 1 doing creating session putty had "session logging" set "ssh packets". tried connect session winscp no putty.log file created. didn'...

go - why the "infinite" for loop is not processed? -

i need wait until x.addr being updated seems loop not run. suspect due go scheduler , i'm wondering why works way or if there way can fix it(without channels). package main import "fmt" import "time" type t struct { addr *string } func main() { x := &t{} go update(x) x.addr == nil { if x.addr != nil { break } } fmt.println("hello, playground") } func update(x *t) { time.sleep(2 * time.second) y := "" x.addr = &y } there 2 (three) problems code. first, right there no point in loop @ give control scheduler , such can't execute update goroutine. fix can set gomaxprocs bigger 1 , multiple goroutines can run in parallel. (however, won't pass x value update function means main goroutine never see update on x. fix problem have pass x pointer. obsolete op fixed code.) finally, note have data race on addr not using atomic loads , stores.

java - Loading classes from a set of files -

i have task check set of conditions unknown set of classes classpath. want scan classes, load each of them , perform checks. have set of urls class files , try use urlclassloader. load class need specify qualified class name, don't have them (i have file path). don't think building class name class file path relieble, better way it? thanks! i'd parse beginning of class file, looking "package" keyword , first occurrence of "class" keyword. then, when combine 2 ( packagename + "." + classname ), should result in proper class name.

php 5.6 - path variable: why it was still there when echo %path%, after the deletion? -

i trying upgrade php version 5.3 5.6. removed old php 5.3 entry , added new php 5.6 entry in path variable. why when echo %path% in command line, gave me both entries? okay, problem solved: closed command line, , reopened new one... echo %path% worked expected.

java - Date/Time Pickers not giving changed values -

i created alertdialog contains both datepicker , timepicker inside of it. date , time pickers initialized each time opened whatever date on text of button used open it. when user clicks "set" button in dialog box supposed update text on button selected date , time keeps @ old date , time. it appears using datepicker.getyear() , other methods isn't getting selected data in picker because made toast test , displayed old information only. here code: startdate.setonclicklistener(new view.onclicklistener() { @override public void onclick(view v) { //get date button text calendar timeinbutton = calendar.getinstance(); simpledateformat sdf = new simpledateformat("yyyy-mm-dd hh:mm", locale.us); try { timeinbutton.settime(sdf.parse(startdate.gettext().tostring())); } catch (parseexception e) { e.printstacktrace(); } int pyear = ti...

android - How to populate spinner data based on from and to dates from sqlite database? -

i have written program insert data includes column called date, when inserting date inserted @ same time. insertion working perfectly, in different activity have 2 edittexts fromdate , todate when clicked separate datepicker open , selected date set on respective edittext, want when have finished selecting date , date, want spinner populated based on date have inserted data. i have tried not working though. this table have created private static final string create_table_finaldata = "create table "+table_name_finaldata+" (" +uid +" integer primary key, "+reference_no+" varchar(200), "+account_name+" varchar(200), "+account_type+" varchar(100) ,"+vehicle_no+" varchar(100), "+driver_code+" varchar(50), "+driver_name+" varchar(200), "+diesel_type+" varchar(50), "+diesel_rate+" double, "+dies...

http - What status codes raise Errno::ECONNRESET in Ruby? -

using httparty make request. how can find out http responses raise errno::econnreset ? the error no longer happening, browse code or documentation. ruby docs didn't help: http://ruby-doc.org/stdlib-2.1.1/libdoc/webrick/rdoc/errno/econnreset.html errno::econnreset isn't caused http status code. it's thrown when remote host closes tcp connection prematurely.

sql - Does Informix support CASE statement inside a SELECT query -

i using select query below, , isn't working if give case statements. can please advise me if informix allows case, or if statements in select query or if there other alternative trying below? select a.post_date, a.count_date, case when (a.tover>b.sun_num) a.tover else '0' end case t_over, case when (a.tshort>b.sun_num) a.tover else '0' end case t_short, join b on a.cust_ix = b.cust_ix i have tried replacing '0' 0 , null, no luck. all supported versions of informix support case in select statements. however, not use end case because sql standard requires end . sample query has stray comma minimization problem. select a.post_date, a.count_date, case when (a.tover > b.sun_num) a.tover else '0' end {case} t_over, case when (a.tshort > b.sun_num) a.tover else '0' end {case} t_short -- , -- comma in original query error join b on a.cust_ix = b...

ios - How can I format date -

i date formatted 2015-07-15 17:12:00 +0000 , want display jul 15 2015 . how can that? code: func formatdate(date: string) -> string { if date != "" { var datestring = date datestring = datestring.substringtoindex(advance(minelement(indices(datestring)), 19)) datestring = datestring.stringbyreplacingoccurrencesofstring("", withstring: " ") var dateformatter = nsdateformatter() dateformatter.dateformat = "yyyy-mm-dd hh:mm:ss" var datestr = dateformatter.datefromstring(datestring) dateformatter.datestyle = nsdateformatterstyle.mediumstyle var date = dateformatter.stringfromdate(datestr!) return date } else { return "" } } your input dateformatter string bit off - not include time zone , uses wrong hour pattern. following works , outputs jul 15 2015 let datestr = "2015-07-15 17:12:00 +0000" var dateforma...

php update value of array with same key -

how can update same array key new value array ( [key1] => 3 [key2] => 2 [key3] => 1 [key4] => 2) array ( [key3] => 6 ) expected answer: array ( [key1] => 3 [key2] => 2 [key3] => 6 [key4] => 2) try one, $first_array = array('key1' => 3,'key2' => 2,'key3' => 1,'key4' => 2); $second_array = array('key3' => 6); foreach ($first_array $key => $value) { if(isset($second_array[$key])) { $first_array[$key] = $second_array[$key]; } } var_dump($first_array);

angularjs - issue with condition in angular with if -

Image
in code ng-if doesn't seems verify conditions. 'hello' displays before table. <div ng-repeat="(key, value) in data"> <h3>{{key}}</h3> <div ng-if="_.isnumber('hello')"> <h2>hello</h2> </div> <table class="table table-striped table-bordered table-condensed table-hover"> <tr ng-repeat="(k,v) in value"> <td><strong>{{k}}</strong></td> <td>{{v}}</td> </tr> </table> </div> if need use function in view, need bind scope first. i'm not sure if can bind underscore try $scope._ = _;

php - Bootstrap Sidebar on Laravel 5 specific page only -

Image
i'm pretty new bootstrap , i'm making laravel app. , want make left sidebar on page. don't want edit app.blade.php because don't want make sidebar on pages, on specific page. code: my code and page looks @if(request::url() == url() . '/your/url/goes/here') @include('whatever-you-wish-here') @endif this go in base view other views extend. so in case assume app.blade.php

android - Want to combine redundant Methods of pulling user/patient images into one method -

Image
i have 9 of imageviews set in xml layout. application pulls images directly folder on device , loads image onto imageviews. because of redundancy applications slowing down more patients/users add. i'm sure there way combine these methods (doing exact same thing) 1 method, im not sure how, i'm thinking of creating file array. ideas? this code regarding 9 imageviews being declared , instantiated imageview patientone; imageview patienttwo; imageview patientthree; imageview patientfour; imageview patientfive; imageview patientsix; imageview patientseven; imageview patienteight; imageview patientnine; public void initializeviews() { patientone= (imageview)findviewbyid(r.id.patient_one); patienttwo= (imageview)findviewbyid(r.id.patient_two); patientthree= (imageview)findviewbyid(r.id.patient_three); patientfour= (imageview)findviewbyid(r.id.patient_four); patientfive= (imageview)findviewbyid(r.id.patient_five); patientsix= (imageview)fin...