Search Results

Search found 35302 results on 1413 pages for 'string literals'.

Page 121/1413 | < Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >

  • Problem comparing French character Î

    - by Bryan
    When comparing "Île" and "Ile", C# does not consider these to be to be the same. string.Equals("Île", "Ile", StringComparison.InvariantCultureIgnoreCase) For all other accented characters I have come across the comparison works fine. Is there another comparison function I should use?

    Read the article

  • How do I format Int32 numbers?

    - by Mendy
    What is the best way to get formatted Int32 numbers? Let say I have this o function: string o(int x); This is the value that o need to return according to x x = 0 => o = 00 x = 1 => o = 01 x = 5 => o = 05 x = 10 => o = 10 x = 31 => o = 31 x = 106 => o = 106

    Read the article

  • Why the output is not same ??

    - by javatechi
    public class swapex{ public static int var1, var2; public void badSwap(int var1, int var2){ int temp = var1; this.var1 = var2; this.var2 = temp; System.out.println("var1 " + var1 + " var2 "+ var2); } public static void main(String args[]) { swapex sw= new swapex(); sw.badSwap(10,20); System.out.println("var1 " + var1 + " var2 "+ var2); } }

    Read the article

  • Linq-To-Sql equivalent for this sql query...

    - by Pandiya Chendur
    I thus far used concatenated Id string like 1,2,3 and updated in my table using this query... if exists( select ClientId from Clients where ClientId IN (SELECT i.items FROM dbo.Splitfn(@Id,',') AS i)) begin update Clients set IsDeleted=1 where ClientId IN (SELECT i.items FROM dbo.Splitfn(@Id,',') AS i) select 'deleted' as message end What is the linq-to-sql equivalent for the above query? Any suggestion...

    Read the article

  • Removing text within parentheses (parentheses within parentheses prob)

    - by TenJack
    Hi, I am trying to remove text that is within parentheses (along with the parentheses themselves) but am having trouble with the scenario where there are parentheses within parentheses. This is the method I am using (in Ruby): sentence.gsub(/\(.*?\)/, "") and that works fine until I have a sentence such as: "This is (a test (string))" Then the above chokes. Anyone have any idea how to do this? I am completely stumped.

    Read the article

  • Regular Expression for CSV with numbers

    - by Bernie Perez
    I'm looking for some regular expression to help parse my CSV file. The file has lines of number,number number,number Comment I want to skip number,number number,number Ex: 319,5446 564425,87 Text to skip 27,765564 I read each line into a string and I wanted to use some regular express to make sure the line matches the pattern of (number,number). If not then don't use the line.

    Read the article

  • How to concatenate 2 LPOLESTR

    - by BHOdevelopper
    Hi, i want to concatenate 2 strings in c++, i can't use char*. I tried the following but doesn't work: #define url L"http://domain.com" wstring s1 = url; wstring s2 = L"/page.html"; wstring s = s1 + s2; LPOLESTR o = OLESTR(s); I need a string with s1 and s2 concatenated. Any info or website that explain more about this ? Thanks.

    Read the article

  • Registry Problem

    - by Dominik
    I made a launcher for my game server. (World of Warcraft) I want to get the installpath of the game, browsed by the user. I'm using this code to browse, and get the installpath, then set some other strings from the installpath string, then just strore in my registry key. using System; using System.Drawing; using System.Reflection; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; using Microsoft.Win32; using System.IO; using System.Net.NetworkInformation; using System.Diagnostics; using System.Runtime; using System.Runtime.InteropServices; using System.Security; using System.Security.Cryptography; using System.Text; using System.Net; using System.Linq; using System.Net.Sockets; using System.Collections.Generic; using System.Threading; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } string InstallPath, WoWExe, PatchPath; private void Form1_Load(object sender, EventArgs e) { RegistryKey LocalMachineKey_Existence; MessageBox.Show("Browse your install location.", "Select Wow.exe"); OpenFileDialog BrowseInstallPath = new OpenFileDialog(); BrowseInstallPath.Filter = "wow.exe|*.exe"; if (BrowseInstallPath.ShowDialog() == DialogResult.OK) { InstallPath = System.IO.Path.GetDirectoryName(BrowseInstallPath.FileName); WoWExe = InstallPath + "\\wow.exe"; PatchPath = InstallPath + "\\Data\\"; LocalMachineKey_Existence = Registry.LocalMachine.CreateSubKey(@"SOFTWARE\ExistenceWoW"); LocalMachineKey_Existence.SetValue("InstallPathLocation", InstallPath); LocalMachineKey_Existence.SetValue("PatchPathLocation", PatchPath); LocalMachineKey_Existence.SetValue("WoWExeLocation", WoWExe); } } } } The problem is: On some computer, it doesnt stores like it should be. For example, your wow.exe is in C:\ASD\wow.exe, your select it with the browse windows, then the program should store it in the Existence registry key as C:\ASD\Data\ but it stores like this: C:\ASDData , so it forgots a backslash :S Look at this picture: http://img21.imageshack.us/img21/2829/regedita.jpg My program works cool on my PC, and on my friends pc, but on some pc this "bug" comes out :S I have windows 7, with .NEt 3.5 Please help me.

    Read the article

  • Whats wrong with this line

    - by Andeeh
    I am trying to remove all the " from a string called s1, I have this line s1=replace (s1, """, "") But i get a complile error saying it is expecting a list seperator or ) How can i fix it? Thanks in advance

    Read the article

  • Saving an XML that has invalid characters

    - by BDotA
    there are code snippets that strip the invalid characters inside a string before we save it as an XML ... but I have one more problem: Let's say my user wants to have a column name like "[MyColumnOne] ...so now I do not want to strip these "[","] well because these are the ones that user has defined and wants to see them so if I use some codes that are stripping the invalid characters they are also removing "[" and "[" but in this case I still need them to be saved... what can I do?

    Read the article

  • Change array that might contain None to an array that contains "" in python

    - by vy32
    I have a python function that gets an array called row. Typically row contains things like: ["Hello","goodbye","green"] And I print it with: print "\t".join(row) Unfortunately, sometimes it contains: ["Hello",None,"green"] Which generates this error: TypeError: sequence item 2: expected string or Unicode, NoneType found Is there an easy way to replace any None elements with ""?

    Read the article

  • Why is the value if this string executing in a bash script?

    - by Ross
    Hello Why is this script executing the string in the if statement: #!/bin/bash FILES="*" STRING='' for f in $FILES do if ["$STRING" = ""] then echo first STRING='hello' else STRING="$STRING hello" fi done echo $STRING when run it with sh script.sh outputs: first lesscd.sh: line 7: [hello: command not found lesscd.sh: line 7: [hello hello: command not found lesscd.sh: line 7: [hello hello hello: command not found lesscd.sh: line 7: [hello hello hello hello: command not found lesscd.sh: line 7: [hello hello hello hello hello: command not found hello hello hello hello hello hello p.s. first attempt at a shell script thanks

    Read the article

  • Regular expression to retrieve everything before first slash

    - by alex
    I need a regular expression to basically get the first part of a string, before the first slash (). For example in the following: C:\MyFolder\MyFile.zip The part I need is "C:" Another example: somebucketname\MyFolder\MyFile.zip I would need "somebucketname" I also need a regular expression to retrieve the "right hand" part of it, so everything after the first slash (excluding the slash.) For example somebucketname\MyFolder\MyFile.zip would return MyFolder\MyFile.zip.

    Read the article

  • Need Opinions: Should an ASP.NET Application allow administrators to change MSSQL connection?

    - by Brent Pabst
    As the title suggests: What is your opinion on allowing administrators to update the SQL Connection string dynamically from the application versus just showing them the connection details in the application? Because the database connection is so important and on a heavily used system the abrupt change to the connection seems like it could cause problems. However I would think displaying the server and catalog and whether the connection is using SSPI or SQL Auth could be helpful for administrators who don't like playing with .NET config files. Thoughts?

    Read the article

  • Determine precision and scale of particular number in Python

    - by jrdioko
    I have a variable in Python containing a floating point number (e.g. num = 24654.123), and I'd like to determine the number's precision and scale values (in the Oracle sense), so 123.45678 should give me (8,5), 12.76 should give me (4,2), etc. I was first thinking about using the string representation (via str or repr), but those fail for large numbers: >>> num = 1234567890.0987654321 >>> str(num) = 1234567890.1 >>> repr(num) = 1234567890.0987654

    Read the article

  • Sort months ( with strings ) algorithm

    - by Oscar Reyes
    I have this months array: ["January", "March", "December" , "October" ] And I want to have it sorted like this: ["January", "March", "October", "December" ] I'm currently thinking in a "if/else" horrible cascade but I wonder if there is some other way to do this. The bad part is that I need to do this only with "string" ( that is, without using Date object or anything like that ) What would be a good approach?

    Read the article

  • trusted SQL Server connection

    - by dan_vitch
    When I attempt to make a connection from my console app to my sqlExpress. I get the following error: The user is not associated with a trusted SQL Server connection. I have: Switched users Switched passwords Switched Servers Switched Databases I always get the same error. I am using VS 2010 and Sql Server 2005 Here is my current connection string SqlDatabase sqlDatabase = new SqlDatabase(@"Server=localmachineName\SQLEXPRESS;database=database1;user id=username password=mypassword;");

    Read the article

< Previous Page | 117 118 119 120 121 122 123 124 125 126 127 128  | Next Page >