Search Results

Search found 5222 results on 209 pages for 'characters'.

Page 7/209 | < Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >

  • Know the row with max characters (C)

    - by l_core
    I have wrote a program in C, to find the row with the max number of characters. Here is the code #include <stdio.h> #include <stdlib.h> #include <ctype.h> #include <string.h> int main (int argc, char *argv[]) { char c; /* used to store the character with getc */ int c_tot = 0, c_rig = 0, c_max = 0; /* counters of characters*/ int r_tot = 0; /* counters of rows */ FILE *fptr; fptr = fopen(argv[1], "r"); if (fptr == NULL || argc != 2) { printf ("Error opening the file %s\n'", argv[1]); exit(EXIT_FAILURE); } while ( (c = getc(fptr)) != EOF) { if (c != ' ' && c != '\n') { c_tot++; c_rig++; } if (c == '\n') { r_tot++; if (c_rig > c_max) c_max = c_rig; c_rig = 0; } } printf ("Total rows: %d\n", r_tot); printf ("Total characters: %d\n", c_tot); printf ("Total characters in a row: %d\n", c_max); printf ("Average number of characters on a row: %d\n", (c_tot/r_tot)); printf ("The row with max characters is: %s\n", ??????) return 0; } I can easily find the row with the highest number of characters but how can i print that out? Thank You Folks

    Read the article

  • Conflict between variable substitution and CJK characters in BASH

    - by AndreasT
    I encountered a problem with variable substitution in the BASH shell. Say you define a variable a. Then the command $> echo ${a//[0-4]/} prints its value with all the numbers ranged between 0 and 4 removed: $> a="Hello1265-3World" $> echo ${a//[0-4]/} Hello65-World This seems to work just fine, but let's take a look at the next example: $> b="?1265-3?" $> echo ${b//[0-4]/} ?1265-3? Substitution did not take place: I assume that is because b contains CJK characters. This issue extends to all cases in which square brackets are involved. Surprisingly enough, variable substitution without square brackets works fine in both cases: $> a="Hello1265-3World" $> echo ${a//2/} Hello165-3World $> b="?1265-3?" $> echo ${b//2/} ?165-3? Is it a bug or am I missing something? I use Lubuntu 12.04, terminal is lxterminal and echo $BASH_VERSION returns 4.2.24(1)-release. EDIT: Andrew Johnson in his comment stated that with gnome-terminal 4.2.37(1)-release the command works fine. I wonder whether it is a problem of lxterminal or of its specific 4.2.24(1)-release version.

    Read the article

  • Cost to licence characters or ships for a game

    - by Michael Jasper
    I am producing a game pitch document for a university game design class, and I am looking for examples of licencing cost for using characters or ships from other IP holders in a game. For example: cost of using an X-Wing in a game, licencing from Lucas cost of using the Enterprise in a game, licencing from Paramount cost of using the Space Shuttle (if any), licencing from Nasa EDIT The closest information I can find is from an article about Nights of the Old Republic, but isn't nearly specific enough for my needs: What Kotick means by Lucas being the principal beneficiary of the success of The Old Republic is that there are most likely clauses in the license agreement that give percentages, points, or another denomination of revenue out to Lucas and his people just for the Star Wars name, and that amount is presumed to be a great deal of money. Kotick is saying that because the cost of the license is so prohibitive, as he has personally had experience with in his position as CEO of Activision Blizzard, that EA will not be able to be profitable because of the hemorrhaging of money to the licensor. EDIT 2 Another vague source stating that FOX uses a "five-figure rule" (assuming between $10,000 - $99,000) It seems FOX, like most studios, will not license individuals to create new works based upon their products. They will only commission individuals of their choosing if they elect to branch out into expanded product lines related to those licenses. Alternately, they are open to making the licencing available to large corporations with access to global markets, but only if those corporations agree to what Ms Friedman called a "five-figure guarantee". Presumably this means that the corporation seeking the licensing must agree to pay a 5-figure sum for that license, and be confident that their product will sell enough volume to recoup that fee, and to produce sufficient profits to make the acquisition worth their while. Thank you!

    Read the article

  • Text contains characters that cannot be resolved by this SpriteFont

    - by Appeltaart
    I'm trying to draw currency symbols in an Arial Spritefont. According to thissite, the font contains these symbols. I've included the Unicode character region for these symbols in the Content Processor SpriteFont file, like so: <CharacterRegions> <CharacterRegion> <Start>&#32;</Start> <End>&#126;</End> </CharacterRegion> <CharacterRegion> <!-- Currency symbols --> <Start>&#8352;</Start> <End>&#8378;</End> </CharacterRegion> </CharacterRegions> However, whenever I try to draw a € (Euro) symbol, I get this exception: Text contains characters that cannot be resolved by this SpriteFont Inspecting the SpriteFont in the IDE at that breakpoint shows the € symbol is in there. I'm at a loss at what could be wrong. Why is this exception thrown?

    Read the article

  • SSIS - Access Denied with UNC paths - The file name is a device or contains invalid characters

    - by simonsabin
    I spent another day tearing my hair out yesterday trying to resolve an issue with SSIS packages runnning in SQLAgent (not got much left at the moment, maybe I should contact the SSIS team for a wig). My situation was that I am deploying packages to a development server, and to provide isolation I was running jobs with a proxy account that only had access to the development servers. Proxies are an awesome feature and mean that you should never have to "just run the job as sysadmin". The issue I was facing was that the job step was failing. The job step was a simple execution of the package.The following errors appeared in my log file. I always check the "Log step output in history" for a job step, this ensures you get all the output from the command that you run. I'll blog about this later. If looking at the output in sysdtslog90 then you will have an entry with datacode -1073573533 and error message File or directory "<filename>" represented by connection "<connection>" does not exist.  Not exactly helpful. If you get the output from the console then you will also get these errors. 0xC0202070 "The file name property is not valid. The file name is a device or contains invalid characters." 0xC001401E "specified in the connection was not valid." It appears this error is due to the use of a UNC path and the account runnnig the package not having access to all the folders in the path. Solution To solve this you need to ensure that the proxy account has access to ALL folders in the path you are accessing. To check this works, logon as the relevant proxy user, or run a command window as the specified user. Then try and do net use \\server\share and then do a dir for each folder in the path and check you have access. If these work and you still have the problem then you have some other problem, sorry. The following are posts on experts exchange that also discuss this,http://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/Q_24056047.htmlhttp://www.experts-exchange.com/Microsoft/Development/MS-SQL-Server/SSIS/Q_23968903.html This blog had a post about it being a 64 bit issue. That definitely wasn't the issue for me as I was on a 32 bit server http://blogs.perkinsconsulting.com/post/64-bit-SQL-Server-2005-SSIS-and-UNC-paths-Part-2.aspx  

    Read the article

  • What characters are allowed in ClearCase activity name?

    - by Dmitry
    I want to write script for internal issue tracking system, integrated with ClearCase, that checks activity name (typed by user) for illegal characters. Unfortunatly, I can't find list of characters, allowed by ClearCase. Does anybody know where to get it? UPD: I'm looking for a link to a document, that specifies the allowed characters (or says that all characters are allowed).

    Read the article

  • MS-ACCESS query to match first few characters in string comparision

    - by neobee
    What query is suitable to compare two tables specied below, however only part of string in location(table1) will matches with the Location(table2). Location(table1) Location(table2) india- north USxcs India-west Indiaasd India- east Indiaavvds India- south Africassdcasv US- north Africavasvdsa us-west UKsacvavsdv uk- east Indiacascsa uk- south UScssca Africa-middle Indiacsasca Africa-south Africaccc Africa-east UKcac only 1st two characters of location(table1) and 1st two characters of location(table2) should match. Please help only any four characters of location(table1)and any two characters of location(table2)should match.

    Read the article

  • Limit number of alpha characters in regular expression

    - by beardedd
    I've been struggling to figure out how to best do this regular expression. Here are my requirements: Up to 8 characters Can only be alphanumeric Can only contain up to three alpha characters [a-z] (zero alpha characters are valid to) Any ideas would be appreciated. This is what I've got so far, but it only looks for contiguous letter characters: ^(\d|([A-Za-z])(?!([A-Za-z]{3,}))){0,8}$

    Read the article

  • Model M Keyboard inputs incorrect characters after logging in to Fedora

    - by mickburkejnr
    I recently bought a 24 year old IBM Model M keyboard. From what I gather, it'd been left on a shelf for the last 5 years, so you can imagine the amount of dust dirt and crap that was on it. Before cleaning it, I plugged it in to my laptop (running Fedora 17) using a PS/2 to USB adapter. What I found was, while it still works, the keys I press don't correspond to what is displayed on the screen. So for example, when I type S on the keyboard, I get ß display on the screen instead. At the time, I put this down to the adapter not working properly. Since then, I stripped the keys off the keyboard and cleaned the whole thing. It looks like it's just come out of a box! I then plugged it in to my computer (also running Fedora 17) via a standard PS/2 plug. The computer loaded up to the login screen, and I typed in my password. Pressed enter, and I logged straight in to my machine. At this point, I opened up a text editor and started typing some stuff. To my horror, the keystrokes I was entering weren't coming up as intended. What came up instead were characters that would map to the pressed key but only under a different keyboard language setting. I opened up a program to see what keyboard language had been selected, and the correct one for the keyboard was selected (which is UK in my case). I opened up a window that would show what characters mapped to what keys, and I pressed every single key on the keyboard, and every corresponding block representing each key lit up. I went back to the text editor to try again, but I was still getting these random characters. Whats more is that the backspace key would not work, although in the other utility it would flash when pressed. What I know is that at the login screen the keyboard must have entered the correct characters, otherwise I wouldn't have been able to log in. Further more, keys that don't respond while using a text editor as sending signals to the computer, as illustrated in that keyboard utility. The question is why random characters are displayed when they really shouldn't be? Would this be a hardware fault or a software issue?

    Read the article

  • Why are my "+" characters turned into spaces in my CGI program that handles Ajax requests?

    - by Dr.Dredel
    I'm collecting text through a web form and noticing that when it is collected by my Perl CGI all instances of "+" are transformed into " ". I run the text through a JavaScript escape before submission, but escape seems to leave + unaltered. There must be something really obvious that I'm missing... how do I send the string "2 + 2 = 4" through and not have it arrive as "2 2 = 4"?

    Read the article

  • How to add extensions to a lot of files using content of each file?

    - by v8media
    I've got over 10,000 files that don't have extensions from older versions of the Mac OS. They're extremely nested, and they also have all sorts of strange formatting and characters. They don't have file types or creator codes attached to them any longer. A great deal of these files have text in the file that will let me determine extensions (for example Word.Document.8 is in every file created by that version of Word, and Excel.Sheet.8 in every file created with that version of Excel). I found a script that looks like it would work for one of these file types at a time, but it erases parts of filenames after nefarious characters, which is not good. find . -type f -not -name "." -print0 |\ xargs -0 file |\ grep 'Word.Document.8' |\ sed 's/:.*//' |\ xargs -I % echo mv % %.doc So, two questions from that: One is, should I clean the characters in the filenames first, or programmatically deal with those in the script in order to leave them the same? As long as I lose no information from the filenames, I don't see a problem cleaning out slashes and other problem characters. Also, if I clean the filenames, there are likely to be duplicates, so any cleaning script would have to add something like "-1" before the extension to make sure nothing gets lost. 2nd question is how do I change the script so that it will look for more than one file type at the same time and give each the proper extension? I'm not tied to this script, but it is understandable, which is a pro. Mac OS X 10.6 is installed on this file server, but I've got access to any recent versions of OS X. Thanks, Ian

    Read the article

  • PHP-GD: Dealing with Unicode characters

    - by sehugg
    I am developing a web service that renders characters using the PHP GD extension, using a user-selected TTF font. This works fine in ASCII-land, but there are a few problems: The string to be rendered comes in as UTF-8. I would like to limit the list of user-selectable fonts to be only those which can render the string properly, as some fonts only have glyphs for ASCII characters, ISO 8601, etc. In the case where some decorative characters are included, it would be fine to render the majority of characters in the selected font and render the decorative characters in Arial (or whatever font contains the extended glyphs). It does not seem like PHP-GD has support for querying the font metadata sufficiently to figure out if a character can be rendered in a given font. What is a good way to get font metrics into PHP? Is there a command-line utility that can dump in XML or other parsable format?

    Read the article

  • IntelliJ and internationalisation: accented characters

    - by skiaddict1
    I have a java application which has a GUI in both English and French, using the standard Java internationalisation services. I wrote it in JBuilder 2005 on an old machine, and recently upgraded, which has meant changing IDEs. I have finally settled on IntelliJ, which I adore. However, it doesn't seem able to handle the accented characters in my ListResourceBundle descendants which contain French. When I first created the IntelliJ project and added my source (which I did manually, to be sure nothing weird was going on behind the scenes), I noticed that all the accented characters had been changed into pairs of characters such as v©. I went through the code and corrected all of these, and assumed that the problem was fixed. But I find on running the (rebuilt) project that the pairs of characters are still showing, instead of the accented characters that I see in my code!! Can someone who has done internationalisation in IntelliJ please tell me what I need to do to fix this? Grateful TIA! PS I'm on the Mac, BTW

    Read the article

  • Why is '\x' invalid in Python?

    - by Paul McGuire
    I was experimenting with '\' characters, using '\a\b\c...' just to enumerate for myself which characters Python interprets as control characters, and to what. Here's what I found: \a - BELL \b - BACKSPACE \f - FORMFEED \n - LINEFEED \r - RETURN \t - TAB \v - VERTICAL TAB Most of the other characters I tried, '\g', '\s', etc. just evaluate to the 2-character string of a backslash and the given character. I understand this is intentional, and makes sense to me. But '\x' is a problem. When my script reaches this source line: val = "\x" I get: ValueError: invalid \x escape What is so special about '\x'? Why is it treated differently from the other non-escaped characters?

    Read the article

  • Using php to create a password system with chinese characters

    - by WillDonohoe
    Hi guys, I'm having an issue with validating chinese characters against other chinese characters, for example I'm creating a simple password script which gets data from a database, and gets the user input through get. The issue I'm having is for some reason, even though the characters look exactly the same when you echo them out, my if statement still thinks they are different. I have tried using the htmlentities() function to encode the characters, the password from the database encodes nicely, giving me a working '& #35441;' (I've put a space in it to stop it from converting to a chinese character!). The other user input value gives me a load of funny characters. The only thing which I believe must be breaking it, is it encodes in a different way and therefore the php thinks it's 2 completely different strings. Does anybody have any ideas? Thanks in advance, Will

    Read the article

  • FTP ASCII file from Windows to Mainframe (iSeries) — special characters

    - by MikeM
    I have a text file created on a Windows machine, the page coding used on the file is 1252 This file is then ftp'd to an iSeries machine for processing As far as I can see, it appears on the iSeries. It has a CCSID of 037. Sometimes this file contains French characters (e.g. é). When this happens, the FTP will fail with a truncation error as the french character gets converted to some extra junk: �. The file is fixed block so the line does get truncated due to the one character turning into 3. I can convert the French characters to characters without the accents before sending but would prefer to keep everything intact. So is there a way to retain them and send the file over properly? I'm very green on iSeries, mainly a Windows guy.

    Read the article

  • Detect (and remove) non-ascii characters from files

    - by Mawg
    Something similar to this question, but that ended up with a programming answer. I am looking for a ready-made Windows application to recurse a directory tree and .. at the very least, notify me of all files which contain non-ascii characters It would be nice if it would also do any of the following (in no particular order) Let me specify which file extensions to scan Show the file contents, with the non-ascii characters highlighted Automagically remove such characters, or ... Let me launch an editor to remove them manually Know you of such a best? Thanks a 1,000,000 in advance

    Read the article

  • Excel cutting out down over 1024 characters

    - by Zeno
    I am using Excel 2003 to save a large file as a CSV. But when saving cells that contain over 1024 characters, it cuts out the characters beyond 1024. Per a previous question, I am using this official macro to save: http://support.microsoft.com/default.aspx?scid=kb;en-us;291296&Product=xlw This macro in question is probably causing it, since I'm not using the normal Save As (in order to put quotes around every field). It may not be 1024 characters, but long cells are getting cut off. What in this macro is causing that?

    Read the article

  • How to fix windows new line character on sftp synchronization in eclipse (pdt)

    - by superspace
    Hello, I have a problem with windows new line characters being introduced into text files on eclipse sftp synchronization (via jcraft's sftp plugin). I've set "New text file line delimiter" to Unix and have even sanitized the file with "fromdos" but every time i upload using the sftp plugin, windows new line characters can be seen in the remote file as "^M" characters (when viewed in vi). A point to note is that if i upload using an external sftp client, it's all fine. Eclipse Version: PDT (Helios) SFTP: jcraft sftp plugin Local Environment: Ubuntu 10.04 Remote Environments: FreeBSD 6.4, Debian 4.0 What am i missing? My co-workers would thank you for the solution :) Thanks in advance.

    Read the article

  • nginx serves broken characters

    - by Andrew123321
    I have nginx 1.2.0-1 on debian 6.0.5. I have an empty file (let's say test.css). I add A and newline, works fine, B and newline, works fine,... D, works fine. I add E and I got three broken characters ("???"). When the file has got more content nginx would usually "cache" it and then output the cached file minus some characters plus some of these broken characters. Do you have any idea how to deal with this? Thank you

    Read the article

  • Batch Scripting - Listing files with a specific amount of characters in file name

    - by Jane
    I'm creating a batch script for a class and I've hit a roadblock I have to list all text files whose names are up to seven characters long on the whole c: drive - make the listing output in a wide formant - then append to Batch script file output.txt So far I have -- dir c:*txt/w/o/s/p c:/"My Batch Script File Assigment"/"Output"/"Batch Script File Output Data".txt The above does everything except limit the search to files with only 1-7 characters in their name. If anyone could point me in the right direction I would really appreciate it!

    Read the article

  • replace multiple characters at different places in a string Excel 2007

    - by conspirisi
    =SUBSTITUTE(AD!H35,"&","") The formula above replaces an ampersand in a cell where I have the text Handy Person / Driver & Car giving Handy Person / Driver Car How do I also remove the forward slash '/' ? I've seen it done with nested substitute formulas, but as I probably need to remove even more characters in the future. I'd rather use a more elegant solution. Perhaps even replacing an entire class of non-alphanumeric characters is another solution?

    Read the article

  • Special characters in Samba filenames

    - by Matti
    When serving files containing special characters such as "()?:" in the filename through Samba, the names get transformed into an unrecognizable format. For example, a file my_file:_(important).txt is displayed as M43J1E~0.TXT Is there a way to avoid this behavior (without renaming the files, obviously)? I'm assuming that character encoding is not to blame because several UTF-8 characters seem to work fine.

    Read the article

  • Remove some junk characters from server console log.

    - by Jayakrishnan T
    Please look in to the picture,here am trying to open(with vi editor) my server console log file(around 100MB) and it takes more than two minutes to open with so many special characters.after deleting the first line (means typing "dd")then i can easily view the file and size of the file is also reduced very much.My server OS is RHEL 5.4 and jboss is running in to it. Please help me to avoid such junk characters coming to my server console log files and it helps me to save my valuable space in server.

    Read the article

< Previous Page | 3 4 5 6 7 8 9 10 11 12 13 14  | Next Page >