Posts

Showing posts from August, 2011

vba - How to Import XML to MS Access with Memo Data Type? -

i'm having error while using code: application.importxml filename, acappenddata by default, creates "relevantresults" table "text" datatype. not of data imported because truncated. i'm thinking of creating table 1 of field memo data type , append xml. how should when create new table "relevantresults"? how should define table used? if access destination table exists, importxml acappenddata parameter preserves structure of table. adds xml data table, assuming data compatible table fields' data types. create relevantresults table memo data type need it, run importxml fill table.

amazon ec2 - Running HMA VPN on remote server -

i trying setup hma vpn remote server on amazon ec2 machine (ubunutu 12.04.02), ip of outgoing traffic changes. but hma script start vpn connection, ssh connection local machine server gets lost. i think problem lies vpn client locking network adapter ssh server no longer able listen same port listening earlier. please suggest might causing problem?

fedora - What is required to compile a simple gtk D application -

i'm getting started in d , following examples on dsource.org specifically one: http://www.dsource.org/projects/gtkd/wiki/codeexamples simple gtk program. as using fedora installed gtkd , gtkd-devel using yum when come compile using dmd following error: gtkbasic.d(1): error: module mainwindow in file 'gtk/mainwindow.d' cannot read import path[0] = /usr/include/dmd/phobos import path[1] = /usr/include/dmd/druntime/import you need pass path gtk root folder -i compiler option (same in c). pkg-config should work, dmd $(pkg-config --cflags --libs gtkd2) gtkbasic.d .

path - iOS: NSBundle object becomes invalid after folder removed and recreated -

i using following initialise bundle object in viewdidload. documentbundle = [[nsbundle alloc] initwithpath:path]; where path looks following; /users/..../library/application support/iphone simulator/6.1/applications/b69b8a03-c029-4df5-89e0-1429e73e840f/documents/downloads/documents.bundle while application running need update documents.bundle , rid of old one. remove , download latest 1 web. have confirmed bundle object points same folder it's not able contents inside bundle after replaced existing folder. if restart application latest contents! not sure what's going on here. can 1 point out wrong? following returns nil path after replaced bundle! can see required file right there terminal! nsstring *path = [documentbundle pathforresource:filename oftype:extension]; i have tried reinitialise bundle object after replacing bundle still points same memory address (printed using %p) , doesn't return content new bundle. i same result on both device , simulato

Design Pattern - Objective-C - MVC Model View Controller -

hi read tutorials around web on mvc , read topics on here. think got concept of mvc i'm not sure of implementation. i've tried apply simple program, window have label , button. button increase counter , label shows value of it. i tried in 2 different ways. in first case ( example works ) melt view , controller. said, example works, want guys tell me if it's correct implementation mvc or it's not following right design. the second example has model view , controller 3 separated class, example doesnt work because v , c import itself, love guys tell me i'm doing wrong. first version: model, view-controller //model.h #import <foundation/foundation.h> @interface model : nsobject { int _counter; } -(void)setcounter:(int)valuecounter; -(int)getcounter; -(void)increasecounter; @end //model.m #import "model.h" @implementation model {} -(void)setcounter:(int)valuecounter { _counter = valuecounter; } -(int)getcounter { return _counter; }

How to use custom bean class in search container in liferay -

i want show records in liferay portlet. have list of objects want display , using searchcontainer tag of liferay i.e. liferay-ui:search-container follows: <liferay-ui:search-container delta="5" emptyresultsmessage="no results found" iteratorurl="<%= portleturl %>" > <liferay-ui:search-container-results total="<%= contents.size() %>" results="<%= listutil.sublist(contents,searchcontainer.getstart(),searchcontainer.getend()) %>"> </liferay-ui:search-container-results> <liferay-ui:search-container-row modelvar="content" keyproperty="title" classname="com.liferay.portlet.documentlibrary.model.dlfileentry"> <liferay-ui:search-container-column-text name='name' property="name" orderable="<%= true %>"></liferay-ui:search-container-column-text> <liferay-ui:search-container-column-text name=

c# - Coming from AOP based authentication in ASP.MVC to nodeJS -

when in .net world , using mvc common pattern used when wanting cross cutting concerns such logging, authentication, transaction management etc use di paired aop put attributes on methods required proxying/weaving. so may like: public class somecontroller { [authenticate] public actionresult someauthenticatedaction() {} public actionresult notauthenticatedaction() {} } so given above when someauthenticatedaction called check request authorization cookie logic around , either bomb user out 401 or something. know because has attribute on @ runtime knows hook , proxy. now in javascript land , looking @ getting same sort of functionality doing best way platform. wondering how should go doing in nodejs, there no sort of attribute paradigm in javascript without either ingraining authentication each app.* (get,post etc) call dont like, or @ application entry point proxy each action know needs authenticated, not ideal either. so there way me indicate method should hav

html - CSS - How to remove unwanted margin between elements? -

Image
this seems common problem none of solutions found have worked me. html <html> <head> <link rel="stylesheet" href="c/lasrs.css" type="text/css" /> </head> <body> <div class="header"> <img src="i/header1.png"> </div> <div class="content"> <p>lorem ipsum dolor sit amet, consectetuer adipiscing elit. nam cursus. morbi ut mi. nullam enim leo, egestas id, condimentum at, laoreet mattis, massa. sed eleifend nonummy diam. praesent mauris ante, elementum et, bibendum at, posuere sit amet, nibh.</p> </div> </body> </html> css body { min-width: 950px; background-color: #ffffff; color: #333333; } .header { width: 950px; height: 171px; margin: 0px auto; padding: 0px; background-color: #c

Android Prevent Bluetooth Pairing Dialog -

i'm developing internal application uses bluetooth printing. want bluetooth pairing occur without user input. have managed working trapping android.bluetooth.device.action.pairing_request broadcast. in broadcast receiver call setpin method, , pairing works ok, bluetoothpairingdialog displayed second or two, disappears - see link below. https://github.com/android/platform_packages_apps_settings/blob/master/src/com/android/settings/bluetooth/bluetoothpairingdialog.java since broadcast non-ordered, can't call abortbroadcast() , , wondering if there other way prevent pairing dialog appearing. can hook window manager in way? i haven't been able come way without modifying sdk. if you're oem, it's easy (i'm on 4.3): in packages/apps/settings/androidmanifest.xml, comment intent filter pairing dialog: <activity android:name=".bluetooth.bluetoothpairingdialog" android:label="@string/bluetooth_pairing_request"

encryption - Java BouncyCastle Cast6Engine (CAST-256) encrypting -

i'm trying implement function receives string , returns encoded values of string in cast-256. following code implement following example on boncycastle official web page ( http://www.bouncycastle.org/specifications.html , point 4.1). import org.bouncycastle.crypto.bufferedblockcipher; import org.bouncycastle.crypto.cryptoexception; import org.bouncycastle.crypto.engines.cast6engine; import org.bouncycastle.crypto.paddings.paddedbufferedblockcipher; import org.bouncycastle.crypto.params.keyparameter; import org.bouncycastle.jce.provider.bouncycastleprovider; import org.bouncycastle.util.encoders.base64; public class test { static{ security.addprovider(new bouncycastleprovider()); } public static final string utf8 = "utf-8"; public static final string key = "clp4j13gada9amrsqsxgj"; public static byte[] encrypt(string inputstring) throws unsupportedencodingexception { final bufferedblockcipher cipher = new paddedbuffe

python - Trouble with a simple query PyODBC -

i want query following: the attribute unknown hrs yes if employee works on @ least 1 project null hours, , no otherwise. and first making list, thelist containing relevant social security numbers , consequently: for in thelist: unknown_hours=process_query("select distinct count(*) works_on isnull(hours) , essn='%s'" %i) temp.append(unknown_hours) the trouble answers 1l or 0l , need them integers (for algorithm). thoughts? regards cenderze 1l long integer representation of integer value 1 : >> type(1l) <type 'long'> >>> long(1) 1l >>> int(1l) 1 convert in python: int(unknown_hours) or in database layer: select distinct cast(count(*) unsigned) works_on isnull(hours) , essn='%s'

oracle - SQL issue with parenthesis -

i'm getting error while processing query: select * example pri in ( select pri ( select pri ,sbst ,st ,count(*) cnt example sbst = 'oi' group pri ) tmp cnt = 1 , st = 'ko' ) , sbst = 'cp'; the error following: ora-00907: missing right parenthesis 00907. 00000 - "missing right parenthesis" *cause: *action: error @ line: 5 column: 136 but don't think missed parenthesis. probably need group pri, sbst, st select * example pri in ( select pri ( select pri, sbst, st, count(*) cnt example sbst = 'oi' group pri, sbst, st ) tmp cnt = 1 , st = 'ko' ) , sbst = 'cp';

android - USB driver Asus Nexus 7 Windows 7 -

i have tried every suggestion on website , many others no avail. possible android development nexus 7 on windows? i have tried usb driver downloaded sdk manager, 1 asus. have tried changing usb mode ptp , still getting the same message when try install driver (manually). "windows not find driver software device" i know question has been answered, ran issue uninstalling unknown device, , updating driver manually not working (by selecting sdk/../usb_drivers folder). no matter did device manager, not drivers found/installed. hopefully helps - if have issue installing device (win7), worked me: disconnect usb device. on device, go settings -> developer options, , click revoke usb debugging authorizations. on device, go settings -> storage -> usb computer connection (available on drop down menu @ top right of screen). verify media device (mtp) checked . reconnect device, , should install without problem. if not, attempt update driver manually ,

c# - Editing an entity that has a file - Default Model Binder Confusion -

i have model this public class filedetail { public string url { get; set; } [notmapped] public httppostedfilebase file { get; set; } public void uploadfile() { if (file != null) { try { ... url = "data:image/png;base64," + convert.tobase64string(objimagebytes); } } catch (exception ex) { } } } i have edit/create view this ... @model applicationbase.core.common.filedetail @html.textboxfor(x => x.file, new { type = "file", accept = "*" }) ... when edit action , default modal binder loads file property string, request.form {file=17382.jpg} when create action, default modal binder loads file httpfilecollectionwrapper request.form {} request.files {system.web.httpfilecollectionwrapper} allkeys: {string[1]} count: 1 why happening ? should httpfilecollectionbase when create new entity runs per

android - Basic Phonegap Download issue -

hi have following code got tutorial. have run on device , doesn't anything. new phonegap , js can 1 please. function onbodyload(){ document.addeventlistener("deviceready", ondeviceready, false); } function downloadfile(){ window.requestfilesystem( localfilesystem.persistent, 0, function onfilesystemsuccess(filesystem) { filesystem.root.getfile( "dummy.html", {create: true, exclusive: false}, function gotfileentry(fileentry){ var spath = fileentry.fullpath.replace("sample.html",""); var filetransfer = new filetransfer(); fileentry.remove(); filetransfer.download( "http://www.webfoxers.com/devscope.pdf",func

android - Expand Collapse ExpandableListView -

i have custom expandablelistview in tablelayout: <scrollview xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:id="@+id/scrollview1" android:layout_width="fill_parent" android:layout_height="wrap_content" android:padding="5dip" android:background="@drawable/back_ground"> <tablelayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchcolumns="2" > <tablerow > <edittext android:id="@+id/t_v" android:layout_width="100dip" android:layout_height="40dip" android:inputtype="text" /> <button android:id="@+id/btn_v" android:layout_width=&qu

Does anyone know if NSUserDefaults get uninstalled when deleting a sandboxed app in OSX? -

i'm curious how sandboxed app, handle uninstalling. , how nsuserdefaults affected it. depends how delete it. if remove /applications/theapp.app no, sandboxed app's files (including nsuserdefaults related files) in ~/library/containers/com.domain.theapp . however if use tools appzapper or appcleaner etc., doubtless remove container well. them.

__gfortran_transfer_integer_write undefined for Mac OSX.6.8 - gfortran -

i having trouble installing ancient f77 program on mac (os 10.6.8). when compile (with gfortran), following errors: undefined symbols architecture x86_64: "__gfortran_transfer_integer_write", referenced from: _abfind_ in abfind.o _binplot_ in binplot.o _binplotprep_ in binplotprep.o _blends_ in blends.o _chabund_ in chabund.o _curve_ in curve.o _damping_ in damping.o ... "__gfortran_transfer_real_write", referenced from: _abfind_ in abfind.o _abpop_ in abpop.o _binplot_ in binplot.o _binplotprep_ in binplotprep.o _blends_ in blends.o _calmod_ in calmod.o _chabund_ in chabund.o ... etcetera... ideas look?

python - Using Django, South and Sqlite during development -

i'm new python (2.7) , django (1.5) , working through django book whilst making hobby site. i'm using sqlite3 dev db, in production intend mysql. south looks great solution database schema migration management, doesn't play sqlite. i'm tempted install mysql on dev machine, wonder if there's way avoid that. i'd appreciate knowing simple, practical solution problem, if knows of one. edit: meant programmatic solution (for feel off topic). imagined there may way use django's settings.py , custom code accomplish this. no, there's no way around this. use south require complete alter table support sqlite not have . this , other small differences make developing on mysql better choice, if plan deploy mysql.

exception - How to solve java.lang.NoClassDefFoundError? -

i've tried both example in oracle's java tutorials . both compile fine, @ run-time, both come error: exception in thread "main" java.lang.noclassdeffounderror: graphics/shapes/square @ main.main(main.java:7) caused by: java.lang.classnotfoundexception: graphics.shapes.square @ java.net.urlclassloader$1.run(urlclassloader.java:366) @ java.net.urlclassloader$1.run(urlclassloader.java:355) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(urlclassloader.java:354) @ java.lang.classloader.loadclass(classloader.java:424) @ sun.misc.launcher$appclassloader.loadclass(launcher.java:308) @ java.lang.classloader.loadclass(classloader.java:357) ... 1 more i think might have main.java file in wrong folder. here directory hierarchy: graphics ├ main.java ├ shapes | ├ square.java | ├ triangle.java ├ linepoint | ├ line.java | ├ point.java ├ spaceobjects | ├ cube.java | ├ rectprism

java - Db fields validation client side -

i automate client side data validation application uses springmvc , hibernate, specially in case of referential integrity constraint violation. simple version of structure of application follows: db i have oracle db tables, let's take example a table document integer primary key doc_key , title field table page foreign key fk_document_id , key pag_key , text "text" field. orm/application layer i have 2 (hibernate) entities( document , page ) mapping tables. create page need create document before, not possible create page without specifying related doc_key in foreign key field. web layer i created form allows user create new document pages. can insert title document , 1 or more pages. trying create page object without specifying document title results in db error because no document specified pages. example use case the user tries create page setting contents without specifying document title. client side validator marks title field in r

windows - Python and the QuickBooks POS SDK: What string to use for the COM file? -

i'm trying create integration app between quickbooks pos , online shopping cart in python. i've found example code interacting qb sdk in python ( http://blog.bflarsen.com/?p=132 ) using win32 library, seems code out of date , string access com has been changed. the documentation has say: you can find examples of qbpos communication in languages other visual basic in qbpos sdk subdirectory \samples\qbpos. languages not sampled in directory, refer com interface definitions request processor api or, optionally, qbposfc library. these in abposxml , qbposfc type libraries, respectively, , can viewed various object browsers, such visual studio object browser. however, not provide string access com. google turns nothing. i've searched registry requestprocessor, , com can find qbposxmlrpc.requestprocessor, work, attempts connect server rather interacting quickbooks, need. my question is, proper com file use? if there isn't one, possible turn quickbooks rpc

Add multiple points of interest on Google Map -

i have nice script allows me have 1 point of interest on google map, need more poi (+- 15) could me adapt script enable multiple locations easily? frankly don't see yet have (as newbie in code) i'm willing switch other code style has been added code. google.map = function(){ if($('.map').length > 0) { $('.map').each(function(i,e){ $map = $(e); $map_id = $map.attr('id'); $map_lat = $map.attr('data-maplat'); $map_lon = $map.attr('data-maplon'); $map_zoom = parseint($map.attr('data-mapzoom')); $map_title = $map.attr('data-maptitle'); var latlng = new google.maps.latlng($map_lat, $map_lon); var options = { scrollwheel: false, draggable: false, zoomcontrol: false, disabledoubleclickzoom: false, disabledefaultui: true, zoom: $map_zoom, center: latlng

python - How to get text from a <div> with a 'style' attribute? -

i address information school link . html i'm interested in looks this: <div style="float:left;width:100%;padding-top:10px;padding-bottom:30px;"> <div>1936 north st.</div> <div>natchitoches, tx 75962</div> <div>936-468-2901</div> </div> the desired text be: 1936 north st. natchitoches, tx 75962 936-468-2901 here attempted: address = soup.find('div', 'float:left;width:100%;padding-top:10px;padding-bottom:30px;') print address my output: none i thought soup.find() took attribute argument, , 'style' attribute, passing name of attribute me contents ... any suggestions or beautifulsoup implementation how address text? this want: address = soup.find('div', {'style':'float:left;width:100%;padding-top:10px;padding-bottom:30px;'}) print address.get_text() use dict define style attr use get_text() text between tags

c - va_list and char* strings -

[edit] inserted null terminated in samples i have function receives va_list ends null . concatenate each string in char* called joinedstring . function works expected except joinedstring grows size each time call function. mean previous string remains , new string joined. example: first call: showmsg(style1, "a", "s", "d", null); yielded result: "asd" second call: showmsg(style1, "w", "w", "q", null); yielded result: "asdwwq" this behaviour strange because each time function called joinedstring initialized. va_list holds values used? i'm using c, not c++ , know, using std::string far more easy. int showmsg(msgboxstyle msgstyle, char* str, ...) { char* title = "", *joinedstring = "", *thearg = ""; wchar_t* convertedtitle = "", *convertedstring = ""; va_list args; thearg = str; va_start( args, str );

SQL Server 2008 Compiled TSQL Performance -

what kinds of tsql select statements (i.e. starting select ) benefited compiling , advantages provided by? compiling mean hosting select statements inside stored procedures. i'm aware of other performance advantages of stored procs (encryption, separation of concerns etc.), i'm interested in performance aspect here. here's example: select t1.f1, t2.f2 t1 inner join t2 on t1.pk = t2.fk does/will above sql run faster when it's factored stored proc rather command text? no, sql server optimizes , caches query plans based on query text @ statement level, generally, statement optimize same whether in stored procedure or not. now, there other factors can affect how statement cached , optimized, , how stored procedure might exhibit different performance characteristics (and use different plan) same query outside of stored procedure. example: set settings. beyond scope of core question, erland's article, slow in application, fast in ssms? understanding

android - Eclipse import project cvs shows accents with question marks -

i've import project svn (assembla) in eclipse kepler. when project imported, accented characters found in code, appear question mark. i've changed workspace text encoding utf-8 , imported project again, quiestion marks still there. i'm running eclipse on mac. in windows, importation works well. ok on os x - might getting hit specific file encoding, there magic comments @ top of file or file set encoding. can alter file encoding on mac os x so: iconv -f iso-8859-1 -t utf-8 file.txt > file.txt.utf8 and bunch of files: find /path/to/workspace -name \*.txt -type f | \ (while read file; iconv -f iso-8859-1 -t utf-8 "$file" > "${file%.txt}.utf8"; done); this convert txt files, change *.txt different file types.

CSS: Placing one image above another in separate rows -

i have 3 images numbered 1, 2 , 3. i want display them using css like demonstrated here. i have them inside <span> , have tried various combinations of position , float. can them display consecutively cannot image 2 position above image 3. here's code: <img src="1.gif" style="padding-right: 4px;"/> <span> <img src="2.gif" style="float: top;"> <img src="3.gif" style="float: bottom;"> </span> there's no such things float top or bottom. achieve visual example try this: <div style="float;left"> <img src="1.gif" style="padding-right: 4px;"/> </div> <div style="float:right"> <img src="2.gif" style="display:block;"> <img src="3.gif" style="display:block;"> </div>

c# - what is this: new[] { } -

this question has answer here: what new[] shorthand for? 4 answers i trying grips asp mvc4 , came across within @{...} within .cshtml file: @html.dropdownlistfor(x => x.willattend, new[] { new selectlistitem() { text = "yes, i'll there", value = bool.truestring}, new selectlistitem() { text = "no, can't come", value = bool.falsestring} }, "choose option") q1) kind of thing this: new[]{...} q2) right in saying razor, stuff within curly brackets c# code. thanks. this syntax: new[] { "foo", "bar", "baz" } is implicitly typed array initializer . type of array inferred elements within braces. example, above exactly equivalent to: new string[] { "foo", "b

java - Refreshing/updating JTable with setValueAt doesn't work correctly -

i'm working on project college , need 2 of jframe. first 1 main menu , second 1 visible when jbutton(run) pressed. need paint memory in both of jframe, used jtable show memory. memory class is: public class memory extends jpanel{ private jpanel panel; private jtable table; private string[] array; private jscrollpane scrollpane; public memory() { array = new string[256] this.addmemorygui(); } public final jpanel addmemorygui() { this.panel = new jpanel(); this.panel.setpreferredsize(new dimension(315,490)); this.panel.setlayout(null); this.add(panel); string info[][] = new string[256][2]; for(int j=0;j<256;j++) { info[j][0] = j; info[j][1] = null; } string[] title = new string[]{"address","value"}; defaulttablemodel model = new defaulttablemodel(info,title); table = new jtable(model

c# - How to show loading message while making a json request on windows phone? -

i need show loading message, while json request made on windows phone, async task progressdialog on android, put dialog.show() on onpreexecute() , dialog.dismiss() on onpostexecute. how can on windows phone? here json request: webclient webclient = new webclient(); webclient.downloadstringcompleted += new downloadstringcompletedeventhandler(webclient_downloadstringcompleted); webclient.downloadstringasync(new uri("https://maps.googleapis.com/maps/api/place/textsearch/json?&query=taxi&location=-19.94549444,-43.92314218&&radius=5000&sensor=true&key=aizasyducc8qbv5wu4v-dqxffabxgaauzdmt5xw")); while request downloading, need show loading message, , ent when request complete. you can display progress bar indicate ongoing process. put code follows: webclient webclient = new webclient(); webclient.downloadstringcompleted += new downloadstringcompletedeventhandler(webclient_downloadstringcompleted); progressindicator progressindi

c++ - Changing backgound color of a subclassed button in Win32 -

i want change background color of button in runtime. the problem is, button not have black background code should produce. instead, looks has arrow of drop-down control on it. what doing wrong here? first subclassed button: // hwnd hparent parent window // hinstance hinstance current module hwnd h = createwindow("button", null, ws_child | ws_visible | ss_ownerdraw, 340, 10, 20, 20, hparent, null, hinstance, null); setwindowsubclass(h, &mywndproc, mybuttonid, null); the id defined as: enum { mybuttonid = 100, }; and subclass procedure: lresult callback mywndproc (hwnd hwnd, uint msg, wparam wparam, lparam lparam, uint_ptr uidsubclass, dword_ptr dwrefdata) { if( uidsubclass == mybuttonid ) { switch( msg ) { case wm_erasebkgnd: { hdc dc = (hdc)wparam; setbkcolor(dc, rgb(127,127,127)); return 0; }

Capistrano Rails Asset Precompile Error -

i have capistrano script deploying app amazon ec2 machine. failing when compiling assets: * executing "cd -- /home/ec2-user/uc_social_server/releases/20130731161645 && rails_env=production rails_groups=assets rake assets:precompile" servers: ["ec2-23-22-188-11.compute-1.amazonaws.com"] [ec2-23-22-188-11.compute-1.amazonaws.com] executing command ** [out :: ec2-23-22-188-11.compute-1.amazonaws.com] not find thread_safe-0.1.0 in of sources ** [out :: ec2-23-22-188-11.compute-1.amazonaws.com] ** [out :: ec2-23-22-188-11.compute-1.amazonaws.com] run `bundle install` install missing gems. ** [out :: ec2-23-22-188-11.compute-1.amazonaws.com] command finished in 591ms *** [deploy:update_code] rolling * executing "rm -rf /home/ec2-user/uc_social_server/releases/20130731161645; true" servers: ["ec2-23-22-188-11.compute-1.amazonaws.com"] [ec2-23-22-188-11.compute-1.amazonaws.com] executing command command finis

Django css not rendering from amazon server- 304 not modified -

i using amazon server host django app. used work fine after changes in css files app not rendering files anymore. ran python manage.py collectstatic. through firebug can see css files through error 304 not modified. guess post address issue couldnt understand it! should make static files render properly? it practice use /path/to/style.css?ver=current_version ensure users recent version of css, js , other static. current_version auto-populated current git commit id on deploy.

xslt - Remove namespace in xsl -

here xml: <?xml version="1.0" encoding="utf-8" ?> <requestvaluesresponse xmlns="http://www.camstar.com/webservice/wsshopfloor"> <requestvaluesresult>true</requestvaluesresult> <responseservicedata q3:type="lotmodifyattrs" xmlns:q3="http://www.camstar.com/webservice/datatypes"> <completionmsg xmlns="http://www.camstar.com/webservice/datatypes">update completed successfully</completionmsg> <selectioncontainer xmlns="http://www.camstar.com/webservice/datatypes"> <__name>5454545</__name> <__level> <__name>lot</__name> </__level> <__id>4802378000000610</__id> </selectioncontainer> <serviceattrsdetailsselection xmlns="http://www.camstar.com/webservice/datatypes"> <__listitem type="serviceattrsdetails&quo

Xpath rules - contains() not returning what I'd like -

so far have following xpath set pull word 'gallery' href returns entire url instead of word gallery. explain i'm doing wrong please? you, it's appreciated! $x("//link[@rel='canonical' , contains(@href,'gallery')]") your current xpath expression, $x("//link[@rel='canonical' , contains(@href,'gallery')]") returns sequence of <link> elements. depending on way evaluate them, might getting text content. if want word 'gallery' , in xpath 2.0 can say $x("//link[@rel='canonical' , contains(@href,'gallery')]/'gallery'") which return sequence of strings, 1 'gallery' each <link> element fulfills predicate. or $x("if (exists(//link[@rel='canonical' , contains(@href,'gallery')])) 'gallery' else null") which return either 'gallery' (once), or null.

css - Can css3 translateZ() be used instead of z-index? -

for example having 2 div's positioned absolute, 1 can put first div upon second setting first div's z-index higher second one's. can achieve such behaviour using translatez() or translate3d? the answer now, 3 years after, can. need use transform-style: preserve-3d; on parent, but it's possible . .container { transform-style: preserve-3d; } .test1 { width: 500px; height: 500px; background: red; transform: translate3d(0, 0, 1px); } .test2 { width: 500px; height: 500px; background: green; left: 250px; top: 250px; position: absolute; transform: translate3d(0, 0, 0); } <div class="container"> <div class="test1"> test </div> <div class="test2"> test #2 </div> </div>

javascript - How to keep Sencha Ext.Msg from closing on button click -

so have message box built able send message. has 2 inputs, , ok , cancel buttons. can access contents , normal logic quite how set up: ext.msg.show({ title: 'send message: ', cls: 'messagebox', html: '<div class="message-innercontainer" >' + '<input type="text" id="messageboxsubject" placeholder="subject" class="messagebox-input"/>' + '<textarea id="messageboxmessage" placeholder="message" class="messagebox-textarea"></textarea>' + '<div>', closable: false, buttons: [ { no: 'cancel', text:'cancel', cls:'messagebox-cancelbutton'}, { yes: 'ok', text:'ok', cls:'messagebox-okbutton'} ], fn: function (btn) { if (btn == 'ok') { //do s

Mysql service not starting in WAMP -

i reinstalled wamp in pc runs windows 7. when try start wamp orange , not green. did steps of this tutorial. again wamp orange. there no problem apache because correctly in port 80. went wamp->mysql-> service , when click start/resume service nothing happens. problem? checked error log , have this 2013-07-31 19:30:21 1776 [note] plugin 'federated' disabled. 2013-07-31 19:30:21 c4c innodb: warning: using innodb_additional_mem_pool_size deprecated. option may removed in future releases, option innodb_use_sys_malloc , innodb's internal memory allocator. 2013-07-31 19:30:21 1776 [note] innodb: innodb memory heap disabled 2013-07-31 19:30:21 1776 [note] innodb: mutexes , rw_locks use windows interlocked functions 2013-07-31 19:30:21 1776 [note] innodb: compressed tables use zlib 1.2.3 2013-07-31 19:30:21 1776 [note] innodb: not using cpu crc32 instructions 2013-07-31 19:30:21 1776 [note] innodb: initializing buffer pool, size = 101.0m 2013-07-31 19:30:21 1776 [note

machine learning - Identify a matching algorithm -

i new nlp/ml/pattern matching or recognition. wondering best way match different items based on title, description, etc. eg: if there 3 items: item 1: title: belkin bluetooth headset usb - abd13432 item 1: description: bluetooth device following specs: 75 w power, 3.5 mm jack, etc item 1: model no: abd13432 item 1: upc code: 000000022221 item 1: product image: <img1> item 2: title: belkin headset: item 2: description: device works on rf, , has 2.5 mm jack 25 w power item 2: model no: 13432 item 2: upc code: 000022022221 item 2: product image: <img1> item 3: title: belkin headset wireless - abd 13432 item 3: description: world's best headphone item 3: model no: abd-13432 item 3: upc code: 000000022221 item 3: product image: <img1> item 1 , item 3 same , item 2 different . upc code great indicator if same item issue seller can input upc code wants. image matching not indicator since seller can input image wants to. in particular case, model

android - making the KeyboardView transparent -

i making own inputmethodservice.everything working fine.but have 1 issue.i want make keyboard view transparent.that means keypad view cover enter screen & user can see whole screen while typing. tried lot make transparent setting background color,drawable,but not success. please suggest me how make custom transparent keypad. using method settheme (int theme) work? in configuration setting android:background="@android:color/transparent" property of android.inputmethodservice.keyboardview , using slighltly transparent custom key drawable selector i.e. android:keybackground="@drawable/custom_transparent_key" works fine.

HTML5 canvas: single stroke around combined regions -

Image
html5 canvas: i'm looking way draw single stroke around combined path. for example if have 2 overlapping circles don't want have 2 overlapping circle strokes, 1 single stroke around combined region of both circles.. any chance that? it can done using globalcompositeoperation . there various ways can draw shapes them selves here 1 approach results in (for 2 rectangle circles in demo): step 1: setup normal canvas step 2: setup off-screen canvas update not sure how miss obvious, can of course stroke circles first, punch whole composite mode , fill - faster (i guess had images on mind when came offset redraw). the reason off-screen canvas if have in background on main canvas. deleted otherwise punch hole. if nothing there there no problem drawing single canvas - updated code: /// regions var rect = [ [20, 20, 200, 200], [100, 100, 200,200] ], /// ox = off-screen context ox.strokestyle = '#fff'; ox.linewidth = 3 * 2; /// x2 half gone when pu

c++, playing a WAV file from Windows 7 Service -

i have c++ application plays wav file when conditions meet. works fine when running console, not work when running service. using playsound function, tried many flag combinations. playsound functions returns true, when called service. worked fine when running on windows xp service. looks 1 of security limitation windows 7. true? there way can play wav file windows 7 service in c++? thanks!! john

sql server - SQL Function in column running slow -

i have computed column (function) causing 1 of tables extremely slow (its output column in table. thought might logical statements in function. commented out , returned string called 'test' . still caused table slow. believe select statement slowing down function. when comment out select statement, cherry. think not using functions in correct manner. function [dbo].[pend_type](@suspense_id int, @loan_id nvarchar(10),@suspense_date datetime, @investor nvarchar(10)) returns nvarchar(20) begin declare @closing_date datetime, @paid_date datetime declare @pendtype nvarchar(20) --this issue!!!! select @closing_date = date_closing, @paid_date = date_paid table loan_id = @loan_id set @pendtype = 'test' --commented out logic return @pendtype end update: i have computed column similar , column in same table. 1 runs fast. see difference in why be? declare @yorn nvarchar(1) if((select count(suspense_id) table suspense_id = @suspenseid) = 0) set @yorn = 'n'

java - How to Populate a jeasyui DataGrid with Spring Controller -

i'm not achieving mimetize this tutorial using spring mvc controller. datagrid not populating rows java/spring controller data retrieved. i'm not reproducing entyre jsp code quite similar example above. the spring "controlteste" follows responsible retrieving data db, build json string (using gson) , sending response. in tutorial, task done php (directly view, without "controller" layer). @requestmapping(value = "/controlteste", method = requestmethod.get) public @responsebody string teste(status status, httpsession httpsession) { gson gson = new gsonbuilder().setdateformat("dd-mm-yyyy").setprettyprinting().create(); session sess = (session) httpsession.getattribute("hibsess"); statusdao stadao = new statusdao(sess); list<status> lista = stadao.findall(); string gstatus = new string(); try{ gstatus = gson.tojson(lista); system.out.printl

r - How to implement proximity rules in tm dictionary for counting words? -

objective i count number of times word "love" appears in documents if isn't preceded word 'not' e.g. "i love films" count 1 appearance whilst "i not love films" not count appearance. question how 1 proceed using tm package? r code below self contained code modify above. require(tm) # text vector my.docs <- c(" love red hot chilli peppers! lovely people in world.", "i not love red hot chilli peppers not hate them either. think ok.\n", "i hate `red hot chilli peppers`!") # convert data.frame my.docs.df <- data.frame(docs = my.docs, row.names = c("positivetext", "neutraltext", "negativetext"), stringsasfactors = false) # convert corpus my.corpus <- corpus(dataframesource(my.docs.df)) # standard preprocessing my.corpus <- tm_map(my.corpus, stripwhitespace) my.corpus <- tm_map(my.corpus, tolower) my.corpus <- tm_map(my.corpus, rem