Posts

php - rewrite wordpress paramlink in web.config not working for secondary domain over IIS 8 -

wordpress sites hosted on iis 8 , 1 main domain , 1 domain lets : maindomain.com , anotherdomain.com physical path : acb/maindomain ( main domain ) , physical path : acb/maindomain/anotherdomain.com ( domain ) maindoman.com working paramlink structure. bellow maindoman.com/web.config file code <?xml version="1.0" encoding="utf-8"?> <configuration> <system.webserver> <rewrite> <rules> <!-- maindomain --> <rule name="maindomain" patternsyntax="wildcard"> <match url="*"/> <conditions> <add input="{request_filename}" matchtype="isfile" negate="true"/> <add input="{request_filename}" matchtype="isdirectory" negate="true"/> </conditions> <action type="rewrite...

batch script to transfer the file to the server after login into the another server -

i have 1 request need connect windows machine , transfer file windows machine. let machine a, map machine b (199.199.199.99), machine b user login only, can access machine c , transfer file, how can using windows batch script. file transfer a-> b ->c, please note c can accessed b. map machine ----------- net use s: "\\199.199.199.99\data" %password% /user:london_domain\%userid% :copy xcopy /f "a:\\file.csv "s:\file.csv"

Push onto array argument in javascript -

i have following function: function where(arr, num) { return arr.push(num); } where([40, 60], 50); // returns 3 i expecting return [40,60,50] returns 3. thanks help. the documentation states array.prototype.push() returns length of array. need push new number , return array. function where(arr, num) { arr.push(num); return arr; } myarray = where([40, 60], 50); // myarray === [40, 60, 50]

What does ":this(100)" mean in a C# method declaration? -

this question has answer here: what colon (:) mean? 7 answers what ":this(100)" mean in c# method declaration? while reading mdsn docs came across in line 6 of following code: public class stack { readonly int m_size; int m_stackpointer = 0; object[] m_items; public stack():this(100) {} public stack(int size) { m_size = size; m_items = new object[m_size]; } } public stack() is default constructor public stack(int size) is parametric constructor public stack():this(100) means default constructor call parametric constructor parameter size 100. refer this construtor more information this used in constructors. used overload constructors in c# program. allows code shared between constructors. constructor initializers, use this-keyword, pr...

osx - Installing Kubernetes on mac with vagrant and virtualbox -

this first attempt install , use kubernetes. trying install environment on mac developing own apps , deploying them test locally kubernetes. familiar using vagrant, virtualbox , docker same purpose. when saw page https://github.com/googlecloudplatform/kubernetes/blob/master/docs/getting-started-guides/vagrant.md assumed trivial. executed these lines: export kubernetes_provider=vagrant curl -ss https://get.k8s.io | bash this created master vm , minion, kubernetes seems have failed start on master. on master /var/log/salt/master full of python traceback errors, this: 2015-07-17 22:14:42,629 [cherrypy.error ][info ][3252] [17/jul/2015:22:14:42] engine started monitor thread '_timeoutmonitor'. 2015-07-17 22:14:42,736 [cherrypy.error ][error ][3252] [17/jul/2015:22:14:42] engine error in http server: shutting down traceback (most recent call last): file "/usr/lib/python2.7/site-packages/cherrypy/process/servers.py", line 187, in _start_http_thread sel...

Get X and Y Coordinate From Annotation iOS -

this should simple enough, i'm getting use mapkit framework. need here coordinates of selected annotation (to save them). im not concerned core data side of things. retrieve coordinates selected annotation. unfortunately, there doesn't seem resources on stack overflow topic. i have code set annotation title of selected annotation, of leg work should done here. there has similar can find coordinate of same annotation. [datasource sharedinstance].pointfrommapview = [self.mapview.selectedannotations objectatindex:([self.mapview.selectedannotations count]) -1]; [datasource sharedinstance].annotationtitlefrommapview = [datasource sharedinstance].pointfrommapview.title; the code above retrieve annotation title. there has way can use code retrieve coordinate well. ideas? use [datasource sharedinstance].pointfrommapview.coordinate coordinate annotation.

php - fwrite duplicate file when saving to server -

i'm trying save data file using fwrite, problem is creating second file same file name, , data saved second file , not original. it works under windows localhost, apache 2.4.10, php 5.6 (no second file), not on live server running linux , php 5.4.42. edit.php $(document).ready(function() { var pagename = "<?php echo $pagename; ?> "; $('#save').click(function(e) { e.preventdefault(); var content = $('#content').html(); $.ajax({ type: 'post', url: 'includes/readinput.php', data: { content: content, pagename: pagename, } }).done( function(data){ } ); }); }); readinput.php. // receive post variable s "admin/ edit.php" $content = $_post['content...