Posts

codenameone - Codename One add icon to title -

i trying add icon title/ title bar. changing title code works fine : settitle("testing"); yet can't figure out way add icon it. here have tried, no avail: image img = image.createimage("/kalender.png"); gettitlecomponent().seticon(img); fontimage icon = fontimage.creatematerial(fontimage.material_search, "titlecommand", 3); gettitlecomponent().seticon(icon); any appreciated. settitlecomponent solve in below fontimage icon = fontimage.creatematerial(fontimage.material_search, "titlecommand", 3); label title = new label(icon); **settitlecomponent(title);** [edit] **gettoolbar().settitlecomponent(titles);**

android - Listview - has focus always return false -

i have edit text in list view. listview created using base adapter , used holders load edit text. when cal holder.edttext.hasfocus(), return false. missing in listview properties? public view getview(final int position, view convertview, final viewgroup parent) {
 
 if (convertview == null) {
 layoutinflater inflater = layoutinflater.from(getcontext());
 convertview = inflater.inflate(r.layout.screen, parent, false);
 holder = new adapter.viewholder(convertview);
 convertview.settag(holder);
 } else {
 holder = (adapter.viewholder) convertview.gettag();
 }
 
 
 holder.edt.setcursorvisible(holder.edt.hasfocus());
 holder.edt.setenabled(true);
 
 holder.edt.s...

WSO2 AM - Unable to load UserStoreCountRetriever implementation -

i have created userstoremanager implementation loads correctly via component class. however, need userstorecountretriever implementation allow user store work correctly. have extended jdbcuserstorecountretriever , added class name count implementation advanced property. have registered service in component. when user search following message: "error while listing users. error : exception occurred while trying invoke service method countusers". on console, following stack trace: ...caused by: java.lang.nullpointerexception @ org.wso2.carbon.identity.user.store.count.util.userstorecountutils.getcounterinstancefordomain(userstorecountutils.java:136) it looks can't find, or can't load class required implement count. class in same jar file user store.

python - Split Multilevel dataframe into different csv files -

suppose have following dataframe : x y ---+---+---+--- | b | | b --+---+---+---+--- 0 | 1 | 2 | 3 | 4 1 | 5 | 6 | 7 | 8 2 | 9 | 10| 11| 12 i want split based on multilevel index recursively , save them in csv file. for example file name x_a.csv should contain following dataframe: x --- --+--- 0 | 1 1 | 5 2 | 9 similarly file x_b.csv should store dataframe : x --- b --+--- 0 | 2 1 | 6 2 | 10 and on y_a , y_b. i looking pythonic ( or efficient) way rather iterating on column values separately code quite large. tried using techniques mentioned here dropping column levels , storing individual columns want in such way don't have explicitly mention column names since dataframe may expand ( i.e. @ top level there might 4 columns w, x, y , z). list_of_df = [df[i].to_frame() in df.columns] with @johngalt's suggestion csv: _ = [df[i].to_frame().to_csv('{0}_{1}'.format(*i)) in df.columns] output: ...

reactjs - How to prevent row selection after clicking on link inside custom rendered cell in AgGrid -

i using aggrid , have rowselection="multiple" on grid, have {cellrendererframework: printcell} on last column, small component displays link. i want so, when click on link inside printcell , action should executed, without altering the state of grid itself, , keep current selected lines selected without making row containing link selected. tried doing event.stoppropagation , event.preventdefault prevent parent row getting selected, no avail. any idea how achieve ? thanks since row click specified behaviour might easier perhaps use checkbox selection , disable focus row selection entirely. if want keep path generated required behaviour intercepting event in cell focus , blocking row selection there. private oncellfocused($event) { if($event.column && $event.column.colid == "commentid"){ this.gridoptions.suppressrowclickselection = true; } else { this.gridoptions.suppressrowclickselection = false; } this swi...

api - How do I deal with certificates using cURL while trying to access an HTTPS url? -

i getting following error using curl: curl: (77) error setting certificate verify locations: cafile: /etc/ssl/certs/ca-certificates.crt capath: none how set certificate verify locations? thanks. this error related missing package : ca-certificates . install it. in ubuntu linux (and similar distro): # apt-get install ca-certificates in cygwin via apt-cyg # apt-cyg install ca-certificates in arch linux (raspberry pi) # pacman -s ca-certificates the documentation tells: this package includes pem files of ca certificates allow ssl-based applications check authenticity of ssl connections. as seen at: debian -- details of package ca-certificates in squeeze

javascript - function as argument on evaluate method on google puppeteer -

i want run function inside evaluate(), i'm passing argument, i'm getting 'func not function' , missing? puppeteer version: 10.2 platform / os version: windows 10, node 8.2.1 var func = function() { console.log("xxxxx"); }; var response = await page.evaluate( (func) => { func(); //func not function }, func); if understand correctly, puppeteer has marshal code in evaluate function string , inject page context. can't pass function references or non-serializable across boundary.