Posts

Showing posts from February, 2014

node.js - Nodejs (socket.io) memory usage compared to JavaScript's primitive data type memory usage -

first off, title may poorly defined or misleading, pretty tries summarize question whole. i've searched lot without getting questions answered. how socket.io memory allocation through memorystorage (socket.get/socket.set) work , how memory usage approximately 1 socket.set use? memory freed correctly when socket disconnects? optional: there known memory leaks should aware of in v0.11.0-pre? how javascript's garbagecollector work objects , associative arrays declared in global scope? memory freed when "delete" key-value pair this: "delete object[key];"? or ram continuely increase client requests increase? how option 1 , 2 compared each other? should use socket.set on globally declared "maps" when comes increasing , freeing memory? optional: how compared each other when comes performance ("executing" socket.get/object[key])? as basic information on project, i'm developing game server in node.js (single process) expected acc

c# - Why DataDriven tests no longer run on Jenkins when using MSTest? -

i have suite of webdriver tests written c# , using mstest runner. @ point nunit not option, need figure out how make work current configuration. ci using jenkins ver. 1.514. not in control of plugins being installed or when jenkins updated , if asking such thing might lead long wait , approval processes in different teams (hate birocracy). so.. have few datadriven tests defined follows(i'll paste in 1 of them) [datasource("microsoft.visualstudio.testtools.datasource.csv", "usersdata.csv", "usersdata#csv", dataaccessmethod.sequential)] [testmethod()] public void test_login() { logger.info(""); logger.info("-----------------------------------------------------------------"); so, should clear enough using usersdata.csv file, placed in testdata folder in project. run test in jenkins, used use command line mstest /testmetadata:"%workspace%\seleniumjenkins.vsmdi" /testlist:jenkins /resu

c++ - Turbo C Database in Notepad -

i'm working on case study myself - japanese english dictionary using turbo c , notepad. relevant part of code: #‎include‬ <stdio.h> main() { file *a; char word[20], ans[1]; clrscr(); a=fopen("dictionary.dbf","a"); { printf("add word: "); scanf("%s",&word); fprintf(a,"%s \n",word); printf("add one? (y/n)"); scanf("%s",ans); }while(strcmp(ans,"y")==0); fclose(a); } this code enables me insert word tc , saves notepad. unfortunately, don't know how print word notepad display tc. i need little guys. case study, , case study without having group. just few easy steps. your notepad file open file fopen(const char * filename, const char * mode) . when open file read file fread(void * ptr, size_t size, size_t count, file * stream) now final step... print on console or anywhere want, can us

beautifulsoup - split a table into several with Beautiful Soup [Python] -

i need problem can't find out... i have html table tr , td: for example: <table border="0" cellpadding="0" cellspacing="0"> <tr> <td> </td> </tr> <tr> <td colspan="2"> <br /> <h2> macros </h2> </td> </tr> <tr> <td> #define&nbsp; </td> <td> <a class="el" href="#g3e3da223d2db3b49a9b6e3ee6f49f745"> snd_lstindic </a> </td> </tr> <tr> <td class="mdescleft"> &nbsp; </td> <td class="mdescright"> liste sons indication <br /> </td> </tr> <tr> <td colspan="2"> <br /> <h2> définition de type </h2> </

Turning list of atoms into a single list using recursion -

i'm looking answer turns list of atoms single list recursively. an example be, (slist '(a (b c) (d e (f) g) h)) (slist (a b c d e f g h)) any answer helpful. what you're trying called flattening list. here bunch of options: ; required predicate (define (atom? x) (and (not (null? x)) (not (pair? x)))) ; naïve version using append (define (flatten1 lst) (cond ((null? lst) '()) ((not (pair? lst)) (list lst)) (else (append (flatten1 (car lst)) (flatten1 (cdr lst)))))) ; naïve version using append, map, apply (define (flatten2 lst) (if (atom? lst) (list lst) (apply append (map flatten2 lst)))) ; efficient version using fold-left (define (flatten3 lst) (define (loop lst acc) (if (atom? lst) (cons lst acc) (foldl loop acc lst))) (reverse (loop lst '()))) ; efficient version no higher-order procedures (define (flatten4 lst) (let loop (

sql server - SQL dynamic ORDER BY using alias -

using sql server, can order normal select query using alias: select u.firstname + ' ' + u.lastname physicianname, count(r.id) referralscount referrals r inner join users u on r.physicianid = u.id group r.physicianid, u.firstname, u.lastname order physicianname however, attempting same thing dynamic order by : select u.firstname + ' ' + u.lastname physicianname, count(r.id) referralscount referrals r inner join users u on r.physicianid = u.id group r.physicianid, u.firstname, u.lastname order case when @orderby = 'physicianname' physicianname end, case when @orderby = 'referralscount' referralscount end produces following error: msg 207, level 16, state 1, line 10 invalid column name 'physicianname'. msg 207, level 16, state 1, line 11 invalid column name 'referralscount'. column aliases defined in select can used in order by on own. not in expre

java - <li> tag Xpath location -

there many list elements in xml class name: <li class="name"> <div>....</div> ...... </li> set location "//*li[@class='name']" throws javax.xml.transform.transformerexception: illegal tokens: 'li', '[', '@', 'class', '=', ''name'', ']' how list elements via xpath location? remove * , i.e. instead of //*li[@class='name'] you need use //li[@class='name']

ios - creating UIView prevents IBAction being sent -

i trying draw uiview screen while simultaneously moving other ui elements out of it's way. both events triggered same uiswitch. when don't draw uiview ui elements move should, when call action draw uiview, ui elements don't move should. have no idea why happening, appreciated. here function adds , removes view: - (ibaction)showhidemynewview:(uiswitch *)sender { if (_myswitch.on) { [self.view addsubview:mynewview]; } else { [mynewview removefromsuperview]; } here function moves other ui elements make room uiview: - (ibaction)moveuielementsforpainintensityview:(id)sender { _myswitch = (uiswitch *)sender; if (_myswitch.on) { [_labelone moveto:cgpointmake(50, 350) duration:0.5 option:0]; [_labeltwo moveto:cgpointmake(50, 400) duration:0.5 option:0]; [_labelthree moveto:cgpointmake(50, 450) duration:0.5 option:0]; [_labelfour moveto:cgpointmake(50, 500) duration:0.5 option:0]; } else { [_labelone moveto:cgpointmake(50, 150) duration:0.5

c# - Using a validation summary to display label text -

i have taken on maintenance of site makes calls through wcf service. there validation summary displays in message box validators on client-side. have label fires if exceptions arise web service calls. after tweaking layout, label sits in inconvenient spot. want know if there way display label text in validation summary should exception fire in code behind. any advice appreciated. example in cs file: bool resultuserexistence = register.checkuniquenessuserid(txtuserid.text); if (resultuniquenessemail == null) { continue through code... } else { lblexception.text = "please choose different user name. current user name registered."; } validation summary: <asp:validationsummary id="valsummary" runat="server" headertext="please correct following error(s):" displaymode="list" forecolor="#ff9999" showmessagebo

jquery - Strip span and put into input -

this should pretty simple - content h1 tag, strip span tag , put remaining input tag i have html: <div id="contentarea"> <h1><span>course</span>arrangementname<h1> <input type="hidden" id="arr1form_arrangement" name="arr1form_arrangement"> </div> jquery var eventname = $('#contentarea h1').html(); eventname.find("span").remove(); var eventnametrim = eventname.html(); //alert(eventnametrim); $( "input[name*='form_arrangement']" ).val( eventnametrim ); but nothing happens - alert empty. firebug tells me "eventname.find not function" it's jquery 1.9.0 can please telle me whats going on? if desired output arrangementname problem first line, should be: var eventname = $('#contentarea h1'); ...because makes eventname jquery object, on can use .find() span , remove existing second line. though removes span elem

What does an underscore "_" mean in CSS? -

i found following snippet in css file: position: fixed; _position: absolute; what underline mean in front of second position statement? this old css-hack ie5, 5.5 & 6 . browser display position:fixed while ie5 - 6 use _position , display absolute . but note: css won't validate! , won't work ie5/mac

zk button using Watir generates error indicating no button is present -

i´m testing zk form, , want click button. zk code following: <zk:button id="btnlogin" label="entrar" onclick="wndlogin.onlogin()" style="font-weight: bold; font-size:12px;" /> my watir code shown below: browser.button.click i have 1 button on page. when run script, error indicates button not exist on page. i believe problem caused namespace - ie 'zk'. have been elements or attributes in namespace using css selectors: browser.element(:css => 'zk\:button').click note colon needs escaped.

apache - Rewrite rule for replacing a single character. Once -

i need .htaccess files , mod_rewrite. now i've got script sms payment provider, executes different tasks according variables parse it. problem is, script called like: http://examp.le/path/script.php&param1=x&param2=whatever&param3=823 and on. this, know, wrong. first character should query mark, not ampersand. need write rewrite rule replace first occurence of ampersand query mark. i've never been @ regex, or htaccess in general. but. if you're answering, please explain characters , how in world work. thank in advance. enable mod_rewrite , .htaccess through httpd.conf , put code in .htaccess under document_root directory: options +followsymlinks -multiviews # turn mod_rewrite on rewriteengine on rewritecond %{the_request} \s/(script\.php)&(param1=[^\s]+) [nc] rewriterule ^ /%1?%2 [r=302,l] once verify working fine, replace r=302 r=301 . avoid using r=301 (permanent redirect) while testing mod_rewrite rules.

download - Using wildcards in wget or curl query -

is possible use wildcards in wget queries when downloading directories? basically, have site, say, www.download.example.com/dir/version/package.rpm . howevery, version directory changes time , contains multiple rpm packages. there single wget query me , packages in version directory without knowing version is? in ideal world, query like: wget www.download.example.com/dir/*/*.rpm if there way curl , work well. you can't use wildcards in wget -a flag should work. wget manpage : you want download gifs directory on http server. tried wget http://www.server.com/dir/*.gif , didn't work because http retrieval not support globbing. in case, use: wget -r -l1 --no-parent -a.gif http://www.server.com/dir/ edit: found related question regarding directories: there's utility called lftp , has support globbing. take @ manpage . there's question on linux & unix covers usage in scenario similar yours.

javascript - Displaying radio button value total -

i working on interactive checklist needs count how many "yes" , "no" answers user has selected , display total either in alert box or on page. yes answer gets value of 1, , no gets value of 0. the problem is, when clicking total button, displaying value of each answer , total - need display total. i have poked around solutions, , have modified code based on have found. pretty new javascript, must missing something. here code: <script type="text/javascript"><!-- $(document).ready(function () { $('input:radio').on('change',function(){ var $first_question = parseint($("input[name=first_answer]:checked").val()); var $second_question = parseint($("input[name=second_answer]:checked").val()); $first_question = $first_question? $first_question : 0; $second_question = $second_question? $second_question : 0; var $total_score = $first_question + $second_question; { $(&q

java - How to reset android service memory -

the issue restarting service , memory still tied up. button @ main activity. call stopsevice startservice method @override public void onbackpressed() { stopservice(new intent(this, autoalarmservice.class)); startservice(new intent(this, autoalarmservice.class)); finish(); } -- service restarts memory doesn't reset. service sitting on 50mb of memory , has been running couple hours. method resets doesn't free memory. there obscure method i'm missing can use free memory? public class autoalarmservice extends service { public static final string defaultname = "defaultfile"; random ran = new random(50000); imagebutton iblautomationitem, ibautosearchsettings, ibfinshautoitem; button ibautolocation, ibautocategory; edittext etname, etkeywords; int numz; static final int uniqueid[] = { 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 2000 }; stringbuffer npochecking = new stringbuffer();

c++ - Create a Python3 module at runtime while initialize an embedded Python -

we have dll implements custom programming language. want adding support python language keeping same code "api function". i have succefully embedded python in dll, i'm approaching problem expose old function python module. now dll doesn't expose api function interface function it's installed (as function pointer) language engine. in way it's impossible create new python module (a new dll). need keep compatibility old method... it's possible create (and install) @ runtime module defined in same dll python located? i think calling pyinit_xxxx method after pyinitialize(); i've solved using code before py_initialize(); /* add built-in module, before py_initialize */ pyimport_appendinittab("xxx", pyinit_xxx);

How do you convert an xcode project into a cocoapod? -

i have piece of code find reusing in multiple different projects i'd make cocoapod , use private cocoapod repo. my question how setup xcode project cocoapod? should static library or empty 'project' appdelegate ok? seems not want appdelegate or main.m in pod, sure makes easier run , debug. thanks a cocoapod can simple couple of files. it's in how define in podspec. include relevant source code files in podspec (no main.m or unless have reason so). recommendation have source directory in top-level of repo containing relevant source files. if want have demo project show how use it, can on same level, , use files source directory (don't copy them somewhere under demo project directory). having actual xcode project not required have pod. you have close demo of basic podspec: pod::spec.new |s| s.name = 'reachability' s.version = '3.1.0' s.license = :type => 'bsd' s.homepage = 'http

html5 - html th 3 cells rowspan colspan -

im not familiar rowspan , colspan enough... im trying html (maybe css?) : ------------------------------------------ | | divided col | | | |___________________| | | col 1 | part | part b | col 3 | | | | | | ------------------------------------------ | data 1 | data 2a | data 2b | data 3 | is possible? or use sort of image? jsfiddle example <table> <tr> <td rowspan="2">col 1</td> <td colspan="2">divided col</td> <td rowspan="2">col 3</td> </tr> <tr> <td>part a</td> <td>part b</td> </tr> <tr> <td>data 1</td> <td>data 2a</td> <td>data 2b</td> <td>data3</td> </tr> </table>

java - Accessing specific ArrayList elements, when the ArrayList changes frequently -

i have arraylist stores object foo . let's want add 10 of objects foo arraylist , following: for (int = 0; <10 ; i++){ arraylist.add(new foo()); } while solution works, problem is, how access, ninth foo, after third , fourth foo has been deleted away arraylist? i cannot do arraylist.get(9); anymore, since throw indexoutofboundsexception . i want able make program dynamically, since in case number of foos not fixed, , can deleted @ time. you need have items in specific order , may not remember foo inserted @ index, map<integer, foo> perfect. map<integer,foo> map = new hashmap<integer, foo>(); map.put(1, new foo()); map.put(2, new foo()); etc per comments, map = treemap<integer, foo>() might better.

sql server - Optimize SQL Sub-Query for Max Value -

i have following query: select dlp.paramid paramid, dp.paramname paramname, dlp.locid locationid, ml.locname locationname , di.entered_on dateentered, dlp.freqdays frequency data_locparams dlp inner join data_input di on dlp.locid = di.locid inner join data_parameters dp on dp.paramid = di.paramid inner join map_locations ml on ml.locid = dlp.locid ( (dlp.freqdays not null) , di.entered_on < (getutcdate() - dlp.freqdays)) , di.entered_on = (select max(entered_on ) data_input locid = dlp.locid , paramid = dlp.paramid) i need assistance on how optimize query. bottleneck seems followng: di.entered_on = (select max(entered_on ) data_input locid = dlp.locid , paramid = dlp.paramid) note given enter_on, need max entered_on date based on locid , paramid. i tried following did not intended result: select * ( select dlp.paramid paramid, dp.paramname paramname, dlp.locid l

datatable - Primefaces p:commandLink not working in p:datatTable -

i don't it... why p:commandlink not working? page refreshing same amount of data in table. i'm supposing controller okay. take look.\ view: <?xml version='1.0' encoding='utf-8' ?> <!doctype html public "-//w3c//dtd xhtml 1.0 transitional//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui"> <body> <ui:composition template="./template.xhtml"> <ui:define name="content" > <f:view> <h:form style="padding: 5px"> <p:datatable id="datatable2" var="item" value="#{warnin

autocomplete - Autocompletion for GtkAda in GNAT GPS -

i'm getting started ada , gtkada development using gnat gps (gnat programming studio), , there frustrating me: autocompletion (ie: intellisense, or whatever want call it) works code, not gtkada library. makes things quite slow , boring, since have check every api call on gtkada documentation every time. so question simple: there way enable auto completion gtkada on gps? ok, seems problem gnat 2012, updated gnat 2013 , autocomplete works perfectly. simon wright hint.

javascript - prototype stop and continue event after AJAX call -

i have form. execute ajax call on form submit, , after execution continue form submiting. here code example: $('myform').observe('submit', function(e) { e.stop(); new ajax.request('/myurl', { method:'get', oncomplete: function(transport) { //here continue form submitting }, }); });

EGL/OpenGL ES/switching context is slow -

i developing opengl es 2.0 application (using angleproject on windows developement) made of multiple 'frames'. each frame isolated application should not interfere surrounding frames. frames drawn using opengl es 2.0, code running inside of frame. my first attempt assign frame buffer each frame. there problem - opengl's internal states changed while 1 frame drawing, , if next frame doesn't comprehensively reset every known opengl state, there possible side effects. defeats requirement each frame should isolated , not affect 1 another. my next attempt use context per frame. created unique context each frame. i'm using sharing resources, can eglmakecurrent each frame, render each own frame buffer/texture, eglmakecurrent globally, compose each texture final screen. this great job @ isolating instances, however.. eglmakecurrent very slow. little 4 of them can make take second or more render screen. what approach can take? there way can either speed contex

android - When I scroll of the custom listview in fragment, it's content doesn't seem -

Image
i have custom listview in tabhost in fragment. when scroll custom listview, textview contents destroy, seem empty . here codes public class myfragment extends fragment { private tabhost tabhost; private view view; private arraylist<string> list = new arraylist<string>(); private arraylist<string> listmydataids = new arraylist<string>(); private listview lstviewmydata; private sql sql; private mydataadapter adpmydata; private int = 0; @override public view oncreateview(layoutinflater inflater, viewgroup container, bundle savedinstancestate) { view = inflater.inflate(r.layout.activity_content, container, false); initialize(); sql = new sql(view.getcontext()); sql.opentoread(); listmydataids = sql.get(list); sql.close(); adpmydata = new mydataadapter(view.getcontext()); return view; } @override public void onactivitycreated(bundle savedinstancestate) { super.onactivitycreated(savedinstancestate); sql = new sql(view.ge

google apps script - Set the name of the document when it is created -

Image
i trying edit "generate template" script. script based on template inputs information spreadsheet document. how works except names document copy of template row number. isn't efficient trying use for. question how able 1 of these options: a: have name based on cell in row. example, there column named claim # , department. both of make title each document. document be: " {department name} {claim #} " based on information in column in row exported. b: have box put in when generating document asks want file named. thank help! ps: if needed columns use name of document are: column e column d. this code: (i did not make this, found in gallery.) function generatedocument(e) { var template = docslist.getfilebyid(e.parameter.templates); var row = e.parameter.row var mydocid = template.makecopy(template.getname()+" - "+ row).getid(); var mydoc = documentapp.openbyid(mydocid); var copybody = mydoc.getactivesection(); var sheet = sprea

Trying to add the result of a QGeoSearchReply to a maps::DataProvider in Blackberry 10 Cascades (C++, QT & QML) -

i trying add result of qgeosearchreply maps :: dataprovider, , have found function called converttogeolist @ this site , , trying use it, documentation doesn't tell me class function part of - geo class doesn't seem exist in blackberry cascades. anyway - here code have come with: void mapper::mapsearchresults(qtmobilitysubset::qgeosearchreply *reply) { disconnect(mapsearchmanagerengine_, signal(finished(qtmobilitysubset::qgeosearchreply*)), this, slot(mapsearchresults(qmobilitysubset::qgeosearchreply*))); maps :: dataprovider provider; provider.add(bb :: platform::geo::converttogeolist(reply->places())); maps::mapdata mapdata; mapdata.addprovider(&provider); mapview_->setmapdata(&mapdata); } but end error: error: 'converttogeolist' not member of 'bb :: platform::geo'- could please clarify how this? you right: bb::platform::geo not class. it's namespace. regarding converttogeolist() , it'

java - How do I remotely invalidate user's servlet session on-the-fly? -

i have page accounts alpha permissions may access. jsp checks session attribute named "alphaperm" . but problem i'm struggling if find user messing/abusing alpha testing permissions, want stop him immediately. can change permissions in database right away doesn't stop abuser right away. a possible solution checking database every time users something, don't want because slow database down. so how kill session on-the-fly (creating admin page plan, how users session object)? want make admin page can ban user. you can keep references user sessions implementing httpsessionlistener . this example shows how implement session counter, keep references individual sessions storing them in context scoped collection. access sessions admin page, inspect attributes , invalidate of them. this post may have useful info. edit : here's sample implementation (not tested): public class mysessionlistener implements httpsessionlistener { static public

ruby - Use Pry in gems without modifying the Gemfile or using `require` -

i trying debug gem that's used rails app. i cloned gem locally go prying around (and allows me nice things such git bisect , etc.) # gemfile gem "active_admin", path: "~/dev-forks/active_admin" however, stuck adding pry gemfile somewhere able use it, or calling require "pry" live in code though don't want in there. example, forget it, fix bug, , commit project pry in gemfile. should not that, loaderror arise, cannot load such file -- pry (loaderror) . i have admin i'm bit lost between different contexts (rails project, gem, local ruby) , actual gems (gemfile, require, installed). how can use binding.pry in gem within rails, without intervention of gemfiles? jon past! know, have answers (almost) problems. in case, you're describing 2 problems: (a) can't require 'pry' when pry not in gemfile, (b) can't use pry if don't require it. what bundler does, conrad irwin writes : bundler aweso

Secret Token Error in Rails App -

i'm running error on new rails app , has me bit confused. can start rails server , load index page fine, when try load other page get arguemnterror: secret required generate integrity hash cookie session data. use config.secret_token = "some secret phrase of @ least 30 characters"in config/initializers/secret_token.rb now makes strange have verified indeed have .secret file. modified secret_token.rb file generate random .secret file per mike hartl tutorial. have checked .secret file indeed exist. in fact, deleted , restarted server make sure generate new one, , did. contents of .secret file indeed contain string of greater 30 characters. , yet getting error. i'm not sure i'm missing here. i did googling , appears felt error related race condition caused accessing site after starting server. restarted server, waiting 5 minutes, , accessed site. same issue. @ loss understand why getting error. appreciated. i had switch last line of secre

javascript - Start over from first image when slide has reached end -

when slide through images reaches end, stops. have tried make start over, can't make happend. hope can me archieve this, taking base in code. followed som tutorials on how create image slider jquery, don't want go away code have written (if that's possible). solutions i've found far written total different ideas. here html code: <body style="background-color: lightblue"> <div> <div id="slider" style="margin-left: auto; margin-right: auto; width: 800px; height: 800px; margin-top: 100px;"> <img src="./images/dogs.jpg" style="position: absolute;" class="active" /> <img src="./images/pic.jpg" style="position: absolute;" /> <img src="./images/mal.jpg" style="position: absolute;" /> </div> </div> and here js code: function startslide() { var $current = $('div #slider i

java - How to resize jdialog buttons? -

here's code: joptionpane pane = new joptionpane(findarray, joptionpane.question_message, joptionpane.default_option); pane.setoptions(new object[]{findpreviousbutton, findnextbutton}); final jdialog dialog = pane.createdialog(myjframe, "find"); dialog.setdefaultcloseoperation(jdialog.dispose_on_close); dialog.setvisible(true); findarray consists of jlabel findlabel , jtextfield findfield. myjframe jframe. findpreviousbutton , findnextbutton 2 jbuttons replacing default "ok" , "cancel" buttons with. both have custom icons , no text. jdialog window making icons size making them pixelated. how resize buttons width 60 , height 30? method .setsize(int, int) doesn't work , neither .setbounds(int, int, int, int) adjusting button margins should help: http://docs.oracle.com/javase/7/docs/api/javax/swing/abstractbutton.html#setmargin(java.awt.insets)

web services - org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222) -

i trying consume webservice using. client runs jsp pages hosted on tomcat. while trying consume service error: http status 500 - unexpected error: null i know problem on server side. using rpc style soap request. new java , web services need way faulty variable. how can resolve this? type exception report message unexpected error: null description server encountered internal error prevented fulfilling request. exception unexpected error: null org.apache.axis.message.soapfaultbuilder.createfault(soapfaultbuilder.java:222) org.apache.axis.message.soapfaultbuilder.endelement(soapfaultbuilder.java:129) org.apache.axis.encoding.deserializationcontext.endelement(deserializationcontext.java:1087) com.sun.org.apache.xerces.internal.parsers.abstractsaxparser.endelement(unknown source) com.sun.org.apache.xerces.internal.impl.xmldocumentfragmentscannerimpl.scanendelement(unknown source) com.sun.org.apache.xerces.internal.impl.xmldocumentfragmentscannerimpl

android - How to put a button on the default keyboard? I want a button that when is pressed, it chance to another activity -

i have edittext in activity. want when user finish text, can move next activity without press button hide keyboard. wondering if there way put button on softkeyboard move next activity. (sorry bad english, not native language) you can't add buttons existing keyboard. however, can suggest label , id custom ime action. see textview.setimeactionlabel : change custom ime action associated text view, reported ime actionlabel , actionid when has focus. you'll have call textview.setoneditoractionlistener provide custom listener listen ime event can move next activity.

javascript - How to add value to an object inside function? -

i loop through array , depending on conditions want add different values object. the first console.log() outputs value. second 1 doesn't output anything. why? , can it? desired outcome if of keywords inside nicecontact.fulladress, string should splitted , added using keyword. if none of values are, want fulladress=adress var nicecontact= {} nicecontact.fulladress = $.trim(contact[2]) //cut out lgh if it's in there. var keywords = ["lgh", "lgh"] nicecontact.adress = keywords.some(function(keyword){ if (nicecontact.fulladress.indexof(keyword) != -1){ adressarray = nicecontact.fulladress.split(keyword) nicecontact.adress = adressarray[0] console.log(nicecontact.adress) return adress; }else{ console.log('false') nicecontact.adress = nicecontact.fulladress } }) console.log(nicecontact.adress) thats not array.some for. shou

asp.net mvc - Adding files to the bin directory at Build and Publish -

i have 2 license files include in \bin directory both when build and publish. both files in app_data directory (their initial location doesn't matter, need end in \bin ) , have following properties set: build action = content copy output directory = copy always they in not \bin when build or publish. what wrong setup: settings, folders, files, else...? update i moved files out of app_data directory , placed them in project root , copied \bin on build. i've done in few projects expanding .csproject file slightly. following code should put directly beneath project node in webproject.csproj. afterbuild target copies set of files ("unreferenced dlls" in case) bin-folder when building visual studio. customcollectfiles same thing when deploying. <propertygroup> <unreferenceddlls>..\lib\unreferenced\**\*.dll</unreferenceddlls> </propertygroup> <propertygroup> <copyallfilestosinglefolderforp

list wordpress post titles from one category in multiple columns in alphabetical order -

i trying build kind of archive of client's projects, display @ bottom of each page, done in 'experience' section here: http://toth.com/#experience - except in case need full list of projects, not sub-headings or other structure. i have things setup each of client's projects post. need way display titles of posts, category i've created 'work archive' (so client can add , remove things archive easily, checking/unchecking category box in each post), in vertical alphabetical order, across 4 columns automatically resize fill container equally. each post title in archive needs link post, obviously. i have been scouring net days, , while i've found pieces of code they'll help, seems impossible (with limited php knowledge) integrate them fulfill of requirements. have looked many wordpress plugins, again no success. while i'll accept solution, ideally i'd rather solve @ php/template level, keep things hidden client backend possible. any on

javascript - Copy GridView to Another GridView on client (also ListViews) -

i have project collecting information on multiple tabs in asp.net web application. using microsoft ajax toolkit support tabs. once information collected, have included "review" tab summarizes information on other tabs. i started using updatepanel, found processing took far long, on order of 5-10 seconds when hosted on development workstation , on our web server. i moved using straight javascript on client side copy data 3 other tabs review tab success when handling text boxes , drop down lists. however, have 1 gridview containing text data , 1 listview containing photos need copied review panel. i have been unsuccessful in copying data new controls added hold data. when saving record, extracting data original tabs (which working well), don't need gridview , listview on review panels functional, data access perspective; controls need display data. 1 step- encapsulate areas need copy in div. 2 step- create function extract html of div , pasting dest

python - AttributeError: 'module' object has no attribute 'config' -

i'm new python , trying first applications. why getting attribute message: traceback (most recent call last): file "c:\users\myname\documents\visual studio 2010\projects\pythonapplication 1\pythonapplication1\runsikulionvm.py", line 97, in logging.config.dictconfig(log_dict_config_onvm) attributeerror: 'module' object has no attribute 'config' press key continue . . . here portion of code far: import os import sys import subprocess import fnmatch import datetime import logging import logging.handlers import logging.config """===global variables===""" logfile = r"v:/runtests.log" logdetails= r"v:/sikuliscriptdetails.log" failedtests = r"v:/failedtests.txt" """logging configuration""" # dictionary configuration logging within runsikulionvm.py log_dict_config_onvm = { 'version': 1, 'disable_existing_lo

php - How do I build / get libphp5.so? -

i running suse amazon image came pre loaded apache2 , php. have got website , running test index.html file, works. when index.php test browser tries download file. think because php / apache2 not configured correctly. the bit think need in httpd.conf loadmodule php5_module modules/libphp5.so i have added block already <files *.php> setoutputfilter php setinputfilter php limitrequestbody 9524288 </files> addtype application/x-httpd-php .php addtype application/x-httpd-php-source .phps i have installed apache2-mod_php5 via zypper expectation add libphp5.so somewhere - can't find it. have seen people mentioning built somehow in installation of php / apache. updated apache2 , php via zypper , nada. how file? the module called mod_php5.so , lives under /usr/lib64/apache2/mod_php5.so it's living there along lot of other mods, php5 module not included anywhere! so line add config (/etc/apache2/sysconfig.d/loadmodule.conf) loadmo