w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Best way to cloak the ?page_id=XX part of the URL without breaking links
You'll have to send the page_id and whatever other information that's in the query string over to the server somehow. If you just send / every time, the server is only going to server the main index, as it doesn't know anything about a page_id. The best you can do is use some javascript on the browser's end and make every link get submitted via a POST request, with the post_id and the rest of the query string as part of the request body so nobody sees that stuff in the browser's location bar. Another way you can do it is maybe put your entire site inside of an iframe hosted by the index (e.g. http://www.example.com/) then all the links only display inside this iframe. That way, the URL in the location bar always says http://www.example.com/.

Categories : Wordpress

A Comprehensive Regular Expression to find URL, links,page links, website links from HTML Page or String
Have a look here http://regexlib.com/Search.aspx?k=URL&AspxAutoDetectCookieSupport=1 You can find a lot of examples and patterns there and there are a lot of general Regex tutorials and articles. After a quick browse I found this : ([dw-.]+?.(a[cdefgilmnoqrstuwz]|b[abdefghijmnorstvwyz]|c[acdfghiklmnoruvxyz]|d[ejkmnoz]|e[ceghrst]|f[ijkmnor]|g[abdefghilmnpqrstuwy]|h[kmnrtu]|i[delmnoqrst]|j[emop]|k[eghimnprwyz]|l[abcikrstuvy]|m[acdghklmnopqrstuvwxyz]|n[acefgilopruz]|om|p[aefghklmnrstwy]|qa|r[eouw]|s[abcdeghijklmnortuvyz]|t[cdfghjkmnoprtvwz]|u[augkmsyz]|v[aceginu]|w[fs]|y[etu]|z[amw]|aero|arpa|biz|com|coop|edu|info|int|gov|mil|museum|name|net|org|pro)(|W(?<!&|=)(?!.s|.{3}).*?))(s|$) Should do the trick, but I'm sure there are more elegant examples on that list.

Categories : C#

How to push without the default --mirror option in a mirror repo
Just edit your .git/config and unset remote.<remote>.mirror, as is explained in git help push: --mirror Instead of naming each ref to push, specifies that all refs under refs/ (which includes but is not limited to refs/heads/, refs/remotes/, and refs/tags/) be mirrored to the remote repository. Newly created local refs will be pushed to the remote end, locally updated refs will be force updated on the remote end, and deleted refs will be removed from the remote end. This is the default if the configuration option remote..mirror is set.

Categories : GIT

PHP Website - Navigation links with sub directories
Assuming that you've logout.php on the root, use a slash before the page name like this, to point the page from the root. <li> <a href="/logout.php">Logout</a> </li> As what you are using is just logout.php which will point the page name in that specific directory, but the server will return 404 as it may be available when you are on the root, but it will fail when you are in the directory. If it still complicates the navigation, you can also use if conditions to change the paths accordingly.

Categories : PHP

RegEx match all website links except those containing admin
For your specific case, assuming you are matching the part after the domain (REQUEST_URI): (?!/admin).* (?!...) is a negative lookahead. I am not sure if it is supported in the IIS URL Rewrite engine. If not, a better approach would be to check for a complementary approach: Or as @kirilloid said, just match /admin/? and discard (pay attention to slashes). BTW. if you want to quickly test RegExps with a "visual" feedback, I highly recommend http://gskinner.com/RegExr/

Categories : Regex

How to make a dynamic php website with permanent links?
What you need - is to use HTML anchors together with ajax navigation. When you load something with ajax, modify anchor. This will not reload page, but will give you really new window.location. When page is loaded without ajax, parse that anchor (if exists) to determine what ajax page to display. That is basic idea, a direction for your thoughts since I do not know the details of your project implementation. Loading with AJAX and going to anchor in loaded content

Categories : PHP

Nginx Website with PHP script giving 404 for all onpage links
Is your site a wordpress site? Knowing which php application you are running will help people to give you more accurate feedback. Just based on your site configs and your description, remove the line try_files $uri =404; below location @php add following lines before location ~ .php$: location / { try_files $uri =404; } HTH

Categories : PHP

url rewriting or chage urls for wordpress website links
Settings > Permalinks Change it to the format you want there, using the Custom Structure option. Copy and paste the below code into there and it will change across your website: %category%/%postname%/

Categories : PHP

Jquery website translation triggered with .on() .off() events on different links
You are calling off on something that you haven't called on for. The off event just unbinds the element for the specified event and it doesn't look as though you've had an on for .menu-item-153 a. http://api.jquery.com/off/ What you may want to do is store the language variable in the selected menu link as a data-attribute http://api.jquery.com/data/ and then you can reuse the function. Perhaps similar to this: function jqueryxmltranslator(event) { // Jquery XML Translator var language = $(this).data('language'); $.ajax({ url: 'lang/hu_HU.xml', success: function(xml) { $(xml).find('translation').each(function(){ var id = $(this).attr('id'); var text = $(this).find(language).text(); $("." + id).html(text); }); } }); }; //

Categories : Javascript

Obtaining a list of links (the actual URL) from an entire website
Xenu's Link Sleuth is the free program I use to do this. You give it a starting url, and then it will recursively download all of the linked pages. The output is a report that tells you all of the links and images on the site.

Categories : List

html: My website does not show the correct frame when navigating links
To cause a link to load in the top level frame set the target of the link to "_top" <a href="http://www.mydomain.com/otherpage.html" target="_top">My Link</a> See the W3Schools Documentation

Categories : HTML

Angular animate ng-cloak opacity
A different approach: http://jsfiddle.net/coma/UxcxP/2/ HTML <section ng-app> <div ng-class="{foo:true}"></div> </section> CSS div { width: 100px; height: 100px; background-color: red; opacity: 0; -moz-transition: opacity 0.5s ease; -o-transition: opacity 0.5s ease; -webkit-transition: opacity 0.5s ease; transition: opacity 0.5s ease; } div.foo { opacity: 1; } This will work like cloak since Angular won't set the foo class until is loaded. The cloak won't work as you want because it'll be there (as a class, attribute, element...) until Angular replace it with the result of its templating process, so it isn't the same node and that's why it won't get the transition (a transition occurs when the same element changes),

Categories : HTML

Cloak "Spring-WS" in validation errors
Figured it out public class ValidatingInterceptor extends PayloadValidatingInterceptor { @Override public QName getDetailElementName() { return new QName("http://www.mycee.co.za", "tech", "mt"); } } WOOT!

Categories : Java

SAS- Auto Login to a secure website , open links in it and fetch data
The correct way to login to a secure site is given in the documentation : filename foo url 'https://www.b.com/file1.html' user='jones' prompt; If you're having trouble with that with the error above, it's possible you have a malconfigured SAS installation or OS. See this reference, in particular the SSLCERT options in section 2, for more specific details useful for your site.

Categories : Security

Tracking custom image links on WordPress website by Google Analytics
(function ($) { $(document).ready(function() { // Attach onclick event to document only and catch clicks on all elements. $(document.body).click(function(event) { // Catch the closest surrounding link of a clicked element. $(event.target).closest("a,area").each(function() { _gaq.push(['_trackEvent', 'Image Click', $('img', this).attr('alt'), $(this).attr('href')]); }); }); }); })(jQuery); Yeah is possible you can track the image click via google analytics See this reference for more info. http://techatitsbest.com/blog/image-click-tracking-google-analytics-events http://www.seotakeaways.com/event-tracking-guide-google-analytics-simplified-version/

Categories : Wordpress

How to setup Google Analytics for a total number of hits on three particular links on my website?
Google Analytics tracks all links by default. If you want to check how these 3 particular links are doing, you can look at the content. Here's how you reach there: Standard Reports > Content > Overview > All Pages Here, you will get a list of all the pages from your in a table. If your links don't show up here, you can add an "Advanced Filter" to the table.

Categories : Google Analytics

Automatically Highlight Navigation Links on Horizontal Free Scrolling Website
this your fiddle horizontal: http://jsfiddle.net/x3V6Y/ I made a little change on HTML, and here is the JS: $(function(){ var sections = {}, _width = $(window).width(), i = 0; // Grab positions of our sections $('.section').each(function(){ sections[this.name] = $(this).offset().left; }); $(document).scroll(function(){ var $this = $(this), pos = $this.scrollLeft(); for(i in sections){ if(sections[i] >= pos && sections[i] <= pos + _width){ $('a').removeClass('active'); $('#nav_' + i).addClass('active'); } } }); });

Categories : Javascript

Creating web links that will open a website, iOS, Android or Win8 app depending on device
Rather delayed reply but here goes: Detect which OS is being used using Javascript code. Link Change the hyperlink based on whether it is an iPhone Android or Windows. If its iPhone use this, if its Android use this and for Windows use this Hope that helped!

Categories : Android

Is there any way to see hidden content on a website maybe hidden cloudfront links?
It depends on how they have 'hidden' the content: If they just use display: none; or visibility: hidden; (i.e. they sytlistically hide it) then you can't see it as the browser won't render the item, but it will still exist in the HTML; if it's an image, the link to the image will be valid, or if it is text you can just read it. In your example, they are using some server-side code to limit what is actually emitted into HTML - thus there is nothing there. That way people can't just inspect the source and hack around it.

Categories : Java

How can I disallow WebView to open links on the browser in WinRT( target=_blank links )?
There is a navigation starting event. It have a cancel property that can be used to cancel the navigation. Maybe this will work for you? http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.controls.webview.navigationstarting

Categories : C#

make content links from side nav links, exclude certain tags not working
Probably: $('#center_content').find('*:not(a, h1, img)').html(); Because in your example you just selectind element with ID '#center_content', without filtering elements inside it. UPD: http://jsfiddle.net/KqBCF/2/

Categories : Javascript

uitextview dataDetectorTypes doesn't work with short links like bitly links
The link should be auto-detected and tappable without a problem. Make sure that: Your UITextView instance isn't editable Your UITextView dataDetectorTypes includes UIDataDetectorTypeLink

Categories : Iphone

Calling External Dynamic Links from VBulletin > Need Links to Open in Base Target iFrame
Asuming all of this is on the same domain, and that your target iframe had an id like <iframe id="openlinkshere"> You could add a handler on your links like this: <script type="text/javascript" src="http://[VBulletin]/external.php?forumids=1&type=js"> </script> <script language="" type="text/javascript"> <!-- for (x = 0; x < 5; x++) { document.writeln("<a onclick="top.document.getElementById('openlinkshere').location.href = this.href; return false;" href="http://[VBulletin]/showthread.php?t=" +threads[x].threadid+"">"+threads[x].title+"</a> (Posted By: "+threads[x].poster+")<br />"); } </script> This would open the link on your target iframe top.document.getElementById('openlinkshere').location.href = this.href; This stops

Categories : Javascript

Using selenium webdriver, how to click on multiple random links in webpage one after another continuously to detect broken links?
When testing for a bad page, I usually test for the title/url. If you are testing a self-contained site, then you should find/create a link that is bad, and see what is unique in the title/URL, and then do something like: assert(!driver.getTitle().contains("500 Error")); If you don't know what the title/url will look like, you can check if the title contains "500"/"404"/"Error"/"Page not found" or if the page source contains those as well. This will probably lead to a bunch of bad pages that aren't really bad (especially if you check for the page source), and will require you to go through each of them, and verify that they really are bad

Categories : Python

Add target="_blank" to all links BUT internal site links
I use the following bit of JavaScript when using jQuery. It also adds a class to external links and includes tracking of outgoing links in Google Analytics. Just remove it if you don't use Google Analytics. You can use a more specific selector if you don't want this to hit all links on a page, for example $("#main a[href^=http]"). $("a[href^=http]") .each(function(){ // this part checks if the link is external if (this.href.indexOf(location.hostname) == -1){ // add a class for external links $(this).addClass("ext") // make the link open in a new tab/window .attr({ "target":"_blank", "rel":"external" }) // track clicks of external links if you use Google Analytics .click(function(){ _gaq.push(["_trackEvent", "Outgoing link",

Categories : Javascript

Is it possible to get a class mirror by name?
Here is possible example of your requirements. library app; import 'dart:mirrors'; import 'dart:async'; void main() { var names = [ 'dart.async.Future', 'dart.mirrors.ClassMirror', 'app.User', 'app.Question', 'Answer', 'app.Stackoverflow' ]; for(var name in names) { var clazz = getClassMirrorByName(name); print('$name: $clazz'); } } ClassMirror getClassMirrorByName(String className) { if(className == null) { return null; } var index = className.lastIndexOf('.'); var libname = ''; var name = className; if(index > 0) { libname = className.substring(0, index); name = className.substring(index + 1); } LibraryMirror lib; if(libname.isEmpty) { lib = currentMirrorSystem().isolate.rootLibrary; } else { var

Categories : Dart

changing direct links to route links
You may try this for some rough processing: Use href="([^"]+)" to find every link that actually points to some resource. Iterate over each found resource (group 1 of each match) and check if it starts with /, http:// or www.. If it doesn't, add a leading / and replace the original value in the code with the modified one (for the replacing, try replacing the value of the full match (group 0) with the modified value).

Categories : C#

CasperJS - How to open up all links in an array of links
Try something like this. var x; casper.start(URL, function() { x = links.split(" "); // now x is an array of links }); casper.then(function() { this.eachThen(x, function(response) { this.thenOpen((partialURL + response.data), function() { this.echo(this.getTitle()); // display the title of page }); }); }); casper.run(); x was undefined because the for loop was being executed before casper.start. In the above code, the eachThen() block is nested inside of a casper.then block in order to delay its execution.

Categories : Javascript

Flip, mirror image in IE8 - CSS
filter:fliph should work in IE4-8, even without -ms- prefix (which was needed only for early beta versions of IE8). Probably you should add parentheses filter:fliph() as this demo suggests. You can also try the newer IE5.5-9 syntax — filter: DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1) (as MSDN recommends). Older IE versions required the element to have layout to apply filters to it (how to make an element have layout, is described ), but, AFAIK, IE8 doesn't require it.

Categories : CSS

'Mirror' database connection using PHP
SQLyog has php proxy, and it is generally one of the methods for connecting to mysql databases which are bound to localhost. Also, some cPanel hostings have an option where you can specify external IP which can connect to the database, have you asked the support if there is such an options? In SQLyog, feature where they use php proxy is called HTTP Tunnel. Maybe there exists something like that for Sequel ? https://static.webyog.com/docs/SQLyog/HTTP_Tunneling_SQLyog_MySQL_Client.html

Categories : PHP

Mirror Data Between Two TCP Streams - VB.NET
It turns out that the code I posted above works perfectly well. I traced the problem back to some poor multithreading in other parts of my program. Once I fixed that, pages started loading. I'm still curious. Is there an even better or faster way of passing data between two streams?

Categories : Dotnet

Git local mirror and repository
Assuming you can drop the "mirror" requirement, and have "local (bare) repo $X also copies upstream repo $UX using refs/heads/upstream/$branch to name upstream branches known there as refs/heads/$X", use your second approach, but do this instead: $ cd /tmp; mkdir tt; cd tt; git clone --bare ssh://$upstream_host/tmp/t $ cd t.git $ git config remote.origin.fetch '+refs/heads/*:refs/heads/upstream/*' $ git fetch -p # accidentally omitted this step from cut/paste earlier This assumes you won't use branch names like upstream/master for anything yourself. (You could also/instead do something like: git config remote.origin.fetch '+refs/*:refs/upstream/*' but refs/upstream/* references are not copied over by normal git clone, git fetch, etc., so this is more of a pain for "normal" git users

Categories : GIT

Python BeautifulSoup Mirror
For the html file structure you have given, >>> soup = BeautifulSoup(content) >>> soup.findAll('b') [<b>This is awesome</b>, <b>bye<br />bye</b>] Maybe, several findAll sentences are needed to extract text in different tags, such as <p>,<strong>. Hope it will help.

Categories : Python

Using git to mirror web development environment?
If you're set on managing it this way, you could use symlinks to link into the git project from the actual web-exposed directories. Here's a thorough answer describing that technique.

Categories : GIT

Correctly rendering a mirror in XNA
I didn't use XNA, but I did some Managed C# DX long time ago, so I don't remember too much, but are you sure mirrorLookAt should point to a cameraFinalTarget? Because basically the Matrix.CreateLookAt should create a matrix out of from-to-up vectors - 'to' in your example is a point where mirror aims. You need to calculate a vector from camera position to mirror position and then reflect it, and I don't see that in your code. Unless your room.DrawRoom method doesn't calculate another mirrorLookAt matrix, I'm pretty sure your mirror target vector is the problem. edit: Your reflection vector would be Vector3 vectorToMirror = new Vector3(mirrorPos.X-camera.position.Y, mirrorPos.Y-camera.position.Y, mirrorPos.Z-camera.position.Z); Vector3 mirrorReflectionVector = new Vector3(vectorToMirror-

Categories : C#

maven - mirror depending on project
Unfortunately there is not an out-of-the-box solution with Maven. Usual i check in my settings.xml via git and having different branches for different networks like at work, home etc. The result is reduced to a simple git checkout HOME or git checkout WORK etc.

Categories : Maven

Mirror partial image on UIToolbar
These are simply UIImageViews flipped along the x-axis with a gradient drawn over it. Have a look at the code sample. You might need to vary colors and adjust the frame, start and stop colors... #import <QuartzCore/CAGradientLayer.h> #import <QuartzCore/CALayer.h> UIImageView *imgView = [[UIImageView alloc] initWithImage: coverImage]; //flip the view imgView.transform = CGAffineTransformScale(self.imgView.transform, 1, -1); CGRect frame = imgView.frame; frame.size.height = 50.0; //or any other value imgView.frame = frame; self.imgView.contentMode = UIViewContentModeBottom; self.imgView.layer.masksToBounds = YES; //set the gradient CAGradientLayer *layer = [CAGradientLayer layer]; layer.frame = self.imgView.bounds; UIColor *startCol = [UIColor colorWithRed: 1.0 green: 1.0 blue

Categories : Iphone

Exception Processing Mirror-Quickstart
The latest version of the mirror-quickstart-java that supports Google App Engine has been tagged with app-engine; you should use this specific release.

Categories : Google App Engine

How can I access a mirror service with userid?
In my Glassware, notification responses (what I believe you are calling a service) run similar code to what you have, I generate a new Credential using the java helper method AuthUtil.getCredential(String userId) every time I need to make another Mirror API request based on an incoming notification in App Engine. This credential is used in a MirrorClient object that uses the same userId and does the insert back into the timeline. I get the userId by looking it up in a persisted store referenced by the userToken that the notification provides.

Categories : Java

How to mirror an array with WS2801 LEDs?
You need to reset cols to 0 at the start of each iteration of your rows for() loop. for(rows = 0; rows < ROWS; rows++) { readEQ(); // should light up a whole row at once starting from the beginning of the array cols = 0; //reset cols to zero to iterate next set of columns while (cols != COLS) { //while in row # x fill all the col values until = COL value Incidentally, it's not clear if you should call readEQ every row, or only after you have finished an entire display grid - each will have various advantages (rate of partial response, vs self-consistency of updates)

Categories : Arrays



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