Posts

Showing posts from January, 2012

python - How can I inherit from an openerp class/view -

how can create view inherit class? --the base class: from openerp.osv import fields, osv class pos_personne(osv.osv): _name = 'pos.personne1' _columns = { 'pos_personne_id' : fields.integer('id',size=64), 'personne_nom': fields.char('nom de la personne', size=128, required=true), 'personne_prenom': fields.char('prenom de la personne', size=128, required=true), 'personne_date': fields.date('date naissance'), 'personne_lieu': fields.char('lieu naissance', size=128, required=true), 'personne_travail':fields.char('travail de la personne', size=128, required=true), } _defaults = { 'personne_nom' : '', 'personne_prenom': '', } pos_personne() ---this base view <?xml version="1.0" encoding="utf-8"?> <openerp> <data> <record id="pos_personne_form" model="ir.ui.view"> <field name=...

Using "or" in expressions in filter, angularJS -

from docs: object: pattern object can used filter specific properties on objects contained array. example {name:"m", phone:"1"} predicate return array of items have property name containing "m" , property phone containing "1". is possible return array containg property name: "m" or phone: 1? or have write custom filter this? ng-options="m.mc_title m in maincategories | filter:{mc_schema:activeschema.sch_id, all:true}" the above code filters both properties has true (&&). want filter if of them true (||). i believe that, that, should define own filter handles 'or' expressions parameters. here's example did you: http://plnkr.co/edit/qwjm2fy6jmdwyg2yr2it?p=preview // receive json properties serve or clause. // example, 1 give object name john or id 123. $scope.model.filtereddata = $filter('orarray')($scope.model.data, {name: 'john', id: '123'}); the name of f...

php - Getting Resource from fsockopen behing proxy -

i have existing code : $socket = fsockopen(host, port); where $socket returned here resource. however, need behind proxy server authentication. sure done via public static function returndata($url, $port) { $fp = fsockopen(static::$ip, static::$port); // connect proxy $login = static::$login; $passwd = static::$passwd; fputs($fp, "get <a href=\"https://$url/\" " . "title=\"https://$url/\">https://$url/</a> http/1.1\r\n" . "host:$url:$port\r\n" . "proxy-authorization: basic " . base64_encode("$login:$passwd") . "\r\n\r\n"); $data = ""; while (!feof($fp)) $data .= fgets($fp, 64000); fclose($fp); return $data; } but function here returns string , not resource. how can resource returned or how resource retrieved using curl

html - Multiple Background Images - Need just the one to cover -

i have 2 background images. first picture of trees want @ , other black box want hover on top of tree picture. the problem i'm having when use 'background size: cover' style messes them both up. need tree picture cover , box sit on top. here's code: .main-image { width: 100%; height: 370px; background: url('../img/main-img-black.png'), url('../img/main-img.jpg') ; background-repeat: no-repeat, no-repeat; background-position: 10,0; background-size: 1, cover; } i hope sort of makes sense! per mdn background-size: 1, cover; not valid css, rule 'falls over'. try changing to: background-size: 10px, cover; . if arent setting value cover , contain , auto or zero- number must followed unit type.

SVN disallowing editing via externals -

in svn, there way disable commits of changes made file exists locally external? i want force users checkout actual file, make changes, , commit there. can test each of known subscribed projects of file make sure didn't break something. not really. have precommit hook may work. unfortunately, when edit external directory, svnlook doesn't have way distinguish whether or not it's external. believe earlier versions of svn didn't let directly edit externals because remember seemed default behavior (i'm talking 1.2 , 1.3 here). however, use hook prevent users editing files under directories externals. assume have project http://svn.vegicorp.com/repo/trunk/common that's used in http://svn.vegicorp.com/repo/trunk/foomaster , http://svn.vegicorp.com/repo/trunk/barmaster . externals under directory common under these projects: [file cannot edit external directory. please checkout http://svn.vegicorp.com/repo/trunk/common edit file] file = /trun...

javascript - jQuery change number inside a name attribute -

i'm writing javascript clone table row containing form elements. it's working far there's 1 piece can't quite figure out. the element names have number increases every row. e.g: <table> <tbody> <tr> <td><input type="text" name="name[0][abc]" /></td> <td><button class="add-row-button">+</button></td> </tr> <tr> <td><input type="text" name="name[1][abc]" /></td> <td><button class="add-row-button">+</button></td> </tr> </tbody> </table> i need cloned row update number. there multiple fields in each row need updated number can't include new name in jquery code. think has happen need name, use regex replace, update attribute. here's current (simplified example) jquery: // cu...

knockout.js - Update checkbox in KO Array -

can explain why following code not working. i'm trying toggle value when user clicks check box, state of checkbox never changes. when console out values can see original value of val() -- toggle value, , can see new value -- yet checkbox doesn't update, appears locked. there multiple checkboxes on form. self.val = ko.observable(); self.updatecheckboxval = function () { return my.update.updatecheckboxval({ "id": self.logpropid(), "checkval": self.val() }); }; my html code: <input data-bind="checked:val,click:function(){ updatecheckboxval() }" type="checkbox" /> the code should need bind checked state value in javascript is: function myviewmodel() { self.val = ko.observable(); self.val.subscribe(function(newvalue) { // update database }); } ko.applybindings(new myviewmodel()); and html should like: <input type="checkbox" data-bind="checked: val" /...

exception handling - Program not compiling. What is the error -

i trying run below simple code in command prompt last few hours. still not able fix error. what problem here. i'm not able find. here code: public static void main(string[] args) { int i; try { datainputstream din = new datainputstream(system.in); = integer.parseint(din.readline()); } catch(numberformatexception || ioexception exception) { system.out.println(exception.getmessage()); } } need use single | operator. not || . catch(numberformatexception | ioexception exception)

Rename a math variable in LaTeX with vim regex -

i need change name of math variable across big latex document, of vim regular expressions, struggling learn. for example, want change variable labelled 't' 's', example \begin{equation} f(x) \leq \sqrt{t(t+1)} \end{equation} should turn into \begin{equation} f(x) \leq \sqrt{s(s+1)} \end{equation} for need search character 't' somewhere between \begin{equation} , matching \end{equation} possibly several line breaks away, character 't' should not part of keyword such \sqrt i have tried %s/\\begin{equation}\_.\{-}\(\\\a*\)\@!\zst\ze\_.\{-}\\end{equation}/s/g but doesn't work should. besides, pattern matches keywords \sqrt , don't understand why. however, am aware sandwiching match between 2 \_.\{-} doing, won't yield desired result, since won't match multiple occurrences of character 't'. i prefer pure vim regexp solution, if possible. note: since use different environments besides equation , su...

oauth 2.0 - RESTKit 0.20 - Logout and Clear Authorization Header -

what's best practice logout , clean authorization header, etc. restkit 0.20? will method suffice? rkobjectmanager *objectmanager = [self getobjectmanager]; [objectmanager.httpclient clearauthorizationheader]; if use 1 of setauthorizationheaderfield* methods on http client add authorisation calling clearauthorizationheader correct approach take. if explicitly set header or parameter need clear header or stored attribute.

javascript - JQuery Mobile listview not refreshing after ajax call -

i have ajax call makes list of things json array when data loaded there no visual styling on , refresh method not working. success: function (data, status, xhr) { value="+data.occ_filtersobj_cust[i].customername+">"+data.occ_filtersobj_cust[i].customername+"</option>"); //$("#filters").append("<optgroup id="+data.occ_filtersobj_cust[i].customertype+" label="+data.occ_filtersobj_cust[i].customertype+">"); (var i=0, len=data.occ_filtersobj_cust.length; < len; i++) { if (i > 0 && data.occ_filtersobj_cust[i].customertype===data.occ_filtersobj_cust[i-1].customertype) { //write customer types $("#filters").append("<li>"+data.occ_filtersobj_cust[i].customername+"</li>"); } ...

c# - how to customize tab position in xamarin ios -

i have gone through link xamarin tabs link applying tabs in xamarin ios application. , tabs has been applied need tabs should appear on top of application's header part.but have not found method or property adjusts tabs position. please me , , appreciated. apples human interface guideline s specify tab bar should appear @ bottom edge of screen.

Getting my current location in android using GPS -

i trying current location using gps. given following code: locationmanager manager = (locationmanager)this. getsystemservice(context.location_service); location loc = manager.getlastknownlocation( locationmanager.gps_provider); loc=manager.getlastknownlocation(locationmanager.gps_provider); double la=loc.getlatitude(); double lon=loc.getlongitude(); when using avd emulator defined fix coordinates, or when tested android smartphone, not work. while in android studios trying debug emulator, stuck on loc.getlatitude . overall, @ end, got java runtimeexception shown below: java.lang.runtimeexception: unable start activity componentinfo{com.example.social.gps/com.example.social.gps.mainactivity}: java.lang.nullpointerexception @ android.app.activitythread.performlaunchactivity(activitythread.java:2195) . . . i guess because loc reference null. i have: <uses-permission android:name=...

software distribution - Linux stdlibc++ linker error on different computers -

i wrote application in c++ linux (x11, glx) , working alright on development computer (32-bit linux on 64-bit capable hardware). however, when ran on 64-bit linux downstairs, received error telling me linker failed link stdlibc++.so.6, thought 32-bit compiled application run on 64-bit kernels , oses well? @ least case in windows... have separately compile 32 , 64 bit different libs? and how distribute application? it's game, , have run makefile let move dependencies /usr/lib/ directory (a kind of amateur installer). work on mainstream linux distro's? , there better, neater ways release application?

Get output of a template call in a page from MediaWiki API -

i trying parse page on wikia additional information infobox book template on page. problem can template's source instead of transformed template on page. i'm using following url base: http://starwars.wikia.com/api.php?format=xml&action=expandtemplates&text={{infobox%20book}}&generatexml=1 the documentation doesn't tell me how point specific page , parse transformed template page. possible or need parse myself? to expand template parameters given page, have provide parameters. there no way api know how template used in different pages (it used twice!). this works: action=expandtemplates&text={{infobox book|book name=lost tribe of sith: skyborn}} you will, of course have keep adding parameters want parse (there 14 in example). if have templates change automatically depending on page (that not case here), e.g. making use of magic words such {{pagename}} , can add &page=lost_tribe_of_the_sith:_skyborn api call, set context temp...

apache storm - Zookeeper: Connection request from old client will be dropped if server is in r-o mode -

storm version: 0.82 zookeeper version: 3.4.5 . we have small storm cluster (1 nimbus , 3 supervisors), using 1 zookeeper instance that's co-located storm nimbus. infrequently start getting following errors in zookeeper logs , our storm cluster comes standstill. 2014-04-05 13:27:32,885 [myid:] - info [nioservercxn.factory:0.0.0.0/0.0.0.0:2181:nioservercnxnfact ory@197] - accepted socket connection /10.0.1.183:56121 2014-04-05 13:27:32,886 [myid:] - warn [nioservercxn.factory:0.0.0.0/0.0.0.0:2181:zookeeperserver@7 93] - connection request old client /10.0.1.183:56121; dropped if server in r-o mode 2014-04-05 13:27:32,886 [myid:] - info [nioservercxn.factory:0.0.0.0/0.0.0.0:2181:zookeeperserver@8 32] - client attempting renew session 0x1452dd02834002e @ /10.0.1.183:56121 2014-04-05 13:27:32,886 [myid:] - info [nioservercxn.factory:0.0.0.0/0.0.0.0:2181:zookeeperserver@5 95] - established session 0x1452dd02834002e negotiated timeout 40000 client /10.0.1.183:561 21 on...

file - Cortex-M3 flash memory limitation -

i have program generates .axf file of size 800kb , microcontroller seems execute code perfection. wondering why it's possible store .axf file bigger 800kb cortex-m3 microcontroller has specified internal flash memory of 256kb. doesn't make sense me. .axf file has microcontroller internal flash memory, right? if so, why program work? axf, elf, coff, exe, intel hex (ihex), motorola s record (srec) , whole bunch of other "binary" file formats contain both binary , other stuff code gets loaded. work simple binary images of program. there still lot of work in microcontroller land raw binary image used. more , more flash programmers accepting these other file formats (intel hex , s record being ones have been supported long time). toolchain might have tools can convert between formats axf ihex or 1 of interest ihex raw binary. if elf file , using gnu tools then arm-none-eabi-objcopy file.axf -o binary file.bin now might backfire on you, if dont have va...

comments - wordpress like commentbox for blogger -

i have seen wordpress site have comment box mean have option of entering website users in blogger should have google account comment there code provides website, email , name wordpress comment box blogger? blogger doesn't offer modification comment system. if want, can use intense debate . supports blogger platforms have import , sync options. further details here: http://intensedebate.com/

php - Limit records in SonataAdminBundle by user -

i'm building saas application using symfony2, , i'm using sonataadminbundle create crud of common entities (like type of members, languages, etc; common entities users can created , modified administrators). i want use sonataadminbundle saas entities: entities belongs user, don't know how it... far know, can use event listener add owner information entity when saving, how can limit records user can see? what want when user logs in he's redirected dashboard. then, when clicks on "members" entities, sees list of his members , shouldn't see member other users. is behavior possible sonataadmin, or must create own crud functions? if it's possible, can explain (or show tutorial/document) how create behavior? you can overwrite createquery alter query used list entities: https://github.com/sonata-project/sonataadminbundle/blob/master/admin/admin.php#l1399-l1408 you can create extension if logic need done many admin instances.

ios - UISearchDisplayController configure "no results" view not to overlap tableFooterView -

Image
i have list of things provided system (e.g. brands) not user editable have change time time. context these things displayed in table view , searchable using default uisearchdisplaycontroller. however, list of things surely isn't complete want give users ability request addition of other things list. added table footer view both original table view , search results table view, provides button send mail. problem it works fine long search results table view still contains entries. table footer view displayed below search results , fine. however, if no results found search term, search display controller displays "no result" label centered on table view. looks great, this: but since tablefooterview still displayed (which want be!) "no results" label overlaps footer view , looks crappy: i think in case don't need "no result"s label, since footer view makes reasonable clear there no results , it. don't mind either, long doesn...

php - Mod_Rewrite .Htaccess -

i have problem not find during online search. i have made wildcard sub-domain , sub domain main domain points folder. i looking create link uri parameters like 1- .domain.com/location/locationname 2- .domain.com//location.php? locname= and 1- .domain.com/location/locationname/category/categoryname/item/itemname 2- .domain.com//orderitem.php?locname=locationname&ordercategory=categoryname&orderitem=itemname (2) happening in backend , user still sees (1) how work? have make table in mysql, not sure how go around. second explode url , link specific url orderloc or ordermenu or orderitem etc. any step closer. thanks this should work: rewriteengine on rewriterule ^location/(.*)/category/(.*)/item/(.*) //orderitem.php?locname=$1&ordercategory=$2&orderitem=$3\? [l] rewriterule ^location/(.*) //location.php?locname=\? [l] it show domain.com/location/locationname user, backend see `domain.com//location.php?locname= and domain.com/location/lo...

java - Show a JWindow for a while -

i want show message in jwindow while, tryed use while() , sleep() functions, doesn't work. function should call jwindow ( messagewindow ). there other way show window 2 seconds? private void showjwindow() { boolean flag = true; final messagewindow window = new messagewindow( playername, playerinaction ); window.setvisible( true ); try { synchronized( window ) { while( flag ) { window.wait( 3000 ); flag = false; window.setvisible( false ); } } } catch( interruptedexception ie ) { thread.currentthread().interrupt(); } } here short example using swing timer. import java.awt.event.actionevent; import java.awt.event.actionlistener; import javax.swing.jbutton; import javax.swing.jdialog; import javax.swing.jframe; import javax.swing.jlabel; import javax.swing.swingutilities; import javax.swing.timer; public class testgui { public testgui() { ...

How to resume file download in Python? -

i using python 2.7 requests module download binary file using following code, how make code "auto-resume" download partially downloaded file. r = requests.get(self.fileurl, stream=true, verify=false, allow_redirects=true) if r.status_code == 200: chunk_size = 8192 bytes_read = 0 open(filesave, 'wb') f: itrcount=1 chunk in r.iter_content(chunk_size): itrcount=itrcount+1 f.write(chunk) bytes_read += len(chunk) total_per = 100 * float(bytes_read)/float(long(audiosize)+long(videosize)) self.progress_updates.emit('%d\n%s' % (total_per, 'download progress : ' + self.size_human(itrcount*chunk_size) + '/' + total_size)) r.close() i prefer use requests module achieve if possible. if web server supports range request can add range header request: range: bytes=startpos-stoppos you receive part between startpos , stoppos. if dont know stoppos us...

Check if UDP port is opened in Perl -

i need check if remote udp port opened. part of code is: sub scanudp { $address = shift; $port = shift; $udpsocket = new io::socket::inet ( peeraddr => $address, peerport => $port, proto => 'udp', ) or return 0; $udpsocket -> send ('hello', 0); #........some code............. return 1; } ..some code.. should check if received icmp packets "host unreached" or "port unreached" check if port opened. how can it? generally can't. udp not have connected state, in no way required send reply packet sent. , that's when ignoring package loss. may positive reply if sent valid request in whatever protocol you're accessing , remote port open, absence of such reply can not used make conclusions.

php - How to upload photo in a folder and save path in the database using CodeIgniter -

im trying add image folder , path database i've tried figure out how go nothing working. please help. here's controller function index() { $this->form_validation->set_rules('username', 'username', 'required|trim|xss_clean'); $this->form_validation->set_rules('photo', 'photo', 'required|trim|xss_clean'); $this->form_validation->set_rules('password', 'password', 'required|trim|xss_clean'); $this->form_validation->set_error_delimiters('<br /><span class="error">', '</span>'); if ($this->form_validation->run() == false) // validation hasn't been passed { $this->load->view('registration'); } else // passed validation proceed post success logic { // build array model $form_data = array(...

mysql - How can I remove the duplicate contents? -

i'm learning coldfusion. display article , 3 pictures. code compiles, shows article 3 times , 3 pictures. want show article 1 time. can take @ code , give me hint? time! <html> <head> <title>hello</title> </head> <body> <h3>full article view</h3> <cfquery name="myquery1" datasource="mydb" > select * articles inner join article_image_mapping on articles.article_id = article_image_mapping.aim_articleid inner join images on aim_imageid = images.image_id articles.article_id = #url.id# </cfquery> <div align="left"> <cfoutput query="myquery1"> #ucase(myquery1.article_title)# <br/> -------------------------------------<br> #myquery1.article_author# :: #myquery1.article_date#<br/> #myquery1.article_content#<br/> #myq...

java - My Android app crashes when trying to store SQLite data -

i tried import sqlite sample code android application save , manage data through sqlite, using listview. in sqlite sample implements addressbook when fill in text fields of new contact , press "save" button save them sqlite, android app crashes, displaying unfortunately application has terminated.i believe problem focused on button save(button1) , line: android:onclick="run" don't understand exact problem.for convenience method "run" implemented in displaycontact.java archive. the code of button1 in activity_display_contact.xml layout is: <button android:id="@+id/button1" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignleft="@+id/edittextcity" android:layout_alignparentbottom="true" android:layout_marginbottom="28dp" android:onclick="run" android:text="@string/save" /...

mysql - Why 2 queries are executed instead of one? -

i have following piece of code: def detail(request, popular_id): try: popular = popular.objects.get(pk = popular_id) share = share.objects.get(isin = popular.isin) #line 1 chart_data_json = share.get_chart_data_json() except popular.doesnotexist: raise http404 return render(request, 'popular/detail.html', {'popular': popular, 'chart_data': chart_data_json}) in line 1 noticed using debug-toolbar there 2 queries executed: select `share_share`.`id`, `share_share`.`symbol`, `share_share`.`isin`, `share_share`.`name`, `share_share`.`market`, `share_share`.`updated` `share_share` `share_share`.`id` = 1 and select `share_share`.`id`, `share_share`.`symbol`, `share_share`.`isin`, `share_share`.`name`, `share_share`.`market`, `share_share`.`updated` `share_share` `share_share`.`isin` = 'us5949181045' i cannot understand why need first query , how avoid it? edit: model definition of share: class share(models.m...

How to save a C++ console output in a text file? -

i have 2 console outputs of 2 different scripts. want compare these outputs each other finding conserved letters in both outputs along position in output. trying is, want save both console outputs in 2 different text files , check 2 files conserved letters , relative positions. is i'm going in correct path or can option comparing outputs. if yes provide method saving console outputs in text files. , if no provide other accurate method comparing console outputs. you run scripts c++ program, e.g. popen(3) or custom exec+fork depending on whether need deal escape sequence issues, etc. std::ofstream for writing file and std::ifstream to read later.

asp.net - Create and share Google Drive folders dynamically -

Image
i have list of emails. for each email, need create google drive folder , share given email. how can programmically? i using asp.net 4.0. first of need make sure have application clientid/secret , correct redirect uri configured. case - it's desktop application: so far you'll clientid/secret key: now it's time write codes! step 1 - authorization: private async static task<usercredential> auth(clientsecrets clientsecrets) { return await googlewebauthorizationbroker.authorizeasync(clientsecrets, scopes, "user", cancellationtoken.none); } step 2 - construct client google drive: private static driveservice getservice(usercredential credential) { return new driveservice(new baseclientservice.initializer() { httpclientinitializer = credential, applicationname = "myapplicationname", }); } step 3 - create folder (or other content): private static string createfolder(driveservice servi...

Extract values from xml file, bash -

i need parsing xml file in shell script, need extract values given xml file, , put them variables. here part of xml file <?xml version="1.0" encoding="iso-8859-1"?> <!doctype site system "siteequipment.dtd" > <!-- site equipment configuration --> <site> <format revision="ak5" /> <optionalequipmentconfiguration configuresau="no" absolutetimesynchenabled="no" gpsoutenabled="false" smokedetector="false" /> <sitelocationconfiguration sitename="alzey002" logicalname="fxu046" > <sectordata sectornumber="1" latitude="4635826" lathemisphere="north" longitude="377963" geodatum="dhdn-" beamdirection="060" height="3000" sectorgroup="-1" /> <sectordata sectornumber="2" latitude="4635826" lathemisphere=...

java - How to edit the Response object in an CXF out Interceptor? -

i working on out interceptor on rest service , want retrieve response object message, edit , put message of interceptor. i have tried message.getexchange().get(response.class); and message.get(response.class); but null . out interceptor set in send phase. any ideas on how can this? thanks

jquery - TinyMCE Image upload not working in IE9 & IE10 -

the following code using uploading image in tinymce , not working in ie9,ie10,please me solve this editor.addbutton('imageinsert', { title : 'insert image', image : '<?php echo yii::app()->request->baseurl; ?>/images/image-icon.png', onclick : function(e) { e.preventdefault(); if ($.browser.msie) { $('#tinymce-image-upload').click(function(){ settimeout(function() { if($input.val().length > 0) { uploadimage(editor,e); } }, 0); ...

Use Access VBA to check-out an Excel doc from Sharepoint -

i have rather odd situation, below code can checkout file sharepoint excel... private sub checkoutfromsp() dim loc string loc = "location" if workbooks.cancheckout(loc) = true workbooks.checkout loc end if however how translate access? receive error "this document cannot checked out" following code? dim objxl excel.application dim loc string loc = "location" objxl = new excel.application if objxl.workbooks.cancheckout(loc) = true objxl.workbooks.checkout loc end if reason checkout via access there few pieces of data need dropped excel access, excel file on sharepoint need checkout/checkin submit changes. open document excel instance before checking out , should work you: dim objxl excel.application dim objwb excel.workbook 'new dim loc string loc = "location" set objxl = new excel.application 'make sure use set here if objxl.workbooks.cancheckout(loc) = true set objwb = objxl.workbooks.open(loc) 'new...

performance - Is this a reasonable way to only include jquery plugins when they are needed? -

i'm creating website use in-house, using laravel , other things i've been wanting learn, given bit of freedom , it's more fun wordpress etc. i want colleagues not overly web savvy able create pages , include nice functionality easily, instance know adding div class '.textcarousel', p tags within it, create styled carousel of p tags etc. what don't want have (or think don't want have do, might preferable current 'solution' - why here) include ton of jquery plugins on every page if aren't going used. what have done workaround (in pseudo-code here) this: if(selector.length) selector.each var defaults = { ..., script: 'path/to/plugin' }, data = this.data(), opts = extend(defaults, data), tis = this; if(!opts.script.length) head = document.getelementsbytagname('head')[0], script = document.createelement('script'); script.sr...

Outlier detection using R along with score -

i working on sample dataset find outliers using r. i followed link , read discussion on outlier: http://cran.r-project.org/doc/contrib/zhao_r_and_data_mining.pdf i have used dmwr, outliers packages find outliers. trying find out anomalous or outlier score each event. using lofactor: outlier_score <- lofactor(dataset, k=5) print(outlier_score) outliers <- order(outlier_score, decreasing=t)[1:5] print(outlers) oultier_score gives score : nan nan nan inf nan using outlier: outlier_tf = outlier(dataset,logical=true) print(outlier_tf) find_outlier = which(outlier_tf==true,arr.ind=true) print(find_outlier) find_outlier gives score as: false false false true false is there function or package available give anomalous or outlier score each event in numerical form, easy find out event has highest score.

html - Style Span and Jquery -

hopefully simple question i'm having blank moment over. i'm trying style span tag in html (which ties block of jquery). my show span holding background set not width. while hide centers, , has appropriate width. not sure why. missing preventing first span "show" style completely? fiddle below. .slider{ display:none; } .collapseslider{ display:none; } .sliderexpanded .collapseslider{ display:block; width: 100%; text-align: center; } .sliderexpanded .expandslider{ display:none; } .dark {background:#0082d1; text-align: center; width: 100%;} .light {background:#003a6f; text-align: center; width: 100%;} <p class="toggler" id="toggler-slideone"> <span class="expandslider dark">show</span><span class="collapseslider dark">hide</span> </p> <div class="slider" id="slideone"> <p>slide 1 lorem ipsum opsum...</p> <span class="closeslider...

Solr column name not visible in schema -

i have solr instance running on dev machine, when query collection see field called "ref number_t" dont see in schema? when searched solr config dont see either. how can figure "ref number_t" column. the ref number_t in schema browser not in schema.

mysql - Find all rows with matching columns with two conditions -

i have 2 tables , want find orders have two rows in line_items table , one of rows has sku of ball. trying find customers ordered ball, regardless of qty of ball row. there needs 2 rows per order @ least, because 1 of rows shipping sku. in below data, john , sam valid orders returned because skus orders have in line_items table ball , shipping (regardless of ball qty). i'd tables joined returned data have order_id, customer, date_placed, , qty. table orders id customer date_placed =========================== 0 john 1/1/2000 1 bill 2/1/2000 2 sam 2/5/2000 table line_items id order_id qty sku ========================= 0 0 1 ball 1 0 1 shipping 2 1 1 ball 3 1 1 rope 4 1 1 shipping 5 2 3 ball 6 2 1 shipping thank much! if understand correctly, should able write this: select o.id, customer, date_placed, li.qty...

javascript - Integrate datas from standard record type to custom record type in netsuite -

i'm beginner in netsuite , kindly please don't mind if question did not show proper efforts in attempting code. create custom record type using • goto customization>lists,records & fields>record types>new • enter name “demoemployee” , click save what best way integrate datas record type "employee" custom record type "demo employee" via suitescript. please me started. make sure have custom field of 'list' type in custom record. and list type record employee list. that way can reference employee record , custom records vice versa. requirements if planning show custom record in tab/section of employee record.

excel - Editing multiple properties in userform -

i have userform 25 option buttons (optionbutton1, optionbutton2, etc..) want populate captions of each of these buttons information spreadsheet. i'm not sure of best code done. for x = 1 25 optionbutton & x & .caption = range("a" & x) next x obviously won't work that's kind of want do. ideas? you can this: private sub userform_initialize() dim x byte 'change sheet1 suit thisworkbook.worksheets("sheet1") x = 1 25 me.controls("optionbutton" & x).caption = .range("a" & x) next x end end sub

javascript - Add two sidebars -

i want add 2 sidebars current website, i'm confused how it. add outside wrapper? i've tried add inside wrapper, stay @ top if so. thanks help, appreciate it fiddle/code click here enter code here to add columns left , right, need write markup example as: <div class="wrapper"> <div class="left-side"> </ div> <div class="center"> </ div> <div class="right-side"> </ div> </ div> where in style sheet specify correct attributes

ember.js - Emberjs - how to remove pluralization of URLs? -

i building emberjs app , want call rest api results. have code: app.post = ds.model.extend(); app.postadapter = ds.restadapter.extend({ namespace: 'api/v1', host: 'http://myapp.com' }); and in controller have this post: this.store.find('post') the problem calls "s" added in end, example - http://myapp.com/api/v1/posts how remove plural form these calls? you need override pathfortype method in adapter. app.postadapter = ds.restadapter.extend({ pathfortype: function(type) { var camelized = ember.string.camelize(type); return ember.string.singularize(camelized); } });

laravel 4 - Maximum function nesting level of '100' reached, aborting! Route Model Binding -

my route file route::model('rank', 'rank'); route::resource('rank', 'adminrankcontroller'); my controller file public function show($rank) { return $rank; } this give me error symfony \ component \ debug \ exception \ fatalerrorexception maximum function nesting level of '100' reached, aborting! any appreciated . earlier working . composer update ruined all. please note if change route::model('ranks', 'rank'); it working no database query runs fetch corresponding row

settings - Refresh R console without quit? -

i open r console day long sometime need clean history , workspaces background testing functions or new loads. i'm wondering whether there easier way use command line in .rprofile can refresh r console without quitting or reboot. aim q() without save , start r , clean history. think here may give me suggestions. in advance. for concerns history, in unix-like systems (mine debian) command refreshes it loadhistory("") however, said in comments, loadhistory seems platform-dependent. check ?loadhistory if present on platform. mine says: there several history mechanisms available different r consoles, work in similar not identical ways. there separate versions of file unix , windows. functions described here work on unix-alikes under readline command-line interface may not otherwise (for example, in batch use or in embedded application)

PHP encode/encrypt array to certain character length -

i making payment process via php possible, need pass unique id alphanumeric character string of maximum length of 19 characters . <?php $amount = $amt; // amount of payment (ex- 20 20$) $uniqnum = $uniqueid; //a string of maximum 19 charatcers //now rest of payment happens ?> and while payment gets processed, user returned website parameters, of which, parameter "uniqid" same sent(as mentioned above). <?php //this receive $pfs_voucher_id = $_get["p96"]; //transaction id (identifies invoices etc) $order_number = $_get["p120"]; //sent me unique id //rest of logic ipn if($ipn_response == 'y') { echo "payment of uniqueid ".$order_number." has been succeeded"; //i got order number still couldn't tell whom order meant } ?> since receive not information payment other amount , status of payment, compelled me use unique id identify other information regarding payment such user made payment , package ...