Posts

Showing posts from February, 2015

date - Java - condition statement based on milliseconds -

quick question here, need execute method after specific time period has passed (in milliseconds): static double incrtruebinaryerr = 62.5; static double incrtruebinarymov = 31.25; static double incr01001 = 360000; static double incr_1101 = 125; static double incr05008 = 3600000; static double incr10004 = 1024000; static double incr22000 = 1000; static double incr22001 = 1000; date currdate; while (true) { currdate = new date(); if (currdate.gettime() == currdate.gettime() + incrtruebinaryerr) //do stuff if (currdate.gettime() == currdate.gettime() + incrtruebinarymov) //do stuff if (currdate.gettime() == currdate.gettime() + incr01001) //do stuff if (currdate.gettime() == currdate.gettime() + incr_1101) //do stuff if (currdate.gettime() == currdate.gettime() + incr05008) //do stuff if (currdate.gettime() == currdate.gettime() + incr10004) //do stuff if (currdate.gettime() == currdate.g...

Translate Augeas into Puppet speak Augeas -

using puppet's augeas capability want modify config file: /etc/ssh/sshd_config without puppet i've experimented using augeas's "augtool" , found couple of lines seem work: augtool> set /files/etc/ssh/sshd_config/match[1]/condition/user "bill","ben" augtool> set /files/etc/ssh/sshd_config/match/settings/passwordauthentication "no" augtool> save although seems work ok, don't understand purpose [1] serves here. i've tried without success put lines puppet: augeas { "sshd_config": context => "/files/etc/ssh/sshd_config", changes => [ 'set match[1]/condition/user "bill","ben"', 'set settings/passwordauthentication "no"', ], } it gives error: error: /stage[main]/samipermissions/augeas[sshd_config]: not evaluate: saving failed, see debug running puppet in debug mode tells me same thing. does know how meant work ? ...

php - Laravel update association -

i trying update database entries not work properly, database table want update: id | product_id | image | image_hq _____________________________________________ in form saving product data, images , images_hq(images higher resolution. for build model: namespace app; use illuminate\database\eloquent\model; class images extends model { protected $table = 'image'; protected $fillable = ['product_id', 'name', 'images', 'images_hq']; /** * relations */ public function product() { return $this->belongsto('app\product', 'product_id'); } } my input fields javascript loop: <input name="input_image['+i+'][images]" type="file" accept="image/jpeg, image/png"> <input name="input_image['+i+'][images_hq]" type="file" accept="image/jpeg, image/png"> in update method inside of con...

Log Clean up for SVN repo -

there log file svn present below, $ pwd /var/svn/repositories/axs/hooks/commitlog/ $ ls -lh errorlog -rwxr-xr-x 1 apache apache 6.9m jul 22 18:37 errorlog $ cat errorlog |wc -l 68151 since number of lines in file more, need clean file, clean should in way, before clean need file current date , empty current file. below had idea of, using logrotate - the server didn't have logrotate installed writing script backup , delete - deleting file may cause problems other users if code commit during delete operation what method advisable this. kindly suggest. information not sudo user or admin user. this not standard subversion logfile rather appears 1 created hook script installed & managed repo admin. you need speak repository administrator. individual should able give guidance on how best manage file.

wpf - avoid creating empty row in datagrid -

i'm having 2 classes cricket, football , list of observable collections of type object. based on condition want add object of type cricket/football observable collection. i'm not assigning data i.e creating , instance of class cricket/football , adding instance observable collections , binding ui. expectation is, i'm not assigning data instance of cricket/football, header has create in datagrid. found row default value of variables defined under respective class along row header i'm creating instance of class. how shall avoid creating void row datagrid header unaffected. <datagrid selectionmode="single" verticalalignment="stretch" itemssource="{binding itemsource, updatesourcetrigger=propertychanged}" canuserreordercolumns="false" canuseraddrows="false" isreadonly="true" canuserdeleterows="false" canuserresizecolumns="false" horizontalgridlinesbrush="black" verticalgridli...

set - Proofs in coq using MSet -

so still new coq , msets giving me issues. here 2 functions compute whether element in list or set, please let me know if think set_contains definition correct or if there better way it. help. require import msets zarith. module mset := msetavl.make positive_as_ot. notation pos_set := mset.t. definition set_contains (x : positive) (s : pos_set) := mset.mem x s. fixpoint list_contains (x : positive) (l : list positive) : bool := match l | nil => false | y :: l' => if pos.eqb x y true else nodelist_contains x l' end. lemma nodelist_nodeset_contains : forall x (s : pos_set), (nodelist_contains x (mset.elements s)) = (nodeset_contains x s). proof. induction s. destruct list_contains. destruct set_contains. auto. it seems set_contains evaluates true @ base case after destructs , i'm not sure why. set not mset.empty during stage of proof? i not know h...

.net - How to extract the nodes from a tree view dialogue from an .MSI file -

short version - have msi file treeview object specifiying modules include in installation. these can passed using command line arguments unfortunately authors didn't release list of components automating installation. there way of extracting treeview object and friendly names or descriptions associated msi file? i have tried using orca extract components table, contains component names of .msi doesn't contain friendly names or descriptions visible in treeview section of user interface. background (you can skip this) i have set of installation packages own msi files. each called in turn single setup.exe created team can't communicate with. automate installation can pass components want install relevant msi file calling setup.exe [/productinstallerargs=args] however, list of components published authors hasn't been updated in 2 years while there has been number of new builds , added components. automate newer versions using silent install, including neede...

multiplication - Batch file multiply positive variables return a negative number -

i've been working on batch polygon area calculator , got problem. need multiply 2 variables, return negative number if 2 positive variables large. here's example: 999999*999999 returns -729379967 . code goes below: rem calc square area :polysqu cls echo polygon area calculator /l %%p in (1,1,57) echo. set /p "inputpolygoncalsqu=enter 1 of line's length in cm :" set /a squarea=inputpolygoncalsqu * inputpolygoncalsqu cls echo polygon area calculator /l %%p in (1,1,57) echo. echo area of square %squarea% cm2. pause goto :polygoncal it seemed command set /a squarea="inputpolygoncalsqu * inputpolygoncalsqu doesn't calculate properly. as others pointed out, batch-file natively supports 32-bit signed integer arithmetics only. the following code constitutes work-around multiplying non-negative numbers greater limit of 2 32 − 1 = 2147483647, using pure ...

php - JavaScript parsing value -

while clicking submit button of following form, <form id="message-form" action="#" method="post"> <div class="text-middle"> <?php foreach($result $row) { ?> <button class="button button1" value="<?php echo $row['id']; ?>" onclick="myfunction(this)"><?php echo $row['id']; ?></button> <?php } ?> </div> </form> the value sent function window.onload = function() { var messagefield = document.getelementbyid('message'); var messageslist = document.getelementbyid('messages'); var form = document.getelementbyid('message-form'); var message = messagefield.value; } but showing same value every click the "window.onload" function fires @ end of document loading process. @ point, of objects in document in dom, , images, scripts, links , sub-frames ...

javascript - How to change position of element when onclick using jquery? -

i have 2 divs, .div_data , .div_update <select name=change_placement> <option value=0>top</option> <option value=1>bottom</option> </select> <div class='div_data'>data data</div> <div class='div_update'> <form name=stuff> <input type=text> </form> </div> how .div_update precede .div_data when clicking on select[name=change_placement] ? i put id select , added option 'select' dropdown select. assuming want input text box go above other div when choose 'top'. $('#change_placement').on('change', function() { var option = $(this).val(); if(option == 0) { $('.div_update').insertbefore($('.div_data')); } else { $('.div_update').insertafter($('.div_data')); } }); <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"...

awk - remove line in text file with bash if the date is older than 30 days -

i have text file looks this: test10 2016-05-30 207 test11 2016-06-01 207 test12 2016-07-20 207 test13 2016-07-21 207 test14 2016-07-25 207 and want remove lines text file if date older 30 days. how can this? have read aboud sed not sure if can done or how go doing it. the nice thing yyyy-mm-dd alpha sort identical sort order date object -- can generate string representing cutoff date , compare that. if have gnu date: cutoff=$(date -d 'now - 30 days' '+%y-%m-%d') awk -v cutoff="$cutoff" '$2 >= cutoff { print }' <in.txt >out.txt && mv out.txt in.txt it's possible rely on gnu awk ( gawk ) rather gnu date: gawk -v current="$(date +"%y %m %d %h %m %s")" \ 'begin { cutoff_secs = mktime(current) - (60 * 60 * 24 * 30) } { line_secs=mktime(gensub(/-/, " ", "g", $2) " 00 00 00") if (line_secs >= cutoff_secs) { print } }' <in.t...

java - JMapper how to create a convertion from Date to LocalDateTime -

i'm trying make jmapper convertion class source destination, in source have date , in destination localdatetime. reading docs of jmapper logical way make convertion . covertion based on solution question doesn't work , null on destination date. now code // source entity @entity @table(name = "source") public class source { @id @generatedvalue(strategy = generationtype.identity) @column private long id; @column private string name; @column private date date; // ommited getters , setters } // destination entity public class destination { private long id; private string name; private localdatetime date; // ommited getters , setters } // mapping api jmapperapi = new jmapperapi(); conversion datetolocaldatetime = conversion("datetolocaldatetime") .from("date").to("date").type(jmapconversion.type.static) .body("return java.time.localdate...

python - Split an numpy array into two numpy arrays -

i have numpy array this: a=[(datetime.datetime(2016, 6, 8, 12, 37, 27, 826000), 3.0) (datetime.datetime(2016, 6, 8, 12, 37, 27, 827000), nan) (datetime.datetime(2016, 6, 8, 12, 37, 27, 832000), nan) (datetime.datetime(2016, 6, 8, 12, 37, 27, 833000), nan) (datetime.datetime(2016, 6, 8, 12, 37, 27, 837000), 3.0) (datetime.datetime(2016, 6, 8, 12, 37, 27, 837000), 35.0)] and want split 2 numpy arrays: b=[(datetime.datetime(2016, 6, 8, 12, 37, 27, 826000), (datetime.datetime(2016, 6, 8, 12, 37, 27, 827000), (datetime.datetime(2016, 6, 8, 12, 37, 27, 832000), (datetime.datetime(2016, 6, 8, 12, 37, 27, 833000), (datetime.datetime(2016, 6, 8, 12, 37, 27, 837000), (datetime.datetime(2016, 6, 8, 12, 37, 27, 837000)] c=[3.0,nan,nan,nan,3.0,35.0] to give more details numpy array @ first dictionnary , i've convert numpy array, can find code below: def convertarray(dictionary): names=['id','data'] formats=['datetime64[ms]...

Oracle query that can filter paired data -

i need oracle query can skip 'pairs' , pick non paired data. example: id cost hour type 123 $1.00 1 input 123 $1.00 1 output 234 $2.00 4 input 345 $5.00 4 output 236 $3.00 5 input 236 $3.00 3 output in example, first 2 lines 'pair', since thir first 3 fields match; 3rd , 4th, , 5th , 6th lines not 'pair', since first 3 fields not match. you may use window function , partition by select id, cost, hour, type ( select id, cost, hour, type, count(*) over(partition id, cost, hour) cn mytable) t cn=1;

mysql - How to display the most liked post when the likes are stored in another table php -

i developing small cms, posts have likes. store likes in table liked posts can found in users 'dashboard'. "likes" table » likes - id - user - post - timestamp but show liked posts in page. how achieve that? first make function details of post public function get_post_details(){ $sql = 'select pt.id, pt.details <- (you can select whatever want display) '; $sql .= 'from post_table pt '; $query = $this->db->query($sql); $result = $query->row(); foreach ($result $key => $value) { $result->post_likes = $this->get_post_likes_by_id($result->id); } return ( $query->num_rows() ) ? $result : false; } then make second function likes in like_table assuming every post of user add 1 row in table this if first_user likes post1 table of likes store data this likes_table id post_id user_likes 1 1 1 then second user user likes post1 sh...

regex - Check bash script argument against pattern, and replace a character in it -

i need write bash script checks if first argument supplied script matches glob pattern, in javascript regexp express ^[a-za-z0-9]+\.[a-za-z]{2,}$ in other words: starts 1 or more alphabets/digits, followed 1 period, followed 2 or more alphabets, , ends. else should fail test. then need replace period in argument underscore. so far can check if argument empty: case $1 in '') echo "no argument supplied" >&2; exit 1 ;; esac i figure pattern test need negated , put after '' check in case statement, have no clue how construct it. direct or online resources appreciated. i possible how can change valid argument supplied replace single period in underscore. same regex works in bash also. consider snippet: re='^[a-za-z0-9]+\.[a-za-z]{2,}$' s='abc123.xy' [[ $s =~ $re ]] && echo "${s/./_}" abc123_xy

jquery colorbox close affecting overlapping dialogs? -

i'm in process of replacing generic alerts on page colorbox treatment. i'm using hidden divs , href reference build dialogs user interaction along these lines: $.colorbox({ inline: true, open: true, href: "#modalalert", /*id of hidden div*/ onclosed: function () { $("#modalalert").hide(); }, onopen: function () { $("#modalalert").show(); }, closebutton: false }); i use similar bit of code show dialog gather input data. want put bit of validation checking on input data. in method i'm using data issue $.colorbox.close() dismiss input box. if validation fails, show alert message indicate issue is. when try call method build above listed colorbox alert, nothing shows. know code being executed, expected alert not appear. when debug code, see $.colorbox.close() execute, input box still visible. it appe...

powershell - Re-format numerous dates (each different) in .txt file -

i have numerous .txt files output handle.exe run of several days. need reorganize data relational database. first thing need dates re-formatted. each file has in excess of 800 dates, disbursed unevenly throughout file. dates formatted: june 29, 2016 12:05:45 pm , need 06-29-16 12:05:45 . i'm working on single file now, things dialed in. i've tried replace dates in situ (using array original dates) get-date , got nowhere. tried -replace , didn't work. i've spent 3 or 4 days on , think i've broken head. i've tried many permutations of stuff don't know anymore. the last thing tried below. attempt use hashtable, old date , new date in table. ##to set "|" separator arrays $ofs = '|' ##to original dates array $a = @(sls .\hp.txt -pattern '(june 29|june 30|july 1|july 2|july 3|july 4)' | select -expandproperty line) ##to dates corrected format array $b = @($a | foreach {$_ | get-date -format "mm-dd-yy hh:mm:ss...

ubuntu - Using pocketsphinx in c -

i trying install , use pocketsphinx on ubuntu in c language keep getting error /desktop/programming/c/tests$ gcc libraries.c -o libraries libraries.c:2:26: fatal error: pocketsphinx.h: no such file or directory #include <pocketsphinx.h> ^ compilation terminated. i have followed step required install sphinxbase , pocketsphinx found here keep getting error every time compile code. there missed? how did install pocketsphinx? , mean "installing" work library first need have headers in place compiler can find them (for gcc example using -i option) , need have library installed compiler can build against it. judging error didn't specify header files of library compiler

angularjs - Loading message shown on $routeChangeStart disappears as soon as LESS CSS starts compiling -

i've created pretty heavy angularjs application has many dependencies (js libraries , less css). when application url hit, determines route based on login status , redirects login route if not logged in. problem is, until route redirected to, , html loaded, page remains blank 4-5 seconds, looks confusing. i tried implement message using $routechangestart it's not giving me desired results. want 'loading..." message url hit , until app routed , html loaded. message disappearing after couple of milliseconds. $rootscope.$on('$routechangestart', function() { $rootscope.layout.loading = true; }); $rootscope.$on('$routechangesuccess', function() { $rootscope.layout.loading = false; }); update: problem seems less css being compiled , loaded page ready. loading indicator text correctly works without less css (see this plunker ) in actual application, have put loading indicator text after body tag, , there many js scripts (including less.js) aft...

xquery - Oracle BPEL 12c The prefix "fn-bea" used in the qualified name "fn-bea:serialize" can not be resolved -

i'm trying use fn-bea:serialize($iter) xml node content string in oracle bpel 12c xquery functions i'm recieving the prefix "fn-bea" used in qualified name "fn-bea:serialize" can not resolved in oracle osb 12c don't have problems using same xquery function, need use in oracle bpel. i'll apreciate help. thanks in advance!! you should use fn:serialize should available in both osb , bpel 12. osb , bpel use same xquery processor internally. when invoke xquery bpel, make sure using 1.0 xquery processor/function.

What Firefox is using as a js engin SpiderMonkey or IonMonkey -

i got confused when read this wikipedia page spidermonkey what firefox using js spidermonkey, ionmonkey, jägermonkey or combination of them? thank you

python - Use __get__, __set__ with dictionary item? -

is there way make dictionary of functions use set , statements , use them set , functions? class thing(object): def __init__(self, thingy) self.thingy = thingy def __get__(self,instance,owner): return thingy def __set__(self,instance,value): thingy += value thedict = {"bob":thing(5), "suzy":thing(2)} thedict["bob"] = 10 wanted result 10 goes set function , adds existing 5 print thedict["bob"] >>> 15 actual result dictionary replaces entry numeric value print thedict["bob"] >>> 10 why can't make function like.. thedict["bob"].add(10) because it's building off existing , working function uses set , get. case i'm working edge case , wouldn't make sense reprogram make work 1 case. i need means store instances of set/get thingy accessible doesn't create layer of depth might break existing references. please don't ask actual code....

java - Make a class that extends a class with overriding in clojure -

i've got pretty simple java code: public class messagelistenerexample extends listeneradapter { @override public void onmessagereceived(messagereceivedevent event) { // event } } however, can't seem understand how turn code clojure code. docs , articles confusing. i'd happy see more examples too. i'm interested in using implements . depending on need do, few options: if need extend class (other object) in clojure, can using gen-class, see https://clojuredocs.org/clojure.core/gen-class . preferably using ns macro, like (ns your.class.name :extends whatever.needs.to.be.extended) (defn -methodyouoverride ; mind dash - it's important [...] ...) i wouldn't recommend going down path unless absolutely necessary. getting compilation right (including aot compilation) tricky. , in end still need use java interop work objects of class, not sure it's worth hassle, brings me to: code in java , use java int...

angularjs - Can I read a local folder in my system drive through Javascript? -

i building chrome app using angularjs wherein maintaining students' books in library shelf. requirement read books (with details) local folder (can shared folder via network) in javascript. if put someone's localhost ip address of folder app, app connects system , fetches data it. can chance achieved web sockets?

php - CakePHP: is there a way to make every find('list') return an array ordered? -

i'd every model->find('list') return array ordered $displayfield set on model. there way beyond set 'order' => 'model.display_field asc' on every find call? yes, set $order in model. http://book.cakephp.org/2.0/en/models/model-attributes.html#order

Git username incorrect in git bash -

my office's active directory team changed our ad logons username (ex: myname) id# (ex: 12345). our git box users not tied ad, mimic old username method, thus, still set "myname" rather "12345". when connect git bash, thinks "12345@mydomain" instead of "myname@mydomain" recap: log on pc 12345 (i used "myname") git bash defaults me 12345, git username not exist, "myname" exists seems git changed default username when ad username changed. have tried modifying git config user.name, doesn't seem work. aside changing git username on our local server, know how can pc connect repo, way of bash, using old username? figured out -- went tortoise settings each repo, , under git: remote, highlighted origin remote. in url box, rather "servername", have "myname@servername". did trick.

html - Username and Password trouble in PHP -

i trying create login form php cannot login. incorrect password/username instead. have triple checked credentials in database , correct. please help here code <!doctype html> <html> <head> <meta charset="utf-8"> <title>login</title> <link rel="stylesheet" href="css/style.css" /> </head> <body> <?php require('db.php'); session_start(); // if form submitted, insert values database. if (isset($_post['username'])){ $username = $_post['username']; $password = $_post['password']; $username = stripslashes($username); $username = mysqli_real_escape_string($connection,$username); $password = stripslashes($password); $password = mysqli_real_escape_string($connection,$password); //checking user existing in database or not $query = "select * `backuser` username='".$use...

optimization - Pricing Analytics in R , maximization of demand at an optimum price point -

hi have similar problem here. trying maximize sales find optimum price. have fit linear regression assuming linear relation ship between price , quantity , other variables (including dummy variablles) impacting quantity. taking regression function objective function includes price independent , quantity dependent.my prroblem in lp solver objective function becomes linear regression equation (y(quantity)=-0.02x (price) + constant (constant after taking scenario , intercept). can me how can optimize above type of function ? i have been struggling identify point of change in price maximizes quantity.i have tried manually putting drops , ups in price , arrived @ overall impact want avoid manual intervention here , therefore thinking if lp solver me. thanks, avani usually 1 first writes down mathematical model, , decide how solve it. not sure want, optimization model producer like: max profit = p*q - c*q q = -0.02 p + constant p, q >= 0 where c unit cost. p , ...

c++ - QML control and business layers -

i using qml first time , having hard time code organised between control , business layers. in down earth way, events supposed sent c++ control layer (a c++ class called mycontroller inherits qobject ). mycontroller supposed know business layer (say c++ class called mybusiness ) , call relevant methods. my mybusiness complex aggregation of lower level classes put in main.cpp . previously using qtwidget , able create mybusiness via complex aggregation mentioned above, create mycontroller , provide mybusiness mycontroller job. now because of qml's way of working, mycontroller exposed qml (via qml registration) , mycontroller q_invokable functions called qml , should in turn call mybusiness functions. but mycontroller created in qml no longer able let mycontroller know mybusiness . what best practise in case? i that: import qtquick 2.5 item { mycontroller { business: businessobj } mybusiness { id: businessobj } }...

wpf - Trigger for custom dependency properties in Style -

the problem i defined reusable control, mycontrol, extends textbox. i want set trigger 1 of dependency properties. added style it, triggers. but if set targettype of style mycontrol, xaml warning 'mycontrol' targettype not match type of element 'textblock' . , if set textblock, compilation error the member "mydependencyproperty" not recognized or not accessible. . how can define style triggers? sample c# code-behind namespace usercontrols.local { public partial class mycontrol : textblock { #region trogdor public static readonly dependencyproperty trogdorproperty = dependencyproperty.register( "trogdor", typeof (bool), typeof (mycontrol), new propertymetadata(default(bool))); public bool trogdor { { return (bool) getvalue(trogdorproperty); } set { setvalue(trogdorproperty, value); } } #endregion public mycontrol() {...

javascript - accessing a function inside jquery selector -

i need function public can call inside jquery selector , here code . note : console sayes checkfeat fn not defined . (function checkfeat() { $(".feat").each(function(){ if (!$(this).hasclass("active")) { $(this).children("p").css("display","none") } else { $(this).children("p").css("display","block") } }); }()); $(".feat h5").on("click",function(){ $(this).parent(".feat").addclass(function(index ,currentclass){ checkfeat(); //console says function not defined why ?!! return "active"; }); }); in javascript file, can write: function checkfeat() { $(".feat").each(function(){ if (!$(this).hasclass("active")) { $(this).children("p").css("display","none") } else { ...

html - How to change angular ng-init attributewith jquery -

so, have div image want change gif when specific scroll has occurred... here html: <div class="col-xs-6 mitad" ng-init="varname='images/estandar/impresoraestandaranimada.gif'" id="seccion3b"> <img ng-src="{{varname}}" id="gif"> </div> now, idea is, change url in varname... tried didn't work: if ($(window).width() > 1700 && vistaestandar.scrolltop > 1596 && vistaestandar.scrolltop < 2490) { lore: 'url(../images/estandar/monitorveloz1.gif)'; $("#gif").attr("ng-src", "{{lore}}"); } any idea how make work?? don't understand angular (new @ programming) , if try change without angular replacing src attribute img tag, gif loads first time if enter again in if condition or if refresh website, loads static image updated: all js code inside controller already: app.controller(...

javascript - jQuery Fade Out on Scroll not working -

i using fade out div on scroll not working, 600 offset of div. cant figure out why not working. $(window).scroll(function(){ wscroll = $(this).scrolltop(); $('.hack').css({ 'transform' : 'translate(0px , ' + wscroll/2 +'%)', 'opactiy' : 1 - (wscroll/600) }); }); $(window).scroll(function () { var scrolltop = $(window).scrolltop(); var height = $(window).height(); $('.logo_container, .slogan').css({ 'opacity': ((height - scrolltop) / height) }); }); demo

laravel - Cloudstack client installation -

i have xampp installed on windows 10. , have installed composer, laravel. can see basic laravel project page on local server. try things out installed yii2. can see basic yii2 page on local server. now i'm trying install generic cloudstack client: https://github.com/pcextreme/cloudstack-client in xampp, under htdocs have dir called 'laravelprojects'. dir structure first made project laravel command: laravel new pcextreme then in pcextreme directory give command: composer require pcextreme/cloudstack-client:~0.1 the composer breaks , shows conclusion: remove laravel/framework 5.2.41 but in instructions there method install package. when editting composer.json in main laravel dir. 'laravelprojects' under xampp/htdocs these lines: "require": { "pcextreme/cloudstack-client": "~0.1" } and run "composer update" command. i don't error. but follow these steps: once package installed need open ap...

directory - What are the longest possible filepath character counts on different versions of Windows -

i have total character limit of 15k in can list set of filepaths , filenames. know how many filepaths put in character count list. the max length of path 260 characters... not version-dependent, limit versions of windows. yes, can more 260 characters using unicode versions of api. that's not normal thing you'd find in windows. so, 15k/260 = 59 btw: read microsoft has planned increase limit on upcoming ntfs version.

quickbooks - How to set Vendor Tax ID and 1099 Eligibility in API? -

i'm using consolibyte's php qb classes interface qb api. i've been creating , updating vendor's in qb while. however, have new requirement use api store vendor's tax information. i've tried lookup correct syntax set these, have been unsuccessful far. my recent attempt was: $vendor->setvendortaxident($provider->taxid); $vendor->setisvendoreligiblefor1099(true); the rest of information set gets updated properly, , return $result = $vendorservice->update($this->context, $this->realm, $provider->vendorid, $vendor); seems indicate success. please let me know if need anymore context. thanks! have referred documentation? https://developer.intuit.com/docs/api/accounting/vendor the documentation indicates: taxidentifier: string, max 20 characters vendor1099: boolean the get ers , set ers mirror documented fields. unsurprisingly, you'll have these methods: $vendor->settaxidentifier($string); $stri...

android - Make dialog appear after listview item button click -

i have application loads listview based on database query. in each listview item there text view , few buttons. have created custom adapter. issue trying make dialog appear when button in listview clicked dont know how call fragment manager listview adapter. danceadapter.java @override public view getview(int position, view convertview, viewgroup parent) { // data item position final onedancer onedancer = getitem(position); // check if existing view being reused, otherwise inflate view if (convertview == null) { //sign-in activity if(type==1) { }else if (type==2) { log.v("danceradapter","item_dj_dancer loaded"); } //vip/dances adapter else if(type==3) { convertview = layoutinflater.from(getcontext()).inflate(r.layout.item_services, parent, false); final button button4 = (button)conve...

iis - Accessing external server using MS Edge (privateNetworkClientServer) -

i have map website showing layers server in different domain. can view map layers ie, chrome, firefox, , opera, doesn't work when using microsoft edge. i following error: this internet explorer instance not have following capabilities: privatenetworkclientserver the server hosting map layers running iis 8.5, while server hosting website running older iis. think there's parameter have change on former (and don't have touch latter), don't know is.

How to reload browser and and keep current state in AngularJS UI-Router? -

i built small web app use ui-router navigate pages. works fine apart of browser refresh or accessing specific page using state link. tried several solutions posted here on same topic non of them helped maybe due lack of additional information. when click ui-sref link below, 'mysite/content' , page displays normally, once refresh or try access pasting link doesn't find page. could please me make work expected. in advance. html <p ui-sref="content">link content</p> angularjs var app = angular.module('myapp',['ui.router']); app.config(['$stateprovider', '$urlrouterprovider', '$locationprovider', function($stateprovider, $urlrouteprovider, $locationprovider){ $urlrouteprovider.otherwise('/'); $stateprovider .state('home', { url: '/', views: { '': { templateurl: '/app/templates/wrapper.html'}, ...

c# - Configuration Section Settings Not Initializing -

i've spent several hours trying determine what's causing custom configuration section fail, can't seem find root of issue. i'm getting error: an exception of type 'system.configuration.configurationerrorsexception' occurred in system.configuration.dll not handled in user code additional information: value property 'afdatabase' not valid. error is: string must @ least 1 characters long. looking @ configuration section, started off noticing have string validator set up: configuration cs public class tankconfigurationsection : configurationsection { [configurationproperty("afserver", isrequired = true)] [stringvalidator(invalidcharacters = "~!@#$%^&*()[]{}/;'\"|\\", minlength = 0, maxlength = 60)] public string afserver { { return (string)this["afserver"]; } set { this["afserver"] = value; } ...

python - How to parse labeled values of columns into a Pandas Dataframe (some column values are missing)? -

Image
the follow 2 rows unlabeled dataset, small subset: random1 147 sub1 95 34 dewdfa3 15000 -1238 sbaasbaqsbarsbatsbausbaxbelaax aaa:col:uvtwuvwduwduwdww bbb:col:f ccc:col:gtatgtca ddd:col:k20 eee:col:54t ggg:col:-30.5 hhh:col:000.1 iii:col:2 jjj:col:0 random2 123 sub1 996 12 kwnc239 10027 144 lbprlbpslbrdlbsdlbsllbwb aaa:col:uwttutuvvuwwuuu bbb:col:f ddd:col:cacgtcgg eee:col:k19 fff:col:hcc16 ggg:col:873 iii:col:-77 jjj:col:0 kkk:col:0 lll:col:1 mmm:col:212 the first 9 columns consistent throughout dataset, , labeled. my problem following columns. each value in row labeled column value first, e.g. aaa:col:uvtwuvwduwduwdww column aaa , bbb:col:f column bbb , etc. however, (1) each row not have same number of columns , (2) columns "missing". first row missing column fff , second row skips column ccc , hhh . also, notice first row stops @ column jjj , while second column stops @ column mmm . how 1 allocate...

sublimetext3 - how to install packages in sublime text editor 3? -

i have installed package control in sublime text editor 3 build 3114. when try install new packages/plugins not installed. nothing shows message.please tell me how install packages/plugins? to install package in st2 , st3, first need correctly install correct version of package control (there 1 version st2 , 1 st3, see package control installation page ). once you've completed instalation (you can detect error message in status bar), can start managing package via command palette ( ctrl + shift + p on windows, type install package , chose package , press enter). confirmation message should appear in status bar. if follow each of these steps, should work properly. stuck ?

php - Include simple fields based on context in Fractal -

i using fractal library transform book object json using simple transformer: class booktransformer extends \league\fractal\transformerabstract { public function transform(book $book) { return [ 'name' => $book->getname() // ... ]; } } and performing transformation follows. $book = new book('my awesome book'); $resource = new \league\fractal\resource\item($book, new booktransformer()); $fractal = new \league\fractal\manager(); $fractal->setserializer(new \league\fractal\serializer\arrayserializer()); $json = $fractal->createdata($resource)->tojson(); this works great. however, have fields on book object should not included, because depends on context transformation done in. in particular use case, json returned ajax requests public website should not include sensitive information, while should case when data requested admin backend. so, let's book has topsecretvalue field, string. ...

environment - ms access 2013, error 2501 while opening form on Win7 enterprise, but not on Win7 professional -

a few weeks ago failure appeared on every newly installed or reinstalled desktop pc's. (100+ pc's in office, 10+ affected) failure description: of forms doesn't open docmd.openform. error 2501. form.open event doesn't run. failure stable. applications didn't change since months. same file runs fine on old installations. tried: * decompile + compile + compact & repair on affected pc's * import new file (order: tables, queries, modules, forms; compact & repair in every step) * removed code using activex & activex reference * tested queries behind affected forms, ok * no errors show in form editor * deleting vba module of form * ticket departement - no reply far * ritual scolding , cursing of m$ forms opening after deleting modules. obviously, need modules. :) if delete form.open, form.load event, open errors. (" error between application , ole service provider or activex controller"). error form.close. if delete wh...

ios - Creating a PDF (Or Other viewable format, such as .docx) from CoreData using swift -

description hello! saving several strings of user inputed data coredata using handful of nsmanagedobject subclasses. since application machine inspection, necessary print/email customer entered information out in structured format. below find pictures/examples of how saving data. please kind me, birthday <3 code examples below example of how saving information. in example, coredata entity "crawlerthree" , data crawlerdistance. @ibaction func save(_ sender: anyobject) { let appdel:appdelegate = (uiapplication.shared().delegate as! appdelegate) let context:nsmanagedobjectcontext = appdel.managedobjectcontext let entity1 = nsentitydescription.insertnewobject(forentityname: "crawlerthree", into:context) nsmanagedobject as! crawlerthree entity1.crawlerdistance = distance.text } the rest of saves identical this, varying entities , data, of strings. know rather vague post, need know need use format information. worth noting know how retrie...

conditional var count with different classes in R -

i have data frame looks that: class id rank aa win b aa win b ab win c bb win d ab win e bb win e aa win how can efficiently count how wins per id have condition of class lower e (not inclusive)? a dplyr solution: library(dplyr) df%>% group_by(id) %>% filter(class !="e") %>%summarize(n())

javascript - PrerenderIO not working on my MeteorApp -

i have issue making prerenderio work on app. running meteor@1.3.5.1 , prerender-node , have set code in server/prerenderio.js this meteor.startup( function(){ const prerenderio = npm.require('prerender-node'); const settings = meteor.settings.prerenderio; console.log(settings); if (settings && settings.token && settings.host) { console.log('this true'); prerenderio.set('prerendertoken', settings.token); prerenderio.set('host', settings.host); prerenderio.set('protocol', 'http'); webapp.rawconnecthandlers.use(prerenderio); } }); and settings.json liiks { "prerenderio": { "token": "wi7dqaiblablablaqtgmt", "host": "http://locallhost:3000/" }, "public":{ "ga": { "id": "ua-xxxxxxxxx-1" } } } when start server on localhost, on log prerender token: wi7dqaiblablablaqtgmt ...

Convert Android Java code to Xamarin C# -

i problem converting code native android java code xamarin c# android code i have class shall me delay start in custom autocomletetextview searching: public class delayautocompletetextview : autocompletetextview { public static context _context {get; set;} private static android.util.iattributeset _attrs { get; set; } public delayautocompletetextview(context context, android.util.iattributeset attrs) : base(context, attrs) { _context = context; _attrs = attrs; } private static int message_text_changed = 100; private static int default_autocomplete_delay = 750; private int mautocompletedelay = default_autocomplete_delay; private progressbar mloadingindicator; public class mhandler : handler { public override void handlemessage(message msg) { delayautocompletetextview.base.performfiltering((java.lang.icharsequence)msg.obj, msg.arg1); } } public void setloadingindicator(progressbar progressbar) { mloadingindicator = progressbar; } pub...

excel - Average of specific cells with numbers determined by multiple criteria -

Image
i'm trying create formula on first screenshot references cells in second screenshot based on name , week number. in second screenshot, shows data "hvl" tab, can see associate's name on left , week numbers across top column headers. because week number appears more once believe i'm having issue. 100% see in cell not correct according data in "hvl" tab. here formulas i've tried using: =average(((hvl!$a$2:$a$144='weekly report card'!$c$1)*(hvl!$b$1:$ag$1='weekly report card'!$a6)*(hvl!$c$3:$ag$201<>0))) =average(if(hvl!a2:a144='weekly report card'!c1:h1, if(hvl!b1:ag1='weekly report card'!a6, hvl!c3:ag201<>0, "error"))) both array , normal. =averageif(hvl!$a$2:$a$144, "<>", index(hvl!$c$3:$ag$201, match($c$1, hvl!$a$2:$a$144, 0), match('weekly report card'!$a8, hvl!$c$1:$ag$1, 0))) both array , normal. if there's other information need, please let me know. ...

json - Datatype long - what means high and low -

im working api , @ point im getting json entry this: cooldown_complete_timestamp_ms: long { low: 600206158, high: 342, unsigned: false} i dont know how cope data - mean? that ain't regular json, value of object can string , number , object , array , true , false or null . see http://www.json.org/ . the api using must replying derived json. which api programming against? i'm guessing api trying emulate/forcing 64-bit integer, similar large_integer , win32 construct. the value looking @ 342 * 2^32 + 600206158 , in other words 1469479021390 .