Search Results

Search found 5581 results on 224 pages for 'alignment character'.

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

  • Looking for a non-cryptographic hash function that returns a single character

    - by makerofthings7
    Suppose I have a dictionary of ASCII words stored in uppercase. I also want to save those words into separate files so that the total word count of each file is approximately the same. By simply looking at the word I need to know which file it should be in (if it's there at all). Duplicate words should go into the same file and overwrite the last one. My first attempt at solving this problem is to use .NET's object.GetHashCode() function and .Trim() to get one of the "random" characters that pop up. I asked a similar question here If I only use one character of object.GetHashCode() I would get a hash code character of A..Z or 0..9. However saving the result of GetHashCode to disk is a no-no so I need a substitute. Question: What algorithm (or subset of an algorithm) is appropriate for pigeonholing strings into a single character or range of characters (Like hex 0..F offers 16 chars)? Real world usage: I'll use this answer to modify the Partition key used in Azure Table storage as described here

    Read the article

  • Twitter like character counter - jQuery version

    - by bipinjoshi
    My recent article titled "Displaying a Character Counter for Multiline Textboxes" shows you how to create a character counter like Twitter for multiline textboxes. The articles does so using ASP.NET AJAX client behavior. Here is a jQuery version of the code that does similar job. Note, however, that unlike ASP.NET AJAX client behavior as illustrated in the article the following code takes a "function" based approach to quickly implement similar functionality.http://www.bipinjoshi.net/articles/84e691b2-0306-4911-87bb-875806ba981b.aspx

    Read the article

  • What is a good resource for HTML character codes -> glyph and...

    - by Ben
    Hi, I've already found a good site to convert HTML character codes to their respective glyphs: http://www.public.asu.edu/~rjansen/glyph_encoding.html However, I need a bit more information. Does anyone know of a site like the one above that also provides information on what type of character code it is? Meaning, is it a special character? Is the glyph visible? Etc... So far I have found some tables with this information, but they aren't as complete as the resource above. I would really like to get my hands on a complete table. Thanks, -Ben

    Read the article

  • How many bytes does Oracle use when storing a single character?

    - by Mr-sk
    I tried to look here: http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/datatype.htm#i3253 And I understand that I have to provide string length for the column, I'm just not able to find out how many bytes oracle uses when storing a character. My limit is 500 characters, so if its 1 byte / character, I can create the column with 500, if its 2 byte / character then 1000, etc. Anyone have a link to the documentation or know for certain? In case it matters, the SQL is being called from PHP, so these are PHP strings I'm inserting into the database. Thanks.

    Read the article

  • x86 opcode alignment references and guidelines

    - by mrjoltcola
    I'm generating some opcodes dynamically in a JIT compiler and I'm looking for guidelines for opcode alignment. 1) I've read comments that briefly "recommend" alignment by adding nops after calls 2) I've also read about using nop for optimizing sequences for parallelism. 3) I've read that alignment of ops is good for "cache" performance Usually these comments don't give any supporting references. Its one thing to read a blog or a comment that says, "its a good idea to do such and such", but its another to actually write a compiler that implements specific op sequences and realize most material online, especially blogs, are not useful for practical application. So I'm a believer in finding things out myself (disassembly, etc. to see what real world apps do). This is one case where I need some outside info. I notice compilers will usually start an odd byte instruction immediately after whatever previous instruction sequence there was. So the compiler is not taking any special care in most cases. I see "nop" here or there, but usually it seems nop is used sparingly, if at all. How critical is opcode alignment? Can you provide references for cases that I can actually use for implementation? Thanks.

    Read the article

  • '??' Not a valid unicode character, but in the unicode character set?

    - by Steve Cotner
    Short story: I can't get an entity like '𠂉' to store in a MySQL database, either by using a text field in a Ruby on Rails app (with default UTF-8 encoding) or by inputting it directly with a MySQL GUI app. As far as I can tell, all Chinese characters and radicals can be entered into the database without problem, but not these rarely typed 'character components.' The character mentioned above is unicode U+20089 and html entity &#131209; I can get it to display on the page by entering <html>&#131209;</html> and removing html escaping, but I would like to store it simply as the unicode character and keep the html escaping in place. There are many other Chinese 'components' (parts of full characters, generally consisting of 2 or 3 strokes) that cause the same problem. According to this page, the character mentioned is in the UTF-8 charset: http://www.fileformat.info/info/unicode/char/20089/charset_support.htm But on the neighboring '...20089/index.htm' page, there's an alert saying it's not a valid unicode character. For reference, that entity can be found in Mac OS X by searching through the character palette (international menu, "Show Character Palette"), searching by radical, and looking under the '?' radical. Apologies if this is too open-ended... can a character like this be stored in a UTF-8-based database? How is this character both supported and unsupported, both present in the character set and not valid?

    Read the article

  • Find non-ascii characters from a UTF-8 string

    - by user10607
    I need to find the non-ASCII characters from a UTF-8 string. my understanding: UTF-8 is a superset of character encoding in which 0-127 are ascii characters. So if in a UTF-8 string , a characters value is Not between 0-127, then it is not a ascii character , right? Please correct me if i'm wrong here. On the above understanding i have written following code in C : Note: I'm using the Ubuntu gcc compiler to run C code utf-string is xvab c long i; char arr[] = "xvab c"; printf("length : %lu \n", sizeof(arr)); for(i=0; i<sizeof(arr); i++){ char ch = arr[i]; if (isascii(ch)) printf("Ascii character %c\n", ch); else printf("Not ascii character %c\n", ch); } Which prints the output like: length : 9 Ascii character x Not ascii character Not ascii character ? Not ascii character ? Ascii character a Ascii character b Ascii character Ascii character c Ascii character To naked eye length of xvab c seems to be 6, but in code it is coming as 9 ? Correct answer for the xvab c is 1 ...i.e it has only 1 non-ascii character , but in above output it is coming as 3 (times Not ascii character). How can i find the non-ascii character from UTF-8 string, correctly. Please guide on the subject.

    Read the article

  • How to remove Character Style in Word 2003

    - by joe
    I am copying text into a Word document that has its styles protected. Some of the text has a Character style applied to it that I would like to remove. I can change the style and it looks okay visually, but when you click inside the text itself you can see in the style menu that the Character style is still applied. I try to change the style using the style drop down but the Character style won't go away even if I change it to the Paragraph style. Does anyone know what I am talking about and/or have any techniques for removing Character styles? I am looking forward to your responses. Let me know if I need to clarify. Thanks! UPDATE: My issue is that the Paragraph style is changing correctly, but the Character style remains applied even though the text is displayed as if the style is not applied. See http://office.microsoft.com/en-us/word/HA011876141033.aspx if you are not sure what I meen by Character styles. There are four types of styles — paragraph, character, list, and table (list and table styles are new as of Word 2002). However, the majority of styles you'll use are paragraph styles.

    Read the article

  • Pygame Tile Based Character movement speed

    - by Ryan
    Thanks for taking the time to read this. Right now I'm making a really basic tile based game. The map is a large amount of 16x16 tiles, and the character image is 16x16 as well. My character has its own class that is an extension of the sprite class, and the x and y position is saved in terms of the tile position. To note I am fairly new to pygame. My question is, I am planning to have character movement restricted to one tile at a time, and I'm not sure how to make it so that, even if the player hits the directional key dozens of time quickly, (WASD or arrow keys) it will only move from tile to tile at a certain speed. How could I implement this generally with pygame? (Similar to game movement of like Pokemon or NexusTk). Edit: I should probably note that I want it so that the player can only end a movement in a tile. He couldn't stop moving halfway inbetween a tile for example. Thanks for your time! Ryan

    Read the article

  • Character creation using spritesheets

    - by Patrick Developer
    I am currently creating a 2D fighting game and have implemented a system where upon starting a new game, the player is presented with the option to create a custom character. I have a set of string arrays set with values that correspond to hair, headgear, chest, lower body and shoes. When done selecting a variety of items from the lists, a code is generated based off the index of each item (i.e 01123), which is then used to assign the correct Spritesheet to the player character. This has already presented a lot of work as I have had to create quite a few spreadsheets based of possible combinations, but I am now looking at a massive amount of work to implement each variation. I have started to look into setting layers for each item to reduce workload, but I am also looking at having different stances for the character - Depending on the currently equipped weapon - so this may present a lot of work either way. My question is, do I have any alternatives or am I stuck creating masses of Spritesheets to cover all combinations? As a side note, how much impact will assigning layered items have on overall performance?

    Read the article

  • PhysX Capsule Character Controller floating above ground

    - by Jannie
    I am using PhysX Version 3.0.2 in the simulation package I'm working on, and I've encountered some bizarre behavior with the capsule character controller. When I set the controller's height and radius to the appropriate values (r = 0.25, h = 1.86)it behaves correctly (moving along the ground, colliding with other objects, and so on) except that the capsule itself is floating above the ground. The actor will then bump his head when trying to get through a door, since the capsule is the correct height but also floating above the ground. This image should illustrate what I'm going on about: One can clearly see that the rest of the scene has their collision bodies wrapped correctly, it's just the capsule that's going wrong! The stop-gap I've implemented is creating a smaller capsule and giving it an offset, but I need to implement ray-picking for the controller next so the capsule has to surround the character model properly. Here's my character creation code (with height = 1.86f and radius = 0.25f): NxController* D3DPhysXManager::CreateCharacterController( std::string l_stdsControllerName, float l_fHeight, float l_fRadius, D3DXVECTOR3 l_v3Position ) { NxCapsuleControllerDesc l_CapsuleControllerDescription; l_CapsuleControllerDescription.height = l_fHeight; l_CapsuleControllerDescription.radius = l_fRadius; l_CapsuleControllerDescription.position.set( l_v3Position.x, l_v3Position.y, l_v3Position.z ); l_CapsuleControllerDescription.callback = &this->m_ControllerHitReport; NxController* l_pController = this->m_pControllerManager->createController( this->m_pScene, l_CapsuleControllerDescription ); this->m_pControllerMap.insert( l_ControllerValuePair( l_stdsControllerName, l_pController ) ); return l_pController; } Any help at all would be appreciated, I just can't figure this one out! P.S. I've found a couple of (rather old) threads describing the same issue, but it seems they couldn't find a solution either. Here are the links: http://forum-archive.developer.nvidia.com/index.php?showtopic=6409 http://forum-archive.developer.nvidia.com/index.php?showtopic=3272 http://www.ogre3d.org/addonforums/viewtopic.php?f=8&t=23003

    Read the article

  • Mixed alignment with Java Swing's GroupLayout

    - by zigdon
    I'm trying to build a GUI window in my application. What I'm trying to do is have a window, with a few buttons at the top, and a large text area. Something like this: +--------------------------------------------------+ | [button1] [button2] [button3] | | +----------------------------------------------+ | | | text area | | | | | | | | | | | | | | | +----------------------------------------------+ | +--------------------------------------------------+ I'm almost there, using GroupLayout: layout.setHorizontalGroup( layout.createParallelGroup() .addGroup(layout.createSequentialGroup() .addComponent(button1) .addComponent(button2)) .addComponent(closeWindow)) .addComponent(textarea1) ); layout.setVerticalGroup( layout.createSequentialGroup() .addGroup(layout.createParallelGroup() .addComponent(button1) .addComponent(button2) .addComponent(button3)) .addComponent(textarea) ); The problem is that this ends up with button3 aligned to the left, with the other two. I can't seem to figure out how I can specify the alignment on just that one button. I can do GroupLayout.Alignment.TRAILING on the entire button bar, but that hits all 3 buttons, which is also not quite right. So what's the correct approach? Since the alignment only applies for Parallel Groups, I don't think having a HorizontalGroup with two Sequential Groups in it will help? What am I missing?

    Read the article

  • Can I input Chinese character in Unity's dash?

    - by Meteor
    I use Ubuntu in Chinese language. And a lot of programme on my Ubuntu have chinese name. I can open it in Terminal. But I can not search them in Unity. Because in Unity's dash, I can only input English, can not use input method. So can not input Chinese character. I use Chinese as my mother language. And I use Chinese input method a lot. Can someone help me to let me input Chinese character in Unity's dash? I really like Ubuntu and want to use it more frequently. Thanks. https://help.ubuntu.com/11.04/ubuntu-help/figures/unity-dash-sample.png

    Read the article

  • Cannot escape character '@' in fstab file

    - by ubuntico
    I want to attach remote FTP directory as a local directory in my system. I will use curlftpfs line in the fstab file , but to login I have to pass my user name and password. The user name has a special character (@) and it needs to be escaped via octal ascii code. The octal ascii for '@' is 100. But when I try to enter the following into the FSTAB file, curlftpfs#myself\100myself.com:ftpPassword@ftp://ftp.mysite.com /mnt/somedir I get an error saying Error connecting to ftp: Couldn't resolve host 'myself.com:ftpPassword@ftp://ftp.mysite.com' The fstab does not recognize escaped symbol @ (\100) and thinks that the FTP site should start immediately after the @ symbol (just like I haven't escaped it). Can someone help? Why I cannot escape @, when it can be done for space character, for example?

    Read the article

  • What is really happening when we change encoding in a string?

    - by Jim Thio
    http://php.net/manual/en/function.mb-convert-encoding.php Say I do: $encoded = mb_convert_encoding ($original); That looks like simple enough. WHat I am imagining is the following $original has a pointer to the way the string is actually encoded. Something like char * kind of thing. And then there are things like what the character actually encoded. It's probably somewhere along UTF-64 kind of thing where each glyph is indeed a character. Now when we do $encoded = mb_convert_encoding ($original); several thing can happen: the original internal representation doesn't change however it is REINTERPRETED so that the code that show up differs the original string that it represent doesn't change however the ENCODING change. Which one is right?

    Read the article

  • projected textures not appear on the "back" of the mesh as well?

    - by user975135
    I want to create blood wounds on my character's bodies by using projected textures. I've watched some commentaries on games like Left 4 Dead and they say they use projected textures for the blood. But the way projected textures work is that if you project a texture on a rigged character, say his chest, it will also appear on his back. So what's the trick? How to get projected textures appear only on one "side" of the mesh? I use the Panda3D game engine, if that will help.

    Read the article

  • Ubuntu Server SHH backspace Bad Character

    - by Edwin Lunando
    so while while I'm using SSH to connect my server the backspace shows me bad character. The backspace is the one with question mark. The backspace itself works normally, but in the screen, it wasn't very neat to look stacking question mark. This is the example. The square-bracketed question mark means backspace. cat[?] output: ca: not found cat[?][?] output: c:not found cat[?][?][?] output: nothing, because it simple delete the 3 character. Please help. Thank you.

    Read the article

  • What issues lead people to use Japanese-specific encodings rather than Unicode?

    - by Nicolas Raoul
    At work I come across a lot of Japanese text files in Shift-JIS and other encodings. It causes many mojibake (unreadable character) problems for all computer users. Unicode was intended to solve this sort of problem by defining a single character set for all languages, and the UTF-8 serialization is recommended for use on the Internet. So why doesn't everybody switch from Japanese-specific encodings to UTF-8? What issues with or disadvantages of UTF-8 are holding people back? EDIT: The W3C lists some known problems with Unicode, could this be a reason too?

    Read the article

  • Optical Character Recognition software recommendations?

    - by Tim
    I have seen some ebooks/papers that were apparently scanned from their paper versions but the text in the ebooks/papers can amazingly be copied out. I suppose the directly-scanned versions must have been processed by some Optical Character Recognition software. So I would like to know what are the recommended Optical Character Recognition softwares? Especially those that are either for Ubuntu or free? If those for Windows are far more superior, please let me know as well. I am particularly interested in those OCRs that can accept a scanned pdf file as input and still produce as output another pdf file that looks the same as the input one but with its text copyable. Thanks and regards! Please limit one software per answer

    Read the article

  • Character equipment combinations

    - by JimFing
    I'm developing a 2d isometric game (typical Tolkien RPG) and wondering how to handle character/equipment combinations. So for example, the player wears leather boots with chain-mail and a wooden shield and a sword - but then picks up plate-armour instead of chain-mail. I'm using Blender3D to create objects, environments and characters in 3D, then a script runs to render all 3D meshes into 2D orthographic tile maps. So I can use this script to create all the combinations of character equipment for me, but there would be an explosion in terms of the combinations required.

    Read the article

  • Optical Character Recognition software recommendations?

    - by Tim
    I have seen some ebooks/papers that were apparently scanned from their paper versions but the text in the ebooks/papers can amazingly be copied out. I suppose the directly-scanned versions must have been processed by some Optical Character Recognition software. So I would like to know what are the recommended Optical Character Recognition softwares? Especially those that are either for Ubuntu or free? If those for Windows are far more superior, please let me know as well. I am particularly interested in those OCRs that can accept a scanned pdf file as input and still produce as output another pdf file that looks the same as the input one but with its text copyable. Thanks and regards! Please limit one software per answer

    Read the article

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