Posts

Showing posts from April, 2012

php - Laravel sql command to Laravel QueryBuilder -

i'm trying convert sql query querybuilder can't it. select a.id, a.category_name, cat.count `categories` left outer join ( select `categories`.`category_parent` , count(*) count `categories` group category_parent ) cat on a.id = cat.category_parent a.category_parent = 1 for example: db::table('users') ->join('contacts',db::raw("a.id = cat.category_parent"),function($query){ $query->select(db::raw("`categories`.`category_parent` , count( * ) count")) ->from('contacts') ->groupby('category_parent') ->where(db::raw("a.category_parent = 1")) ->get(); how fix method in laravel. thanks try getting pdo instance execute query directly: $pdo=db::connection('mysql')->getpdo(); $stmt=$pdo->prepare(" select a.id, a.category_name, cat.count `categories` left outer join ( select `categories...

Spring Security and multiple LDAP -

i have scenario have connect multiple ldaps, each 1 different country. if user tries login, have verify whether user setup in of ldap, can authenicated , granted access roles defined ldap. possible spring security framework? yes can authenticate against multiple ldap servers. if want try each ldap instance, can this: <ldap-server id="exampleldap" url="ldap://example.org:389/dc=springframework,dc=org" /> <ldap-server id="springldap" url="ldap://springframework.org:389/dc=springframework,dc=org" /> <authentication-manager> <ldap-authentication-provider user-search-filter="(uid={0})" user-search-base="ou=people" server-ref="exampleldap"/> <ldap-authentication-provider user-search-filter="(uid={0})" user-search-base="ou=people" server-ref="springldap"/> </authentication-manager>

Android: copy sms messages / gallery photos / call history to online resource -

i'm developing android security project. project sneaky calculator. when user uses programmed calculator , presses buttons, there should start background processes copy's sms messages, gallery photo's , call history phone source can grab these. but don't know how need start this. kind of backend need? to read sms can use android provided sms manager class. sms manager class read sms's 1 one. after each sms read can dump data either server or local db. to know gallery photos can access storage device gallery location.you can read via fileinputstream , write file server via multipart object type fileoutputstream object. if want store local db can use blob object. to know call history can use android provided calllog.calls method. all above 3 can implement 1 one in background service.

c++ - QModelIndex becomes invalid when removing rows -

i'm subclassing qabstractitemmodel display items in qtreeview , , within subclass ( projectmodel ), have function delete currently-selected index in tree view. component class used represent members of model: void projectmodel::deletecomponent() { qmodelindex child_index = _treeview->selectionmodel()->currentindex(); component* child = static_cast<component*>(child_index.internalpointer()); component* parent = child->parent(); qmodelindex parent_index = createindex(parent->row(), 0, parent); int row = child->row(); beginremoverows(parent_index, row, row); parent->delete_child(child); endremoverows(); } the parent , child indicies , raw pointers before call beginremoverows ; debugger shows point correct item , parent. however, program crashes after calling beginremoverows . specifically, crashes in projectmodel::parent() : qmodelindex projectmodel::parent(const qmodelindex &index) const { if (!ind...

Android/Java Instantiating a class multiple times -

i'm using sugarorm sqlite in android app. using code below add new rows table: mytable d = new mytable("row1_title",valuerow1,stockrow1); d.save(); mytable d2 = new mytable("row2_title",valuerow2,stockrow2); d2.save(); mytable d3 = new mytable("row3_title",valuerow3,stockrow3); d3.save(); mytable d4 = new mytable("row4_title",valuerow4,stockrow4); d4.save(); mytable d5 = new mytable("row5_title",valuerow5,stockrow5); d5.save(); mytable d6 = new mytable("row6_title",valuerow6,stockrow6); d6.save(); mytable d7 = new mytable("row7_title",valuerow7,stockrow7); d7.save(); mytable constructor public mytable(string title, int value, int stock){ this.title = title; this.value = value; this.stock = stock; } this works fine, right way instantiate class multiple times? seems should able combine instantiating in way? thanks not really. if want initialize different variables...

.net - VB.NET - Implement Interface in LinqToSql -

how go implementing interface linqtosql class in vb.net? i've created partial , added explicit implementation, visual studio complaining these properties exist in code created linqtosql model. error message properties have multiple definitions identical signatures. option strict , option explicit on. code in partial follows: partial public class youthresidence implements iaddress public property street1 string implements iaddress.street1 public property street2 string implements iaddress.street2 public property city string implements iaddress.city public property state string implements iaddress.state public property zipcode string implements iaddress.zipcode end class edit: know can wrap model properties different name in partial, i'd prefer avoid if possible. this problem how vb.net implements interfaces. doesn't support implicit interfaces c# does. have tie specific member interface declaration. annoying partial classes. c...

vba - Access FindFirst/FindNext returns Operation is not supported in this type of object -

i have code: sub printpdfpagestest(formname string, filename string) ''print each record separate pdf file, named according invoice number dim rs recordset dim wherecondition string dim savename string dim strtemp2 long strtemp2 = 2281821648 set rs = currentdb.openrecordset(filename) ''can pass sql in string ''add msgbox: create number input invoicenumber ''get value invoicenumber = inputbox ("enter starting invoice num"...) ''get value end invoicenumber = inputbox("enter ending invoice num"...) ''get start value starting location (findrecord) -----need plan step out. ''add if statement in while loop. if condition not end invoice number, keep going rs.findnext "[invoicenumber]=" & strtemp2 docmd.close acform, formname rs.close set rs = nothing end sub what want find position of strtemp2 invoice number in table , use move...

c++ - Qt5 undefined reference to `QDeclarativeDebuggingEnabler::QDeclarativeDebuggingEnabler()' -

suddenly had problem... classitem.o: in function `__static_initialization_and_destruction_0': /../../qt/5.4/gcc_64/include/qtdeclarative/qdeclarativedebug.h:50: undefined reference `qdeclarativedebuggingenabler::qdeclarativedebuggingenabler()' collect2: error: ld returned 1 exit status make: *** [medjournal] error 1 09:29:05: process "/usr/bin/make" exited code 2. went far stripping qobject class object, still got same error. it turns out reason line causing trouble: #include <qtdeclarative/qdeclarativeview>

javascript - Arbitrary Google Swiffy Canvas Size / Off Screen Rendering -

i'm using swiffy render onto hidden canvas can take result , use elsewhere. problem i'm running when resize container div swiffy won't make actual canvas bigger available viewport size. if set dimensions of swiffy div larger viewport canvas big viewport - doesn't want put part of canvas offscreen. i'm sure efficiency, there's no reason render if it's offscreen normally, need have swiffy render time, @ whatever size want. additionally, swiffy plain refuses if swiffy container div isn't attached dom. (forces canvas have width , height of 0). is there way around without having dig (obfuscated) swiffy client runtime , modify it? how can trick swiffy rendering larger viewport size? edit: able trick swiffy rendering larger viewport changing window.innerwidth whatever want. that's ugly hack though , hate overwrite causes lot of issues. if swiffy runtime version 7.3, can hack js directly. just remove or comment "b.xj(c);" in...

xaml - WPF - Binding a ComboBoxItem visibility using BooleanToVisibilityConverter -

i have datagrid, column has combobox in header. want control visibility of items in combobox based on value of flag. this how xaml looks: <datagrid x:name="table1" height="{binding elementname=elasticone1,path=actualheight}" width="{binding elementname=elasticone1,path=actualwidth}" padding="5,5,5,5" isreadonly="true" horizontalalignment="stretch" verticalalignment="stretch" selectionmode="single" > <datagrid.columns> <datagridtextcolumn x:name="column2" header="source" width="80"> <datagridtextcolumn.headertemplate> <datatemplate> <stackpanel margin="0"> <stackpanel.resources> <booleantovisibilityconverter x:key="booltovis"/> </stackpanel.resources> <textblock text="{...

parsing - ELKI CSV parser problems -

i have changed .arff file .csv file in tool in weka. can't use arffparser parser in elki. what parser should use? default numbervectorlabelparser. gives me arrayindexoutofboundsexception: running: -verbose -verbose -dbc.in /home/db/lisbet/datasets/without ids/try 2/calling them .txt using parser/lymphography_withoutdupl_norm_1ofn.csv -dbc.parser numbervectorlabelparser -algorithm outlier.lof.lof -lof.k 2 -evaluator outlier.outlierroccurve -rocauc.positive yes task failed java.lang.arrayindexoutofboundsexception: 47 @ de.lmu.ifi.dbs.elki.datasource.parser.numbervectorlabelparser.gettypeinformation(numbervectorlabelparser.java:337) @ de.lmu.ifi.dbs.elki.datasource.parser.numbervectorlabelparser.buildmeta(numbervectorlabelparser.java:242) @ de.lmu.ifi.dbs.elki.datasource.parser.numbervectorlabelparser.nextevent(numbervectorlabelparser.java:211) @ de.lmu.ifi.dbs.elki.datasource.bundle.multipleobjectsbundle.fromstream(multipleobjectsbundle.java:242) @ de.lmu...

keytool for Android debug key giving garbage value -

i using macbook typed below code on terminal keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore and end 0???|???*?h?? 071 0 uus10u 450329083337z071 0 uus10u ?0?roid ?h??0?"0 ??&{??@u???_??r??m?c? ?ߔ?"??v?l??????x=y???p9,????gq?v-b|?x??w5wr?r?? ? ?c+w??nws!p??????ʈl??so?̡e??]???wo???ohmⳳӾ?៎m???et???a?k?8 ]?#??,?l??'n8??wz? x폻(??҄-y??j? ?h??]???md,???>?3?Ð?=ߌh??ib???????p6\??????!00u????w? ?p8 +??p?b??0 ?rgnh?o(5*?<????x????b??7;1?ƻ?h?l1?>?o~&?o??e??Ӎ?5c?62?? ~?????ܙkv=?e???u?d? .?̶?}?u??ѭ?q0????g??jʀ?֯r????? =g?p??n??s?s?3?\o????ko?_u???9??iv?????5a҈?)9?-??no?~@pq?x ??? ???-?b(???\?p?xd?Ԩ?#8z8b>sg?z?f??????%? what issue? i have missed last 2 word -list -v keytool -exportcert -alias androiddebugkey -keystore ~/.android/debug.keystore -list -v its working

Remove NetSuite Sublist Button -

i have netsuite suitelet script listing of customer's credit cards can edit cards themselves. i remove "remove" button sublist, if possible. i've looked on netsuite support site, no luck. has encountered before? below code have: var creditcardsublist=form.addsublist('custpage_credit_card_sublist','inlineeditor','current credit cards'); /* not work */ form.removebutton('custpage_credit_card_sublist_remove'); /* not work either*/ creditcardsublist.removebutton('custpage_credit_card_sublist_remove'); thanks assistance this. actually client side have do. you create client script go along suitelet. use form.setscript... associate it. in client script create initline function. function can use jquery (automatically included netsuite) find , remove remove button. this hack netsuite doesn't have api manipulating lists

java - new PrintWriter(new BufferedWriter(new FileWriter("output.txt", true))) is not printing -

i want write output.txt without clearing - appending end. however, when use following 2 methods: public void addemails(arraylist<string> emails){ (int = 0; < emails.size(); i++){ system.out.println(emails.get(i)); writer.println(emails.get(i)); if (i == emails.size() - 1){ system.out.println(); system.out.println(); writer.println(); writer.println(); } } } public void addfilename(string fn){ string filename = fn.replace("%date%.%format%", ""); writer.println(filename); writer.println(); system.out.println(filename); system.out.println(); } these called following methods: public void analyze(string path){ try { system.out.println(path); file inputfile = new file(path); inputstream inputstream= new fileinputstream(inputfile); reader reader = new inputstreamreader(inputstream,"utf-8...

ruby on rails - ActionController::UrlGenerationError - with route defined and action in controller, still getting error for no route -

i'm getting following error in rspec when running schools_controller_spec.rb test: actioncontroller::urlgenerationerror: no route matches {:action=>"show", :controller=>"schools"} what's puzzling me have routes configured, , action defined in appropriate controller. i'm not getting error other tests in spec, such 'get #index' , etc. running rails 4.2 rspec/capybara. here's routes.rb: rails.application.routes.draw root to: 'pages#home', id: 'home' resources :users resources :schools resource :session, only: [:new, :create, :destroy] match '/home', to: 'pages#home', via: 'get', as: 'home_page' end rake routes returns: schools /schools(.:format) schools#index post /schools(.:format) schools#create new_school /schools/new(.:format) schools#new edit_school /schools/:id/edit(.:format) schools#edit school /s...

docker - Vagrant up --no-parallel flag meaning -

do know vagrant --no-parallel flag does? found in docs should use whenever linkink 2 different containers within same vagrantfile. vagrant.configure(vagrantfile_api_version) |config| config.vm.define "a" |app| app.vm.provider "docker" |d| d.name = "a" d.image = "a" end end config.vm.define "b" |app| app.vm.provider "docker" |d| d.name = "b" d.image = "b" d.link("a:a") end end end what should run if have vagrantfile looking this? vagrant --no-parallel && vagrant b or vagrant && vagrant b --no-parallel or vagrant --no-parallel ? --no-parallel option makes sense when vagrant up used bring multiple machines altogether: when vagrantfile declares multiple machines , vagrant up either given no machine names or multiple machine names. in case, if prov...

cmake - How to include Assimp with CMakeLists? -

i'm unable include external library assimp project using cmakelists. i got working doing: add_subdirectory(${cmake_source_dir}/external/assimp-3.1.1-win-binaries) include_directories(${cmake_source_dir}/external/assimp-3.1.1-win-binaries/include) target_link_libraries(myproject assimp) but don't want use add_subdirectoy since adds ide. (visual studios 2013) why unable include assimp include directory , link project this? include_directories(${cmake_source_dir}/external/assimp-3.1.1-win-binaries/include) link_directories(${cmake_source_dir}/external/assimp-3.1.1-win-binaries/lib32/) target_link_libraries(myproject assimp)

PayPal in-context view redirecting not closing window -

i using paypal in-context approach , upon launching paypal in in-context manner, able to: log in pay items but after that, paypal redirects me url provide within in-context view? there setting missing make close mini window opens after user pays? documentation doesn't specify/mention on how this. expecting close in-context window when user clicks "pay now" , return control page hosting it. apologies if detail in question seems light, if further info required please comment , shall try best update. should mention using sandbox environment. when using paypal in-context checkout should have functional express checkout flow begin with. there variables cause in-context checkout display standard express checkout. cause issue speaking about. have functional in-context checkout here: http://marshalcurrier.com/paypal/expresscheckout/setdoincontext.php i tried implement in-context checkout woocommerce plugin on wordpress. didnt work out well, can see check...

javascript - How to get TinyMCE fullscreen mode to work with Bootstrap NavBar -

Image
just started using tinymce in mvc razor project , impressed html editing. when went use fullscreen (using following options) $('#applicationhtmltemplate').tinymce({ theme: "modern", plugins: "code,pagebreak,fullpage,table,fullscreen,paste,spellchecker", toolbar1: "undo | redo | copy | paste | searchreplace | spellchecker | table | pagebreak | fullpage | fullscreen" }) i noticed appears underneath bootstrap header bar: what "correct" way make tinymce edit appear either underneath, or on top of, bootstrap nav bar? preferably between header , footer, fullscreen do. i tried setting top and/or margins of mce-fullscreen class, using style below, a) seems hacky , b) not work height full screen scrollbars disappear off bottom. div.mce-fullscreen { top: 55px; } for "fullscreen" tinymce, over top of bootstrap nav bar , need set z-index of .mce-fullscreen class greater nav bar's z-index . ...

node.js - How to create a Sequelize cli db migration after changes to the model -

i starting sequelize , following video tutorial online. after running node_modules/.bin/sequelize model:create --name user --attributes username:string node_modules/.bin/sequelize model:create --name task --attributes title:string which created migration files create user , create task. had add associations each model follow: // user.js classmethods: { associate: function(models) { user.hasmany(models.task); } } // task.js classmethods: { associate: function(models) { task.belongsto(models.user); } } however, migration files creating tables user , task created. have manually update them add relationships? "migration:create" command creates migration skeleton file. manually fill out skeleton files or there way automatically create complete migration file besides model creation? p.s have seen following stackoverflow question: how auto generate migrations sequelize cli sequelize models? you can create separate migration empty migrati...

javascript - Convert a div to image without canvas -

i need generate image corner ribbon, musn't image since text inside changes. once it's generated, need div (the image + ribbon) saved image, i'm not able html2canvas because don't have images, have link (and saving them take time). there method? an answer similar question generated interesting fiddle . think adapt use. it's essentually javascript: $(function() { $("#btnsave").click(function() { html2canvas($("#widget"), { onrendered: function(canvas) { thecanvas = canvas; canvas.toblob(function(blob) { saveas(blob, "dashboard.png"); }); } }); }); });

javascript - data flow in react application -

i learning react , have run problem of elegently extracting states components. basically have few components contains forms , other inputs need data in business logic, data need coupled state of component. understand data should have unidirectional flow can't think of how can make data flow towards business logic. make interface functions call respective, feel violate unidirectional flow. anyhelp examples appreciated! you typically pass down callbacks parent components child components props. when state changes in of child components, invokes callback , passes whatever data appropriate in each use case. "controller-view" (the root component implements actual callback) whatever business logic need based on current state , updates state accordingly (causing re-render of component tree component down). read docs component communication . something this: var child = react.createclass({ ontextchange: function() { var val = 13; // somehow calcu...

c# - Adding data to a dB using EF 6.x -

so have 2 entities corresponding 2 tables in db. name of 2 tables are: doc , users each entity has properties. relation between doc , users 0 or 1 many. doing following: doc document = new doc(); ... ... document .users.add(new user{name = "temp", info = "some info.."}); context.addtodocuments(document); context.savechanges(); however, entries in doc table added in db. user table in db empty. suggestions? you should add each entity: doc document = new doc(); ... ... user usr = new user() {name = "temp", info = "some info.."}; context.users.add(usr); document .users.add(usr ); context.addtodocuments(document); context.savechanges();

jquery - Styling navbar of bootstrap -

Image
i've got problem styling bootstrap navbar. in navbar have : but want in 1 line, : essai actuel : kjvfged my code navbar : <nav class="nav navbar-default"> <div class="container-fluid"> <div class="navbar-header "> <a href="#" class="navbar-brand ">amg</a> </div> <div> <ul class="nav navbar-nav navbar-right "> <li><p class="navbar-text"><div class="essaiactuel"></div></p></li> <li><a><div class="session"></div></a></li> </ul> </div> </div> </nav> and give content way : $('.essaiactuel').text('essai actuel : '); can tell me how can increase width of ele...

ios - MFMailComposeViewController reacting to sent emails based on recipient -

i have button allow user send email support address. there option use email share content other users. in latter case, fact user has shared via email tracked statistical analysis. - (void)mailcomposecontroller:(mfmailcomposeviewcontroller *)controller didfinishwithresult:(mfmailcomposeresult)result error:(nserror *)error { if (result == mfmailcomposeresultsent){ [[trackinghelper sharedtracker] trackevent:@"product" action:@"sharedviaemail" label:self.product.name]; } [self dismissviewcontrolleranimated:yes completion:null]; } since called both when user shares via email , when user sends support email, wondering if there way differentiate between 2 in delegate? mfmailcomposeresult not useful returns wether succeeded or not. hoping make determination retrieving recipients of sent mail , matching support address, far know there no way this. does know if there way accomplish this? the way define variable track option activated. when ...

directx - Can't flip bitmap when calling ID2D1DeviceContext::DrawBitmap -

i have following code draw bitmap on direct2d context: id2d1devicecontext * pcontext; // initialization omitted id2d1bitmap1 * pbitmap; // initialization omitted pcontext->drawbitmap(pbitmap, null, 1.f, d2d1_interpolation_mode_linear, null, null); this works fine, need image flipped vertically , tried this: d2d_matrix_4x4_f flip = d2d1::matrix4x4f::rotationy(180); pcontext->drawbitmap(pbitmap, null, 1.f, d2d1_interpolation_mode_linear, null, &flip); but bitmap not being drawn @ all. when provide identity matrix instead, works. when try replace y value in matrix 1 -1 fails again (i believe it's same making rotation matrix in original code snippet). also tried provide d2d_rect_f struct destinationrectangle , , tried switch between top , bottom values in rect - same problem remains. any insides welcome. i'm not sure "perspectivetransform" parameter of drawbitmap means, traditional way of using transforms in direct2d work...

Is there a similar class in c++ like the Desktop class in java? (Windows specific) -

given following code: import java.awt.desktop; import java.io.ioexception; public class myclass{ public static void main(string args[]){ try{ desktop.getdesktop.open("file.txt"); catch(ioexception e){ system.out.println(e.getmessage()); } } } i know if there similar class in c++ performs same function statement desktop.getdesktop.open("file.txt"); ? if please describe how use method calls open file. try this: shellexecute(0, 0, "file.txt", 0, 0 , sw_show );

c# - Creating new datarow on a SQL Server with automized date from DBMS doesn't work -

hi i'm trying create new datarow on sql server. works pretty if transmit mat_dbdate column manually c# code. heres example: c# code: private void buttonmaterialanlegen_click(object sender, routedeventargs e) { try { datarow dr = dsmaterial.tbl_material.newrow(); dr["mat_fk_lfr_id"] = comboboxlieferant.selectedvalue; dr["mat_fk_lag_id"] = comboboxlagerort.selectedvalue; dr["mat_name"] = textboxbeschreibung.text; dr["mat_dbdate"] = datetime.now; dsmaterial.tbl_material.rows.add(dr); tamaterial.update(dsmaterial); } catch (exception ex) { messagebox.show(ex.message); } } but if want sql server add date automatically via getdate() command default doesn't work. got nonullallowedexception. the mat_dbdate colum has following specifications: [mat_dbdate] datetime2 (7) constr...

ios - Pass value to closure? -

i want logic after last item processed, terminal show i has same value c . idea how pass loop variable in? let c = a.count var i=0; i<c; i++ { dispatch_async(dispatch_get_global_queue(dispatch_queue_priority_background, 0), { // .. dispatch_async(dispatch_get_main_queue(), { println("i \(i) c \(c)") if == c-1 { // stuff come here } }) }) } you can capture value of i explicitly capture list [i] in closure, don't need copy separate variable. example: let c = 5 var i=0; i<c; i++ { dispatch_async(dispatch_get_global_queue(dispatch_queue_priority_background, 0), { [i] in // <===== capture list dispatch_async(dispatch_get_main_queue(), { println("i \(i) c \(c)") }) }) } output: 0 c 5 1 c 5 2 c 5 3 c 5 4 c 5

python - TypeError: argument of type 'PSLiteral' is not iterable -

i trying remove hidden enters using pdfform-scraper-script before write csv file. keep receiving error mentioned in title. relevant piece of code is: import glob import os import sys import csv pdfminer.pdfparser import pdfparser pdfminer.pdfdocument import pdfdocument pdfminer.pdftypes import resolve1 path = 'c:\users\wonen\downloads\test' filename in glob.glob(os.path.join(path, '*.pdf')): fp = open(filename, 'rb') #read pdf's parser = pdfparser(fp) doc = pdfdocument(parser) #doc.initialize() # <<if password required fields = resolve1(doc.catalog['acroform'])['fields'] row = [] in fields: field = resolve1(i) name, value = field.get('t'), field.get('v') #removing 'hidden enter' if value == none: print 'ok' elif value == notimplementederror: print 'ok' elif '\n' in value: ...

linux - Replacing string having forward slash in sed -

i wish replace x.y.z.zz=/a/b/c/d/ with x.y.z.zz=/a/b/e/d/ i know x.y.z.zz in advance.i know line number in advance. have tried sed "11s/.*/x.y.z.zz=\/a\/b\/e\/d\/" filename but giving error. there better way directly search , replace string ? sed replaces using sed 's/pattern/replacement/' syntax. in case, missing last / . saying work: sed '11s/.*/x.y.z.zz=\/a\/b\/e\/d\//' file ^ however, may cleaner use delimiter, syntax more clear. # ? (it can ~ , _ , etc.): sed '11s#.*#x.y.z.zz=/a/b/e/d/#' file test $ cat a x.y.z.zz=/a/b/c/d/ b c let's replace line 2: $ sed '2s#.*#x.y.z.zz=/a/b/e/d/#' a x.y.z.zz=/a/b/e/d/ b c

Storing arbitrary bytes in RocksDB -

rocksdb states can store arbitrary data api supports std::string types. want store std::vector<t> values , appears if want must convert std::string . is there less brittle way storing arbitrary types? as key-value store, rocksdb can store "arbitrary byte array". use case, need have way serialize std::vector<t> byte array can put std::string . note input std::string not need zero-terminated.

javascript - ExtJS Support for Browser Detection -

i want detect browser type can log browser type in case of error in extjs application. know there several javascript libraries can detect browser type, if deploy these code have update libraries regularly. my question is: extjs job keeping browser detection functionality up-to-date? using extjs 4.2. does extjs job keeping browser detection functionality up-to-date? using extjs 4.2. it does. version 4.2 not quite up-to-date though. use latest ext js if crucial have browser detection functionality up-to-date. in 4.2, ext singleton has range of properties telling browser. starting version 5 there dedicated ext.browser singleton.

Google apps scripts : get the URL of the spreadsheet and send it by mail -

i created button in spreadsheet: want send url of spreadsheet when click on it, unsuccessfully right now. here code: function mail() { var destid = '1kvhutwvr80ascne9ijtlws9yldf5ykixifvvbpjox5e'; var recipient = session.getactiveuser().getemail(); var sprurl = spreadsheetapp.getactivespreadsheet(); logger.log(sprurl.geturl()); gmailapp.sendemail(recipient, 'subject of mail', 'the spreadsheet sits @ following url: ' + logger.log(sprurl.geturl())) } where going wrong? thanks lot guys. the error pasing logger.log(url) when build subject string. pass sprurl.geturl()

Android : Hiding action bar in fragment -

i have 2 fragments mainfragment , childfragment . want show actionbar in mainfragment wants hide in childfragment . working fine except when comes mainfragment childfragment , again goes childfragment action bar shows seconds before hidden .. i don't know why ? help in childfragment doing this @override public void onresume() { super.onresume(); ((actionbaractivity) getactivity()).getsupportactionbar().hide(); mainactivity.mdrawerlayout.setdrawerlockmode(drawerlayout.lock_mode_locked_closed); getview().setfocusableintouchmode(true); getview().requestfocus(); getview().setonkeylistener(new view.onkeylistener() { @override public boolean onkey(view v, int keycode, keyevent event) { if (event.getaction() == keyevent.action_up && keycode == keyevent.keycode_back) { // handle button's click listener mainactivity.onbackpressed(); ((actionbaractivity) getactivi...

fail in crop and capture the image in android -

i tried code of ttl . when run it, captures image doesn't open crop apps of phone crop image. please me. thanks. you can use library, should work fine https://github.com/jdamcd/android-crop

Why the report errors out when evaluating a formula that equals zero? -

i have formula field: global numbervar totdiff; whileprintingrecords; if {@quantexceding} <> 0 totdiff := totdiff + abs({@quantexceding}) else totdiff := totdiff initially, if clause not there, thought abs erroring out when passed 0. see whatever quantexceding , when equals 0, reports errors out , highlights first line of if or whatever line invokes quantexceding any ideas ? change formula , make sure {@quantexceding} evaluating first: whileprintingrecords; evaluateafter({@quantexceding}); global numbervar totdiff; if {@quantexceding} <> 0 totdiff := totdiff + abs({@quantexceding}) else totdiff := totdiff

vba - DAO Recordset Changing by itself on Edit or Update -

i'm experimenting issue when trying .edit or .update dao.recordset on vba/access project. i'm using codevba extension create classes tables automatically. issue occurs on class created way. the recordset variable declared way: dim recordset dao.recordset set recordset = currentdb.openrecordset("ordres de travail", dbopendynaset) i have 2 lines in code: recordset.edit recordset.fields("commentaire indisponibilité").value = nullifemptystring(me.commentaireindisponibilité) during execution, monitoring selected record looking @ value of primary key in local variables panel. before execution of first line, primary key value 1409, during, , after, moves record 91! no steps missed (i'm using step step execution). i'm quite disappointed this, , can't have right record edited. if of have idea of going on, i'll glad know! if running code inside of form, there object named recordset form property. compiler getting...

android - What to do when user clicks back on google play games realtime multiplayer auto-match ui? -

i created "play button" starts automatch ui , begins search players.once when ui shows up, when press in automatch ui button ,it returns "play button"....but when press again nothing. works when press quit in automatch ui , press play again what should doing in code (i'm using google play games unity plugin) when presses button in ui ? i'm working google play games services unity plugin i not sure of code looks like, minimal example of creating real-time game. think problem whenever "go back" play button, need call leaveroom() reset multi-player room state. this based on smoketest sample in gpgs unity plug in project ( https://github.com/playgameservices/play-games-plugin-for-unity ). all code (including sample covered under apache 2 license . using unityengine; using googleplaygames.basicapi.multiplayer; using googleplaygames; using googleplaygames.basicapi; class samplertmp : monobehaviour, realtimemultiplayerlistener...

javascript - React.js: onClick function from child to parent -

i used this article example (react way), not working me. please point me mistake, can't understand what's wrong. this error see: uncaught typeerror: this.props.onclick not function here code: // parent var senddocmodal = react.createclass({ getinitialstate: function() { return {taglist: []}; }, render: function() { return ( <div> { this.state.taglist.map(function(item) { return ( <tagitem nameprop={item.name} idprop={item.id} onclick={this.handleremove}/> ) }) } </div> ) }, handleremove: function(c) { console.log('on remove = ', c); } }); // child var tagitem = react.createclass({ render: function() { return ( <span classname="react-tagsinput-tag"> <span>{this.props.nameprop}</span> <a classname='react-tagsinput-remove' onclick={this.handleremove}></a...

Spliterator Java 8 -

i have number 1 10,000 stored in array of long . when adding them sequentially give result of 50,005,000. have writing spliterator if size of array longer 1000, splitted array. here code. when run it, result addition far greater 50,005,000. can tell me wrong code? thank much. import java.util.arrays; import java.util.optional; import java.util.spliterator; import java.util.function.consumer; import java.util.stream.longstream; import java.util.stream.stream; import java.util.stream.streamsupport; public class sumspliterator implements spliterator<long> { private final long[] numbers; private int currentposition = 0; public sumspliterator(long[] numbers) { super(); this.numbers = numbers; } @override public boolean tryadvance(consumer<? super long> action) { action.accept(numbers[currentposition++]); return currentposition < numbers.length; } @override public long estimatesize() { ...

jquery - Button submitting form to "Get" ActionResult instead of "Post" -

i took on mvc web application employee no longer company work for. application in development stage , noticed unresolved error 'submit' button triggers view's corresponding httpget actionresult, instead of httppost actionresult. he included lot of jquery scripts in view, , suspected 1 of them causing issue, none seem apply directly button. controller (named homecontroller.cs): [httpget] public actionresult create(string distributorobject) { stockliftobjectview stockliftobjectview = new stockliftobjectview(); var userinfo = user.identity.name.getactivedirectoryinfo(); stockliftobjectview.txtfirstname = userinfo.firstname; stockliftobjectview.txtlastname = userinfo.lastname; stockliftobjectview.txtemail = userinfo.email; if (stockliftobjectview.regionid == guid.empty) { stockliftobjectview.regionslist = new selectlist(_stockliftservice.getregions(), "id", "regionname"); ...