Search Results

Search found 22283 results on 892 pages for 'at least three characters'.

Page 19/892 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • Replacing characters in Ruby string according to some rule

    - by Kyle Kaitan
    In Ruby, I have a string of identical characters -- let's say they're all exclamation points, as in !!!!. I would like to replace the characters at certain indices with '*' if the integer corresponding to that index meets some criteria. For example, let's say I want to replace all the characters whose indices are even numbers and are greater than 3. In the string !!!!!!!! (8 characters long), that results in !!!!*!*! (indices 4 and 6 have been replaced). What's the most compact way to do this?

    Read the article

  • Splitting a UL into three even lists

    - by Andy
    I am printing a menu using UL, the trouble is the order that is generated by my script is ignored because im printing the LI one after the other and they're spanning three across. So the order is 1 , 2 , 3 as opposed to 1 2 3 To counteract this i wanted to split my single UL into three that way the order would be maintained. Here is my code currently which works perfectly to print a single UL. //Category Drop Down Menu $this->CategoryDropDownMenu = '<ul id="subcatmenu">'; foreach($sitemap->CategoryMenu as $val) $this->CategoryDropDownMenu .= '<li><a href="'.$val[host].$val[link].'"><span>'.htmlspecialchars($val[title]).'</span></a></li>'; $this->CategoryDropDownMenu .= '</ul>';

    Read the article

  • Why do XSLT editors insert tab or space characters into XSLT to format it?

    - by pgfearo
    All XSLT editors I've tried till now add tab or space characters to the XSLT to indent it for formatting. This is done even in places within the XSLT where these characters are significant to the XSLT processor. XSLT modified for formatting in this way can produce output very different to that of the original XSLT if it had no formatting. To prevent this, xsl:text elements or other XSLT must be added to a sequence constructor to help separate formatting from content, this additional XSLT impacts on maintainability. Formatting characters also adversely impact on general usability of the tool in a number of ways (this is why word-processors don't use them I guess) and add to the size of the file. As part of a larger project I've had to develop a light-weight XSLT editor, it's designed to format XSLT properly, but without tab or space characters, just a dynamic left-margin for each new line. The XSLT therefore doesn't need additional elements to separate formatting tab or space characters from content. The problem with this is that if XSLT from this editor is opened in other XSLT editors, characters will be added for formatting reasons and the XSLT may therefore no longer behave as intended. Why then do existing XSLT editors use tabs or spaces for formatting in the first place? I feel there must be valid reasons, perhaps historical, perhaps practical. An answer will help me understand whether I need to put compatibility options in place in my XSLT editor somehow, whether I should simply revert to using tabs or spaces for both XSLT content and formatting (though this seems like a backwards step to me), or even whether enough XSLT users might be able to persuade their tools vendors to include alternative formatting methods to tabs or spaces. Note: I provided an XSLT sample demonstrating formatting differences in this answer to the question: Tabs versus spaces—what is the proper indentation character for everything, in every situation, ever?

    Read the article

  • Error while zipping files with unicode characters in names with Win7's "send to > compressed (zipped) folder"

    - by user1306322
    When I try to zip files containing unicode characters in their names, such as © or ™, I get the following error: [Window Title] Compressed (zipped) Folders Error [Content] 'C:\Asd™.txt' cannot be compressed because it includes characters that cannot be used in a compressed folder, such as ™. You should rename this file or directory. [OK] This only became a problem when I reinstalled Windows 7. I probably had some resources necessary from this error to be resolved automatically, but it's almost clean installation now and I can't zip files. How do I fix this? UPD: Some time passed since I posted this question, I installed some of my usual applications, but the problem still exists and I'm not sure if it can be fixed by installing some specific application from before.

    Read the article

  • How to read a Text File Hidden Characters?

    - by balexandre
    Hi guys, I've created a text file from an application that I developed. When I send the text file to a SYSTEM Validation, they (3rd Party System) say that the file is invalid and that the file contains 3 characters in the beginning of the file that are not allowed as well special characters are not correct. They also say I need to use either ISO 8859-1 or PC850 Well, I'm using NotePad++ and I can't see that at all! What is the best text file reader for this kinda problems? EDITED I also have a MAC and just a thought I remembered opening in TextMate ... WOW! Now I know what they are talking about! How can I have the same in Windows?

    Read the article

  • Non-printing characters in Word 2011 not showing even when enabled

    - by Henrik Söderlund
    I have a document I work on often, my resume. I have created a few different styles that I use and for some reason the non-printing characters have stopped showing properly. I have the option enabled (the reversed P) and the proper settings in the preferences checked. Here is a screenshot of the current view: basically, only the tab stops and the returns are showing. Upon doing an experiment by creating a new document, all characters (especially the spaces) show up nicely: I can copy this line and paste it into my resume document and it shows up there too. It seems my styles are doing something...

    Read the article

  • nginx regex characters that require quoting?

    - by Michael Louis Thaler
    So I was configuring nginx today and I hit a weird problem. I was trying to match a location like this: location ~ ^/([0-9]+)/(.*) { # do proxy redirects } ...for URLs like "http://my.domain.com/0001/index.html". This rule was never matching, despite the fact that it by all rights should. It took me awhile to figure out, based on this documentation, that some characters in regexes need to be quoted. The problem is, the documentation is for rewrites, and it specifically calls out curly braces, not square brackets. After a fair bit of experimentation that involved a lot of swearing, I discovered that I could fix the problem by quoting the regex like so: location ~ "^/([0-9]+)/(.*)" { # do proxy redirects } Is there a list somewhere of characters that nginx requires quoting regexes with? Or could there be something else going on here that I'm totally missing? This is my first nginx configuration job, so it's very possible I've misunderstood something...

    Read the article

  • max length of url 257 characters for mod_rewrite?

    - by Daniel
    My url scheme is /foo/var1-var2-var3.../bar I am using these mod_rewrite rules: RewriteBase /foo/ RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^ index.php [PT,L] If the length of the string 'var1-var2...' is greater than 257 characters then an error 403 Forbidden and a 404 are returned. However, if the length of the 'var1-var2...' string is 257 characters or less and subsequently followed by a slash the length of the remaining url may be any length. How does one overcome this limit?

    Read the article

  • Message-ID contains multiple '@' characters

    - by Thomaschaaf
    I am looking at my server's spamassasin and have stumbled across the "problem" that my outgoing email sends out its own X-Report and X-Score in the header (programs used are Outlook 2007 as client and exim4 with the vexim plugin and Spamassasin). On the one hand I want to get rid of the sent X-Report which gets sent out with every email and on the other hand I still want to have it for incoming mails. While I was trying to fix this (which I still haven't) I stumbled across this "error" which makes my email less trustworthy: 1.4 MSGID_MULTIPLE_AT Message-ID contains multiple '@' characters How do I get rid of the multiple '@' characters?

    Read the article

  • remove words containing non-alpha characters

    - by dnkb
    Given a text file with space separated string and a tab separated integer, I'd ;like to get rid of all words that have non-alpha characters but keep words consisting of alpha only characters and the tab plus the integer afterwards. My attempts like the ones below didin't yield any good. What I was trying to express is something like: "replace anything within word boundaries that starts and ends with 0 or more whatever and there is at least one :digits: or :punct: in between". sed 's/\b.[:digits::punct:]+.\b//g' sed 's/\b.[^:alpha:]+.\b//g' What am I missing? See sample input data below. Thank you! asdf 754m 563 a2a 754mm 291 754n 463 754 ppp 1409 754pin 4652 pin pin 462 754pins 652 754 ppp 1409 754pin 4652 pi$n pin 462 754/p ins 652 754 pp+p 1409 754 p=in 4652

    Read the article

  • How to read a Text File Hidden Characters?

    - by balexandre
    I've created a text file from an application that I developed. When I send the text file to a SYSTEM Validation, they (3rd Party System) say that the file is invalid and that the file contains 3 characters in the beginning of the file that are not allowed as well special characters are not correct. They also say I need to use either ISO 8859-1 or PC850 Well, I'm using Notepad++ and I can't see that at all! What is the best text file reader for this kind of problems? EDITED I also have a Mac and just thought I remembered opening in TextMate ... WOW! Now I know what they are talking about! How can I have the same in Windows?

    Read the article

  • Public IP shows strange characters and Facebook registers logged-in session to a different location

    - by Stuart Kershaw
    I'm encountering some IP strangeness today and hoping to find an explanation. In short, I'm based in Seattle, WA with my ISP being Comcast. While browsing Facebook's account settings, I noticed that my active session was located to Mount Laurel, NJ. At that point I ran a search in Google for 'my public IP', which returned an interesting result: a string of characters in the following format: 2601:8:b000:xxx:xxxx:xxxx:xxxx:xxxx Normally, a search for my IP returns something like: 67.xxx.xx.xxx A phone call to Comcast got me nowhere, but using Comcast's phone-menu debugging tools, I was able to send a 'refresh signal' to my modem. After that, the search for 'my public IP' yielded the expected result... for about 5 minutes, and then it returned to the new string of characters. Does anyone know of an explanation for this?

    Read the article

  • Why are unicode characters not rendering correctly

    - by sw1nn
    Background: I have some unicode characters in my prompt (git status markers essentially) I'm running urxvt under xfce on arch linux. I'm using DejaVu Sans Mono for Powerline font, specified via .Xresources line: URxvt*font: xft:DejaVu Sans Mono for Powerline:pixelsize=14 When I start urxvt the unicode characters do not render correctly. For example ? renders as â However, if I then start a new urxvt from inside the first terminal everything renders correctly. There doesn't appear to be any difference in the environment between the two terminals. What could be the difference between the first invocation and the nested invocation? I suspect the font is not correct in the 'outer' instance, but I'm unsure how to check the font of a running X window screenshot demonstrates the problem: Note: I moved this question from serverfault.com - i hope this site is more appropriate

    Read the article

  • How to type accented characters in Ubuntu 10.04 with an Apple Aluminum Keyboard

    - by jfmessier
    I installed the latest Ubuntu 10.04 and I used to have the Command, Option or Right-Ctrl keys as compose keys to write accented characters. But I find that under Ubuntu 10.04, the Compose Key is not working, even if I specify the proper Apple Keyboard. Since I cannot work with other keyboard layouts than the plain USA one along with compose keys (I never learned, and I hate, the French layout), this about my only way to input accented characters. I still have to try it with a regular keyboard to see whether there is a difference. Thanks :-)

    Read the article

  • Insert escaped characters in seq command separator

    - by dhekir
    How do I insert a string containing escaped characters (\n, \t, etc) as separator for the seq command? The standard format includes a newline character: $ seq 3 1 2 3 But if I try to add something plus a newline, the backslash is escaped and a literal "\n" is used instead: $ seq -s "$\n" 3 1\n2\n3 The same happens using simple quotes, no quotes, or other escaped characters: $ seq -s "\t" 3 1\t2\t3 $ seq -s \t 3 1t2t3 This is not the standard behavior for commands such as echo, so I'm a bit confused here... Edit: Ideally, I'd like a somewhat portable solution (that works in tsch as well as bash, for instance), and without resorting to Perl or other languages.

    Read the article

  • I can see markup characters in vim `:help`

    - by Relax
    I just created a .txt file inside .vim/doc for documenting one little function of my .vimrc, ran :helptags ~/.vim/doc and apparently the whole vim help system went wild. Now, if I open for example :help help, I see things like: This also works together with other characters, for example to find help for CTRL-V in Insert mode: > :help i^V < (notice the < and characters). I can also see the ~ at the end of headlines and the modeline at the end of the help page (thinks like vim:tw=78:ts=8:ft=help:norl:). I have no idea about what happens or how to fix it. Any clue? Thanks in advance!

    Read the article

  • Why can't upload three files with FileUpload ?

    - by Valter Henrique
    Hi everyone, i'm trying to upload three images to my server, is working, but upload always the last file selected by the user, not the three selected. Here's my code: protected void doPost(HttpServletRequest request, HttpServletResponse response){ boolean multipart = ServletFileUpload.isMultipartContent(request); if (multipart) { DiskFileItemFactory fileItemFactory = new DiskFileItemFactory(); fileItemFactory.setSizeThreshold(5 * 1024 * 1024); //5 MB fileItemFactory.setRepository(tmpDir); ServletFileUpload uploadHandler = new ServletFileUpload(fileItemFactory); try { List items = uploadHandler.parseRequest(request); Iterator itr = items.iterator(); while (itr.hasNext()) { FileItem item = (FileItem) itr.next(); File file = new File(dir, generateNewName()); item.write(file); } } catch (FileUploadException ex) { } catch (Exception ex) { } } } -- UPDATE: <html> <head> <title>Upload</title> </head> <body> <form action="Upload" method="post" enctype="multipart/form-data"> <input type="file" name="file1" /> <br /> <input type="file" name="file2" /> <br /> <input type="file" name="file3" /> <br /> <input type="submit" value="Enviar" /> </form> </body> </html> Best regards, Valter Henrique.

    Read the article

  • C# wrapper for array of three pointers

    - by fergs
    I'm currently working on a C# wrapper to work with Dallmeier Common API light. See previous posting: http://stackoverflow.com/questions/2430089/c-wrapper-and-callbacks I've got pretty much everything 'wrapped' but I'm stuck on wrapping a callback which contains an array of three pointers & an array integers: dlm_setYUVDataCllback int(int SessionHandle, void (*callback) (long IPlayerID, unsigned char** yuvData, int* pitch, int width, int height, int64_t ts, char* extData)) Function Set callback, to receive current YUV image. Arguments SessionHandle: handle to current session. Return PlayerID (see callback). Callback - IPlayerId: id to the Player object - yuvData: array of three pointers to Y, U and V part of image The YUV format used is YUV420 planar (not packed). char *y = yuvData[0]; char *u = yuvData[1]; char *v = yuvData[2]; - pitch: array of integers for pitches for Y, U and V part of image - width: intrinsic width of image. - height - ts : timestamp of current frame - extData: additional data to frame How do I go about wrapping this in c#? Any help is much appreciated.

    Read the article

  • Using CSS to create three boxes with dividers and text centered within each box

    - by linnse
    I'm trying to figure out the best way to create a row of three boxes (columns), with dividers between boxes 1 and 2, and boxes 2 and 3. The text would need to be centered within each box. h2 { color: #00ADEF; margin-top:0; margin-bottom:0; font-family:Arial, Helvetica, sans-serif; font-size:20px; font-weight:bold; line-height:23px; } p { margin-top:0; } .3colwrapper { width: 930px; margin: 0 auto; } .colbox { float:left; margin: 10px; width: 210px; background:#DDD; padding:10px 40px; } <div class="3colwrapper"> <div class="colbox"><h2>Step One</h2> <p>Sign up</p> </div> <div class="colbox"><h2>Step Two</h2> <p>Verify</p> </div> <div class="colbox"><h2>Step Three</h2> <p>Participate</p> </div> </div> Here's what I've worked up so far: http://cssdesk.com/YyjAr

    Read the article

  • Suggest a good method with least lookup time complexity

    - by Amrish
    I have a structure which has 3 identifier fields and one value field. I have a list of these objects. To give an analogy, the identifier fields are like the primary keys to the object. These 3 fields uniquely identify an object. Class { int a1; int a2; int a3; int value; }; I would be having a list of say 1000 object of this datatype. I need to check for specific values of these identity key values by passing values of a1, a2 and a3 to a lookup function which would check if any object with those specific values of a1, a2 and a3 is present and returns that value. What is the most effective way to implement this to achieve a best lookup time? One solution I could think of is to have a 3 dimensional matrix of length say 1000 and populate the value in it. This has a lookup time of O(1). But the disadvantages are. 1. I need to know the length of array. 2. For higher identity fields (say 20), then I will need a 20 dimension matrix which would be an overkill on the memory. For my actual implementation, I have 23 identity fields. Can you suggest a good way to store this data which would give me the best look up time?

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >