Posts

Showing posts from May, 2014

jquery - trying to get an element's position, but it's always 'undefined' -

i'm trying # use in scrolltop function, 'undefined' have gone wrong? <html><head><meta http-equiv=content-type content="text/html; charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.css"> <script src="http://code.jquery.com/jquery-2.1.0.min.js"></script> <script src="http://code.jquery.com/mobile/1.4.1/jquery.mobile-1.4.1.min.js"></script> </head><body> <div data-role="page" id="page5" data-theme="c"> <br><br><br><br> <p><span id="1.11.13">1.11.13</span> lots of text here... </p> <script> $(window).on('pageinit', function() { console.log($('#1.11.13').css('top')); //undefined conso

linux - how to delete couchbase bucket data from node's file system? -

i using cluster of couchbase servers couchbase-server-enterprise_2.5.0_x86_64 comprised of there nods. result of writing many recorders bucket, i've exceeded cluster memory , nodes went down. i tried rebooting machine node , restarting won't start. reason has many data. clear bucket removing it's data disk, can't seem find location data stored on disk in couchbase. can point me right direction? data couchbase (assuming linux) stored at: /opt/couchbase/var/lib/couchbase/data when 'too many recorders bucket' mean? because have data larger ram amount doesn't mean node should go down, means not documents available in ram , node have fetch disk (slower). unless you've exceeded cluster capability huge margin don't think cause. i investigate before wiping data on node + backing data up. you can @ logs located at: /opt/couchbase/var/lib/couchbase/logs how ram each of servers have , how assigned couchbase?

php - How enable apache caching but allow changing the cache when file is changed (for that one file)? -

after enabling cache settings in httpd.conf, unable see changes make file (from index.php style.css in theme files). nothing causes apache/php/wordpress serve new version of file. thing works turning off caching (by removing httpd.conf , restarting apache). cacheenable disk / cacheroot /webapps/cache/app1 cachedefaultexpire 3600 cachedisable /wp-admin cachedirlevels 3 cachedirlength 5 cacheignorecachecontrol on cachemaxfilesize 1000000000 cacheignorenolastmod on cachemaxexpire 1209600 but that's not how want caching work. if file changed, should serve new version. how enable work , change cache version when alter file?

android - custom adapter with ArrayList<HashMap<String, List<String>>> -

its complicated question, hope can me. i want make custom adapter can handle array list mentioned in title currently doing this, not going getview(...) method. public class eventsadapter extends baseadapter{ arraylist<hashmap<string, list<string>>> eventlist; private context context; private int resource; private static final string tag_title = "e_title"; public eventsadapter(context context, int resid,arraylist<hashmap<string, list<string>>> eventlist) { this.context = context; this.resource = resid; this.eventlist = eventlist; log.v("chk", "1"); } @override public view getview(int position, view convertview, viewgroup parent) { view event = convertview; textview title, desc, date, time, venue; hashmap<string, list<string>> hm = eventlist.get(position); list<string> items = hm.get(tag_title); typeface font = typeface.createfromasset(con

database - Non spatial indexes in Oracle -

i'm trying create non-spatial index on 2 columns, 1 of geometry column (sdo_geometry). appears documentation possible i'm unable create one. an excerpt oracle documentation: for each spatial column in non-spatial index except point columns, column prefix length must specified. (this same requirement indexed blob columns.) prefix length given in bytes. here's query i'm trying execute create index: create index multiple_column_index on testdb (id, shape) tablespace test; the shape column geometry column here. error i'm receiving is: sql error: ora-02327: cannot create index on expression datatype adt 02327. 00000 - "cannot create index on expression datatype %s" *cause: attempt made create index on non-indexable expression. *action: change column datatype or not create index on expression datatype 1 of varray, nested table, object, lob, or ref. i've not applied column prefix here couldn't find do

c - Preorder Postorder Tree Traversal when RSON and LSON are given -

if input this 1111010000000 //lson gerlwidakonth //data 1101101000110 //rson it should output preorder , postorder of given tree. the problem is: program doesn't print correct postorder , can't figure out why. hope me. preorder correct okay me if want add improve codes. thank you!:d #include<stdio.h> #include<stdlib.h> #include<string.h> #define size 5 #define case 3 #define n 100 struct node{ char data; struct node* llink; struct node* rlink; int tag; }; typedef struct node node; typedef node* nodeptr; void twopreorder(int *counter, int *size, nodeptr *a, nodeptr *b, nodeptr *o); void threepreorder(int *counter, int *size, nodeptr *a, nodeptr *b, nodeptr *o); void twopostorder(int *counter, int *size, nodeptr *a, nodeptr *b, nodeptr *o); void threepostorder(int *counter, int *size, nodeptr *a, nodeptr *b, nodeptr *o); void printsequence(char *array[3], int size){ int i; printf("ltag: "); for(i =

python - Removing quotes from keys of dicts when rendering to template -

is possible remove quotes on keys during rendering dict render_to_string function key:value , not 'key':value in template? for example if dict: d = {'a':1, 'b':2} and render this, return render_to_string('somefile.json', {'d':d}) then in somefile.json {{d}} {'a':1, 'b':2} , want {{d}} {a:1, b:2} . (without quotes on a , b ) how achieve this? tia one approach use overriding __repr__ method of dict class or subclassing , changing method there. have latter solution below. class mydict(dict): def __repr__(self): s = "{" key in self: s += "{0}:{1}, ".format(key, self[key]) if len(s) > 1: s = s[0: -2] s += "}" return s mydict({'a': 1, 'b': 2}) {a:1, b:2}

java - How to get values out of JPA unique constraint violation? -

i'm doing web project primefaces sends , gets data remote ejb uses jpa. got code handle unique values, after setting unique=true in entity bean: try{ emsave.persist(newitem); } catch (persistenceexception pe){ system.out.println("dupe found"); } then rollback transaction. in eclipse console these messages jboss as: 09:15:12,179 warn [org.hibernate.engine.jdbc.spi.sqlexceptionhelper] (http-localhost-127.0.0.1-8189-6) sql error: 1062, sqlstate: 23000 09:15:12,179 error [org.hibernate.engine.jdbc.spi.sqlexceptionhelper] (http-localhost-127.0.0.1-8189-6) duplicate entry 'asdasd' key 'username' i have send objects can't saved front-end , display them in table, or mark them somehow in table user knows has change. have way how that, don't know how mark field has bad value. possible 'username' field filled incorrectly exception, or way should used? i'm looking elegant solution. first of all, persist() not throw e

Rest end point's POST method not working in client (python) but same rest api works with soapUI -

accept-encoding: gzip,deflate integrating rest based web services program. rest services tested soapui. rest end points working fine. when integrate rest services python based client program facing issue post request. have tried using urllib2, requests, httplib modules.. urllib2 implementation import urllib2 import urllib url = "https://serverip.com/webapi/object1/" values = { "owner": 1, "parent": 1, "region": 7, "pod_identifier": "ememaster1", "type": "s", "number": 1, "description": "testtttt", } data = urllib.urlencode(values) req = urllib2.request(url) req.add_data(data) req.add_header("authorization", "token as123131231231312312321asddasd43532y5456#$%#$") response = urllib2.urlopen(req) res = response.read() print res result file "tester.py", l

ios - Adding a UIButton to a SKScene -

what best way add uibutton skscene ? i realize can't add subview of scene, alternative can have tappable button on top of scene? you can opt 1 of following ways: 1 - subclass skspritenode act button 2 - implement touch delegates within scene , respond if 'button' node touched this link tell u how implement 2 above. 3 - use component spritekit button can found here .

pattern for updating a datastore object -

i'm wondering right pattern should update existing datastore object using endpoints-proto-datastore. for example, given model 1 gdl videos: class task(endpointsmodel): detail = ndb.stringproperty(required=true) owner = ndb.stringproperty() imagine we'd update 'detail' of task. i considered like: @task.method(name='task.update', path='task/{id}', request_fields=('id', 'detail')) def updatetask(self, task): pass however, 'task' presumably contain previously-stored version of object, , i'm not clear on how access 'new' detail variable update object , re-store it. put way, i'd write this: def updatetask(self, task_in_datastore, task_from_request): task_in_datastore.detail = task_from_request.detail task_in_datastore.put() is there pattern in-place updates of objects endpoints-proto-datastore? thanks! see documentation details on this t

swt - TableViewer update value of column when value in another column has changed -

i have table 2 columns both combobox columns. when user selects value in column 1, want update options available in combobox column 2. how do this? update values in data model , call tableviewer.update(object, null) object data model object row (that value content provider returns row). update call cause tableviewer ask content provider values row again.

javascript - not submit form of parent window when child window is open -

i write code..but want not submit form of parent window when child window open <script language="javascript"> function popwindow(page) { openwin = this.open(page,"ctrlwindow","top=80,left=100,screenx=100,screeny=80,width=600,height=400,status=yes,toolbar=no,menubar=no,location=no, scrollbars=yes,resizable=yes"); openwin.focus(); return false; } </script> there's closed property window, check openwin.closed. http://www.w3schools.com/jsref/prop_win_closed.asp

Generation of binary data using Beta distribution in R -

i new user in r. in work, have generate binary data(0 or 1) using beta distribution (rbeta command). have create matrix of such data. in of columns want have more zeros ones or ones more zeros. , should done taking shaping parameter 1 = shaping parameter 2 =0.5. tried combinations. not able this. please let me know way same. hint provided was: take probability(0) =some number , probability(1) = 1- probability(0). give these parameters rbeta command. did not find such facility rbeta command. please let me knoe if there way. thanking you, kalyani

javascript - after second ajax call all jquery codes not working -

i'm getting partial via ajax in asp.net mvc, work fine first time , second time after that, jquery codes stop working. code : <script> var jqgd = jquery.noconflict(); jqgd(function () { jqgd('#getdata-@viewbag.term').on('click', '#getdata-@viewbag.term a', function () { if (this.href == "") { return; } jqgd.ajax({ url: this.href, type: 'get', cache: false, success: function (result) { alert(result); jqgd('#retrieve-@viewbag.term').html(result); } }); return false; }); }); </script> <script type='text/javascript'> //this function jquery(function ($) { $("div, p, a, b, strong, bold, font, span, td") .filter(function () { return $(this).children(":not(.word)"

database - Is it possible to apply any encryption algorithm on ODBC? -

i want know can apply customized encryption algorithm odbc? thanks. it driver dependent if uses cryptography when "talks" server. drivers use (informix, oracle) not use cryptography, while others (postgresql) offers ssl. of course can use vpn encryption , transmission should secure. or can encrypt data in database. but solutions not odbc dependent.

java - Grails start application -

every time start grails applications- has error message , don't know why? | error 2014-03-06 19:30:55,494 [localhost-startstop-1] error context.grailscontextloader - error initializing application: not resolve property: location of: tutor.com.tutor; nested exception org.hibernate.queryexception: not resolve property: location of: tutor.com.tutor message: not resolve property: location of: tutor.com.tutor; nested exception org.hibernate.queryexception: not resolve property: location of: tutor.com.tutor this tutor.com.tutor domain: package tutor.com class tutor { string description string qualifications string experience double feedback int rate user user static hasmany = [ subjects: subject ] static mapping={ description(sqltype: 'text') } static constraints = { feedback(nullable:true) } } there must in bootstrap or other initializing code call missing tutor.location property

List view click automation using calabash in Android -

i need automate list item click on android app. have googled lot , not found useful information. please me.thanks in advance. then press list item number 2 is predefined step definition in calabash. using steps not best practice see here 1 reason because it´s not written in business language. it´s better approach if you´re writing own steps using according calabash commands. due fact calabash open source can find implementaion of steps in github, in case: then /^i press list item number (\d+)$/ |line_index| performaction('press_list_item', line_index, 0) end from calabash repo

c++ - I am using stringstream with my own buffer, but its str() method doesn't related to my buffer? -

i want use own buffer zone stringstream, changing buffer twice won't expect 2 output code shown follow. std::stringstream ss; char buffer[10]; memset(buffer, '\0', sizeof buffer); ss.rdbuf()->pubsetbuf(buffer, sizeof buffer); sprintf(buffer, "abcd"); std::cout << ss.str() << std::flush; ss.rdbuf()->pubsetbuf(buffer, sizeof buffer); sprintf(buffer, "efgh"); std::cout << ss.str() << std::flush; and result is: abcd after setting buffer "efgh", ss.str() doesn't show me new content, why that? and reason why want directly set internal buffer should system call recv. now found out event if change buffer totally using pubsetbuf in second calling, not change @ all, remaining previous contents. ss different object "buffer" not pointer "buffer". when "pubsetbuf" copy contents of buffer "ss". might want try using "ss<<buffer" instead anyway,

primefaces - How to change the DataTable scrollbar appearance? -

Image
i tried find firebug proper css class responsible datatable scrollbar appearance, couldn't find reasonable css class. table scrollbar browser dependent - looks different in every browser. how can implement 1 scrollbar appearance every browser? you can achieve css, using webkit. primefaces has modifications done normal scrollbar in there css. the scrollbar webkit are: ::-webkit-scrollbar { /* 1 */ } ::-webkit-scrollbar-button { /* 2 */ } ::-webkit-scrollbar-track { /* 3 */ } ::-webkit-scrollbar-track-piece { /* 4 */ } ::-webkit-scrollbar-thumb { /* 5 */ } ::-webkit-scrollbar-corner { /* 6 */ } ::-webkit-resizer { /* 7 */ } some of these implemented primefaces, !important needed. here's quick example based on an article . /* !important needed */ ::-webkit-scrollbar { width: 12px !important; } /* track */ ::-webkit-scrollbar-track { -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3) !importa

razor - Remember me in Asp.Net Mvc4 -

i new 1 asp.net mvc4 entity framework. trying implement remember me task in log in page. here not using model property remember me. passing value controller model. please me set cookie in controller.thanks in advance. this model code: @using (html.beginform("login", "login")) { <p class="mt5 mb20">login access account.</p>*@ <div> @html.validationsummary(true) </div> <div> @html.textboxfor(u => u.username, new { @class = "form-control uname", placeholder = "username" }) @html.passwordfor(u => u.userpassword, new { @class = "form-control pword", placeholder = "password" }) @html.actionlink("forgot password?","forgotpassword","login",new {@class="navbar-link&quo

jquery - Submit button not in form collection when using MVC Client validation -

i have view client mvc validation activated , input type=submit buttons. don't use ajax. <input name="save" class="btnsave" type="submit" /> fails : when click 1 of submit button, form submitted, have no trace of submit button works : when first manually validate form javascript (frm.valid() , form valid), submit button is in form collection. when remove javascript rendered html test , click, submit button is in form collection i absolutly need submit button clicked in form collection thank help

delphi - Why doesn't my TStringList gets sorted -

i have tstringlist create on formcreate scriptlist := tstringlist.create; in function in program after have loaded strings list have following code scriptlist.sorted := true; scriptlist.sort; := 0 scriptlist.count - 1 showmessage(scriptlist[i]); but list not sorted why that? edited: filling list done following code function tfrmmain.scriptslocate(const acomputer: boolean = false): integer; var scriptpath: string; templist: tstringlist; begin templist := tstringlist.create; try if acomputer = true begin scriptpath := folders.dirscripts; files.search(templist, scriptpath, '*.logon', false); scriptlist.addstrings(templist); end else begin if servercheck begin scriptpath := serverpath + 'scripts_' + network.computername + '\'; folders.validate(scriptpath); templist.clear; files.search(templist, scriptpath, '*.lo

android - Updated Adt to r.22 giving errors -

Image
i have updated adt r.22 , takes lot of time sdk content loader tried solving referring eclipse hangs @ android sdk content loader now fine every time open xml/layout file shows 4.4.2 loading , consumes lot of time until layout shows up. 2nd problem i'm facing api level rendering show layouts api 19 shows special characters instead of text try updating sdk build tools well.

c# - Cannot Convert List to Json -

i have following action method: public class mydevicecontroller : apicontroller { // api/<controller> public jsonresult get() { int userid = -1; list<string> mydevices1 = new list<string>(); mydevices1.add("1"); >> return json(mydevices1); << error here } } the return underlined red following error: cannot implicitly convert type (jsonresult list<string>) i using asp.net web api. think getting confused between using system.web.http , system.mvc.http h your system confusing between system.web.http.results.jsonresult<list<string>> and system.web.mvc.jsonresult try specifiyng full name system.web.http.results.jsonresult> public system.web.http.results.jsonresult<list<string>> get() { int userid = -1; list<string> mydevices1 = new list<string>(); mydevices1.add("1"); return json(mydevices1);

html - Simulating stackoverflow like Tab effect -

i trying same effect tab in site. here tried: jsfiddle i unable desired effect. can tell me missing. .mytabs { display: block; height: 24px; text-decoration: none; border: 1px solid rgba(0, 0, 0, 0); border-bottom: 1px solid #ccc; } .mytabs a:hover { border: 1px solid #ccc; border-bottom-color: #fff; } a.youarehere { border: 1px solid #ccc; border-bottom-color: #fff; height: 30px; } fiddle html <div class="tabs-container"> <nav class="mytabs"> <ul> <li><a class="youarehere" href="#">menu 1</a></li> <li><a href="#">menu 2</a></li> <li><a href="#">menu 3</a></li> </ul> </nav> </div> css .tabs-container{ border-bottom: 1px solid #cccccc; height: 34px; clear: both; margin-bottom: 15px; } .mytabs ul { list-style:

php - url management flow in yii framework -

i have implemented project using yii framework. url manager works fine but. need change url text. shown domain name after category name. ie project url kitchenking.com. after domain name category name should display. ie kitchenking.com/thanksgiving. project url display shows follow: http://kitchenking.com/recipe/index1/name/thanksgiving i did config file shows following. please suggest me needs change code. 'home'=>'site/index', //'cuisine'=>'recipe/index3', 'cuisine/<name:\w+>/<id:\d+>/'=>'recipe/index3', 'holidays/<name:\w+>/<id:\d+>/'=>'recipe/index1', 'calories/<name:\w+>/<id:\d+>/'=>'recipe/index2', 'recipeshow/<name:\w+>/<id:\d+>/'=>'recipe/recipeshow', //'recipeshow'=>'recipe/

javascript - Head tag in html page closes programatically after page load -

my page located here can see, doesn't it's working properly. becomes apparent if try open in older browser (this set me off). i checked interpreted source code chrome , shows me following: <html> <head> <style type="text/css"></style> </head> <body> <title>internet adgang - hurtig opsætning - ansatte</title> <meta http-equiv="content-type" content="text/html;charset=utf-8"> etc.. something seems closing head tag causing sorts of errors: w3 validator i have absolutely no idea causing this. you can see source code here (i've scrambled php): the code above not contain body code, sure has nothing head tag closing of sudden. here source of page works fine: i baffled , have no idea nor causing it. ideas? solution with of buttc4k3 , vogomatix found solution. buttc4k3 said, there illegal "zero-width no-space" characte

How to get integer from json object async in android? -

original question - i following tutorial on json in android, having problem json value using async in android. first created jsonparser class , added following - public jsonobject getjsonfromurl(string url) { // making http request try { // defaulthttpclient defaulthttpclient httpclient = new defaulthttpclient(); httppost httppost = new httppost(url); httpresponse httpresponse = httpclient.execute(httppost); httpentity httpentity = httpresponse.getentity(); = httpentity.getcontent(); } catch (unsupportedencodingexception e) { e.printstacktrace(); } catch (clientprotocolexception e) { e.printstacktrace(); } catch (ioexception e) { e.printstacktrace(); } try { bufferedreader reader = new bufferedreader(new inputstreamreader( is, "iso-8859-1"), 8); stringbuilder sb = new stringbuilder(); string line = null;

javascript - How to create promises with the new Breeze Angular Service? -

i'm updating angular/breeze application new breeze angular service ( link ) the documentation explains how remove q.js file , on. i'm stuck replacing method: primepromise = $q.all([getlookups(), getspeakerpartials()]) .then(extendmetadata) .then(success); return primepromise; or $q.when(); how should replace piece of code new breeze angular service? you worried 2 different things. how hold of $q my $q missing critical methods such .when , all you have inject $q service before can use showing in code snippet. check angular documentation see how if don't know. as point #2, make sure running angular v.1.2 , not older version! before v.1.2, $q extremely limited ... why urged folks stick q.js. example, promise offered then method. as of v.1.2 , promise offers catch , finally , $q has all , when methods.

How to plot an irregular spaced RGB image using python and basemap? -

given have 3 matrices describe data want plot: lons - 2d matrix [n_lons,n_lats] lats - 2d matrix [n_lons,n_lats] datargb - 3d matrix [n_lons,n_lats,3] what preferred way plot such data using python , basemap. for pseudo-color data quite simple using pcolormesh method: data - 2d matrix [n_lons,n_lats] m = basemap(...) m.pcolormesh(lons,lats,data,latlon=true) from reading documentation, seems me imshow command should used in case, method regularly gridded data needed , have regridd , interpolate data. is there other way plot data? i ran same issue awhile ago, , solution come with: (note works matplotlib 1.3.0, but not 1.1.0 ) from mpl_toolkits.basemap import basemap import numpy.ma ma import numpy np m = basemap() #define map projection here assuming var variable of interest (nxmx3),lats (n)x(m) , lons (n)x(m): we need convert pixel center lat/lons pixel corner lat/lons (n+1)x(m+1) cornerlats=getcorners(lat);cornerlons=getcorners(lon) get

ios - Exception in registering FFEngine -

i using ffengine playing video via rtmp. getting following exception: __nscfstring objectfromjsonstring]: unrecognized selector sent instance 0xa039d80 on line registerffengine(@"yq2oibqrbxoo35vedico9ggf4arfxrdjq3yiivbltwipe/sgphrthjevczt6mtafejcym1fkbddy+we8j7oejlk+u1keo7igfedq+krnsnc=") i don't know whether registration key incorrect or there other issue. need help. when use ffengine framework , have add “-objc” in project. below simple step add “-objc” in project : 1) select project file project navigator on far left side of window. 2) select target want add linker flag. 3) select “build settings” tab 4) choose “all” show build settings. 5) scroll down “linking” section, , double-click right of says “other linking flags”. 6) box appear, click on “+” button add new linker flag. 7) type “-objc” (no quotes) , press enter. when add -objc after error solved.

Is there a working sample of the Google custom search rest API? -

i need create screen automates google search. know javascript , i'm trying gse works. i have search engine , api key. problem google's documentation cyclic i.e. pages point each other. there no working sample can start research. please if know of working sample. the documents have read are: cselement-devguide introduction the place start rest api here: https://developers.google.com/custom-search/json-api/v1/introduction example: <div id="content"></div> <script> // remember replace your_api_key below. function hndlr(response) { (var = 0; < response.items.length; i++) { var item = response.items[i]; // in production code, item.htmltitle should have html entities escaped. document.getelementbyid("content").innerhtml += "<br>" + item.htmltitle; } } </script> <script src="https://www.googleapis.com/customsearch/v1?key=your_api_key&

Qt and C++ QtPlugin - what kind of plugins can be handled? -

i create application. keep in modular architecture , work on linux, mac , windows. want use qt library in general. the of functionality of application stored in plugins, reasons best approach here. used create plugins on c++. considering use qt plugin management system. my questions are: can system used manage kind of plugins? mean (all i've run into) examples cover plugins regarding qt styles , qt elements, etc. no general plugin managemet "foo" plugin doing "hello world". are there advantages of "manually created" pure c++ plugin system on qt plugin system? should rather consider using pure c++ approach? qt offers generic plugin system, , can leverage whatever use desire. documentation has covered. qt's low-level plugin api works on interface classes - classes abstract virtual methods. plugin implements such interface. plugin loader gives instance of interface-derived class implements interface.

java - Flying-saucer ignores word-wrap -

has here gotten word-wrap: break-word work in flying-saucer ? i'm rendering html png in flying-saucer . can find 3 years old topic here supposed fix, can't recompile flying-saucer myself, since didn't include dependencies download. tried build using build.xml in eclipse, it's lacking javac task. i tried using table table-layout:fixed , flying-saucer ignores well. has succeeded before? attached find sketch of problem. div in browser ________________ | | |wwwwwwwwwwwwwwww| |wwwwwwwwwwwwwwww| |wwwwwwwww | |________________| div in flying-saucer ________________ | | |wwwwwwwwwwwwwwww|wwwwwwwwwwwwwwwwwwwwwwwww |________________| i'm not familiar flying-saucer myself right there in tag description says renderer css 2.1 content , word-wrap css 3

sql - Access forms - edit record from query with join on linked table -

my setup using access 2000 linked tables sql 2008 server. i have created form displays data single linked table joins 1 field view in database (see sql below). relationship between table , view 1:1, why should not cause problem. however, experience cannot update records in recordset via form. error message "recordset cannot updated" when attempting write in 1 of fields. according http://rogersaccessblog.blogspot.dk/2009/11/this-recordset-is-not-updateable-why.html there lot of problems regarding this, fulfill rules not having recordset not being updateable. i have seen work same setup, puzzled why locks recordset now. this sql query: select dbo_balance.*, [dbo_amount_summary_all_specifications].[sum_amount] specification dbo_amount_summary_all_specifications right join dbo_balance on ([dbo_amount_summary_all_specifications].[version]=[dbo_balance].[version]) , ([dbo_amount_summary_all_specifications].[year]=[dbo_balance].[year]) , ([dbo_amount_summar

CheckBox itemrenderer in datagrid got selected/unselected while scrollling in FLEX -

in application having datagrid created dynamically. each , every cell in datagrid, having checkbox itemrenderer. of working fine expected.but while scrolling vertically checkboxes getting selected/unselected automatically.i got same problem in "horizontal scrolling" also, resolved setting "minwidth" each columns. i creating datagrid this, for(i=0;i<recordcount;i++) { var obj:object = new object(); for(var j:int=0;j<maxpages;j++){ { obj["page"+(j+1)]=((xml..item.(pageorder==(j+1))).length()>i)?(xml..item.(pageorder==(j+1)))[i].pagetempverid[0].tostring()+" ("+(xml..item.(pageorder==(j+1)))[i].pageverusername[0].tostring()+")":""; } } dp.additem(obj); } for(i=0;i<maxpages;i++) { var printpdfitemrenderer:classfactory = new cla

node.js - Run Node script from Sublime Text 2, is it possible? -

i starting sublime text 2, when create javascript file can run node app.js sublime console or have outside of sublime? sorry add answer can use built in build system run kind of command want editor pressing ctrl + b (cmd + b) without installing plugins. go tools -> build system -> new build system and structure of file should this { "shell_cmd": "node myapp.js" // replace whatever want } save in default place. you still have ability ctrl + c kill running commands. downside method don't kind of terminal colouring if you're using custom themes on terminal, you'll see escape sequences in window. the other caveat saves files on build default, can turn off in tools menu if don't behaviour.

javascript - Detecting IE10+ loading state -

when browser doing something, displays circle in tab show page loading example. is possible detect that, , mouse cursor change show user that's ie doing something? i understand can write javascript simulate such behavior, wanted know if possible capture state of ie more directly? something ? css body { cursor:progress; } body.loaded { cursor:default; } js window.onload = function() { document.getelementsbytagname('body')[0].classname+=' loaded'; } for browsers

angularjs - show stateprovider template with ng-view -

how can include view in <ng view></ng-view> , have multiple template, cant include 1 using ng-include src="" shows content in different link, not using ng-view <ul class="nav"> <li><a href="#/inventory/list">list view</a></li> </ul> <ng-view></ng-view> my stateprovider app.config(function config( $stateprovider) { $stateprovider.state('inventory',{ url:'/inventory', views: { "main": { controller: 'inventoryctrl', templateurl: 'inventory/main.tpl.html' } }, data:{ pagetitle: 'inventory' } } ).state('add',{ url:'/inventory/list', views: { "main": { controller: 'inventoryctrl', templateurl: 'inventory/list.tpl.html' } },

php - how to remove links and show text of categories in woocoomerce product page -

i need on 1 because on single product page in woocommerce, categories display link. could possible remove link , text shows up im using code of moment $size = sizeof( get_the_terms( $post->id, 'product_cat' ) ); echo '<li>'; echo $product->get_categories( ', ', '<span class="posted_in">' . _n( 'category:', 'categories:', $size, 'woocommerce' ) . ' ', '.</span>' ); echo '</li>'; thanks you can like; $categories = get_the_terms( $post->id, 'product_cat' ); if ( sizeof( $categories ) > 0 ) { echo '<ul>'; foreach ($categories $cat) { echo '<li>' . $cat->name . '</li>'; } echo '</ul>'; }

javascript - Fancybox open with autplay via secondary link -

i using free "fancybox wordpress" plugin open couple of images nice lightbox. now have huge title image saying "show diashow" , pictures of gallery underneath single pics. clicking single images opens them how supposed be, beeing able navigation left/right. problem is, if click huge title image, should open first image of gallery + set autoplay. how can achieve this? i tried this, didnt work out: html <a id="diashow" href="/wp-content/gallery/galerie/1457454_10152045202815199_1685986480_n.jpg" rel="fancybox"><img src="/wp-content/themes/kt2014/images/diashow.jpg" alt="diashow starten" /></a> js $(document).ready(function() { /// start diashow autplay on click jquery('#diashow').click(function(evt) { jquery("a.fancybox").fancybox.open(); jquery.fancybox.play(); }); }); thanks every on this!

php - Find coresponding open/close brackets -

a follow on previous question: php how best edit rtf file i believe have solution, need more help. found if use merge fields in template builder, php code find/replace fields in pattern: "{\field}" problem is, though, need find whole string, remove rtf tags, , compare text left behind. first step, though, find full markup. , stuck. need able find entire string length, open "{" close "}", possible other sets of "{}" in between. example: {\field{\*\fldinst {\rtlch\fcs1 \af31507 \ltrch\fcs0 \insrsid11370280 mergefield details_awardee_name }}{\fldrslt {\rtlch\fcs1 \af31507 \ltrch\fcs0 \lang1024\langfe1024\noproof\insrsid11370280 \'abdetails_awardee_name\'bb}}} as can see, example has multiple embedded markup sets. string within pages of more markup. know way entire string length? can done regex? once accomplished, can move on stripping tags , comparing. thanks jason you can use recursive pattern available op

jquery - BarRenderer changing the default color -

i'm using jqplot , i'm wondering if instead of showing bars in 'blue', show them in 'red' or whatever want : jquery(document).ready(function(){ var data = <?php echo $times; ?>; var plot1 = jquery.jqplot('chart-time', [data], { title:'pages per hours', stackseries: true, seriesdefaults: { renderer: jquery.jqplot.barrenderer, rendereroptions:{barmargin: 10, shadow:false}, pointlabels:{show:true, stackedvalue: true} }, axes: { xaxis:{renderer:jquery.jqplot.categoryaxisrenderer, label:'(hours)'} } }); }); thanks you can adding color property seriesdefaults : jquery(document).ready(function(){ var data = <?php echo $times; ?>; var plot1 = jquery.jqplot('chart-time', [data], { title:'pages per hours', stackseries: true,

ios - CGContext invalid context 0x0 -

i drawing cglayers, creating layer , drawing layer graphics context in drawrect method, way - (void)drawrect:(cgrect)rect { cgcontextref context = uigraphicsgetcurrentcontext(); if(self.currentdrawinglayer == nil) { cglayerref layer = cglayercreatewithcontext(context, bounds.size, null); self.currentdrawinglayer = layer; } cgcontextdrawlayerinrect(context, self.bounds, self.currentdrawinglayer); } i drawing operations in touchesmoved function -(void)touchesmoved:(nsset *)touches withevent:(uievent *)event { cgcontextref layercontext = cglayergetcontext(self.currentdrawinglayer); cgcontextsetlinecap(layercontext, kcglinecapround); cgcontextsetlinejoin(layercontext, kcglinejoinround); cgcontextsetallowsantialiasing(layercontext, yes); cgcontextsetshouldantialias(layercontext, yes); cgcontextsetblendmode(layercontext,kcgblendmodeclear); cgcontextset

php - Get XML element attribute with simplexml -

i have xml file follows: <?xml version="1.0" ?> <shop version="2.0" shop-name="xyz"> <category name="foo1"> <subcategory name="foobar1"> <product name="productname1" id="1"> <supplier name="xxx" logo="xxx.gif" /> <desc>desc</desc> </product> <product name="productname2" id="2"> ... </product> </subcategory> </category> </shop> and attribute value of shop element - shop-name i used simplexml in php: <?php $dataxml=simplexml_load_file("data.xml"); $a=$dataxml->shop[0]["shop-name"]; echo $a; ?> as result nothing. have idea wrong? those attributes, need access them correctly attributes() method: $data = simplexml_load_file( 'data.xml' ); $attributes = $data->attributes(); ec

asp.net mvc 5 - Dynamically load dropdown values depending on row in jquery datatables -

i have mvc web app with jquery code datatables , jeditable. in 1 of views have table projects, users , departments. every project have responsible person. give admin possibility change respnsible person dropdown created on server side. secure don´t break department structures should able choose member department project located. solve have load dropdown depending on entry in department column. far understand datatables, dropdown become loaded if page created shouldn´t possible me change depending on department row. have hind me how solve problem? here html code: <script> $(document).ready(function () { var otable = $('#projecttable').datatable({ "bserverside": true, "sajaxsource": "@url.action("projecttablehandler", "managedepartment")", "alengthmenu": [[10, 25, 50, -1], [10, 25, 50, "all"]], "bprocessing": true,