Posts

Showing posts from January, 2012

linux - Best way to edit android shell files /system/bin/ in windows -

what simplest way edit android shell files in "/system/bin/ on windows without installing linux or cygwin or these? have checked out: atom editor - http://www.atom.io sublimetext - http://www.sublimetext.com/3 or notepad ++ - https://notepad-plus-plus.org/ all of these able open/edit .sh filetype

c# - MVVM Light create multiple instance of DataService -

right using mvvm light achieve mvvm pattern. in view create multiple tabs , bind them multiple instances of 1 viewmodel. achieve with: servicelocator.current.getinstance<viewmodel>(key); when this, every instance of viewmodel connected same 1 instance of dataservice registered in viewmodellocator: simpleioc.default.register<idataservice, dataservice>(); but want have every instance of viewmodel 1 instance of dataservice. why? because each instance of viewmodel has same function requires other data. how create in mvvm lights viewmodellocator new instance of dataservice when new instance of viewmodel? possible or isn't approach in mvvm pattern , failed understand dataservice correctly? you can use overloaded version of register method create multiple instances of data service. simpleioc.default.register<idataservice>(()=>new dataservice(),"viewmodel1"); simpleioc.default.register<idataservice>(()=>new dataservice(),...

mysql - I cannot assign a primary key or a foreign key in mysqldb, with python. -

i using mysqldb in python, , cannot create table primary or foreign key. can create table, since following works: theconn = mdb.connect('localhost', 'root', 'pw', 'db') thedb = theconn.cursor(); thedb.execute("create table hf_aum_returns ( \ fundid int not null , \ metric_type char(10) , \ metric_value float , \ datetime date )") however, when run following line: thedb.execute("create table hf_aum_returns_2 ( \ fundid int not null , \ metric_type char(10) , \ metric_value float , \ datetime date , \ constraint returns_pk primary key ( fundid , metric_type , metric_value , datetime )") i error telling me check syntax: _mysql_exceptions.programmingerror: (1064, "you have error in sql syntax; check manual corresponds mysql server version right syntax use near '' @ line 1") ugh. not bright. missed parenthesis, @ end of statement. (...been staring @ hour...) ...

charts - VBA error "Method or Data Memeber Not Found..." when using .chartdata -

hopefully can help. new , big picture trying alter data on existing chart on ppt slide data excel sheet. simple problem when try create new chart error: method or data member not found on line set gchartdata = mychart.chartdata why .chartdata not option in vba menu following mchart? running office pro plus 2010. have ms powerpoint 14.0 object lirary reference checked. thanks sub createchart() dim mychart chart dim gchartdata chartdata dim gworkbook excel.workbook dim gworksheet excel.worksheet ' create chart , set reference chart data. set mychart = activepresentation.slides(1).shapes.addchart.chart set gchartdata = mychart.chartdata ' set workbook , worksheet references. set gworkbook = gchartdata.workbook set gworksheet = gworkbook.worksheets(1) ' add data workbook. gworksheet.listobjects("table1").resize gworksheet.range("a1:b5") gworksheet.range("table1[[#headers],[series 1]]").value = "items" gworksheet.range(...

tomcat - Packaging using Maven -

i have java web application deployed using tomcat. want package tomcat root .war file using maven. can guide me through process? thank you create pom.xml file in root directory following code. <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <modelversion>4.0.0</modelversion> <groupid>package</groupid> <artifactid>artifactid</artifactid> <version>0.0.1-snapshot</version> <name>project</name> <packaging>war</packaging> <build> <plugins> <plugin> <groupid>org.apache.maven.plugins</groupid> <artifactid>maven-war-plugin</artifactid> <configuration> ...

Jenkins Git global timeout change -

Image
one of our jobs runs timeout @ following command: git checkout -f <commit> the timeout 10 minutes default. tried execute manually, takes bit more 10 minutes. set 20 minutes in job's configure menu, doesn't work. advanced checkout behaviours: timeout (in minutes) checkout operation: 20 our git plugin version 2.3.4. read posts downgrade version, can't try option (i'm not allowed), decided set global timeout value. can tell me how (in jenkins-slave.xml or command line)? my git plugin version 2.3.5 , below configurations works me. additional behaviours-->advanced checkout behaviours--> timeout (in minutes) checkout operation: 20

python - TypeError raised while trying to use range -

while i'm running following code shows typeerror : a = int(input("enter iteration value:")) b=[] c in range[0,a]: d=int(input("enter:")) b.append(d) f=0 e in b: f = f + e print f it shows following error enter iteration value:5 traceback (most recent call last): file "/var/app/eclipse/plugins/org.python.pydev_3.5.0.201405201709/pysrc/pydevd.py", line 1845, in <module> debugger.run(setup['file'], none, none) file "/var/app/eclipse/plugins/org.python.pydev_3.5.0.201405201709/pysrc/pydevd.py", line 1373, in run pydev_imports.execfile(file, globals, locals) # execute script file "/opt/odoo/v7.0_cust_mod/python/print.py", line 68, in <module> c in range[0,a]: typeerror: 'builtin_function_or_method' object has no attribute '__getitem__' you using wrong syntax range() function: for c in range[0,a]: note square brackets, should use parentheses...

javascript - No HTML on InfoWindow when using setContent -

i have been using flask-googlemaps extension from: https://github.com/nikulesko/flask-googlemaps i trying insert html in infowindows these not show (the tags show plaintext). how achieve this? thought passing string html tags on render html on infowindow not work. how content of infowindow set: var infowindow = new google.maps.infowindow({ content: "loading..." }); {% marker in gmap.markers %} var marker_{{loop.counter}} = new google.maps.marker({ position: new google.maps.latlng({{marker.0}}, {{marker.1}}), map: {{gmap.varname}}, title: '{{marker.2}}', icon: '{{marker.3}}', }); google.maps.event.addlistener(marker_{{loop.counter}}, 'click', function() { infowindow.setcontent('{{marker.4}}'); infowindow.open({{gmap.varname}}, this); }); {...

machine learning - How do you draw a line using the weight vector in a Linear Perceptron? -

i understand following: in 2d space, each data point has 2 features: x , y. weight vector in 2d space contains 3 values [bias, w0, w1] can rewritten [w0,w1,w2]. each datapoint needs artificial coordinate [1, x, y] purposes of calculating dot product between , weights vector. the learning rule used update weights vector each misclassfied point w := w + yn * xn my question is: how derive 2 points weight vector w = [a, b, c] in order graph decision boundary? i understand + bx + cy = 0 linear equation in general form (a, b, c can taken weights vector) don't know how plot it. thanks in advance. the best way draw line find minimum x value , maximum x value on display axis. calculate y values using known line equation (-(a+bx)/c). result in 2 points use inbuilt plot command draw line.

join - Oozie fork kills all actions when one is killed -

i use fork/join in oozie, in order parallel sub-workflow actions. workflow.xml looks this: <workflow-app name="myname" xmlns="uri:oozie:workflow:0.5" <start to="fork1"/> <kill name="kill"> <message>action failed, error message[${wf:errormessage(wf:lasterrornode())}]</message> </kill> <fork name="fork1"> <path start="subworkflow1"/> <path start="subworkflow2"/> </fork> <join name="completed" to="end" <action name="subworkflow1"> <sub-workflow> <app-path>....</app-path> <propagate-configuration/> <configuration> <property> <name>....</name> <value>....</value> </property> </configuration> </sub-workflow> <ok to="comple...

javascript - Outputting Distance Matrix results in a div -

i'm using code found here calculate distance between places. here's fiddle , code: <!doctype html> <html> <head> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript"> origin = new google.maps.latlng(40.689844,-74.044874), destination = "washington, dc", service = new google.maps.distancematrixservice(); service.getdistancematrix( { origins: [origin], destinations: [destination], travelmode: google.maps.travelmode.driving, avoidhighways: false, avoidtolls: false }, callback ); function callback(response, status) { orig = document.getelementbyid("orig"), dest = document.getelementbyid("dest"), dist = document.getelementbyid("dist"); if(status=="ok") { orig.value = response.destinationaddresses[0]; dest.value = response.originaddresses[0]; ...

How to remove new line when record empty in crystal report -

Image
sorry if duplicate or etc. i want display record in crystal report like string1 | string2 | string3 | string4 | ------------------| 12345 | ------------------| 12345 | string3 contain 4 field , field1-4 but code did not work that string1 | string2 | string3 | string4 | ------------------| 12345 | ------------------| 12345 | ------------------|--------| ------------------|--------| what want display record when has data, have 4 record, if 1 or more record contain data other record not create new line, no space taken. if {table.field1} = "0" "" else if {table.field2} = "0" "" else if {table.field3} = "0" "" else if {table.field4} = "0" "" else {table.field1} & "<br>" & {table.field2} & "<br>" & {table.field3} & "<br>" & {table.field4} using can grow , text interpretation html text on crystal report ...

c# - Keep row in edit mode after inserting in GridView -

i have gridview , have defined respective itemtemplates , edittemplates rows , controls. have different row events bind, insert, update, delete data grid. per requirement struggling find way keep new row in edit state once has been inserted in grid. presently there overhead of clicking edit button after row inserted. how accomplish this? i found resolution. call rowedit event explicitly : gridview_rowediting(sender, new gridviewediteventargs(gridview.rows.count-1));

forms - How to integrate a non-model radio button element to a CActiveForm in Yii? -

in yii application, i'm working on, there simple cactiveform , elements model related , this: <div class="row"> <?php echo $form->labelex($model, 'foo'); ?> <?php echo $form->textfield($model, 'foo', array(/* html options */)); ?> <?php echo $form->error($model, 'foo'); ?> </div> now want implement following case: the should radio button element bar 2 options. depending on selected option different form elements should displayed (a dropdown list existing bar -entries oder set of field create new one). in controller want analyze field bar and, if needed (means e.g. if bar == 1 ) use provided field set create new table entry. cactiveform#radiobutton(...) needs model input. case model not relevant -- radio button need should contain/provide information, how data has processed. there yii conform way implement requirement , create "non-model" form element yii cactiveform ? ...

C++ Pure virtual method override -

i'm facing little problem , don't know in situation : have first class (object3d) parent class object3d{ public: object3d(){}; virtual ~object3d(){}; ///random methods virtual void printobj() = 0; virtual void printobj(double) = 0; //etc.. private: //.. }; as can see , have printobj() method overridden. objects take no arguments , in child class class cube : public object3d { public: cube(unsigned char c):object3d(c){}; ~cube(){}; void printobj(); private: //.. }; and other classes require argument call printobj method class teapot : public object3d { public: teapot(unsigned char c):object3d(c){}; ~teapot(){}; void printobj(double s){//code}; private: //.. }; the problem these 2 classes automatically abstract inherit pure virtual methods parent class. i've thought redefining printobj(double) in cube class , printobj() class in tea...

android - AndroidNativeBeacons returning a 500 error with MobileFirst Platform -

intending implement monitoring , ranging of beacons in android application ibmmobilefirst. link procedure , sample project also used android beacon library application. successfully installed apk in samsung galaxy tab 3 , option load beacons , triggers returning 500 error , not able detect nearby beacons. error - wlbeaconsandtriggersjsonstoremanager.loadbeaconsandtriggers() failed: wlresponse[invocationcontext=null,reponsetext=,,status=500]wlfailresponse[errormsg=unexpected errorcode occured.please try again.,errorcode=unexpected_error] the wlclient.properties file seems need amendments , wlserverprotocol = http wlserverhost = wlserverport = 10080 wlservercontext = /beaconsnative/ wlappid = androidnativebeacons wlappversion = 1.0 wlenvironment = androidnative wluid = wy/mbnwktddyquvuqcdsgg== wlplatformversion = 7.0.0.00.20150227-0916 also , the registration of beacons done , makes use of (put) rest api beacons detection. not clear use of rest api , detecting neares...

php - Laravel 5.1: Registration page routing -

i developing registration process using laravel. feeling problem. i'm using implicit controller route::controllers([ 'auth' => 'auth\authcontroller', 'password' => 'auth\passwordcontroller', ]); my registration anchor tag link 'auth/registration' <a class="dropdown-toggle" href="auth/register"> <span class='glyphicon glyphicon-pencil'></span> register </a> when first time click link, works , show intended page. when go intended register page , click again link shows error , browser address bar show link way - http://localhost:8000/auth/auth/register and give me error message - "controller method not found." but when clicked link first time browser address bar showed link in way - http://localhost:8000/auth/register and that's time link worked when click second time on register page doesn't work , show error message. could please le...

iphone - Mail Compose View Controller is delayed in swift for ios objective c? -

i have code send feedback email , works fine email container takes time show title , receiver attributes, typing in email disabled 4 seconds becomes active. here code: @ibaction func sendemailbuttontapped(sender: anyobject) { if mfmailcomposeviewcontroller.cansendmail() { let mailcomposeviewcontroller = configuredmailcomposeviewcontroller() self.presentviewcontroller(mailcomposeviewcontroller, animated: true, completion: nil) } else { self.showsendmailerroralert() } } func configuredmailcomposeviewcontroller() -> mfmailcomposeviewcontroller { var mailcomposervc = mfmailcomposeviewcontroller() mailcomposervc.mailcomposedelegate = self // extremely important set --mailcomposedelegate-- property, not --delegate-- property mailcomposervc.navigationbar.tintcolor = uicolor.whitecolor() var font : uifont = uifont(name: "droidarabickufi", size: 12)! mailcomposervc.navigationbar.titletextattributes = [nsfontattribut...

ssl - haproxy: inconsistencies between private key and certificate loaded from PEM file -

i trying use certificate signed server. have both private key , certificate. my pem file order : subject=/c=***/l=*****/o=**********/cn=********* issuer=/c=***/o=*****inc/cn=********secure server ca -----begin certificate----- -----end certificate----- subject=/c=us/o=******** inc/cn=********* sha2 secure server ca issuer=/c=us/o=********* inc/ou=*********/cn=******** global root ca -----begin certificate----- -----end certificate----- subject=/c=us/o=********* inc/ou=***********/cn=*********** global root ca issuer=/c=us/o=********* inc/ou=************/cn=******** global root ca -----begin certificate----- -----end certificate----- -----begin rsa private key----- -----end rsa private key----- when tried deploy haproxy, got error. [alert] 188/141626 (2322) : parsing [/etc/haproxy/haproxy.cfg:32] : 'bind *:443' : inconsistencies between private key , certificate loaded pem file ................ [alert] 188/141626 (2322) : error(s) found in configuration file : /etc/h...

video capture - How to programmatically record screen without root device in android? -

i have drawing app. want record finger drawing , make .mp4 file. display whole drawing steps how create drawing. can't understand how use record screen on apps. you can not record screen video without rooting device. in case if want play drawing if have state of drawn items can redraw in thread proper delay, looks video.

c# - Upload file image validation -

i have these codes validation before can upload image. when try upload different files video files , etc. still pushing through? missing here? here whole code behind. im not sure looking im sorry. its accepting try upload , uploads no image. protected void page_load(object sender, eventargs e) { if (session["islandgasadminpm"] != null) { if (!ispostback) { getcategories(); addsubmitevent(); } if (request.querystring["alert"] == "success") { response.write("<script>alert('record saved successfully')</script>"); } } else { response.redirect("login.aspx"); } } private void addsubmitevent() { updatepanel updatepanel = page.master.findcontrol("adminupdatepanel") updatepanel; updatepanelcontroltrig...

Create new database table ruby on rails schema.rb -

on ruby on rails app added following code in schema.rb file create new table in database create_table "label_info", :force => true |t| t.text "body" t.string "title" t.integer "label_id" end and run rake db:migrate command nothing happening. thought create new table in database . if read first line of schema.rb file see: # file auto-generated current state of database. instead # of editing file, please use migrations feature of active record # incrementally modify database, , regenerate schema definition. i recommand rails g model label_info

android - Custom sync not working with Google Account (com.google) on some Samsung devices -

i implemented sync task same way basicsyncadapter example except google account in answer: https://stackoverflow.com/a/2972918/2072569 it works on allmost devices except samsung sm-p600 (galaxy note 2014) android 4.4.2 , other samsung tablets. my contentprovider in manifest file has label. cause of bug according this post @ android version of samsung tablets. has samsung blocked adding sync tasks google account reason? the sync added this: removeallsynctasks(); contentresolver.setissyncable(maccount, content_authority, 1); contentresolver.setsyncautomatically(maccount, content_authority, true); contentresolver.addperiodicsync(maccount, content_authority, bundle.empty, sync_frequency); manifest part: <service android:name=".data.sync.syncservice" android:exported="true" android:process=":sync"> <intent-filter> <action android:name="android.conte...

html - Issue closing the responsive menu -

i have problem responsive menu , can't figure out it. it's hard explain go website http://untruste.altervista.org/home.html now resize windows since responsive version, open menu , close it. resize window since desktop version, u can see menu disappeared! (if refresh page comes back) desktopstyle: header { padding-bottom: 2%; border-radius: 10px; width: 70%; margin: auto; } #headertitle h1{ display: block; } #headertitle { padding-top: 1%; text-align: center; line-height: 1.8em; } header img { display: block; margin: 2%; width:7em; } header h1 { width: 80%; margin: auto; font-size: 1.8em; letter-spacing: -0.04em; } header h2 { width: 50%; margin: auto; text-align: center; font-size: 1.5em; letter-spacing: -0.06em; } #menu { display: block; width: 80%; margin: auto; border:none } #menu ul li { display: inline-block; width:auto; margin-left:auto; ...

c# - How to display tasks from database in a sharepoint gantt view -

i have been searching while solution display tasks stored in database in sharepoint gantt view. found on internet how create tasks instantly while showing gantt view. none explaining how retrieve data sql server (or other) database table , displaying them on gantt view. please, kind of appreciated !

jquery - Using an input="submit" field to submit instead of button="" with parsley.js -

i have asp.net page has 1 form tag around entire page. within page, have 2 forms validated parsley.js when respective submit button clicked. @ moment, trigger validate these forms buttons , need them input="submit". have idea on how execute this? here's js fiddle example - http://jsfiddle.net/ukgvam9k/26/ <form method='post' id='form'> <div class="first"> <input type='text' id='firstname' name='firstname' data-parsley-group="first" required /> <input type='text' id='lastname' name='lastname' data-parsley-group="first" required /> <input type='text' id='phone' name='phone' data-parsley-group="first" required /> <button type="button" id="submit-form">submit</button> </div> <div class="secon"> <input type='text' id='thisisr...

iphone - ios 8.4 simulator is very large size in xcode 6.4? -

Image
i upgraded xcode 6.2 6.4.earlier simulator size of iphone fine.but size of iphone 5,5s,4s large. scroll bar on both side horizontally & vertically.i don't know why size large.how can resolve this? from menu of simulator check window > scale , choose scale fits needs alternatively can use ⌘ + 1 for 100% , ⌘ + 2 75% or ⌘ + 3 50% update: for xcode 7 seems have more options :) we can use ⌘ + 4 for 33% , ⌘ + 5 for 25% xcode 6 , before : xcode 7 :

android - Malformed encryption mp3 to m3u8 -

i have python function encoding mp3 m3u8. function allows me generate m3u8 file along ts chunks. i can read "playlist" using native player on ios. unfortunately can't achieve using android-mediaplayer (i got error media_error_malformed). the catch is, if in python, use openssl via subprocess, works. spawning new process expensive , want avoid : cmd = ["openssl", "aes-128-cbc", "-e", "-in", path, "-out", dest_path+".openssl.ts", "-iv", ("%d" % iv_counter).zfill(32), "-k", keyhex] subprocess.check_call(cmd) using openssl or implementation produces same m3u8 file, same numbers of ts files , these ts files have same weight. the explanation find implementation wrong. know may hard debug, maybe jump @ at first reading. here function doing encryption : from crypto import random crypto.cipher im...

microcontroller - Sending wrong data by TX/ UART -

i'm working pic32mx795f512l , mplabx v2.10 , xc32 on little project et need send data (for now, 0 or 1) via rx/tx "something" convert usb. the problem i'm receiving strange things #define uart_baud_rate 9600 char* cmd; int main(void) { uartconfigure(uart1, uart_enable_pins_tx_rx_only); uartsetfifomode(uart1, uart_interrupt_on_tx_not_full | uart_interrupt_on_rx_not_empty); uartsetlinecontrol(uart1, uart_data_size_8_bits | uart_parity_none | uart_stop_bits_1); uartsetdatarate(uart1, getperipheralclock(), uart_baud_rate); uartenable(uart1, uart_enable_flags(uart_peripheral | uart_rx | uart_tx)); while (1) { cmd="1"; uart_send_data((byte*)cmd,1); the uart_send_data function is: void uart_send_data(byte *buffer, uint8 size) { uint8 i; for( i=0; i<size; i++ ) { uart_put_c(*buffer); buffer++; } while(!uarttransmissionhascompleted(uart1)); } and uart_p...

jquery - Not able to fetch values from two dimensional array in Javascript -

i inserting values in 2 dimensional array according role_id i.e var tdarray = [[]]; tdarray[40].push(22); where 40 role_id , 22 value. when print value shows null alert(tdarray[40][0]); //this shows no value. i guess 2 dimensional array in jquery not allow insert values @ specific position.can suggest me can overcome this. entire code here var tdarray = [[]]; var incr = 1; var check; $(function () { $('.toggle_checkbox').change(function () { if (check === null) {} else { if (this.name == check) { incr++; } else { incr = 1; } } var tval = $(this).val(); check = this.name; tdarray[this.name].push(tval); }); }); html code <table border = "0" cellspacing = "0" cellpadding = "1" > <tbody> <c:foreach items="${accessrightvalues}" var="rights" > <tr styl...

python - Open cassandra connection only once in Django -

i want open 1 single connection cassandra database in django. did not find on topic unfortunately. at moment got class iniate whenever need query: class cassconnection(): def __init__(self): self.auth_prov = plaintextauthprovider(settings.runtime_settings[k.cassandra_user], settings.runtime_settings[k.cassandra_password]) self.cluster = cluster(settings.runtime_settings[k.cassandra_cluster], auth_provider=self.auth_prov) self.session = self.cluster.connect(keyspace=settings.runtime_settings[k.keyspace_tirereadings]) self.session.row_factory = dict_factory def get_session(self): return self.session i open new session in other classes every query make by: self.con = cassconnection() self.session = self.con.get_session() anyone hint, how keep session open , make accesible via multiple packages? for "one connection per django process" scheme, basically, ...

c# - Convert registry entry from REG_SZ to REG_DWORD? -

i've inherited application registry entries "autologoff" (and many similar items) reg_sz type has values of "0" or "1". more logical numerical (ie. dword). there simple way convert existing reg_sz entry reg_dword (change type)? i suppose detect "upgrade old version", extract reg_sz value , delete existing registry key, re-create registry key same name reg_dword type...but seems there might easier way. using c# here, though principle i'm interested in. there no "easy way", requires deleting value , adding back. this not fantastic idea, if user ever restores older version of app whatever reason (it happen lot more might think) old version misbehave, not limited hard crash. not try change type, use value name. "autologoff2". machines old name disappear. effort of creating new value otherwise same. yuck factor high.

ios - Present modal view controller in half size -

i tried implement presenting modal view controller on other uiviewcontroller sized half parent view controller as: class viewcontroller: uiviewcontroller, uiviewcontrollertransitioningdelegate { override func viewdidload() { super.viewdidload() } @ibaction func tap(sender: anyobject) { var storyboard = uistoryboard(name: "main", bundle: nil) var pvc = storyboard.instantiateviewcontrollerwithidentifier("customtableviewcontroller") uitableviewcontroller pvc.modalpresentationstyle = uimodalpresentationstyle.custom pvc.transitioningdelegate = self pvc.view.backgroundcolor = uicolor.redcolor() self.presentviewcontroller(pvc, animated: true, completion: nil) } override func didreceivememorywarning() { super.didreceivememorywarning() } func presentationcontrollerforpresentedviewcontroller(presented: uiviewcontroller, presentingviewcontroller presenting: uiviewcontrolle...

PHP streams: difference between options and parameters -

two key concepts in php streams feature context options , parameters . what difference between «option» , «parameter»? documentation former straightforward. seems option protocol specific setting, e.g. "method" (get, post, put...) if using http or "callback function called when inserting document" in mongodb. what's parameter then? stream_context_set_params() manual page contains sparse reference supported parameters being "notification" , "options" (options??). context parameters page mentions "notification", if had great plans future when php/4.3.0 released never bloomed. update: i did research , found out, code old, introduced commit e1d0a1479 , kept more or less unchanged since time. (2003/04/10) the author of code wez furlong . ask him, since fear nobody can provide better answer. (find email address on github ) imho parameters ( there 1 atm ), can used context wrappers options specific type of...

c# - How do I tell WCF to skip verification of the certificate from client .NET and web service JAVA? -

i have build silmple client in c# call soap java web service. have problem validation response. problem (i think) on certificate. this app.config <?xml version="1.0" encoding="utf-8"?> <configuration> <startup> <supportedruntime version="v4.0" sku=".netframework,version=v4.5"/> </startup> <system.servicemodel> <behaviors> <endpointbehaviors> <behavior name="disableservicecertificatevalidation"> <clientcredentials> <servicecertificate> <authentication certificatevalidationmode="none" revocationmode="nocheck" trustedstorelocation="localmachine"/> </servicecertificate> </clientcredentials> </behavior> </endpointbehaviors> ...

eclipse - Error running Maven classworlds-1.1.pom.lastUpdated corrupted -

Image
i'm french try have orthograph, when run project maven have error (i don't found how newlines) : [warning] failed canonicalize path c:\users\administrator\.m2\repository\classworlds\classworlds\1.1\classworlds-1.1.pom.lastupdated: file or directory corrupted , unreadable [warning] failed canonicalize path c:\users\administrator\.m2\repository\classworlds\classworlds\1.1\classworlds-1.1.pom.lastupdated: file or directory corrupted , unreadable [warning] failed write tracking file c:\users\administrator\.m2\repository\classworlds\classworlds\1.1\classworlds-1.1.pom.lastupdated java.io.filenotfoundexception: c:\users\administrator\.m2\repository\classworlds\classworlds\1.1\classworlds-1.1.pom.lastupdated (the file or directory corrupted , unreadable) build failure i tried eclipse , netbeans, , removed repertory classworlds unless results in springgardenapplication.java file : package org.yannart.springgarden; import org.springframework.context.support...

database - How to connect Oracle DB to iOS app -

i'm trying develop app ios in show informations , graphs, retrieve oracle db. question how can create connection between app , oracle db , possible use data db create graphs? minor question: there possibility create application using oracle apex. many all. no, can't connect oracle database ios app. in ios sqlite database used. if want access data in oracle database or in other database, have use web service.

php - CodeIgniter - How to return values from an ajax method? -

i trying pass date ajax function , relevant type , title according date separately database. i have used following model function. function get_reservation_for_add_popup($date_cal) { $this->db->select('reservations.title,reservations.type'); $this->db->from('reservations'); $this->db->where('reservations.date_cal', $date_cal); $this->db->where('reservations.is_deleted', '0'); $query = $this->db->get(); return $query->result(); } my controller function following function get_title_and_type() { $reservation_service = new reservation_service(); $data['reservation_pop_up'] = $reservation_service->get_reservation_for_add_popup($this->input->post('date', true)); echo $data; } in view want title , type separately particular day. used following ajax function. don't know how retur...

rust - trait with functions that return an iterator -

i'm trying build trait functions return iterator. my simple example looks this: pub trait traita { fn things(&self) -> iterator<item=&u8>; } fn foo<a: traita>(a: &a) { x in a.things() { } } which not work because iterator size type not known @ compile time. rust's libstd has 1 implementation of this, trait intoiterator . /// conversion `iterator` pub trait intoiterator { /// type of elements being iterated type item; /// container iterating on elements of type `item` type intoiter: iterator<item=self::item>; /// consumes `self` , returns iterator on fn into_iter(self) -> self::intoiter; } the trait has peculiar by-value ( self ) formulation able express both “into iterator” , “borrow iterator” semantics. demonstrated hashmap's intoiterator implementations. (they use hashmap's iterator structs iter , intoiter .) what's interesting here trait implemented type &hash...

Azure media services on demand streaming from streaming origin without encoding -

i want encode videos using ffmpeg , create 10mb mp4 file. want upload on azure media service asset. want stream via streaming origin , apply cdn on origin. not want use encoding job media services. problem after uploading asset see url contains blob direct url can stream. want apply streaming origin on url without encoding job. don't think possible. solution that. here example case 1 - uploaded , published let's uploaded mp4 file song on azure portal , see url https://fiautomationblobstore.blob.core.windows.net/asset-ea4748ff-0300-80c3-1fe8-f1e525056262/_enr.mp4?sv=2012-02-12&sr=c&si=6c0d7963-8eb9-4568-af27-454e1d09220e&sig=xp0xuk6bth%2bbrzgtur%2bjzypr%2fle505%2bp%2fq3xb%2b%2blj0e%3d&st=2015-07-08t00%3a12%3a06z&se=2115-06-14t00%3a12%3a06z if publish works of course coming directly blob storage url "fiautomationblobstore.blob.core.windows.net" case 2 - uploaded , encoded , published if encoded video published url http://tmediasvc.streamin...

python - Logarithmic returns in pandas dataframe -

python pandas has pct_change function use calculate returns stock prices in dataframe: ndf['return']= ndf['typicalprice'].pct_change() i using following code logarithmic returns, gives exact same values pct.change() function: ndf['retlog']=np.log(ndf['typicalprice'].astype('float64')/ndf['typicalprice'].astype('float64').shift(1)) #np numpy here 1 way calculate log return using .shift() . , result similar not same gross return calculated pct_change() . can upload copy of sample data (dropbox share link) reproduce inconsistency saw? import pandas pd import numpy np np.random.seed(0) df = pd.dataframe(100 + np.random.randn(100).cumsum(), columns=['price']) df['pct_change'] = df.price.pct_change() df['log_ret'] = np.log(df.price) - np.log(df.price.shift(1)) out[56]: price pct_change log_ret 0 101.7641 nan nan 1 102.1642 0.0039 0.0039 2 103.1429 0....

ruby on rails - Filter the loaded data using ROR -

i first preload activerecord one-to-many active records. possible filter out data followings without querying database again? animal = @animals.all.includes({:cats}) animal.where([:cat_category=>"home_cat"]) ### 1 if located inside method, example def load_something animal = @animals.all.load([:cats]) animal.where([:cat_category=>"home_cat"]) ### 1 end rails smart enough make 1 request db. if check in rails console , 1 line, type other, make 2 requests, in app, rails amke 1 db request

Transform vertical table to horizontal with MySQL -

i have tablea information, so: time data value ------------- ------ ------ 120520142546 title mr 120520142546 name smith 120520142546 smoke yes 180303140429 title ms 180303140429 name lea 180303140429 smoke no i'm trying tableb (which created, want insert value) data same time value displayed in same row, (and tranform 'yes' 1 , 'no' 0) : id title name smoke --- ----- ----- ----- 1 mr smith 1 2 ms lea 0 i kind of understand can pivot thing couldn't find easy tutorial understand. try this: create table tableb ( id int not null auto_increment, title varchar(255) not null, name varchar(255) not null, smoke tinyint(255) not null, primary key (id) ); insert tableb (title, name, smoke) select t1.value title, t2.value name, (t3.value = 'yes') smoke tablea t1 join tablea t2 on t1.time = t2.time join tablea t3 on t1.time =...

c++ - Qt Print Dialog reappears after Print button clicked -

i trying print graphic in qt. the signals , slots connected follows : connectstat = connect(_ui->printbutton, signal(clicked()), this, slot(doprint())); and slot follows: ... qgraphicsscene * m_scene; ... void graphdrawerwidget::doprint() { qprinter printer; if (qprintdialog(&printer).exec() == qdialog::accepted) { printer.setorientation(qprinter::landscape); qpainter painter(&printer); painter.setrenderhint(qpainter::antialiasing); m_scene->render(&painter); } } the print dialog appear, , can scene print clicking on print button. however, after this, print dialog showed again. doesn't matter if click print, cancel or window x button, still shows after click. am possibly connecting signals/slots wrong? found it! seems doing connect() in method called run() (graphdrawerwidget::run()) feeding data graphic. this run() got called once each signal adding graphic, same slot connected multiple times...

anova - R not plotting observations with leverage one - Cross Validated

i building simple linear model. want test if frass got on 3 days butterfly larvae depend upon food ate (diet), butterfly family (the mother line) , subsequent survival (called "survived", larvae may latter die show e.g. problems eat @ larval stage). i'm interested in 2 way interactions: diet:family , survived:family. interaction diet:survived not included because there 1 individual in 1 of 2 diet died. model: mod=lm(log(frass.weight)~diet*family+survived+family:survived,data=dat) anova(mod) # variables significant. summary(mod) #the r2adj of 0.81 shapiro.test(resid(mod)) # p-value = 0.2389 i have not looked @ variance have small sample size. 3 individuals of 7 family have been recorded frass on both 2 diets. problem: all looks nice, except when plot model plot(mod) following warning: "warning messages: 1: not plotting observations leverage one: 3, 20, 30, 35 " is warning or have real issue these points influence variance? when remove t...

python - read data in chunks insert chunks in Sqlite using transaction -

my issue refers old post importing data set in sqlite in chunks using transaction sqlite transaction csv importing : import csv, sqlite3, time def chunks(data, rows=10000): in range (0, len(data), rows): yield data[i:i+rows] if __name__ == "__main__": t = time.time() con = sqlite3.connect('test.db') cur = con.cursor() cur.execute("drop table if exists sensor;") cur.execute("create table sensor(key int, reading real);") filename = 'dummy.csv' reader = csv.reader(open(filename,"r")) divdata = chunks(list(reader)) chunk in divdata: cur.execute('begin transaction') col1, col2 in chunk: cur.execute('insert sensor (key, reading) values (?, ?)', col1, col2)) con.commit() while csv.reader reads whole file in memory , file gets chopped calling function chunks, looking solution reads file in chunks (of say, 10k rows) , each chunk inserted in sqlite table above unti...

sql server - error in Connection String in C# -

i new c#. want use microsoft sql server database file test.mdf in output software in c#. in past, had copied connection string in visual studio : data source=.\sqlexpress;attachdbfilename=c:\users\home\documents\test.mdf;integrated security=true;connect timeout=30;user instance=true as see database file path : c:\users\home\documents\test.mdf; when create setup sofware in visual studio 2008, , install software on pc, errors : an attempt atach auto-named database file c:\user\home\document\test.mdf failed ... so want address file installation folder path whith : string dir = application.startuppath + "\\" + "test.mdf"; but when want run program in visual studio 2008 erros string dir = application.startuppath + "\\" + "test.mdf"; sqlconnection con = new sqlconnection(@"data source=.\sqlexpress;attachdbfilename=" + dir + ";integrated security=true;connect timeout=30;user instance=true"); error 1 ...

raspbian - What uses the memory on raspberry pi? -

on pi after start there no free memory, can not found, waht uses it: pi@node1 ~ $ cat /proc/cpuinfo processor : 0 model name : armv6-compatible processor rev 7 (v6l) bogomips : 2.00 features : half thumb fastmult vfp edsp java tls cpu implementer : 0x41 cpu architecture: 7 cpu variant : 0x0 cpu part : 0xb76 cpu revision : 7 hardware : bcm2708 revision : 0013 serial : 00000000bf2e5e5c pi@node1 ~ $ uname -a linux node1 4.0.7+ #801 preempt tue jun 30 18:15:24 bst 2015 armv6l gnu/linux pi@node1 ~ $ head -n1 /etc/issue raspbian gnu/linux 7 \n \l pi@node1 ~ $ grep memtotal /proc/meminfo memtotal: 493868 kb pi@node1 ~ $ grep "model name" /proc/cpuinfo model name : armv6-compatible processor rev 7 (v6l) pi@node1 ~ $ ps -eo pmem,pcpu,vsize,pid,cmd | sort -k 1 -nr | head -5 0.6 0.2 6244 2377 -bash 0.3 0.0 6748 2458 sort -k 1 -nr 0.3 0.0 4140 2457 ps -eo pmem,pcpu,vsize,pid,cmd 0.2 0....