Posts

Showing posts from April, 2013

google maps - How to know point for marker if know start and end position, start time and speed? -

how know point marker if know start , end position, start time , speed? start possition sl_lat:"18.8782296", sl_long:"79.4623518", finish possition fl_lat:"28.5748740", fl_long:"77.2558594", speed: 10km/h, start time: 10:00am, time is: 15:00h how know object on map?

php - Cron Job gives an error msg for arguments -

i using phplist on hostgator , trying setup cron job send campaign automatically. i have created cron job may gives error: /opt/php55/lib/php -q/home4/username/public_html/domain.com/admin/index.php -p=processqueue -c/home4/username/public_html/domain.com/config/config.php but it's give error msg: /bin/sh: /opt/php55/lib/php: directory how can make workable? thanks , hope solution soon.

php - Combining array values in pairs without pairing with previous elements in array -

i'm having trouble combining array values. have tried combine them , make pairs have done want erase pairs not want. please 1 me happen . // code have is: $inputarray = array('mussafiri', 'fire', 'ubungo', 'mbezi'); $outputarray = array(); $i = 0; foreach($inputarray $values) { $j = 0; foreach($inputarray $values2) { if($values != $values2){ $outputarray[] = array($values => $values2); } $j++; } $i++; } print_r($outputarray); //output array is: array ( [0] => array ( [mussafiri] => fire) [1] => array ( [mussafiri] => ubungo) [2] => array ( [mussafiri] => mbezi) [3] => array ( [fire] => mussafiri) [4] => array ( [fire] => ubungo) [5] => array ( [fire] => mbezi) [6] => array ( [ubungo] =&g

android - Position FloatingActionButton programmatically in center of CoordinatorLayout -

there coordinatorlayout : <android.support.design.widget.coordinatorlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/cl_root" android:layout_width="match_parent" android:layout_height="match_parent"> </android.support.design.widget.coordinatorlayout> question: how 1 create , position programmatically floatingactionbutton in center of screen? important: : floatingactionbutton created programmatically only (no need post answers define in xml file). floatingactionbutton fab = (floatingactionbutton) findviewbyid(r.id.fab); coordinatorlayout.layoutparams lp = (coordinatorlayout.layoutparams) fab.getlayoutparams(); lp.anchorgravity = gravity.center // or can add gravity.center_vertical | gravity.center_horizontal fab.setlayoutparams(lp);

Accessing non tree structured xml data in python -

i have several xml files want parse in python. aware of elementtree package in python, xml files aren't stored in tree structure. below example <tag1 attribute1="at1" attribute2="at2">my files text annotated tool create these xml files.</tag1> parts of text enclosed in xml tag, whereas others not. <tag1 attribute1="at1" attribute2="at2"><tag2 attribute3="at3" attribute4="at4">some enclosed in multiple tags.</tag1></tag2> , have overlapping tags: <tag1 attribute1="at1" attribute2="at2">this example sentence <tag3 attribute5="at5">containing nested example sentence</tag3></tag1> whenever use elementtree function parse file, can access first tag. looking way parse tags , don't want tree structure. appreciated. if have 1 xml fragment per line, parse each line individually. for line in some_file: # parse using

cordova - Ionic 2 social sharing throws cordova_not_available error -

i using ionic 2 framework, i'm trying work social-sharing plugin. in process throws cordova_not_available error. below typescript code: import { component } '@angular/core'; import { navcontroller, navparams } 'ionic-angular'; import { socialsharing } '@ionic-native/social-sharing'; @component({ selector: 'page-view-awareness', templateurl: 'view-awareness.html' }) export class viewawarenesspage { public email : any; constructor(public navctrl: navcontroller, public navparams: navparams, public socialsharing : socialsharing) {} ionviewdidload() { console.log('ionviewdidload viewawarenesspage'); } shareviatwitter(){ this.email = 'sekhar.technodrive@gmail.com'; this.socialsharing.shareviaemail('body', 'subject', this.email).then(() => { alert("success"); }).catch((data

c - how does this memcpy code works -

hi came across simple c programm cant understand how code works: #include <string.h> #include <stdio.h> char *a = "\0hey\0\0"; /* 6 */ char *b = "word\0up yo"; /* 10 */ char *c = "\0\0\0\0"; /* 4 */ int main(void) { char z[20]; char *zp = z; memcpy(zp, a, strlen(a)+1); memcpy(zp, b, strlen(b)+1); memcpy(zp, c, strlen(c)+1); /* z contains 20 bytes, including 8 nulls */ int i; for(i = 0; < 20; i++){ if (z[i] == 0){ printf("\\0"); } printf("%c", z[i]);} return 0; } i expecting printing z output : \0hey\0\0\0word\0up yo\0\0\0 but instead im getting : \0ord\0\0\0\0\0\0\0\0\0\0\0\0???z finally , when print instead of z right output. can explain me why happens ? in advance. edit: how concatenate such strings? strings in c zero-terminated; functions in standard c library assume property. in particular, function strlen returns numbe

go - Channel slice of integers -

i want create slice channel , contains integers. test := make(chan []int) test <- 5 this way initialized have no idea how pass value since slices use append channels send data using <- i have tried both <- , append , both combined below , can't work test <- append(test, 5) you defined channel of []int trying send int . have send slice of ints , have receiver use slice. a working example here: https://play.golang.org/p/tmcuku8g-1 notice i'm appending 4 things slice , not channel itself package main import ( "fmt" ) func main() { c := make(chan []int) things := []int{1, 2, 3} go func() { c <- things }() _, := range <-c { fmt.println(i) } go func() { c <- append(things, 4) }() _, := range <-c { fmt.println(i) } } output: 1 2 3 1 2 3 4

BitPay c# SDK Error : Unauthorized sin -

i implementing bitpay api using c# sdk. i doing according csharp-bitpay-client , bitpay c# client library configuration unfortunately not achieving this. every time stuck at: bitpay bitpay = new bitpay(); i tried: eckey key = keyutils.createeckey(); this.bitpay = new bitpay(key); but key generates again stuck here: this.bitpay = new bitpay(key); every time getting message bitpay server: {"error":"unauthorized sin"} any 1 have idea it? and not seeing public key on dashboard. 1 know why public key not showing. thanks

java - How to display many text input fields in libgdx at a random position on the main window? -

Image
i want display many text input fields libgdx (like example name, surname, email) user has input info. i've tried following https://github.com/libgdx/libgdx/wiki/simple-text-input it's not best option in case both because want included in main window instead of opening new little 1 , because displays 1 text input field. want able make fields appear @ random position on main window. you can use scene2d widget requirement, create label , textfield , add stage. can use table arrangement of actors. public class splash extends game { private stage stage; @override public void create() { extendviewport extendviewport=new extendviewport(700,1200,new orthographiccamera()); stage=new stage(extendviewport); skin skin=new skin(gdx.files.internal("skin/uiskin.json")); skin.get("font-label", bitmapfont.class).getregion().gettexture().setfilter(texture.texturefilter.linear, texture.texturefilter.linear);

primefaces - How can I not send form when press button inside form? -

i have primefaces form <h:form id="profilegridform"> <h:panelgroup> <p:inplace id="myid" editor="#{bean.changelangenabled}"> <h:selectonemenu value="#{bean.changedbillinglanguage}"> ... </h:selectonemenu> </p:inplace> </h:panelgroup> <h:panelgroup> <p:commandbutton value="model" update="modelform" action="#{modelbean.clear}" ajax="true" oncomplete="pf('showmodel').show()"/> </h:panelgroup> </h:form> when press model button call changedbillinglanguage method. how can not send form when press button inside form?

php - INSERT value from another table and variable -

i wondering if possible insert table (which have managed do) whilst inserting value of variable current php file? i aiming user id table, have gotten selecting email user input. need insert hash automatically created via variable. this current code gets correct id users table. $forgot = $pdo->prepare(" insert forgot ( user_id ) select id users email = :email "); now need insert value of :hash too. would need done separate query? thanks. try following: insert forgot ( user_id, hash ) select id, :hash users email = :email

php - Use of aliases to shorten Class namespace -

i have class defined in namespace long name. call writing full name of namespace: use super\long\name\of\namespace\myclass; $obj = new myclass; how can shorten long name of namespace? i tried following: use super\long\name\of\namespace short; use short\myclass; $obj = new myclass; but myclass not found anymore.

java - Numeric Query in Luwak Stored Query Engine (query format similar to lucene) -

i using luwak - stored query engine flax ( https://github.com/flaxsearch/luwak ). i started couple of queries title:first , title:first , document:text12 etc. similar lucene queries. but when came number got stuck. tried couple of things number range query still didn't working. my document looks (json): { "title": "this text first indexed", "document":"this first document. have test text best , check use case , or not etc can come in between , nested boolean expression have check" "upvotes": 1 } and queries wanted check are: title contains word text (was able do) title contains word text , document contains word first (was able do) title does not contains word dasds , document does not contains word firsdadsast (was not able do) upvotes greater than 10 (was not able do) upvotes equals 10 (was not able do) and queries title starts with the etc. (was

php - Warning: Invalid argument supplied for foreach() but $data is an array -

i working form , encountered problem. don't understand, why "invalid argument supplied foreach()" occurs because $data array. think bad in foreach loop. it's code: $data = array( 'cityc' => $_post['cityc'], 'month' => $_post['month'], 'year' => $_post['year'] ); echo 'in ' . $data['cityc'] . ' in month of ' . $data['month'] . ' ' . $data['year'] . ', observed following weather:<br /><ul>'; $weatherx = $_post['weather']; foreach ($weatherx $key => $valuex) { foreach ($weatherx $value) { echo '<li>' . $value . '</li>'; } } echo '</ul>'; echo '<form action="" method="post"> <p>Įvertinkite mėnes

javascript - Configure angular-fullstack app for local network access -

i made first angular app yeoman angular-fullstack generator. , want other people can access app using local network ip. access via localhost works great me access via local ip error "uncaught syntaxerror: unexpected token <" in vendor.bundle.js , app.bundle.js , polyfills.bundle.js when click on error in browser console index.html in client directory of app instead compiled js server listen on 3000 port. can provide additional information if needed. suggestion how fix it?

rest - Exception in thread "AWT-EventQueue-0" java.lang.NoSuchFieldError: DEF_CONTENT_CHARSET -

i trying call login api java swing desktop application (implemented on jersey web app) user id , password in header using code below. string authstring = username + ":" + password; string authstringenc = new base64encoder().encode(authstring.getbytes()); system.out.println("base64 encoded auth string: " + authstringenc); defaulthttpclient httpclient = new defaulthttpclient(); httpget getrequest = new httpget(fvconstants.loginapi); getrequest.addheader("authorization", "basic " + authstringenc); httpresponse response = null; try { response = httpclient.execute(getrequest); if (response.getstatusline().getstatuscode() != 200) { throw new runtimeexception("failed : http error code : " + response.getstatusline().getstatuscode()); } bufferedreader br = new bufferedreader(new inputstreamreader((response.getentity().getcontent()))); string output; system.out.println("

javascript - unable to submit form data using ajax? -

Image
i new php , have no idea of javascript, have done js work using tutorials.also tried use existing solutions stackoverflow, no success ! what trying trying update database values using 'submit' button on basis of values called 'select option'. problem no data getting updated in db after click on submit button (on viewtest.php) , have tried add 'update.php' form action. here's screenshot of viewtest.php here's code: viewtest.php <form method="post" action=""> <table border="1px"><tr> <td> <select required name="tstname" id="test" onchange="fetch_ques()"> <option> select test name</option> <?php $res=mysqli_query($connection,"select * test_detail"); while($row=mysqli_fetch_array($res)) { ?> <option value="<?php echo $row["test_name"]; ?>"> <?php echo $row["test_name&qu

c - How to interpret PTRACE_PEEKTEXT return value -

i've been working on recode of mini strace program without using ptrace_syscall in order familiar registers. so in code after using ptrace(ptrace_getregs, ...) set user_reg_struct field, i'm using ptrace(ptrace_peekdata, ...) read it. not knowing retur of function use it's data (syscalls etc...), started looking @ code , came across things like: int is_a_syscall() { struct user_reg_struct regs; unsigned short int ret; ret = ptrace(ptrace_peekdata, pid, regs.rip, 0); if (ret == 0xffff) { perror("failed") exit(1); } if (ret == 0x80cd || ret == 0x50f) return (true); return (false); } now can explain me numbers in if() statement, a.k.a: 0xffff , assume has architecture of processor couldn't verify it 0x80cd , 0x50f i wish know are, can find them, can interpret them , how can use them system calls , arguments. the code included unconventional, i'll explain , show different way it. unsigned short int ret; ret = ptrace(p

java - Dont know why I am getting a NullPointerException -

this question has answer here: what nullpointerexception, , how fix it? 12 answers i have inputted data array c_pid[] database. i'm trying run loop. if the value array not null loop should carry on. seems run fine. getting desired output. 1 problem have reason showning me nullpointer exception. i have provided code screenshot down below. enter image description here i trying run loop while(!c_pid[cnt].equals(null)){ after im getting java.lang.nullpointerexception error <%@page import="storage.data"%> <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <% string[] c_pid = new string[100000]; string c = "", pna = "", pty = "", ppr = "", stock = "", imgpath = ""; //string mylist = new string[10]; int = 0, d = 0;

html - Why does a child div's box shadow sometimes jump to the parent div? -

i'm trying animate box shadow transition aid of css pseudo-elements :before , :after . in principle, code provided in jsfiddle works fine, except on mousing out of subdiv in lefthand column, box shadow jumps leftparentdiv . behavior occurs whenever window window small enough overflow-y: scroll kicks in. problem seems occur in browsers support box shadows. i guess i'm missing obvious here, can't figure out what. body { background-color: pink; } .subdiv { width: 25vw; border: 1px solid; } .subdiv:after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.30); transition: 0.6s ease-in-out; opacity: 0; } .subdiv:hover { transform: scale(1.1, 1.1); } .subdiv:hover:after { opacity: 1; } #leftparentdiv { position: absolute; left: 0; top: 0; border: 1px solid; width: 47vw;

python 2.7 - dimensions in batch normalization -

i'm trying build generalized batch normalization function in tensorflow . i learn batch normalization in article found kind. i have problem dimensions of scale , beta variables: in case batch normalization applied each activations of each convolutional layer, if have output of convolutional layer tersor size: [57,57,96] i need scale , beta have same dimension convolutional layer output, correct? here's function, program works don't know if correct def batch_normalization_layer(batch): # calculate batch mean , variance batch_mean, batch_var = tf.nn.moments(batch, axes=[0, 1, 2]) # apply initial batch normalizing transform scale = tf.variable(tf.ones([batch.get_shape()[1],batch.get_shape()[2],batch.get_shape()[3]])) beta = tf.variable(tf.zeros([batch.get_shape()[1],batch.get_shape()[2],batch.get_shape()[3]])) normalized_batch = tf.nn.batch_normalization(batch, batch_mean, batch_var, beta, scale, 0.0001) return normalized_bat

html - Save image from PHP URL - returns empty image -

i'm working on small project read data electronic identity cards. it might worth mentioning i'm using lightopenid php library $attributes[''] data eid. now i'm stuck trying save image displayed on http://my-url.com/photo.php photo.php contains: <?php session_start(); $photo = $_session['photo']; header('content-type: image/jpeg'); echo($photo); the variable $photo contains $_session['photo'] comes index.php : function base64url_decode($base64url) { $base64 = strtr($base64url, '-_', '+/'); $plaintext = base64_decode($base64); return ($plaintext); } $encodedphoto = $attributes['eid/photo']; $photo = base64url_decode($encodedphoto); $_session['photo'] = $photo; the images both visible on index.php ( <?php echo '<img src="photo.php"/>'; ?> ) on photo.php. i've read on few similar topics , tried following methods: curl $ch = curl_ini

c++ - Replace a chain of image blurs with one blur -

Image
in this question asked how implement chain of blurs in 1 single step. then found out gaussian blur page of wikipedia that: applying multiple, successive gaussian blurs image has same effect applying single, larger gaussian blur, radius square root of sum of squares of blur radii applied. example, applying successive gaussian blurs radii of 6 , 8 gives same results applying single gaussian blur of radius 10, since sqrt {6^{2}+8^{2}}=10. so thought blur , singleblur same in following code: cv::mat firstlevel; float sigma1, sigma2; //intialize firstlevel, sigma1 , sigma2 cv::mat blur = gaussianblur(firstlevel, sigma1); blur = gaussianblur(blur, sigma2); float singlesigma = std::sqrt(std::pow(sigma1,2)+std::pow(sigma2,2)); cv::mat singleblur = gaussianblur(firstlevel, singlesigma); cv::mat diff = blur != singleblur; // equal if no elements disagree assert( cv::countnonzero(diff) == 0); but assert fails (and actually, example, first row of blur diff

Json.Net deserialize into C# derived class -

json.net not deserializing object receives proper derivatives of control class. (please see following explanation of problem. please note, feel minimum amount of code required explain issue. ahead of time reviewing problem.) i trying serialize/deserialize following class(es) into/from json. public class page { public guid id { get; set; } public guid customerid { get; set; } public ilist<control> controls { get; set; } } and here control class: public class control : controlbase { public override enums.cscontroltype cscontroltype { { return enums.cscontroltype.base; } } } and here controlbase abstract class: public abstract class controlbase { public guid id { get; set; } public virtual enums.cscontroltype cscontroltype { get; } public enums.controltype type { get; set; } public string propertyname { get; set; } public ilist<int> width { get; set; } public string friendlyname { get; set; } public string desc

git - msysgit autocompletion when pushing branch deletion doesn't work? -

when type git push origin : , press [tab] - autocompletion doesn't suggest branch names in remote. can helped? i git push origin x: - makes autocompletion work, return , delete x . there better way?.. tried git push origin --delete - no autocompletion there.

Command Binding WPF VB.NET -

help me resolve command binding issue i'm having toggleheightmeasurementon property (see code below). reasons, content binding working, command not binding. view code <usercontrol x:class="heightmeasurementselector" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:common="clr-namespace:harvestercore;assembly=harvestercore" mc:ignorable="d" d:designheight="85" d:designwidth="550" fontsize="16"> <grid > <grid.columndefinitions> <columndefinition width="40*"/> <columndefinition width="100*"/> <columndefi

sql - Inserting into multiple tables with identity column -

insert [dbo].[transactions] ([partnerid], [transactionid], [ver], [insertedby], [inserteddatetime], [savedby], [saveddatetime]) select [partnerid], [transactionid], [ver], [insertedby], [inserteddatetime], [savedby], [saveddatetime] @partransaction; set @transactionid = @@identity; insert [dbo].[remittances] ([transactionid], [remittancetransactionid],[insertedby], [inserteddatetime], [savedby], [saveddatetime]) select @transactionid, [remittancetransactionid], [insertedby], [inserteddatetime], [savedby], [saveddatetime] @parremittance; set @remittanceid = @@identity ; my issue here when there no record insert remittance table, @remittanceid getting identity value of transactions table. so let's identity value inserted in transaction table 1, , there no records in remittance table, @transactionid , @remittanceid both set 1, want @transactionid value set 1 , @remittanceid null.

javascript - THREE.js: combining smaa and ssao postprocessing -

i'm trying combine smaa , ssao in three.effectcomposer this: this.composer = new three.effectcomposer(this.renderer); // setup depth pass depthmaterial = new three.meshdepthmaterial(); depthmaterial.depthpacking = three.rgbadepthpacking; depthmaterial.blending = three.noblending; var pars = { minfilter: three.linearfilter, magfilter: three.linearfilter }; depthrendertarget = new three.webglrendertarget( window.innerwidth, window.innerheight, pars ); // setup ssao pass ssaopass = new three.shaderpass( three.ssaoshader ); ssaopass.rendertoscreen = true; ssaopass.uniforms[ "tdepth" ].value = depthrendertarget.texture; ssaopass.uniforms[ 'size' ].value.set( window.innerwidth, window.innerheight ); ssaopass.uniforms[ 'cameranear' ].value = this.camera.near; ssaopass.uniforms[ 'camerafar' ].value = this.camera.far; ssaopass.uniforms[ 'onlyao' ].value = false; ssaopass.uniforms[ 'aoclamp' ].value = .3; ssaopass.uniforms[ 'lum

c# - Constructor not working as expected in Unity -

i'm trying create griddata data in update/awake function test. can't seem constructor working. i'm new csharp , unity. so, i'm bit stuck here. griddata class [system.serializable] public class griddata { [system.serializable] public struct rowdata{ public float[] colum; } public static int numrows =30; public static int numcolums =20; public rowdata[] rows = new rowdata[numrows]; // //constructor public griddata(int x, int y){ numrows =y; numcolums = x; rowdata[] rows = new rowdata[numcolums]; } } factalmapdata class using system.collections; using system.collections.generic; using unityengine; public class fractalmapdata : monobehaviour { public int gridwidth =20; public int gridwhight =20; public griddata fractalgrid ; void update () { //test fractalgrid =new griddata(gridwidth,gridwhight); debug.log ("row" + fractalgrid.row

ruby on rails - How to set Content-Disposition for uploading to S3 -

i building rails 5 app uploads amazon s3 using dropzone js plugin jquery. the upload goes fine when want view uploaded pdf in browser downloads , not display inline. i have manually set content-disposition inline 1 of files , opens in browser instead of downloading. i signing request , need send content header along request when creating it. def sign key = params[:name] expiration = 5.minutes.from_now.utc.strftime('%y-%m-%dt%h:%m:%s.000z') max_filesize = 5.megabytes acl = 'public-read' policy = base64.encode64( "{'expiration': '#{expiration}', 'conditions': [ {'bucket': 'my-bucket'}, {'acl': '#{acl}'}, ['starts-with', '$key', '#{key}'], ['content-length-range', 1, #{max_filesize}] ]} ").gsub(/\n|\r/, '') signature = base64.encode64(openssl::hmac.dig

windows 10 - Godaddy cpanel Web Disk not able to save file in Sublime Text 3 -

i have cpanel hosting account in godaddy. using web disk edit/save files in sublime text editor 3.0. using windows 10. however, whenever save file error in windows seen in image below: windows error i have enabled 'digest authentication' in cpanel.

How to log the program flow of a very deep and complex functional JavaScript code? -

i'm trying understand flow of functions in reselect library. use console.log log output. still, hard understand flow. make me think how complex functional programming is!!! how can intercept calls , log function name , parameters console es6 decorator or proxy or other language features? function defaultequalitycheck(a, b) { return === b } function areargumentsshallowlyequal(equalitycheck, prev, next) { if (prev === null || next === null || prev.length !== next.length) { return false } // in loop (and not `foreach` or `every`) can determine equality fast possible. const length = prev.length (let = 0; < length; i++) { if (!equalitycheck(prev[i], next[i])) { return false } } return true } function defaultmemoize(func, equalitycheck = defaultequalitycheck) { let lastargs = null let lastresult = null console.log("entering defaultmemoize"); console.log("###input### defaultme

amazon web services - Migrating DNS settings from AWS -

i registered domain aws, later decide move different provider (dreamhost). unfortunately can't transfer domain dreamhost yet (it's been less 60 days), need update amazon's route 53 dns settings point dreamhost. so made sure dns settings appearing in dreamhost's control panel mimicked in dns settings in amazon route 53 exception of soa record... "ns-200.awsdns-25.com. awsdns-hostmaster.amazon.com. 1 7200 900 1209600 86400" currently though site responding extremely on dreamhost (even though ftp server, db etc running fine on own). website return results (lag of 30 seconds). this first time managing dns settings across 2 accounts, i'm wondering if perhaps need amend soa record on amazon side? or perhaps shouldn't have duplicate dns records between amazon , dreamhost (i have no idea takes precedence). until you're ready dns service transfer aws dreamhost, shouldn't need set dns records @ dreamhost. domain's soa , ns

file - What is wrong with this loop? FprintF in matlab -

i have loop supposed search through file , add text fid = fopen('wave_propagation_var5_alpha1delta1.cps_001', 'rt+') fprintf(fid, 'dsadsado') =1:383 currentline = fgetl(fid) currentline = strtrim(currentline) if strcmp(currentline, '$$solid_anormal')==1 fprintf(fid, 'hello') elseif strcmp(currentline, '$$solid_deltanormal')==1 fprintf(fid, num2str(deltalist(i))) else end i=i+1 end line 2 appears print file correctly. cannot figure out why lines 7 , 9 won't. when debug if statement satisfied , code goes both lines , executes them. when open target file dont understand why nothing happening.... please help. thanks. it bad idea try actively read , write same file in matlab. you'll instead want use different file output. fin = fopen('wave_propagation_var5_alpha1delta1.cps_001', 'rt+'); fout

COUPNCD function in PHPExcel class returns wrong result -

hi use phpexcel class coupncd function returns wrong result in case "maturity" in end of month 30 or 31 in case coupncd(18/10/2016, 30/09/2019, 2, 4) =42823 in excel file returns 42825

javascript - javascript_setInterval in combination with mouseenter -

here have simple animation: if move on area (300 x 250px), 4 pics move left right (one after another). problem is, setinterval getting faster more move on area. i think problem setinterval in combination event mouseenter ...but dont know how solve problem. wrapper.addeventlistener("mouseenter", function(e) { = 0; ziel = 75; numberbild = 1; currentmove = -75; interval = window.setinterval(function() { if (i < ziel && numberbild <= 4) { currentmove = currentmove + 1; console.log(i); console.log(document.getelementbyid('bild-move-' + numberbild)); console.log(currentmove); document.getelementbyid('bild-move-' + numberbild).style.marginleft = currentmove + "px"; i++; } else { = 0; numberbild = numberbild + 1; } }, 10); }); <div id="wrapper" style="width:300px;height:250px;border:1px solid #dcdddd; "> <

go - How to force Windows godoc to update private package documentation on local webserver in golang? -

how can force godoc update private package documentation when running local godoc webserver on windows? running command: "godoc -http :6060" on windows doesn't update new godoc comments in private packages. when first ran command got comments present hasn't updated since when killing , restarting command. there cache or can clear? i can't find anywhere. there's old github issue (that apparently fixed) frozen due age , deals -sync option doesn't exist in godoc in current (and own) go1.8 windows/amd64 install: https://github.com/golang/go/issues/3273 i tried on linux , updates when kill , restart "godoc -http :6060" command. technically not go related problem, more related execution of command when contents of folder change. there solutions standard http go programs -- have router , listen on specific port -- nothing godoc. because of os-dependant model, os needs have way detect , listen changes in directory. maybe something

Explanation of audio stat using sox -

i have bunch of audio files , need split each files based on silence , using sox . however, realize files have noisy background , don't can't use single set of parameter iterate on files doing split. try figure out how separate them noisy background. here got sox input1.flac -n stat , sox input2.flac -n stat samples read: 18207744 length (seconds): 568.992000 scaled by: 2147483647.0 maximum amplitude: 0.999969 minimum amplitude: -1.000000 midline amplitude: -0.000015 mean norm: 0.031888 mean amplitude: -0.000361 rms amplitude: 0.053763 maximum delta: 0.858917 minimum delta: 0.000000 mean delta: 0.018609 rms delta: 0.039249 rough frequency: 1859 volume adjustment: 1.000 and samples read: 198976896 length (seconds): 6218.028000 scaled by: 2147483647.0 maximum amplitude: 0.999969 minimum amplitude: -1.000000 midline amplitude: -0.00