I've create object with data type: DateTime
But I want save as char data type in sql server
ex: assign value to obj property:
MyDateTime=DateTime.Now;
//when use to string method result: MM/dd/yyyy hh:mm:ss
//save to db MyDateTime column with data type char(12)
we will save: MM/dd/yyyy
How can I save it.
I try use assign converter attr...
Hello,
I have a large string (an RSS Article to be more precise) and I want to get the word in a specific startIndex and endIndex. String provides the substring method, but only using ints as its parameters. My start and end indexes are of type long.
What is the best way to get the word from a String using start and end indexes of typ...
I am using Querystring to pass values from one page to other. I am tring to implement encoding and decoding using the Server.UrlDecode and urlEncode.
Query string returns a null value, but I can check the values are been sent in URL.
The two pages are:
QueryString.aspx
protected void Page_Load(object sender, EventArgs e)
{
}
protec...
There is an inbuilt tag for this purpose.
User enters a character in the textbox, Strings which start with the character entered should be displayed in the
form of a list.
The item selected from the list should be populated in the textbox.
P.S: The examples and demo available display Strings that contain the character entered. But I w...
I need a helper that can identify all the nouns on a string.
If the given string is
I really enjoy eating tomatoes
I should have, as result
really, enjoy, and tomatoes
If there is a way that I can also idetify the verbs, should be great!
...
I am trying to reverse the order of words in a sentence by maintaining the spaces as below.
[this is my test string] ==> [string test my is this]
I did in a step by step manner as,
[this is my test string] - input string
[gnirts tset ym si siht] - reverse the whole string - in-place
[string test my is this] - reverse t...
I'm looking for a way to find common mis-spelling of strings when entered by the keyboard. For example, I would like "house" to return "hoise", "hpuse", "jouse", etc. because the misspelled characters are close to the correct ones on a QWERTY keyboard.
If i could get this to work with numbers only that would still be a big help. Given...
Hi,
I have some picture named like this . (like "2.jpeg", "1234.gif" etc.)
how can I get the integer from the string?
I mean, is there something like the C function:
sscanf(myString,"%d", myInteger);
thanks
Alessandro
...
Hi, I have looked at the headers for UIFont but it has all class methods and only one instance method and some useless properties. I would like to know how to set the font to have a font name, and bold font weight kinda like [[UIFont alloc] initWithFontName:@"Courier New" weight:@"Bold" size:14];. Thanks for any help in advance!
~Thommy...
I seem to be having a bit of a TEXT / UNICODE problem when using the windows CreateFile function for addressing a serial port. Can someone please help point out my error?
I'm writing a Win32 console application in VC++ using VS 2008.
I can create a handle to address the serial port like this:
#include <iostream>
#include <windows...
I have this simple problem that gets an input from the user using a function then checks if the input is 'equal' to the "password". However, strcmp would never return my desired value, and the culprit is somewhere in my loop that uses getch() to take each character separately and add them to the character array. I found this out by havin...
Let's say I have this:
$array = array("john" => "doe", "foe" => "bar", "oh" => "yeah");
foreach($array as $i=>$k)
{
echo $i.'-'.$k.',';
}
echoes "john-doe,foe-bar,oh-yeah,"
How do I get rid of the last comma?
...
Dear All,
I have 2 input string 1)stack,over,flow 2)stack/over,flow,com
I would like to print only strings(without special char)from the above 2 input
for 1st input i used below function but for 2nd input i dont know how to process it.Pls give me solution.
st = new StringTokenizer("stack,over,flow", ",");
while (st.hasMoreTokens(...
This question follows a suggestion made by @sharptooth in this related question.
Can std::string be tweaked so that it becomes password-safe ?
If not, what would be the guidelines to write a password-handling class (thus a class that takes big care about what it writes to memory and clears it before destruction) ?
...
I'm trying to run the following TSQL statement on Microsoft SQL 2008
DECLARE @tmpMessage nvarchar(max)
SET @tmpMessage = 'select * from openquery(GLive,''select ID from Links WHERE [HREF] LIKE ''test'''')';
exec sp_executesql @tmpMessage
the above code doesnt work because the single quotes before test closes the main quotes around t...
I am trying to convert a user's guess into an integer. How do I do that?
...
How to get first 5 characters from string using php
$myStr = "HelloWordl";
result should be like this
$result = "Hello";
...
I just want to be sure:
string X="";
char Char=X[0]; //an exception "Index was outside the bounds of the array"
This means that the string is really treated as an array of chars, right? At least internally.
...
My code to insert data is as follows it works for the first time if i tried to insert data for the second time i am getting the error
My complete code
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace ACHDAL
{
public class EntryDetail
{
int[] debits ={ 25, 26, 27, 28, 29, 35, 36, 37, 3...
Emacs's auto-fill mode splits the line to make the document look nice. I need to join the strings read from the document.
For example, (CR is the carriage return, not the real character)
- Blah, Blah, and (CR)
Blah, Blah, Blah, (CR)
Blah, Blah (CR)
- A, B, C (CR)
Blah, Blah, Blah, (CR)
Blah, Blah (CR)
is read ...