i.e. if I create a VARCHAR(50) field, what happens if I try to assign it a value that's 100 characters long?
Will SQL Server let me do this? Is it somehow less efficient?
I use this condition to check if the value is alphanumeric values:
$value =~ /^[a-zA-Z0-9]+$/
How can I modify this regex to account for a possible dot . in the value without accepting any other special characters?
In google translate web site if i type any word in English and select any other foreign language, it show the exact word in the foreign language. I want the unicode value of that foreign characters. How to get that?
I'm serving a file from Lighttpd whose name contains space-characters. I'm using mimetype "application/octet-stream"
When I download this in Chrome, it works perfectly. But when I download in Firefox, the filename is truncated at the first space.
Is this to do with the mimetype? With some other lightty config? Or maybe something to do with the kind of space-character I'm using?
I would like to do something like this i.e., use wild card characters in the in clause:
SELECT * FROM mytable WHERE keywords IN ('%test%', '%testing%')
This is not supported in MS SQL.... Is there some other way to achieve it...
Looking for something other than:
SELECT * FROM mytable WHERE keywords like '%test%' or keywords like '%testing%' or.....
I have a small windows client application data bound to a single table backend.
I created a DataSet using the wizard in VS 2005, and it automatically create the underlying adapter and a GridView. I also have a RichText control and bound it to this DataSet. All well so far but, I need to replace certain characters(~) on the fly before the data is shown in the RichTextbox. Can this be done.
I want to do something like:
lastName SIMILARTO(lastName, 'Schwarseneger', 2)
where lastName is the field in the database, 'Schwarseneger' is the value that lastName field is being compared to and 2 is the maximum number of characters (edit distance) that can differ between the lastName field, and the entered value.
I can implement the SIMILARTO function in C++ using the Levenshtein distance (http://en.wikipedia.org/wiki/Levenshtein_distance), but how do hook the function in a dll to a mySQL implementation?
I want to check if user input a positive integer number.
1 = true
+10 = true
.1 = false
-1 = false
10.5 = false
Just a positive number.
No characters.
No special character.
No dot.
No minus sign.
I tried is_int() function but it is returning false even on positive integers. Is there a string to int problem?
Thanks
A<<B would mean circling the characters of A towards left by the length of the data in B . So I am using split not the loop . But I am not able to figure out how to split a string according to the length of B.
What are the dangerous characters that should be replaced in user input when the users' input will be inserted in a MySQL query? I know about quotes, double quotes, \r and \n. Are there others?(I don't have the option of using a smart connector that accepts parameters so I have to build the query myself and this will be implemented in multiple programming languages, including some obscure ones so solutions such as mysql_real_escape_string in PHP are not valid)
found this regex:
insert " " every 10 characters:
$text = preg_replace("|(.{10})|u", "\${1}"." ", $text);
can you, please, explain what \${1} means. Why using \ and what curly brackets means?
In the following AccessVBA code, I am trying to write a record to a memo field called "Recipient_Display":
oRec1.Fields("RECIPIENT_DISPLAY") = Left(sRecipientDisplayNames, Len(sRecipientDisplayNames) - 2)
When the string contains 2036 characters, the write completes. Above this number I get the following error:
Run-time error'-2147217887(80040e21)':
Could not update; currently locked by another session on this machine.
What is the significance of this number 2036 and is there a property I can adjust that will allow the above update to take place?
I have this string : Verbesserungsvorschläge which I think is in German. Now I want to match it with a regex in php. To be more general, I want to match such characters like German which are not 100% in the ASCII set.
Thanks.
Hi everyone,
I have a long NSString in which I m trying to replace special characters. Part of my string looks like this:
"veau (c\u00f4telette)","veau (filet)","agneau (gigot)","agneau (c\u00f4telette)","b*\u0153*uf (hach\u00e9)","porc (hach\u00e9)"
I would like to replace all the \u0153 with "oe". I ve tried:
[response stringByReplacingOccurrencesOfString:@"\u0153" withString:@"oe"];
but it doesn't work.... I don't understand why!
Thanks
How do I split on all nonalphanumeric characters, EXCEPT the apostrophe?
re.split('\W+',text)
works, but will also split on apostrophes. How do I add an exception to this rule?
Thanks!
I'd like to convert a string of text, e.g., "User Name" into something which I can turn into part of a url, e.g., "User-Name." What's the fastest way to do a string replacement ("-" for " ") as well as make sure that characters are only [a-zA-Z0-9]?
How to replace from regex many empty/blank characters with none? ex:
<div class="someClass" id="someID">
...bunch of elements/content
<input type="button" name="myInput" id="inputID" title="myInput Title" />
...bunch of elements/content
</div>
when replaced :
<a class="myselector" rel="I need this value"></a><div class="someClass" id="someID">...bunch of elements/content<input type="button" name="myInput" id="inputID" title="myInput Title" />...bunch of elements/content</div>
I'm debugging my Android application using the AVD (Android Virtual Device). When I try to enter text in a text field, my characters are being interpreted as Japanese (or Chinese?) in the IME.
I don't know how I got into this mode or how to get out of it (I just want to enter alphabetic keys)?
Here's a screen shot:
http://u.go2.me/3cn
I can't use mkdir to create folders with UTF-8 characters.
<?php
$dir_name = "Depósito";
mkdir($dir_name );
?>
But, when I browse this folder in Windows Explorer, the folder name looks like this:
Depósito
What should I do?
So I have a string, and I want to strip out some parts of it using, for example, the firt and last characters of the "interesting" part.
String dirty = "$!$!%!%$something interesting&!!$!%$something interesting2";
And the output something like:
String clean = "something interesting:something interesting2";
Note:
The code needs to work without knowing the random part, changing everytime the program runs.
I researched and only found code that does it, but only knowing the random segment.
Hey all
Are there any pre-made scripts that I can use for PHP / MySQL to prevent server-side scripting and JS injections?
I know about the typical functions such as htmlentities, special characters, string replace etc. but is there a simple bit of code or a function that is a failsafe for everything?
Any ideas would be great. Many thanks :)
Scribus 1.3.3.13 - Ubuntu 64bit
I have a scribus document that I'm creating with text fields. I'm using the text fields for code samples, as that appeared to be the only way to have a scrolling text frame.
Upon conversion of the document, these text fields get populated with escape characters.
Is there any way to disable the escape sequences that are getting populating into these text fields?
Hi,
I am trying to make a multi-dimensional array of characters in ruby, and this works, but is there a more elegant way?
def initialize(text)
@map = Array.new
i = 0
text.split("\n").each do |x|
@map[i] = x.scan(/./)
i += 1
end
#@map = text
end#constructor
I am using gsub in Ruby to make a word within text bold. I am using a word boundary so as to not make letters within other words bold, but am finding that this ignores words that have a quote after them. For example:
text.gsub(/#{word}\b/i, "<b>#{word}</b>")
text = "I said, 'look out below'"
word = below
In this case the word below is not made bold. Is there any way to ignore certain characters along with a word boundary?
hi,
I am using Ajax Control Toolkit version 40412 in my asp.net 4.0 website. When I run the page in Firefox it is working good but I run the page in IE8 it is not rendering toolkit controls and putting "//" characters on the bottom of page.This is happening with every control of toolkit. What can be the problem with this, any ideas?