w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
WCF Service returning 502 Http Code (The specified network name is no longer available.)
The default limit is 4mb. You either need to split the file into smaler parts. http://social.msdn.microsoft.com/Forums/en-US/wcf/thread/f6541134-2e08-4eb9-987b-2158fb99b403/ Or change MaxMessageLength Large Binary (byte[]) File transfer through WCF

Categories : C#

Remove Subdomain from URL string , keeping the rest of URL (for replacing subdomain)
You can split the domain as: $url = "city1.domain.com.uk/index.php?page=category/238/12"; list($subDomain, $params) = explode('?', $url); list($domain, $sub) = explode('/', $subDomain); $newUrl = $sub . "?" . $params; echo $newUrl; Cheers!

Categories : PHP

Subdomain forward to another subdomain without redirecting
Since the two domains ("test" and "m.test") have different document roots, you're going to need to reverse proxy. The problem here is mod_proxy, the proxy module, may not be loaded by your host, but you'd do something like this: RewriteEngine On RewriteCond %{HTTP_HOST} ^m.test.example.com$ [NC] RewriteRule ^(.*)$ http://test.example.com/$1 [L,P] These rules would be in the /m.test/ folder, the document root of the m.test.example.com subdomain. The P flag tells mod_rewrite to hand the request to mod_proxy to reverse proxy instead of redirecting the browser.

Categories : Apache

Creating a subdomain Auth cookie then redirecting to subdomain loses the cookie in asp.net MVC4
I have good news and bad news. The bad news is-- you can't do it. See here for an explanation. Essentially your server is setting a cookie for a domain it does not contain, so the cookie is rejected. The good news is-- you don't want to do this anyway. Your design violates OWASP 2013 A4 (unsecure and unvalidated direct object reference). In this case you are storing user's access permissions as the domain of the cookie, which a hacker can easily modify. Find a different way to designate subdomain access. There are all kinds of ways to do this. Here is one way that is pretty close to your plan: Store the subdomain in the cookie value itself. Create a secure document container that lists the subdomains to which the user is granted access. You could for example store the subdomain

Categories : Asp Net

How to upload Pending Attachment to Yammer
Well, finally , I know the reason for the failure . request format. RFC 1867say: Content-type: multipart/form-data, boundary=AaB03x --AaB03x content-disposition: form-data; name="field1" Joe Blow --AaB03x content-disposition: form-data; name="pics"; filename="file1.txt" Content-Type: text/plain ... contents of file1.txt ... --AaB03x-- there two points multipart/form-data, boundary=AaB03x -> multipart/form-data; boundary=AaB03x no empty line at first line Content-type: multipart/form-data, boundary=AaB03x --AaB03x Content-Disposition: form-data; name="field1" Joe Blow --AaB03x Content-Disposition: form-data; name="pics"; filename="file1.txt" Content-Type: text/plain ... contents of file1.txt ... --AaB03x--

Categories : Http

Yammer REST API > Authentication without user input
A friend helped me out with this one. Most social network APIs use OAuth three-legged authentication which allows a user to give authorization to a service without presenting (or making another) login. This is by design. Circumventing the authentication portion may be possible, but ethical questions come into play.

Categories : Api

How do I get .htaccess to redirect from wildcard subdomain page to wildcard subdomain folder
Add this to the htaccess file in your document root(s): RedirectMatch 301 ^/([^/]+).php$ /$1/ You'll most likely need that trailing slash because if it's redirecting you to a directory, mod_dir will redirect again in order to add the trailing slash. EDIT: To exclude, you'll have to use mod_rewrite: RewriteEngine On RewriteCond %{REQUEST_URI} !index.php RewriteRule ^/?([^/]+).php$ /$1/ [L,R=301]

Categories : PHP

Yammer oauth login from win8 winrt javascript app
For those interested I have found a sample app: http://code.msdn.microsoft.com/windowsapps/Web-Authentication-d0485122 Used parts of the Flickr & Facebook examples and can now authenticate.

Categories : Javascript

Java File.exists and other File operations returning wrong results for an existing File (network, macosx)
I think you might be looking for the WatchService. Oracle was also kind enough to provide a tutorial. Because the longevity of these links aren't guaranteed, I'll edit in an example code in a couple of minutes. I just wanted to let you know I think I found something in case you want to start looking at it for yourself. UPDATE Following the linked tutorial, I came up with code like this. I'm not sure it'll work (don't have time to test it), but it might be enough to get you started. The WatchService also has a take() method that will wait for events, which means you could potentially assume the file's existence (or lack thereof) based on the last output you gave. That will really depend on what this program will be interacting with. If this works, good. If not, maybe we can figure out

Categories : Java

Give a url a subdomain name without it being a subdomain
you can do this with create sub domain with wild card for this here is the steps create sub domain in your cpanel with "*" resulting this step it creates folder in ftp called "wildcard" and now you can create code in wildcard folder and watch out the premium user

Categories : PHP

Find machines on local network based on port (network discover) in android
I am assuming you know how to connect to a tcp server. If not, First go through http://examples.javacodegeeks.com/android/core/socket-core/android-socket-example/ You can try opening multiple threads with each thread waiting to connect to a specific ip/port ( along with some timeout value ).If the thread produces an exception, that means the connection was unsuccesful. Othewise add that ip address to your Open_Devices list.

Categories : Java

Vertex names by creating a network object via an edgelist (R package: network)
If your ids are sequential integers as in your example, you can produce the adjacency matrix corresponding to the edgelist in your example with: >as.sociomatrix(y.nw)) 1 2 3 4 5 6 7 8 9 10 1 0 0 1 0 0 0 1 0 0 0 2 0 0 0 0 0 0 0 0 1 1 3 0 0 0 0 0 1 0 0 0 0 4 0 0 0 0 0 0 0 0 0 0 5 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0 0 7 0 0 0 0 0 0 0 0 0 0 8 0 0 0 0 0 0 0 0 0 0 9 0 0 0 0 0 0 0 0 0 0 10 0 0 0 0 0 0 0 0 0 0 But maybe you have a different type of id system in your real input?

Categories : R

"Social Network Analysis Labs in R" (Stanford tutorials): Confusion over graph object / network class
I strongly suspect that the tutorial you are trying to follow was developed for igraph version 0.5.4 or earlier. At that time, vertices and edges in an igraph object were indexed from zero instead of one, and the tutorial seems to account for this, judging from the following comment in the tutorial: # IMPORTANT NOTE: Unlike in most languages, R objects are numbered # from 1 instead of 0, so if you want the first element in a # vector, you would reference it by vector_name[1]. HOWEVER, # igraph objects are numbered starting from 0. This can lead to # lots of confusion, since it's not always obvious at first which # objects are native to R and which belong to igraph. Since igraph 0.6, this is not true anymore; vertices and edges in the R interface of igraph are indexed from 1 just like

Categories : R

azure powershell commandlets for vms metrics like cpu utilization ,network in , network out
I'm not sure if API for metrics even exists. But the good news here is if you have Diagnosticts setup as it is described here http://www.windowsazure.com/en-us/develop/net/common-tasks/performance-profiling/ you will have performance counters information stored in your WADPerformanceCountersTable table.

Categories : Azure

Is there any network tab with ie8 developer tool? If not then how to track network traffic in ie8 browser?
Internet Explorer 8 doesn't support network statistics in its developer tools. You'll need to upgrade to Internet Explorer 9 or use a third-party tool like Fiddler to inspect traffic.

Categories : Misc

android network change broadcast receiver and getting network type
For what you say I understand you're not taking into account that every time the receiver is triggered it creates a new instance, which is destroyed after its work. Even with static variables you don't have persistent values. One solution that worked for me is to use SharedPreferences. Be aware that on API11+ you should use the flag MODE_MULTI_PROCESS, something like this: if (Build.VERSION.SDK_INT>=11) mySettings=context.getSharedPreferences("MyPrefs",Context.MODE_MULTI_PROCESS); else mySettings=context.getSharedPreferences("MyPrefs",0); int netType = mySettings.getBoolean("netType",0); Hope it helps...

Categories : Android

Hyperlink network analysis in R - measuring the 'reachability' of a vertex within a network?
I will assume your question is where to start looking. One of my favorite places is package sos. Another option would be www.rseek.org. library(sos) findFn("reachability network analysis") found 9 matches; retrieving 1 page Downloaded 8 links in 3 packages. Id Count MaxScore TotalScore Package Function Date Score Description and Link 1 4 5 10 sna 00Index NA 5 Tools for Social Network Analysis 2 4 5 10 sna hierarchy NA 2 Compute Graph Hierarchy Scores 3 4 5 10 sna reachability NA 2 Find the Reachability Matrix of a Graph 4 4 5 10 sna prestige NA 1 Calculate the Vertex Prestige Scores 5 3 1 3 ergm gof.ergm NA 1 Conduct Goodness-of-Fit Diagnostics on a Exponential Family... 6 3 1 3 ergm plot.

Categories : R

HybridAuth working within local network, but not when accessed outside of my network
I don't think that most of the OAuth2 providers will accept answers that are not coming from configured callback url. So making redirects with the register will most likely fail. Instead, try to configure your callback to look like: http://www.yourdomain.com:openPort/hybridauth-2.1.2/hybridauth/index.php Where openPort is a port number that your ISP will not block. Then in the router you can make port forwarding openPort->80 or you just can start your web server to openPort and make sure the router is not blocking the requests.

Categories : PHP

RHQ JBoss operations network (JON) and monitoring network
Why would you not use the built in monitoring capability of LoadRunner, which would then allow you to pull all of your business data (response times and data points) together with your monitoring data into the same data set for analysis purposes? By having decoupled data sets you are making your challenge of identifying root cause that much more difficult. If you were planning on exporting data from JON|RHQ to LoadRunner analysis or exporting both to a tool such as SAS, SPSS or R for statistical analysis you would be able to reconcile the decoupled data sets. (see manual for information on importing data into Analysis for the types and formats supported)

Categories : Networking

How to flush a network stream when using network-conduit?
network-conduit should flush the stream every time you send it a ByteString, buffering is specifically not included as that would be handled by something like blaze-builder-conduit orthogonally. Are you seeing behavior which contradicts that?

Categories : Haskell

How to read parameters on Linux network interfaces file (/etc/network/interfaces)
after some days, i got the answer to my issue. Here you are.. #include <iostream> using std::cout; using std::endl; #include <fstream> using std::ifstream; #include <cstring> const int MAX_CHARS_PER_LINE = 512; const int MAX_TOKENS_PER_LINE = 20; const char* const DELIMITER = " "; int main() { // create a file-reading object ifstream fin; fin.open("/etc/network/interfaces"); // open a file if (!fin.good()) return 1; // exit if file not found // read each line of the file while (!fin.eof()) { // read an entire line into memory char buf[MAX_CHARS_PER_LINE]; fin.getline(buf, MAX_CHARS_PER_LINE); // parse the line into blank-delimited tokens int n = 0; // a for-loop index // array to store memory addresses of the tokens in b

Categories : C++

How to create a active neural network after using the SPSS module for neural network?
When you run the NN, on the export tab in the dialog box, specify a file name (with extension xml) as you have done. When you want to score a dataset, use Utilities > Scoring Wizard and select the xml file you saved. These actions have equivalent syntax as well as the dialog interfaces. HTH, Jon Peck

Categories : Xml

Python - Chaining methods: returning `self` vs returning a new cloned object
Django does this so that the base query can be kept around and reused, without inheriting changes from a future "child" query, like your exclude() on your filter(). I'm guessing somebody tried storing queries for later, and realized that didn't work well without copying. I cloned the django repo and did a quick git log on django/db/models/query.py, searching for the phrase clone. The patch that introduces this change is here: https://github.com/django/django/commit/d4a3a4b

Categories : Python

Oracle Query is returning value when setting value to it, but not returning value when passing date value
Since you're already forcing the date format, you can use the following query instead: SELECT INCIDENT_ID FROM INC_SM1 I WHERE I.CLOSE_TIME >= START_DATE AND I.CLOSE_TIME < END_DATE

Categories : Oracle

JavaScript, stringify, replacer - returning undefined vs. returning nothing
If you don't provide an explicit return, the return value is undefined. Your second function always returns undefined, in other words. Because the function always returns undefined, there'll never be anything included in the JSON stringified result, so the overall effect is that you get undefined. It's sort-of an anti-pattern to do this: if (something) { return whatever; } else { return somethingElse; } Your first function would be more idiomatic as: str = JSON.stringify(o,function(k,v) { return Object.isSealed(this) ? undefined : v; }); edit — note that JSON.stringify() calls your replacer function first with an empty key, and "v" equal to this a new wrapper object containing the object to be stringified (and note that that object is not sealed). That is, before chec

Categories : Javascript

if/else not working on subdomain
There are several ways you can try to get your Sessions work cross subdomain: session_set_cookie_params(0, '/', '.your_url.com'); session_start(); is one of them. or try this: Sharing session data across domains with PHP

Categories : PHP

DNS - unauthorized subdomain
You (or more accurately, afraid.org) are the authoritative spot for your domain. So, yes, there should be nothing underneath you. If there is, then something is definitely afoot. We know it wasn't you, so that only leaves two possibilities: 1) Someone has managed to insert bad records into caches that point to that second domain. IE, the records have been inserted in places outside afraid.org's control. This is typically non-trivial to do, especially to have them inserted in many places, but is possible. 2) Someone has inserted the records inside the area that afraid.org is supposed to control. Just because the web interface is showing you only two records doesn't mean that afraid.org is showing you all the data. It could be that afraid.org themselves are some form of evil and doi

Categories : Apache

WordPress and www subdomain
Apache allows name based virtual hosts. This means you can host multiple FQDNs on the same IP address. You need to add a name based virtual host for www.xyz.test that points to the same directory. Or you could add a server alias in the xyz.test virtualhost configuration: ServerName xyz.test ServerAlias www.xyz.test

Categories : Wordpress

How can I use AWS Route 53 to set up a subdomain
You would want to setup a CNAME (as Ryan suggested): api.mydomain.com. CNAME mydomain.com. Then you would create a VirtualHost for "api.mydomain.com." in Apache and use mod_rewrite to rewrite http://api.mydomain.com/foo to http://api.mydomain.com/api/foo.

Categories : Amazon

access one subdomain from another
You're omitting the scheme from the URL which causes it to be a relative path (hence the first error). Simply add a scheme: src="//www2.mysite.com..." The // will use the same scheme as the page request.

Categories : PHP

IIS redirect from one subdomain to another
I have changed your 2 rules to make them more simple: <rule name="admin" stopProcessing="true"> <match url="^admin" ignoreCase="true" /> <conditions logicalGrouping="MatchAll"> <add input="{HTTP_HOST}" pattern="^store.admin.domain.edu$" negate="true" /> </conditions> <action type="Redirect" url="http://store.admin.domain.edu/admin" appendQueryString="false" redirectType="Permanent" /> </rule> <rule name="admin_rooted" stopProcessing="true"> <match url="^(api|oauth_authorize|media|skin|js|admin|index.php/admin/)" ignoreCase="true" negate="true" /> <conditions logicalGrouping="MatchAll"> <add input="{HTTP_HOST}" pattern="^store.admin.domain.edu$" /> <add input="{REQUEST_FILENAME}" matchType="IsFile"

Categories : Iis

Do I have to use JSONP for API subdomain?
Here your api is hosted at http://api.project.com and your app is hosted at https://app.project.com. So you will have cross domain API call. In that cases you have to use jsonp. A good explanation for why you have to use JSONP can be found here; http://stackoverflow.com/questions/2067472/what-is-jsonp-all-about I hope this might help.

Categories : Json

RewriteRule with subdomain
Here is the working code : ServerAlias news.domain.com RewriteCond %{HTTP_HOST} !^www.domain.com$ RewriteCond %{HTTP_HOST} ^news.domain.com$ RewriteRule ^/(.*) http://www.domain.com/$1 [P]

Categories : Apache

htaccess for my subdomain
Usually the subdomain maps to a different host directory, thus you also need to add the .htaccess to that directory for it to work, also you may need to activate mod_rewrite on that directory maybe even on your virtual host level, just some pointers...

Categories : Htaccess

YII redirect with subdomain
I would think that if you enter a record something like this: 'www.examplesite.com/user/login'=>'/user/login' you could then call this from anywhere $this->redirect(Yii::app()->createAbsoluteUrl('user/login'));

Categories : PHP

htaccess mod_rewrite subdomain
Add a trailing ? to your match to drop any query string present. RedirectMatch 301 ^/mobile/(.*)$ http://m.example.com/$1? Secondly, a RewriteCond does not apply to a RedirectMatch but a RewriteRule. RewriteCond %{QUERY_STRING} page=d+ [NC] RedirectRule ^mobile/(.*)$ http://m.example.com/$1? [R=301,L] [OR] was dropped because there's only one RewriteCond and [1-9]+ was changed to include 10 etc. Please note that putting a RewriteCond says that only redirect when you have page= in the query string. If you need the redirection regardless of that, drop the condition and just keep the rule.

Categories : Htaccess

Strip protocol and subdomain from a URL
You could try using a regex like this: http://(.*?)[.?]|http:// Instead of performing multiple replaces. This would catch any other sub-domains you encounter. I'm not aware of another way you can achieve this. This is actually not as short as it could be but I wanted to keep it readable.

Categories : C#

wildcard subdomain routing ASP MVC
Try to use this rule for IIS: <rule name="Rule1" stopProcessing="true"> <match url=".*" /> <conditions> <add input="{HTTP_HOST}" pattern="^(?!www)(.*).mydomain.com$" /> </conditions> <action type="Rewrite" url="http://mydomain.com/{C:1}/{R:0}" /> </rule>

Categories : Asp Net Mvc

htaccess redirect where subdomain
I believe you don't have sufficient RewriteCond conditions for both redirects. What is happening is that first one is unconditional redirect and since it appears first it always fires and 2nd one never fires. Replace your code with this: Options +FollowSymLinks -MultiViews # Turn mod_rewrite on RewriteEngine On RewriteCond %{HTTP_HOST} ^www.(.+)$ [NC] RewriteRule ^(.*)$ http://%1/$1 [R=301,L] Above code will work with both of your domains.

Categories : Htaccess

Crawling an .net site with subdomain
You're starting out at: $urlLogin = "http://www.waltham.patriotproperties.com"; But the link for the search page is at: http://waltham.patriotproperties.com/search.asp If you surf to that URL, you'll see the content; if you add the www. to the start of the URL, it works. Editted to add - this becomes a lot easier if they have an API you can use.

Categories : PHP

© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.