Search Results

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

Page 40/209 | < Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >

  • storing characters in char data type C language

    - by iSight
    Hi, I can store string of few length in char data type. But when it exceeds its capacity what can be the alternative way to store string. I am using char data type. void setString(char* inPoints) { if (strcmp(mPoints, inPoints)!= ZERO) { if (mPoints) { free(mPoints); } mPoints = (char*)malloc((strlen(inPoints) + 1) * sizeof(char)); strcpy(mPoints, inPoints); } }

    Read the article

  • Adding characters to string

    - by Jamza
    I am currently trying to build a very basic serial shell with my arduino. I am able to get an output from the device using Serial.read() and can get the character it has outputted, but I cannot work out how to then add that character to a longer to form the full command. I tried the logical thing but it doesn't work: char Command[]; void loop(){ if(Serial.available() > 0){ int clinput = Serial.read(); Command = Command + char(clinput); } Can anybody help? Thank You.

    Read the article

  • Perl scraping script not recognising certain characters

    - by user1849286
    I have a script that works fine locally but on the server fails. It displays the non-breaking space symbol &nbsp; as ? when printing to standard output. In the parsing of the page, if I try to get rid of non breaking space symbol with s/&nbsp;//g nothing happens, neither getting rid of the question mark s/?//g It seems to stick no matter what. Bizzarely, this is not an issue when running the script locally. Additionally, question marks within a diamond symbol are inserted everywhere (on both the server script and the local script) instead of apostrophes, although at least that is not causing the parsing of the page to break on the local page. Confused, pls help.

    Read the article

  • compare two characters based on subset

    - by schultem
    I have a simple dataframe with two columns: df <- data.frame(x = c(1,1,2,2,3), y = c(rep(1:2,2),1), target = c('a','a','a','b','a')) I would like to compare the strings in the target column (find out whether they are equal or not, i.e., TRUE or FALSE) within every level of x (same number for x). First I would like to compare lines 1 and 2, then 3 and 4 ... My problem is that I am missing some comparisons, for example, line 5 has only one case instead of two - so it should turn out to be FALSE. Variable y indicates the first and second case within x. I played around with ddply doing something like: ddply(df, .(x), summarise, ifelse(as.character(df[df$y == '1',]$target), as.character(df[df$y == '2',]$target),0,1)) which is ugly ... and does not work ... Any insights how I could achieve this comparison? Thanks

    Read the article

  • char '0x8' what character is this?

    - by OHHAI
    I have a large amount of data in a database. When I attempt to read a certain portion of the data and generate some xml and send it to a webservice I get the following exception... The char '0x8' in 'java.lang.IllegalArgumentException'. I'm guessing it is some bad data, as it has worked perfectly for about 7 months but now some user uploaded some new data that seems to have some issues. Anyone know what character this is so I can just run a sql query and clean it from the db? Thanks in advance.

    Read the article

  • Escaping ’ character in PHP

    - by richard
    Hello, I'm having a hard time trying to replace this weird right single quote character. I'm using str_replace like this: str_replace("’", '\u1234', $string); It looks like I cannot figure out what character the quote really is. Even when I copy paste it directly from PHPMyAdmin it still doesn't work. Do I have to escape it somehow?

    Read the article

  • Identify words with ascending characters from text file

    - by user2914000
    I am having a fair amount of trouble trying to write a program that counts the amount of ascending words (words in which each character is larger than the previous character) in a text file. I have tried a few different methods to solve this but cannot seem to get it working. If anyone could help me revise the code to work properly it would be appreciated. The code will print about 5 of the words from the list of nearly 20000, but none considered are ascending (the file does have many ascending words) and it sometimes prints the same word twice. I am printing theWord to the console simply to see if the code works. import java.util.Scanner; import java.io.*; public class { public static void main (String [] args) throws FileNotFoundException{ String theWord; Scanner inputFile = new Scanner(new File("file.txt")); boolean ascending = true; int i = 1; while(inputFile.hasNextLine()){ theWord = inputFile.nextLine(); if(theWord.length() >= 2){ while(i < theWord.length() - 1){ if(theWord.charAt(i) <= theWord.charAt(i + 1)){ ascending = true; System.out.println("+ " + theWord); totalNum = totalNum + 1; } else{ ascending = false; System.out.println("= " + theWord); } i++; } } }

    Read the article

  • Extract inputs from a pointer to array of characters in C / C++

    - by user2066884
    I am writing a command line utility but I cannot find a way to store the commands and arguments. so far I have the following but I get a Segmentation fault: int main(void) { char *command; char *args[MAX_LINE/2 + 1]; int should_run = 1; do{ cout << "cmd> "; int counter = 0; while(cin >> command) { strcpy(args[counter],command); counter++; } cout << args[0] << "\n"; } }

    Read the article

  • Replacing ’ character in PHP

    - by richard
    Hello, I'm having a hard time trying to replace this weird right single quote character. I'm using str_replace like this: str_replace("’", '\u1234', $string); It looks like I cannot figure out what character the quote really is. Even when I copy paste it directly from PHPMyAdmin it still doesn't work. Do I have to escape it somehow?

    Read the article

  • cut text after (x) amount of characters

    - by Blackbird
    This is in wordpress (not sure that makes a difference) This bit of php outputs the post title <?php echo $data['nameofpost']; ?> It's simple text which can be anywhere up to 100 chars long. What i'd like is if the chars outputted are over 20 long to display '...' or simply nothing at all. Thanks

    Read the article

  • How web server choose between unicode and utf-8 for accentued characters?

    - by jacques
    I have a web server with my ISP which replaces in the urls the accentued characters by their unicode values: for instance é (eacute) is translated to %e9 (dec 233). For testing I use locally Easyphp which translate those characters by their utf-8 equivalence: é is then replaced by the well known sequence %c3%a9 (é)... Browsers served by Easyphp don't decode unicode values but they do if running locally (utf-8 and non converted accent also)... I have been unable to find where this behavior is configured in the server. This is a problem as some urls are built by my application using the php rawurlencode() which seems to always encode with unicode values on both servers. Any idea? Thanks in advance.

    Read the article

  • How does the web server choose between unicode and utf-8 for accented characters?

    - by jacques
    I have a web server with my ISP which replaces accented characters in URLs with their unicode values: for instance é (eacute) is translated to %e9 (dec 233). For testing locally I use EasyPHP which translates those characters by their utf-8 equivalence: é is then replaced by the well known sequence %c3%a9 (é)... Browsers served by EasyPHP don't decode unicode values but they do if running locally (utf-8 and non converted accent also)... I have been unable to find where this behavior is configured in the server. This is a problem as some urls are built by my application using the php rawurlencode() which seems to always encode with unicode values on both servers. Any idea?

    Read the article

  • Why does Visual Studio 2008 change namespace characters in a generated file?

    - by Fredrik
    Hello, I am working on a asp.net 3.5 project in sweden, where some of the namespaces include swedish characters, such as 'å', 'ä' and 'ö'. When building the project and generating the design-file, visual studio replaces these characters with some other strange characters. This only happens when the characters occur in a namespace or class name. If a field or variable contain a swedish character, everything works fine. To clarify, the strange character occur in the design file when a namespace and/or control contain swedish characters. Does anyone know why this happens and if there is a solution for the problem that doesn't mean changing the names of the namespaces? Sincerely, Fredrik

    Read the article

  • Is there a way to make vim display "virtual characters" before/after regular patterns in the buffer?

    - by Laurence Gonsalves
    Vim has list and listchars options that make vim display "virtual characters" (by which I mean characters that aren't actually in the buffer) in certain situations. For example, you can make trailing spaces look like something else, or add a visible character to represent the newline character. I'd like to be able to enable the display of certain characters either before or after certain regular patterns ((perhaps syntax items). Sort of like syntax highlighting, but instead of just changing the color/styling of characters that are in the buffer, I'd like to display extra characters that aren't in the buffer. For example, I'd like to display a virtual : (colon) after all occurrences of the word "where" that appear at the end of a line. Is this possible, and if so, what is the necessary vimscript to do it?

    Read the article

  • Does anyone know of a vim plugin or script to convert special characters to their corresponding HTML

    - by Alan
    I develop websites for corporate clients, so we see the ®, ™, etc. chars a whole lot. Sometimes I paste in huge blocks of copy, which might even contain pretty quotes (“ ”) or other strange characters from word processors. So, my question is this: Does anyone know of a vim plugin or script that can, in one fell swoop, convert all these characters to html entities? I think this covers all the bases of the entities it would be nice to have: http://web.forret.com/tools/charmap.asp So, for the characters above, they would be replaced with &reg;, &trade;, &ldquo;, &rdquo;, etc. I tried the htmlspecialchars vimball (http://www.vim.org/scripts/script.php?script_id=2377), but no dice. It only performs its replacement like the PHP htmlsepcialchars function, replacing html-conflicting characters, and doesn't cover any additional special characters.

    Read the article

  • Using hibernate criteria, is there a way to escape special characters?

    - by Kevin Crowell
    For this question, we want to avoid having to write a special query since the query would have to be different across multiple databases. Using only hibernate criteria, we want to be able to escape special characters. This situation is the reason for needing the ability to escape special characters: Assume that we have table 'foo' in the database. Table 'foo' contains only 1 field, called 'name'. The 'name' field can contain characters that may be considered special in a database. Two examples of such a name are 'name_1' and 'name%1'. Both the '_' and '%' are special characters, at least in Oracle. If a user wants to search for one of these examples after they are entered in the database, problems may occur. criterion = Restrictions.ilike("name", searchValue, MatchMode.ANYWHERE); return findByCriteria(null, criterion); In this code, 'searchValue' is the value that the user has given the application to use for its search. If the user wants to search for '%', the user is going to be returned with every 'foo' entry in the database. This is because the '%' character represents the "any number of characters" wildcard for string matching and the SQL code that hibernate produces will look like: select * from foo where name like '%' Is there a way to tell hibernate to escape certain characters, or to create a workaround that is not database type sepecific?

    Read the article

  • A font like RomanS in appearance but with support for more characters (Autocad)?

    - by kokbira
    In a Autocad 2010 installation, the standard font used is RomanS. That font is so limited on characters, so when I use "text" command I cannot add "³" on text of cubic meters measures (a "?" is displayed instead of the "³" character - see isolated text on figure below and Font characters Latin Supplement range). When I use a dimension command, like multileader, Autocad "corrects" that issue using another font that support that missing character, resulting on an awful mixture (see text on multileader below - on multileader text properties, we can see 3m{\fArial|b0|i0|c0|p34;³}). I can easily change that font with another, like Verdana, Times New Roman... that have more characters than RomanS font, but I would like to use an alternative font more like RomanS in appearance. Any help?

    Read the article

  • Count the Number of Characters in a Full FIle Path?

    - by Richie086
    I need to be able to count the number of characters in a full path to a file in windows. How I am currently accomplishing this task is as follows: Open a command prompt cd to the directory in question (for example c:\CruiseControl\ProjectArtifacts\ProjectName) type the following command dir /s /b output.csv Open the resulting output.csv file in excel. use the =LEN() function in excel to count the number of characters per row as listed in the output.csv file. Does anyone know of an explorer shell extension, or some 3rd party tool that could preform this function without me having to manipulate the output from dir in excel? Is there some easier way to go about doing this? The root of the issue I am having is the ~260 character file path limit in Windows. I am trying to analyze which paths are approx ~260 characters so I can shorten them to avoid getting this error.

    Read the article

  • Notepad++. How to replace diffrent characters with corresponding letters at once?

    - by Algis
    How to find and replace in Notepad++ multiple different characters to corresponding letters at once throughout the text? For example, I have 32 characters that I want to replace. So I have the character like “À”, and I want to replace it with the letter “A”. Next, I have the character like “Æ” and I want to replace it with the letter “?” and so on. Generally, I have 32 such characters and each time I need to do the same operation. Is any way to do this at once? Please view the sample. http://tinypic.com/view.php?pic=34jenv4&s=6 Thanks

    Read the article

  • How to apply effects that occur (or change) over time to characters in a game?

    - by Joshua Harris
    So assume that I have a system that applies Effects to Characters like so: public class Character { private Collection<Effect> _effects; public void AddEffect (Effect e) { e.ApplyTo(this); _effects.Add(e); } public void RemoveEffect (Effect e) { e.RemoveFrom(this); _effects.Remove(e); } } public interface Effect { public void ApplyTo (Character character); public void RemoveFrom (Character character); } Example Effect: Armor Buff for 5 seconds. void someFunction() { // Do Stuff ... Timer armorTimer = new Timer(5 seconds); ArmorBuff armorbuff = new ArmorBuff(); character.AddEffect(armorBuff); armorTimer.Start(); // Do more stuff ... } // Some where else in code public void ArmorTimer_Complete() { character.RemoveEffect(armorBuff); } public class ArmorBuff implements Effect { public void applyTo(Character character) { character.changeArmor(20); } public void removeFrom(Character character) { character.changeArmor(-20); } } Ok, so this example would buff the Characters armor for 5 seconds. Easy to get working. But what about effects that change over the duration of the effect being applied. Two examples come to mind: Damage Over Time: 200 damage every second for 3 seconds. I could mimic this by applying an Effect that lasts for 1 second and has a counter set to 3, then when it is removed it could deal 200 damage, clone itself, decrement the counter of the clone, and apply the clone to the character. If it repeats this until the counter is 0, then you got a damage over time ability. I'm not a huge fan of this approach, but it does describe the behavior exactly. Degenerating Speed Boost: Gain a speed boost that degrades over 3 seconds until you return to your normal speed. This is a bit harder. I can basically do the same thing as above except having timers set to some portion of a second, such that they occur fast enough to give the appearance of degenerating smoothly over time (even though they are really just stepping down incrementally). I feel like you could get away with only 12 steps over a second (maybe less, I would have to test it and see), but this doesn't seem very elegant to me. The only other way to implement this effect would be to change the system so that the Character checks the _effects collection for effects that alter any of the properties any time that they are being used. I could handle this in functions like getCurrentSpeed() and getCurrentArmor(), but you can imagine how much of a hassle it would be to have that kind of overhead every time you want to do a calculation with movement speed (which would be every time you move your character). Is there a better way to deal with these kinds of effects or events?

    Read the article

  • Is using HTML entities (for language-specific characters) in UTF-8 necessary?

    - by Drachenzauberei
    As in the subject-line. Saw the situation the other day on a page which felt weird to me. Except for markup-delimiting characters such as pointy brackets or the ampersand, escaping, say, German umlauts shouldn't be necessary, should it? Checked the encoding server-side, in-page and by way of HTTP headers, looks completely UTF-8 to me. What's your take on this and do you reckon it could adversely affect SEO or SERP placement?the page

    Read the article

< Previous Page | 36 37 38 39 40 41 42 43 44 45 46 47  | Next Page >