Open links in new tab
  1. Why am I seeing "TypeError: string indices must be integers"?

    A common mistake is when one tries to index a string using a value from a user input. Because input() returns a string, it must be converted into an integer before being used to index a string.

  2. Converting string to byte array in C# - Stack Overflow

    Apr 18, 2013 · string someString = Encoding.ASCII.GetString(bytes); If you can find in the code you inherited, the encoding used to create the byte array then you should be set.

  3. Find all files containing a specific text (string) on Linux

    Jun 6, 2013 · How do I find all files containing a specific string of text within their file contents? The following doesn't work. It seems to display every single file in the system. find / -type f -exec grep -H '

  4. How to convert a string to number in TypeScript? - Stack Overflow

    51 String to number conversion: In Typescript we convert a string to a number in the following ways: parseInt(): This function takes 2 arguments, the first is a string to parse. The second is the radix (the …

  5. How do I turn a C# object into a JSON string in .NET?

    I have classes like these: class MyDate { int year, month, day; } class Lad { string firstName; string lastName; MyDate dateOfBirth; } And I would like to turn a Lad object into a...

  6. Connection string using Windows Authentication - Stack Overflow

    This Stack Overflow thread discusses how to use a connection string with Windows Authentication in your application.

  7. How do I split a string on a delimiter in Bash? - Stack Overflow

    May 28, 2009 · Split string based on delimiter in bash (version >=4.2) In pure bash, we can create an array with elements split by a temporary value for IFS (the input field separator). The IFS, among …

  8. How can I convert a string to an integer in JavaScript?

    In absence of OP's clarification, this question could be interpreted in the sense of converting any string to a number, i.e. turning "dog" into a number (which of course can be done).

  9. How to convert a string to lower case in Bash - Stack Overflow

    Is there a way in bash to convert a string into a lower case string? For example, if I have: a="Hi all" I want to convert it to: "hi all"

  10. Writing string to a file on a new line every time - Stack Overflow

    May 27, 2010 · I want to append a newline to my string every time I call file.write(). What's the easiest way to do this in Python?