w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Unicode signs shown on development page, but not on actual page with same code
Try putting this in your <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> Also, try changing the de-DE in the <html> tag to <html lang="de" prefix="og: http://ogp.me/ns#"> let me know if that works

Categories : CSS

generate code using form button and then display generated code on page
You can use tag to show HTML entities You need to encode all Your HTML entities like < => < like way. Also you can show a text area in which all those HTML code need to echo, it will not execute your code simply it will print it.

Categories : PHP

 will not display the page - will not let me see the page
Your problems is most likely that TinyMCE escapes all HTML tags. To allow code to be embedded without adding the security risk of allowing other HTML tags to be inserted, I think this is what you want: https://code.google.com/p/tinymce-pre-plugin/

Categories : Javascript

Display Hex Code on Page load
HTML <ul class="palette"> <li swatch="#4362ff"> <li swatch="#ee3d5f"> <li swatch="#FFFFFF"> <li swatch="#FFFFFF"> <li swatch="#FFFFFF"> </ul><span><a href="palette/URL">Title</a></span> jQuery //document ready $(document).ready(function () { $('.palette li').each(function () { $(this).html('<input value='+$(this).attr("swatch")+' type="text" style="background: ' + $(this).attr('swatch') + '" />'); }); }); fiddle There were lots of mistakes in the code. You didn't select the correct class for the UL. Also UL elements can not contain span elements. Also using inspect element would have showed the code does what it told it to and put ## on front of the color.

Categories : PHP

What is wrong in my code to display xml in asp.net page?
You are not really applying the XSLT when you simply tell ASP.NET to display the XML in the literal's text. You have to apply the XSLT separately. From this question you can learn how to transform an XML: XPathDocument myXPathDoc = new XPathDocument(myXmlFile) ; XslCompiledTransform myXslTrans = new XslCompiledTransform(); myXslTrans.Load(myStyleSheet); XmlTextWriter myWriter = new XmlTextWriter("result.html",null); myXslTrans.Transform(myXPathDoc,null,myWriter); Note the example is writing to a file but you would write to a string. You would then have to do that inside the ListView.ItemDataBound event for each bound row and generate the HTML you want.

Categories : Asp Net

How to run java code (.class) using php and display on the same web page
I'm no PHP expert, but there are a few ways you could do this: Use something like shell_exec or make a system call expose your java logic through a webservice Don't do it all! If your posted code is all that's going on, just rewrite the formatting stuff in php or write the whole thing in java. probably some other weird way So once you choose a path for your server side stuff, if you want to display the results without a page reload, you will want to use some javascript and most likely some jQuery.ajax or maybe some jQuery('.target-area').load.

Categories : Java

Why does the count of friends that like a page in FQL differs from the actual page?
Normally this comes down to the user preventing platform access and locking down their privacy settings. The best way to check would be to inspect the users missing SELECT uid FROM page_fan WHERE page_id='20531316728' AND uid ='friend_id'

Categories : Facebook

getting the source code of remote page then display only one div based on its id
If you have PHP 5.3.6 or higher you can do the following: $url = "remotesite.com/page1.html"; $html = file_get_contents($url); $doc = new DOMDocument(); // create DOMDocument libxml_use_internal_errors(true); $doc->loadHTML($html); // load HTML you can add $html $testElement = $doc->getElementById('divIDName'); echo $doc->saveHTML($testElement); http://php.net/manual/en/domdocument.getelementbyid.php If you have a lower version I believe you would need to copy the Dom node once you found it with getElementById into a new DomDocument object. $elementDoc = new DOMDocument(); $cloned = $testElement->cloneNode(TRUE); $elementDoc->appendChild($elementDoc->importNode($cloned,TRUE)); echo $elementDoc->saveHTML();

Categories : PHP

Load intro page before actual web-page
Don't use mod_rewrite, use DirectoryIndex and give priority to index.html DirectoryIndex index.html index.php Note: While this should work, I don't recommend it as it creates ambiguity. One of those configuration changes that will haunt you later.

Categories : PHP

Display actual time in a Qt program
Create a QTimer with 1 sec interval (or e.g. 100 msec for more accuracy), connect its timeout signal to your slot. In the slot get the current time using QTime::currentTime() static function, convert it to string using toString and assign it to a GUI element (e.g. a label).

Categories : Qt

Display image in its actual size in angular.js
You need to use $scope.$apply, otherwise any changes to $scope made in non-Angular event handlers won't be processed properly: img.onload = function () { $scope.$apply(function() { $scope.image.width = img.width; $scope.image.height = img.height; $scope.image.path = $scope.imageurl; }); }

Categories : Angularjs

How to display cart details along with sub totals discount coupon code in magento checkout page?
You can simply call this data by getting the quote: <?php $cart = Mage::getModel('checkout/cart')->getQuote(); $cartData = $cart->getData(); ?> Then display e.g. the grand total: <?php echo $cartData['grand_total']; ?>

Categories : Magento

simple section navigation plugin : which code in wordpress select the widgets to display when clicking on a page?
the problem was not simple section navigation plugin widget but the sidebar from my theme that encapsulates the plugin widget. For information for other users , the simple section navigation plugin does work with wordpress 3.5.2. simply replace _get_ancestors function by get_ancestors

Categories : Wordpress

slideUp different on actual page
Sifting through CSS for a few minutes and I found a solution, I have made a list of corrections. Here is the CSS code on pastebin, it does all the fixes I have mentioned below. Manual Fix Find #middlewrapper #content .contentbox, disable float:left. #middlewrapper #content .contentbox { width: 650px; padding: 15px; /* float: left; */ background-color: white; } Find #middlewrapper #content .contentbox_shadow, disable float:left. #middlewrapper #content .contentbox_shadow { width: 690px; height: 20px; /* float: left; */ background-image: url('http://xn--nstvedhandel-6cb.dk/naestved/public/css/../images/content_skygge.png'); background-repeat: no-repeat; } Find #middlewrapper #content, disable float:left. #middlewrapper #content { width: 690px

Categories : Javascript

Custom display of JScrollPane's actual scroll bars (make transparent)
and the scroll and text area are showing as transparent (non-opaque), however, I can't seem to affect the actual scroll bars. They still appear as the default grey color where I'd like to change their color and/or make them transparent to match the rest. there are two ways you would need to override BasicScrollBarUI(), without any commnets milion dollars baby by @aterai, there is VerticalScrollBar only, you need to override and add HorizontalScrollBar, to ScrollPaneLayout() that returns coordinated for Horizontal JScrollBar,

Categories : Java

Redirecting to actual requested page
Use request.GET['next']: return HttpResponseRedirect(request.GET.get('next', '/')) Also see: Django: Redirect to previous page after login

Categories : Django

How to convert Text-based programming code (stored in DB) into actual programming code?
The hard way is to interpret the code within the database, the easier way is to store c# code and runtime compile it with CodeDOM http://msdn.microsoft.com/en-us/library/y2k85ax6.aspx Or take a look at Iron Python. http://ironpython.net/

Categories : C#

Add actual HTML elements to PRE/CODE contents
Use .html() instead of .text(). When you use .text(), the value is the literal text that you want users to see, so it replaces special HTML characters with entities so they'll show up literally.

Categories : Javascript

code doesn't work on Actual server
It is really difficult to debug in PHP. Only few tricks and tools can be used in debugging. To solve this type of problem, when you get blank window without any error indication, it is good to use a error reporting tool of PHP. To enable the error reporting add the following line of code in your webpage error_reporting(E_ALL); ini_set('display_errors',true);

Categories : PHP

Selenium Webdriver - how to close the first pop up window and go to the actual page
Since this is a JavaScript modal, when the page finishes loading the JavaScript code could still be running. The solution is to wait until the button to close the modal be displayed, close it and then follow with your test. Like this: WebDriverWait wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30)); wait.Until(ExpectedConditions.ElementIsVisible(By.Id("csclose"))); driver.FindElement(By.Id("csclose")).Click(); Tested myself and works fine. Hope it helps.

Categories : Selenium

Why is this generated ruby regex not working in the actual code?
try this: s = "4.4 out of 5 stars" p s[/([+-]?d*.d+)(?![-+0-9.])/] # >> "4.4" You can find this wayRegexp.new: Regexp.new('([+-]?\d*\.\d+)(?![-+0-9\.])') # => /([+-]?d*.d+)(?![-+0-9.])/

Categories : Ruby

How to differentiate a request for a resource on a page from the actual page request in PHP
Isn't is just as simple as checking if the requested path terminates in .png, .gif, .jpg etc... ? i.e. /* $reqPath is for example /the/stuff/i/want/image.png */ if (in_array(strtolower(substr($reqPath, -4)), ['.png', '.jpg', '.gif', '.svg']) { /* It's an image! */ } else { /* Must be something else */ } I added the strtolower just in case you have a request for IMAGE.PNG, Image.Png or something silly.

Categories : PHP

My php code works on localhost, but doesn't work on the actual server
Your production server is Server:Microsoft-IIS/6.0 The instructions for installing PHP on IIS 6 are at http://php.net/manual/en/install.windows.iis6.php Here are the headers from the Server response: HTTP/1.0 304 Not Modified Content-Location: http://www.digitalcowboyrepair.com/index.html Last-Modified: Mon, 15 Jul 2013 17:15:42 GMT Accept-Ranges: bytes Server: Microsoft-IIS/6.0 MicrosoftOfficeWebServer: 5.0_Pub X-Powered-By: ASP.NET Date: Mon, 15 Jul 2013 17:57:35 GMT If you do not already have MySQL installed on the server, you can find the instructions at http://dev.mysql.com/doc/refman/5.7/en/windows-installation.html

Categories : PHP

Virtualbox has a different byte code for backspace than an actual bare metal OS
You have just encountered the classic DEL vs. BKSP dilemma. There is no perfect solution, you have to acknowledge that some terminals are configured to output a BKSP (0x08) ASCII character when the user presses backspace, while others output DEL (0x7f). Most terminal emulators have an option for this sort of thing, I have not seen a lot of application software that actually works around this issue. It is usually left up to the terminal program, and the user decides whether to press DEL or BKSP or re-configure their terminal in order to ensure proper program operation.

Categories : C

Java generics - naming actual types of actual type
You need a second generic parameter: public interface MyInterface2<U estends MyAbstractClass, T extends MyInterface1<U>> { U returnInstanceOfMyClass(); }

Categories : Java

Problems calculating the actual height of web page elements with Javascript and JQuery?
You can maybe use getBouningClientRect on your element. This will give you the position and size of that element: var clientRect = element.getBoundingClientRect(); And now you can get the size and position: var leftPos = clientRect.left; var topPos = clientRect.top; var width = clientRect.width; var height = clientRect.height; Hope this helps! Here is a link to more information: https://developer.mozilla.org/en-US/docs/Web/API/element.getBoundingClientRect

Categories : Javascript

Detect the actual content in a web page (ignore header, footer, navigation etc.)
Either check which <div> tag has the most content (really unreliable) or make a list of all class names/ ids that are used by major sites to mark their main content-markup and save them in a database. you should be able to do with a couple thousand rows and then parse the pages using DOM to check with class name is available. This might not be the fastest solution, but you could speed it up, if you map certain sites, you know which class names they use. EDIT: You will still have to refine your algorithm. For example: how do you handle multiple of those stored class names being present what do you do, if none is present (show the whole page?, Show only the biggest div?

Categories : Javascript

Convert auto page numbers special character to actual value in InDesign document
Ok, I think I've worked it out. main(); function main(){ app.scriptPreferences.userInteractionLevel = UserInteractionLevels.interactWithAll; app.findGrepPreferences.findWhat="~N"; var FindGrep=app.activeDocument.findGrep(); for(i=0; i<FindGrep.length; i++) { var item = FindGrep[i]; var page = item.parentTextFrames[0].parentPage; item.contents = page.name; } alert("done"); } Struggled to find any valuable documentation from Adobe. This really helped: http://jongware.mit.edu/idcs5/ As well as this SO question: Get current page number in InDesign CS5 from Javascript Edit: If your page numbering is in a master, you will need to "override all page master items" (check the pages palette) Edit 2: This worked on inDesign 5.5 (not s

Categories : Misc

how to display a coming soon page when a page doesn't have an index page using htaccess
I'm guessing that for http://domain1.com/, you've got the document root pointed to /domain1.com/, which means it will never be able to access files outside of the document root. You'll need to move the comingsoon.php file to the /domain1.com/ folder and include the same ErrorDocument. Another option is to include the full hostname in the original error document: ErrorDocument 403 http://maindomain.com/comingsoon.php But this will change the location in the browser's address bar.

Categories : Htaccess

force file download code work on localhost but not working on actual server in php
use this public function loadfile($fl) { $mime = 'application/force-download'; header('Pragma: public'); // required header('Expires: 0'); // no cache header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Cache-Control: private',false); header('Content-Type: '.$mime); header('Content-Disposition: attachment; filename="'.basename($fl).'"'); header('Content-Transfer-Encoding: binary'); header('Connection: close'); readfile($fl); // push it out exit(); }

Categories : PHP

Product image display in product list and featured product page, but not display in detail page of magento
Have you marked Radio button for product image as Base Image in Administration area on live site? This radio button causes to display the product image on Product detail Page. please check.

Categories : PHP

display: table-cell is not behaving like an actual table
Don't give buttons or inputs that are buttons display: table-cell. It doesn't really work. If you read http://getbootstrap.com/components/#input-groups-buttons it states: Buttons in input groups are a bit different and require one extra level of nesting. Instead of .input-group-addon, you'll need to use .input-group-btn to wrap the buttons. This is required due to default browser styles that cannot be overridden. Here's a demo showing how to do this without Bootstrap, if you need it: http://jsfiddle.net/thirtydot/t34Au/3/ This uses the same basic method as Bootstrap. And here's a demo where I copied the HTML from the Bootstrap demo and imported Bootstrap: http://jsfiddle.net/thirtydot/2cGaG/

Categories : CSS

Getting "An error exists on this page. Acrobat may not display the page correctly." using ITextSharp WriteSelectedRows
You're introducing a PDF syntax error here: PdfContentByte canvas = writer.DirectContent; canvas.SetTextMatrix(50, 50); With DirectContent, you grab an object that allows you to write PDF syntax directly to the content stream. Immediately after that, you introduce a text state operator. This is illegal PDF syntax: A text state operator is only valid inside a text object; that is: between BT (BeginText()) and ET (EndText) operators). Why do you need to set the text matrix? That line doesn't make sense, because you're defining the position of the table in the writeSelectedRows() method. Long story short: remove canvas.SetTextMatrix(50, 50); and you'll have at least one syntax error less in your PDF. I just checked the iText codebase, and normally your code should throw an "unbalanced

Categories : C#

Display div on page load having style display:none
Try this. It will help you. Using Jquery $(document).ready(function () { $("#campaign-alert").show(); }); Using JavaScript window.onload = function () { document.getElementById("campaign-alert").style.display = "block"; };

Categories : Javascript

Pass the information of tags to the php and display in another page( and can also update in another page)?
First of all the jsfiddle link doesn't work for me. Now, the only way is to use http methods like POST/GET to pass the data from client to server. The implementation depends of what you like the most or better a friendly and easy to use interface, so my suggestions are: You can create (dynamically or not) a form (with hidden fields for example) and update their values with JS and pass the data through a submit button which is an easy implementation. An another implementation is to use Ajax if you take care of user selection and create the data structure dynamically. In both cases, you should validate the correctness of the submitted data with php. Never trust the user or the "supposed" JavaScript restrictions.

Categories : PHP

Writing junits in Test Driven Development before writing actual code?
That's partly right. Using an IDE (Eclipse, IntelliJ) you can create a test. In that test invoke a method (that does not exist) and using a refactoring tool create a method with the proper signature. That's a trick that makes working with TDD easier and more fun. According to Now i will write junit test case where i will check the size as 0. Is this Right? you should write a test that fails, and the provide proper implementation.

Categories : Java

Django: display time it took to load a page on every page
You can create a custom middleware to log this. Here is how I create a middleware to achieve this purpose base on http://djangosnippets.org/snippets/358/ (I modified the code a bit). Firstly, assuming your project has a name: test_project, create a file name middlewares.py, I place it in the same folder as settings.py: from django.db import connection from time import time from operator import add import re class StatsMiddleware(object): def process_view(self, request, view_func, view_args, view_kwargs): ''' In your base template, put this: <div id="stats"> <!-- STATS: Total: %(total_time).2fs Python: %(python_time).2fs DB: %(db_time).2fs Queries: %(db_queries)d ENDSTATS --> </div> ''' # Uncomment the follo

Categories : Python

In an html page,how to display the first page of a pdf document as the icon?
If you dont want to use images for the preview, you have to render every .pdf file. Simplest way would be an IFrame, but you can find more solutions here. But keep in mind that every .pdf you put in an IFrame will be loaded completely und if you have a list of several .pdf's it could make your page quite slow.

Categories : HTML

display table entries on page 2 when selected in page 1
Do you mean to use two pages or UserControls? If you're using UserControls, it's a classic Master - Details scenario, you can find an example here: http://www.codeproject.com/Articles/332615/WPF-Master-Details-MVVM-Application. If you want to use pages, you'll have to pass the parameter as the second page's DataContext. If you create the second page in the first it's easy enough. If not you'll need some common object to pass the information, you can try a MVVM framework like MVVM Light which have a messenger for exactly these situations. Regards, Yoni.

Categories : Wpf

Page display the All page Content in wordpress
Try this code: it will exclude the current page by taking its ID. <?php $args = array( 'post_type' => 'page', 'numberposts' => -1, 'sort_order' => 'ASC', 'sort_column' => 'post_title', 'post_status' => 'publish', 'exclude' => get_the_ID() ); //$allpages = get_pages($args ); ?> <?php wp_list_pages( $args ); ?>

Categories : Wordpress



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