w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Set wxPython widget font to external font file
I was interested in this myself, and kluged something together to try it out. I looked at http://wiki.wxpython.org/UsingFonts and tried the wx.TheFontList.FindOrCreateFont method to try and load the font into wxpython. This failed, as the AddFontResourceA call returned 0, which is a failure code; it provided no further information. THANKS MICROSOFT!! If you install the font to the system (assuming Windows), the font selection works. I tried this on wxpython 2.8, Windows 7 64bit and with the Proggy fonts from ctypes import * import os gdi32= WinDLL("gdi32.dll") font_path = os.path.abspath("ProggySquare.tff") print font_path print gdi32.AddFontResourceA(font_path) import wx class DrawPanel(wx.Panel): def __init__(self, parent): wx.Panel.__init__(self, parent) self.B

Categories : Python

I cannot embed a font in html page using @font-face rule
You need to put font-face in top of CSS. @font-face { font-family: 'Armata'; src: url(Armata-Regular.ttf), src: url(Armata-Regular.otf), src: url(Armata-Regular.eot); } body{ font-family:Armata; font-size:16px; color:orange; text-align: center; background:white; }

Categories : HTML

Load external css with font-face
Firefox doesn't allow cross-domain requests for custom fonts by default. I still don't understand why they don't allow this, but you can get around it by adding the Access-Control-Allow-Origin header to the request for the font. In Apache, you would do something like this: AddType application/vnd.ms-fontobject .eot AddType font/ttf .ttf AddType font/otf .otf <FilesMatch ".(ttf|otf|eot)$"> <IfModule mod_headers.c> Header set Access-Control-Allow-Origin "*" </IfModule> </FilesMatch>

Categories : CSS

use different font-size for different font in the same page?
You can change font size using tags or CSS. I suggest CSS because it is more organized and easier to read. CSS .firstfont{ font-size: 10px; (or whatever you want) } .secondfont{ font-size: 12px; (or whatever you want) } In the HTML <div class="firstfont"> This is the first font's text </div> <div class="secondfont"> This is the second font's text </div> Alternatively if you don't want to use CSS you can do <div style="font-size:10px"> This is the first font's text </div> <div style="font-size:12px"> This is the second font's text </div>

Categories : Javascript

font-family not showing in IE8
I had the exact same problem that was driving me nuts! Ok, so my scenario was running Drupal 7, with bootstrap and using html5shim.js and respond.js to support media queries etc in ie8 One requirement of this setup is that css aggregation needs to be disabled for Respond to work correctly... Also with bootstrap it is very possible to exceed ie8's 4096 selector limit, so I took care to disable certain components to make sure that I came in under this! So my problem was that once css aggregation was enabled, despite showing in ie8's (excuse for an) inspector, it always seemed to revert to times new roman, ie8 and other browsers default font!? Disable either respond or css aggregation, and everything works as expected, including the right fonts in ie 8!!! Ok, so it turns out as mentioned

Categories : HTML

in rendering plugin external font imported by css is not working when download pdf
I had the same problem and I resolved by using absolute url in the css link: <link rel="stylesheet" type="text/css" href="${grailsApplication.config.grails.serverURL}/css/pdf.css" media="all" /> and I also excluded CSS and all used resources from the resource plugin: grails.resources.adhoc.excludes = ['/css/pdf.css','/images/background.png', '/css/SectionUnicode.ttf']

Categories : CSS

Not Showing A Letter When Using Java Font
In your char[] array, you have this: ....ABCDEFGHIJKLMNOPQRSRTUVWXYZ.... . ^ Note the extra R that comes after the S. Change this to: ABCDEFGHIJKLMNOPQRSTUVWXYZ Otherwise every letter after that S will be one out of position.

Categories : Java

Spring Roo listing page not showing Foreign key but showing full dependent row
Given... // Spring Roo 1.2.4.BUILD-SNAPSHOT [rev 7c12381] log opened at 2013-06-15 17:13:26 project --topLevelPackage org.foo.bar --projectName baz jpa setup --provider HIBERNATE --database HYPERSONIC_PERSISTENT entity jpa --class ~.db.Customer field string name entity jpa --class ~.db.Sale field string --fieldName description field number --type java.math.BigDecimal --fieldName amount field reference --fieldName customer --type ~.db.Customer --cardinality MANY_TO_ONE focus --class ~.db.Customer field set --fieldName sales --type ~.db.Sale --cardinality ONE_TO_MANY web mvc setup web mvc all --package ~.web quit When you show the list of Customers (one side) it shows just the customer data. For the sales (many) side, it shows the Customer column, with the field value of all fields c

Categories : Spring

Product image is not showing up in poduct page where as showing list
Firstly, you must confirm whether the media.phtml is loaded. You may insert some dummy characters in the media.phtml to see whether it will show in the frontend. Thus, if the characters show, congratulations, you are just close to find the problem. In this situation, most problems are caused by image attributes not loading to the model object. Simply just reload the object with the following snippets: $_product = Mage::getModel('catalog/product')->load($_product->getId()); Otherwise, you may confirm the following things: Is the media.phtml is overload by the other theme? Compare with the default catalog.xml with your current one, to find out the media.phtml is correctly loaded, including path, block type, name, as, etc. Check the permission settings for the xml and template fi

Categories : Image

Why is my header border and font showing up weird?
In regards to the border, your body is using the browser's default margin + padding for the body. Look into a CSS reset file. Or take a look at boilerplate or just assign body a margin/padding of 0. In regards to the font not showing up properly, can you only use web-safe fonts in the font family declaritive for css. If you want to use better fonts look up Google fonts or cufon (which I usually use)

Categories : HTML

Custom font - special character not showing
I add more fonts on the font-family of the element the missing character isn't being replaced. Shouldn't it be displayed No, it won't. Using multiple font names is useful when the first or second font is not found, then browser looks as the third one. It seems the @ sign character doesn't exist in your mainFont character set.

Categories : CSS

Thin font not showing correctly on windows
Windows just has crappier font rendering in browsers than OSX or iOS does. Sometimes you can fix it by picking specific font sizes at which the browser antialiasing doesn't look too awful. There is also the text-rendering: optimizeLegibility CSS property but in my experience it often does more harm than good. Pick a different font that is more optimized for web display. Google Web Fonts is a good place to start. They have lots of great modern fonts that are all optimized to be used as webfonts, and on top of that they provide the CSS etc - you just need to <link> to their external CDN CSS file in your <head> and bam you're good to go. "Lato" and "Raleway" are fonts I use in place of Helvetica Neue sometimes. Also, it's almost certainly illegal to embed that font anyway si

Categories : HTML

Font awesome showing asian signs instead of icons
same as me too, font-awesome works on my PC browsers [all of them], but i later tested font-awesome on a mobile java opera browser [the latest opera browser for java mobile phones (c2-03 to be precise)] i see only Asian signs/characters/symbols, sometimes i see boxes, instead of the font awesome symbols. i hope this will be resolved?

Categories : Firefox

How can I fetch a web page with external resources like browsers "save complete web page"?
You can use wget and its recursive download ability. http://www.gnu.org/software/wget/manual/wget.html#Recursive-Download $ wget -r or $ wget --page-requisites

Categories : Javascript

Joomla 1.5 font page blank page
I have found the problem. On if its modules was causing the blank page error in some way. I was able to find this out by first making a copy of the current site using Akeeba Backup plugin. Installed is on my localhost. Installed a fresh version of Joomla 1.5 (with out default data) Then edited the configuration.php file's database connection settings /* Database Settings */ var $dbtype = 'mysql'; var $host = 'localhost'; var $user = 'root'; var $password = 'password'; var $db = 'dbname'; var $dbprefix = 'jos_'; to use the database created from the copied version of the website I installed on my localhost. With that being done the fresh version of joomla I created had all the database information I needed to recreate a new website with the same content. I then started copying the compo

Categories : Joomla

AJAX load external page div into current page
You cannot use a CSS selector in a remote document via AJAX like you're trying. The #single_portfolio after the URL would act as a hash (w/o the space in front). You need a URL that returns exactly what you need for your AJAX call. Alternatively, you can fetch the entire page, and do some processing in the callback function to extract the desired part.

Categories : Jquery

How to change the tabControl tab pages label font, font color and font size in VB 2012
This has been reported as a bug and, if I'm reading correctly, MS have confirmed it. Here's the bug report with a programmatic workaround. Hope this helps :)

Categories : Vb.Net

Showing image in WebView from External storage Directory on device
To access SDCARD in nexus 7 you have to write a different code as your code will give access only to mnt/sdcard and not to actual path,where your image is saved. code to access SDCARD in nexus 7

Categories : Android

Slide external page on top of current page
Load your content into a off-screen or invisible div, then .animate() the div into place. You can also change the class names accordingly, thus applying all the styles to your brought in div. The folks over at GitHub implemented that idea a while back: https://github.com/blog/760-the-tree-slider

Categories : Javascript

Custom font (@font-face) and Google font doesn't work in IE8
Could you make a jsfiddle.com where you show the problem? I have created this example and it works fine in IE8 (just Google Fonts): http://jsbin.com/omozet/1 Have you tried some of the other solution Paul Irish shows?

Categories : Internet Explorer

Jquery post submission still goes to the php page not showing the message on the original page
I see that you tried to stop the behaviour of submitted forms (with return false, which seems fine), I did this once too but don't now in which project that was, so I don't have any sample right now. Maybe this helps (but didn't test it yet): $("#myForm").submit(function(e){ e.preventDefault(); var url = $(this).attr("action"); var str=$(this).serialize(); $.post(url,str,function(msg){$('msg_div').show();$('msg_div').html(msg);}); return false; }); The e.preventDefault(); should stop the submit process. How does your validateForm() look like?

Categories : Misc

Folder created on Android external storage isn't visible via MTP but showing in adb shell
New files and folders may take some time to show up via MTP. If you can see your folder through adb, then your code is running fine. MTP indexing is done every now and then by Android (I'm not sure of the exact time delay), and hence new files don't show up as soon as they are created. You can try force running the MediaScanner by code to force an index, or restarting your device.

Categories : Java

Showing ajax content in same page without page load
The problem is with your sent parameter - it's looking for an input named "sent", which doesn't exist. And then, if it's not set, it's exiting the showUser function. Here's the offending snippet (which I removed below): if (sent==""){ document.getElementById("txtHint").innerHTML=""; return; } In addition to that problem, you also had no close </head> or open <body> tags, which in themselves are not the problem, but a pretty major formatting issue. Also, always put a type on your <script> element. Finally, you should close <meta />, <input /> and <br /> elements inline. Formatting your code consistently (sibling elements on their own lines, 4-space tabs for each heirarchical level) helps you find little formatting issues like the missing op

Categories : PHP

@font-face not working (result font different from the original font)
There are two problems with what you have there. You have declared the fonts "doctor_soos_boldbold" and "doctor_soos_lightregular" but you have not specified the correct path, at least, I believe you do not have those fonts in the current directory. You need to specify where the fonts are properly. Where you have: @font-face { font-family: 'doctor_soos_boldbold'; src: url('doctor_soos_bold_2.1-webfont.eot'); src: url('doctor_soos_bold_2.1-webfont.eot?#iefix') format('embedded-opentype'), url('doctor_soos_bold_2.1-webfont.woff') format('woff'), url('doctor_soos_bold_2.1-webfont.ttf') format('truetype'), url('doctor_soos_bold_2.1-webfont.svg#doctor_soos_boldbold') format('svg'); font-weight: normal; font-style: normal; } Every spot that s

Categories : HTML

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

Opentype font in web page without accents
This probably means the .otf file only contains the basic latin set of the font (i.e. lower and upper case letterforms and punctuation). This is mostly done to reduce the filesize and thus lower the loadingspeed. In case you want to use the accents, you should look for the extended latin set. On fonts.com when ordering the webfont you can choose between "latin 1(25k)" and "latin ext 1(40k)". http://www.fonts.com/font/monotype/neo-tech/black/web-font?var=742879

Categories : HTML

HTML And CSS Custom Font is not coming on my page
Your selector to apply the font is div #myfont, but you're selecting on an id, so the div is redundant. Try changing this: div #myfont{ font-family:'Byron Medium'; font-size:'60px'; } to this: #myfont{ font-family:'Byron Medium'; font-size:'60px'; } or better still, use a class (.myFont), and apply that to any element that you want to use the font for.

Categories : HTML

How to change font family of this div which is present on different page?
This will not work like you expect. Javascript is client-based, which means that the changes you do is only reflected on what is happening on your screen right now. If you want to have a site which remembers what font-family, settings, history etc your visitors have, you have to use a server-side language and program it. This can easily be done with for example PHP by doing an ajax-call when you change font. In the script executed by the ajax-call you can set a cookie or session-value and then use this value to reflect the desired font-family each time you render a page by either outputting raw css or by adding/toggling classes.

Categories : Jquery

Can font-size be set to a percentage of page-width?
According to CSS Values and Units Module Level 3 (Candidate Recommendation), you can use the vh unit, which is equal to 1% of the width of the initial containing block. So for example, font-size: 5vh would set font size to 5% of the body width. Browser support is fairly good in newest versions, but this excludes e.g. IE 8. This more or less answers the question in the title. The description in the body of the question is something rather different. The font size is the height of the font and does not have any defined relationship with the widths of letters (which vary), so there is really no way in CSS to make some text occupy 80% of some width. You can set the width of an h1 element of course, but this is very different from setting the width of its text content. You would need JavaScrip

Categories : Android

Cufón font loading after page loads
I found this answer works well, since you're using jQuery: Cufon delay in Internet Explorer You essentially hide the text until it's rendered correctly.

Categories : Wordpress

Redirecting Mediawiki User Page and User Talk page to external url
Can someone have a look at the above code and let me know if I've got something wrong or if this cannot be done? Yes, your Redirect directive is wrong. It isn't a regular expression and thus you can't have stuff like * in it, unless you're actually trying to match against a "*". You're probably not going to be able to do the redirect from the htaccess file in your root directory as Mediawiki uses its own htaccess. So in the htaccess file that's in the /wiki/ folder, try adding this above any rewrite rules that are already there: RewriteCond %{QUERY_STRING} ^title=User:([^&]+) [NC] RewriteRule ^ /memberlist.php?mode=viewprofile&un=%1 [L,R=301] That should take care of the URLs that look like: /index.php?title=User:XYZ RewriteRule User:(.*)$ /memberlist.php?mode=viewprofile

Categories : Htaccess

Use of font frameworks for EVERY text style on page and performance?
Once the browser has requested the font to Google, you use it as it if was a local font, so just 1 request for all the text in your website. So: no latency on applying the font style to your text, just apply it to your body element as a normal font (after the correct import obviously). Anyway, for speed reasons, i would always recommend to locally download the font, because the first time you load your website, you sometimes have to make request to different services (google, facebook, twitter and so on), each one causing a request, possibly slowing down the first load. This is generally an optimization you can do later. Just try the two possible ways and check.

Categories : HTML

Pages are showing "The page you requested does not exist", but when I view content I can edit the page, but unable to view
When you edit a Node, look at the URL in your Browser. There must something like node/nodeID/edit, e.g. node/7/edit. Can you access the page if you call node/nodeId eg node/7 ? Second Point are the Permissions, go to Users -> Permissions, there are Permissions like "Views Page Content of Type article". Are this permissions set correctly?

Categories : Drupal

How to get array from external page in php
you can try $array = json_decode(file_get_contents("http://ridetimes.co.uk/queue-times.php"), true); Then for part to to output <table> <thead> <tr><th><?= implode("</th><th>", array_map("htmlspecialchars",array_map("ucwords", array_keys($array[0])))) ?></th><tr> </thead> <tbody> <?php foreach($array as $row): ?> <tr><td><?= implode("</td><td>", array_map("htmlspecialchars", $row)) ?></td></tr> <?php endforeach; ?> </tbody> </table>

Categories : PHP

IE 10 works locally with @font-face, but not when viewing page from server
Teemu found the root cause: on many corporate managed machines, downloading fonts is completely disabled. It's in Internet Explorer's Settings: Security Settings-Internet Zone > Downloads > Font Download. Options are Enabled, Disabled and Prompt. If disabled you get nothing. This basically means that I don't feel comfortable using icon fonts for IE 10, and probably 9. Though 7 and 8 had no issues.

Categories : CSS

How to pull in html from external url in GSP page
There can be two solution to this: 1) You can use iframe or object tag to render the html from external URL. Example: <object width="600px" height="600px" data="url"> </object> or <iframe name="inlineframe" src="url" ></iframe> 2) Second, we can use the grails way: You can define a custom tag which takes url as input def myOwnRender={attrs,body-> out<<"""<div id="inline_div"></div><script type='text/javascript'>$.post("${attrs['url']}",function(result){ $("div#inline_div").html(result); });</script>""" } First one seems to me a easier solution. Hope that helps!!! Thanks

Categories : Grails

Moving in-page CSS to external file
I hope your style.css is like this .red #slatenav{position:relative;display:block;height:42px;font-size:15px;font-weight:bold; background:transparent url(MyImages/MenuLine.jpg) repeat-x top left;font-family: Calibri; } .red #slatenav ul{margin:0px;padding:0;list-style-type:none;width:auto;} .red #slatenav ul li{display:block;float:left;margin:0 1px 0 0; } .red #slatenav ul li a{display:block;float:left;color:#fff;text-decoration:none;padding:12px 28px 0 28px;height:28px;border: 1px #606060 solid;} That is without <style type="text/css" ></style> tag and in your HTML, stylesheet will be linked like this <link href="style.css" rel="stylesheet" type="text/css"> (include in head tag)

Categories : HTML

Load external Web Page with jQuery
If your goal is for the PHP information (that is spit out every few seconds) to be updated on your site, then what you want to do is use AJAX, inside a setInterval routine. See this post for the basics of AJAX -- it really is simpler than you might think. (You might first want to look at the simple examples linked at bottom. Please upvote anything you find useful.) Once you've got a simple ajax exchange happening, put that into a function called, for example, doAjax() -- and then create a setInterval, like this: setInterval('doAjax();',60000); Here is an important note when considering setInterval Following is a simple copy/paste(able) example that will let you see exactly what I mean: HTML/javascript: index.php <html> <head> <script src="//ajax.google

Categories : Javascript

Using WordPress functions on an external page
I needed to do the same thing not too long ago, and it's hard to circumvent that warning without including a lot of "unnecessary" files into your project. I'm saying "unnecessary" because you do need them, but it's just way too much just to pull some data to your application. The way I did it, if possible in your environment, is to query the database directly, for example if you need access to the posts, then query wp_posts table. If you need to pull posts per user, then you should be able to query the database directly. Security-wise you have to sanitize all output, for example using htmlentities in php. Here's the database schema for the current version of PHP (it might be different for your version) http://codex.wordpress.org/File:WP3.0-ERD.png Something like: SELECT * FROM wp_

Categories : PHP

How to preload a web page using external preloader?
You can cause the browser to cache the image by loading it on index.html as a 1 pixel image <img src="/index2-background-image.jpg" alt="" width="1" height="1" /> Alternatively you could load the content from index2.html using jQuery like so: <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script type="text/javascript"> jQuery().ready(function () { $.get('index2.html', function(data) { jQuery("#index2content").html(data); }); }); </script> <div id="index2content"></div>

Categories : Javascript



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