Posts

Showing posts from July, 2012

React Native : Unexpected view type nested under text node -

Image
i've got error on android. in case, use react-native-maps. know from? the problem me error somehow managed end <view> inside of <text> . not obvious because had button component accepting children wrapped in <text> , using custom component icon when instantiating button. after while wrapped icon in <view> give padding , caused issue in end. it took time figure out in end solved it. may differ case case hope problem inspires in debugging session. cheers!

PHP Curl POST with JSON returns Server Error 500 - Django -

i using code below make php curl post request. tell me , why server sends me server error code 500? when open api link in browser , test json data ok. use similar code make put request , don`t have problems. $postarray = array( "email" => $email ); $json = json_encode( $postarray, json_pretty_print ); $pl4m_url = "api-link"; $ch = curl_init($pl4m_url); curl_setopt($ch, curlopt_customrequest, "post"); curl_setopt($ch, curlopt_httpheader, array('content-type: application/json')); curl_setopt($ch, curlopt_returntransfer, true); curl_setopt($ch, curlopt_postfields,$json); curl_setopt($ch, curlopt_ssl_verifypeer, false); curl_setopt($ch, curlopt_followlocation, 1); $result = curl_exec($ch); curl_close($ch); echo $result;

monitoring - Monitor user activity in vb.net -

i make program monitors user activity. not need know user doing, need know is doing something. moving mouse, or typing. program used show company @ desk , gone workstation. if there no activity 2 minutes, means user away computer. i thinking of using keyboard hook , mouse position monitor changes every lets 5 seconds. on every change reset counter. is there better way? (for example reading screensaver countdown or that) you can p/invoke winapi's getlastinputinfo() function able millisecond count @ point last input received since computer started . subtracting environment.tickcount above give how many milliseconds have lapsed since last input received: <dllimport("user32.dll")> _ public shared function getlastinputinfo(byref plii lastinputinfo) boolean end function <structlayout(layoutkind.sequential)> _ public structure lastinputinfo <marshalas(unmanagedtype.u4)> _ public cbsize integer <marshalas(unmanagedtype.u4)

javascript - AngularJS - jQuery not called while using jCrop -

scripts , css <link rel="stylesheet" href="http://jcrop-cdn.tapmodo.com/v2.0.0-rc1/css/jcrop.min.css" /> <script src="assets/plugins/jquery/jquery-2.1.4.min.js"></script> <script src="assets/js/jcrop2.0.min.js"></script> <script src="assets/js/jcrop_main.js" type="text/javascript"></script> <script src="assets/css/bootstrap/js/bootstrap.min.js"></script> <script src="assets/js/lib/angular/1.5.5/angular.js"></script> html <div class="jcrop_example"> <img src="assets/img/floor.jpg" id="cropbox1" /> <div style="margin:5px;"> <label>x1 <input type="text" name="x" id="x" size="4"/></label> <label>y1 <input type="text" name="y" id="y" size="4&quo

javascript - node.js Nodemailer array of objects to CSV file as attachment in email -

i'm sending email in node.js using nodemailer module. have array of objects i'm trying turn csv file , attach email. able send email, csv attachment doesn't populate correctly (showing blank). code looks similar following var nodemailer = require('nodemailer'); // create reusable transporter object using smtp transport var transporter = nodemailer.createtransport({ service: 'gmail', auth: { user: 'gmail.user@gmail.com', pass: 'userpass' } }); var data = [{age:24,name:"bob"},{age:35,name:"andy"},...]; var mailoptions = { from: 'foo@blurdybloop.com', // sender address to: 'bar@blurdybloop.com', //receiver subject: 'hello', // subject line text: 'hello world', // plaintext body html: '<b>hello world</b>', // html body attachments: [ { filename: 'test.csv', content: data

javascript - Autoit Script for populating username and password and submit by validating them automatically -

i don't have idea autoit scripting, have 1 autoit script run automatically clicking 1 button in tool. 1 webpage opened , need enter username , password , submitting login account. here have task automate process of entering username , password , clicking submit button. need read credentials tool , end process automatically. i successful in reading credentials tool facing issue in auto submitting form. now when webpage opening username , password populating automatically, please me click on submit button automatically validating username , password field in autoit scripting. below code have. please suggest syntax aut submitting form validating username , password fields. ; ------------------ ; handle login here! ; change_me ; ------------------ local $o_form = _ieformgetobjbyname ($oie, "logindata") local $o_user = _ieformelementgetobjbyname ($o_form, "j_username") ;send("{tab}") local $o_password = _ieformelementgetobjbyname ($o_form,

html - Dynamic tab navigation system using Angular 2 -

i want create dynamic tabs navigation system using angular 2. basically want first display single tab contains single component, containing clickable objects (like links, buttons...). i click on 1 of links adds new tab, , click on each tab (the initial 1 , newly created tab) displays corresponding component in display zone (router-outlet) below. this i've tried far: app.component.ts (root component , "tabs container): import { component, oninit } '@angular/core'; import { tabcomponent } './tab/tab.component'; import { firstcomponent } './test/first.component'; import { secondcomponent } './test/second.component'; import { thirdcomponent } './test/third.component'; import { router_directives } '@angular/router'; @component({ selector: 'my-app', templateurl: './app/app.component.html', directives: [tabcomponent, router_directives, firstcomponent, secondcomponent, thirdcomponent],

html - Images not able to view in JSP page -

Image
i trying images in jsp page, have put images in 'webcontent/images/bp.jpg'.but while running showing icon image not exact image. below code: <a href="productdetails.jsp"><img src="/application/webcontent/image/chrysanthemum.jpg" height="60" width="60"></a> error is: <img src="images/bp.jpg"> this show image original image size. if want set height,width can use per size dimensions. now should work

scala - Where is my compiled coffee script js file? -

i have play 2.5.x app , created file in following folder: /app/assets/javascript/test.coffee in master.scala.html have: <script src="@routes.assets.versioned("javascripts/test.js")" type="text/javascript"></script> my plugins.sbt has: // web plugins addsbtplugin("com.typesafe.sbt" % "sbt-coffeescript" % "1.0.0") addsbtplugin("com.typesafe.sbt" % "sbt-less" % "1.1.0") addsbtplugin("com.typesafe.sbt" % "sbt-jshint" % "1.0.3") addsbtplugin("com.typesafe.sbt" % "sbt-rjs" % "1.0.7") addsbtplugin("com.typesafe.sbt" % "sbt-digest" % "1.1.0") addsbtplugin("com.typesafe.sbt" % "sbt-mocha" % "1.1.0") addsbtplugin("org.irundaia.sbt" % "sbt-sassify" % "1.4.2") when run app doesn't create file in /public/javascript/test.js

ios - How to display a timer in different UIViewControllers in Swift? -

i display timer (minutes , seconds) in different viewcontrollers of application. how can ? i thinking use timer singleton, how update right label every seconds ? the easiest way - use nsnotificationcenter singleton or can create array delegates , call method when timer update, viewcontrollers in array receive messages

scala - Getting the last segment of path in case of using OR condition -

i new spray framework, have 2 routes have similar functionality , last segment changes. have combined using ‘|’ operator. how can know last segment selected. path("users" / segment / "viewers_count") { userid => } path("users" / segment / "views_count") { userid => } i have combined using path("users" / segment / ("viewers_count" | "views_count")) { userid => //here want know if viewers_count or views_count // based on want pass "viewers" or "views" module } how can achieve this. it's quite simple. can extract map. path("users" / segment / map("viewers_count" -> "viewers", "views_count" -> "views")) { (userid, selected) => // here selected variable contain viewers or views based on path. }

apache - Error message "Forbidden You don't have permission to access / on this server" -

i have configured apache myself , have tried load phpmyadmin on virtual host, received: 403 forbidden don't have permission access / on server my httpd.conf # # main apache http server configuration file. contains # configuration directives give server instructions. # see <url:http://httpd.apache.org/docs/2.2> detailed information. # in particular, see # <url:http://httpd.apache.org/docs/2.2/mod/directives.html> # discussion of each configuration directive. # # not read instructions in here without understanding # do. they're here hints or reminders. if unsure # consult online docs. have been warned. # # configuration , logfile names: if filenames specify many # of server's control files begin "/" (or "drive:/" win32), # server use explicit path. if filenames *not* begin # "/", value of serverroot prepended -- "logs/foo.log" # serverroot set "c:/program files (x86)/apache software foundation/ap

java - How do I filter with more than one letter in primefaces selectonemenu? -

i using primefaces selectonemenu. user request me have option type more 1 letter have filtering, works on 1 letter. possible?? have extracted code of selectonemenu on xhtml file. hope helps. help: <p:selectonemenu required="true" requiredmessage="#{esmessage['warn.esttc3s5.coursetype']}" id="ddcoursetype" value="#{dtwebvoesttc3s4.coursetypeid}" height="300" style="width:421px" onchange="sublistupdate();" effect="fade"> <p:ajax listener="#{dtselectedcoursetitlevo.filterlist(dtwebvoesttc3s4.coursetypeid, dtcoursetitlevo)}" update="ddcoursetitle" /> <f:selectitem itemlabel="#{eslabel['lbl.esttc3s4.lblselectcoursetype']}" itemvalue="" noselectionoption="true" /> <f:selectitems value="#{dtcoursetypevo.coursetypelist}" var="coursetype" itemlabel="#{language.localestring eq 'zh'?

Is it possible to generate vcards 2.1 that get arroung the Thunderbird linebreaks bug? -

without breaking compatibility of spec-compliant softwares of course! the link bug: https://bugzilla.mozilla.org/show_bug.cgi?id=589332 in fields encoded quoted printable, thunderbird add space on each line-break. try adding 1 whitespace character (a space or tab) beginning of each folded line. supposed each folded line, according vcard version 2.1 specification. maybe thunderbird assuming first character of each line whitespace, ignores (whether it's actually whitespace or not) begin:vcard version:2.1 n;language=en-nz:lastname;firstname fn:firstname lastname note;encoding=quoted-printable:=0d=0a= d.o.b. 13.12.41 =0d=0a= =0d=0a= 24.10.05 rang , had lovely chat. sending 1 of new sheet= s piccies on.she getting new wig wanting wait = new products , running. e-mail once these ar= e sorted. end:vcard

Navigating through different activities in Android -

hey people know how check if activity current activity has been opened from. small uncomplicated example: i have 3 activities b c and have textview in b when open activity b a, want text view display hello when open in c goodbye. if possible please assist nb beginner in android in advance for b: startactivity(new intent(a.this,b.class).putextra("value","hello"); in b.java values by: string value=getintent().getstringextra("value"); c b: startactivity(new intent(c.this,b.class).putextra("value","goodbye"); in b.java values by: string value=getintent().getstringextra("value");

python 3.x - sorting a dataframe by index -

i have dataframe called df indexed date trying sort oldest date newest. i have tried use both: df = df.sort(axis=1) and df = df.sort_index(axis=1) but can see date order in following df tail dates have not been sorted date order. wood_density date 2016-01-27 5.8821 2016-01-28 5.7760 2015-12-25 nan 2016-01-01 nan 2015-12-26 nan could offer assistance please? many thanks use sort_index sort index: in [19]: df = df.sort_index() df out[19]: wood_density date 2015-12-25 nan 2015-12-26 nan 2016-01-01 nan 2016-01-27 5.8821 2016-01-28 5.7760 sort , deprecated sort_values or sort_index sorts on row labels default axis=0 would've worked if didn't pass this: in [21]: df.sort(

java - Wsdl not showing up in WAS 8.5 server -

while migrating our application jdk 1.6 1.7 . took different approach generate wsdl using maven (execute wsgen calling bat file). after generating wsdl trying deploy on server 8.5 . found wsdl not showing in "web services properties" under admin console. while investigating comparing log built in jdk 1.6, realize below details not present in latest build (with jdk 1.7) there in previous version of log. ***log**** 000000e7 wasaxis2exten wsws7037i: /web-services/entityisdsearchservice url pattern configured entityisdsearchservice servlet located in mrds-web-2.14.2.war web module . hence server 8.5 unable detect generated wsdl present in war above details not showing in latest deployment. please guide if 1 ever encounter such issue while running application in 8.5 wsdl compiled in jdk 1.7. also highlight while comparing wsdl of version 1.6 1.7 there difference : in jdk 1.6: <input message="tns:findclientbygrid"/> changes <input wsam:ac

How to add a timeout step to Jenkins Pipeline -

when using free style project can set after 20 minutes build aborted if not concluded. how possible jenkins multi branch pipeline project? you can use timeout step: timeout(20) { node { sh 'foo' } } if need different timeunit minutes , can supply unit argument: timeout(time: 20, unit: 'seconds') {

php - how to save variable as array into database -

how can save array database string col1 | col2 ------------------- 1 | array(1,2) ------------------- 2 | array(6,9) all value in array related together use serialize() , unserialize() http://php.net/manual/en/function.serialize.php http://php.net/manual/en/function.unserialize.php your data this: a:2:{i:0;i:1;i:1;i:2;}

javascript - Why am I getting an uncaught type error when using map in React JS jsx? -

i'm creating component selecting input based on available options in courses object. i'm getting error: uncaught typeerror: cannot read property 'map' of undefined here code: const selectinput = ({name, label, onchange, defaultoption, value, error, options}) => { return ( <div classname="form-group"> <label htmlfor={name}>{label}</label> <div classname="field"> {/* note, value set here rather on option - docs*/} <select name={name} value={value} onchange={onchange} classname="form-control"> <option value="">{defaultoption}</option> {options.map((option) => { return <option key={option.value} value={option.value}>{option.text}</option>; })} </select> {error && <div classname=&quo

xml - Why do i get no formatted result (csv) with my xsl? -

how can give output correct format? missing in xslt? @ example below. thank in advance help. xml: <?xml version="1.0" encoding="utf-8"?> <fed xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"> <poi> <id>56241</id> <poi_contact> <categoryid>museum</categoryid> <name>centre pompidou</name> </poi_contact> </poi> <poi> <id>141670</id> <poi_contact> <categoryid>museum</categoryid> <name>espace culturel saint-exupéry</name> </poi_contact> </poi> <poi> <id>56242</id> <poi_contact> <categoryid>museum</categoryid> <name>musée du louvre</name> </poi_contact> </poi> </fed> xsl: <?xml version="1.0" encoding="utf-8"

php - facebook page plugin increase max width -

is possible in first place increase max-width of page plugin? https://developers.facebook.com/docs/plugins/page-plugin i need show 5 latest posts in website. best way this. dont mind working json format data. i have tried changing data-width parameter , adding width in css , inline width. no luck. sandy seeds i think wobt able go above 500 facebook sets. you linking towards plugin , decided set max-widht 500

How to find a variable address under Linux -

apologize can not post code because don't have code :( problem : 1) i've bin file (obtained source.c) 2) bin file above runs without problem in linux os 3) know in bin file there variable(the name var1) 4) need implement new bin file able found var1 address in first bin file using name of variable. i've tryed generete assembly file source.c found start point, ... :(

java - Android - Fill string array with urls -

i have url "yyyyyyy.com/test.txt", text file. contains urls of .mp3 audios. yyyyyyy.de/1.mp3 yyyyyyy.de/2.mp3 yyyyyyy.de/3.mp3 //exactly my intention read each line of text file , store in array urls[0]=yyyyyyy.de/1.mp3 urls[1]=yyyyyyy.de/2.mp3 ... this. string[] urls; int i=0; random rand; int min=0; int max=5; // have 6 urls in text file int randomnum; @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); rand = new random(); randomnum = rand.nextint((max - min) + 1) + min; //generates integer between 0-5 try { // create url desired page url url = new url("yyyyy.de/test.txt"); //my text file location // read text returned server bufferedreader in = new bufferedreader(new inputstreamreader(url.openstream())); string str; while ((str = in.readline()) != null) { urls[i]=str;

css - Center background image with header -

i have jsfiddle here - https://jsfiddle.net/ow1x3e0a/14/ simple css problem. i have header need have image on side of. can background image. when window smaller need center text , image appears in center on left. at moment text centers image stays on left i have tried without text-align can't center margin: auto: .container{ margin-top: 50px; } .header{ font-size: 20px; padding-left: 110px; background-image: url(http://placehold.it/100x50); background-repeat: no-repeat; } @media screen , (max-width:767px){ .header{ text-align: center; } } when giving background, need use: background-position: center center; the text-align: center or margin: auto contents, not background.

javascript - how to select same select option in the next page -

Image
i have select tag in home page, if selected option in select tag , moved on page(second page) same option selected in home page should selected in select tag of second page <div> <div class="col-md-3 " ng-hide="ishidden" style="padding-top:10px;" ng-init="childorganization()"> <select class="form-control custom-form-control" ng-model="child" ng-options="organization.organizationname organization in childorganization track organization.organizationid" ng-change = "childorganizationid(child)"> <option value="" selected="selected">{{organizationname}}</option> </select> </div> </div> for getting option selected don't need use - <option value="" selected="selected">{{organizationname}}</option> you can assign $scope.child = 

How to write unit tests in plain C? -

i've started dig glib documentation , discovered offers unit testing framework. but how unit tests in procedural language? or require program oo in c? unit testing requires "cut-planes" or boundaries @ testing can done. quite straightforward test c functions not call other functions, or call other functions tested. examples of functions perform calculations or logic operations, , functional in nature. functional in sense same input results in same output. testing these functions can have huge benefit, though small part of thought of unit testing. more sophisticated testing, such use of mocks or stubs possible, not easy in more dynamic languages, or object oriented languages such c++. 1 way approach use #defines. 1 example of this article, unit testing opengl applications , shows how mock out opengl calls. allows test valid sequences of opengl calls made. another option take advantage of weak symbols. example, mpi api functions weak symbols, if

linux - Perl script not found when on a shared mounted hard drive located on a Windows computer -

i'm working on linux mint 17.1 rebecca 64 bits. i have simple perl script named test.pl : #!/usr/bin/perl print "hello\n" ; permissions -rwxr-xr-x my path variable : /mnt/users/user1/:/home/mylogin/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games when script in user bin directory /home/mylogin/bin, can launch outside bin directory simple : test.pl the command : which test.pl return /home/mylogin/bin/test.pl that seems ok. on linux mount shared windows hard drive located somewhere on local network. if move script windows mounted hard drive on /mnt/users/user1/ can't run anymore if /mnt/users/user1/ in $path variable. system answers "command not found". if go directory cd command, can't launch script simple : test.pl the error "command not found". if try : ./test.pl the error "permission denied" if try : perl test.pl it works perfectly... what's

html - How to make strip td in css? -

how make strip td different background-color using css? .backgroundi:nth-of-type(2n) { background-color: #3366cc; height: 60px; width: 60px; } .backgroundi:nth-of-type(n+1) { background-color: #775577; height: 60px; width: 60px; } <tr ng-repeat="comment in post.comments"> <td> <div class="backgroundi"></div> </td> <td> <div class="c" style="margin-left:15px; margin-top:25px">hello</div> </td> </tr> plunker first, dont know code complete or not need add <table> </table> tag , put code code inside tag. here code sample you. tr:nth-child(even) {background: #ffb3b3} tr:nth-child(odd) {background: #e2e2e2} <table> <tr ng-repeat="comment in post.comments" > <td ><div class="backgroundi">background</div></td> <td><div class="

sql server - SQL - Getting TOP value per attribute in results set -

i have scenario following query: select purchasing.supplier, purchasingparts.part, purchasingparts.description, purchasingparts.costperunit, purchasingparts.purchaseordernum, purchasingparts.itemnum purchasingparts inner join purchasing on purchasingparts.purchaseordernum = purchasing.purchaseordernum supplier = 'sup1' order purchasingparts.purchaseordernum desc returns following results: supplier part description costperunit purchaseordernum itemnum sup1 cm-14b null 9.99 37163 1 sup1 cm-13 jkljlkjlk 9.99 37160 1 sup1 cm-13 jkljlkjlk null 37158 1 however, filter set of results, recent order (i.e. highest purchaseordernum) per part (acting on part attribute) shown. in case, final results be: supplier part description costperunit purchaseordernum itemnum sup1 cm-14b null 9.99 37163 1 sup1 cm-13 jkljlkjlk

.htaccess - Htaccess rewriting to root folder with parameters from sub directory -

i having parameters in url. https://www.example.com/subdirectory/reset-password/123/123 i want https://www.example.com/reset-password/123/123 where first 123 first parameter , second parameter 123 i making rule below link: want be https://www.example.com/subdirectory/reset-password?p=123&q=123 to i want `https://www.example.com/reset-password/123/123` i using following link reference hide folder name particular url using .htaccess use this: rewriteengine on rewriterule ^reset-password/([^/]*)/([^/]*)$ /subdirectory/reset-password?p=$1&q=$2 [l] it give following url: https://www.example.com/reset-password/123/123

java - How to loop map in jsp page -

i have div shown below,in inside 1 div have loop many divs, loop divs have use map or list of map repeat divs putting foreach loop. here having 5 different ids , 5 different class names.should put in map or list of map. i using <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> how please me on new java. <div id="idname" class="class"> --need loop div <div id=" " class=" "> <div class=" "> <h3>value1</h3> </div> </div> -- till here </div> check this url, there tutorial foreach in jstl

c# - Xamarin forms change SwichCell Text Color -

is possible change text color of xamarins swichcell ? at moment text in swichcell colored gray, , want change black. my xaml looks this: .. <tableview intent="data" > <tableroot>; <tablesection> <switchcell text="allow push notifications"/> </tablesection> <tablesection> <viewcell> <viewcell.view> <button grid.column="1" text="log out" clicked="logoutbuttonclick" margin="-20,-20,-20,-20"/> </viewcell.view> </viewcell> </tablesection> <tablesection> <textcell text="android version 1.2.1" textcolor="black"/> </tablesection> </tableroot> </tableview> the thing regarding found here example ios , other provided solutions uses textcell , swich combinat

ios - Can not login in iTune store for sandbox testing -

Image
as per apple guide line have create users in itune connect per screen shot sandbox testing test in app purchase when have try login. got below error " itune account creation not allowed ". please check both screenshot.

Using C functions in Swift that take functions as arguments -

i'm writing wrapper around c mathematical library. every function takes 1 or 2 functions arguments. however, arguments child functions (as parent functions) not swifty -hence wrapper. i've cleaned example code show 3 main pieces: c-library function, desired swift function passed wrapper (body not shown, wrapping around c-library function), , required c function form. //c library function, calls passed function dozens, hundreds or thousands of times, each time changes data provided in p, , uses output x //the swift arrays passed pointers, , length of , x array m , n respectively returnvalue = clibraryfunc(passedfunc, &p, &x, int32(m), int32(n), int32(itmax), &opts, &info, &work, &covar, &adata) //i create swift function (internals myriad of things takes inputs p , adata , returns data in x: func desiredswifty(p: inout [double], x: inout [double], m: int, n: int, adata: inout [double]) { //very simple example //this example knows leng

c++ - Operator overloading, name resolution and namespaces -

i light shed on puzzling situation involving adl, namespaces , operator overloading. let foo library defines class ( deriv ) in own namespace, along templated operator * returns class. namespace foo { class deriv {}; class {}; template <typename t> operator* ( t x, const deriv& d ) { return another();} } now use foo's class in own library bar, defines operator * , time float . namespace bar { typedef foo::deriv myderiv; myderiv operator* (float x, const myderiv& d) { return myderiv();} } i observe difference in compiler behaviour depending whether 1 inside namespace bar or not. this function ( bar::f1 ) compiles, using second version of operator * : namespace bar { void f1() { bar::myderiv a; bar::myderiv b = 3.f * a; } } while same function outside namespace bar ( f2() ) fails compile, because compiler attempts use foo::operator* , cannot guess must use bar::operator* . void f2() { bar:

java - Hashalgorithm and hashencoding -

i using build in jboss login-module . has encode user entered password , compare encrypted password in db . <module-option name="hashalgorithm" value="md5"/> <module-option name="hashencoding" value="base64"/> for storing password in db use following line newuser.setpassword(datatypeconverter.printbase64binary(purepassword.getbytes("utf-8"))); when debug application appears: encrypted password db = mtizndu2nzg= encrypted password user login = jdva0ooqqar0zmdtctwhrq== questions : what happening? when jboss use base64 algorithm , when md5 what difference between hashalgorithm , hashencoding ? what happening? when jboss use base64 algorithm , when md5 md5 hash algorithm , base64 output character encoding. a character encoding defines characters correspond byte or series of bytes. md5 cryptographic hash algorithm produces 16-byte output of 8-bit bytes, not characters. not 8-bit byt

Do we have to open excel file EVERYTIME we write in it with Python? -

i have write on excel file using python. use win32com it. i want open first stuff write in file more stuff , write again in file. but if don't open file everytime before writing, have error message: pywintypes.com_error: (-2146827864, 'ole error 0x800a01a8', none, none) here code : connection = pypyodbc.connect('driver={sql server};' 'server=srvaktct-sql\tctsql;' 'database=k;' 'uid=y;pwd=x') cursor = connection.cursor() log, ta in zip(listeid,listeta): nomta=ta[0] equipe=ta[1] if log: #doing stuff results = temps_log=results[0] print(temps_log) if temps_log not none: temps_log=str(datetime.timedelta(seconds=int(temps_log))) excel = win32.gencache.ensuredispatch('excel.application') wb = excel.workbooks.open('//srvaktct-bur02/copie de vide.xlsx') ws=wb.worksheets(date_onglet)

php - Setting up Laravel 5.2.39 with AngularJS 2 RC 3 -

please bear me new laravel , angular 2, , have 5 days trying set laravel 5.2.39 angular 2 rc 3. getting "laravel 5" , "loading..." my package.json { "name": "ang", "version": "1.0.0", "scripts": { "start": "tsc && concurrently \"npm run tsc:w\" \"npm run lite\" ", "lite": "lite-server", "postinstall": "typings install", "tsc": "tsc", "tsc:w": "tsc -w", "typings": "typings" }, "license": "isc", "dependencies": { "@angular/common": "2.0.0-rc.3", "@angular/compiler": "2.0.0-rc.3", "@angular/core": "2.0.0-rc.3", "@angular/forms": "0.1.1", "@angular/http": "2.0.0-rc.3", "@a

RavenDb in ram and 404 Not found errors -

i'm tring use full in-memory ravendb (version 2.5.2996) run integration tests. started ravendb server using following command: raven.server.exe --ram --debug the server started correctly. integration tests stuck , lot of errors in ravendb debug console: request #143: - o ms - <database name> - 404 - /indexes/raven/documentbyentityname?definition=yes using normal ravendb instance (not in memory), integration tests pass. tried search in ravendb documentation clues didn't find anything. can me understand why not working? the --ram options system database, need specify each db running in memory setting raven/runinmemory = true when create db.

objective c - How to find the pixel position from live camera preview using AVCapture preview layer in ios? -

i doing sample application pixel color live camera preview here code let session = avcapturesession() session.sessionpreset = avcapturesessionpresetmedium let capturevideopreviewlayer = avcapturevideopreviewlayer(session: session) capturevideopreviewlayer.videogravity = avlayervideogravityresizeaspectfill capturevideopreviewlayer.bounds = previewview.layer.bounds; capturevideopreviewlayer.position = cgpointmake(cgrectgetmidx(previewview.layer.bounds), cgrectgetmidy(previewview.layer.bounds)) self.previewview.layer.addsublayer(capturevideopreviewlayer) let device = avcapturedevice.defaultdevicewithmediatype(avmediatypevideo) { input = try avcapturedeviceinput(device: device) }catch { print("input nil") input = nil } output = avcapturevideodataoutput() var myqueue = dispatch_queue_create("myqueue", nil) if input != nil { session.addinput(input!) } if output != nil {