w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
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 use .htacess file in our HTML website? for remove page extention from website
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.html -f RewriteRule ^(.*)$ $1.html No need to add code in any page.Create .htacess file with above content & add file to the root folder of your site(for example, /home/domains/domain.com/htdocs/)

Categories : HTML

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

html 5 website giving different result in chrome and firefox
Seems the vertical line was produced by //*[@id="slideshow-content"]/div/div[2]/div/span who has a style : 'content: "e0fb";' I delete this and the vertical line disapeared. There is my new perfect solution: Your customed icon svgs is not compatible with webkit? ( safari fails to display icons too) But the woff file works fine! In your base.css: url('../fonts/Batch-master.svg#Batch-master') format('svg'), url('../fonts/Batch-master.woff') format('woff'), swap these two lines, and chrome will read woff and use it. url('../fonts/Batch-master.woff') format('woff'), url('../fonts/Batch-master.svg#Batch-master') format('svg'),

Categories : Jquery

Aligning an html table across a page with multiple links
Your markUp could look something like this one: <div class="xyz"> <ul> <li> <a href="../index.html">Top</a> </li> ... </ul> </div> You can style it via css. Maybee take a look at Bootstrap framework.

Categories : HTML

Displaying text returned from php in loop as separate links on html page
Php throws everything at once to the ajax success function... You need to use json_encode on the php array and echo it to pass it as json array. <?php $return = array(); foreach($array as $key=>$value){ //Do your processing of $value here $processed_value = $value; array_push($return, $processed_value); } echo json_encode($return); ?> In the ajax call set the dataType as "json" for it to parse the data passed from php as json array. Loop across the array received by using jquery each. $.ajax({ type: "POST", url: "dbtryout2_2.php", data: datastr, dataType: "json", success: function(arrayjson) { $.each(function(arrayjson, function(i, processed_value) { var link = $('<a href="#" class="album"><font color="red">' + processed_value + '</font></

Categories : PHP

IIS: PHP - Can I have different 404 page for each directory in my html website?
Or you could just make an .htaccess file with: ErrorDocument 404 404.html Note there is no backslash before the 404.html - so now it will always look in the current directory for the error page.

Categories : PHP

How to have a global code for all ajax errors in the html page?
You should use global jQuery.ajaxSetup() or .ajaxError(). Note: Global callback functions should be set with their respective global Ajax event handler methods — .ajaxStart(), .ajaxStop(), .ajaxComplete(), .ajaxError(), .ajaxSuccess(), .ajaxSend() — rather than within the options object for $.ajaxSetup(). Example: $(document).ajaxError(function(event, request, settings) { $("#msg").append("<li>Error requesting page " + settings.url + "</li>"); });

Categories : Javascript

Pull HTML content from remote website and display on page
you cannot solely use jQuery's .ajax, .load, or .get methods for this type of operation Yes, you can BUT the remote website must give you authorization for that.. just inserting an iframe and using the normal DOM functions you could IF THERE IS NOT cross domain restrictions. You can get a FULL page only with php (using the common functions include, require, etc and passing the website URL but, same case, you need to be authorized..

Categories : PHP

How can I get my hyperlink in HTML result in same page or window with or without using iframe tag or JavaScript?
You will use AJAX to achieve this. Heres an awesome article below: http://css-tricks.com/ajax-load-container-contents/

Categories : HTML

Getting links from an HTML table using HTML::TableExtract and HTML::Extor in Perl
You don't describe what the problem is...what exactly doesn't work? What does $row->[0] contain? But part of the problem might be that TableExtract returns just the 'visible' text, not the raw html, by default. You probably want to use the keep_html option in HTML::TableExtract.

Categories : HTML

How can I make a website such that when a user enters any URL related to the website, it opens up the index page
If you want to prevent users to open pages directly except for the index, you can check the referer, and redirect to the index page if the referer doesn't match your website. Are you using Apache? If you are, you can use mod_rewrite to do this. First, enable mod_rewrite, usually by uncommenting the following line in the httpd.conf file: LoadModule rewrite_module modules/mod_rewrite.so Then create a .htaccess file in the same folder as index.html with the following content: RewriteEngine on RewriteRule ^index.html$ index.html [QSA,L] RewriteCond %{HTTP_REFERER} !^http://example.com/.*$ RewriteRule ^.*$ /index.html [R,L]

Categories : HTML

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

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

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

jQuery:Parsing an ajax HTML page result with jQuery
Due to Same Origin Policy, you can't make an ajax call to Google because their domain is different to that of your code. Suggested solution is to proxy the request through a server side script that resides on the same domain, and either make a HTTP request to get the search results or use the Custom Search API.

Categories : Jquery

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

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

Showing html page inside a php page by echo the html page contents
hmm, a simple html page: <html> <head> <title>Page title</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link type="text/css" rel="stylesheet" href="your-style-file.css" media="all" /> <script type="text/javascript" src="your-javascript-file.js"></script> </head> <body> <div id="div-tag">A div tag</div> <script type="text/javascript" src="another-javascript-file.js"></script> </body> </html> You can load external html file via javascript (or jquery load()). like this: $('#div-tag').load('external-file.html'); Or via php, like this: $external-html = file_get_contents('external-file.html'); print $external-html; Check your javascript, mayb

Categories : PHP

Replace Page Links on Popup Page With Javascript to Open in Main (Parent) Window
You cant replace attribute target, from attribute href. use el.target and just set the value var aEls = document.getElementsByTagName('a'); for (var i = 0, aEl; aEl = aEls[i]; i++) { aEl.target="_parent"; }

Categories : Javascript

How can I post links, pictures etc to my facebook page on behalf of my page using an app?
in your code you only get USER access token. However, in order to post as page, you need to get PAGE access token. See here for more details: https://developers.facebook.com/docs/authentication/pages/ In 2 words, you need to do the following: Authenticate the user and request the manage_pages permission Get the list of pages the user manages using token from (1) - https://graph.facebook.com/me/accounts?access_token=USER_ACCESS_TOKEN Parse the list and get the PAGE token - and use it to post to the feed. Basically, before your client.Post("/AllTheMed/feed", ...) you should call me/accounts (here comes pseudocode): var myAccounts = client.Get("/me/accounts"); var pageAccessToken = myAccounts.Single(x => x.pageName == MY_PAGE_NAME).access_token; var pageClient = new FacebookClie

Categories : C#

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

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

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

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

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

Scraping a web page, links on a page, and forming a table with R
You can xpathSApply, (lapply equivalent), that search in your document given an Xpath. library(XML) url = 'http://www.who.int/csr/don/archive/year/2013/en/index.html' doc <- htmlParse(url) data.frame( dates = xpathSApply(doc, '//*[@class="auto_archive"]/li/a',xmlValue), hrefs = xpathSApply(doc, '//*[@class="auto_archive"]/li/a',xmlGetAttr,'href'), story = xpathSApply(doc, '//*[@class="link_info"]/text()',xmlValue)) ## dates hrefs ## 1 26 June 2013 /entity/csr/don/2013_06_26/en/index.html ## 2 23 June 2013 /entity/csr/don/2013_06_23/en/index.html ## 3 22 June 2013 /entity/csr/don/2013_06_22/en/index.html ## 4 17 June 2013 /entity/csr/don/2013_06_17/en

Categories : Xml

pass a javascript variable within a html page into a html form (on the same page) for submission to perl cgi
Add a hidden field. Set the value in that field to the value of the variable in Javascript. <form action="cgi-bin/runalg.cgi" method="post" enctype="multipart/form-data"> [...] <input type="hidden" name="ID" value="default"> </form> And then on javascript: <script type="text/javascript"> document.forms[0].elements["ID"].value = getValue("ID"); </script> The index for the form may vary in your document.

Categories : Javascript

Do I need to put fb:amins & fb:app id meta tags to every page of my website or puting them on one page would be enogh?
You have to put those tags on every page. Please note that you might want to use <meta property="fb:page_id" content="395450240451647" /> As some are having problems getting it to work with app_id The app ID specified within the "fb:app_id" meta tag was invalid

Categories : Facebook

C# - How to detect if website return page with content "This page cannot be displayed "using Watin?
I don't know what your IE type is but you could use HttpWebRequest/HttpWebResponse and check the StatusCode property of the response. For example: - HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://www.google.com"); HttpWebResponse response = (HttpWebResponse)request.GetResponse(); if (response.StatusCode == HttpStatusCode.NotFound) { //page not found } //etc.... The HttpStatusCode enum can be useful for checking against a variety of different states.

Categories : C#

Proper setup of custom theme for single page website + separate blog page
index.php should really be your blog template not your static home page. Make a copy of page.php to page-home.php (or whatever you've named your front page), then put the static content in there. You probably won't even need to assign the template to the page - WordPress will do that automatically based on the file name. By default, page.php is used for all static pages, index.php is used for whatever you've assigned as your blog page in the "Reading" section of the dashboard. index.php is also the template of last resort, which will be used if WordPress can't find any other appropriate template files.

Categories : Wordpress

I can open picture from local, but when I visit from website there is always present contain some errors
You may want to rethink serving files through the django app. Instead you should serve them from /static folder which in an apache setup you would configure using an alias. That being said, check this out: image/pjpeg and image/jpeg It says it may have something to do with serving pjpeg content-type to IE. Hope that helps.

Categories : Python

No Errors with Transpose Function and No Change In Result
You can read and write using a single column DataFrame just fine: import pandas.util.testing as tm from pandas import read_csv df = tm.makeTimeDataFrame() dfa = df[['A']].T dfa.to_csv('the_csv.csv') dfa_hat = read_csv('the_csv.csv', index_col=0) dfa_hat.T But I suspect that isn't your problem. You're misunderstanding that when you call DataFrame.mean() you're performing a reduction along an axis (axis == 0 by default). Let's look at a simple example: In [272]: df = DataFrame(randn(5, 2), columns=list('ab')) In [273]: df Out[273]: a b 0 0.056 -0.056 1 -0.384 1.153 2 0.524 -1.545 3 1.082 1.665 4 -0.593 -0.412 In [274]: df.mean() Out[274]: a 0.137 b 0.161 dtype: float64 In [275]: type(df.mean()) Out[275]: pandas.core.series.Series Notice that the index of d

Categories : Python

HTML result generated by a PHP script not recognized as HTML code
Have you closed the PHP tag ('?>') before put the HTML code? If you didn't, close them, or write echo '<form id="submit-form" action="submit-form.php" target="form-result-frame" method="post" enctype="multipart/form-data">'; echo '<iframe name="form-result-frame" id="frm-result-frame" type="text/html" width="300px" scrolling="no" height="40px" frameborder="no" src="#"></iframe>';

Categories : PHP

Convert html page to a image using webbrowser in asp.net taking Too much time to generate image of heavy html page
I changed your class a little bit and it now uses async/await instead of busy-waiting. You can use it as var th = new WebsiteThumbnailImage("http://www.google.com", 1024, 768, 256, 192); this.BackgroundImage = await th.GenerateWebSiteThumbnailImage(); . class WebsiteThumbnailImage { public WebsiteThumbnailImage(string Url, int BrowserWidth, int BrowserHeight, int ThumbnailWidth, int ThumbnailHeight) { this.Url = Url; this.BrowserWidth = BrowserWidth; this.BrowserHeight = BrowserHeight; this.ThumbnailHeight = ThumbnailHeight; this.ThumbnailWidth = ThumbnailWidth; } public string Url { set; get; } public int ThumbnailWidth { set; get; } public int ThumbnailHeight { set; get; } public int BrowserWidth { set; get; }

Categories : C#

How to send post to diffrent website and recive result without redirecting
You can use curl to grab a url and include post data. Once you have the response you can echo this into your div on your page. This link demonstrates curl and post: http://davidwalsh.name/curl-post

Categories : PHP

Comparing a website migration result (while running both sites in parallel)
With diff command you can use the following options - -b --ignore-space-change Ignore changes in the amount of white space. -w --ignore-all-space Ignore all white space. -B --ignore-blank-lines Ignore changes whose lines are all blank. --strip-trailing-cr Strip trailing carriage return on input.

Categories : Bash

Links section for HTML?
Lets reorganize and simplify your code a bit. I removed the extra <ul> tags - these would prevent the links from displaying next to one another. <!--External Links--> <div id="external_links"> <div> <ul style="height:380px;" id="Rowone"> <li><a href="http://www.andymark.com/" title="AndyMarks - Distributor"><h3>Andy Mark</h3></a></li> <li><a href="http://www.andymark.com/" title="AndyMarks - Distributor"><h3>Andy Mark</h3></a></li> <li><a href="http://www.andymark.com/" title="AndyMarks - Distributor"><h3>Andy Mark</h3></a></li> </ul> </div> Now add a little CSS definition for the <li> tag. li {

Categories : HTML



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