w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Enabling C++11 in Eclipse Juno/Kepler/Luna CDT
There's two things you have to do, first you need to setup your compiler, then you need to setup CDT's language processor. Since you didn't mention which compiler you're using, I'll assume it's GCC but the steps will be similar for other compilers. (Note that you need a compiler that supports C++11, of course.) Setting up the compiler is fairly straightforward: Right click your project and click Properties Under C/C++ Build click Settings Under GCC C++ Compiler, click Miscellaneous In the Other Flags box, append "-std=c++11" to the list of tokens. Click Apply and OK At this point you should be able to rebuild your project and get it to run. But CDT still may show errors for C++11 includes. Here's how you can resolve that: Right click your project and click Properties Under C/C++

Categories : Eclipse

Redcarpet Markdown gem: instantiating the Markdown object only once & reusing it between parses
Not sure if this is the rails way of doing things, but it seems fine, and doesn't violate POLA or the like, so hopefully it will suit your needs. Create a markdown.rb file in your config/initializers/ folder, and use some variation of the following code snippet: class MultiRenderer < Redcarpet::Render::HTML include Redcarpet::Render::SmartyPants end module Paradox Markdown = Redcarpet::Markdown.new(MultiRenderer) end Replace Paradox with the name of your application. You can add various options to the renderer or the instance of markdown, as described in the readme. The renderer I created (the MultiRenderer) has built in smartypants, so you can round quotes and whatnot To use Markdown, simply call YourApp::Markdown.render(text), and you'll get html back. You probably need to r

Categories : Ruby On Rails

insert portions of a markdown document inside another markdown document using knitr
that is what the chunk option child is for, e.g. in second.Rmd, you can ```{r child='first.Rmd'} ``` that is a little bit trickier, but you can call knit_child() manually, e.g. ```{r echo=FALSE, results='asis'} # knit the first three lines of first.Rmd cat(knit_child(text = readLines('first.Rmd')[1:3]), sep = ' ') ```

Categories : R

How to change the default text font in Eclipse?
Software Salariman has posted a solution - "Change Default Text Font in Eclipse". The default font is set in: Window > Preferences > General/Appearance/Colors and fonts > Basic/Text Font

Categories : Eclipse

Monospace font for junit in eclipse deprecated
I think it's because the Groovy Eclipse folks were so kind to contribute this feature to Eclipse 4.4 M1 (thanks!), which is where it really belongs. (See Add a monospace font option for the junit results view.) However, I very much hope they will keep supporting the feature for older Eclipse versions, as it will take years until a majority of Spock users have moved to Eclipse 4.4. And it doesn't just affect Spock code, but also all Groovy code leveraging assert statements. I'll try to get in contact with the authors.

Categories : Eclipse

can't edit specific xml file in Eclipse
I have had similar problems, though not this exact problem. Sometimes simply restarting Eclipse, or whatever editor you use, can help. Occasionally, Eclipse will not detect changes in your xml so you need to clean and rebuild the project. You can do this by Winodow --> Project --> Clean... and choose your project I know there was an issue that I had which was similar with the editor jumping/replacing lines and such which I believe was fixed in a newer version of Eclipse. If I can find a source later I will edit

Categories : Android

Is it possible to edit properties with keyboard in Eclipse?
I dont think you can edit them through keyboard. Alt+Enter Display the properties of the selected item Refresh the selected item Rename the selected item Revert to the last saved state You can check out this article.

Categories : Eclipse

Eclipse: Edit code parser
Place mouse pointer over highlighted code, then press F2 to have focus in popup suggestion window. At left corner of this window exists icon, click on such icon opens problematic item. By setting/removing checkbox 'Text As', editor with highlighted code will be change view as well. Usually they are all accessible through Window->Preferences->General->Editors->-Text Editors-> Annotations. I used it on kepler CDT.

Categories : Eclipse

Edit "compile with" library in eclipse
First use SDK Manager to download the desired API Level, in your case 18. Then change your AndroidManifest and change target SDK to 18. And last but not least open your project properties, go to the android section and in the list of SDK select the checkbox at API Level 18. Now make a clean and rebuild and all should be fine.

Categories : Android

How to change the font size of eclipse editor tab's title
Eclipse uses CSS for its own styling, so you can modify the CSS file to your needs as explained here. The CSS file is located in ECLIPSE_HOME/plugins/org.eclipse.platform_X.X.X_V.XXXX/css and the class for the tab titles is named MPartStack.

Categories : Eclipse

Cannot edit tasks (TODO/FIXME/XXX) in eclipse (Java)
Are you sure you are at the right properties. If you are really on eclipse you should be able to click on Window/Preferences and see this window: Expand the options like you see it at the screenshot. Here you actully should be able to edit your tasks! If you want to change the priority, click on the left side of the editor and click on add task. With this task you are able to click on complete and change the priority. For more information look here.

Categories : Java

diplaying both Graphical and Textual XML edit view in eclipse?
You can open any file in Eclipse in multiple editors and display them side-by-side. All editors referencing the same file will share the same editing buffer, so the changes in one should be reflected in the other. Just right click on the file and use the "Open With" menu item to open the editors you need. Then drag the opened editors around your workbench so that they are displayed side-by-side.

Categories : Android

Eclipse plug-in to edit faces-config.xml file
No, but you can use the JBoss Developer Studio. There are more editors like VPE. Checkout some tutorials on Youtube: http://www.youtube.com/watch?v=OMtcjgTyP-g

Categories : Eclipse

Android Eclipse Edit String of values directory in Java
Based on some research i did on SO. How to change R.string.some_variable at run time? It seems that what your trying to do is not possible. R is generated at development time by the SDK tools.

Categories : Java

I have an external executable jar file that I wish to edit the java files in it with Eclipse
Jar files are usually a compiled form of your java classes. The source CAN be included with the jar, but it rarely is. So instead of the expected ".java" files, you'll see ".class" files, which are compiled forms of your code. If you want to edit the files, you have a couple of options Look for the source elsewhere This is your best bet really. If its an open source project, look for the source of it. You can probably google it pretty easily, or search in search engines for maven repositories like this one. For example, if you see here, I looked for junit, and found an entry called "sources.jar". If its not an open source project, but a project internal to your work, there might be a team in charge of that project. Reach out to them, as getting the original sources as they where o

Categories : Java

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

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

Navigation bar/menu not showing in customised colors with Safari (Correct colors in other browsers)
nav ul { margin: 80px 0 20px 0; padding: 0em; float: left; list-style: none; background: #1A1A1A; background: rgba(26,26,26,.2); -moz-border-radius: .5em; -webkit-border-radius: .5em; border-radius: .5em; -moz-box-shadow: 0 1px 0 rgba(255,255,255,.2), 0 2px 1px rgba(0,0,0,.8) inset; -webkit-box-shadow: 0 1px 0 rgba(26,26,26,.2), 0 2px 1px rgba(0,0,0,.8) inset; box-shadow: 0 1px 0 rgba(26,26,26,.2), 0 2px 1px rgba(0,0,0,.8) inset; } You've got background twice once as hex the other as rgba, I think you only need one.

Categories : Javascript

Weird colors in background of UIImage when trying to replace all white colors
Using a different code I slipped in my loop and it no longer showed the random background static: -(UIImage *)replaceWhiteWith{ NSString *str = [[NSUserDefaults standardUserDefaults] objectForKey:@"color"]; UIColor *color = [NSString colorFromNSString:str]; CGFloat red = 0.0, green = 0.0, blue = 0.0, alpha =0.0; [color getRed:&red green:&green blue:&blue alpha:&alpha]; CGImageRef inImage = self.CGImage; CFDataRef ref = CGDataProviderCopyData(CGImageGetDataProvider(inImage)); UInt8 * buf = (UInt8 *) CFDataGetBytePtr(ref); int length = CFDataGetLength(ref); for(int i=0; i<length; i+=4) { int r = buf[i]; int g = buf[i+1]; int b = buf[i+2]; if(r == 255 && g == 255 && b == 255){

Categories : IOS

@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

Add alternating row colors with column grouping colors-is it possible?
Since your rows are alternating light/dark, you could take advantage of an alpha transparent background color: http://cssdeck.com/labs/6rgab657 <table> <colgroup class="a" span="4" /> <colgroup class="b" span="4" /> <colgroup class="c" span="4" /> <colgroup class="d" span="4" /> <tr> <td>A</td> <td>A</td> <td>A</td> <td>A</td> <td>B</td> <td>B</td> <td>B</td> <td>B</td> <td>C</td> <td>C</td> <td>C</td> <td>C</td> <td>D</td> <td>D</td> <td>D</td> <td>D</td> </tr> <tr> &l

Categories : Jquery

@font-face with data URIs and Font Squirrel’s @font-face generator
I believe the reason is to minimize overall file size / load time. Some devices have a 25kb limit in order to maintain files "cached". When the TTF and the WOOF are base64'd the CSS file can exceed the limits and cause a reload each visit. Browsers will use the first font "it can" (or "cascade" if you will). You will see the formats listed in the following order for specific reasons: 1. EOT - used to catch older IE (<9). IE will choke with multiple "src". You'll often see ?#iefix involved in the EOT reference, or an additional selector with just the EOT file in there followed by a similar selector witht he WOFF and TTF. Plus, since old IE doesn't do datauri, we have to leave as an external file. 2. WOFF - Most modern browsers. Most modern browsers will use WOFF. This format is ver

Categories : Misc

RVM in Elementary Luna OS
You should be able to approximate that setup by appending this to your ~/.bashrc file (rvm.sh might not be the right name, but it's something like that). You may have to log in and out for it to take effect. source /etc/profile.d/rvm.sh Or instead append this, which should include everything under /etc/profile.d/. It should be very similar to checking the setting in gnome-terminal: source /etc/profile

Categories : Ruby

Setting body { font-size: 100% } results in font-size: 12px; and not font-size: 16px; Why?
If you inspect the inline box using a browser’s Developer Tools (hit F12 to open them), you can see that its height is indeed 12px, as set in your code. This happens because there is nothing in it that would require more height; in general, the exact calculation of heights of inline blocks is browser-dependent. The font size of the text is still the browser default, typically 16px. The font size does not mean the height of any particular letter. It is just a fundamental property of the font; typographers usually design characters so that they - together with ascenders, descenders, and diacritic marks - fit into the limits set by the font size (or extend over them just a little), and normally most letters have smaller height.

Categories : CSS

ActionBar has correct colors in Android 4.2, wrong colors in Android 2.3
As per the official docs, you need to also declare the attributes without the android: namespace. In your case, those attributes are only getting applied to the native implementation.

Categories : Android

Generate n colors between two colors
You have to blend each color channel (red, green and blue) seperately like this: Color x,y; //set by you float blending;//set by you float inverse_blending = 1 - blending; float red = x.getRed() * blending + y.getRed() * inverse_blending; float green = x.getGreen() * blending + y.getGreen() * inverse_blending; float blue = x.getBlue() * blending + y.getBlue() * inverse_blending; //note that if i pass float values they have to be in the range of 0.0-1.0 //and not in 0-255 like the ones i get returned by the getters. Color blended = new Color (red / 255, green / 255, blue / 255); So far for the color example. Generally if you want a linear interpolation between two values you have to do the following: var firstValue; var secondValue; var interpolation; var inter

Categories : Java

How to create a font file from a base64 encoded font string in java
Just decode the base64 part and save it in a file (I'm assuming that part is really a True Type font). If you're using Java 7: String fontData = "font/truetype;charset=utf-8;base64,QUJDREU= ... "; fontData = fontData.substring(fontData.indexOf("base64,") + 7); File ttFile = new File("/path/to/your/file.ttf"); try (FileOutputStream output = new FileOutputStream(ttFile)) { byte[] binary = javax.xml.bind.DatatypeConverter.parseBase64Binary(fontData); output.write(binary); } catch (IOException e) { e.printStackTrace(); } If you're using Java 6: String fontData = "font/truetype;charset=utf-8;base64,QUJDREU= ... "; fontData = fontData.substring(fontData.indexOf("base64,") + 7); File ttFile = new File("/path/to/your/file.ttf"); try { FileOutputStream output = null; tr

Categories : Java

how to add custom font name and font size in ajax html editor extendor?
You need to download ajaxcontroltoolkit sources from the codeplex site and tweak a bit HtmlEditorExtenderBehavior.pre.js file in Client/MicrosoftAjax.Extended project (this is a link to this file on codeplex: HtmlEditorExtenderBehavior.pre.js Add your font families and font sized to appropriate arrays in _createButton function. After that, you can rebuild project and use custom AjaxControlToolkit dll

Categories : Asp Net

CSS3 @font-face causes the font file to output its sample text
I'm also tested with the SteelTongs web font in firefox and chrome, it is not supported,the font link is abstractfonts- steeltongs ,U just change the font.

Categories : CSS

Firefox places font baseline at center of line-height (font: Knockout 46 Flyweight)
I had a similar problem and it turned out, that my files for the font where somehow corrupted. I uploaded one file here: http://www.fontsquirrel.com/tools/webfont-generator which generates font files in all kinds of formats and replaced the font files. That fixed it for me. Might also be similar to this question: @font-face problem, Firefox adds padding, Chrome does not

Categories : CSS

For eBook Kannada font (Nudi 01 e b.ttf) is converting to gibberish English font in iPad, iPhone
I believe the font you mention is a so-called "ASCII" font, rather than a Unicode-encoded font. In that case, correct display is a matter of luck and is not guaranteed. Even if it works on today's Sony devices, it might stop working tomorrow. According to the spec, EPUBs must be Unicode. Yes, I am well aware of the issues involved in re-coding legacy content in ASCII encodings for Kannada and other Indic languages into Unicode. However, from the standpoint of future-proofing your content and guaranteeing operability across platforms, it is an investment that will prove worthwhile. It would also be helpful if you could create a one-page, one-line book with this problem and post the XHTML and the content.opf file. UPDATE It appears that version 5.0 of Nudi includes Unicode-conformant fon

Categories : Iphone

Want the list of languages supported by each font.Is there any open source font library or database listing them?
The Unicode Common Locale Data Rpository (CLDR) contains a fairly extensive compilation of "Examplars", which are the minimum support required for various languages. Although Font Book is not specifically listed as one of the applications, the CLDR index page does mention Apple as a company that uses it, and it's very likely that's what Font Book employs to determine language support. Note though that in many cases, simply having the characters is not enough for full language/script support. For many writing systems, additional characters and font data (OpenType Layout data) are required.

Categories : Javascript

How to preserve text formatting in RichTextBox like Bold, Italics, font color, font size, etc?
RichTextBox supports rtf content, you can't past directly Word content in your RichTextBox. You need to convert the word document into .rtf file. Best way is to use the save As dialog in Microsoft Word. Then you could deploy the document with your application and then load rtf content in your RichTextBox using LoadFile method. RichTextBox1.LoadFile("Help-File.rtf") Obviously, it supposes that basic formatting like mentioned in title (Bold, Italics, font color, font size, ...) are enough for this purpose, since the rft format does not support obviously all MS Word features. Otherwise you may have to implement your own parse/interpretation logic.

Categories : Vb.Net

Resource interpreted as Font but transferred with MIME type font/woff: | Django Framework
So, you are serving static files in Django dev server? In settings.py I think you need: if DEBUG: import mimetypes mimetypes.add_type("application/font-woff", ".woff", True) ...from info given in these questions on SO: Resource interpreted as Font but transferred with MIME type application/x-font-woff Django development server and MIME types

Categories : Django

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

Issue with using font with @font-face declaration and in general with applications
Not sure if this will help, but this is the CSS I use, and it works fine. The webfonts directory is in the same directory as the css file, and includes three file types: .eot .ttf .woff @font-face { font-family: 'AvenirLT-Book'; src: url('webfonts/25EE2B_0_0.eot'); src: url('webfonts/25EE2B_0_0.eot?#iefix') format('embedded-opentype'), url('webfonts/25EE2B_0_0.woff') format('woff'), url('webfonts/25EE2B_0_0.ttf') format('truetype'); } a typical class decleration: .AvenirLT-Book { font-family: AvenirLT-Book; font-weight: normal; font-style: normal; } perhaps you need to change the format to ('truetype') instead of ('opentype') ?

Categories : CSS

How do I apply a css font-weight transition with a font-face rule
You cannot create smooth transitions using the font-weight property. Thanks to Kyle Sevenoaks and this question

Categories : CSS

Change font size of Canvas without knowing font family
Update: (from comments) There is no way around specifying font. The Canvas' font is modeled after the short-hand version of font in CSS. However, there is always a font set on the canvas (or a font type) so what you can do is to first extract the current font by using it like this: var cFont = ctx.font; Then replace size arguments and set it back (note that there might be a style parameter there as well). A simple split for the sake of example: var fontArgs = ctx.font.split(' '); var newSize = '12px'; ctx.font = newSize + ' ' + fontArgs[fontArgs.length - 1]; /// using the last part You will need support for style if needed (IIRC it comes first if used). Notice that font-size is fourth parameter, so this will not work if you will have/not have font-variant(bold,italic,oblique), font

Categories : Javascript

How to Resize action Sheet element font with system font?
your problem is in your UITableView, since you didn't post the code of the UIActionSheet and UITableView code, I've created a project and uploaded it to a Github (link), you can find how i can manage to resize the text of the rows using the following property: cell.textLabel.adjustsFontSizeToFitWidth = YES;

Categories : IOS

Why does java use an oblique font when asking for a plain monospaced font?
Since the plain Font.MONOSPACED logical font is buggy on my system, my solution was to list all the fonts available on my system with : System.out.println("Listing available fonts"); for (Font f : GraphicsEnvironment.getLocalGraphicsEnvironment().getAllFonts()) System.out.println("- "+f); And trying the mono-ones and typewriter-ones that claims to be plain or regular or anything that is not oblique until I found one that is really plain. I ended up with Lucida Sans Typewriter Regular.

Categories : Java



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