Posts

Showing posts from February, 2010

ibm mobilefirst - Rational Application developer 9.0 and worklight studio 6.0 run android application Errors occurred during the build -

i try using rational application developer 9.0 , worklight studio 6.0 run android application. have below errors occurred during build. errors running builder 'android package builder' on project 'hellotesthelloworldandroid'. sun/security/x509/x500name before see many answer jdk version not mathch. have download jdk 1.7 , install setting java_home. , method change eclipse.ini setting. rad eclipse.ini different eflipse juno version. try many method unitl error persists. i checked around on , here info got: the issue either have wrong jdk on system or have correct jdk wrong jdk first in classpath look-up. a) make sure have 1 jdk on system , 32-bit sun jdk - since android sdk depends on jdk b) find other jdks on system , uninstall them c) make sure have jdk sun , not jre.

java - Unable to Save Image on SDCard Android -

i using below code save images sdcard unable , here code try { root.mkdirs(); file sdimagemaindirectory = new file(root, myid + "__" + filename); outputfileuri = uri.fromfile(sdimagemaindirectory); fout = new fileoutputstream(sdimagemaindirectory); bm.compress(bitmap.compressformat.png, 100, fout); fout.flush(); fout.close(); toast.maketext(this, "image saved",toast.length_short).show(); } catch (exception e) { e.printstacktrace(); } here error 04-14 13:34:07.723: w/system.err(23073): java.io.filenotfoundexception: /mnt/sdcard/android/data/com.goldenedge.poetry/urdu/festive poetry/4__311159_248676158509124_848180994_n.jpg 04-14 13:34:07.724: w/system.err(23073): : open failed: einval (invalid argument) 04-14 13:34:07.725: w/system.err(23073): @ libcore.io.iobridg...

javascript - How to use e.preventDefault() on $(this) inside the $(window).resize()? -

how can use $(this).e.preventdefault() ? what want / need on window resize <a> should behave differently. in fiddle example if window width smaller 710 href should not triggered. there javascript function toggling subnav . if window wider 710px, want href work "normally". now setting example i've seen event firing multiple times. how can if fires once? also, there better way achieve want? please resize window in jsfiddle before clicking! fiddle here $( window ).resize(function() { var ww = $(window).width(); $('.windowwidth span').html(ww); if(ww < 710) { $('nav ul.nav > li > a').on('click',function(e){ e.preventdefault(); alert("here"); }); } else { $('nav ul.nav > li > a').on('click',function(e){ alert("there"); }); } }); you need check window width within click handler instead...

sql - Combine multiple inner joined rows into one row with multiple columns -

i have questions table , answers table has 4 8 answers connected 1 question. when want list of questions , answers, use following code: select q.questionid, q.question, a.answer question q inner join answer on q.questionid=a.questionid; this gives me 1 row each answer question being repeated on each row. however, want 1 row per question answers in separate columns. if possible, i'd limit 4 answers. if there more 4, rest should ignored. not important. the 4 answer columns named "correct", "wrong1", "wrong2" , "wrong3". first 1 in table (with lowest answerid) correct one. thank help! select q.questionid, q.question, case <some field> when <condition> a.answer end correct, case <some field2> when <condition2> a.answer end wrong1 ... question q inner join answer on q.questionid=a.questionid group q.questionid you can group question , define conditioned fields "correct...

java - Is order preserved in set when recovering sorted sets using jedis? -

i use java redis client "jedis". when getting sorted set using zrange example, client specifies returns set definition has no oredering guarantee. this old question mentions problem have found no reference whether resolved. can , know order preserved? set<string> results = jediscli.zrange(key, start, end); myobject[] requestedorderedobjects = new myobject[results.size]; int = 0; foreach(string result: results) { requestedorderedobjects[i++] = myobject.loadfromstring(result); } return requestedorderedobjects; thank help. order preserved, check type of set jedis returns: indeed sortedset , ordered. right: api doesn't give hint ordered, should not afraid: works fine, or apps have incredible bugs.

java - concurrentLinkedQueue offer/poll blocking -

does offer blocks poll or vice versa ? meaning , can producer offer , @ same time consumer trying poll ? or if producer offering , queue blocks till done ? object a while (true){ inputqueue.offer(newpartlist); } object b while (true){ inputqueue.poll(newpartlist); } no, not. use linkedblockingdeque instead. remember use methods blockingdequeue or blockingqueue interfaces values. these methods implemented blocking. update neither offer nor poll methods blocking. in linked interfaces put* , take* methods implemented blocking. put blocks long queue full, take blocks if queue empty. now see asking else. in linkedblockingdeque calling offer blocks poll , because implementation has inernal lock synchronizing access. in concurrentlinkedqueue's javadoc explicitly stated, that: this implementation employs efficient "wait-free" algorithm based on 1 described in simple, fast, , practical non-blocking , blocking concurrent q...

mobile - Disable Bootstrap tooltips on xs screens -

i trying disable tooltips in booststrap on xs screens code: function menutooltip() { if (window.matchmedia("(min-width: 768px)").matches) { $('.menu a').tooltip(); } } menutooltip(); $(window).resize(menutooltip); works fine except if resize window keeps showing tooltips on mobile devices. seems wrong $(window).resize(menutooltip); don't see anything. help? seems had add else { $('.menu a').tooltip('destroy') } make work...

android - How to create a resizable circle with user touch events? -

i trying create circle shape resized on ontouchevent . i have followed resizable rectangle post, think due lack of mathematics knowledge, not getting how create resizeable circle. i have tried changing canvas.drawrect( left + colorballs.get(0).getwidthofball() / 2, top + colorballs.get(0).getwidthofball() / 2, right + colorballs.get(2).getwidthofball() / 2, bottom + colorballs.get(2).getwidthofball() / 2, paint); to canvas.drawcircle() ; creates circle not quite wanted. can please tell me there thing implemented or points should follow convert rectangle example resizable circle. so, center of circle be: float cx = (left + right) / 2f; float cy = (top + bottom) / 2f; -- quite obvious. radius can calculated using math.hypot() : float radius = math.hypot(top - bottom, right - left) / 2f; thus, have center , radius draw circle: drawcircle(cx, cy, radius, paint);

sql - Single value reports in SSRS 2008 -

Image
i creating report display values scalar valued database function. intention report having each of these values discrete , not come single query. labels display purposes. thinking of using matrix control seems work aggregates.

delphi - Can I annotate class of some object as type? -

i want create a tdictionary<string, class of tcontrol> that - can see - holds pairs of strings , references tcontrol class definition able call create method on dictionary elements @ runtime. can i? the syntax need follows: type tcontrolclass = class of tcontrol; and can declare dictionary: var dict: tdictionary<string, tcontrolclass>;

java - Authentication/Authorization in Spring Interceptor and web services -

i have managed make web services worked spring. need add authentication not can use web services. there many classes , interfaces not sure 1 use. what best approach it? have example see? appreciate it. if intend have simple basicauth authentication (just username , password), following xml enough secure services, don't need extend/implement anything: <http auto-config="true"> <intercept-url pattern="/description*" access="role_admin" /> <logout logout-success-url="/wherever" /> </http> <authentication-manager> <authentication-provider> <user-service> <user name="user1" password="password" authorities="role_user" /> <user name="user2" password="password" authorities="role_admin" /> </user-service> </authe...

performance - Java - Instance variables or method local variables are stays more time in the memory -

i have silly problem in mind clarify. see below code. ex 1 , create instance of mysecondclass , use in each method. not create instance each time, in methods whenever want it. but in ex 2 create instances of mysecondclass inside each method. i want know implementation in terms of memory consumption ( garbage collection ) , performance? ex 1 . public class myclass { private mysecondclass var1 = new mysecondclass (); public void dosomthing(){ var1 .domultiply(); } public void doanotherthing(){ var1 .docount(); } } ex 2 public class myclass { public void dosomthing(){ mysecondclass mysec = new mysecondclass (); mysec.domultiply(); } public void doanotherthing(){ mysecondclass mysec = new mysecondclass (); mysec.docount(); } } update ok complete code add caller class. public class caller { public static void main(string arg[]){ myclass myclass = new myc...

dynamics crm 2013 - Linking Phone Call to Account -

Image
making workflow in crm 2013 can't seem access field want. want account name field on phone call populated account field of contact on call field. i can create update process (triggered when phone call created or when call updated), i'm unsure of how access fields within call entity. the form assistant doesn't seem give me access fields under entity selected in call field. can see i've tried in yellow doesn't appear anything. i've tested , know process triggered. when triggered should account name field contact in call field , insert account name field on phone call. i'm assuming there's on field level of either call or account name fields not allowing me get/insert form. let me know if isn't clear , can explain further. this may not answer want can meet requirement custom codeactivity . class need take phone call , if call to field contact retrieve contact record, account's name (it should in entityreference.name prop...

javascript - how to set the limit of minimum and maximum value in Jquery or js -

i have script increment decrements value of text box, it's working fine. thing need achieve is, have set minimum , maximum value decrements , increments receptively. i don't need alert n message show user, need should not change value after reaching limit. <script> $(document).ready(function(){ $("#up").on('click',function(){ $("#incdec input").val(parseint($("#incdec input").val())+1); }); $("#down").on('click',function(){ $("#incdec input").val(parseint($("#incdec input").val())-1); }); }); </script> demo you can use following. set max , min value in data-max , data-min attribute in up , down buttons; <input type="button" id="up" value="up" data-max="5"/> <input type="button" id="down" value="down" data-min="0"/> and in js; $(document).ready(...

gecko - Android build: Fennec with chromium rendering Engine -

i built chromium android following these instructions https://code.google.com/p/chromium/wiki/androidbuildinstructions . got content shell not full browser. then, built firefox android. got full web browser. performance of chrome content shell much better of firefox android build. now, want try building firefox android using chromium rendering engine, blink replacing gecko rendering engine. how difficulty level , how can start. thanks, chromium uses blink (earlier webkit) rendering, , v8 javascript interpretation along various 3rd party dependencies. though content shell small browser (sans complex ui of chromium) functional , wrapper on blink. having said fitting blink firefox (instead of gecko) new project itself, can try building webview, can build simple browser in android. http://developer.android.com/reference/android/webkit/webview.html chromium - open source project chrome- google's proprietary software + chromium in android google chrome can installe...

c# - Error while displaying the PDF column using select query -

pdfptable tabl11 = new pdfptable(8); string connect19 = configurationmanager.connectionstrings["projectconnectionstring"].connectionstring; sqlconnection cn19 = new sqlconnection(connect19); cn19.open(); sqlcommand cmd19 = new sqlcommand("select distinct * (select p1.pubid,p2.publisher,p2.title,p.name authors personal_det p,publication_tracker p1,publication_det p2 p.fid=p1.fid , p1.contribution_type='a' , p1.pubid=p2.pubid , p.fid=@fid ) t1 inner join (select p.name coauthors,p2.pubid,p2.type,p2.title,p2.pubdate,p2.publisher personal_det p,publication_tracker p1,publication_det p2 p.fid=p1.fid , p1.contribution_type='c' , p1.pubid=p2.pubid , p1.pubid=4 ) t2 on t1.pubid = t2.pubid ", cn19); cmd19.parameters.addwithvalue("@fid", session["fid"]); sqldatareader rdr11 = cmd19.executereader(); if (!rdr11.read()) { tabl...

linux - lose characters when upload files contain UTF-8 names -

Image
when try upload files names in utf-8 server. seems several characters cut off. example, Đề thi đẫm máu stored thi đẫm máu ( Đề lost). try creating new utf-8 filenames on system. , errors occur files can't deleted or opened. (i.e. indexá.php ) i found file stored correctly in root. error of display on admin control panel. how fixed this?

Java Convert String to Date -

i have database date field return resultset.getdate("startdate"); i change format of dd-mmm-yy , preserve date type means wouldn't convert string. i have following code snippet change date format private date getdate(resultset resultset,date columnname) simpledateformat format1 = new simpledateformat("dd-mmm-yy"); string date = new simpledateformat("dd-mmm-yy").format(columnname); what best approach convert string again date same date format dd-mmm-yy i change format of dd-mmm-yy , preserve date type means wouldn't convert string. that not possible; have misunderstanding date object represents. a date object contains timestamp value, , not know how should formatted when printed. so, cannot have date object format. instead, set format on simpledateformat object, use convert date object text.

csv - CsvParser Stream Closed Error When Parsing Multiple Files -

i'm trying parse list of csv files recursing on directory. code below prints 1 line , exists stream closed error : def stagedir = new file(stage_dir), listoffiles = [], filesdata = [] // list of files stagedir.eachfilerecurse(filetype.files) { file -> listoffiles << file } // start parsing each csv file in list listoffiles.each { file -> def csvdata = file.withreader { new csvparser().parse( , separator: csv_separator ) } // here put returned csvdata (of type csviterator) in filesdata filesdata.add(csvdata) } // checked filesdata , it's not empty, iterate on it. // here : stream closed error // i'm trying test printing first line of myit // (but there more efficient way iterate on csviterator ?) (myit in filesdata) { println myit[0].id + " " + myit[0].name } is there better way use csvparser multiple files , avoid stream closed error ? you don't add filesdata parsed data result returned new file('...

asp.net - Authorize.Net AIM Transaction timeout workaround? -

i have written following code authorize.net aim gateway auth_capture transaction: try { if (transactionamount == 0) { logger.writeinfo("$0 transaction needs no payment gateway transaction "); } else { //this function sends auth_capture request , processes payment based on transaction parameters. transactionresponse transactionresponse = processpayment(dist, fee); transactionid = transactionresponse.transactionid; transactionstatus = transactionresponse.status; serverresponse = transactionresponse.serverresponse; } } catch (timeoutexception tex) { context.dispose(); logger.writeerror(ex.tostring()); master.errormessage ...

get values from string using strsplit and/or substring in R -

the below string character, contains information want use , assign variables. [1] "elev: 82 m lat: 39° 37' 39\" n long: 22° 23' 55\" e" . for example: assign elev variable numeric value equal 82 . how should approach this? need regular expression using strsplit , substring ? here strsplit solution. the first argument gsub pattern string "(\\w+):" . matches "word" characters "\\w" ensuring there @ least 1 such character "+" match succeeds if word characters followed colon ":" . the second argument gsub replacement string ":\\1:" . specifies portion of pattern within parens "(\\w+)" replaced "\\1" followed colon ":" . is, prefaces each word ending in : : . finally strsplit splits on spaces-colon-spaces forming result matrix. code not depend on labels are: m <- matrix(strsplit(gsub("(\\w+):", ":\\1:"...

objective c - Sync an iOS folder to Google drive -

i want have 2 way sync between local ios folder , google drive folder. can suggest way achieve this? not able find right google drive api. the right google drive api google drive sdk https://developers.google.com/drive/

python - Django-easy-pdf: xhtml2pdf reporting reportlab 2.2+ is required, but 3.0 installed -

i'm trying give django-easy-pdf go, i'm having problems installing dependencies. i importerror: no module named xhtml2pdf.default when running django. to attempt fixing, did pip install xhtml2pdf , yields could not find downloads satisfy requirement pypdf (from xhtml2pdf) . so let's pip install --allow-unverified pypdf pypdf around that. completed without issues. when repeating pip install xhtml2pdf , software gets installed without issue. however, when launching django 1.6, get: importerror: reportlab version 2.1+ needed! . i have reportlab 2.2 or higher installed though, since pip freeze lists 3.0. it looks hardcoded in few files ( util.py , __init__.py ): if not (reportlab.version[0] == "2" , reportlab.version[2] >= "1"): raise importerror("reportlab version 2.1+ needed!") if not reportlab22: raise importerror, "reportlab toolkit version 2.2 or higher needed" how can fixed (except remove these c...

visual c++ - Docking CFormView in SDI -

i have sdi app[mfc] 2 spitter divides view 3 views. have implemented cformview has clistctrl/ctreectrl in 3 views. what want make control fit screen in application. ctrls doesn't fit screen , doesn't scale when spitter expaned or shriked. how acheive fit screen functionality ? thanks a cformview has static size , scrolls. isn't real solution you. don't use cformview. you can divide each pane again splitter window hold tree ctrl , list ctrl. if don't need doc/view, create own cwnd contains clistctrl , ctreectrl , overwrite wm_size , resize 2 child controls in it. using cview parent work too, again overwrite wm_size child controls fir complete area of view. if use cwnd or cview parent class, think using isdialogmessage handle keyboard switching vk_tab between 2 windows...

django - ManyToMany field, check if relation exists -

class player(models.model): item = models.foreignkey(test) box = models.manytomanyfield(test) views: a = player.object.get(id=1) b = player.objects.get(id=5) how check if a.item in manytomany relation b.box ? it's pretty simple: playes.objects.filter(pk=a.pk, box__pk=b.pk).exists()

parse.com - Android: Retrieving User profile picture from User class in Parse -

i want current user followers in list-view inducing names , profile pictures, have 2 classes in parse : user class: includes ( username , pic columns ) , following class: includes ( username , follower_name columns ) now here query : @override protected void doinbackground(void... params) { // create array users = new arraylist<userinfo>(); try { parseuser currentuser = parseuser.getcurrentuser(); parsequery<parseobject> innerquery = new parsequery<parseobject>("following"); innerquery.whereequalto("username", currentuser); parsequery<parseuser> query = parseuser.getquery(); query.wherematchesquery("username", innerquery); // ascending query.orderbyascending("createdat"); ob = query.find(); (parseobject user : ob) { // locate images in pic column parsefile image = (parsefile) user.get("pic"); userinfo map = new userinfo(); map....

php - .htaccess https rewrite error redirection loop -

my .htaccess code giving me error this webpage has redirect loop in chrome browser. can correct .htaccess code? rewriteengine on rewritecond %{http_host} ^purchase\.com\.au$ [or] rewritecond %{http_host} ^www\.purchase\.com\.au$ rewriterule ^(.*)$ "https\:\/\/purchase\.com\.au\/$1" [r=301,l] rewritecond %{script_filename} !-d rewriterule ^([^\.]+)$ $1.php [nc,l] directoryindex index.html index.php if website address purchase.com.au , need redirect https://purchase.com.au try this: rewritecond %{https} off rewriterule ^(.*)$ https://%{http_host}%{request_uri} [l,r=301] basically checkes if https off (request made via http - no https) , redirect every request https variant (same url goes https instead of http)

c# - Get the left and the top value for a excel cell -

in project, use .net library npoi create excel documents. if ms office installed, checkboxes , combobox ms interop excel dll added. because different excel sheets created different column weights, left , top values in code below should dynamic: //top value of first checkbox double top = 68; (int = 6; <= rowcount; i++) { microsoft.office.interop.excel.oleobject obj2 = objs.add("forms.checkbox.1", system.reflection.missing.value, system.reflection.missing.value, false, false, system.reflection.missing.value, system.reflection.missing.value, 1055, //static left value top, //static top value 10, 10); top += 15.43; top -= 1.0295; } microsoft.office.interop.excel.oleobject combobox = objs.add("forms.combobox.1", system.reflection.missing.value, system.reflection.missing.value, false, false, system.reflection.missing.value, system.reflection.missing.value, 1080, //static left valu...

c++ - How to make my project files with static library (Snappy) -

i have project using snappy library , makefile it: cxx=g++ cxxflags=-c -wall lflags= objs=main.o utilities.o framingformat.o crc32.o snappy.out: $(objs) $(cxx) $(lflags) $^ -o $@ $(objs): %.o:%.cpp $(cxx) $(cxxflags) $< -o $@ clean: -rm -rf *.o .phony: clean snappy library has been built earlier. now run makefile have errors: g++ main.o utilities.o framingformat.o crc32.o -o snappy.out framingformat.o: in function `compresstoframe(char*, unsigned long, char*, unsigned long*)': framingformat.cpp:(.text+0x5b): undefined reference `snappy_compress' framingformat.o: in function `uncompressfromframedata(char*, unsigned long, char*, unsigned long*)': framingformat.cpp:(.text+0x14a): undefined reference `snappy_uncompress' framingformat.o: in function `maxframelength(unsigned long)': framingformat.cpp:(.text+0x2bf): undefined reference `snappy_max_compressed_length' framingformat.o: in function `uncompresseddatalength(char*, unsign...

Gmaps4rails doesn't display my marker until reload -

i implemented gmaps4rails map in app: link 1 location, may go list link @ bottom , check location --- http://immosmap.herokuapp.com/locations/37 my problem ist error , displays blue map: uncaught typeerror: object # has no method 'setmap' but when reload, display way want work. do have implement callback here? how? didn't find topic in wiki...

postgresql - SqlAlchemy: Querying the length json field having an array -

i have table field of type json. json field contains json object array. how query length of array each row? class post(base): __tablename__ = 'posts' id = column(integer, primary_key=true) items = column(json) example rows in table: id: 1, items: [2,3,5] id: 2, items: [2,3,5, 8, 12] id: 3, items: [2,5] id: 4, items: [] expected result: 1 3 2 5 3 2 4 0 is there this: session.query(post.id, len(post.items)) note: json field contains array of complex objects, have used integers here purpose of illustration. found solution create class extends functionelement this from sqlalchemy.sql.expression import functionelement sqlalchemy.ext.compiler import compiles class json_array_length(functionelement): name = 'json_array_len' @compiles(json_array_length) def compile(element, compiler, **kw): return "json_array_length(%s)" % compiler.process(element.clauses) and use session.query(post.id, json_array_length(post.i...

jquery - Bootstrap Flatty and jQueryUI Datepicker -

i trying implement normal jqueryui datepicker on css template can found @ http://wrapbootstrap.com/preview/wb0p6nr1n . template has built in date/time pickers (to found under forms > form components), cannot them work. documentation lacking include working. also, not want use popup "button" @ side of text box, rather have pop when user focuses on text box. i have tried normal jqueryui datepicker code follows, though no error calling datepicker() function, no date picker popping up. <div class="form-group"> <input class="form-control hasdatepicker" id="date_of_birth" name="date_of_birth" type="text" placeholder="date of birth" data-format="yyyy-mm-dd" data-validation="length" data-validation-error-msg="please enter valid date of birth" data-validation-length="min10,max10"> </div> $(document).ready(function() { $('.hasdatepicker').da...

MODIFY keyword in SQL SERVER -

does 'modify' keyword exist in sql server? preparing exam , have question in options there 'modify column' statement. googled no result, tried execute statement management studio did not let me. thank you in sql server, can alter table mytable alter column mycolumn . in mysql , oracle, syntax alter table mytable modify column . see msdn docs on alter table . currently, modify not reserved key word in sql server. however, linked article suggests, on list of future reserved words. microsoft not recommend using these words identifiers.

attributes - Magento add Customer Select in Customer Info -

i need create customer attribute callend "parent_id". customer "child" need have "customer parent", so, want put select of customers in customer info choice customer parent customer child . omg i tried this: in xkey/usuarios/sql/mysql4-install-0.1.0.php $setup = mage::getmodel('customer/entity_setup', 'core_setup'); $setup->addattribute('customer', 'parent_id', array( 'type' => 'int', 'input' => 'select', 'label' => 'customer parent id', 'global' => 1, 'visible' => 1, 'required' => 1, 'user_defined' => 1, 'default' => '', 'visible_on_front' => 1, 'source' => 'usuarios/entity_parent_id', )); if (version_compare(mage::getversion(), '1.4.2', '>=')) { mage::getsingleton('eav/config') -...

php - Finding the value of an option with specific string -

consider snippet select form: <select name="cat_id""> <option value="33">apple</option> <option value="44">banana</option> <option value="48">carrot</option> <option value="50">dew</option> <option value="77">eggplant</option> <option value="84">fern</option> <option value="92">grass</option> </select> is there way, using simple dom, can extract value="x" specific string. example, want value of dew , hence, must able 50 tried searching , playing, cannot find exact answer: parsing drop down menu php simple dom <-- values doesn't start 0 nor increments uniformly php , simple_html_dom.php, selected option <-- not have selected entry in select form i need value specific string can use send form using cur...

virtualbox - Vagrant won't run -

i have installed vagrant , virtualbox on 64 bit windows machine. when try run 'vagrant up' et following message: there error while executing vboxmanage , cli used vagrant controlling virtualbox. command , stderr shown below. command: ["modifyvm", "01fd6095-edae-4c33-93c8-3c9d10ab4430", "--name", "xxx_1397481035300_70240"] stderr: vboxmanage.exe: error: not rename directory 'd:\virtualbox vms \packer-virtualbox-iso_1397480994399_38288' 'd:\virtualbox vms\xxx_1397481035300_70240' save settings file (verr_file_not_found) vboxmanage.exe: error: details: code e_fail (0x80004005), component sessionmachi ne, interface imachine, callee iunknown vboxmanage.exe: error: context: "savesettings()" @ line 2716 of file vboxmanage modifyvm.cpp i have tried re-installing both programs no avail. can help? i had virtualbox vms folder misspelled. renames , works now.

xml - C# binding images from a List inside a ObservableCollection to show in LongListSelector -

i have problem im trying show images list inside longlistselector, when im trying bind longlistselector list contains images, wont show images. my longlistselector in xaml: <phone:pivotitem header="images"> <grid> <phone:longlistselector layoutmode="grid" isgroupingenabled="true" gridcellsize="180,180" margin="0,0,-12,0" itemssource="{binding}"> <phone:longlistselector.itemtemplate> <datatemplate> <grid background="{staticresource phoneaccentbrush}" margin="5"> <stackpanel> <image source="{binding images}"></image> </stackpanel> </grid> </datatemplate> </phone:longlistselector.itemtemplate> </phone:longlis...

excel - Automation Error with Range.Recordset method -

i'm running issue when executing line of code, contained in userform: dim rs adodb.recordset set rs = createobject("adodb.recordset") 'omitting querystring , connection parameters - i'm highly issue doesn't lie there rs.open querystring, cn 'declare object dim classcutcells range 'the next 2 lines 1 in actual code, broke here readability set classcutcells = reisws.range(reisws.cells(classcutrow, classcutcol), _ _ reisws.cells(classcutrow + rs.recordcount, classcutrow + rs.fields.count)) 'the following line produces error classcutcells.copyfromrecordset (rs) when click event goes off, error: run-time error '430': class not support automation or not support expected interface. my current references include: visual basic applications microsoft excel 14.0 object library ole automation microsoft forms 2.0 object library microsoft office 14.0 object library microsoft scripting runtime microsoft windows common...

javascript - Fixed position on a hidden Content should stick to top -

translate3d(0%, 0px, 0px); brakes position fixed. on demo should see content on click opens fine should stuck top in position fixed. so, scrolling down container (placekitten images) click button, hidden content should open google image stuck on top. <html> <div class="container">placekitten images</div> <button>loaded-content comes in translate3d(0%, 0px, 0px)</button> </html> <html> <div class="sticky">google image on top.</div> <button>back button slides loaded content translate3d(100%, 0px, 0px)</button> </html> translate3d brakes position fixed!!! how can fix this? http://jsfiddle.net/j7p99/ possible repeat in summation, translate3d creates new local coordinate system, overrides position attribute have set! in essence, instead of being fixed viewport want (in case stay top) fixed the translated element! i able find this however, fixed top bar translate3d(0...

android - Polycom cURL to HTTP request -

i using polycom device make calls. need call number android device. polycom tutorial suggests use curl purpose. however, since android not support curl, know there anyway make request using http? this curl command using- curl --digest -u abc:xyz -d "<polycomipphone><url priority="critical">softkey:cancel </url> </polycomipphone>" --header "content-type: application/x-com-polycom-spipx" http://1.2.3.4/push where, abc:xyz username/password i unable understand http headers in case. edit: polycom phone model vvx-550 edit 2: got working using code below: public void makecall(){ httpclient client = new defaulthttpclient(); httppost post = new httppost("http://1.2.3.4/push"); post.setheader("content-type", "application/x-com-polycom-spipx"); if(isauthrequested){ digestscheme digestauth = new digestscheme(); digestauth.overrideparamter("algorit...

.net - How to send a textbox to a printer -

i writing program in visual basic, want users print contect of textbox1.text this code part: private sub button4_click(sender object, e eventargs) handles button4.click printdialog1.document = printdocument1 printdialog1.printersettings = printdocument1.printersettings printdialog1.allowsomepages = true if printdialog1.showdialog = dialogresult.ok printdocument1.printersettings = printdialog1.printersettings printdocument1.print() end if end sub could me? you not printing anything. have @ page . has worked example of how printing. basically need put code printdocument.printpage event. for exmaple: private sub printdocument_printpage(byval sender object, byval ev printpageeventargs) handles printdocument1.printpage dim linesperpage single = 0 dim ypos single = 0 dim count integer = 0 dim leftmargin single = ev.marginbounds.left dim topmargin single = ev.marginbounds.top dim line string = nothing ...

api - Spotify Java Application Issue -

trying create java application uses spotify web api artists, tracks, etc. having trouble getting come through, believe problem in class , appreciate i'm struggling! thanks public class spotifyaccess extends java.lang.object { private controller controller; public spotifyaccess() throws ioexception { controller = new controller("spotify", "http://ws.spotify.com/", ""); controller.setretries(1); controller.settimeout(10000); controller.settracesends(false); } /** * searrch artist name * @param query name of artist * @return list of artists * @throws ioexception */ public results<artistitem> searchartist(string query) throws ioexception { return searchartist(query, 1); } /** * search artist name * @param query name of artist * @param page page number * @return list of artists * @throws ioexception */ public resu...

facebook - Trying to authenticate and read newsfeed/timeline (C# Desktop application) -

i trying write c# desktop/forms application reads user's timeline and/or newsfeed. i have created app user , have used access token tool generate access code app/user. this code worked ok few days ago var accesstoken = "<user token goes here>"; var client = new facebook.facebookclient(accesstoken); dynamic me = client.get("me"); string tz = me["timezone"].tostring(); but today have error oauthexception - #190 error validating access token: session has expired from token tool ( https://developers.facebook.com/tools/accesstoken/ ) cannot see how extend token lifespan. nor can delete create new one, is there way refresh or recreate own token c# desktop application assuming 1 possible can point me in right direction on how go reading timeline and/or newsfeed. thanks in advance! in general, quite hard authenticate user in desktop application. have @ answer question obtaining facebook auth token command-line (deskto...

jsf - Error 404 : /j_spring_security_check is not available -

i tried integrate spring security on jsf in authentication form , private page need authentication , when enter login , password ,this error diplayed error 404 : project/j_spring_security_check not available so created jsf form : <h:form id="loginform" prependid="false" > <label for="exampleinputemail1">email address</label> <h:inputtext class="form-control" id="j_username" required="true"/> <label for="exampleinputpassword1">password</label> <h:inputsecret class="form-control" id="j_password" required="true"/> <h:commandbutton type="submit" class="btn btn-primary btn-block" action="#{authentication.dologin()}" value="login" /> </h:form> the function dologin() in authentication bean defined : public string dologin() throws servletexception, ioexception { ...