Posts

Showing posts from May, 2011

javascript - How to use mapping to transfer things to an empty array? -

i trying pass on function inside of variable inputone empty array of transferhere this not seem working. how can map inside of inputone transferhere, transferred over? var transferhere = []; var inputone = transferhere.map(function(name) { return (5 * name) - 20; }); the map function iterates on array of values , generates new array of values. for example: var arr1 = [1,2,3]; var result = arr1.map(function(val){ return val + 1; }); //result be: [2,3,4] so seems doing wrong , code should (assuming inputone array): var transferhere= inputone.map(function(name) { return (5 * name) - 20; }); update: from comment understand inputone function , want put it's actual content (i.e. string) in array, here how: var arr1 = []; arr1.push(inputone.tostring());

c# - How to display variable sized items? -

Image
i have list of strings want them clickable , displayed horizontally next each other, if there no space left, container should continue arrange items in next line. please me. you should use wrappanel kind of layout. not available in windows runtime standard controls, here can find implementation it. usage: <itemscontrol> <itemscontrol.itemspanel> <itemspaneltemplate> <controls:wrappanel/> </itemspaneltemplate> </itemscontrol.itemspanel> <itemcontrol.items> <!-- put strings here or use itemtemplate instead --> </itemcontrol.items> </itemscontrol>

visual studio 2015 - T4 assembly name not reading $(TargetDir) or $(SolutionDir) -

i trying project's dll file: <#@ assembly name="$(solutiondir)\project.dll" #> but got error: system.io.filenotfoundexception: not find part of path 'c:\program files (x86) microsoft visual studio 14.0\common7\ide\$(solutiondir)\project.dll note didn't parse variable $(solutiondir) , instead used default url. any ideas how make read variable? edit: assembly used inside view generating template.

Running a php server in Phing -

i want run task in phing first run php server , run php unit test. this have far: <target name="test"> <!-- run php server --> <exec executable="php"> <arg line="-s localhost:81 server.php"/> </exec> <!-- run tests --> <exec executable="${phpunit.bin}" dir="${test.dir}" passthru="true" returnproperty="test.result"> <arg line="integrationtests"/> </exec> <!-- check if succeeded --> <condition property="test.succeeded"> <equals arg1="${test.result}" arg2="0"/> </condition> <fail unless="test.succeeded" message="unit tests failed"/> </target> the issue phing hangs after creating php server. the issue solved adding spawn property so: <exec executable="php" spawn="true">

opengl - Type mismatch vertex attribute -

i write glsl wrapper education purposes, stopped because have misunderstanding. when want insert variable specific location, have mismatch warning. because location glint, glvertexattrib location must gluint. here's code sample bool material::addattrib(glchar *variable, std::vector<gldouble> values) { glint location = glgetattriblocation(program,variable); glenum error = glgeterror(); bool isnor = printerror(error); if(!isnor) return isnor; switch (values.size()) { case 1: glvertexattrib1d(location, values.at(0)); break; case 2: glvertexattrib2d(location, values.at(0), values.at(1)); break; case 3: glvertexattrib3d(location, values.at(0), values.at(1), values.at(2)); break; case 4: glvertexattrib4d(location, values.at(0), values.at(1), values.at(2), values.at(3)); break; default: printerrorsize(); return false; } error = glgeterror(); isnor = printerror(error); return i

wso2carbon - Not able to execute custom function extension in wso2 cep -

i using wso2cep 4.1.0 , have created custom function extension class following package name: package org.wso2.siddhi.extension.custom; ..... public class myfunction extends functionexecutor { ..... } then have created file : custom.siddhiext an put following entry it. mycount=org.wso2.siddhi.extension.custom.myfunction i have created jar including both of above files. have created maven project above. then put jar /repository/components/dropins folder. and restarted cep wso2server. now executing following execution plan: my execution plan: from inputstream#window.timebatch( 1 sec ) select custom:mycount(param1) outparam insert outputstream; on creating outputsteam following exception: exception when validating stream, exception : 'mycount' neither function extension nor aggregated attribute extension in execution plan "executionplan" it seems jar put in dropin folder not read wso2server followed steps stated in [ https://docs.wso2.com/d

Cannot resolve property "criticismEngine" error in Spring xml configuration -

i have taken example book on spring , should create instance of aspect "Сriticaspect" of static aspectof() method, "cannot resolve property "criticismengine" error while configuring criticaspect in xml, although there such property in criticaspect class. xml config file looks like: <?xml version="1.0" encoding="utf-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:aop="http://www.springframework.org/schema/aop" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schem

In Docker swarm mode, is there a way to get managers' information from workers? -

in docker swarm mode can run docker node ls list swarm nodes not work on worker nodes. need similar function. know worker nodes not have strong consistent view of cluster, there should way current leader or reachable leader. so there way current leader/manager on worker node on docker swarm mode 1.12.1? the docs , error message worker node mention have on manager node execute swarm commands or view cluster state: error message worker node: "this node not swarm manager. worker nodes can't used view or modify cluster state. please run command on manager node or promote current node manager." after further thought: 1 way crack nut use external key/value store etcd or other key/value store swarm supports , store elected node there can queried nodes. can see examples of in shipyard docker management / ui project: http://shipyard-project.com/ another simple way run redis service on cluster , service announce elected leader. announcement service have co

IOS Build fails with annotations -

my ios builds fail if i´m using custom annotation (very simple one) following message: error while working class: java/lang/annotation/annotation file:com_we4it_aveedo_testanno no class definition and snipped build log annotation class: /var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/t/build5199219966381817658xxx/dist/myapplication-src/com_we4it_aveedo_testanno.m:2:73: error: use of undeclared identifier 'class__java_lang_annotation_annotation'; did mean 'class__java_lang_instantiationexception'? const struct clazz *base_interfaces_for_com_we4it_aveedo_testanno[] = {&class__java_lang_annotation_annotation}; ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ class__java_lang_instantiationexception in file included /var/folders/zh/kb_4hqhn4kg1h0r5dp_6htcm0000gn/t/build5199219966381817658xxx/dist/myapplication-src/com_we4it_aveedo_testann

javascript - How do I show a dropdown/dropdown list/select list inside of a angular material's dialog's content? -

i pretty new angularjs , using angular material , dialog precisely custom dialog show popup dialog. now able show dialog, problem not able show dropdown inside of dialog's <md-dialog-content> tag. i show dialog when click button. minimized code copied links added above: $scope.onclicked = function(ev) { $mddialog.show({ controller: dialogcontroller, templateurl: 'app/html/printdialog.html', parent: angular.element(document.body), targetevent: ev, clickoutsidetoclose:true, fullscreen: $scope.customfullscreen }) .then(function(answer) { $scope.status = 'you said info "' + answer + '".'; }, function() { $scope.status = 'you cancelled dialog.'; }); } now printdialog.html (which copied , file name changed full needs): <md-dialog aria-label="print report&quo

angular2 forms - angular 2 : after submitting data the validation is fire -

i not using form tag in html code data clear , route injected validation fire after make submit , new <div class="col-lg-6 col-md-8"> <input type="text" [disabled]="!iseditable" class="form-control" id="field-1" name="field1" pattern = "^[0-9]*$" placeholder="" maxlength="30" required [(ngmodel)]="country.countrycode" #field1 = ngmodel> <div class="alert alert-danger" [hidden]=" (field1.valid || field1.pristine)"> <ul> <li> in vlaid name </li> <li [hidden]="errordata.errordetails?.countrycode==null">{{errordata.errordetails?.countrycode}}</li> </ul> </div> </div> if (this.country.id == 0 || this.country.id == undefined) { // add this.dataservice.add("country/save", this.country).then((status:

html - adjusting input element inside div -

i have main <div> inside there left , right ones. on left one, have <input type = "text"> . my problem width , height of <input> element larger container left <div> . please me out input element. demo a native input has padding , border applied it. add input css: border: 0; box-sizing: border-box;

Rails - routing error on delete -

update rephrased after learning i have extended app new model called 'tag' (very similar set comments in blog). intended outcome: user stay on page when clicking link_to button delete tag; routing error (below) , don't understand why. no route matches [delete] "/annotations/7/tags" the tag list added view annotations this: <div class="panel panel-default" style="background-color: white; word-wrap: break-word; font-size: 0.9em;"> <table id="tags" class="table table-hover"> <thead> <tr> <th>tag</th> <th>type</th> <th></th> </tr> </thead> <tbody> <% @annotation.tags.each |tag| %> <tr> <td><%= tag.content %></td> <td><%#= tag.tag

oracle how to transfer SQL into member function -

one of assignment question is: method avgreviewscore() returns average review score album excluding scores anonymous reviewers, i.e. reviews null reviewer_name. so firstly wrote sql: (this oriented database assignment) select deref(b.album).title ,round(avg(b2.reviewscore),2) album_artist_table b,table(deref(b.album).review) b2 deref(b.artist).aname '%joe%' , b2.reviewername not null group deref(b.album).title; can ask how translate sql member function? i try create type called:avgreviewscore_type and create type body member function following: create or replace type body album_type member function avgreviewscore return avgreviewscore_type avgtable avgreviewscore_type := avgreviewscore_type(null,null); begin select deref(b.album).title,round(avg(b2.reviewscore),2) avgtable album_artist_table b,table(deref(b.album).review) b2 b2.reviewername not null grou

javascript - Angularjs Array indexes not getting displayed -

this going dumb question stuck long on piece, , fresh pair of eyes maybe see issue. i have 2 arrays 1 holds static data , temporarily holds single index of main array. i want display temporary array values on popup , if new index chosen data should cange next array value. my issue is: if try display fixed array values gets displayed fine, if try display temporary array values nothing shows. using exact same technique display both , static array works. html <button type="button" class="btn btn-default btn-block" ng-model="modela" ng-click="$ctrl.id(1);">more info</button> //popup <script type="text/ng-template" id="mymodalcontent.html"> <div ng-controller="popupctrl $ctrl"> <div class="modal-header"> <h2 class="modal-title" id="modal-title">{{$ctrl.array2}}</h2> </div> <di

python - Convert pandas dataframe column with xml data to normalised columns? -

i have dataframe in pandas , 1 of columns xml string. want create 1 column each of xml nodes column names in normalised form. example, id xmlcolumn 1 <main attr1='abc' attr2='xyz'><item><prop1>text1</prop1><prop2>text2</prop2></item></main> 2 <main ........</main> i want convert data frame so: id main.attr1 main.attr2 main.item.prop1 main.item.prop2 1 abc xyz text1 text2 2 ..... how that, while still keeping existing columns in dataframe ? the first step needs done convert xml string pandas series (under assumption, there same amount of columns in end). need function like: def convert_xml(raw): # etree xml mangling this can achieved e.g. using etree package in python. returned series must have index, each entry in index new column name appear, e.g. example: pd.series(['abc', 'xyz'], index=['main.at

javascript - Highcharts/highstock mouse wheel scroll keeps scrolling on y-axis in -

i working on asp.net mvc 5, using dot net highcharts display data i wanted add mouse wheel scrolling on y-axis when in zoom found bellow piece of code (function (h) { //internal functions function stopevent(e) { if (e) { if (e.preventdefault) { e.preventdefault(); } if (e.stoppropagation) { e.stoppropagation(); } e.cancelbubble = true; } } //the wrap h.wrap(h.chart.prototype, 'render', function (proceed) { var chart = this, mapnavigation = chart.options.mapnavigation; proceed.call(chart); // add mousewheel event h.addevent(chart.container, document.onmousewheel === undefined ? 'dommousescroll' : 'mousewheel', function (event) { var delta, extr, step, newmin, newmax, axis = chart.yaxis[0]; e = chart.pointer.normalize(event); // firefox uses e.deta

multithreading - Beanstalk setup with multiple queue worker: Jobs that spawns another jobs -

is safe spawn multiple jobs job workers start working on vacant jobs? currently set this. have 20 workers waiting jobs pushed. 1 of job send ios push notification, problem ios, can't send bulk messages. current: made was, job gets list of specific users batch, each device token db , start sending notification. scenario: if 1 topic has 1000 users, have 1000 users , devices , start sending on each device. push new job on queue , 1 worker pick app, while other workers vacant , waits incoming jobs. if no jobs available given time, worker 1 had job sending then, what working right now. safe if 1 big job, instead create jobs other workers vacant can pick , work? p.s jobs running in 1 tube. that sounds quite reasonable me, spreading load out among number of workers. there things careful - such setting appropriate priority. if task created dozens, or hundreds more tasks has higher priority job sending, potentially hundreds of thousands of jobs, workers may not runn

ios - How to filter UITableviewcells that contains async downloaded images - Swift -

i have uitablview contains number of cells represent employees each. and have uisearchbar filter list of employees, i'm storing employee data employee object has number of properties i'm filtering employees. what couldn't filter employee photo because didn't save property in employee object , call function downloading image inside cellforrowatindexpath , that's can't use image again . i need way save image later use . this cellforrowatindexpath code : override func tableview(_ tableview: uitableview, cellforrowat indexpath: indexpath) -> uitableviewcell { let cell = self.tableview.dequeuereusablecell(withidentifier: cellid, for: indexpath) as! employeecell if self.issearching == true { let emp = searchedemployees[(indexpath nsindexpath).row] cell.empname.text = emp.getfistname() + " " + emp.getlastname() cell.empposition.text = emp.getposition() cell.status.text=emp.getstatus()

java - Why does SAP JCo raise an error "Field ... not a member of ..." even though the field exists? -

i want send data sap rfc table servlet application. i trying below way. jco.function function = null; connection conn = new connection(); jco.client mconnection = conn.open(); jco.repository mrepository; mconnection.connect(); mrepository = new jco.repository("keyword",mconnection); try{ function = this.createfunction("my rfc name"); if(function != null){ function.getimportparameterlist.setvalue("id1","userid"); function.getimportparameterlist.setvalue("test name","uname"); function.getimportparameterlist.setvalue("classa","uclass"); mconnection.execute(function); } }catch(exception ex){ // exception handling goes here. } conn.disconnected(); but getting following error com.sap.mw.jco.jco$exception:<127> jco_error_field_not_found: field userid not member of input but checked, there exist column in sap. what missing here? should pas

Not able to convert string dd/MM/yyyy to Date dd/MM/yyyy in java -

i have input string of format dd/mm/yyyy , need convert date dd/mm/yyyy . my approach is: simpledateformat formatter = new simpledateformat("dd/mm/yyyy"); string date = formatter.format(formatter.parse("22/09/2016")); date converteddate = formatter.parse(date); i expecting 22/09/2016 date object, format returned not expected. o/p=>mon sep 12 00:00:00 ist 2016 any idea going wrong? in advance! you seem assuming java.util.date "knows" format. doesn't. that's not part of state - it's just number of milliseconds since unix epoch. (there's no time zone either - ist you're seeing there local time zone; that's part of date.tostring() does.) basically, date instant in time - when want particular formatted value, that's when use simpledateformat . (or better, use java.time.* ...) think of number - number sixteen same number whether represent in binary 10000, decimal 16, or hex 0x10. int value doesn

sql - Creating a citation section in an access report -

i have report broken out by: report header (not used) page header owner header detail section owner footer page footer report footer (not used) the detail section of report lists out of products owned specific owner, data pulled table. some of these products have special nuance them need documented. have created query isolates products , owners fit criteria. how post data query owner section of report , make sure data references products in detail section of report? - akin citation table.

Difference between Err.Raise and Error.Raise in VB6 -

i supporting old vb6 application , wonder why code uses both err.raise , error.raise. both appear in validations after each database call. we migrating application c#, , i'm trying understand subtle difference between these statements in order correctly reproduce both behaviors in c#. i spent quite few hours searching information on error.raise, , did not find useful. thanks, yves @marc right. error.raise wrong. calling "error.raise 1234" within scope of on error goto statement branch error block err.number = 424 , err.description = "object required". the solution becomes obvious : replace error.raise err.raise everywhere.

How to call javascript methods that are not in scope but utilise .call(this) -

i unsure on how call these functions such inventorycheck in web browser (chrome) console when seems not visible. there way can call this? thanks! below snippet of javascript file. (function() { var cc, addtobagcheck, addtocarterror, addtocartrequest, addtocartsuccess, availablesizes, displaycorrectshoe, inventorycheck, isvalidjson, processinventory, selectsize, showbuy, showerror, showsoldout, slice = [].slice, bind = function(fn, me) { return function() { return fn.apply(me, arguments); }; }; inventorycheck = function() { return availablesizes(function(product) { return processinventory(product); }); }; window.captcharesponse = function(response) { $('#captcha').addclass('checked'); $('#flashproductform').append('<input class="captcha-duplicate" type="hidden" name="x-prdrt" value="' +

php - SS_HTTPRequest could not be converted to a string -

i have silverstripe (3.4) page form work if didn't have dataobject in it. public function antwortform($id) { $nummer = vortest_fragen::get()->byid($id); if ($nummer) { $art=$nummer->art; } if ($art == 'normal') { $fields = new fieldlist( textareafield::create('antwort'), hiddenfield::create('id', 'id', $id), hiddenfield::create('vortestid', 'vortestid', $this->request->param('id')), hiddenfield::create('aktion', 'aktion', $this->request->param('action')) ); } else { $optionen = explode(';', $nummer->optionen); $a = 'a'; ( $i = 0 ; $i < count ($optionen); $i++) { $op[$a] ='<div style="width:25px;display:inline;">' . $a . ')</div> ' . $optionen[$i]; $a++; } $fields

r - Weird behaviour of the car::boxCox() function when wrap into a homemade function -

i'm trying wrap car::boxcox function homemade function can mapply list of datasets. i'm using boxcox function car package , not mass package because want use family="yjpower". problem weird , it's either fondamental don't understand or kind of bug. here reproducible example: library(car) le.mod <- function(val.gold,val.bad){ donn <- data.frame(val.gold,val.bad) res.lm <- lm(val.gold ~ val.bad, data=donn) bcres <- boxcox(res.lm, family="yjpower", plotit=f) lambda <- bcres$x[which.max(bcres$y)] donn$val.bad.t <- donn$val.bad^lambda res.lm <- lm(val.gold ~ val.bad.t, data=donn) list(res.lm=res.lm, lambda = lambda) } xx <- runif(1000,1,100) xxt1 <- xx^0.6 + runif(1000,1,10) yy <- 2*xx + 10 + rnorm(1000,0,2) le.mod(yy,xxt1) this gives me error message: ## error in is.data.frame(data) : object 'donn' not found i pin-pointed problem line: bcres <- boxcox(res.lm, family="yjpow

reporting services - SSRS error while report execution -

we using ssrs (microsoft sql server reporting services version 12.0.4100.1) generate report in csv format. its giving error below : an error has occurred during report processing. (rsprocessingaborted) unable translate unicode character \udd9c @ index 17 specified code page. we found issue because of below value. in sql server have value in 1 of field : 'hq6seaptfixyxs⟨ယԓ񷏒僧톭ʨᔑꌽῼ村鋶䈋==' but how can resolve ? (as same value present in sql sever not able generate report) note: able generate report unicode data. thanks. the csv export supposed set accept utf default, check rsreportserver.config file see if changed ascii. if these characters not valid can strip them out in report query (let know if need help).

How to align a column using the vi editor? -

i have column in numbers below -0.01343 0.002 -1.1234 i want align column in vi editor below -0.01343 0.002 -1.1234 so, want insert space before each line not starting minus: the appropriate command is :%s/^\([^-]\)/ \1/ this breaks down as: : - start command %s - regex on lines /^\([^-]\) - matching start of line, followed character other - , call group 1 / \1 - replace space followed whatever in group 1 / - end regex, perform no more once on each line other options: if select intended lines in visual block, typing : start command '<,'> . move onto regex starting s (no % ) , apply selected lines. if end /c ask confirmation on each replacement. if end /g work multiple times per line if applicable. /gc valid. if you'd wanted decimal points aligned, rather first digits, that's more complex , cannot done simple command in vi or vim.

PHP login form not working with mysql -

<?php if(array_key_exists("login",$_post)) { $link = mysqli_connect("dbaddress", "dbname", "dbpassword", "dbuser"); if(!$_post['regno']) { $error .= "please enter registration number"; } if(!$_post['password']) { $error .= "password required!"; } if($error!="") { echo "<p>there errors in forms!</p>".$error; } else { $query = "select * `users` registrationno = '".mysqli_real_escape_string($link, $_post['regno'])."'"; $result = mysqli_query($link, $query); $row = mysqli_fetch_array($result); if (isset($row)) { $hashedpassword = md5(md5($row['id']).$_post['password']); if ($hashedpassword == $row['password']) {

java - Camunda : get active tasks -

how can list of active tasks in code use in camunda ? i @ answer " how query position of process instance? " can't understand "processinstanceid" , supposed make method works. here's code i'm trying : package org.camunda.bpm; import java.util.hashmap; import java.util.list; import java.util.map; import org.camunda.bpm.engine.processengine; import org.camunda.bpm.engine.repositoryservice; import org.camunda.bpm.engine.runtimeservice; import org.camunda.bpm.engine.runtime.processinstance; import org.camunda.bpm.model.bpmn.bpmnmodelinstance; import org.camunda.bpm.model.xml.instance.modelelementinstance; public class allactiveactivities { public map<string, string> getallactiveactivities(string processinstanceid) { // engine services processengine processengine = bpmplatform.getdefaultprocessengine() runtimeservice runtimeservice = processengine.getruntimeservice(); repositoryservice repositoryservice = processengine.getrepositoryservice(

How do I change the Git Bash Here terminal from mingw to the standard cmd OR powershell on Windows 10? -

i have started absolutely hate mingw seem unable wrestle right click option "git bash here" away mingw. cant highlight in mingw , cant copy paste. want same functionality cmd has on windows 10. as such, how can change git bash use system32/cmd.exe or powershell instead? i have tried searching registry, have tried reinstalling. you edit registry @ hkey_classes_root\directory\background\shell\git_shell\command , hkey_classes_root\directory\shell\git_shell\command point shell prefer, or better yet add own parallel entries. the default property on first of these controls popup menu when right click on blank area (background) in explorer window, , second when right click on folder. if trying powershell, remember can use provider-paths registry::hkey_classes_root\directory\shell\git_shell\command get-item , set-item. if it's one-off, i'd use regedit won't have deal nested quotes.

java - Drag and Drop in Android Studio layout editor -

Image
i have problem adding images app's layout. i've searched answer while, when doing friendly people of internet told me, there still no success. images in png format in res/drawable folder. im trying drag'n'drop them content_*.xml preview. i can add elements palette. i using relativelayout. any idea may cause of problem? view of android studio screen: you must store images on drawables folders not in drawable -drawable-hdpi,drawable-mdpi,drawable-xhdpi..... you should drag imageview , add image src param . can't directly drag , drop images you can't add elements in "palette". relativelayout ... okay, whatever layout it's good update1 to see drawable folders must clic on arrow (see image1) , put on "project" (image2) ----------> see point 1. yes can drag&drop elemenst, textviews, imageviews, edittext....

text manipulation - bash: add column every n seconds -

i got output that: 0.000 0.002 0.000 0.002 0.000 0.026 ===== 0.026 note, how last line (0.026) endtime of phases before. repeat command every n seconds , want next output written next column like: 0.000 0.000 0.002 0.001 0.000 0.000 0.002 0.001 0.000 0.000 0.026 0.027 ===== ===== 0.026 0.028 i know sed -i solve problem can't work. since important have exact same timestamp on value cant execute command followed next 1 , write results place. the command gives me these values is: curl -w '\nlookup time:\t%{time_namelookup}\nconnect time:\t%{time_connect}\nprexfer time:\t%{time_pretransfer}\nstartxfer time:\t%{time_starttransfer}\n\ntotal time:\t%{time_total}\n' -o /dev/null -s http://linux.com/ using paste , command substitution can add new column side side previous output stored in file: paste -d '\t' prevfile.out <( curl -w '\nlookup time:\t%{ti

Tile/Tilemap visibility odd glitch (Haxe + OpenFL) -

i took sprite sheet of 7 frames (character running animation) , put in tile array. strange reason, can toggle visibility of each frame (on or off) unless placed inside conditional (if/then), in case stays on scree though trace reveals visibility false. ideas why? char[0].visible = false; //works! s = 10; if (s > 2) { char[0].visible = false; //trace's false, remains on screen }

Oracle get date formatted as string between two dates -

i trying work 2 formatted dates, if have to_date('20160101' yymmdd) , to_date('20160104', yymmdd) receive output: 20160101 20160102 20160103 20160104 is there fast way achieve without using pl/sql? thanks all! the format mask in to_date() must enclosed within single quotes too. to produce output in string format need apply to_char() same format mask. select to_char(to_date('20160101', 'yyyymmdd') + level - 1, 'yyyymmdd') dt dual connect level <= 1 + to_date('20160104', 'yyyymmdd') - to_date('20160101', 'yyyymmdd') ; dt -------- 20160101 20160102 20160103 20160104

Convert txt to csv python script -

i have .txt file inside - 2.9,gardena ca what i'm trying convert text .csv (table) using python script: import csv import itertools open('log.txt', 'r') in_file: stripped = (line.strip() line in in_file) lines = (line line in stripped if line) grouped = itertools.izip(*[lines] * 3) open('log.csv', 'w') out_file: writer = csv.writer(out_file) writer.writerow(('title', 'intro')) writer.writerows(grouped) the output in log.csv file - title,intro,tagline what want log.csv file show is: title,intro 2.9,gardena ca you need split line first. import csv open('log.txt', 'r') in_file: stripped = (line.strip() line in in_file) lines = (line.split(",") line in stripped if line) open('log.csv', 'w') out_file: writer = csv.writer(out_file) writer.writerow(('title', 'intro')) writer.writerow

angularjs - JavaScript/Angular borrowing a function and appending parameters -

lets have service function takes static param , second custom param varies based on controller injected in. want controller/view call service function without having write custom method in controller pass custom parameter. i'm not sure if technique involves currying, call, bind, or apply. .service('examplesvc', function() { this.call = function(param, controller) { console.debug(param, controller); } }) .controller('firstctrl', function($scope, examplesvc) { $scope.call = examplesvc.call; // magic happens here // avoid writing below $scope.call = function() { examplesvc.call('param', 'firstctrl'); } }); .controller('secondctrl', function($scope, examplesvc) { $scope.call = examplesvc.call; // magic happens here // avoid writing below $scope.call = function() { examplesvc.call('param', 'secondctrl'); } }); as understand need use service in view, easiest set $scope variable ser

testng - How to pass ITestNGMethod in @AfterClass method as parameter? -

i trying know after @test(test method), @afterclass got invoked. know wrote following code that: @afterclass(alwaysrun = true) public synchronized void teardownclass(final itestngmethod itx) { final method m = itx.getconstructorormethod().getmethod(); system.out.println(m.getname()); } but testng throws following error: method teardownclass requires 1 parameters 0 supplied in @configuration annotation. so question how resolve above issue, or there other way achieve this. thanks in advance. this wouldn't make sense: it's @afterclass method, gets invoked after test methods of class have run. specific scenario (wanting know last method invoked) specific should implement yourself. for example, create field lastmethod , have each method set name when reach @afterclass , know 1 ran last.

java - How to configure AspectJ working with in Weblogic 12c in a war package -

i can't configure weblogic 12c work aspectj. reading posts have done try configure it, can't reach result. project works maven , aspectj maven plugin. configuration it's following: pom.xml <?xml version="1.0" encoding="utf-8"?> <project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelversion>4.0.0</modelversion> <groupid>co.example</groupid> <artifactid>pruebaaspectj</artifactid> <version>1.0-snapshot</version> <packaging>war</packaging> <name>basicwebapp</name> <parent> <groupid>com.oracle.weblogic.archetype</groupid> <artifactid>wls-common</artifactid> <version>12.1.3-0-0</version> </parent> <dependencies> &

c# - Unable to create a constant value of type 'System.Char' -

i'm getting following error trying group , sum values via linq in ef6: unable create constant value of type 'system.char'. primitive types or enumeration types supported in context. i've looked @ half dozen similar questions on stackoverflow , can't find issue. here's query: var q = c in _context.hoursprovidercosts c.patientinsurancecompanyname == insurancename && c.hoursdate >= startdate && c.hoursdate <= enddate group c new { c.id, c.patientfirstname, c.patientlastname } g select new models.insurancecostlistitem { patientid = g.key.id, patientname = g.key.patientfirstname + ' ' + g.key.patientlastname, total = g.sum(x => x.providerrate) }; return q.tolist(); is in grouping (which i'm new to)? underlying ef6 model fine (i can expand results view of _context.hoursprovidercosts , @ data fine). thanks edit

html5 - How to get decimal ordered list inside an ordered list in HTML -

this question has answer here: can ordered list produce result looks 1.1, 1.2, 1.3 (instead of 1, 2, 3, …) css? 10 answers need decimal kind of listing inner ordred list 1. acsdv dfdfsf 1.1 fasffaf 1.2 wfwe trtt werwr wr please provide suggestions if any. in advance simply nest ul tags inside each other so: <ul> <li>1</li> <ul> <li>1.1</li> <li>1.2</li> <li>1.3</li> </ul> <li>2</li> <ul> <li>2.1</li> <li>2.2</li> <li>2.3</li> </ul> <li>3</li> <ul> <li>3.1</li> <li>3.2</li> <li>3.3</li> </ul>

php - How to setup Codeception with remote code coverage? -

i have 2 repo on machine api codeception repo tests api in api repo have added codeception+c3 "require-dev": { "codeception/codeception": "2.*", "codeception/c3": "2.*", i've included c3.php inside index.php, when trying test --coverage have error [phpunit_framework_exception] file_get_contents( http://local.api.codeception.com/c3/report/clear ): fai led open stream: http request failed! http/1.1 500 internal server error is there any online example of remote codecoverage codeception? ok, configuration nightmare, i've fixed it here example

php - Retrieve a post with its ACF repeater fields in wordpress -

in wordpress theme programming, created custom post type , template. custom post type displays list advance custom fields attached post template. in fact, used "repeater" field of advance custom fields pro. user has insert items of list when editing post. trying following: want display in 2 specific pages templates post custom fields (the list created through repeater). not able that, can retrieve "normal" fields of post (the title, content...). created snippet can @ code. <?php //the single of post: ?> <ul class='slider-partners'> <?php //slider partners if( have_rows('slider_partenaires_hp') ): //"slider_partenaires_hp" repeater field // loop through rows of data while ( have_rows('slider_partenaires_hp') ) : the_row(); // display sub field value echo "<li class='partenaire-slide'><img src='" . get_sub_field('

Identify user location in android -

Image
i'm quite beginner android , i'm trying out best learn android. i'm trying create android application identify user location using google maps. able identify user's location, not expected. as in following picture shows default location. once click button in top left corner, map shows location. i know location straight away, without clicking button. want know user location , store in string, not in longitude , latitude values. help? code: package com.example.lalinda.googlemap1; import android.support.v4.app.fragmentactivity; import android.os.bundle; import com.google.android.gms.maps.cameraupdatefactory; import com.google.android.gms.maps.googlemap; import com.google.android.gms.maps.onmapreadycallback; import com.google.android.gms.maps.supportmapfragment; import com.google.android.gms.maps.model.latlng; import com.google.android.gms.maps.model.markeroptions; public class mapsactivity extends fragmentactivity implements onmapreadycallback { priva

ios - SWTableViewCell left utility buttons, visible on first load in iPad -

Image
on ipad if run app shows view loaded: in patientappointmenttableviewcell subclass of swtableviewcell . in .m file of class i've added method: - (void)layoutsubviews { [super layoutsubviews]; cgrect frame = self.contentview.frame; frame.origin.x = [self leftutilitybuttonswidth]; self.frame = frame; self.cellscrollview.contentsize = cgsizemake(cgrectgetwidth(self.frame) + [self utilitybuttonspadding], cgrectgetheight(self.frame)); if (!self.cellscrollview.istracking && !self.cellscrollview.isdecelerating) { self.cellscrollview.contentoffset = [self contentoffsetforcellstate:_cellstate]; [self updatecellstate]; } } to in every line i'm getting error no visible @interface 'patientappointmenttableviewcell' declares selector leftutilitybuttonswidth property cellscrollview not found on object of type patientappointmenttableviewcell so doing wrong?

Silent install an Installsheild that contains an MSI in Powershell? -

i have executable installshield setup file need install silently. appears call msi file msiexec launched during installation. i've tried in powershell: start-process "c:\temp\mysetup.exe" -argumentlist "/s /v /qn" -wait however launches gui. ideas i'm doing wrong? i've searched , searched , seems cool kids doing refuses work me. many thanks. :) you can try "universal silent switch finder" (ussf) find , confirm switch usage.

.net - Has anyone been able to get ABCpdf.Net's Gecko Engine to run in an Azure App Service? -

i'm trying configure abcpdf pdf generator run in azure app service , can generate simple hello world pdf try convert html pdf gecko engine never response. the response azure 500 request timed out. here's hello world code: public fileresult helloworld() { activatelicense(); doc doc = new doc(); doc.addtext("hello world"); byte[] data = doc.getdata(); return file(data, "application/pdf", "hw.pdf"); } here's html pdf code: public fileresult googlepdf() { activatelicense(); byte[] pdfbytes; using (doc thedoc = new doc()) { thedoc.htmloptions.engine = enginetype.gecko; thedoc.addimageurl("http://google.com"); pdfbytes = thedoc.getdata(); } return file(pdfbytes, "application/pdf", "googlehomepage.pdf"); } example: http://abcpdfazure.azurewebsites.net/ source code: https://github.com/andyrblank/abcpdfazure in regards question being duplicate of one: abcpdf .net azure app service the fundam