Search Results

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

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

  • Apache installation in folder with chinese characters in name

    - by Zsolti
    I would like to install an Apache server into a folder like c:\anything\???\anything2\ under windows. When I try to start the service it sais that: httpd: Syntax error on line xx of C:/anything/\xe6\x80\x98\xe6\x80\x99\e6\80\9a/anything2/apache/conf/httpd.conf: ServerRoot must be a valid directory Does anyone have a solution?

    Read the article

  • Escaping and unescaping a string with single and double quotes in Javascript

    - by Reina
    I have a search box that a user can search for any string including single AND double quotes, once they have searched, the backend is passing the keyword back to me so I can put it back in the box. I don't know what the string is so I can't escape quotes myself, below is an example: var keyword = "hello"; $("#selectionkeywords").val(); The issue I am having is that if the user enters "hello" the keyword becomes ""hello"" and I get this error: missing ) after argument list [Break On This Error] jQuery("#selectionkeywords").val(""hello""); The user could also enter single quotes so that rules it out as well. I tried using escape unescape but I still have the same issue e.g. escape(""hello"") I could get the value in an unescaped format e.g. "hello" but I don't know what to do with it, escape doesn't work on it I end up with this %26%23034%3Bhello%26%23034%3B So I'm pretty much stuck at the moment as I can't do anything to the string, any ideas?

    Read the article

  • Replacing characters in a non well-formed XML body

    - by ryanprayogo
    In a (Java) code that I'm working on, I sometimes deal with a non well-formed XML (represented as a Java String), such as: <root> <foo> bar & baz < quux </foo> </root> Since this XML will eventually need to be unmarshalled (using JAXB), obviously this XML as is will throw exception upon unmarshalling. What's the best way to replace the & and the < to its character entities? For &, it's as easy as: xml.replaceAll("&", "&amp;") However, for the < symbol, it's a bit tricky since obviously I don't want to replace the < that's used for the XML tag opening 'bracket'. Other than scanning the string and manually replacing < in the XML body with &lt;, what other option can you suggest?

    Read the article

  • Visual Studio 2005 - strange characters rendered for ANSI text

    - by Apogee
    Hi all, Has anyone seen this odd text rendering issue in VS2005 before? The first line of using statements actually says "using System;". If I copy the line as it is displayed and paste into notepad, the text appears correctly, so clearly the character codes are correct. In addition, the solution compiles and runs correctly. I was thinking it might be due to ClearCase using a different character encoding as all the solutions we're using were freshly checked-out yesterday on to a new build machine, but this is only happening in 2 of our ~30 solutions. Incidentally the same .cs files when opened in VS2008 render correctly on this machine, could this be a corruption in VS2005?

    Read the article

  • using special characters in functions: Python

    - by satyajit
    I am writing an xmlrpc client which uses a server written in ruby. One of the functions is framework.busy?(). Let me show the ruby version: server.call( "framework.busy?" ) So lets assume I create an instance of the ServerProxy class say server. So while using python to call the function busy? I need to use: server.framework.busy?() This leads to an error: SyntaxError: invalid syntax How can I call this function? Or am I reading the ruby code wrong and implementing it wrongly.

    Read the article

  • parse this directory path without losing slash

    - by PPTim
    hi, I have a wxPython application. I am taking in a directory path from a textbox using GetValue(). I notice that while trying to parse in the directory path "C:\Documents and Settings\UserName\Desktop\InputFile.xls", python sees the string as 'C:\\Documents and Settings\UserName\\Desktop\\InputFile.xls' (missing a slash between "Settings" and "UserName). Why is it that only that slash is not correctly escaped? Once the string has been changed to 'C:\Documents and Settings\UserName\Desktop\InputFile.xls', is there a type conversion or function that can does this properly? Thanks.

    Read the article

  • In silverlight how do you scrub a string

    - by jvcoach23
    I have a string that looks like this " Into" and I can't figure out what the " " value is just before the Into. It's not a space, it's not an enter. At least i don't think so. I've tried doing a replace to get rid of it.. So now i'm just trying to figure out what that character value is. Convert.int32 doesn't get it done... What can i use to get rid of that character... I guess i could write a function that would loop through the alphabet and do it that way.. but figured there was a better way. thanks shannon

    Read the article

  • C++ exam question on string class implementation

    - by Carlucho
    I just took an exam where i was asked the following: Write the function body of each of the methods GenStrLen, InsertChar and StrReverse for the given code bellow. You must take into consideration the following; How strings are constructed in C++ The string must not overflow Insertion of character increases its length by 1 An empty string is indicated by StrLen = 0 class Strings { private: char str[80]; int StrLen; public: // Constructor Strings() { StrLen=0; }; // A function for returning the length of the string 'str' int GetStrLen(void) { }; // A function to inser a character 'ch' at the end of the string 'str' void InsertChar(char ch) { }; // A function to reverse the content of the string 'str' void StrReverse(void) { }; }; The answer I gave was something like this (see bellow). My one of problem is that used many extra variables and that makes me believe am not doing it the best possible way, and the other thing is that is not working.... class Strings { private: char str[80]; int StrLen; int index; // *** Had to add this *** public: Strings(){ StrLen=0; } int GetStrLen(void){ for (int i=0 ; str[i]!='\0' ; i++) index++; return index; // *** Here am getting a weird value, something like 1829584505306 *** } void InsertChar(char ch){ str[index] = ch; // *** Not sure if this is correct cuz I was not given int index *** } void StrRevrse(void){ GetStrLen(); char revStr[index+1]; for (int i=0 ; str[i]!='\0' ; i++){ for (int r=index ; r>0 ; r--) revStr[r] = str[i]; } } }; I would appreciate if anyone could explain me toughly what is the best way to have answered the question and why. Also how come my professor closes each class function like " }; " i thought that was only used for ending classes and constructors only. Thanks a lot for your help.

    Read the article

  • [ASP.NET] How can I HTML-encode a string and use human-readable encoded tags (ex: &ecirc; instead of

    - by Beerdude26
    Greetings, I'm looking for a way to encode a string into HTML that uses human-readable tags such as &ecirc; (=ê). At the moment, I am using the HttpUtility.HtmlEncode() function, but it appears to return numbered tags instead of human-readable ones. For example: Dim str as string = HttpUtility;HtmlEncode("vente - en-tête") 'Expected: vente - en-t&ecirc;te 'Actually received: vente - en-t&#234;te Is there a setting or function in ASP.Net to encode a string into HTML resembling the first comment? EDIT: I am looking for this kind of functionality because the text is saved HTML-encoded in the database. The text comes from a bunch of MS Word documents that have been converted to HTML.

    Read the article

  • Glib::ustring and Japanese characters

    - by user294787
    Glib::ustring is supposed to work well with UTF8 but I have a problem when working with Japanese strings. If you compare those two strings, "???" and "???", using == operator or compare method, it will answer that those two strings are equals. I don't understand why. How Glib::ustring works ? The only way I found to get false to the comparison is to compare strings of different sizes. For example "?????" and "????". Very strange...

    Read the article

  • Javascript: parseInt() with trailing characters

    - by chris_l
    parseInt("7em", 10); returns 7 in all browsers I tested [*]. But can I rely on this? The reason I ask is, that I want to perform some calculations based on em, like /* elem1.style.top uses em units */ elem2.style.top = parseInt(elem1.style.top, 10) + 1 + "em"; I could do this with regular expressions, but parseInt is easier to use, and probably a bit faster. Or is there another solution (maybe using jQuery)? [*] Tested so far on: IE 6, IE 8, Safari 4, Firefox 3.6, Opera 10.5

    Read the article

  • Create a string with n characters.

    - by C. Ross
    Is there a way in java to create a string with a specified number of a specified character? In my case I would need to create a string with 10 spaces. My current code is: StringBuffer outputBuffer = new StringBuffer(length); for (int i = 0; i < length; i++){ outputBuffer.append(" "); } return outputBuffer.toString(); Is there a better way to accomplish the same thing. In particular I'd like something that is fast (in terms of execution).

    Read the article

  • Convert Date with characters to mm/dd/yyyy

    - by peter
    I have a columns called Submit_Date in table Tickets and the datatype of it is Varchar(200) and I am trying to convert it to MM/DD/YYYY format and when i do that i get the following error: Msg 242, Level 16, State 3, Line 1 The conversion of a varchar data type to a datetime data type resulted in an out-of-range value. Sample Data of the table is: Submit_Date 27-09-2013 16:15:00 CST 30-09-2013 16:30:24 CST 27-09-2013 10:03:46 CST 30-09-2013 14:35:55 CST 25-09-2013 16:28:48 CST 24-09-2013 09:29:45 CST I tried doing the following: Select Convert(datetime,Submit_date,101) from dbo.Tickets Let me know where I am doing wrong.

    Read the article

  • How to Limit Text Characters in PHP?

    - by hateMe
    I was wondering how can I limit a users input like HTML maxlength attribute but with PHP, example would be nice? Is MySQL varchar(255) one way to limit a users character input? What are the cons of just counting on MySQL to do this?

    Read the article

  • Do word boundaries work on symbol characters?

    - by Shawn31313
    I'm trying to implement word boundaries in my emoticons feature for a chat. But for some reason I can't seem to get the word boundaries to work. I am new to regex. So when I do: var reg = /\b\Hi\b/gi; var str = 'HiHiHi Hi HiHiHi Hi'; alert(str.replace(reg, '')); This happens: Jsfiddle It actually works fine, and does remove those 2 Hi's that are standing alone. But when I change the reg to an escaped smiley and then change the string: var reg = /\b\:\)\b/gi; var str = 'HiHi:) :) HiHiHi :)'; alert(str.replace(reg, '')); This happens: Jsfiddle It just doesn't work. The string stays the same. Is it that word boundaries can't be used on symbols? If so, how does Facebook do it on their chats?

    Read the article

  • RichTextBox specific colors per few characters / lines C#

    - by Xavier
    I have richTextBox1, and here is the contents: line one from my textbox is this, and i want this to be normal, arial, 8 point non-bold font line two, i want everything after the | to be bolded... | this is bold line three: everything in brackets i (want) to be the color (Red) line 4 is "this line is going to be /slanted/ or with italics and so on, basically if I know how to do what I mentioned above, I'll know everything I need to know to complete my project. Code examples would be very very much appreciated! :)

    Read the article

  • Special character in "entrée" cannot be displayed correctly if defined in a separate javascript file

    - by Jazure
    Example: The following string is defined in a json.js file. var test = "One complimentary entrée with the purchase of an entrée."; It is included in an index.html file by <script type="text/JavaScript" src="./json.js"></script> When the string is displayed in UI, it shows up as "One complimentary entr?e with the purchase of an entr?e." But if string is defined directly in the index.html, then it is not a problem. Can anyone suggest a solution on how to keep the text in the separate .js file?

    Read the article

  • How to encode and decode chinese characters?

    - by melaos
    I've try googling around but wasn't able to find what charset that this text below belongs to: 具有éœé›»ç”¢ç”Ÿè£ç½®ä¹‹å½±åƒè¼¸å…¥è£ç½® But putting <meta http-equiv="Content-Type" Content="text/html; charset=utf-8"> and keeping that string into a html file i was able to view the chinese character wording properly. which is: ??????????????? So my question is: what tools can i use to detect the character set of those text? And how do i convert/encode/decode them properly in C#? Updates: Added some test code [TestMethod] public void TestMethod1() { string encodedText = "具有éœé›»ç”¢ç”Ÿè£ç½®ä¹‹å½±åƒè¼¸å…¥è£ç½®"; Encoding encoder = new UTF8Encoding(); byte[] postBytes = encoder.GetBytes(encodedText); postBytes = UTF8Encoding.Convert(Encoding.UTF8, Encoding.Unicode, postBytes); string decodedText = Encoding.Unicode.GetString(postBytes); Assert.AreNotEqual(encodedText, decodedText); } thanks

    Read the article

  • Regular Expression to Match All Characters after another Regex Match

    - by Anthony Wood
    I know this may sound a little confusing, so I am open to suggestions on renaming the title. Basically I have string such as C:...\Downloads\Folder\SubFolder\SubSubFolder. and I want to return the SubFolder and SubSubFolder only. So far, my Regex looks like (?=\\Downloads\\.*?\\).* which matches Downloads\Folder\SubFolder\SubSubFolder. Does anybody have any Ideas what I am missing???? All the solutions below seem to work (except if you didn't know "Folder"). Potentially a bug with the tool I was using to test the regular expressions.

    Read the article

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