Posts

Showing posts from May, 2014

vb.net - Debugging memory leak in compact framework 2.0 -

i'm working windows mobile application, running compact framework 2 , vb.net code. having need sync application every determined-period of time, use system.threading.timer set predefined timer each sync process. the issue one, memory building fast, reaching 24 mb rapidly , app crush due outofmemoryexception. i understood compact framework's gc not @ best, , has 2mb of gc heap, use 4 mb each sync , gc cleans 2mb, it's capabilities. i tried use performance monitor tool of build in compact framework 2.0 provided me object "still alive" , not cleaned or disposed no real notion of what's going on in each part of app. is there efficient way of monitoring memory leaks in compact framework 2.0? 1 guide me through method causing issue or part of code problematic? or in other way, helpful ways manage memory in more, let's say, efficient way have 32mb of free ram space narrow ail here. i'm sceptical issue relates actual memory leak. att...

android studio - Add EditText to Recycler -

i new android recyclerview , gives error while tried add edittext fields recycler.i cannot find how this. please solve issue , in advance :) :) mainactivity code: public class mainactivity extends appcompatactivity{ private recyclerview mrecyclerview; private customrecycleradapter madapter; private recyclerview.layoutmanager mlayoutmanager; private edittext mtext; private edittext mcolor; private list<data> mdata = new arraylist<>(); @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); // initializing views. mtext = (edittext) findviewbyid(r.id.textet); mrecyclerview = (recyclerview) findviewbyid(r.id.recycler); // if size of views not change data changes. mrecyclerview.sethasfixedsize(true); // setting layoutmanager. mlayoutmanager = new linearlayoutmanager(this); mrecyclerview.setlayoutmanager(mlayoutmanager); // setting adapter....

how to submit a form automatically in javafx -

i want create cbt in javafx , run problem of not knowing how submit form automatically if time elapsed , may 1 of students yet finish test. also, want know how disable form in javafx disabling node can done calling node.setdisable(true) . since children automatically disabled, parent of node s want disable, long there no other children should not disabled. a timeout can implemented using scheduledexecutorservice : private scheduledexecutorservice executorservice; @override public void start(stage primarystage) { textfield tf = new textfield(); label label = new label("your name: "); button submit = new button("submit"); gridpane root = new gridpane(); label.setlabelfor(tf); root.addrow(0, label, tf); root.add(submit, 1, 1); root.setpadding(new insets(10)); root.setvgap(5); root.sethgap(5); atomicboolean done = new atomicboolean(false); executorservice = executors.newscheduledthreadpool(1); /...

haproxy to deny access based on url and ip addresses -

i'm running haproxy 1.6.8 , want restrict access web's admin login whitelist of ip addresses. can't figure out how properly. frontend main mode http bind 0.0.0.0:80 acl admin_page path_beg,url_dec -i /admincp acl whitelist src 10.0.0.0/8 my intention use: http-request deny admin_page unless whitelist but haproxy check complaints incorrect , can't this. what's thought? acl admin_page path_beg,url_dec -i /admincp this might (?) valid, if is... don't it. there magic taste, passing *_beg through converter. following feels better, safer solution part. acl admin_page path,url_dec -m beg -i /admincp take path fetch, run through url_dec (url-unescape) converter, case-insensitive -i match of pattern against beginning -m beg of resulting string. then, need correct syntax , logic apply it. http-request deny if admin_page !whitelist the "and" between 2 acls implicit, , second negated, deny request if request matches admin_...

how to find the url to connect SharePoint with C# console application -

my c# console application built on sharepoint server 2007. job select items in library sharepoint site. however, cannot connect app sharepoint site's spsite object... my code connect sharepoint site: using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; using microsoft.sharepoint; namespace trytoconnect { class program { static void main(string[] args) { string siteurl = "http://sp13vm123/"; //string siteurl = "http://sp13vm123/imglibrary/forms/allitems.aspx"; //string siteurl = "http://sp13vm123/imglibrary/"; //string siteurl = "http://sp13vm123:8800/"; //string siteurl = "http://sp13vm123/sitepages/home.aspx"; //string siteurl = "http://sp13vm123/sitepages/"; spsite ospsite = new spsite(siteurl ); console.writeline("connected");//nothing...

javascript - Adding actionListeners to dynamically created google markers to plot routes -

Image
i have page retrieves locations database , creates markers based on lat/long display on map. markers saved in array , use loop assign onclick action listeners each marker. when user clicks on marker want route current location marker location displayed. issue having regardless of marker clicked, plots route final marker in array. this map looks in above example going click red marker a. as can see has plotted course marker d. my code: //this functions build maps function initializemap(position) { //user location var mycenter = new google.maps.latlng(position.coords.latitude, position.coords.longitude); var mapprop = { center: mycenter, zoom: 13, maptypeid: google.maps.maptypeid.roadmap }; mapobj = new google.maps.map(document.getelementbyid("googlemap"), mapprop); //making sure data array has in if (ajaxresult.length ...

javascript - AngularJs get data from $http before controller init -

i have simple angularjs application, in want run slider , slider elements come $http request. here code reference: var mainapp = angular.module("myapp", []); mainapp.run(['$rootscope', '$http', function($rootscope, $http) { $http.post('process.php?ajax_type=getchild').success(function(data) { if (data.success) { console.log(data.child); // data received... $rootscope.categories = data.child; } }); }]); mainapp.controller('gridchildcontroller', function($scope, $http, $rootscope) { console.log($rootscope.categories); // null.... $scope.brands = $rootscope.categories; $scope.finished = function(){ jquery('.brand_slider').iosslider({ desktopclickdrag: true, snaptochildren: true, infiniteslider: false, navnextselector: '.brands-next', navprevselector: '.brands-prev', ...

html - How to go to a certain point of a different document in a .md file? -

i trying go second part in below mentioned .md file. file myfile.md. contents are: ## first part (an image) ## second part (an image) i trying access html file using command <a href="some-url/myfile#second-part">second part</a>. however, not pointing second part pointing somewhere below that. can tell me how correct it? experimenting, found solution using <div…/> obvious solution place own anchor point in page wherever like, thus: <a name="abcde"/> before and </a> after line want 'link' to. markdown link like: [link text](#abcde) anywhere in document takes there. the <div…/> solution inserts "dummy" division add id property, , potentially disruptive page structure, <a name="abcde"/> solution ought quite innocuous. (ps: might ok put anchor in line wish link to, follows: ## <a name="head1"/>heading one</a> please ...

json - Stream from JMS queue and store in Hive/MySQL -

i have following setup (that cannot change) , i'd advice people have been down road. i'm not sure if right place ask, here goes anyway. various json messages placed on different channels of jms queue (universal messaging/webmethods). before data can stored in relational-style dbs has transformed: renamed, arrays flattened , structures nested objects extracted. data has appended mysql (as serving layer visualization tool) , hive (for long-term storage). we're stuck on spark 1.4.1 , may move 1.6.0 in few months' time. so, structured streaming not (yet) option. at point events streamed directly real-time dashboards, having in place capable of doing ideal. ideally coding done in scala (because have considerable batch-based repo spark , scala), minimal requirement jvm-based. i've looked @ spark streaming not have jms adapter , far can tell operating on json done using sqlcontext instance on dstream's rdds . understand it's possible write custom ada...

powershell - Append Member/Column to PSObject -

i'm looking way add member object in powershell without creating new object , looping. typically when run script again list of servers , want append information against data i'm returning can't find way without creating new psobject , looping through existing object , adding member row row (simplified example below) $filelist = get-childitem | select-object name, directoryname $filelistobj = @() foreach ($item in $filelist) { $temp = new-object psobject $temp | add-member noteproperty servername "xservername" $temp | add-member noteproperty filename $item.name $temp | add-member noteproperty directory $item.directoryname $filelistobj += $temp } $filelistobj is there way along these lines ... get-childitem | select-object "servername", name, directoryname the above code creates member haven't been able find way fill additional member details i'm after. sure, can use calculated property (more ...

Angularjs checkbox not checked at start -

i have problem make angularjs checkbox checked. the basket[0].partdelivery come frome db 1 update() make post db <label class="checkbox-inline"> <input type="checkbox" id="inlinecheckbox1" class="checkbox" ng-model="basket[0].partdelivery" ng-true-value="1" ng-false-value="0" ng-change="update()"> {{basket[0].partdelivery}} </label> <label class="checkbox-inline"> <input type="checkbox" id="inlinecheckbox1" class="checkbox" ng-model="1" ng-true-value="1" ng-false-value="0" ng-change="update()"> </label> and tested in html: <div ng-controller="basketcontroller bc" ng-init="basket={basket}; deliveryaddress={deliveryaddress}; getcheckboxes(basket[0].partdelivery)"> <input type="checkbox" id="inlinecheckbox1" class=...

mysql - Error in foreignkey table -

Image
i created database structure using mysql workbench. when forward engineer or synchronize model displays errors. when remove foreign key or if connect "int" foreign key second table it's working fine. want use "varchar(255)" . can't use "varchar(255)" foreign key? if please me fix error. can't forward engineer table. yes can use varchar foreign key.it appropriate add unique index or unique constraint table. however, primary key should "meaningless" value, such auto-incremented number or guid.

android - Data is not showing by using recyclerView -

data not showing on android screen , i'm not getting error in logcat either. in logcat displaying data not displaying on screen. searched many thing didn't got answer this. i'm using recyclerview show data. here code - mainactivity @override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.second_activity); recyclerview = (recyclerview) findviewbyid(r.id.recycler_view); gadapter = new getjobdetailsadapter(detailsjob); recyclerview.layoutmanager mlayoutmanager = new linearlayoutmanager(getapplicationcontext()); recyclerview .setlayoutmanager(mlayoutmanager); recyclerview.additemdecoration(new divideritemdecoration(this, linearlayoutmanager.vertical)); recyclerview.setitemanimator(new defaultitemanimator()); string url = "url" aquery maquery = new aquery(secondactivity.this); maquery.ajax(url, string.class, new ajaxcallback<string>() { ...

C# - Sockets: Creating a server and client -

so i've been looking @ many guides, of them outdated , don't work. want achieve, can point me in right direction code or new guides? want client establish secure connection server. when secure connection established, client send id server. server relevant data database id , send results. want learn is: setting multi-threaded server connecting database server building secure connection between client , server(i want verify server communicating client program, not hacker or something) setting client side, client can request data when ever required thanks, apologies newbie-ness. its simple create such thing, start visual studio , create new asp.net project,select mvc template. make sure have authentication "individual user accounts" (this option make enable website's users create account in website, login , authenticate themselves) now of course connection between server , client not secured, shouldnt worry now, can later purchase ssl ce...

sql - Multiple Selects (with Null) from the same table -

so have write sql in db2, , cant figure out how it. pick these field codes , values finance table long above $10,000 select (a.value), (b.value), (c.value) ... client k, finance a, finance b, finance c ... the problem in statement. cannot put: where k.client = a.client , a.fieldcode = 1 , a.value > 10000 , k.client = b.client , b.fieldcode = 2 , b.value > 10000 ... and on... because doesnt include nulls, drastically reduces result set, more times call finance table. how keep above formatting , include nulls display line long either finance or finance b or finance c etc exists? (note: doing first obvious thing repeatedly calling finance table once, finance a, no b,c,d etc not work problem because results (from a,b,c,d etc) cannot spaced out on many lines). this compressed version of doing: select a.client_id, a.period_id, fn0.amount, fn2.amount assesment left outer join finance fn0 on a.client_id = fn0.client_id , a.period_id = fn0.per...

Call wcf service from plugin or workflow in dynamics crm -

i have wcf service hosted on hostgator , want call workflow or plugin registered in plugin registration tool. , working dynamics crm online. is possible?if yes give me solution or reference link. it's possible call wcf service sandboxed plugin/custom workflow activity. there restrictions thought (from msdn ): only http , https protocols allowed. access localhost (loopback) not permitted. ip addresses cannot used . must use named web address requires dns name resolution. anonymous authentication supported , recommended. there no provision prompting logged on user credentials or saving credentials. here's example msdn using webclient, easier instance if add service webreference.

ibm mobilefirst - Does Bluemix support MBaaS (Mobile Backend as a Service)? -

i reading , trying use ibm bluemix. have seen confusing statement mbaas support on bluemix. sites mention bluemix paas, , places supports mbaas. have basic doubts: ibm support mbaas? if yes, can find full mbaas features list ibm bluemix? couldn't find in ibm site. yes, bluemix mobile supports mobile backend service. here current services have support mbaas pattern , bit of information them (and here's quick graphical view , links how started): mobile client access this service enables secure mobile application. can add facebook, google, or custom authentication application. push notifications you can add push notifications service send push notifications app on android , ios. mobile analytics (beta) the mobile analytics service enables gather crash , usage knowlege customers using mobile app. cloudant nosql db the cloudant service ibm nosql database store data. object storage the object storage service unstructured cloud data store can stor...

asp.net mvc - Send reminder email with a windows service -

we have asp.net mvc web app have installed in several clients/domains (more 100). web app works ms sql database running in windows server. domains in same service , running in separate databases in same ms sql server. each client can create events users. talking days 1 client have more 200 events. we need create window service running on server clients send, every few hours, reminder emails of each event each client. as explained before each client has own database , there common database clients information , database names. what service has check, each client, events have , send corresponding emails. we don't know if better have 1 service go through clients or have service per client. if have 1 service have run , example, every 6 hours sending emails. in case have service per client need create service asp.net web app, possible? what best approach this? you can use sql server integration service job. need write ssis package , schedule it. on each exec...

Why won't this C++ While loop work? -

i'm trying user put in name/age , verify if it's correct. if not 4 tries before program abort. while loops don't loop, instead continue on next loop. i've tried variation of things inside while parenthesis (op != 1) (!(op = 1)) etc. int main() { system("color 0a"); string name; int age; int tries = 0; int op = 0; cout << "hello user" << endl; sleep(3000); while ((op != 1) && (tries < 4)) { name = entname(name); cout << "so name " << name << "?" << endl; cout << "enter '1' yes or '2' no. "; cin >> op; if (op == 1) { cout << "perfect!"; } if (op == 2) { cout << "please try again!"; tries+ 1; } if (tries = 4) { //abort program } } ...

Notepad++ crashed and overwrote file with empty version -

i come all-too-familiar tale comes down me not backing enough , suffering consequences of that. anyway, maybe can offer me help, here goes ... i working on css file in notepad++ (6.9.2) , when program crashed. upon reopening program, found had emptied file , saved empty file, overwriting original file. so, cannot recover css file. have checked in user/appdata/roaming/notepad++/backup folder; however, lost file not 1 of ones listed there. there crashdump file coincides time of crash, not sure whether of in recovering file. i hoping there way recover file - if earlier version of it. assume i'm out of luck here, thought i'd ask anyway. if it's not in %appdata%/notepad++/backup may sol. try using deleted file recovery tool, cross fingers, , hope old version of buried somewhere, chances here slim, , 0 if never saved file in first place. since editing css file, if had page using open in browser , haven't closed yet, it's possible it's still av...

indexing - Implementing Index trait to return a value that is not a reference -

i have simple struct implement index for, newcomer rust i'm having number of troubles borrow checker. struct pretty simple, i'd have store start , step value, when indexed usize should return start + idx * step : pub struct mystruct { pub start: f64, pub step: f64, } my intuition i'd able take signature of index , plug in types: impl index<usize> mystruct { type output = f64; fn index(&self, idx: usize) -> &f64 { self.start + (idx f64) * self.step } } this gives error mismatched types saying expected type &f64, found type f64 . has yet understand how rust's type system works, tried slapping & on expression: fn index(&self, idx: usize) -> &f64 { &(self.start + (idx f64) * self.step) } this tells me borrowed value not live long enough , maybe needs lifetime variable? fn index<'a>(&self, idx: usize) -> &'a f64 { &(self.start + (idx f64) * self....

javascript - Is a best common way to solve button click too fast? -

i have button.when click button, show dialog select data. if click button fast,multi dialog show. @ present,i have 2 way solve problem 1.use disabled 2.use settimeout , cleartimeout have other better way solve problem? thank much explain: if use disabled,after dialog close,need set button available. @ present,i use code util.prototype.lazytriggerevent = function(buttonid,event,callback){ var searchtrigger=null; $("#"+buttonid).bind(event,function(){ var text = $.trim($(this).val()); cleartimeout(searchtrigger); searchtrigger = settimeout(function(){ callback(text); },500); }) }; //util.lazytriggerevent("showdialgbtnid","click",function(){}) if click button trigger ajax,and have more button this,is best common way solve problem. you can use jquery's .one() handler limits function running once: jquery's .one() handler description: attach handler event elemen...

java - How to Access Child Item In JSON Array -

i querying flickr based on search terms, , response json array. here root level along first 2 results: { photos: { page: 1, pages: 4222, perpage: 100, total: "422175", photo: [ { id: "28571356563", owner: "8372889@n03",secret: "c4ca6c4364", server: "8050", farm: 9, title: "95040021.jpg", ispublic: 1, isfriend: 0, isfamily: 0, url_m: "https://farm9.staticflickr.com/8050/28571356563_c4ca6c4364.jpg", height_m: "332", width_m: "500" }, { id: "28571342883", owner: "96125450@n00", secret: "db35a59412", server: "8307", farm: 9, title: "red #sunset #silhouette #trees #photography", ispublic: 1, isfriend: 0, ...

javascript - How can I get PhantomJS to set viewport height the same as document height for screen capture? -

i'm using phantomjs included rasterize script automate screen capture need image same height document, varies. actually, found out issue was. there overflow-x: hidden coming down linked style sheet , phantom choking on that. set visible , worked charm. did rewrite rasterize scratch there no sizes passed, , phantom default match viewport document height.

node.js - A few Webdriver IO Mocha Chai questions -

i new using webdriver-io mocha , chai. first of here script: var homepage = 'http://www.mypage.com'; var expect = require("chai").expect; var headertext = 'h1.browse-header-title'; var currentheadertext; var links = ['furniture','fine art','jewelry & watches','fashion']; describe('test suite 1', function(){ before(function(){ console.log('running navigation h1 tag suite'); }); aftereach(function(){ browser.close(); // method use? }); it('should click furniture , page header should match', function(done){ browser.url(homepage).click('a[data-tn="global-nav-item-link-furniture"]'); currentheadertext = browser.gettext(headertext); expect(currentheadertext).to.equal(links[0]); console.log('h1 tag '+currentheadertext+''); }); it('should click fine art , page header should match...

c# - WPF Custom Control with Item/Data Templates -

i know how create custom user control in wpf how can make can provide itemtemplate? i have user control mixture of several other wpf controls, 1 of them being listbox. i'd let user of control specify content of list box i'm not sure how pass information through. edit: accepted answer works following correction: <usercontrol x:class="wpfapplication6.mycontrol" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:src="clr-namespace:wpfapplication6"> <listbox itemtemplate="{binding relativesource={relativesource findancestor, ancestortype={x:type src:mycontrol}}, path=itemssource}" /> </usercontrol> you want add dependencyproperty control. xaml different if deriving usercontrol or control. public partial class mycontrol : usercontrol { public mycontrol() { initializecomponent(); } ...

reactjs - InputText bottom border disappears automatically all of sudden -

Image
i'm seeing inputtext bottom border disappears automatically of sudden. if restart application in simulator, see border again. disappears when make change pushes hot-reload in simulator. i'm 100% sure, not because of changes because if restart app in simulator, see bottom border again. i'm using rn 0.30 , android simulator. know what's happening? please see picture below. <textinput placeholder="title" style={styles.inputfield} placeholdertextcolor={theme.placeholdertextcolor} maxlength={50} returnkeytype={'next'} ref={(c) => { this._fieldtitle = c; }} value={title} onfocus={() => { this.inputfocused(this._fieldtitle); this.setstate({ showtitlelabel: true }); }} onchangetext={(title) => this.setstate({ title })} onendediting={this._validatetitle} onblur={() => { if (title...

apache - htaccess to nginx conversion -

i'm migrating apache nginx. original htaccess rules follow: <ifmodule mod_rewrite.c> options +followsymlinks rewriteengine on rewritecond %{request_filename} !-d rewritecond %{request_filename} !-f rewriterule ^(.*)$ index.php?/$1 [qsa,pt,l] </ifmodule> could tell me how can convert these code nginx equivalent? thanks found few online apache nginx tools: http://www.anilcetin.com/convert-apache-htaccess-to-nginx/ http://winginx.com/en/htaccess

gitlab - Why is git review failing with 'failed to push refs' message? -

i've installed gitlab, , gerrit , testing out gerrit using gerrit wiki. however, whenever try push change gerrit using gerrit_test branch, i'm getting message when running git review -r. idea why error coming up? $ git review -r remote: error: cannot lock ref 'refs/publish/master/gerrit_test': 'refs/publish/master' exists; cannot create 'refs/publish/master/gerrit_test' git@git.<host>.com:<user>/scripts.git ! [remote rejected] head -> refs/publish/master/gerrit_test (failed update ref) error: failed push refs 'git@git.<host>.com:<user>/scripts.git if there details i'm missing may helpful, let me know , can share. if remote has branch foo, can't push foo/test branch because foo has been created file rather directory in remote's refs directory. try creating review of non-master branch, perhaps feature/test-gerrit, or perhaps there setting pattern use when creating review branch git review . ...

python - What's the standard way to document a namedtuple? -

looking clean code using namedtuple hold multiple variables passing through number of functions. below simplified example (i have few more additional arguments). before: def my_function(session_cass, session_solr, session_mysql, some_var, another): """blah blah. args: session_cass (session): cassandra session execute queries with. session_solr (solrconnection): solr connection execute requests with. session_mysql (connection): mysql connection execute queries with. some_var (str): yada yada. (int): yada yada. """ after: def my_function(sessions, some_var, another): """blah blah. args: sessions (namedtuple): holds database sessions. some_var (str): yada yada. (int): yada yada. """ for docstrings, i've been following google style guide, addition of types (inspired this post ), because makes lot easier keep track of types coming in. my question is, how go documenting namedtupl...

c# - Regular expression, match anything not enclosed in -

given string foobarbarbarfoobar, want have between foo. used expression , result is: barbarbar. it's working great. (?<=foo).*(?=foo) now want opposite. given string foobarbarbarfoobar want not enclosed foo. tried following regular expression: (?<!foo).*(?!foo) i expected bar result instead returns match foobarbarbarfoobar. doesn't make sense me. missing? the explanation from: https://regex101.com/ looks me? (?<!foo).*(?!foo) (?<!foo) negative lookbehind - assert impossible match regex below foo matches characters foo literally (case sensitive) .* matches character (except newline) quantifier: * between 0 , unlimited times, many times possible, giving needed [greedy] (?!foo) negative lookahead - assert impossible match regex below foo matches characters foo literally (case sensitive) any appreciated i'm hoping finds better approach, abomination may want: (.*)foo(?<=foo).*(?=foo)foo(.*) the text before first foo in capture grou...

php - How to redirect links with htaccess? -

for example have website example.com has link file stored in example.org. if user clicks download (default link www.example.org/file.zip) want redirect him third domain - example.net. in short: www.example.com has link www.example.org when click redirected example.net. possible using htaccess? to answer question: yes, possible. being vague, want make sure customize below solution meet real requirements. essential like: <ifmodule mod_rewrite.c> rewriteengine on rewritecond %{request_filename} !-f rewriterule ^(.+)\.zip$ http://example.com/{request_uri} [l,qsa] </ifmodule>

Qt program ignores KDE theme and qtconfig theme -

Image
when run qt5 program superuser, program ignores system fonts, themes , icons , uses bogus theme. see screenshot. how fix programmatically or in way possible?? it ignores kde configs/qtconfig. driving me nuts. right run normal user, left run superuser.

python - Moving rows of data within pandas dataframe to end of last column -

Image
python newbie, please gentle. have data in 2 "middle sections" of multiple excel spreadsheets isolate 1 pandas dataframe. below link data screenshot. within each file, headers in row 4 data in rows 5-15, columns b:o. headers , data continue headers on row 21, data in rows 22-30, columns b:l. move headers , data second set , append them end of first set of data. this code captures header row 4 , data in columns b:o captures rows under header including second header , second set of data. how move second set of data , append after first set of data? path =r'c:\users\sarah\desktop\original' allfiles = glob.glob(path + "/*.xls") frame = pd.dataframe() list_ = [] file_ in allfiles: df = pd.read_excel(file_,sheetname="data1", parse_cols="b:o",index_col=none, header=3, skip_rows=3 ) list_.append(df) frame = pd.concat(list_) screenshot of data if of excel files have same number of rows , 1 time operation, hard code number...

networking - How to access docker container from another machine on local network -

i'm using docker windows( not using docker toolbox use vm) cannot see container machine on local network. in host perfect , runs well,however, want other people use container. despite being posting same question in docker's forum , answer not show it. plus, have been looking here solutions found setting bridge option in virtual machine , , said before, using docker windows no use virtual machine. docker version command client: version: 1.12.0 api version: 1.24 go version: go1.6.3 git commit: 8eab29e built: thu jul 28 21:15:28 2016 os/arch: windows/amd64 server: version: 1.12.0 api version: 1.24 go version: go1.6.3 git commit: 8eab29e built: thu jul 28 21:15:28 2016 os/arch: linux/amd64 docker ps -a container id image command created status ports names 789d7bf48025 gogs/gogs "docker...

c# - Set DependencyProperty from reflection in wpf - type convertion -

i have fun wpf , decided build library custom implementation of attached triggers (similar system.windows.interactivity.dll), own. i have class triggeraction represents action invoked trigger. want begin easy setting background of button while user click it. i have written working code example eventtrigger class, have 1 problem settertriggeraction . have 2 dependency properties propertyname represents name of property should set value property. in invoke method try set property defined value. here code: internal override void invoke(dependencyobject obj) { if (obj == null) return; if (string.isnullorempty(propertyname)) return; propertyinfo property = obj.gettype().getproperty(propertyname, bindingflags.public | bindingflags.instance); if (property == null) { debug.writeline("cannot find property {0} type {1}.", propertyname, obj.gettype()); return; } m...

Spring Boot JS App wont work after securing rest-api with Spring Security -

i created simple spring boot/ js app. in next step tried implement usermanagement feature handle multiple users. so implemented usermodel , controller , secured rest-api calls via authentication of spring security. @configuration @enablewebsecurity @componentscan("package.packagename") public class securityconfig extends websecurityconfigureradapter { @autowired datasource datasource; @autowired public void configauthentication(authenticationmanagerbuilder auth) throws exception{ auth.jdbcauthentication().datasource(datasource) .usersbyusernamequery("select email, password, active accounts email=?") .authoritiesbyusernamequery("select email, role account_roles email=?"); } @override @order(securityproperties.access_override_order) protected void configure(httpsecurity http) throws exception { http .formlogin().permitall() .and() .authorizerequests() ...

apache - htaccess doesn't work on localhost -

i started playing url rewriting today , watched/read few tutorials still don't how rewriting works. i created .htaccess file , placed in root directory. i'm working on local machine, using apache. i want http://localhost:5216/index.php redirect http://localhost:5216/index in .htaccess file have following: options +followsymlinks rewriteengine on rewriterule ^index?$ index.php this doesn't work. tried refreshing page, checked httpd.conf file has allowoverride all selected. i've read few tutorials , think right way seems don't. wrong file? i want http://localhost:5216/index.php redirect http://localhost:5216/index rewriterule ^index?$ index.php your rewriterule opposite... rewrites /index (or /inde since you've made last x optional) index.php . note internal rewrite , not external redirect . your rewriterule close want do. allows link /index (in application) , still serve actual /index.php file. taking step furthe...

powershell - Nested array and objects are not properly converted to json -

this question has answer here: powershell's output of nested data types 1 answer description using convertto-json in powershell , trying convert following object: $richmessage = @{ attachments = @( @{ "mrkdwn_in" = @("text"; "pretext";); "title" = "title here"; "title_link" = "http://somelinkhere/"; "fallback" = "summary of attachment"; "text" = "message"; "color" = "red"; }) } write-host(convertto-json -inputobject $richmessage) i expected output: { "attachments": [ { "text": "message", "fallback": "sum...

excel vba - Delete row based on one letter -

need code. in (column c) have values mg01, mg02a, mg02b, mg02c. , in (column a) different values. code needs delete row if value in column "1" , in column c if finds letters @ end of text such b, c, d, e, .... and " c " code not recognized mg02c please. sub xdeleterowz() last = cells(rows.count, "a").end(xlup).row = last 1 step -1 if (cells(i, "a").value) = "1" , (cells(i, "c").value) = "*c*" cells(i, "a").entirerow.delete end if next end sub this sounds more suited regular expression: sub xdeleterowz() last = cells(rows.count, "a").end(xlup).row createobject("vbscript.regexp") .pattern = "mg\d{2}[a-z]" .ignorecase = false = last 1 step -1 if (cells(i, "a").value) = "1" , .test(cells(i, "c").value) cells(i, "a").entirerow.delete en...

plsql - Concat an item with a loop variable in Oracle APEX -

i have set of item has same name add @ end of each position number :p77_variable_1, :p77_variable_2. so in process add them database must item , make loop. loop for in 1..:p77_nombre_variable loop l_variable := new sfd_si_variable_typ(sfd_si_variable_seq.nextval, :p77_nom_variable_i, :p77_type_variable_i); sfd_si_variable_pkg.ajouter(l_variable); end loop; but problem doesn't work. can know way execute loop , adding "dynamically" item (or better way concatenation variable i . thank you. leaving off whether wise thing (using individual variables should array, e.g. using apex collection), can use v() function this. for in 1..:p77_nombre_variable loop l_variable := new sfd_si_variable_typ(sfd_si_variable_seq.nextval ,v('p77_nom_variable_'||i) ,v('p77_type_variable_'||i)); sfd_si_variable_pkg.ajouter(l_variable); end loop;

escaping - Avoid escaped characters in Postman responses -

Image
is there way avoid escaped characters in postman responses? testing service response come following field: <methodresult> myurl.com/_/orderclient.php?sessionid=c8e0c826-bfd9-4a7e-95fa-b5602889fd9f &amp; orderid=3518176547 &amp; locale= </methodresult> is there way configure postman not escape characters & &amp; ? you can find raw response body in postman in "raw body tab" (see screenshot below). not think can configure show raw version. within xml documents / tags characters need escaped , "&" 1 of them. why think escaped version coming web service directly.

html - Centering header items not working -

i cannot seem header center once stretch page more 1100 pixels , max-width exceeded. how can keep header centered? $(document).ready(function() { var scroll_pos = 0; $(document).scroll(function() { scroll_pos = $(this).scrolltop(); if (scroll_pos > 580) { $(".normalmenuitem").css('color', '#a9a9a9'); $(".normalmenuitem").css('padding-left', '13px'); $(".normalmenuitem").css('padding-right', '13px'); } else { $(".normalmenuitem").css('color', '#5f666f'); $(".normalmenuitem").css('padding-left', '17px'); $(".normalmenuitem").css('padding-right', '17px'); } }); }); @media screen , (max-width: 960px) { .normalmenuitem { display: none; } } .box { background-color: #fff; position: absolute; height: 59px; width: 100%; top: ...