Search Results

Search found 457 results on 19 pages for 'indent'.

Page 10/19 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • C++ template name pretty print

    - by aaa
    hello. I have need to print indented template names for debugging purposes. For example, instead of single-line, I would like to indent name like this: boost::phoenix::actor< boost::phoenix::composite< boost::phoenix::less_eval, boost::fusion::vector< boost::phoenix::argument<0>, boost::phoenix::argument<1>, I started writing my own but is getting to be complicated. Is there an existing solution? if there is not one, can you help me to finish up my implementation? I will post it if so. Thanks

    Read the article

  • HTML/CSS - Website Help.

    - by gabeaudick
    I'm trying to build my first website from scratch. I mocked up the design in Photoshop, and have been trying to convert into code for a few hours. But I haven't got far. In fact, I'm stuck on the header's navigation bar. It looks right, but it doesn't work. I'm using an unordered-inline list, and trying to link different rectangles in the header. I can't click on anything in the header, though. The code for the html and css files, and a mockup of the header, are below. Any advice on why the header bar isn't working would be much appreciated. Here's a link to the image: http://rookery9.aviary.com.s3.amazonaws.com/3961000/3961027_eb89_625x625.jpg *Ideally, you would be able to click on either "". home.html: <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <!-- Title --> <title>I am Gabe Audick.</title> <!-- Meta --> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="Author" content="Gabe Audick" /> <meta name="Copyright" content="Gabe Audick" /> <!-- Stylesheets --> <link href="style.css" media="screen" rel="stylesheet" type="text/css" /> <!-- RSS --> <link rel="alternate" type="application/rss+xml" title="gabeaudick RSS" href="http://feeds.feedburner.com/gabeaudick" /> </head> <body> <!-- Navigation Bar --> <div id="wrap"> <div id="header"> <ul> <li><a href="#">Previous</a></li> <li><a href="#">Home</a></li> <li><a href="#">Next</a></li> </ul> </div> </div> <!-- END --> <!-- Google Analytics --> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-5899101-4']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> <!-- End of Google Analytics --> </body> </html> style.css: * { margin: 0; padding: 0; } body { background-color: #fff; color: #000; font-size: 14px; font-family: 'Century Gothic', Helvetica, sans-serif; position: relative; } #wrap { background-color: #000; color: #fbead; height: 26px; width: 100%; } #header { background: url(./images/home.gif) center no-repeat #000; height: 26px; } #header ul li{ float:left; list-style-type:none; margin-right:12px; text-indent:-9999px; } #header li a:link, #header li a:visited{ outline:none; display:block; height:26px; text-indent:-9999px; }

    Read the article

  • Firefox and TinyMCE 3.4.9 won't play nice together

    - by Patricia
    I've submitted a bug to the tinyMCE people, but i'm hoping someone else has come across this and has a suitable workaround. Here's the situation: I've got a form with a tinyMCE control that i load into a jquery dialog. it works great the first time, then after they close it, and open a new one. any interaction with the tinyMCE control gives: "Node cannot be used in a document other than the one in which it was created" it also doesn't fill the control with the text it's supposed to be prepopulated with. In my jquery dialogs i have the following scripts in my beforeClose handler: if (typeof tinyMCE != 'undefined') { $(this).find(':tinymce').each(function () { var theMce = $(this); tinyMCE.execCommand('mceFocus', false, theMce.attr('id')); tinyMCE.execCommand('mceRemoveControl', false, theMce.attr('id')); $(this).remove(); }); } and here's my tinyMCE setup script: $('#' + controlId).tinymce({ script_url: v2ScriptPaths.TinyMCEPath, mode: "none", elements: controlId, theme: "advanced", plugins: "paste", paste_retain_style_properties: "*", theme_advanced_toolbar_location: "top", theme_advanced_buttons1: "bold, italic, underline, strikethrough, separator, justifyleft, justifycenter, justifyright, justifyfull, indent, outdent, separator, undo, redo, separator, numlist, bullist, hr, link, unlink,removeformat", theme_advanced_buttons2: "fontsizeselect, forecolor, backcolor, charmap, pastetext,pasteword,selectall, sub, sup", theme_advanced_buttons3: "", language: v2LocalizedSettings.languageCode, gecko_spellcheck : true, onchange_callback: function (editor) { tinyMCE.triggerSave(); }, setup: function (editor) { editor.onInit.add(function (editor, event) { if (typeof v2SetInitialContent == 'function') { v2SetInitialContent(); } }) } }); is there anything obvious here? i've got all that complicated removal stuff in the close b/c tinymce doesn't like having it's html removed without it being removed. the setInitialContent() stuff is just so i can pre-load it with their email signature if they have one. it's broken with or without that code so that's not the problem. i was forced to update to 3.4.9 because of this issue: http://www.tinymce.com/forum/viewtopic.php?id=28400 so if someone can solve that, it would help this situation to. I have tried the suggestion from aknosis with no luck. EDIT: I originally thought this only affected firefox 11, but i have downloaded 10, and it is also affected. EDIT: Ok, i've trimmed down all my convoluted dynamic forms and links that cause this into a fairly simple example. the code for the base page: <a href="<%=Url.Action(MVC.Temp.GetRTEDialogContent)%>" id="TestSendEmailDialog">Get Dialog</a> <div id="TestDialog"></div> <script type="text/javascript"> $('#TestSendEmailDialog').click(function (e) { e.preventDefault(); var theDialog = buildADialog('Test', 500, 800, 'TestDialog'); theDialog.dialog('open'); theDialog.empty().load($(this).attr('href'), function () { }); }); function buildADialog(title, height, width, dialogId, maxHeight) { var customDialog = $('#' + dialogId); customDialog.dialog('destory'); customDialog.dialog({ title: title, autoOpen: false, height: height, modal: true, width: width, close: function (ev, ui) { $(this).dialog("destroy"); $(this).empty(); }, beforeClose: function (event, ui) { if (typeof tinyMCE != 'undefined') { $(this).find(':tinymce').each(function () { var theMce = $(this); tinyMCE.execCommand('mceFocus', false, theMce.attr('id')); tinyMCE.execCommand('mceRemoveControl', false, theMce.attr('id')); $(this).remove(); }); } } }); return customDialog; } </script> and the code for the page that is loaded into the dialog: <form id="SendAnEmailForm" name="SendAnEmailForm" enctype="multipart/form-data" method="post"> <textarea cols="50" id="MessageBody" name="MessageBody" rows="10" style="width: 710px; height:200px;"></textarea> </form> <script type="text/javascript"> $(function () { $('#MessageBody').tinymce({ script_url: v2ScriptPaths.TinyMCEPath, mode: "exact", elements: 'MessageBody', theme: "advanced", plugins: "paste, preview", paste_retain_style_properties: "*", theme_advanced_toolbar_location: "top", theme_advanced_buttons1: "bold, italic, underline, strikethrough, separator, justifyleft, justifycenter, justifyright, justifyfull, indent, outdent, separator, undo, redo, separator, numlist, bullist, hr, link, unlink,removeformat", theme_advanced_buttons2: "fontsizeselect, forecolor, backcolor, charmap, pastetext,pasteword,selectall, sub, sup, preview", theme_advanced_buttons3: "", language: 'EN', gecko_spellcheck: true, onchange_callback: function (editor) { tinyMCE.triggerSave(); } }); }); </script> a very interesting thing i noticed, if i move the tinyMCE setup into the load callback, it seems to work. this isn't really a solution though, because when i'm loading dialogs, i don't know in the code ahead of time if it has tinyMCE controls or not!

    Read the article

  • Can't set anchor tag to [disabled] in IE

    - by Alex
    Hi. I have the following css code. button.png is image where 3 button states are pasted vetrically, so i just move image in css. a.button { background-image: url(button.png); background-position: 0px 0px; width: 100px; height: 30px; display: block; background-repeat: no-repeat; text-indent: -9999px; } a:hover.button { background-position: -100px 0px; } a.button[disabled] { background-position: -200px 0px; cursor:default; } I put this in html <a href="#" class="button" disabled="disabled"></a> In Chrome all is ok. IE dont show disabled image.

    Read the article

  • Flash AS3 and XML: way to fix line breaks in htmlText that uses <b> tags in the xml?

    - by HeroicNate
    I'm importing text in from an xml file and i'm using htmlText to try to keep some styling with tags. I have both the regular and bold face font embedded, and the bolding works fine. The problem is that it ads spaces around the words in bold like a paragraph indent and then makes a line-break after them. What's going on, is there a way to fix? fromxmlText.htmlText = theXML.contenttext; If I pull the text in from a txt file it will work fine, but taking it out of an xml file causing funky formatting. lil' help?

    Read the article

  • vim command to restructure/force text to 80 columns

    - by wickedchicken
    I know there are ways to automatically set the width of text in vim using set textwidth (like http://stackoverflow.com/questions/235439/vim-80-column-layout-concerns). What I am looking for is something similar to = (the indent line command) but to wrap to 80. The use case is sometimes you edit text with textwidth and after joining lines or deleting/adding text it comes out poorly wrapped. Ideally, this command would completely reorganize the lines I select and chop off long lines while adding to short ones. An example: long line is long! short After running the command (assuming the wrap was 13 cols): long line is long! short If this isn't possible with a true vim command, perhaps there is a command-line program which does this that I can pipe the input to?

    Read the article

  • With VIM, use both snipMate and pydiction together (share the <tab> key?)

    - by thornomad
    I am trying to use snipMate and pydiction in vim together - however, both use the <tab> key to perform their genius-auto-completion-snippet-rendering-goodness-that-I-so-desire. When pydiction is installed, snipMate stops working. I assume its because they can't both own the <tab> key. How can I get them to work together? I wouldn't mind mapping one of them to a different key, but I am not really sure how to do this ... (maybe pydiction to the <ctrl-n> key so it mimics vim's autocomplete?). Here is the relevant .vimrc: filetype indent plugin on autocmd FileType python set ft=python.django autocmd FileType html set ft=html.django_template let g:pydiction_location = '~/.vim/ftplugin/pydiction-1.2/complete-dict'

    Read the article

  • Best Image Replacement Technique

    - by Josh Stodola
    What is the best (as in cross-browser) technique to do image replacement in CSS? I am using sprites to do my navigation, but I want the markup to remain SEO friendly. Given the following HTML structure... <div id="menu"> <ul> <li><a href="#">Test</a></li> <li><a href="#">Tester</a></li> <li><a href="#">Testing Testing</a></li> </ul> </div> What is the best way to replace the text with a background image using CSS only? I am currently using this... text-indent: -9999px; But, it fails with CSS on, and images off.

    Read the article

  • Emacs & PHP indenting question

    - by Danny
    Hi all, I'm a bit new to using emacs for webdevelopment. I am using php-mode and i am happy with it. There is only one issue i have which causes me a lot of problems because of our company's coding style. When i have a function, e.g.: $instance = new Model('foo', 'bar'); And I want to indent it like this: $instance = new Model( 'foo', 'bar' ); Emacs does the following when i insert a newline before the first argument and indents it like this: $instance = new Model( 'foo', 'bar' ); Can anyone point me in a direction on how i can configure/change this? Thanks in advance

    Read the article

  • Ruby character encoding problems in netbeans and command wíndow

    - by salgo60
    I use netbeans as development IDE and runs the application from cmd but have problems to display ISO 8859-1 characters like åäö correct in both cmd window and when I run the application from netbeans Question: What is best practice to set it up Right now I do @output.puts indent + "V" + 132.chr + "lkommen till Ruby Camping!" to get ä My environment chcp 65001 Active code page: 65001 ruby main.rb Source encoding: <Encoding:US-ASCII> Default external: #<Encoding:UTF-8> Default internal: nil Locale charmap: "CP65001" where I have in the code def self.printEncoding puts "Source encoding: #{__ENCODING__.inspect}" if defined? __ENCODING__ if defined? Environment::Encoding puts "Default external: #{Encoding.default_external.inspect}" puts "Default internal: #{Encoding.default_internal.inspect}" puts "Locale charmap: #{ Encoding.locale_charmap.inspect}" end puts "LANG environment variable: #{ENV['LANG'].inspect}" unless ENV['LANG'].nil? end ruby -v ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]

    Read the article

  • Way to get VS 2008 to stop forcing indentation on namespaces?

    - by Earlz
    I've never really been a big fan of the way most editors handle namespaces. They always force you to add an extra pointless level of indentation. For instance, I have a lot of code in a page that I would much rather prefer formatted as namespace mycode{ class myclass{ void function(){ foo(); } void foo(){ bar(); } void bar(){ //code.. } } } and not something like namespace mycode{ class myclass{ void function(){ foo(); } void foo(){ bar(); } void bar(){ //code.. } } } Honestly, I don't really even like the class thing being indented most of the time because I usually only have 1 class per file. And it doesn't look as bad here, but when you get a ton of code and lot of scopes, you can easily have indentation that forces you off the screen, and plus here I just used 2-space tabs and not 4-space as is used by us. Anyway, is there some way to get Visual Studio to stop trying to indent namespaces for me like that?

    Read the article

  • Ruby character encoding problems in netabenas and command wíndow

    - by salgo60
    I use netbeans as development IDE and runs the application from cmd but have problems to display ISO 8859-1 characters like åäö correct in both cmd window and when I run the application from netbeans Question: What is best practice to set it up Right now I do @output.puts indent + "V" + 132.chr + "lkommen till Ruby Camping!" to get ä My environment chcp 65001 Active code page: 65001 ruby main.rb Source encoding: <Encoding:US-ASCII> Default external: #<Encoding:UTF-8> Default internal: nil Locale charmap: "CP65001" where I have in the code def self.printEncoding puts "Source encoding: #{__ENCODING__.inspect}" if defined? __ENCODING__ if defined? Environment::Encoding puts "Default external: #{Encoding.default_external.inspect}" puts "Default internal: #{Encoding.default_internal.inspect}" puts "Locale charmap: #{ Encoding.locale_charmap.inspect}" end puts "LANG environment variable: #{ENV['LANG'].inspect}" unless ENV['LANG'].nil? end ruby -v ruby 1.9.1p378 (2010-01-10 revision 26273) [i386-mingw32]

    Read the article

  • How to use ctrl-i for an emacs shortcut without breaking tabs

    - by mksuth
    I want to redefine the emacs keyboard shortcut control-i to be "MOVE CURSOR UP" To do this, I added the following line to my .emacs file: (global-set-key (kbd "C-i") 'previous-line) What I then discovered is that the tab key, by default, does whatever is bound to control-i, which is obviously not what I want. So, to restore normal tab behavior, I added this to my .emacs file (global-set-key (kbd "<tab>") 'indent-for-tab-command) This mostly works. BUT, tab no longer works for auto-completing commands in the mini buffer. How can I fix that? Or is there a better way of going about this? Thanks.

    Read the article

  • Visual Studio 2010 Formatting

    - by Rosarch
    I have plenty of experience with Eclipse, and now I'm trying out Visual Studio 2010. I find its formatting somewhat counter-intuitive. Here are some things I'm trying to figure out: Is there a way to select all text and format/indent it properly, like SHIFT+A SHIFT+I in Eclipse? Why is it that when I type a line like if (n == 0) {, as soon as I type the opening brace, the text cursor is moved to the beginning of the line? Is this some productivity speedup I'm failing to see? When I hit ENTER after the aforementioned line, I'd like the closing brace to be put in place automatically for me. How can I do this? I've looked for hotkey documentation, and it's helped a bit, but this still feels clunky to me.

    Read the article

  • Vim: Pasting from clipboard and automatically toggling :set paste

    - by Jonatan Littke
    Hey. When I paste things from the clipboard, they're normally (always) multilined, and in those cases (and those cases only), I'd like :set paste to be triggered, since otherwise the tabbing will increase with each line (you've all seen it!). Though the problem with :set paste is that it doesn't behave well with set smartindent, causing the cursor to jump to the beginning of a new line instead of at the correct indent. So I'd like to enable it for this instance only. I'm using Mac, sshing to a Debian machine with vim, and thus pasting in Insert mode using cmd-v. Cheers.

    Read the article

  • Pressing "Home" in Vim on an Indented Line

    - by Reid
    I have a bad habit of using the 'home' key to go back to the beginning of a line. As I recently started using vim (and loving it!) I noticed that when I press the home key on a lined that is indented, it returns me to the very beginning of the line. In Notepad++ (the editor I used to use) it would return me to the beginning of the code on that line, right after the indent. Is there some way to replicate this behavior in vim? Usually, when I'm pressing home it's in the Insert mode for me to (usually) stick a variable there. I have set smartindent in my vimrc, with set noautoindent as a "tips" page told me to make sure to disable autoindent (although it didn't seem to be enabled in the first place - perhaps that option is extraneous.) Thanks in advance.

    Read the article

  • How do i enable syntax highlighting and syntax indentation in mysgit vim?

    - by gath
    Am using mysgit for windows, but mysgit vi editor is unable to do syntax highlighting and indentation for my source code (html/python/css .... files) I managed to copy the syntax folder from my original GVIM7.2 installation to Git Vim72 installation folder, now i see like syntax highlighting is active. What am unable to do is indentation. I have tried to copy the ftplugin folder from my GVim7.2 installation to Git Vim72 folder but still no indentation. I have tried to place filetype plugin indent on setting on the vimrc file, but still nothing is working? Any help on how to enable syntax indentation? Gath

    Read the article

  • How to get parent node in Stanford's JavaNLP?

    - by roddik
    Hello. Suppose I have such chunk of a sentence: (NP (NP (DT A) (JJ single) (NN page)) (PP (IN in) (NP (DT a) (NN wiki) (NN website)))) At a certain moment of time I have a reference to (JJ single) and I want to get the NP node binding A single page. If I get it right, that NP is the parent of the node, A and page are its siblings and it has no children (?). When I try to use the .parent() method of a tree, I always get null. The API says that's because the implementation doesn't know how to determine the parent node. Another method of interest is .ancestor(int height, Tree root), but I don't know how to get the root of the node. In both cases, since the parser knows how to indent and group trees, it must know the "parent" tree, right? How can I get it? Thanks

    Read the article

  • Can Eclipse parse and use emacs-style meta information in source code?

    - by ataylor
    In emacs, it is possible to start a file off with a line this: /* -*- mode: java; c-basic-offset: 4; indent-tabs-mode: nil -*- */ This instructs emacs to use 4 spaces for indentation. I like the idea of storing this coding style meta-information directly and explicitly in the source code. Are there any options for doing this in other IDEs? Does eclipse in particular have the ability to configure itself from a line in the emacs format or something equivalent?

    Read the article

  • Is this a "valid" css image replacement technique?

    - by user278457
    I just came up with this, it seems to work in all modern browsers, I just tested it then on (IE8/compatibility, Chrome, Safari, Moz) HTML <img id="my_image" alt="my text" src="images/small_transparent.gif" /> CSS #my_image{ background-image:url('images/my_image.png'); width:100px; height:100px;} Pro's: image alt text is best-practice for accessibility/seo no extra HTML markup, and the css is pretty minimal too gets around the css on/images off issue where "text-indent" techniques hide text from low bandwidth users The biggest disadvantage that I can think of is the css off/images on situation, because you'll only send a transparent gif. I'd like to know, who uses images without stylesheets? some kind of mobile phone or something? I'm making some sites for clients in regional Australia (hundreds of km from the nearest city), where many users will be suffering from dial-up connections, and often outdated browsers too, so the "images off" issue is an important consideration. are there any other side effects with this technique that I haven't considered?

    Read the article

  • how to start with php code sniffer

    - by Rahul Mehta
    Hi, I have all written code and i want to this code standarise by php code sniffer. I would like to know what is the best way to start with it . I had installed it but when i run the command phpcs /path/to/code/myfile.php in the command line i got the last one hundered line error from 310 to 410 . but if i want to see the starting errors of any line error how can i see that . Mostly errors are 322 | ERROR | Spaces must be used to indent lines; tabs are not allowed 322 | ERROR | Line indented incorrectly; expected at least 8 spaces, found 2 How can i solve these things easily and in future it don't repeat , what it saying that i should not use tab , and use space , by using space it will take time . and how can i start with basic standard ,because don't want to utilise more time in this right now. Thanks

    Read the article

  • Tab versus space indentation in C#

    - by Lars Fastrup
    I sometimes find myself discussing this issue with other C# developers and especially if we use different styles. I can see the advantage of tab indentation allowing different developers to browse the code with their favorite indent size. Nonetheless, I long ago went for two space indentation in my C# code and have stuck with it ever since. Mainly because I often disliked the way statements spanning multiple lines are sometimes messed up when viewing code from other developers using another tab size. Recently a developer at one of my clients approached me and asked why I did not use tabs because he preferred to view code with an indentation size of 4. So my question is: Which style do you prefer and why?

    Read the article

  • Why is there so much poorly indented code out there?

    - by dsimcha
    The more I browse the code to open source projects in languages that aren't Python, the more I realize that it seems a lot of programmers don't believe in proper indentation. (I won't mention any projects specifically to avoid having anyone take this question too personally.) Usually code is indented, but in a way just different enough from the standard style that it drives me crazy, especially in old/crufty code. I've noticed that when I write in C-like languages, I tend to indent correctly as religiously as when I'm writing in Python, with the exception of debugging code that I actually want to stick out like a sore thumb. Given how easy it is with a modern IDE to fix incorrect indentation, what are some rationales for not religiously keeping indentation in sync with braces?

    Read the article

  • Can I customize the indentation of ternary operators in emacs' cperl-mode?

    - by Ryan Thompson
    In emacs cperl-mode, ternary operators are not treated specially. If you break them over multiple lines, cperl-mode simply indents each line the same way it indents any continued statement, like this: $result = ($foo == $bar) ? 'result1' : ($foo == $baz) ? 'result2' : ($foo == $qux) ? 'result3' : ($foo == $quux) ? 'result4' : fail_result; This is not very readable. Is there some way that I can convince cperl-mode indent like this? $result = ($foo == $bar) ? 'result1' : ($foo == $baz) ? 'result2' : ($foo == $qux) ? 'result3' : ($foo == $quux) ? 'result4' : fail_result; By the way, code example from this question.

    Read the article

  • How best to debug Delphi using the IDE and/or FOSS?

    - by LeonixSolutions
    I am currently using Delphi 7 and unsure whether to upgrade. I see the following means of debugging and wonder if there are others or which FOSS tools a small company can use (we don't do much Windows programming). 1 Debug in the IDE, by setting breakpoints, using watches, etc 2 Debug in the IDE, by using the Event Log I got some good info from this page and tweaked it to add timestamps and indent/outdent on procedure call/return, so that I can see nested calls more quickly. Does anyone know of anything better ? 3 Using a profiler 4 Any others? Such as MadExcept, etc?

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >