Posts

Showing posts from March, 2012

channel - libssh 0.7.2 unable to execute command on QNX : UNKNOWN SSH_MSG_GLOBAL_REQUEST -

i'm writing application using libssh 0.7.2 makes ssh connection qnx virtual machine start application. the control flow happens following : ssh_connnect() -> ssh_channel_open_session() -> ssh_channel_request_exec("my_app_name"). i got ssh_ok return value callings. verify command executed list current processes running on qnx , not find "my_app_name". here log ssh activities: log ssh_connect() [2017/07/25 15:45:23.029846, 2] ssh_connect: libssh 0.7.2 (c) 2003-2014 aris adamantiadis, andreas schneider, , libssh contributors. distributed under lgpl, please refer copying file information rights, using threading threads_noop [2017/07/25 15:45:23.030846, 2] ssh_socket_connect: nonblocking connection socket: 740 [2017/07/25 15:45:23.031346, 2] ssh_connect: socket connecting, waiting callbacks work [2017/07/25 15:45:23.031846, 1] socket_callback_connected: socket connection callback: 1 (0) [2017/07/25 15:45:23.037847, 1] ssh_client_connec

R Shiny GoogleVis missing axis labels from squashed bar charts -

Image
my shiny app not showing vertical axis labels in bar charts. have looked @ other answers show labels on horizontal axis , google chart not showing x-axis labels . test data plot in data.table labels a,b,c,d, etc.. numeric values. please see gist whole app . so 1 gets (chart a) can see barchart labels skipping letters: when want (chart b) showing , b , c , d etc... on y axis: i setting width , height "automatic" in first chart charts scaleable on different size screens. worked fine few months rendering above. chart b done forcing chart width , height numeric values. k.op.width <- "400" k.op.height <- "400" this not wanted wanted make full use of screens possible , viewable on tablets. i setting googlevis vaxis option showtextevery:1 @asgallant suggested in comments answer above, not helping. wide screen crimping plot area, truncating chart. why chart not spread downwards in size showing labels? is there way these charts in

Cannot read property 'length' of undefined at type in javascript -

i have 2 errors: cannot read property 'length' of undefined @ type , typing. wrong? settimeout(function typing() { var fields = document.queryselectorall('input'); var text = ["text", "text", "text", "text"]; function print (input, num, timeout) { settimeout(function(){ var = 0; function type(){ if (i <= text[num].length) { input.value = text[num].substr(0, i); settimeout(type, 100); } console.log(text[num].length); i++; } type(); console.log(type()); if (num == 3) { settimeout( function() { document.getelementbyid('postlogo_animation').classname +=" postlogo-img" },text[num].length * 120); } }, timeout); } (var b = 0; b < fields.length; b++) { var timeout = 0; var input = fields[b]; if (b > 0) { (var c = 0

PHP's in_array bevahior surprises me -

this question has answer here: a problem in_array 3 answers php's variable type leniency 3 answers while validating dynamic saving method in controller wanted make sure given case accepts 0 , 1 valid values. when tried manipulate input form, submitting 'aaa' value following still returns true. why that? var_dump(in_array('aaa', [0, 1])); // true, expecting return false you need use "strict" setting, force function check types of elements well: var_dump(in_array('aaa', [0, 1], true)); http://php.net/manual/en/function.in-array.php states if third parameter strict set true in_array() function check types of needle in haystack. the reason returns true because string truthy, , 1 . if( "aaa" ){ echo "yo

java - get only the website name from domain name of url -

i need convert list of urls host name. tried below mentioned code: url neturl = new url(url); string host = neturl.gethost(); the above mentioned code producing output shown below: a95-101-128-242.deploy.akamaitechnologies.com a23-1-242-192.deploy.static.akamaitechnologies.com edge-video-shv-01-lht6.fbcdn.net i want website name above output shown below: akamaitechnologies akamaitechnologies fbcdn please help. thanks if want parse url, use java.net.uri . java.net.url has bunch of problems -- equals method dns lookup means code using can vulnerable denial of service attacks when used untrusted inputs. public static string getdomainname(string url) throws urisyntaxexception { uri uri = new uri(url); string domain = uri.gethost(); return domain.startswith("www.") ? domain.substring(4) : domain; } this should work.

How can I get all the applications that are currently running on android? -

i want running app on android device. maybe, need use packagemanager ? have tried used packagemanager , did not succeed, maybe, have better decision? using below code can running application list activitymanager = (activitymanager) getsystemservice(context.activity_service); list<activitymanager.runningappprocessinfo> runningappprocessinfo = am.getrunningappprocesses();

How to create a class that prints an array in TypeScript -

i want create array ["name", age] , able print using class: let person: person[] = [["anne", 21], ["coco", 33]]; class person{ person: person[]; printperson(): person{ (let of person) { document.write( + '<br/>'); } } this code allow print general nested arrays (i haven't implemented in class easy do): let persons: (string | number)[][] = [["anne", 21], ["coco", 33]]; const printarray = (array: any[]) => { (const element of array) { if (element instanceof array) { printarray(element); } else { document.write(element.tostring() + '<br/>'); } } } printarray(persons); output: anne 21 coco 33 however, since expecting inner arrays have same shape recommend implementing them typescript class. code below defines person class own write method, creates array of persons , , iterates on each

sql - Convert Boolean To string In Datagridview? -

try dgrd.rows.clear() itdataset.clear() flt = "select * transview tracom = n'" & trim$(t10id.text) & "'" order traid" itdataset = generaldatamanager.inquiredata(itdataset, flt, "transview") if me.bindingcontext(itdataset, "transview").count > 0 integer = 0 itdataset.tables("transview").rows.count - 1 dim row string() = {itdataset.tables("transview").rows(i).item("traid"), itdataset.tables("transview").rows(i).item("sender"), itdataset.tables("transview").rows(i).item("recever"), itdataset.tables("transview").rows(i).item("travalue"), itdataset.tables("transview").rows(i).item("currnceyname"), itdataset.ta

c# - Catch MS Word not responding Exception -

i using "microsoft.office.interop.word" library, application fetching data server , throws word application. multiple services generated, creates 20-30 services @ last part of process word application hangs few seconds , restore, process works @ end. i want catch event on application, whenever word documents hangs, need after that, how can catch event?

angular - How to start angular4 project? -

i working angular2 project, have requirement create angular4 project. question is from angular4 project? should have different angular4 project? if not how identify angular 4 project? should have use @angular/cli angular 4 project? is there different setup package.json angular4? one of collegue said using cli commands means using angular4, true? thank you there no such thing "angular 2" or "angular 4", naming convention it's angular . what looking version number of angular packages. (angular uses semantic versioning reflect changes version number, see semver ). for new angular project use latest @angular/cli , automatically installs latest version of angular compatible cli version , sets requirements build/bundling process. ( recommended beginners )* if don't want use cli, can out angular starter repositories/seeds or create own project scratch. if want create own project scratch tutorial how setup webpack angular (version ^4.

c# - This insert query in webforms is throwing an error and I'm not sure why -

it's web forms application , i'm having trouble finding out going wrong. i trying insert info logins table. everything works apart when add [user] username of person logged in @ time. there entry username that's working fine. image of logins table the aspx.cs code behind: protected void add_click(object sender, eventargs e) { string currentuser = user.identity.name; int webid = convert.toint32(ddlwebsite.selecteditem.value); string username = username.text; string _email = email.text; string pass = password.text; string ainfo = info.text; string loguser = user.identity.name; //string connectionstring = "data source=(localdb)\\mssqllocaldb;attachdbfilename=|datadirectory|\aspnet-webprog-20170720092452.mdf;initial catalog=aspnet-webprog-20170720092452;integrated security=true"; sqlconnection connection = new sqlconnection(configurationmanager.connectionstrings["defaul

vue.js - VueRouter route should select first child by default -

hi i'm using vue-router 2.5.3 , have following route structure. path: "/admin", component: require("./views/layouts/masterlayout.vue"), meta: { requiresauth: true }, children: [ { path: 'dashboard', component: require("./views/dashboard.vue"), alias: "/", name: "dashboard" }, { path: 'upload', component: require("./views/upload.vue"), name: "upload", redirect: {name: 'upload.photo'}, children: [ { path: 'photo', component: require("./components/uploaders/imagesuploader.vue"), name: "upload.photo", props: { selected: true, successendpoint: "/api/v1/upload/complete", uploadendpoint: "/api/v1/upload" } }, { path: 'video'

javascript - How to remove a data from a child node created by push () -

background in web app, each player object in database. when user selects player, instead of whole object being sent user's "selection" node under "user" parent node, player id inserted instead ease of reference. code i trying create web app such insert player id specific child node using push (). code : //add player if not added if(!selected || selected[player.position<2) { ref3.push(player.id); } which results in following in database: fantasyapp: { players:{ player 1 :{goals: 0, assists: 0, id: 1}, player 2 :{goals: 1, assists: 3 id:2} ... }, users:{ user1:{selections:{fkajsdfjadfaj: 1 jfuueiuhfnalp: 2 }

jquery - Loading ajax data on scroll instead of pager with TableSorter -

currently using tablesorter loading data server. default function pager uses load new data server , discard what's there in page. implement unlimited scroll. i looking @ widget-paper.js if ( $.isfunction( wo.pager_ajaxprocessing ) ) { c.$tbodies.eq( 0 ).empty(); c.$tbodies.eq(0).empty() - function handles ajax request. removed below code , works fine messes other stuff. can or may have implemented ? not looking use datatable now. can

angular - Angular2 promise - returning functions that already return a promise -

i've written following function - i'm trying return existing promise functions without needed wrap them in custom promise: doauthwithprompt(): promise <any> { this.getuser() // returns promise .then (user => { if (user == undefined) { this.promptforpassword() // returns promise .then (data => { return this.doauth(data.email, data.password); // returns promise }) } else { return this.doauth(user.email, user.password) // returns promise }; }) .catch (e => {return promise.reject(false);}) } the error getting in ide (visual studio code) is: [ts] function declared type neither 'void' nor 'any' must return value. what missing while defining doauthwithprompt ? thanks. you need return wrapper promise , chained promises also: doauthwithprompt(): promise <any> { return this.getuser() // returns promis

javascript - Angular variable not being show properly on webpage -

just title suggests, i'm trying self learn angular.js run unexpected frustrating road block... can't variables display on webpage! <!doctype html> <html ng-app> <head> <title>lets test out?</title> <script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/angularjs/1.0.7/angular.min.js"></script> </head> <body> write name in text box! <input type="text" ng-model="sometext" /> <h1>hello {{ sometext }}</h1> </body> </html> i'd appreciate can tell me doing wrong i've been beating head against desk hour , googled issue can't understand why doesn't work. check angular reference has been loaded properly. try add ng-app body tag demo <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.min.js"></script> <body ng-app> write name in t

python - Saving down onto a file and sorting after highest score! Pyhton games -

update: added said class highscorehandler(object): highscore_file = "highscores.txt" # define store highscores def get_highscores(self, sort=true): # return sorted default open(self.highscore_file, "a+") f: # open highscore file f.seek(0) # rewind file start scores = [int(x) x in f.read().split()] # read scores ints if sort: # sort if required return sorted(scores) # add reverse=true `sorted()` descending sort return scores def save_highscore(self, highscore): highscores = set(self.get_highscores(false)) # current highscore list if highscore in highscores: # highscore exists return # nothing do... highscores.add(highscore) # add highscore set open(self.highscore_file, "w") f: # open highscore file writing f.write(" ".join(str(score) score in highscores)) # store scores and put save_highscore and get_highscores "code" part # display

sql - IS_ROLEMEMBER not working properly -

i need check whether user has role databasemailuserrole . i tried this: select is_member('databasemailuserrole') select is_rolemember ('databasemailuserrole', '<loginname>') both return value either correct or incorrect . this means several logins returns right value, others not. databasemailuserrole sql server, aware of. issue logic databasemailuserrole database role, , therefore maps users , not logins . users (database level) , logins (server level) distinct objects access database on server, user needs both login name , user name. login , user objects same person may, not required to, share same name for example create user someuser login 'domain\login'; go exec sp_addrolemember 'databasemailuserrole','someuser'; go /* following fail because users can added database role databasemailuserrole */ exec sp_addrolemember 'databasemailuserrole','domain\login'; go execute login = 'd

ssl - How to harden rails+webrick+https with insecure ciphers removed on Ruby 2.2 -

updated: @ first, test code didn't adequately show ruby 2.4 sees :sslciphers option whereas ruby 2.2 not. have edited example code below make clear. i have small rails 3 application on ruby 2.2 , webrick handles small loads , therefore not need complexity of "real" web server. has been patched support https connections secure logins, default, accepts many old weak ciphers, want prohibit. while upgrading ruby 2.4 offers new hardening options achieve this, can't make switch newer ruby. therefore, have attempted monkey-patch ruby 2.2's webrick/ssl.rb add couple of these options, :sslversion , :sslciphers. partially successful: while :sslversion appears work, :sslciphers not. first, following example shows successful hardening on ruby 2.4, based on answer here https://stackoverflow.com/a/23283909/6588873 incorporating of advice found here: https://gist.github.com/tam7t/86eb4793e8ecf3f55037 except we'll over-aggressive , exclude aes128 show :sslciphers op

java - Mapping a Object map property to Map using Dozer -

how can map map object property values map using dozer. here class : public class simplepojo { private string field1; private string field2; private map<string, string> attributes = new hashmap<string, string>(); public string getfield1() { return field1; } public void setfield1(string field1) { this.field1 = field1; } public string getfield2() { return field1; } public void setfield2(string field2) { this.field2 = field2; } public map<string, string> getattributes() { return attributes; } public void setattributes(map<string, string> attributes) { this.attributes = attributes; } } attributes map having key-value pairs <key1-value1> etc. data should go object properties key-value pair resulting map. how can mapping? personally haven't tried dozer documentation has details, have tried this? http://dozer.sourceforge.net/documentation/mapbackedproperty.html

python - Bokeh+Flask: Multiple AjaxDataSource calls -

a bokeh object figure shows 3 indipendent lines. data streamed. ajaxdatasource call updates data every 5 seconds reading last ones database. this stripped down class: class graph: def __init__(self): data_source = ajaxdatasource(data=dict(date_time=[], value_1=[], value_2=[], value_3=[]), data_url="/data", polling_interval=5000) line1 = self.figure.line(x="date_time", y="value_1", source=data_source) line2 = self.figure.line(x="date_time", y="value_2", source=data_source) line3 = self.figure.line(x="date_time", y="value_3", source=data_source) app.add_url_rule("/data", "/data", self.serve, methods=['get&

Logstash type conversion not working in single mutate filter -

below mutate filter configuration, caller , callee data in below format. not working both caller , callee data set 0 on type conversion. conversion working fine when used separate mutate filter type conversion. why first configuration not working ? "caller":"caller:123" "callee":"callee:123" mutate { gsub => [ #regex remove : , every thing before "caller", "^[^:]*:", "", "callee","^[^:]*:", "" ] convert => { #type conversion string integer "caller" => "integer" "callee" => "integer" } } type conversion working fine 2 separate mutate filters

c# - Is there any priority when resolving method overloads? -

why execute testmethod<t>(params t[] input) method instead of execute testmethod(object input) .i confusing why complier execute generic method.is there priority hierarchy on .net framework ? class testclass { static void main() { testmethod("hello world"); } static void testmethod(object input) { console.writeline("object"); } static void testmethod<t>(params t[] input) { console.writeline("params t[]"); } } the comment on question contains link overload resolution specs of c# contains infos need answer question in depth. it's not easy read, though , hard find actual path of resolution in case, here happens, far can tell: parameter arrays: first, need @ params keyword does: shortcut developers convenience, here identical to: static void testmethod<t>(params t[] input) gets translated to static void testmethod<t>(t[] item) and calls transl

javascript - CSRF token null in IE 11 while everything is fine in Chrome using Angular 2 and SpringRest -

i new angular2, using xsrfstrategy csrf token. here typescript code : export class myxsrfstrategy implements xsrfstrategy { _cookiename :string = 'xsrf-token'; _headername :string = 'x-csrf-token'; configurerequest(req) { const xsrftoken = ɵgetdom().getcookie(this._cookiename); console.log("csrf token--->>"+xsrftoken); if (xsrftoken) { req.headers.set(this._headername, xsrftoken); } } } here csrf token printing null in logs spring rest code : @override protected void configure(httpsecurity http) throws exception { cookiecsrftokenrepository cctr=new cookiecsrftokenrepository(); cctr.setcookiehttponly(true); http.addfilterat(casauthenticationfilter(), basicauthenticationfilter.class) .cors() .and().csrf().csrftokenrepository(cctr); } above code working fine in chrome version 56.0.2924.76. but not working in ie11 . here cookie information snapshots

go - serving up pdfs using golang -

Image
just wondering if guys can code. it works serving images not pdf brochure. in advance func main(){ http.handlefunc("/", func(w http.responsewriter, r *http.request){ filename := "/var/www/filedipenser/brochure.pdf" streampdfbytes, err := ioutil.readfile( filename ) if err != nil { fmt.println(err) os.exit(1) } b := bytes.newbuffer(streampdfbytes) w.header().set("content-type", "application/pdf") if _, err := b.writeto(w); err != nil { fmt.fprintf(w, "%s", err) } w.write([]byte("pdf generated")) }) err := http.listenandserve(":4111", nil) if err != nil { log.fatal("listenandserve: ", err) fmt.println(err) } } the code bit inefficient appears working. however, pdf viewers might sensitive extraneous output adding end of http response stream

ios - How to remove 'Remind Me' button from CallKit UI? -

Image
i'm using ios 10's callkit in app receive incoming calls. using cxhandletype: cxhandletypegeneric specific caller handle. 1- not able in point 2 , string 'audio...' coming? have set string 'call from' in cxproviderconfiguration. cxproviderconfiguration *configuration = [[cxproviderconfiguration alloc] initwithlocalizedname:@"call from"]; i want remove 'audio...' string, please help. 2- when callkit ui open on receive call option 'remind me' button present. how can remove native ui? per requirement button useless. please help, in advance. i have configure call kit: - (void)configurecallkit { cxproviderconfiguration *configuration = [[cxproviderconfiguration alloc] initwithlocalizedname:@"call from"]; configuration.maximumcallgroups = 1; configuration.maximumcallspercallgroup = 1; uiimage *callkiticon = [uiimage imagenamed:@"iconmask80"]; configuration.icontemplateimagedata =

php - Is it possible to create dynamic bootstrap panel based on the bootstrap modal values without db connection in laravel? -

Image
my request is, having page multiple product categories each of displayed on panel. if want add new category, open modal , there gets value of new category name , image of category.after that, added new category should display on same page other categories displayed. you need put inputs in form method="post" , action="/url-to-post-to" . as using bootstrap modal, change button html input of type submit. make sure inside form. now when fill form in, should go controller , can insert, redirect page fetches , display categories.

javascript - Not getting json data from json-angularjs call to an external url with $http.get using success method -

controller.js file code: var myapp=angular.module('myapp',[]); myapp.controller('mycontroller', function($scope,$http){ $http.get('data.json').success(function(data){ $scope.art=data; }); }); you have assign response $scope.art var myapp=angular.module('myapp',[]); myapp.controller('mycontroller', function($scope,$http){ $http.get('data.json').success(function(response){ $scope.art=response; }); }); note : deprecated .success , .error methods have been removed angularjs 1.6 using .then var myapp=angular.module('myapp',[]); myapp.controller('mycontroller', function($scope,$http){ $http.get('data.json').then(function(response){ $scope.art=response.data; }); });

javascript - Apply condition on templateUrl in config while routing -

i'm using ui-router , developed multi-lingual website using angular-translate i'm stuck want such scenario: there 2 template single page 1 normal version english , working normal site , second template consisting of translate="" attribute, in other words translated page. i'm willing if have conditions while routing resolve issue. looking @ code make easier understand. currently code looks like: .state('whoweare', { url: '/about-us', templateurl: 'templates/whoweare/whoweare.html', controller: 'whowearectrl' } ) but i'm want like .state('whoweare', { url: '/about-us', templateurl: function(istranslated){ if(istranslated){ return "templates/translated/whoweare/whoweare.html"; } else{ return "templates/whoweare/whoweare.html";

memory management - How to run flashsim? -

i came across papers based on flash aware page replacement algorithm. after going through couple of them, have created new algorithm modifying few things within previous algorithms. wish test algorithm against other existing algorithms , need doing same. came across flashsim recently. compiled have no idea how run algorithm within it. if provide me step step instructions of how go this, great.

python - sqlalchemy's bug in 1.0.6 and solved in 1.0.7,but happened again in 1.1.2 -

i using sqlalchemy scrapy insert database in scrapy pipeline,i use normal add this: album_item = hfprogramdata(**item) try: session.add(album_item) session.commit() except exception e: print e session.rollback() pdid = album_item.id normally, know, if there no exception,then sqlalchemy change album_item, , can atrr 'id' of album_item , more, when connect mysql local, these code work fine,but when connect server of company, raise error not understand: file "c:\python27\lib\site-packages\twisted\internet\defer.py", line 651, in _runcallbacks current.result = callback(current.result, *args, **kw) file "d:\workshop\xmly\xmly\pipelines.py", line 50, in process_item albums = session.query(hfprogramdata).filter(hfprogramdata.sourceid == item['album_id']).first() file "c:\python27\lib\site-packages\sqlalchemy\orm\query.py", line 2755, in first ret = list(self[0:1]) f

Android xamarin connect to sql server online like somee -

Image
is possible directly connect sql database of or other hosting site except azure without using web api? directly connect sql database. in other hand have website host there grab data android app develop in xamarin thank you yes, xamarin equal other c# applications can use, example, entity framework it allows connecting directly sql database , write own sql setences. the entity framework enables developers work data in form of domain-specific objects , properties, such customers , customer addresses, without having concern underlying database tables , columns data stored. entity framework, developers can work @ higher level of abstraction when deal data, , can create , maintain data-oriented applications less code in traditional applications.

css - Atom editor's style.less customization for languages -

reading this post , figured out how change atom's syntax highlighting matlab editing styles.less file. here the full description atom-text-editor.editor { .syntax--source.syntax--matlab { .syntax--meta.syntax--variable.syntax--other.syntax--valid.syntax--matlab { color: #000000; //black } } } however, when trid use same principle changing font setting markdown (scope text.md ), didn't work. atom-text-editor.editor { .sytax--text.syntax--md { font-family: "times new roman"; } } however, works fine. atom-text-editor[data-grammar="text md"], atom-text-editor[data-grammar="text md"].editor { font-family: "times new roman"; } can suggest what's logic behind behavior? why doesn't same method matlab take effect on markdown?

javascript - Remove scrollbars Firefox desktop -

edit 2: see mozilla bug edit 1: c'mon? i'm guessing padding-right trick won't work border-box anyway? surely there's combo of max/min -width trick? original post: i know question similar previous questions this mine more narrow. specifically i'm seeking solution firefox desktop ff on android mobile, , other browser combos provide supported , simple way of turning off scrollbars. example: - ::-webkit-scrollbar {display:none;} -ms-overflow-style: none; and whatever combo of flexi-box , box-sizing works (tm) on other ua implementations. (see example/demo code below). now can calculate ff scrollbar width , add padding have to? q. has mozilla replaced -moz-scrollbars-none since deprecated here ? illustrated problem: - <!doctype html> <html> <head> <!-- "viewport" tag needed stop font-size changes landscape/portrait --> <meta name="viewport" content="width=device-width, initial-scal

xamarin.forms - Best practice in Xamarin Forms to perform a filter search -

Image
i need perform filter search dynamic fields , not sure best way this. we have lot of documents different fields , these used filter search. can point me in right direction? if using mvvm pattern. here steps: declare observablecollection<itemtype> each of drop down lists in viewmodel. create selectedtype1, selectedtype2 etc. properties selected values corresponding each drop down list. attach selectionchanged , textchanged method handlers each drop down lists in view updates corresponding selection properties in viewmodel. delcare observablecollection<searchresulttype> searchresults in viewmodel holds search results given search. declare searchcommand property in viewmodel executes search method. declare search method makes web request call or local database search query depending on requirement. search method has access drop down selections/text typed user. insert results obtained in search method searchresults collection. bind searchresu

Page title not working in codeigniter? -

below given title not appear in web page title. shows default value. code: public function index() { $data['page_title'] = "welcome codigniter"; ................... ................... } just pass $data variable when loading view, , echo $page_title between <title></title> in view. <title><?php echo $page_title; ?></title>

javascript - css image scaling with margin or padding -

Image
i have image (or 2) need scale based on size of window. needs have minimum margin or padding. the aspect ratio of image 0.533 the minimum margin/padding left , right side 51.5px the minimum margin/padding bottom 73px the picture should big possible while keeping aspect ratio. is possible in css / javascript? ok here goes, don't shoot me. i've tried css far , closest got jquery , table , css: html: <div id="mymodal" class="modal"> <span class="close cursor" onclick="closemodal()">&times;</span> <table> <tbody> <tr> <td id="mbor1" style="min-width: 51.5px"></td> <td id="mmain" style="table-layout:fixed"> <div class="myslides"> <img id="slide1" src="img/slid

pcre - Regex match with negative look ahead and non greedy -

source string <html name="abc:///testers/something.txt" in="abc/testers/something.txt" loci="123" sap="abcdefgh="/><html name="abc:///needed.txt" src="abc/needed.txt" location="123" sap="rtyghu"/><html name="abc:///testers/testers3/another.txt" in="abc/testers/testers3/another.txt" loci="123" sap="jhkiopjhg"/><html name="abc:///onemore.txt" src="abc/onemore.txt" location="123" sap="dfrtyu"/> how match section starting <html name=" not followed (needed) or (onemore) , ending /> so in string there should 2 matches are <html name="abc:///testers/something.txt" in="abc/testers/something.txt" loci="123" sap="abcdefgh="/> <html name="abc:///testers/testers3/another.txt" in="abc/testers/testers3/another.txt" loci="12

java - remove prefix from XML in JAXB -

i'm trying generate xml file jaxb annotations so, i'll generate jaxb classes & package-info.java xsd lets go : 1 - package-info.java // // file generated javatm architecture xml binding(jaxb) reference implementation, v2.2.8-b130911.1802 // see <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // modifications file lost upon recompilation of source schema. // generated on: 2017.01.05 @ 01:51:40 pm cet // @xmlschema( xmlns = { @xmlns(namespaceuri = "urn:oasis:names:specification:ubl:schema:xsd:commonaggregatecomponents-2", prefix = "cac"), @xmlns(namespaceuri = "urn:oasis:names:specification:ubl:schema:xsd:commonbasiccomponents-2", prefix = "cbc"), @xmlns(namespaceuri = "urn:oasis:names:specification:ubl:schema:xsd:invoice-2", prefix = "&q

sql - Converting comma separated string to Int list in Postgres -

i trying convert comma seperated string in integer list use in clause. i have tried cast, ::int didn't work. appreciate input example table | table b id | set_id 2 | 14,16,17 1 | 15,19,20 3 | 21 my query: select * table a, table b a.id in b.set_id you need convert string proper integer array if want use join condition. select * table join table b on a.id = any(string_to_array(b.set_id, ',')::int[]); but much better solution normalize tables (or at least stores ids in integer array, not varchar column)

javascript - Cannot read property 'firstElementChild' of null, pdf.js -

i trying embedded pdf on html page using pdf.js , of pdf viewer blog,i have included pdf.js , pdf.worker.js in html file, when open page, nothing embedded , getting below error cannot read property firstelementchild of null please me in this. thanks! html code: <body> <div class="pdfjs"> </div> <script src="{% static 'pdf.js-viewer/pdf.js'%}"></script> <script src="{% static 'pdf.js-viewer/pdf.worker.js'%}"></script> <script type="text/javascript"> pdfjs.webviewerload('http://url/mypdf.pdf'); </script> </body> checkout below error: uncaught (in promise) typeerror: cannot read property 'firstelementchild' of null @ object.pdfviewer ( http://url/pdf.js:17939:52 ) @ http://url/pdf.js:12985:21 @ object._initializeviewercomponents ( http://url/pdf.js:12973:10 ) @ http://url/pdf.js:12884:16pdfv

bash - How to prevent git from quitting when I use TAB completion? -

i want git require confirmation resetting, updated william pursell's suggestion written here this: git() { set -e -u if [ $# -ge 2 ]; if [ "x$1" = "xreset" -a "x$2" = "x--hard" ]; echo "are sure? (type 'yes')" read resp || return $? if [ "x$resp" = "xyes" ]; echo "resetting" else echo "not resetting" return 0 fi fi fi command git "$@" || : } with won't quit console if mistype command, still quits if try use tab completion. there way prevent this? remove line set -e -u . settings global shell session, not local function, , conflict shell completion functions not immune undefined variables ( set -u ). , since function written, need neither set -e nor set -u .

css - Don't hide items when there are still space -

i trying use command bar of ng-office-ui-fabric , here code <!doctype html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script> <link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-core/2.6.3/css/fabric.min.css" /> <link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-core/2.6.3/css/fabric.components.min.css" /> <script src="https://cdnjs.cloudflare.com/ajax/libs/ngofficeuifabric/0.15.3/ngofficeuifabric.min.js"></script> </head> <body ng-app="yourapp"> <div ng-controller="yourcontroller"> <uif-command-bar> <uif-command-bar-main> <uif-command-bar-item> <span>one</span> </uif-command-bar-item>

php - Get values from dynamic inputs generated by javascript -

i writing generator improving knowledge of php programming , handling weak , know ask how can make this. generate input data in javascript , want dynamically capture value in php. not know how many of them, because generated after clicking button in, hence problem. at same moment succeeded in js using name: name_0, name_1 , on. is feasible? below not var tytul = document.getelementbyid("k-title"); var opis = document.getelementbyid("k-description"); var popup = document.getelementbyid("info_box"); var overlay = document.getelementbyid("overlay"); var podsumowanie = document.getelementbyid("summary"); $("#add").on("click", function () { var id = $(".wiersz").length; $('#tabela').append('<tr class="wiersz"><td class="komorka-lewa"> <input class="cecha" name="cecha_'+ id + '" type="text" placeholder=&quo

sql - Total Sum and Partial Sum -

i using ssms. pulling data, , trying 2 different columns sum prices. 2 columns 'changespend' , 'totalspend' both reference same column , running problems. i want changespend return sum of codes per receipt start v.ch% (so exclude others) , totalspend sum of codes each receipt. here current code: select receipt ,receiptcode ,receiptamount ,sum(receiptamount) on (partition receipt) totalspend ,(case when receiptcode = 'v.ch%' sum(receiptamount) on (partition receipt) else 0 end) changespend tablea left outer join tableb on a.receipt = b.receipt receiptcode 'v.%' order receipt however, query prints this: receipt receiptcode receiptamount totalspend changespend 1 v.cha 5 20 0 1 v.rt 2 20 0 1 v.chb 6 20