Posts

Showing posts from August, 2010

Is there a way to use operator+ to concatenate std::strings in c++? -

this question has answer here: what difference between these 2 cases of adding string? 5 answers i have function this void foo (const char* mystring){ ... } and want use this std::string tail = "something"; foo("my" + "string" + tail); but can't find easy way. sure can make string somewhere else , pass foo() . prefer find way inline, because foo() called several times in code, don't want make string each time. tried foo(std::string ("my" + "string" + tail).c_str()) but can guess doesn't work. "my" and "string" c style string literals, have odd rule concatenated if written without + . so "my" "string" + tail work, , produce std::string . however, still not correct type function, unless use .c_str() on result.

Parse SOAP response using NSXMLParser from web service in Swift -

i'm passing soap message publicly available web service in swift. can see getting soap response , attempting parse using nsxmlparser. i expecting make use of parser method has foundcharacters parameter - called once , contains string : "error" i want able access result believe should contained within celsiustofahrenheitresult tag the web service i'm calling , soap messages can found here. i can see response contains following elements: soap:envelope soap:body celsiustofahrenheitresponse celsiustofahrenheitresult but why isn't values held in these being printed? a similar question can found here: parsing soap response using nsxmlparser swift lacks complete answer. full code view controller calls web service on button press: import uikit class viewcontroller: uiviewcontroller, uitextfielddelegate, nsurlconnectiondelegate, nsxmlparserdelegate { var mutabledata:nsmutabledata = nsmutabledata.alloc() @iboutlet weak var button: uibut...

python - While loops list index out of range error. Strip off strings with double slases -

i wondering if me debug code. i'm curious why i'm getting list index out of range error. i'm trying add items in list , using number index list. in end, wanted strings in list cut off '//'. word_list = [] = 0 while < len(word_list): word_list.extend(['he//llo', 'ho//w yo//u', 'be///gone']) += 1 word_list[i].strip('//') print(i) print(word_list[i]) print(i) you condition never true i < len(word_list) , i 0 , length of list never enter loop. cannot index empty list print(word_list[i]) i being 0 gives indexerror . your next problem adding more items list in loop if did start loop infinite list size grow faster i , example adding single string list initially: word_list = ["foo"] = 0 # never greater len(word_list) loops infinitely while < len(word_list): # never enter not < len(wordlist) print(i) word_list.extend(['he//llo', 'ho//w yo//u', 'be//...

java - Unit Testing Ignore owner from H2 database -

i test multiple methods without having restrictions access database. there legacy code has query coded , wondering if h2 can ignore prefixes owner while testing. for example: in code... .. string q = "select user admin_dba.empolyees id < ? , id > 25"; try { con = datasourceutils.getconnection(datasource); pst = con.preparestatement(q); pst.setlong(1, id); rs = pst.executequery(); ... as testing able ignore admin_dba in h2?

Integrating Google Sign-In into Your Android App Error -

i'm trying this link i'm stuck in "add google services plugin" step... added dependency said android studio' console showing me error: could not find "com.google.android.gms:play-services-measurement:8.1.0" i searched info here (so) , google didn't find it. you have download google play services library before add dependency. in android sdk manager, scroll bottom "extras" section, , download "google play services." it's idea download "google repository" well.

OS X 10.11 / Xcode 7.0.1 git push fails silently -

after upgrading os x 10.11 , xcode 7.0.1, git push fails when invoked xcode's source control menu. fails silently, happy message "push successful". when execute "git push" command line, push succeeds. i'm pretty sure origin set correctly inside xcode, because source control -> pull works fine. my local store called "master" , remote store called "origin". have no branches. "origin" resides on other mac, accessed via os x file sharing, referenced url "file:///volumes/git-repositories/%252010.5//" project name. unfortunately, have space in url, doubly-encoded xcode %25%20. clue? why pull work? the mac hosting "origin" running os x 10.11 / xcode 7.0.1. contains local "master" , configured push "origin", exists on same disk. fails in same manner: xcode push silently fails, while xcode pull , command-line push succeeds. any suggestions appreciated. thank you. sol...

swift - How to get an SKNode's zRotation relative to its scene? -

is there way sknode's zrotation relative scene rather parent? or relative other sknode? right i'm doing this: func rotationrelativetoscenefornode(node: sknode) -> cgfloat { var noderotation = cgfloat(0) var tempnode: sknode = node while !(tempnode skscene) { noderotation += tempnode.zrotation tempnode = tempnode.parent! } return noderotation } but i'm not sure best way it.

c# - Blocking User Process Controller from executing before Control on Winform Fully Loaded and Shown -

Image
i'm creating excel vsto using c#. operation easy, right-click on cell , click on "update" , winform shows progress status prompt out , launch controls on form tied user process controller. the problem process has launched , executed before form load, there way can block user process controller executing before control on progress status form shown , loaded? image below depict condition. i have tried put user process controller call in form activated, shown, loaded, , nothing works. this first stage form loaded. note : 2 line of text has shown user control process has been executed. this second stage form loaded. this third stage and loaded. i have discovered "hack" overcome issue. add in backgroundworker , done follow code on form constructor. public summarystatus() { initializecomponent(); backgroundworker = new backgroundworker(); backgroundworker.dowork += backgroundworker_dowork; b...

android - Content behind CoordinatorLayout AppBarLayout -

Image
i creating settings activity/layout app. have coordinatorlayout appbarlayout , toolbar , beneath includes content_settings.xml . when content loads .xml file behind app bar. i'm using same setup load main content , works fine, reason isn't rendering correctly within settings section. activity_settings.xml <android.support.design.widget.appbarlayout android:layout_width="match_parent" android:layout_height="wrap_content" android:theme="@style/apptheme.appbaroverlay"> <android.support.v7.widget.toolbar android:id="@+id/toolbar" android:layout_width="match_parent" android:layout_height="?attr/actionbarsize" android:background="?attr/colorprimary" app:popuptheme="@style/apptheme.popupoverlay" /> </android.support.design.widget.appbarlayout> <include layout="@layout/content_setting" /> the co...

android - How do I reference findFragmentByTag to re-display a softkeyboard? -

i have datepickerdialog launches in fragment. when orientation change occurs app crashes. logcat output says npe happens ondismiss in datepickerfragment. ondismiss code used toggle soft keyboard show again (after launch of datepickerdialog toggles off). inputmethodmanager launch soft keyboard uses "getactivity()" reference think causing crash after orientation since activity re-created. can replace reference fragment using findfragmentbytag way re-use dialogfragment upon orientation change? here partial datepickerfragement file: public class datepickerfragment extends dialogfragment implements datepickerdialog.ondatesetlistener { public datepickerfragment() { } @override public dialog oncreatedialog(bundle savedinstancestate) { ... datepickerdialog picker = new datepickerdialog(getactivity(), this, year, month, day); return picker; } public void ondismiss(final dialoginterface dialog) { inputmethodmanager imm = (inputmethodmanager) getactivity().getsystemser...

jquery - jqgrid addRowData gives error t.p.data.push is not a function -

i adding data grid using custom button. in case if data exists in grid, new row added correctly. if grid empty , add new row, gives uncaught typeerror: t.p.data.push not function error @ jqgrid source file. code used add new row below var rows = $("#" + gridname).getdataids(); $("#" + gridname).jqgrid("addrowdata", rows.length + 1, { id: rows.length + 1},'first'); $("#" + gridname).editrow(rows.length + 1, true); i using custom nav bar adding , editing grid. the grid created using following code createjqgrid:function(gridid, columns, griddata){ $("#"+gridid).jqgrid({ datatype: 'local', data: griddata, editurl: 'clientarray', colmodel: columns, loadonce: false, //width: '100%', autowidth: true, shrinktofit:false, height: 250, rownumbers: false, multiselect...

ios - How to pass data when instantiating another view controller -

i'm beginner. doing popover when button pressed instantiates view controller user can select 5 choices. want able save sender.tag of button first view controller (where code snippet below came from) , pass second can save them parse. i'm not using segue can't pass way. in advance! func showpopover(sender: uibutton) { let vc = self.storyboard?.instantiateviewcontrollerwithidentifier("selectionviewcontroller") vc!.modalpresentationstyle = .popover vc!.preferredcontentsize = cgsizemake(150, 30) if let presentationcontroller = vc!.popoverpresentationcontroller { presentationcontroller.delegate = self presentationcontroller.permittedarrowdirections = .up presentationcontroller.sourceview = self.view presentationcontroller.sourcerect = sender.frame self.presentviewcontroller(vc!, animated: true, completion: nil) } } the easiest way declare variable var myvariable = int() out...

powershell - OR operator for checking branches in Octopus Deploy -

i have 'deploy nuget package' step in octopus. in step, want deploy nuget package , have deployment script executed. now want deployment happen master , hotfix branches.so added condition in deployemnt script: if ($branchname.tolower().equals("master") -or $branchname.tolower().contains("hotfix")) { ................... } but doesn't work , gettin error 'you cannot call method on null-valued expression.' how can achieve this? note: don't have pre-deployment , post-deployment script are able check if $branchname null? can compare strings inbuilt operators: if ($branchname -and ($branchname -ilike "master" -or $branchname -ilike "*hotfix*")) { ................... }

c# - Windows 10 Universal App: Preventing Headers from Rotating in Pivot Control -

i attempting keep pivot headers cycling carousel can't seem find right property or setting so. possible disable? basically stop happening: state one: | 1 | 2 | 3 | 4 | state 2 - after left swipe: | 2 | 3 | 4 | 1 | i don't mind text highlight changing moves down etc, don't want pivot items shifting position. know can solve using additional controls , disabling headers altogether, hoping there built in solution. it's worth noting if pivot element has 4 or fewer pivotitems headers aren't treated carousel won't rotate. microsoft design guidelines recommend keeping number of pivotitems 5 or fewer. my solution use 4 pivotitems only.

email - Grails mail plugin issues with Gmail SMTP -

i'm using grails mail plugin (2.0.0.rc2) grails 3.0.7. config: mail: host: smtp.gmail.com port: 465 username: myuser@gmail.com password: mypassword props: - mail.debug: true - mail.smtp.auth: true - mail.smtp.socketfactory.port: 465 - mail.smtp.socketfactory.class: javax.net.ssl.sslsocketfactory - mail.smtp.socketfactory.fallback: false when try send test mail, following error: caused by: org.springframework.mail.mailsendexception: mail server connection failed; nested exception javax.mail.messagingexception: not connect smtp host: smtp.gmail.com, port: 465, response: -1. failed messages: javax.mail.messagingexception: not connect smtp host: smtp.gmail.com, port: 465, response: -1 @ grails.plugins.mail.mailmessagebuilder.sendmessage(mailmessagebuilder.groovy:131) ~[mail-2.0.0.rc2.jar:na] @ grails.plugins.mail.mailservice.sendmail(mailservice.groovy:55) ~[mail-2.0.0.rc2.jar:na...

html - How could *data inter-dependent* <select> dropdowns in rails be populated quickly? -

users need select car. have several dropdowns when picking car in order pick year, make, model , submodel. don't know use select options make/model/submodel interdependent. once pick year use ajax make requests query activerecord populate make dropdown. when pick make use ajax query , populate model dropdown. when pick model ajax query , populate submodel dropdown. the problem lot of separate network requests , in real-world conditions of low bandwidth, network issues, etc. quite there pauses severely impacting user experience , leading failures. what approaches avoid these network requests. in there approach store of several thousand makes-model combinations on client browser? currently data stored in sql database accessed via activerecord in rails framework. each dropdown selection results in query because yuou can't show populate , show make until know year , can't populate , show model until know make. same submodel (though i've omitted submodel rest...

performance - Android app builds, but crashes in emulator -

my app keeps crashing , have no idea causing this. app builds, keeps crashing in emulator. i tried change mainactivity , still it's not working. main activity.java public class mainactivity extends appcompatactivity implements view.onclicklistener { button btlogout; edittext etname, etpsn; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_login); etname = (edittext) findviewbyid(r.id.etname); etpsn = (edittext) findviewbyid(r.id.etpsn); btlogout = (button) findviewbyid(r.id.btlogout); btlogout.setonclicklistener(this); } @override public void onclick(view v) { switch (v.getid()){ case r.id.btlogout: break; default : break; } } } activity_main.xml <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:orientation="vertical...

c++ - exceeding vector does not cause seg fault -

i puzzled @ result of bit of code: std::vector<int> v; std::cout << (v.end() - v.begin()) << std::endl; v.reserve(1); std::cout << (v.end() - v.begin()) << std::endl; v[9] = 0; std::cout << (v.end() - v.begin()) << std::endl; the output: 0 0 0 so... first of all... end() not point end of internal array last occupied cell... ok, why result of iterator subtraction still 0 after reserve(1) . but, why still 0 after 1 cell has been filled. expected 1 result, because end() should return iterator second internal array cell. furthermore, why on earth not getting seg fault accessing tenth cell v[9] = 0 , while vector 1 cell long? v[9] = 0; , you're accessing vector out of bound, it's ub . may crash in cases, , may not. nothing guaranteed. and v[9] = 0; , don't add element @ all. need use push_back or resize : v.push_back(0); // has 1 element v.resize(10); // has 10 elements edit why v[index] not create...

Extracting and Merge in R -

below list have: v1 v2 zealous jane pretty may smart kate place china below data have: name source jj kate has brother kl may lives in china. i make use list , data have extract data matches using r. below output get: name source words comments jj kate has brother kate smart kl may lives in china may pretty kl may lives in china china place thank you. we can use str_extract extract words df2 , match 'nm1' 'v2' column of 'df1' index 'v1' column of 'df1' library(stringr) nm1 <- str_extract(df2$source, paste(df1$v2, collapse='|')) df2$words <- df1$v1[match(nm1, df1$v2)] df2 # name source words #1 jj kate has brother smart #2 kl may lives in china. pretty update for updated dataset ('df1'), can use str_extract_all extract multiple words in list , stack convert data.frame , merge df...

ruby on rails - How to pass the value of column to the custom error message of validates -

i have model 2 column, name , answer how can pass value of name custom error message of validates of model. sample code: #app/models/sample_model.rb class samplemodel < activerecord::base validates :answer, :presence => {:message => "error name: #{self.name}"} end instead of value of column name , shows name of model samplemodel . to have access value of attribute (column) being validated, need use activemodel::validations class. class has validates_each method can use access values of record being validated. #app/models/sample_model.rb class samplemodel < activerecord::base include activemodel::validations attr_accessor :sample_attribute validates_each :sample_attribute allow_blank: true |record, attr, value| record.errors.add :base, 'error name: #{value}' if value.nil? end end in record.errors.add can customize message. takes 3 parameters attribute , message , , options . in above, put :b...

Randomly Appearing Popups In Unity3D -

how can make image randomly appear while in-game in unity3d ? serve popup advertisements game. want have ads without using admobs or other plugins. depending on how plan display images. write script randomly enable gui image, have gui image become disables after specified time on or button click (like "x" symbol or close button). my recommendation mix of following: create ui image gameobject. use main advertisement gameobject. create script set gameobject active/inactive randomly throughout game. place script on object in hierarchy exist throughout game. create script advertisement handler. attach ui gameobject. in can create sort of structure hold different ads or plan populate ads. can customize way ads displayed. random? happen sequentially? there different types of ads? create logic disable gameobject based on timer or way of close button. if around coding , have trouble, please feel free ask coding. also, check out unity forums questions specific...

grammar - ANTLR parsing string losing characters? -

i have following grammar grammar lucene; /* * parser rules */ query : orexpr whitespace* newline? eof ; orexpr : expr ((ortoken | space)? expr)* /* or exp */ ; expr : lparen orexpr rparen /* grouping */ | expr andtoken expr /* , exp */ | expr nottoken expr /* not exp */ | required | prohibited | proximity | fuzzy | boosted | phrase | term ; proximity : phrase tilde int ; fuzzy : term tilde float? ; boosted : (term | phrase) accent (float | int) ; required : plustoken whitespace? term ; prohibited : minustoken whitespace? term ; term ...

java - How to add text from one JTextField to another by pressing a JButton -

i creating applet in java user enters data 4 different 4 different text fields, clicks button, , data taken fields , stored in text field next it. i have button made, , implements actionlistener, not sure how text 4 fields 1 field together. just not sure how text 4 fields 1 field together. jtextfield has gettext() method. invoke method on 4 different text field string value each text field. jtextfield has settext() method. combine 4 strings 1 , set text of 5th text field.

jquery - javascript returning an array from inside a get funtion with in a function -

new javascript , jquery have bee doing of coding in php, have been banging head against wall week trying work, have looked through out site , googled many others issues! here complete function think pretty self explanatory function get_all_items(config_d) { var con = config_d.split(','); var cat = $("#category").val(); var color = $("#c"+cat+"").val(); var range = $("#range").val(); var total = $("#vtotal").val(); var prod_arr = ""; var qty_arr = ""; $.get('tables/htl_products.txt', function(data) { var lines = data.split('\n'); (var i=0; i<=lines.length; i++) { var elements = lines[i].split('~'); var el = elements[0].split('_'); var arange = el[0]; var aproduct = elements[0]; var aconfig = elements[1]; var acat = elements[2]; var acolor = elements[3]; (var c=0; c<con.length; c...

Is the flashing black caused by CSS or Jquery? -

the home page of site has layerslider weird side effect: http://ironhaus.com/ each slide loads, white space @ end of line flashes black. class ls-l, doesn't seem have style in stylesheet. i've never seen behavior before without being triggered kind of user action. well, haven't seen since old tag put out of misery. this wordpress site layerslider plugin having problem, i'm guessing problem show in other structures well.

c - How to pass two parameter to sa_sigaction? they are FILE* and PID of child process -

when capture signal, want send message 'end' child process , if still live use kill pid kill it. no global variable i think have use sa_sigaction, confuse how send file* of pipe , pid of child it. can can give em example this?? i'd pass pip , pid hdl how change code?? i'd capture signal can captured, first parameter of sigaction(sigint, &act, pip) ?? instead of sigint in advance static void hdl (int sig, siginfo_t *siginfo, void *pip) { xxxxxxx } int main() { file** pip; int* pid; struct sigaction act; memset (&act, '\0', sizeof(act)); act.sa_sigaction = &hdl; act.sa_flags = sa_siginfo; sigaction(sigint, &act, pip); sleep (10); return 0; } this not possible (to pass more arguments signal handler). need use global or static variable. you cannot add parameter signal handler, simple pid_t or file* or void* signals delivered kernel, , kernel (with some low-level, machine , abi s...

javascript - PHP get something from a html file, then pass something back to the original html file -

i new php, suppose, have index.html, , cal.php, in directory. index.html: <head> <script> java script here used display graphs based on cal.php calculated results </script> </head> <body> <form action="cal.php" method="post"> <div class="row x_title"> <div class="col-md-6"> <h3>dashboard</h3> </div> <select class="form-control" id="myfileselect"> <?php echo '<option>choose file</option>'; foreach (glob('report' . '/*.csv') $file) { list($af, $bf) = split("/", $file, 2); list($filenam, $extnt) = split(".", $bf, 1); echo '<option value="' . $bf . '">' . $filenam . '</op...

jquery - Display message upon Switch button toggle -

i using bootstrap switch turn check-box in toggle switches. now want display different messages based on whether switch on or off. sounds simple enough...but can't seem make work :( my html: <div class="approve-delivery"> <label for="config-email" class="control-label col-xs-5"> want send out email? </label> <input type="checkbox" id="config-email" onclick="toggleswitchmessage('config-email', 'enable-msg', 'disable-msg')" checked/> </div> <div class="email-config-msg"> <p id="enable-msg"> emails sent. </p> <p id="disable-msg"> no email sent.<br/> please remember, must turn email on again if want emails sent during login session. </p> </div> and jquery: function toggleswitchmessage(checkid, firstcommentid, secondcommentid) { var check_box = ...

javascript - Jquery: I am using left side panel and on click on the button list i want to change the content -

jquery: using left side panel(angular js) , on click on button list want change content on right side div tag without page reload. <div id="container"></div> i using 3 jsp pages should replaced in container on button click.these 3 jsp pages linked through href. <a class="click" href="home" rel="http://localhost:8080/dummy/status.jsp">home</a> <a class="click" href="about" rel="http://localhost:8080/dummy/dummy2.jsp">about</a> <a class="click" href="contact" rel="http://localhost:8080/dummy/dummy3.html">contact</a> problems facing: when simple html (ex <p>hello world</p>) it loads content when load jsp page developed using angular js gives me warning: tried load angular more once,and website doesnt respond. this jquery load content: $('.click').click(function(e){ e.p...

android - Complete code for calling the object of category.java in main activity -

i have class name category.java in eclipse , want display attributes of through mainactivity.java calling object of category.java in mainactivity.java . how can ? category.java file package com.example.tabstest; public class catagory { private int id; private string name; private string desc; private int image; public catagory(int id, string name, string desc) { super(); this.id = id; this.name = name; this.desc = desc; } public catagory(int id, string name, string desc, int image) { super(); this.id = id; this.name = name; this.desc = desc; this.image = image; } public int getid() { return id; } public void setid(int id) { this.id = id; } public string getname() { return name; } public void setname(string name) { this.name = name; } public string getdesc() { return desc; } public void setdesc(string desc) { this.desc = desc; } public int getimage() { return image; } public void setimage(int image) { t...

c++ - Tricky substring problems -

i'm having problem substrings, have string in format below i'm using getline. richard[12345/678910111213141516] murdered what have been using find_last_of , find_first_of positions in between brackets , forward slashes retrieve each field. have working , functional have ran problem. name field can 32 characters in length, , can contain / , [] when ran user url name did not that. numbers random on per user basis. i'm retrieving each field string, name , 2 identifying numbers. another string can this, grabbing 6 total substrings. richard[12345/678910111213141516] murdered ralph[54321/161514131211109876] which just huge mess, thinking doing starting , moving front, if second name field (ralph) contains / or [] going ruin count retrieving first part. insight helpful. thank you. in nutshell. how account these. names can contain alpha / numerical , special character. richard///[][][12345/678910111213141516] murdered ralph[/[54321/161514131211109876] the e...

javascript - Cannot read undefiend of '.html' -

trying create new webserver using nodejs, got error saying .html undefined. var mimetype = { "html" : "text/html", "jpeg" : "image/jpeg", "jpg" : "image/jpeg", "png" : "image/png", "js" : "text/javascript", "css" : "text/css" }; http.createserver(function(req,res){ var uri = url.parse(req.url).pathname; var filename = path.join(process.cwd(),unescape(uri)); console.log('loading '+uri); var stats; try{ stats = fs.lstatsync(filename); }catch(e){ res.writehead(404, {'content-type':'text/plain'}); res.write('404 not found\n'); res.end(); return; } // check if file/directory if(stats.isfile){ //error happen here var mimetype = mimetype[path.extname(filename)].split(".").reverse()[0]; res.writehead(200, {...

openssl - boringSsl makes mistake in android M -

it seems android m moving away openssl boringssl library according behavior-network [boringssl] .but how deal openssl connection in app before? app has problem: 09-30 10:40:54.241 6211-6624/com.hundsun.winner w/system.err﹕ caused by: javax.net.ssl.sslprotocolexception: ssl handshake aborted: ssl=0xd6dcce00: failure in ssl library, protocol error 09-30 10:40:54.241 6211-6624/com.hundsun.winner w/system.err﹕ error:100c1069:ssl routines:ssl3_get_server_key_exchange:bad_dh_p_length (external/boringssl/src/ssl/s3_clnt.c:1193 0xe93a350f:0x00000000) 09-30 10:40:54.241 6211-6624/com.hundsun.winner w/system.err﹕ @ com.android.org.conscrypt.nativecrypto.ssl_do_handshake(native method) 09-30 10:40:54.241 6211-6624/com.hundsun.winner w/system.err﹕ @ com.android.org.conscrypt.opensslsocketimpl.starthandshake(opensslsocketimpl.java:324) 09-30 10:40:54.241 6211-6624/com.hundsun.winner w/system.err﹕ … 5 more your server using dh group size less 1024 bits? try increas...

wordpress - How to hide/remove specific category title from all woocommerce? -

i want hide title of specific category visitors in woocoomerce pages? if want remove title of category page title, can woocommerce_show_page_title conditionally remove title page.if more specific want achieve can in better way.

bytearray - How to show byte array elements in Listview? -

Image
i have byte array: byte[] myarray={6,23,44,34,56,23,32,13,67,45}; i want show elements in listview this: what command should use? use arrayadapter,just this: { byte[] myarray={6,23,44,34,56,23,32,13,67,45}; arrayadapter<string> adapter = new arrayadapter<string>(this,android.r.layout.simple_list_item_1,myarray);//use system has achieved xml file simple_list_item_1 setlistadapter(adapter); }

windows - Print File Descriptions from all files in a folder, wmic command -

Image
this works for /r "d:\folder\" %i in (*) @echo %i but doesn't for /r "d:\folder\" %i in (*) @wmic datafile name=%i description using reference first command, wrote wmic command. doesn't work. gives multiple errors... node - <machine name> error: description = invalid query what's problem here. how print file descriptions of files in folder. update : added '' around %i for /r "d:\folder\" %i in (*) @wmic datafile name='%i' description now gives me no instance(s) available. error? question : why wmic datafile description doesn't give file description in file properties dialog box? how file description. you same output , lot faster using dir /s /b "d:\folder\*" but, question how queries wmic each file @echo off setlocal enableextensions disabledelayedexpansion /r "d:\folder" %%a in (*) ( set "folder=%%~pa" /f "token...

java - how to refer part of an array? -

given object byte[] , when want operate such object need pieces of it. in particular example byte[] wire first 4 bytes describe lenght of message 4 bytes type of message (an integer maps concrete protobuf class) remaining byte[] actual content of message... this length|type|content in order parse message have pass content part specific class knows how parse instance it... problem there no methods provided specify where parser shall read array... so end doing copying remaining chuks of array, not effective... as far know in java not possible create byte[] reference refers original bigger byte[] array 2 indexes (this approach string led memory leaks)... i wonder how solve situations this? suppose giving on protobuf because not provide parsefrom(byte[], int, int) not make sence... protobuf example, lack api... so force write inefficient code or there can done? (appart adding method)... in java, array not section of memory - object, have additional fields (a...

swift - iOS add overlay to entire MapView -

how can add gray overlay entire mapview ? on center of map have mkcircle() uiview above mapview not solution. http://i.stack.imgur.com/cdxuc.png

php - Visual Composer boxed view -

i haven't been working visual composer ages. problem don't know how set page.php properly. i creating scratch. have bootstrap included , newest version of visual composer installed in wordpress. want have option: https://www.youtube.com/watch?v=rkdywxwqijg as content fullwidth. want content in boxed view have option stretch rows in video. page.php far looks this: <?php define('theme_template', true); define('is_fullwidth', true); get_header();?> <div id="contentarea"> <?php while (have_posts()) : the_post(); ?> <?php the_content(); ?> <?php endwhile; ?> </div> <?php get_footer();?> so appreciate help. how should page.php if want achieve of video. in advance. if i'm getting correctly want achieve stretch row facility of visual composer. in case contenarea div should have boxed width in css - @contentarea { width: 1170px; overflow: visible; } a...

javascript - Jquery to check if inside element -

i'm trying add class element if user has clicked inside it. all usual rules apply - "inside" means inside child, grandchild etc. if inside, need add class - if outside class should removed. i've pieced example, works, non-javascript man, i'd appreciate feedback whether it's reasonable approach, , if can improved on - improved, refer jquery/javascript performance. any advice appreciated. $("body").click(function (e) { $fs = $(e.target).closest("fieldset.expand"); if ($fs.length) { $fs.addclass("focus"); } else { $("fieldset.expand").removeclass("focus"); } }); <body> <fieldset class="expand"> <input type="text" /> <input type="text" /> <input type="text" /> </fieldset> </body> makes fieldset focusable (but not tabbable), using tabindex ...

android - Collapsing Toolbar Title Disappear -

i'm on design support library 23.0.1, , i'm using collapsing toolbar layout parallax image. don't understand why when toolbar totally collapsed (pinned) if click on action button (specifically refresh image), title disappear . after if drop down header total expansion , reclick action button title returns. activity layout <!-- app bar --> <android.support.design.widget.appbarlayout android:id="@+id/app_bar" android:layout_width="match_parent" android:layout_height="150dp" android:fitssystemwindows="true" android:theme="@style/themeoverlay.appcompat.dark.actionbar"> <!-- collapsing toolbar layout --> <android.support.design.widget.collapsingtoolbarlayout android:id="@+id/collapsing_toolbar" android:layout_width="match_parent" android:layout_height="match_parent" android:fitssystemwindows="true" ...

angularjs - Angular schema form access Object with Arrays from Form -

i have scenario need display arrays in side named object this: "actions": { "singleselection": [ { "chartable": false, "label": "" } ] } i have accomplished following schema: "schema": { "type": "object", "title": "smart_report", "properties": { "actions": { "title": "actions", "type": "object", "properties": { "singleselection": { "title": "action: single selection", "type": "array", "maxitems": 10, "items": { "type": "object", "properties": { "field": { "title": "field name", ...

MapReduce job is stuck on a multi node Hadoop-2.7.1 cluster -

i have run hadoop 2.7.1 on multi node cluster (1 namenode , 4 datanodes). but, when run mapreduce job (wordcount example hadoop website), stuck @ point. [~@~ hadoop-2.7.1]$ bin/hadoop jar wordcount.jar wordcount /user/inputdata/ /user/outputdata 15/09/30 17:54:56 warn util.nativecodeloader: unable load native-hadoop library platform... using builtin-java classes applicable 15/09/30 17:54:57 info client.rmproxy: connecting resourcemanager @ /0.0.0.0:8032 15/09/30 17:54:58 warn mapreduce.jobresourceuploader: hadoop command-line option parsing not performed. implement tool interface , execute application toolrunner remedy this. 15/09/30 17:54:59 info input.fileinputformat: total input paths process : 1 15/09/30 17:55:00 info mapreduce.jobsubmitter: number of splits:1 15/09/30 17:55:00 info mapreduce.jobsubmitter: submitting tokens job: job_1443606819488_0002 15/09/30 17:55:00 info impl.yarnclientimpl: submitted application application_1443606819488_0002 15/09/30 17:55:00 info mapred...

makefile - problems when installing git -

i cloned current source tree , tried build , following error. tell me why , if there easy way fix it? i’m running on ubuntu system. build steps: $ make configure ;# $ ./configure --prefix=/usr ;# $ make doc ;# (errors occur) . . . asciidoc technical/shallow.html asciidoc technical/trivial-merge.html gen technical/api-index.txt asciidoc technical/api-index.html sed "s|@@man_base_url@@|file:///usr/local/share/doc/git/|" manpage-base-url.xsl.in > manpage-base-url.xsl asciidoc git-add.xml xmlto git-add.1 compilation error: file /tmp/xmlto-xsl.orar7p line 6 element include xsl:include : invalid uri reference /home/gary/下载/git/documentation/manpage-normal.xsl compilation error: file /tmp/xmlto-xsl.orar7p line 7 element include xsl:include : invalid uri reference /home/gary/下载/git/documentation/manpage-base-url.xsl make[1]: *** [git-add.1] 错误 1 make[1]:正在离开目录 `/home/gary/下载/git/documen...

sql - insert large volume of data in mysql -

i want insert atleast 500,000 fresh records in 1 shot. have used while loop inside procedure. query working fine taking alot of time execute. so, looking solution using can make process of insertion of large volume of data faster. have gone through many links didn't find them resourceful. note: i want insert fresh data, not data existing table. syntactically code provided below correct , working. please not provide suggestions regarding syntax. below procedure: begin declare x int; declare start_s int; declare end_s int; set x = 0; prepare stmt 'insert primary_packing(job_id, barcode, start_sn, end_sn, bundle_number, client_code, deno, number_sheets, number_pins, status) values (?,?,?,?,?,?,?,?,?,?)'; set @job_id = job_id, @barcode = barcode, @bundle_number = bundle_number, @client_code = client_code, @deno = deno, @number_sheets = number_sheets, @number_pins = number_pins, @status = 1; set @start_sn = start_sn; set ...

java ee - Not able to see special subject "AllAuthenticatedInTrustedRealms" while mapping security roles to users in Websphere 8.0.0.9 -

we not able see " allauthenticatedintrustedrealms" option in map special subjects while mapping security role users in websphere 8.0.0.9 in websphere 8.0.0.8 have it. is there configuration needed see option mapping security roles users our web application??? i suspect there may configuration missing. please here. appreciations earlier reply. the allauthenticatedintrustedrealms available if have other external realms defined (independent of whether define other security domains). external realms defined federated repositories configuration page clicking trusted authentication realms - inbound . if add external realm list, should see option allauthenticatedintrustedrealms . if have defined (like in 8.0.0.8 case configurations identical), might want open pmr ibm address it.

jsf - Can the Flash data be persisted after redirection? -

Image
using jsf 2.1.29 in list.xhtml <p:commandlink id="ownerviewlinkid" value="#{petowner.firstname} #{petowner.lastname} " action="#{ownerandpetlistbean.viewpetownerfrmlist(petowner.id,petowner.userid,0)}" onclick="pf('progrees_db').show()" oncomplete="pf('progrees_db').hide()" style="color:#0080ff;"> </p:commandlink> in listbean (viewscoped), public void viewpetownerfrmlist(string owneridstr, string useridstr, string petidstr) { try { facescontext.getcurrentinstance().getexternalcontext().getflash().put("ownerid",owneridstr); facescontext.getcurrentinstance().getexternalcontext().getflash().put("userid",useridstr); facescontext.getcurrentinstance().getexternalcontext().getflash().put("petid",petidstr); facescontext.getcurrentinstance().getexternalcontext() ...