Posts

Showing posts from July, 2014

My regex is matching too much. How do I make it stop? -

j0000000: transaction a0001401 started on 8/22/2008 9:49:29 j0000010: project name: e:\foo.pf j0000011: job name: mbiek direct mail test j0000100: machine name: dev j0000100: project file: e:\mbiek\foo.pf j0000100: template file: e:\mbiek\foot.xdt j0000100: job name: mbiek j0000100: output folder: e:\foo\a0001401 j0000100: temp folder: e:\foo\output\a0001401 j0000100: document 1 - starting document j0005000: document 1 - text overflowed on page 1 (warning) j0000101: document 1 - 1 page(s) composed j0000102: document 1 - 1 page(s) rendered @ 500 x 647 pixels j0000100: document 1 - completed j0000020: i have gigantic ugly string , i'm tring extract pieces using regex. in case, want grab after "project name" part says "j0000011:" (the 11 going different number every time). here's regex i've been playing with project name:\s+(.*)\s+j[0-9]{7}: the problem doesn't stop until hits j0000020: @ end. how make regex stop @ first o

c# - How do I reflect over the members of dynamic object? -

i need dictionary of properties , values object declared dynamic keyword in .net 4? seems using reflection not work. example: dynamic s = new expandoobject(); s.path = "/home"; s.name = "home"; // how enumerate path , name properties , values? idictionary<string, object> propertyvalues = ??? if idynamicmetaobjectprovider can provide dynamic member names, can them. see getmembernames implementation in apache licensed pcl library dynamitey (which can found in nuget), works expandoobject s , dynamicobject s implement getdynamicmembernames , other idynamicmetaobjectprovider provides meta object implementation of getdynamicmembernames without custom testing beyond is idynamicmetaobjectprovider . after getting member names it's little more work value right way, impromptu it's harder point interesting bits , have make sense. here's documentation , equal or faster reflection, however, unlikely faster dictionary lookup expando, wor

sql - How to convert timestamp with milliseconds to date in Oracle -

i have msstamp "timestamp milliseconds" in oracle, format: 1483228800000. how can cast milliseconds timestamp date format "yyyy-mm", in order count of finished rows per month previous years. i have tried different variations of to_date, cast, to_char - i'm unable working. select count(*) "events", to_date(msstamp, 'yyyy-mm') "finished_month" db_table msstamp < '1483228800000' , status in ('finished') group finished_month asc if need convert milliseconds epoch then: select timestamp '1970-01-01 00:00:00.000' + numtodsinterval( 1483228800000 / 1000, 'second' ) time dual which outputs: time ----------------------- 2017-01-01 00:00:00.000 it want year-month use trunc( timestamp, 'mm' ) or to_char( timestamp, 'yyyy-mm' ) . if need handle leap seconds can create utility package adjust epoch time account this: create or re

python - new GPU op in Tensorflow - Segmentation fault error -

i've created new op in tensorflow (tf) , registered gpu. here part of c++ file called pixel_selector.cc : #include "tensorflow/core/framework/op.h" #include "tensorflow/core/framework/op_kernel.h" using namespace tensorflow; register_op("pixelselector") .input("in: float32") .input("coord: float32") .input("stride: int16") .output("out: float32") class pixelselectorop : public opkernel { public: explicit pixelselectorop(opkernelconstruction* context) : opkernel(context) {} void compute(opkernelcontext* context) override { // grab input tensor const tensor& input_tensor = context->input(0); const tensor& input_tensor1 = context->input(1); const tensor& input_tensor2 = context->input(2); ... std::cout << "batch size: " << batch << std::endl; std

android - Coordinate Layout in Linear Layout: Component not fixed -

Image
as title described, position of android logo in rounded image view not fixed. app rendered correctly designed this: but layout behave in way: below attached layout .xml code: <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical"> <android.support.design.widget.coordinatorlayout android:layout_width="match_parent" android:layout_height="275dp"> <imageview android:id="@+id/profile_iv_background" android:layout_width="match_parent" android:layout_height="200dp" android:scaletype="fitxy" android:src="@drawable/profile_bg"/> <com.makeramen.roundedimagevi

anova - Can't handle an object of class “formula” -

multcomp tukey-kramer i'm trying pairwise comparisons of adjusted means using lsmeans described in thread above. the anova script works fine: model <- (ch4.flux ~ site) defopt <- options() options(contrasts=c("contr.sum", "contr.poly")) print(drop1(aov(model),~.,test="f")) options <- defopt but when try run library(lattice) library(mvtnorm) library(coda) library(nlme) library(multcomp) library(th.data) library(zoo) library(sandwich) library(plyr) library(rcpp) library(xtable) library(lsmeans) print(lsmeans(model, list(pairwise ~ site)), adjust = c("tukey")) i get: error in ref.grid(object = ch4.flux ~ site, = null, contr = "pairwise") : can't handle object of class “formula” use help("models", package = "lsmeans") information on supported models. i've searched error message , can't find else struggling it, must doing stupid!

c# - Asp.net core, HttpClient to reach SOAP service with POST request -

i'm trying reach 3rd party soap ws using httpclient . [httpget] public iactionresult login() { httpclienthandler httpclienthandler = new httpclienthandler(); httpclienthandler.servercertificatecustomvalidationcallback = (message, cert, chain, errors) => { return true; }; httpclient client = new httpclient(httpclienthandler); httprequestmessage request = new httprequestmessage(new httpmethod("post"), myurl); request.content = new stringcontent(myxmlstring, encoding.utf8, "text/xml"); request.headers.add("soapaction",https://actionnameofws); httpresponsemessage response = client.sendasync(request).result; if(response.statuscode == httpstatuscode.ok) return new okresult(); else return new objectresult(response.statuscode); } at point breaks taskcanceledexception: task canceled , not task cancel, connection timeout. can send same post request on https soap ui fine, connection ws not problem. can send post request on http code

pagespeed - what kind of result of Google API Pagespeedonline response? -

Image
i don't know how google figure out(calculated) size of different request file website(css, js, html) had checked , compare result tool pingdom, gtmetrix... it's not right! this result: https://www.googleapis.com/pagespeedonline/v2/runpagespeed?url=https://stackoverflow.com/&callback=runpagespeedcallbacksmb&strategy=mobile&key=aizasyaefsjzhaicorvhxzd9be015_hxidruc_u tool pingdom: https://tools.pingdom.com/#!/egbivw/https://stackoverflow.com

c++ - How should I take a series of input in a vector? -

i used below given function inpvec didn't work because when used function in main function there no output using iterators... #include <iostream> #include <vector> using namespace std; void inpvec(vector <int> a, int veclen){ int b; for(int i=0;i<veclen;i++){ cin>>b; a.push_back(b); } } int main() { int n,j; cin >>n; vector <int> vac; vector <int> pat; vector <int>::iterator it; inpvec(vac, n); inpvec(pat, n); for(it=vac.begin();it!=vac.end();it++){ cout<<*it<<" "; } for(it=pat.begin();it!=pat.end();it++){ cout<<*it<<" "; } return 0; } your function void inpvec(vector <int> a, int veclen) makes copy of first parameter a . calling code see no difference. making reference change that void inpvec(vector <int> & a, int veclen) //

html - Can the following jQuery code be simplified? -

i have created 6 buttons , using jquery able block of data on click of each buttons. want know whether jquery code written can minimized? how achieve minimized code? $("#button1").click(function() { $("#text1").show(); $(".close").show(); $(".close").click(function() { $("#text1").hide(); }); }); $("#button2").click(function() { $("#text2").show(); $(".close").show(); $(".close").click(function() { $("#text2").hide(); }); }); $("#button3").click(function() { $("#text3").show(); $(".close").show(); $(".close").click(function() { $("#text3").hide(); }); }); $("#button4").click(function() { $("#text4").show(); $(".close").show(); $(".close").click(function() { $("#text4").hide(); }); }); $("#but

javascript - Tooltip flickering while typing -

i have tooltip warn when user entering number not in allowed range. everything works fine, problem flickering of tooltip, type flickers , if hold down number long, won't see tooltip. so anyway solve around this? demo <div class="row"> <label for="labelinput">win chance</label> <input type="number" class="form-control" id="chance" value="50"> </div> js $( document ).ready() block. $( document ).ready(function() { $('[data-toggle="tooltip"]').tooltip(); $('#chance').tooltip('dispose'); }); $('#chance').attr({"data-toggle": "tooltip", "title": "winchance must between 10 - 90"}); $('#chance').on('input', function() { if(parsefloat(this.value) > 90.00 ){ $('#chance').tooltip('show') } else if(parsefloat(this.value)

how to use update with join condition on 3 tables in postgresql -

update patient set p.patient_name='keerthi', c.pat_cnt_pincode=560765 patient p left join patient_contact c on c.pat_cnt_email_id=p.patient_email p.patient_id=921; you can update 1 table in single statement. but, do: with p ( update patient p set patient_name = 'keerthi' p.patient_id = 921 returning * ) update patient_contact pc set pat_cnt_pincode = 560765 p pc.pat_cnt_email_id = p.patient_email;

Move images from one server to s3 PHP Laravel 5.3 -

i'm trying write script i'm trying move images old server amazon s3. possible downloading image url? $companies = company::all(); $companies->each( function ($company) { //some method download file $file = download($company->logo); //store on s3 $filename = $file->storeas('images', uniqid('img_') . "." . $file->guessclientextension(),'s3'); //get new path $new_path = storage::disk('s3')->url($filename); //save new path logo $company->logo = $new_path; //save new path $company->save(); } you can use library php league filesystem it has integration laravel , other framewoks such zend, cake etc the library has adapter amazon s3 v2 , amazon s3 v3 full documentation here

io - how to read image file and convert it to bits in vhdl -

Image
i trying read image file using textio package in vhdl. if open .jpg notepad , junk data ascii data . here trying read these ascii data , convert them bytes. below code: library ieee; use ieee.std_logic_1164.all; use std.textio.all; use ieee.std_logic_textio.all; entity file_io port ( clk: in std_logic; data: out std_logic_vector(7 downto 0) ); end entity; architecture behav of file_io signal test_data : std_logic_vector(7 downto 0); use ieee.numeric_std.all; use std.textio.all; use ieee.std_logic_textio.all; begin file_reader:process(clk) file f : text open read_mode "c:\users\public\pictures\sample pictures\chrysanthemum.jpg"; variable l: line; variable var_int: integer:= 0; variable var_char: character; begin if rising_edge(clk) while not endfile(f) loop readline(f, l); read(l, var_char); var_int := character'pos(var_char); test_data <

sql - What is the easy way to delete rows in table for a given specific range? -

i have table has 2 columns, 1 flag (1 or 0) other 1 insert_date (format:28/02/2017 23:15:08). in every 5 minutes, insert statement executes in table. i need delete rows inserted before 8:00 , after 8:00 pm every day in month (insert statement executes every day of mounth in each 5 minutes). what's easy way done it, psql, trigger? create scheduler job last day of every month command: delete table1 extract (hour insert_date) not between 8 , 19 , trunc(sysdate, 'month') = trunc (insert_date, 'month');

android - Trace sighup visitors of my Apple Application -

i have application on apple store. running campaigns of google , facebook. want trace visitors signup (not visitors), come facebook or google or other url. when visitor signup want know comes from. any best solution. note: sorry if english not good.

ios - Completely kill ViewController programmatically In Swift -

when send notification notificationcenter, opened viewcontroller (with diffrent data) responding notification. example a b x data b y data b z data after scenario (in b viewcontroller), when pushed notification, notification observer calling 3 times. i use storyboard , programmatically navigation controller. you need remove notification observer in bviewcontroller add bellow method in bviewcontroller deinit { nsnotificationcenter.defaultcenter().removeobserver(self) }

php - Send the id of a selected option value to the controller -

i have select option witch contains labels selected database! my problem don't want send value of label, want send id. here code : <div class="form-group"> <h3>veuillez choisir un cycle :</h3><br/> <label>cycle: </label> <form method="post" accept-charset="utf-8" action="<?php echo site_url("filiere/filiere_add"); ?>"> <select name="cyc" id ="select1" class="input-small"> <?php foreach($cycle $row) {?> <option><?php echo $row->libelle; ?></option> <?php }?> </select> </form> <button class="btn btn-success" onclick="display()"><i class="glyphicon glyphicon-plus"><

c# - Expression function: Generic type T predicate -

is possible parse generic type t predicate expression , convert type , create new expression using converted type? i'm doing conversion t dto.company , after should mapping dto.company dal.company. in below code example i'm trying conversion first need know possible , secondly need know how convert dto.company dal.company inside predicate parameters before setting bar variable. // works!!!! want make generic possible! public t fetch<t>(expression<func<dal.company, bool>> predicate) t : class { var typeoft = typeof(t); if (typeoft != typeof(dto.company)) { return null; } var companies = _dbcontext.companies.where(predicate); var ret = new collection<dto.company>(); foreach (var company in companies) { ret.add(company.converttodatatransferobject()); } return (t)convert.changetype(ret, typeof(t)); } // not wor

mysql - What is the relationship between the vortex and the edge tables? -

Image
i work mysql database , have 2 tables namely vortex , edge . provided below, is one-to-many relationship exists between tables ? explanation helpful. there 2 one-to-many relationships because each vertex can source or destination of many edges, each edge can have 1 source , 1 destination. speaking in terms of rows in tables, have each vertex id appearing once in vertex table, potentially more once in vertex_src_id , in vertex_dst_id columns of edges table.

performance - Save Conditional sum result in variable MySQL -

i stuck in query want store sum result in variable status = 3, happening right store value of last row , show rows here query select request_made_on,driver_id, @sum_result = sum(status = 3) complete_count,@sum_result, sum(status = 6) missed_count, (status = 4) canceled_count, sum(actual_fare),sum(discount) tb_engagements group date(request_made_on),driver_id; and here screenshot, second screenshot i'm guessing want sum of values: select request_made_on, driver_id, (@sum_result := @sum_result + sum(status = 3)) complete_count, sum(status = 6) missed_count, sum(status = 4) canceled_count, sum(actual_fare), sum(discount) tb_engagements c cross join (select @sum_result := 0) params group date(accept_time), driver_id; notes: you don't need return value of variable expression. expression adds column result set value. you don't need if() count values. mysql has nice short-hand, treating boolean expressi

python - How to create virtual env with python3 -

i using python 2.7 + virtualenv version 1.10.1 running myproject projects. due other projects requirement have work other version of python( python 3.5 ) , django 1.9 . have installed python in user directory. have dowloaded , installed virtualenv( version - 15.1.0 ) user directory. whenever trying create virtual env getting below error python virtualenv/virtualenv.py myproject using base prefix '/home/myuser/python3' new python executable in /home/mount/myuser/project_python3/myproject/bin/python error: executable /home/mount/myuser/project_python3/myproject/bin/python not functioning error: thinks sys.prefix '/home/myuser/python3' (should '/home/mount/myuser/project_python3/myproject') error: virtualenv not compatible system or executable can tell doing wrong in python 3.6+, pyvenv module deprecated. use following one-liner instead: python3 -m venv <myenvname> this recommended way create virtual environments python community.

c# - WithSqlFilter WITH (NOEXPAND) hint not correct in output SQL -

i'm trying use new .withsqlfilter() extension method add "with (noexpand)" hint select statement generated against indexed view. however, output sql putting hint after clause instead of clause. customer dto has [alias("customerinfo")] . intended behavior or generating sql incorrectly? var customer = db.from<customer>() .where(ci => ci.customerid == customercode) .withsqlfilter(sql => issqlserver(db) ? sql + " (noexpand)" : sql); return db.single(customer); edit: needed issqlserver method because have unit tests , other code uses sqlite instead of sql server , needed able ignore hint based on connection. private bool issqlserver(idbconnection db) { var dialect = db.getdialectprovider(); return dialect servicestack.ormlite.sqlserver.sqlserverormlitedialectprovider || dialect servicestack.ormlite.sqlserver.sqlserver2012ormlitedialectprovider || dialect servicestack.or

Type of tag input in html5 -

Image
i wanted know there someway make tag this: html this: is possible using css, please tell me. sorry poor english.:) if want description on hovering can use title attribute..

java - Building a Jar - how to include resource files? IntelliJ 2017 -

Image
just clarify position on question: i using absolute paths because without them, tests fail. i think failing understand how use relative paths. as end result, want jar runs no file path dependencies. been searching. found no solution has worked me... i have folder format: src/main/java/packages/javafiles.java (there several) src/main/resources/prolog_files/fileiwanttoload.pl in code, have state absolute path: string currenttheory = "src/main/resources/prolog_files/kb.pl"; and load this: theory theory = new theory(new fileinputstream(currenttheory)); such when run javafx app, , run tests, works perfectly. however, when build jar, error: caused by: java.io.filenotfoundexception: src\main\resources\prolog_files\kb.pl (the system cannot find path specified) i've done lot of searching how make work; i've tried, , failed use: file currfile = new file(getclass().getclassloader().getresource("/src/main/resources/prolog_files/kb.pl").

node.js - Cannot uninstall angular-cli -

i've tried several times uninstall angular-cli in order update if follow instructions provided on github: npm uninstall -g @angular/cli npm cache clean npm install -g @angular/cli@latest when check using command ng --version still old version : angular-cli: 1.0.0-beta.26 node: 7.7.1 os: darwin x64 how can fix issue? thanks updating angular cli https://github.com/angular/angular-cli#updating-angular-cli if you're using angular cli 1.0.0-beta.28 or less, need uninstall angular-cli package first. npm uninstall -g angular-cli npm uninstall -g @angular/cli npm cache clean npm install -g @angular/cli@latest then when gets done may try: ng -v

database - Index table's pages - how many pointers do they contain? -

suppose have file f pages, each page contains 2 tuples, e.g. first 2 pages: (0, 1) (1, 2) ------ (3, 4) (4, 5) suppose want use hash function h(x) = x mod 2 make index table fi file f . assume want apply hash function on first attribute. hence hashes be: (0, 1) -> h(0) = 0 (1, 2) -> h(1) = 1 ------ (3, 4) -> h(3) = 1 (4, 5) -> h(4) = 0 and have 2 buckets, both containing 2 primary pages set null. bucket 0 [null] bucket 1 [null] now can fill buckets pointers, ie: bucket 0 [(0, 1)*, (4, 5)*] bucket 1 [(1, 2)*, (3, 4)*] however, question is, how stored in disk? 1 pointer per 1 page , so: bucket 0 [(0, 1)*] -> [(4, 5)*] bucket 1 [(1, 2)*] -> [(3, 4)*] where -> denotes pointer overflown page. or 2 pointers per page , no overflown pages? cannot find proper explanation of particular detail. moreover, when need read tuple given key k , how work need 1 i/o (assuming no overflown pages)? shouldn't 2 i/o, 1 i/o reads page index table fi

javascript - css encapsulation in Angular -

i have been exploring css , dom encapsulation angular components. i scaffolded quick project using ng-cli , loaded component. let's component selector 'app-component'. encapsulates dom , css pertaining component within itself. far. what have learned previous readings components neither allow external css bleed in nor internal css bleed out (this more specific web components) now, in index.html file included bootstrap css file observe whether styles bootstrap css bleeds component or not , surprise did. use classes provided bootstrap css inside component. why happening? external css bleeding component. understand view encapsulation concepts in angular doesn't fit in. sounds bit naive, may missing point here! edit basically referring this: https://developers.google.com/web/fundamentals/getting-started/primers/shadowdom this says: scoped css : css defined inside shadow dom scoped it. style rules don't leak out , page styles don't bleed in.

php - Symfony 3 orphanRemoval=true doesn't delete removed records from form -

i need t ocreate bus adding form. bus can have many amenities , that's why created onetomany relationship between bus , bus amenities. what want achieve let doctrine remove (or update) data onetomany table without looping or doing particular in controller. read somewhere can use orphanremoval=true annotation on entity take care of reason doesn't work... i can update existing , add new amenities (new data) can't delete records removed edit form. can done using orphanremoval=true or know problem code: here code: bus entity (shorted version): /** * @orm\onetomany(targetentity="busvehiclesamenities", mappedby="bus", cascade={"persist", "remove"}, orphanremoval=true) */ private $busvehiclesamenities; public function __construct() { $this->busvehiclesamenities = new arraycollection(); } /** * id * * @return integer */ public function getid() {

base64 - Internet Explorer fails opening a pdf string file [SOLVED] -

i receive (from webservice don't manage) string content of pdf file. on client's side, use function: window.open('data:application/pdf;base64,'+encodeuri(thestringwiththepdfcontent)); as usual, works in every browser ie (11 in case), shows alert message: "do want allow website open app on computer?" if no, empty white page opened. if yes, tries open "data" file (as reads protocol in window.open, guess) and, doesn't find application that, sends me microsoft application store, suggests me download "imusic" completely useless, of course. i've changed internet options i've guessed help, none works. any suggestion? thanks in advance, i found solution , want share has same problem. can see demo here : https://jsfiddle.net/quangminh_ln/hy36tnt6/ 'use strict'; var data = "...your pdf base64 string..."; var filename = "your_file_name"; if (window.navigator && window.na

Git push new project permission denied -

so tried create new project @ bitbucket , import current stuff. step 1: switch repository's directory cd /path/to/your/repo step 2: connect existing repository bitbucket git remote add origin ssh://git@bitbucket.org/kevinspence/app.git git push -u origin master after git push -u origin master i got error: $ git push -u origin master permission denied (publickey). fatal: not read remote repository. please make sure have correct access rights , repository exists. what doing wrong, (it not first project on bitbucket) it sounds don't have ssh key setup correctly. follow setup ssh key: https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html as else commented, page can troubleshoot further: https://confluence.atlassian.com/bbkb/permission-denied-publickey-302811860.html if still doesn't help, might opt add remote git using https instead of ssh. bitbucket should have drop-down under clone pick between https , ssh

angular - Why are CSS transformations on the same image interfering with one another? -

i'm new angular, apologies may dim question. i have 2 buttons click events: 1 modifying scale of image, , 1 rotating same image. triggering scale change overrides rotation , , vice versa. example i click rotate button, , image tilts. then click scale button, , image reduces in scale, loses tilt. html <button (click)="togglescale()" type="button" class="btn btn-outline-primary">scale</button> <button (click)="togglerotation()" type="button" class="btn btn-outline-primary">rotate</button> <img class="mainimg" src="./public/img/placeholder.png" [@scale] = 'scale' [@rotation] = 'rotation' /> animations animations: [ trigger('scale', [ state('fullscale', style({ transform: 'scale(1)' })), state('halfscale', style({ transform: 'scale(0.5)' })), transition(

command line interface - How to check PCF version -

is there way know pivotal cloud foundry licensed version using? i see there marketplace services offered free in public pcf not available in licensed pcf version using? assuming version mismatch might reason. the public version have services enabled various plans. plans may include free tier. the pcf setup organization purely based on agreement pivotal. have services opted organization. please check org manager or administrator pcf.

javascript - Changing the Length of drawn polyline : leaflet -

i new in using leaflet. can tell me how change length of drawn polyline in leaflet?. want make length small or large depending on zoom level. leaflet polyline array of points, each of them consist of lat , lng. change it's size need update array , change distance between points width setlatlngs() method. if want fit screen need screen bounding box width map.getbounds() lat or lng bbox , update line width it. so this: map.on('zoomend', function(){ var bounds = map.getbounds(); line.setlatlngs(bounds[0],bounds[1]); })

Android - Google Maps API v2 - get altitude of location -

i using google maps api v2 in android application, , know how elevation details of specific route, e.g 10km route ahead. i'd update graph on every location change. i know can this . not possible me. have map area downloaded offline use. want api give me elevation data those, without connecting internet.

java - Programmatic license resolvement -

is there possibility distinguish license of artifact artifactid:groupid:version e.g. accessing maven repository via rest api? what maven contentcheck plugin ? mvn contentcheck:show-licenses

excel vba - Macro to color code Cells that match Table with conditional formatting -

as title states, macro color code cells match table conditional formatting. i take cells in column x, , have excel search table (likely on sheet/tab) , when finds result (there no non-results, exception of reaching end of column in sheet1) fill cell color and/or text color exists in table on sheet2. i complete novice in coding , have no idea start. found result looked promising, not figure out how work: sub matchandcolor() dim lastrow long dim sheetname string sheetname = "sheet1" 'insert sheet name here lastrow = sheets(sheetname).range("a" & rows.count).end(xlup).row lrow = 2 lastrow 'loop through rows if sheets(sheetname).cells(lrow, "a") = sheets(sheetname).cells(lrow, "b") sheets(sheetname).cells(lrow, "a").interior.colorindex = 3 'set color red end if next lrow end sub this sheet values near 30-50 in table, matching sheet near 200 lin

spring - SpringXD - It is possible to scan different dirs via File source? -

i've these dirs |- dad dir |--- son dir 1 |---- file1.txt |---- file2.txt |--- son dir 2 |---- file3.txt it possibile single stream, using file source , extrapolate contents of file*.txt example, giving in input dad dir not standard source, can customize source use watchservicedirectoryscanner (java 7 or later) or recursiveleafonlydirectoryscanner not recommended large directory trees. see spring integration reference manual information configuring file inbound channel adapter. use scanner attribute on adapter.

x cart - What is customer/service_head.tpl file in Xcart? -

Image
am newbie in x cart. how load customer/service_head.tpl in xcart , not included,i can't saw file in skin/customer folder.is there process run file display in x cart?am confused don't know what's wrong. please give me solution. the file located here ./skin/common_files/customer/service_head.tpl the file loaded file skin/ your_skin_name /customer/home.tpl: {include file="customer/service_head.tpl"} or skin/ common_files /customer/home.tpl default try our 'webmaster mode' feature https://demo.x-cart.com/demo_goldplus/admin/editor_mode.php https://help.x-cart.com/index.php?title=x-cart:using_webmaster_mode

typescript - Angular 2 : How to set-up a @Input for an inline style? -

i have component needs display random values, randomly generated , pushed in trough @input bindings troughout template. far good, can't seem link @input style image url so: <a routerlink="{{nextlink}}" routerlinkactive="active" class="nav-link next" style="background: url('assets/images/{{nextbg}}');"> where {{nextbg}} file extension e.g. next.jpg => this aiming for. i tried using [ngstyle] , [style.background-image] without luck. here code: import { component, input } '@angular/core'; @component({ moduleid: module.id, selector: 'prev-next', template: ` <nav class="prev-next-nav"> <a routerlink="{{prevlink}}" routerlinkactive="active" class="nav-link prev" style="background: url('assets/images/tesla.jpg');"> <span class="link-dir">previous project</span>

Using aurelia-ux with EcmaScript -

can use aurelia ux ( https://github.com/aurelia/ux ) ecmascript instead of typescript ? did try ? what said here http://blog.aurelia.io/2016/11/04/introducing-aurelia-ux/ not clear enough. yes. developed aurelia team going usable in ecmascript in typescript. aurelia ux being developed in typescript, not in way preclude using ecmascript. also, blog post linked states: ecmascript developers not fear! our team split 50/50 between es , ts, can bet ux going work great regardless of preferred language is. we're committed that. i'm not sure how more unequivocal post have been.

python - Scrape Entire Website for Image URL's Only -

a client has retained me collect list of images on website. database huge mess, images stored on place (some in s3, on local server). need produce list of images migrate s3 new hosting company moving website to. i've tried crawling database dump using regexp , image list coming not match site using. what i'm looking do: unleash python script crawl entire website image url's. website wordpress, there lot of .jpg?8127 , such going on. don't care those, can clean output later. so, objectives are: -write python script follows every link on website, parses output image links. -dumps results text file cleanup , review i looking @ using https://pypi.python.org/pypi/imagescraper part of since seems make sense. how might best go this? i think need check scrapy project. scrapy can write crawler , using pipeline save images o url of images.

java - Playframework 2.5.0 : Unable to serve server-side generated zip file -

my playframework 2.5.0 application has serve temporary created zip file. create , fulfill zip file in /tmp directory, without problem (i can open in place , extract contained files). but file sent client seems truncated , can't opened. string temppath = "/tmp/" + label + ".zip"; file zipfile = new file(temppath); zipfile.deleteonexit(); zipoutputstream zos = null; try { zos = new zipoutputstream(new bufferedoutputstream(new fileoutputstream(zipfile))); (/* loops through files zip */) { inputstream = methodtogetthedocument(); zipentry zipentry = new zipentry(document.getlabel()); zos.putnextentry(zipentry); byte[] bytes = new byte[2048]; int count = is.read(bytes); while (count > -1) { zos.write(bytes, 0, count); count = is.read(bytes); } is.close(); zos.closeentry(); } return ok(zipfile); } catch (exception e) { return badrequest(&quo

iOS - Crashlytics missing dSYMs to process crashes -

Image
i know asked question. i spent entire day looking answers, without success. here different posts helped me, didn't fix issue. posts, documentation, twitt : missing dsym , no matching uuid , official documentation it looks missing dsyms. here configuration , have tried far : i have bitcode enabled (watchos support) i have downloaded dsym itunesconnect -> without success i searched in archive organizer (show package) -> without success i have set dwarf dsym file in build settings. i don't have matching uuid, read in posts, it's because apple compile app again when have bitcode enabled. what should ? released new version , crashlytics dashboard getting messy missing dsyms, 2 different versions now. if has additional information didn't read or know about, open-minded suggestions. nb: i have bitcode enabled watch , watch extension target, , whole project, not main target nor widget . thanks reaching out on this, todd fabric.

Can we deploy a C# 7 web app to Azure using Kudu? -

since visual studio 2017 released , can use new c# 7 features expected work when deploying on azure web apps. unfortunately we're seeing compile errors when using continuous deployment (kudu git deploy) seems azure doesn't support new toolchain yet. is there can work (besides publishing assemblies directly)? since don't yet have msbuild15 in azure. if want use c#7 features continuous integration, may need workaround for dotnet core web solution , can build in azure out of box . (it uses own dotnet msbuild.dll ) [ repository sample ] for asp.net web solution , need add microsoft.net.compilers 2.0+ nuget package project new language feature applied . example, if class library in solution using new syntax, need add nuget package lib project. (the new c# compiler imported if refer nuget package) [ repository sample ] finally mixed solution (dotnet core web app + .net framework class lib) , need run nuget restore .net framework lib project independently

r - Error on using spCbind with identical ‘"SpatialPolygonsDataFrame" structures -

i'm using cpcbind 'cbind' spatialpolygondataframes. receive error: *unable find inherited method function ‘spcbind’ signature ‘"spatialpolygonsdataframe", "spatialpolygonsdataframe"’* here's output of str( sps) , str( spso ), 2 dataframes want pass cpcbind( sps, spso). both spatialpolygonsdataframe have 2 columns , same number of rows; same projection, same id. that's different values in columns because these differently located polygons. str(sps) formal class 'spatialpolygonsdataframe' [package "sp"] 5 slots ..@ data :'data.frame': 1 obs. of 1 variable: .. ..$ id: int 1 ..@ polygons :list of 1 .. ..$ :formal class 'polygons' [package "sp"] 5 slots .. .. .. ..@ polygons :list of 1 .. .. .. .. ..$ :formal class 'polygon' [package "sp"] 5 slots .. .. .. .. .. .. ..@ labpt : num [1:2] 2876 5018 .. .. .. .. .. .. ..@ area : num 53871 .. .. .. .. .

streaming - understand and analyse the flink code, specially the scheduling part -

i working on improvement of resource , tasks scheduling of apache flink, please share tutorial or document on internal architecture of apache flink. share proper method of debuging flink code. your , experience of analyzing flink code appreciated. for how job scheduling works in flink, start looking @ https://ci.apache.org/projects/flink/flink-docs-release-1.2/internals/job_scheduling.html . generally, last part of current flink documentation contains information internals of apache flink.

algorithm - Finding all paths between two nodes on a DAG -

i have dag has following adjacency list l | g, b, p g | p, b | p | i | r r | \ i want find paths l r . know have kind of dfs, , have far. (excuse javascript) function dfs(g, start_vertex) { const fringe = [] const visited = new set() const output = [] fringe.push(start_vertex) while (fringe.length != 0) { const vertex = fringe.pop() if (!visited.has(vertex)) { output.push(vertex) (neighbor in g[vertex].neighbors) { fringe.push(neighbor) } visited.add(vertex) } } return output } the output of dfs(g, "l") [ 'l', 'p', 'i', 'r', 'b', 'g' ] indeed depth first traversal of graph, not result i'm looking for. after doing searching, realize there may recursive solution, there comments problem being "np-hard" , "exponential paths" don't understand. all paths start head

java - spring data rest with CrudRepository with @Embeddable -

i got following simplified entities: @data @entity public class salesprocess { private @id @generatedvalue long id; @manytoone private customer customer; private date nextcontactdate; private string nextcontactnote; @embedded @access(accesstype.property) private actualproduct actualproduct; private salesprocess() {} } @data @embeddable public class actualproduct { private string type; private date manufacturedate; private actualproduct() {} } this way have data bit separated though still in 1 table. to rest endpoint create simple interface extending crudrepository: public interface salesprocessrepository extends crudrepository<salesprocess, long> {} when request ` http://localhost:8080/salesprocesses/1 ' correct response embedded type included that: { ... actualproduct: { type: 'some type', ... }, } my problem when try create new salesprocess executing post request server actua

java - Is it possible to have two keyPressed events at one jTextArea? -

i've been working on project, basic kinetic novel, no frills, basic jtextarea s keypressed events. i've been wondering, possible handle more 1 function in 1 keypressed event? i have tried making 2 .settext functions still doesn't work. private void jtextarea1keypressed(java.awt.event.keyevent evt) { // first sentence jtextarea1.append("it midst of war."); // second sentence jtextarea1.settext("second sentence"); }

java - Float in JPQL query -

i have following method: public book findbookbytitleandversion(string title, float version) { typedquery<book>query = em.createquery("select b book b b.title = ?1 , b.version = ?2" ,book.class); query.setparameter(1, title); query.setparameter(2, version); return query.getsingleresult(); } i'm using mysql , have records should returned. store 'version' float type (1.22 in case). query returns: javax.persistence.noresultexception: no entity found query float has here, query title works fine.

Fill Pdf Form in Ruby using pdf-form gem -

i want programmatically fill pdf using pdf-form gem i able read fields using following code: require 'pdf_forms' pdftk = pdfforms.new('/usr/local/bin/pdftk') fields = pdftk.get_fields('*/desktop/sample_pdf.pdf') f in fields print f.to_s end but when tried fill pdf provide synthax, created empty, not openable pdf. pdftk.fill_form '/path/to/form.pdf', 'target.pdf', ['value name'] => 'value inserted' does know working solution? thanks in advance!!! additional information: the fields of pdf following: name, address, dropdown1, dropdown2, dropdown3, check box4, check box1, check box3, check box2, text5, button7, text6, group6, % i tried filling 1 field: pdftk.fill_form 'sample_pdf.pdf', 'sample_pdf_filled.pdf', {["name"]=>"value inserted"} the result: have pdf "sample_pdf_filled.pdf", cannot open, because it's empty. thought problem form-filling, se

Cannot import Google client after updating Android Studio -

after updating android studio 2.3 appears can not use code cloud endpoints class endpointsasynctask extends asynctask<pair<context, string>, void, string> { private static myapi myapiservice = null; private context context; @override protected string doinbackground(pair<context, string>... params) { if(myapiservice == null) { // once myapi.builder builder = new myapi.builder(androidhttp.newcompatibletransport(), new androidjsonfactory(), null) // options running against local devappserver // - 10.0.2.2 localhost's ip address in android emulator // - turn off compression when running against local devappserver .setrooturl("http://10.0.2.2:8080/_ah/api/") .setgoogleclientrequestinitializer(new googleclientrequestinitializer() { @override public void initialize(abstractgooglec

java - Hibernate issue - Repeated column in mapping for entity -

Image
i keep facing "repeated column in mapping entity: com.ts.user.entity.tutrptlocyearly column: locid (should mapped insert="false" update="false")" issue whenever running unit test. seeking , advice fix problem, tried hard fix issue, error keep happen? below situation i created 2 tables, tut_location (primary key: locid) , tut_rpt_loc_yearly (primary key: locid + year, foreign key: locid). using eclipse jpa tools, generated 3 class me, tutlocation.java, tutrptlocyearly , tutrptlocyearlypk. tutlocation.java @entity @table(name="tut_location") @namedquery(name="tutlocation.findall", query="select t tutlocation t") public class tutlocation extends initentity implements serializable { private static final long serialversionuid = 1l; @id private integer locid; private string name; //bi-directional many-to-one association tutrptlocyearly @onetomany(mappedby="tutlocation", cascade