Search Results

Search found 4929 results on 198 pages for 'character'.

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

  • What are the commonly confused encodings that may result in identical test data?

    - by makerofthings7
    I'm fixing code that is using ASCIIEncoding in some places and UTF-8 encoding in other functions. Since we aren't using the UTF-8 features, all of our unit tests passed, but I want to create a heightened awareness of encodings that produce similar results and may not be fully tested. I don't want to limit this to just UTF-8 vs ASCII, since I think issue with code that handles ASN.1 fields and other code working with Base64. So, what are the commonly confused encodings that may result in identical test data?

    Read the article

  • How to remove the last character from Stringbuilder

    - by hmloo
    We usually use StringBuilder to append string in loops and make a string of each data separated by a delimiter. but you always end up with an extra delimiter at the end. This code sample shows how to remove the last delimiter from a StringBuilder. using System; using System.Collections.Generic; using System.Text; using System.Linq; class Program { static void Main() { var list =Enumerable.Range(0, 10).ToArray(); StringBuilder sb = new StringBuilder(); foreach(var item in list) { sb.Append(item).Append(","); } sb.Length--;//Just reduce the length of StringBuilder, it's so easy Console.WriteLine(sb); } } //Output : 0,1,2,3,4,5,6,7,8,9 Alternatively,  we can use string.Join for the same results, please refer to blow code sample. using System; using System.Collections.Generic; using System.Text; using System.Linq; class Program { static void Main() { var list = Enumerable.Range(0, 10).Select(n => n.ToString()).ToArray(); string str = string.Join(",", list); Console.WriteLine(str); } }

    Read the article

  • Why do we need to put N before strings in Microsoft SQL Server?

    - by user61752
    I'm learning T-SQL. From the examples I've seen, to insert text in a varchar() cell, I can write just the string to insert, but for nvarchar() cells, every example prefix the strings with the letter N. I tried the following query on a table which has nvarchar() rows, and it works fine, so the prefix N is not required: insert into [TableName] values ('Hello', 'World') Why the strings are prefixed with N in every example I've seen? What are the pros or cons of using this prefix?

    Read the article

  • Free serif font with clearly distinguishable 0 (zero) character

    - by l0b0
    I'm using gLabels to create some small pieces of paper to give away to people - Just two lines of about 15-20 characters each. One of the important parts of the design is that there are no "o" ("oh") characters, but there are "0" ("zero") characters in an all-lowercase URL. Therefore I need a non-monospaced (and very legible in print) font where "0" cannot be confused with "o" even without reference. The closest thing I've found so far is Andale Mono and Inconsolata , but they are both monospace, and as such not very easy to read in print. Alternatively, to find a font myself, is there some way to preview all fonts in the Ubuntu repositories without installing them?

    Read the article

  • Charakter coding / programming

    - by Jery
    lately I tryed a few times to create charakters for some games, but at some certain point (especially when collision detection came in) everything became messy and the interaction between chars, the world and certain items had a lot of bugs. So here is my question, how do you ussualy keep track of actions that your charakter is allowed to do, or more in general do you have some links / advices how to set up a char efficiantly? I´m working on a char right now, who should at least be able to run, jump, pick items up and use different fighting animations. Most ideas I came up with until now use some kind of action.priority / action.duration system to determain whats possible and what not, or a "action-manager" which defines for every action what is possible from that action on but it all doesnt work that well together =\ thx in advance for some input

    Read the article

  • Perl TDS character sets

    - by skiphoppy
    I'm using the FreeTDS driver with DBD::Sybase, connecting to an MS SQL Server. When I query certain values of certain records, I get this error: DBD::Sybase::st fetchrow_arrayref failed: OpenClient message: LAYER = (0) ORIGIN = (0) SEVERITY = (9) NUMBER = (99) Server , database Message String: WARNING! Some character(s) could not be converted into client's character set. Unconverted bytes were changed to question marks ('?'). This seems to happen for records that contain special Windows character-set characters, such as curly quotes, copied and pasted from people's Outlook and Word messages. Unfortunately, I do not have any control of this database; sanitizing the input on the way in is obviously the way to go, but is not available to me. What FreeTDS settings do I need to change to be able to successfully query these records? Additional information: The query works fine from tsql. I only get this error through Perl's DBD::Sybase interface. (Should I test through something else? I don't have the expertise yet to install PHP or Python. I've got jTDS and can use it, but I think that's a completely different implementation, not an interface to FreeTDS.) Adding client charset = UTF-8 to my freetds.conf file results in "Out of memory!" printed to STDERR.

    Read the article

  • How do you make a 2D character in Javascript? [on hold]

    - by user36507
    How do you actually make a character in JS? I know you are supposed to use objects like var character = new Object(); (If the code has errors I apologise.)But how do you make the character move using keys WASD or let the character pick up items. What I want to know is that whether you need a canvas created specially for the character, how to add attributes and use keys to move it all in code. Also it would be great if you could help me on how to import pictures to JS to use it.

    Read the article

  • WPF FlowDocument - Absolute Character Position

    - by Alan Spark
    I have a WPF RichTextBox that I am typing some text into and then parsing the whole of the text to do processing on. During this parse, I have the absolute character positions of the start and end of each word. I would like to use these character positions to apply formatting to certain words. However, I have discovered that the FlowDocument uses TextPointer instances to mark positions in the document. I have found that I can create a TextRange by constructing it with start and end pointers. Once I have the TextRange I can easily apply formatting to the text within it. I have been using GetPositionAtOffset to get a TextPointer for my character offset but suspect that its offset is different from mine because the selected text is in a slightly different position from what I expect. My question is, how can I accurately convert an absolute character position to a TextPointer?

    Read the article

  • Illegal Character when trying to compile java code

    - by muckdog12
    I have a program that allows a user to type java code into a rich text box and then compile it using the java compiler. Whenever I try to compile the code that I have written I get an error that says that I have an illegal character at the beginning of my code that is not there. This is the error the compiler is giving me: C:\Users\Travis Michael>"\Program Files\Java\jdk1.6.0_17\bin\javac" Test.java Test.java:1: illegal character: \187 n++public class Test ^ Test.java:1: illegal character: \191 n++public class Test ^ 2 errors

    Read the article

  • Is it possible to convert a 40-character SHA1 hash to a 20-character SHA1 hash?

    - by ewitch
    My problem is a bit hairy, and I may be asking the wrong questions, so please bear with me... I have a legacy MySQL database which stores the user passwords & salts for a membership system. Both of these values have been hashed using the Ruby framework - roughly like this: hashedsalt = Digest::SHA1.hexdigest("--#{Time.now.to_s}--#{login}--") hashedpassword = Digest::SHA1.hexdigest("#{hashedsalt}:#{password}") So both values are stored as 40-character strings (varchar(40)) in MySQL. Now I need to import all of these users into the ASP.NET membership framework for a new web site, which uses a SQL Server database. It is my understanding that the the way I have ASP.NET membership configured, the user passwords and salts are also stored in the membership database (in table aspnet_Membership) as SHA1 hashes, which are then Base64 encoded (see here for details) and stored as nvarchar(128) data. But from the length of the Base64 encoded strings that are stored (28 characters) it seems that the SHA1 hashes that ASP.NET membership generates are only 20 characters long, rather than 40. From some other reading I have been doing I am thinking this has to do with the number of bits per character/character set/encoding or something related. So is there some way to convert the 40-character SHA1 hashes to 20-character hashes which I can then transfer to the new ASP.NET membership data table? I'm pretty familiar with ASP.NET membership by now but I feel like I'm just missing this one piece. However, it may also be known that SHA1 in Ruby and SHA1 in .NET are incompatible, so I'm fighting a losing battle... Thanks in advance for any insight.

    Read the article

  • Python minidom and UTF-8 encoded XML with hash references

    - by Jakob Simon-Gaarde
    Hi I am experiencing some difficulty in my home project where I need to parse a SOAP request. The SOAP is generated with gSOAP and involves string parameters with special characters like the danish letters "æøå". gSOAP builds SOAP requests with UTF-8 encoding by default, but instead of sending the special chatacters in raw format (ie. bytes C3A6 for the special character "æ") it sends what I think is called character hash references (ie. &#195;&#166;). I don't completely understand why gSOAP does it this way as I can see that it has marked the incomming payload as being UTF-8 encoded anyway (Content-Type: text/xml; charset=utf-8), but this is besides the question (I think). Anyway I guess gSOAP probably is obeying transport rules, or what? When I parse the request from gSOAP in python with xml.dom.minidom.parseString() I get element values as unicode objects which is fine, but the character hash references are not decoded as UTF-8 character codes. It unescapes the character hash references, but does not decode the string afterwards. In the end I have a unicode string object with UTF-8 encoding: So if the string "æble" is contained in the XML, it comes like this in the request: "&#195;&#166;ble" After parsing the XML the unicode string in the DOM Text Node's data member looks like this: u'\xc3\xa6ble' I would expect it to look like this: u'\xe6ble' What am I doing wrong? Should I unescape the SOAP XML before parsing it, or is it somewhere else I should be looking for the solution, maybe gSOAP? Thanks in advance. Best regards Jakob Simon-Gaarde

    Read the article

  • Lua on Android: Comment character

    - by markus_b
    I have a tiny LUA script which is supposed to disable call forwarding: require 'android' android.dialNumber('*21#') The problem is that the script only dials '*21' and omits the '#' character. Playing around It looks to me like the # character is treated as comment character as everything after it is ignored. I've tried singel and double quotes, escaping, \023, but nothing works. How can I dial '*21#' on android with LUA ?

    Read the article

  • Found % character in a SQL query

    - by Jensen
    Hi, I've an SQL database and I would like to do a query who show all the datas containing the sign "%". Normally, to find a character (for example: "z") in a database I use a query like this : mysql_query("SELECT * FROM mytable WHERE tag LIKE '%z%'"); But here, I want to found the % character, but in SQL it's a joker so when I write: mysql_query("SELECT * FROM mytable WHERE tag LIKE '%%%'"); It show me all my datas. So how to found the % character in my SQL datas ? Thanks

    Read the article

  • Regular - Take all numeric characters following a text character

    - by Simon
    Given a string in the format: XXX999999v99 (where X is any alpha character and v is any numeric character and v is a literal v character) how can I get a regex to match the numeric chatacters following the v? So far I've got 'v\d\d' which includes the v but ideally I'd like just the numeric part. As an aside does anyone know of a tool in which you can specify a string to match and have the regex generated? Modifying an existing regex is one thing but I find starting from scratch painful!

    Read the article

  • Find the % character in a LIKE query

    - by Jensen
    Hi, I've an SQL database and I would like to do a query who show all the datas containing the sign "%". Normally, to find a character (for example: "z") in a database I use a query like this : mysql_query("SELECT * FROM mytable WHERE tag LIKE '%z%'"); But here, I want to found the % character, but in SQL it's a joker so when I write: mysql_query("SELECT * FROM mytable WHERE tag LIKE '%%%'"); It show me all my datas. So how to found the % character in my SQL datas ? Thanks

    Read the article

  • delete last character UITextField

    - by Pierre
    Hi ! I have an UITextField and I just would like that every tap on a character, the first character is deleted. So just have one character in my textField every time. Moreover I would to to display every tap in the console log. Have you got an idea? Thanks!

    Read the article

  • Change A Character In A String Using Actionscript

    - by Joshua
    What is the opposite of String.charAt()?? If I Have a string: var Str:String="Hello World"; How do I change the 5th character, for example, from a ' ' to an '_'? I can GET the 5th character like this: var C:String=Str.charAt(5); But how do I SET the 5th character? Thanks in advance.

    Read the article

  • UILabel to render partial character using clip

    - by magic-c0d3r
    I want a UILabel to render a partial character by setting the lineBreakMode to clip. But it is clipping the entire character. Is there a different way to clip a word so that only partial character is displayed? Lets say I have a string like: "Hello Word" and that string is in a myLabel with a width that only fits the 5 characters and part of the "W" I want it still to render part of the "W" and not drop it from the render.

    Read the article

  • .Net regex: what is the word character \w?

    - by tanascius
    Simple question: What is the pattern for the word character \w in c#, .net? My first thought was that it matches [A-Za-z0-9_] and the documentation tells me: Character class Description Pattern Matches \w Matches any \w "I", "D", "A", "1", "3" word character. in "ID A1.3" which is not very helpful. And \w seems to match äöü, too. What else? Is there a better (exact) definition available?

    Read the article

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