Posts

Showing posts from September, 2011

resolve ticket as fixed with python jira api -

import jira def resolve_issue(jira,issue): jira.transition_issue(issue, '5', assignee={'name': 'pm_user'}, resolution={'id': '3'},comment={'name':"resolved ticket."})) [(u'5', u'resolve issue'), (u'821', u'request info'), (u'1011', u'rejected'), (u'1031', u' duplicate ')] are available transitions. not work resolve issue fixed python jira rest api. have tried list out transitions, don't see 'fixed' resolution id. suggestions? added error below text: can not deserialize instance of java.lang.string out of start_object token at [source: n/a; line: -1, column: -1] (through reference chain: com.atlassian.jira.issue.fields.rest.json.beans.commentjsonbean["body"]) i'm not sure if causing problem have wrap 'assignee' , 'resolution' changes in "fields" dict. have like: fields = { "res

Excel conditional count -

maybe asked before, cant describe in few tags/words. i newbie excel. how can countif cells in column on condition other simple comparison? example "count cell if contains data point other cell equal something", without additional temp columns ofc , vba. related question: possible set logic function during sum in range, return added value on given cell ? example if cell contains 5 add 9 total sum otherwise -3. actually, countif function can use formulae reference such less than, greater than, on.. please refer excel (f1). examples: =countif(c4:c26,a1) the above code means count range cells in c4:c26 "equal to" value in cell a1 =countif(c4:c26,"<0.2") the above code means count range values less 0.20 =countif(c4:c26,"<"&a1) the above code means count range values less value in cell a1. with regards next question, can use simple if function combination countif function such that: =if(countif(a1:a5,5)

java - Authorization header in aws requires signed parameter -

i have aws request call , following error while setting queue. com.amazonaws.services.sqs.model.amazonsqsexception: authorization header requir es 'signature' parameter. authorization header requires 'signedheaders' parameter/ mean? how set sign through java code ?

How to add class to to angular application using angular-cli command: 'ng generate class' without receiving error -

i'm referenceing https://www.sitepoint.com/ultimate-angular-cli-reference/ , says, to add class called 'userprofile', run : $ ng generate class user-profile when run command, installing class unable find apps in `angular-cli.json` based on this source code got error because .angular-cli.json not containg apps field. generate new sample-app , compare its .angular-cli.json one.

java - Android: SharedPreferences loses 2 of its variables after closing app -

i save couple variables via sharedpreferences without problem. however, 2 of these variables reset after restart app. think problem happens while saving, not while loading, because if change default value loading, doesnt use value, goes 0. i call method in onpause: public void savestats() { sharedpreferences pref = getsharedpreferences(shared_preferences, this.mode_private); sharedpreferences.editor editor = pref.edit(); editor.putlong(seconds_played_total_file, secondsplayedtotal); editor.putfloat(currency_gained_total_file, currencygainedtotal); editor.apply(); } and load onresum: sharedpreferences pref = getsharedpreferences(shared_preferences, this.mode_private); seconds_played_total = pref.getlong(seconds_played_total_file, 0); currency_gained_total = pref.getfloat(currency_gained_total_file, 0); the variables public , static. save , load similar public static variables without problem, 2 ones save @ onpause(). any idea? you try replac

javascript - Create a dynamic Bar graph using Chart.js where data is from database -

Image
i have been working on issue week , more until not able achieve right output this. i working online system data project database. have table enrollment records in database. using chart.js, wanted show dynamic bar graph of yearly enrollment. bar graph works shows inaccurate result count not match right year. i noticed, happens because when year no data, other year fills year, making result wrong. what ignore empty year data or set zero. hope can understand problem, because have been searching solutions can't find right answer. <script src="https://cdnjs.cloudflare.com/ajax/libs/chart.js/2.6.0/chart.min.js"></script> <script> var year = ['2000','2001','2002', '2003','2004','2005','2006','2007','2008','2009','2010','2011','2012','2013','2014','2015','2016','2017','2018','2019',

CancellationToken doesn't get triggered in the Azure Functions -

Image
i've got simple azure function: public static class mycounter { public static int _timerround = 0; public static bool _isfirst = true; [functionname("counter")] //[timeoutattribute("00:00:05")] public async static task run([timertrigger("*/10 * * * * *")]timerinfo mytimer, tracewriter log, cancellationtoken token) { try { log.info($"c# timer trigger function executed at: {datetime.utcnow}"); if (_isfirst) { log.info("cancellation token registered"); token.register(async () => { log.info("cancellation token requested"); return; }); _isfirst = false; } interlocked.increment(ref _timerround); (int = 0; < 10; i++) { log.info($"round: {_timerround}, step:

javascript - Variable returns undefined within a jquery function -

this question has answer here: why jquery or dom method such getelementbyid not find element? 6 answers $(document).ready(function() { var modelnumber = false; var description = false; $('#step-two-btn').click(function(e) { e.preventdefault(); modelnumber = $("#model-number-field").val(); description = $("#description-field").val(); alert(modelnumber); //undefined alert(description); //undefined }); }); can tell me why following variables returning undefined? have defined global variables jquery not seem recognize them. this seems working expected when set html $(document).ready(function() { var modelnumber = false; var description = false; $('#step-two-btn').click(function(e) { e.preventdefault(); modelnumber = $("#model-number-field").val();

Simple count of unique items in javascript array -

looking count of unique filenames contained in simple javascript array. i have javascript array combines 2 arrays via var total_dl = prev_dl.concat(new_dl).sort(); one json_encode() php variable, other made checkbox values selected on form. outputs simple list of file names, ie cat.jpg, dog.jpg, elephant.jpg, cat.jpg, lion.jpg, dog.jpg i can refine array of distinct values, var unique_dl = total_dl.filter((value,pos) => {return total_dl.indexof(value) == pos;} ); to output cat.jpg, dog.jpg, elephant.jpg, lion.jpg i need output count of how many unique/distinct filenames contained here, ie 4. first thought use length var count_unique = unique_dl.length; which seems give value of prev_dl + 1, unchanged whatever new_dl made of. try with var count_unique = unique_dl.filter(function(val, i, arr) { return arr.indexof(val) === i; }).length; fails (have misformatted here?). any pointers/steers here welcome, thanks. the unique_dl.leng

python - Convert column with mixed text values and None to integer lists efficiently -

imagine have column values data = pd.dataframe([['1,2,3'], ['4,5,6'], [none]]) i want output be: [[1,2,3]], [[4,5,6]], [none]] in other words, splitting comma-delimited strings lists while ignoring none values. this function works fine apply : def parse_text_vector(s): if s none: return none else: return map(int, s.split(',')) as in example: df = pd.dataframe([['1,2,3'], ['4,5,6'], [none]]) result = df[0].apply(parse_text_vector) but across millions of rows, gets quite slow. hoping improve runtime doing along lines of parse_text_vector(df.values) , leads to: in [61]: parse_text_vector(df.values) --------------------------------------------------------------------------- attributeerror traceback (most recent call last) <ipython-input-61-527d5f9f2b84> in <module>() ----> 1 parse_text_vector(df.values) <ipython-input-49-09dcd8f24ab3> in parse_text_vect

Regex replace in notepad++ but only certain parts of line -

i have file lines this: <a href="/foldername/subfolder/anothersubfolder/name%20of%20document.pdf">name%20of%20document.pdf</a> i convert to: <a href="/foldername/subfolder/anothersubfolder/name%20of%20document.pdf">name of document.pdf</a> ie, replace escaped space characters (%20) literal space character, in link name, not in url. i need remove other escaped characters, not spaces. how can in notepad++? as have 1 href per line, do: ctrl + h find what: ^.+?>[^%\n\r]*\k%20 replace with: a space replace all click replace all many times needed explanation: ^ : begining of line .+? : 1 or more character, not greedy > : literally > [^%\r\n]* : 0 or more character not % or line break \k : forget have seen until point %20 : literally %20 do not check . matches newline

postgresql - How can I Insert form data of a table into the database in php? -

php newbie here. have couple of questions please don't discourage me since i'm learning php language. so, question is: currently, using open source db(postgresql) , have made first php, form-type page. how can suppose insert form data of "table input type" database. see image please, need basics , not-so complicated solutions this. in advance. learn framework example yii2 framework just install configure db connection and create crud the definitive guide yii 2.0

ios - Accessing a CollectionViewCells data when selected -

i have uicollectionviewcell who's data want access when tapped. data used in view controller... instance, when tap on friend, next viewcontroller presented page tapped friends data. here didselectitemat indexpath override func collectionview(_ collectionview: uicollectionview, didselectitemat indexpath: indexpath) { let layout = uicollectionviewflowlayout() let vc = joingroupchatcontroller(collectionviewlayout: layout) vc.selectedindex = indexpath let livecell = livecell() vc.descriptionlabel = livecell.descriptionlabel.text present(vc, animated: true, completion: nil) } in essence want need indexpaths specific description label not default livecell label text. i know need use indexpath somewhere not sure / how. suggestions? replace let livecell = livecell() with let livecell = collectionview.cellforitem(at: indexpath) as! livecell

blueprism - Robotic Process Automation tags creation on stackoverflow -

i posting question create rpa - robotic process automation tags blueprism, automationnanywhere, roboticprocessautomation, rpa , workfusion. once tags in place organizing questions @ 1 place. robotic process automation (or rpa) emerging form of clerical process automation technology based on notion of software robots or artificial intelligence (ai) workers. source - https://en.wikipedia.org/wiki/robotic_process_automation love initiative! i suggest tags automationanywhere , blueprism etc (full tool names) , 1 generic, parent tag rpa . delete roboticprocessautomation tag.

tensorflow with cocos2d-x android failed to build fatal error: unsupported/Eigen/CXX11/Tensor: No such file or directory -

i have tried link prebuilt tensorflow library , try compile android project of cocos2d-x, give me error of eigen here error jni/../../../../tensorflow/third_party/eigen3/unsupported/eigen/cxx11/tensor:1:42: fatal error: unsupported/eigen/cxx11/tensor: no such file or directory #include "unsupported/eigen/cxx11/tensor" can me that?

How to change location of saved Performance Report files (VSP) for Python Profiler? -

i'm using python tools (py 3.5) , visual studio 2015 profile project ( analyze -> launch python profiling ). report saved in temp folder @ c:\users\<user>\appdata\local\temp on c drive, ssd ~110 gb. these 2 questions same mine [1 , 2] , except first 1 has solution of changing temp directory (which don't want do, i'm looking fix won't affect entire computer); , second 1 not work python profiling (i don't see options mentioned the documentation ) how change location of saved vsp file visual studio 2015 python profiling?

appium java android app UI test: the click() does not work? -

the driver got android element(button) , can print attribute of button. l have click button in java script ,but click() not work : ui has no changes! how make .click() work? the expect result : after click() button , ui shows new page or content button.

How to disable pasting inline styles on CKEditor? -

how disable contents styles when pasting ckeditor? overview, i'm trying fix width styles on dompdf, inline styles pasted ckeditor messing styles i've set in dompdf. i've applied posted here https://docs.ckeditor.com/#!/guide/dev_disallowed_content . and far, here's of tried ckeditor.config.disallowedcontent = "table(width)" , ckeditor.config.disallowedcontent = "table[style]" but when copy , paste word docs or customized html strings, styles or width still pasted. tips? thanks! first of if want remove width style table, need use: ckeditor.config.disallowedcontent = 'table{width}'; . the rule ckeditor.config.disallowedcontent = "table(width)" remove width class table , ckeditor.config.disallowedcontent = "table[style]" not because styles defined in {} , not in [] . read more format of allowed content rules here: https://docs.ckeditor.com/#!/guide/dev_allowed_content_rules but when copy

go - mongodb query using mgov2 -

i have collection of endpoint point tests conducted on various channels. sample document collection is: { "_id" : objectid("59959b30c699811077751b12"), "teststatus" : "fail", "channelname" : "housecontroller", "timestamp" : isodate("2017-08-17t13:15:53.170z"), "testid" : "llpkigifiiquqksapwnn" } i quering project result this: [ { "fail": 20, "success count": 30, "total": 50, "channel": "c3" }, ... but getting wrong count success , fail rate. current query in golang looks like: o1:= bson.m{ "$project" :bson.m{ "channel": "$channelname", "time":"$timestamp", "teststatus" : "$teststatus", "_id":1, }, } o2:= bson.m{ "$group" :bson.m{ "_id"

php - How to give pagination - First, Last, Next & previous navigation -

i working on websites pagination , using following code. <tr> <td class="nex_pre" colspan="3"> <?php $query="select * prosummary"; $query="select * prosummary"; $result=mysqli_query($connect,$query); $count=mysqli_num_rows($result); $pages=ceil($count/10); for($i=1;$i<=$pages;$i++) { ?> <a href="productmanager.php?p=<?php echo $i; ?>"> <?php echo $i;?></a> <?php } ?> </td> </tr> output showing :- 1 2 3 4 5 but wanna show output :- [first] [1] [2] [3] [4] [5] . . . . [10] [11] [12] [13] [14] [last] just concat $i whatever string need: something like: <a href="productmanager.php?p=<?php echo $i; ?>"> <?php echo $i==1 ? "[first]" : $i==$pages ? "[last]" : "[".$i."]";?></a>

javascript - fetch res.json continues to return unresolved promise -

i'm expecting this: fetch('https://response.democratsabroad.org/photos/?tag=alex') .then(res=>res.json()) .then(res=>console.log(res)) to return json object. instead returning pending promise. promise {[[promisestatus]]: "pending", [[promisevalue]]: undefined} screenshot of javascript console why passing unresolved promise instead of resolved value? first off, in case did not know already, anytime run line of code directly in console, console print out whatever line of code evaluates to. if line of code function call or series of functions calls in fetch(...).then(...).then(...) , console show chain of functions returns. doesn't wait promises resolve or callbacks called, executes line of code , reports returned. and, fetch().then() or fetch().then().then() returns promise in pending state. that's does. then, sometime later when fetch() operation done first promise complete , call .then() handlers. but, if you&

angular - 405 method not allowed error on foursquare post request in angular4 -

i trying upload foursquare user's profile photo angular web application. using "users/update" end point - https://developer.foursquare.com/docs/users/update here template, <input type="file" (change)="filechange($event)" placeholder="upload file"> here component code, filechange(event) { let fd:formdata=new formdata(); fd.append("photo",event.target.files[0]); let headers=new headers(); headers.append("content-type","multipart/form-data"); headers.append("accept","application/json"); headers.append("access-control-allow-origin","true"); let options=new requestoptions({headers:headers}); this.http.post("https://api.foursquare.com/v2/users/self/update?oauth_token=myauthtoken&v=20160108",fd,options) .map(response=>response.json()) .subscribe( da

angular - Push notification icon is different for different phones -

in ios , android phones push notification using normal image more xxxhdpi density showing transparent image need show same image in android phone please me on issue. <icon src="resources/android/icon/drawable-ldpi-icon.png" density="ldpi"/> <icon src="resources/android/icon/drawable-mdpi-icon.png" density="mdpi"/> <icon src="resources/android/icon/drawable-hdpi-icon.png" density="hdpi"/> <icon src="resources/android/icon/drawable-xhdpi-icon.png" density="xhdpi"/> <icon src="resources/android/icon/drawable-xxhdpi-icon.png" density="xxhdpi"/> <icon src="resources/android/icon/drawable-xxxhdpi-icon.png" density="xxxhdpi"/> <hook src="scripts/android/copy_res.sh" type="before_build" />

What's required to build a complete HTTP reverse proxy in go? -

a naive reverse proxy this: package main import ( "net/http" "net/http/httputil" "net/url" "fmt" ) func main() { // new functionality written in go http.handlefunc("/new", func(w http.responsewriter, r *http.request) { fmt.fprint(w, "new function") }) // don't in go, pass old platform u, _ := url.parse("http://www.google.com/") http.handle("/", httputil.newsinglehostreverseproxy(u)) // start server http.listenandserve(":8080", nil) } but, incomplete. depending on website might not useful back. https redirect. complain direct ip access. suspect virtual hosts don't work? not sure. what true reverse proxy makes complete? the simplest way implement reverse http proxy in go httputil.reverseproxy type in standard library. this gives flexibility set director function can modify incoming requests, , transpor

Error in retrieving metric values from metric definitions of Microsoft Azure REST api -

Image
i trying metric values of different metric definitions through rest uri. https://management.azure.com/subscriptions/{subscriptionid}/resourcegroups/{resource groupname}/providers/microsoft.compute/virtualmachines/{vm name}/providers/microsoft.insights/metrics?api-version=2016-09-01 it returns me percentage cpu metric values while other metric definitions values doesn't show up. what issue? it returns me percentage cpu metric values while other metric definitions values doesn't show up. as far know, if no filters specified, default metric returned . can specify metrics' name in filter make returns metrics want. i'm using following filters, , can percentage cpu , network in metrics response. $filter=(name.value%20eq%20'percentage%20cpu'%20or%20name.value%20eq%20'network%20in')%20and%20starttime%20eq%202017-08-19%20and%20endtime%20eq%202017-08-21

sqlite3 - SQLite select multiple rows using id -

i not sure if there kind of technical limitation or if losing mind. trying query specific rows sqlite database using , conditions on ids of rows want. query not returning results , causing logger throw error stating there syntax error. here query: select * equipment id = 2 , id = 3 , id = 4 , id = 7 , id = 11 , id = 34 and here syntax error log: aug 17 2017 23:12:23 [err]: err002 - query on equipment not prepared: near "=": syntax error @ file: c:\users\geowil\documents\visual studio 2015\projects\ov_pocs\universearc_poc\datasystem.cpp line: 323. so, sailed on sqlfiddle try , see if missed something. link below. displaying same behavior, , conditions returns no results running queries on single ids or range of ids works. http://sqlfiddle.com/#!5/68cd3f/4 am doing wrong or limitation of sqlite? update: had brain wave. using id in(1,3,4) works on sqlfiddle want repurpose question asking why works original query did not. use "in"

jquery - Get parameter and value appended to the extension of .js file -

i'm working on site has js file included this: <script type="text/javascript" src="script.js?param=value"></script> is there way can - inside script.js - param , value? since script runs synchronously html parser, can last script element , read src : var scripts = document.queryselectorall("script"); var script = scripts[scripts.length - 1]; console.log(script.src); // "script.js?param=value" then use string parsing grab what's after ? , break name/value pairs, etc. or if use async or defer on script element , may not last one, 1 src contains script.js : var script = document.queryselector("script[src*=script.js]"); console.log(script.src); // "script.js?param=value" this bit less reliable, since scripts can renamed. use queryselectorall("script") , find 1 parameters of sort expect. for avoidance of doubt: don't recommend it. prefer pass options initializ

reactjs - Element type is invalid: got: undefined -

import * react 'react'; import * reactdom 'react-dom'; import {jumbotron} 'ui-library'; import registerserviceworker './registerserviceworker'; import './index.css'; reactdom.render( <jumbotron />, document.getelementbyid('root') htmlelement ); registerserviceworker(); this index.ts import * react 'react'; class jumbotron extends react.component<{},{}>{ constructor(props:{},context: {}){ super(props,context) } render(){ return (<h1>hello, world </h1>); } } export default jumbotron this topheader defined in library this index.ts of ui-library export {default jumbotron} './jumbotron'; export {default topheader} './topheader'; i getting following error react element type invalid: expected string (for built-in components) or class/function (for composite components) got: undefined. any appreciated. change ui-library file t

excel - Make the below program Run faster -

i have program below. takes excel files folder, fetches data cell locations of file , puts in other larger file. thing program running, taking time complete. need make faster. ideas welcome, thankyou in advance. if point me directions or provide line of codes used alternative make faster much appreciated. thankyou. import openpyxl import xlrd import xlwt import datetime import os xlrd import open_workbook xlwt import workbook xlutils.copy import copy import win32com.client win32 import ctypes.wintypes os import path processed_file_path=r'd:\pcn_automation\processed_pcns' dir_path='d:\pcn_automation' dir_output_path='d:\pcn_automation' wb_openpyxl=openpyxl.load_workbook(os.path.join(dir_output_path,'concat_pcn.xlsx')) #wb_openpyxl=openpyxl.load_workbook(os.path.join(dir_output_path,'concat_pcn_copy.xlsx')) sheet_openpyxl=wb_openpyxl.active last_row_index_where_inserted=0 #this indicates index too. automatically inserted in next index

node.js - Simulating heavy load in node/electron application -

i looking spawn child processes in background of electron app handle tasks. while i'm working on this, i'd see how affects performance of front end. there function can run simulate semi-heavy processing node process? end goal here make sure building app has snappy ui when there background processes under heavy load. i've messed in past , want head start on making sure don't repeat mistakes.

angularjs - Angular Js - Dropzone file formData not getting attached to the DOM -

after uploading file getting file details in console after clicking submit following error(s) seen ... no 'access-control-allow-origin' header present on requested resource. origin http://localhost:19242 ' therefore not allowed access. response had http status code 500. error: [object object] undefined actually after submit should redirect other page , service defined should bind formdata dom not happening. please let me know if any other details required, provide that.

javascript - Cannot send a file through FormData object in http request. Formidable cannot find any file in server end -

i want upload file angularjs in client side , nodejs , express in server side. in angular, i'm using lf-ng-md-file-input directive upload file. in server side, i'm using package formidable parse multipart form data. here html code: <lf-ng-md-file-input lf-submit-label="upload" lf-files="files" submit lf-on-submit-click="onsubmitclick" ng-change="onsubmitfileschange()" progress> </lf-ng-md-file-input> and angular code submit click: $scope.onsubmitclick = function(files) { console.log(files[0]) //this shows file object correctly console.log($scope.file) var formdata = new formdata() angular.foreach(files,function(obj){ if(!obj.isremote){ console.log(obj) formdata.append('files', obj.lffile); } }); formdata.append('source', $scope.file.source); formdata.append('batch', $scope.file.batch); (var pair of for

waze - Guide for creating a navigation on google maps -

i'm working on app right now. i'd know if have guide on navigation, marker moving on road , trail drawing of line. it's opposite of waze doing when navigating, marker following drawing of line. i done basics of google maps api, creating flag, drawing direction point b , etc. thank help! :)

An embedded database that supports compressions -

i looking embedded database supports compression, similar sqlite's zipvfs, not involve me building scratch. use case want able run embedded database in amazon lambda restricted 500mb disk space. size of data exceeds (even normalization) need able work compression.

java - Redirect to another controller with a @PathVariable -

how redirect controller path variable in redirect. tried following way error: java.lang.illegalargumentexception: model has no value key 'formid' how implemented it: long formid = drugtype.getformid(); view = "redirect:/pub/req/customform/view/{formid}"; and received controller: @requestmapping(method = requestmethod.post, value = "/pub/req/customform/view/{formid}") string completecustomform(@pathvariable long formid, @valid @modelattribute customformlayout customformlayout, bindingresult errors, httpservletrequest request, model model, redirectattributes attr) { any ideas how can redirect controller formid value? try applying parameter: long formid = drugtype.getformid(); view = "redirect:/pub/req/customform/view/"+formid;

arrays - Is the glVertexAttribPointer state bound to the current GL_ARRAY_BUFFER? -

i have simple question. right, glvertexattribpointer operations have called once gl_array_buffer save attribute states until want change them? or need call glvertexattribpointer each time in between glbindbuffer(gl_array_buffer, ...); , gldrawarrays(...); ? is right, glvertexattribpointer operations have called once gl_array_buffer save attribute states until want change them? or need call glvertexattribpointer each time. glvertexattribpointer specifies location , data format of array of generic vertex attribute @ specified index. this has done before object drawn: glbindbuffer( array_buffer, posbufobj ); glenablevertexattribarray( 0 ); glvertexattribpointer( 0, .... ); glbindbuffer( nvbufobj ); glenablevertexattribarray( 1 ); glvertexattribpointer( 1, .... ); gldrawarrays( .... ) gldisablevertexattribarray( 0 ); gldisablevertexattribarray( 1 ); glbindbuffer( array_buffer, 0 ); yes, sufficient call glvertexattribpointer once per vetrex attribute. vertex

java - Selenium Webdriver Loop -

i have array within test case passed string select random item array. i'm having problem whereby when array called within loop, same value array chosen each time. here array in question - sits within base class. private string asapselector = "#main-view > div > section:nth-child(1) > section:nth-child(7) > div:nth-child(2) > radio-button-collection > custom-radio-button:nth-child(1) > label"; private string laterselector = "#main-view > div > section:nth-child(1) > section:nth-child(7) > div:nth-child(2) > radio-button-collection > custom-radio-button:nth-child(2) > label"; string [] dateandtime = {asapselector, laterselector}; //date & time array string randomdateandtime = (dateandtime[new random().nextint(dateandtime.length)]); //select random date & time array also, method calls 'randomdateandtime' sits within base class , looks like protected void selectdatetimeradio() { driver.finde

html - How to turn off Autocapitalize in our JSp page -

i have text thats getting displyed inside div element sample text when text getting displayed on browser, first letter of words in text getting displayed in upper case. i tried autocapitalize="off" turn off auto capitalize not working. other way it? inside div's style try text-transform: none;

r - Defining events that happen at the same time as one event -

this question has answer here: aggregating unique identifier , concatenating related values string [duplicate] 4 answers i have time-series of events: time <-c("01-01-1970","01-01-1971","01-01-1971","01-01-1972") event <-c("a","a","b","b") df <- data.frame(time, event) time event 1 01-01-1970 2 01-01-1971 3 01-01-1971 b 4 01-01-1972 b now, put events happen @ same time in 1 line. in example rows 2 , 3. outcome should this: time event 1 01-01-1970 2 01-01-1971 & b 4 01-01-1972 b any ideas how this? best, felix you can use aggregate: aggregate(df$event,by=list(df$time),fun= paste,collapse = " & ")

c++ - Why make_nvp needs non-const reference? -

why non-const reference here? template<class t> const nvp< t > make_nvp(const char * name, t & t); the reason i'm asking have structure public fields , need make them private , use accessors instead. know if i'm allowed use temporary variable , pass them make_nvp or need befriend serializer data structure. // option 1 auto = data.geta(); ar & make_nvp("a", a); // option 2 ar & make_nvp("a", data._a); // _a private, serializer friend i don't know ar because it's templated parameter, in cases make use of non-constness , save later use , option 1 problematic. in boost archive, can use single function both serialization , deserialization. achieved using archive template argument - can output archive serializes structure or input archive loads struct file. deserialization function needs non-const reference store deserialized value , that's why make_nvp needs non-const reference. coming question: opti

Assigning a step to a variable in Jenkins Pipeline -

i have following pipeline script: node { def mystep = sh mystep "ls -la" } i thought steps visible variables , assigned variables can used later (for example choosing different step depending on conditions). however, fails with: [pipeline] end of pipeline groovy.lang.missingpropertyexception: no such property: mystep class: groovy.lang.binding @ groovy.lang.binding.getvariable(binding.java:63) @ org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.sandboxinterceptor.ongetproperty(sandboxinterceptor.java:232) @ org.kohsuke.groovy.sandbox.impl.checker$6.call(checker.java:282) @ org.kohsuke.groovy.sandbox.impl.checker.checkedgetproperty(checker.java:286) @ com.cloudbees.groovy.cps.sandbox.sandboxinvoker.getproperty(sandboxinvoker.java:28) @ com.cloudbees.groovy.cps.impl.propertyaccessblock.rawget(propertyaccessblock.java:20) @ workflowscript.run(workflowscript:3) @ ___cps.transform___(native method) how can put step in variable use later with

ubuntu - apt-get permission error on node.js setup -

i trying install node.js 7 on ubuntu. on running command curl -sl https://deb.nodesource.com/setup_7.x | bash - or sudo curl -sl https://deb.nodesource.com/setup_7.x | bash - i following error: ## installing nodesource node.js v7.x repo... ## populating apt-get cache... + apt-get update reading package lists... done w: chmod 0700 of directory /var/lib/apt/lists/partial failed - setupaptpartialdirectory (1: operation not permitted) e: not open lock file /var/lib/apt/lists/lock - open (13: permission denied) e: unable lock directory /var/lib/apt/lists/ w: problem unlinking file /var/cache/apt/pkgcache.bin - removecaches (13: permission denied) w: problem unlinking file /var/cache/apt/srcpkgcache.bin - removecaches (13: permission denied) error executing command, exiting i have run: apt-get update this again results in error above, when run sudo apt-get update there no error again on running first 2 commands give error again. i have tried autoremove purge , upg

mongoose - Justifying the use of MongoDB -

i'm new full stack development , need justifying use of mongodb web app. use mongoose , schema-based solution model application data. i built simple web app (website) shows art projects gallery. during development discovering needed additional fields in schemas. because mongodb flexible , allows dynamic modification of schema came helpful. another thing find appealing monogdb uses javascript object notation (json) readable humans , machines. because i'm not familiar relational database management system , relational databases, don't state benefits of using mongodb in comparison others. please help. if have application requires transactions (atomic batch operations or nothing), , don't want scale database across multiple instances don't use mongodb use sql database system. mongodb used database data doesn't respect schema, while sql database systems require schema, , gives layer validate data before saving database. when working documents

icinga2 - Monitor managed MySQL Server from Icinga -

i using azure managed mysql server host dbs. i want monitor using test connection 1 of db whether server or not. how can add check icinga2 service? ps - aware of check_mysql command how use it? working example helpful. thanks the bare minimum you'll need is: check_mysql [-d database][-h host][-p port][-u user][-p password] the text in icinga2 is: object checkcommand "mysql" { import "plugin-check-command" command = [ plugindir + "/check_mysql" ] timeout = 1m arguments += { "-c" = "$mysql_cacert$" "-d" = "$mysql_cadir$" "-h" = "$mysql_hostname$" "-l" = "$mysql_ciphers$" "-p" = "$mysql_port$" "-s" = { set_if = "$mysql_check_slave$" } "-a" = "$mysql_cert$" "-c" = "$mysql_critical$&q

database - Updating datas in another form c# -

Image
hello guys can me problem how can update information form have 2 forms here 1 information list , want second form update list in info lists here's code form information lists info lists(first form): updating info (second form) to first picture info form here's code public partial class form3 : form { sqlconnection con = new sqlconnection(@"data source=.\sqlexpress;attachdbfilename=c:\users\pc\documents\visual studio 2010\projects\gg\gg\database1.mdf;integrated security=true;user instance=true"); sqlcommand cmd = new sqlcommand(); sqldatareader dr; public form3() { initializecomponent(); } private void button1_click(object sender, eventargs e) { } private void form3_load(object sender, eventargs e) { cmd.connection = con; loadlist(); } public void loadlist() { listbox1.items.clear(); listbox2.items.clear(); listbox3.items.clear(); listbox

angular2 template - ngSwitchWhen doesn't work when duplicate whens are written -

i learning angular2 using ng-book2 book , playing around built in directives. reading ngswitch , stumbled upon feature can write multiple ngswitchwhen same conditions following code: <ul [ngswitch]="choice"> <li *ngswitchwhen="1">first choice</li> <li *ngswitchwhen="2">second choice</li> <li *ngswitchwhen="3">third choice</li> <li *ngswitchwhen="4">fourth choice</li> <li *ngswitchwhen="2">second choice, again</li> <li *ngswitchdefault>default choice</li> </ul> which output following result: second choice second choice, again i wrote code below: <div [ngswitch]="myvar"> <div *ngswitchwhen="myvar==1">my var 1</div> <div *ngswitchwhen="myvar==2">my var 2</div> <div *ngswitchwhen="myvar==3">my var 3

java - Conditional inclusion of JARs in a WAR built by Maven -

i have build war file using maven include jars conditionally, each jar created seperate maven project deploys jar nexus(our organisations remote) repository eg : have jars these core.jar,reward.jar,payment.jar,domains.jar on need build final war based on conditions(environmnet) include above jars combination of final war(w1) w1.war : core.jar,domains.jar w1.war : core.jar,domains.jar,rewards.jar(any way specify include jar if rewards applicable) the maven war plugin allows include/exclude jars. example: <plugin> <artifactid>maven-war-plugin</artifactid> <version>3.1.0</version> <configuration> <packagingexcludes> web-inf/lib/excluded.jar </packagingexcludes> <packagingincludes> web-inf/lib/included.jar </packagingincludes> </configuration> </plugin> you can associate inclusions/exclusions condition using profiles. example, let war p

php - upload image in codeigniter -

i'm trying upload image in codeigniter, got problem in , $this->upload->do_upload('imgname'). if condition not execute, elese execute , show error message 'you did not selected file upload'. while remove form upload in code execute perfectly.... controller: public function add_news() { $post = $this->input->post(); unset($post['submit']); $this->load->model('adminmodel','addnews'); if(!is_dir('uploads')) { mkdir(base_url().'uploads',0777,true); } if(!is_dir('uploads/news')) { mkdir('uploads/news',0777,true); } $config = [ 'upload_path'=>'uploads/news', 'allowed_types'=>'png|jpg|jpeg|gif', 'encrypt_name'=>

java ee - CDI: ContainerRequestFilter properties not injected -

i've created containerrequestfilter implementation. i'm facing misunderstanding don't quite solve. this implementation: @provider @prematching @secured public class bearerfilter implements containerrequestfilter { @context private httpservletrequest request; @override public void filter(containerrequestcontext requestcontext) throws ioexception { //this.request null here } } in order register on jaxrs application: @applicationpath(value = "cmng") public class restapplication extends application { @override public set<class<?>> getclasses() { set<class<?>> resources = new hashset<class<?>>(); resources.add(accountendpoint.class); //... return resources; } @override public set<object> getsingletons() { set<object> singletons = new hashset<object>(); singletons.add(new bearerfilter()); <<<<&

internet explorer - typo3 404 error only in IE and Firefox on tt_news detail-view (Chrome/Edge/Opera/Safari working) -

i have curious problem. detail-view of our tt_news plugin generates 404 error in ie , firefox in browsers. have realurl installed error persists without it. i know our customer has windows iis server , had create web.config files error-handling work via realurl don't know anymore. can pointing me in right direction?

Integrate Bootstrap theme with existing AngularJS project -

i have existing angularjs project - website average design, connected database , forth. want integrate bootstrap project, in order achieve appearance 1 found @ link: www.coreui.io should install bootstrap, don't figure out how replace styling (old styling theme). there .css files in project want remove , replace new ones found in theme. steps? provide more details if needed. thank you! you can copy "dist" folder contains css , js files theme , paste in existing project. after change index.html file.

javascript - How does the "this" keyword work? -

i have noticed there doesn't appear clear explanation of this keyword , how correctly (and incorrectly) used in javascript on stack overflow site. i have witnessed strange behaviour , have failed understand why has occurred. how this work , when should used? i recommend reading mike west 's article scope in javascript ( mirror ) first. excellent, friendly introduction concepts of this , scope chains in javascript. once start getting used this , rules pretty simple. ecmascript standard defines this keyword that: evaluates value of thisbinding of current execution context; (§11.1.1). thisbinding javascript interpreter maintains evaluates javascript code, special cpu register holds reference object. interpreter updates thisbinding whenever establishing execution context in 1 of 3 different cases: initial global execution context this case javascript code evaluated when <script> element encountered: <script type="text/javascr