I write regular expression for alphanumerics, but it is not taking space.
I want space (whitespace between characters).
I write like this:
^[a-zA-Z0-9_]*$
Using the local dev server, I can use ';' in urls, but as soon as I try the live version hosted by Google, it looks like the ';' and everything afterward is stripped (at least according to request.path_qs).
(I would prefer not to encode them if possible, it's much less user friendly if the url cannot be constructed by copy-pasting, especially since other characters works fine, e.g. ':').
Is there a way to find all possible start positions for a regex match in perl?
For example, if your regex was "aa" and the text was "aaaa", it would return 0, 1, and 2, instead of, say 0 and 2.
Obviously, you could just do something like return the first match, and then delete all characters up to and including that starting character, and perform another search, but I'm hoping for something more efficient.
I wrote a html scraper to scrape my various social identites, so I can make a real time 'biography' website.
However after using php curl_exec, I find that texts that I have quoted, end up being formatted in a weird character set.
ex: "I love dogs" gets formatted to ’I love dogs ’
"I hate cheese" gets formatted to “I hate cheese�
How do I either scrub these characters, or set curl not to format quotes like this.
Also, I have turned off magic_quotes.
We have a problem in cloning a repository created in unix in to a Windows box.
Git fails while checking out a lengthy file that has more than 32 characters in windows.
The file name is given below.
BaseFCS_x0020_OnLine_x0020_Identicheck_x0020_verification_x0020_serviceConsumer.java*
Is there a way to fix this issue in Git?
Hello everone,
I am using preg_match() function only to allow specific charachters to accept. It is allowing all alphabates and numbers but along with that i also want to allow utf-8 characters such as "ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ" so how can i allow this charachters from preg_match() function.Plase suggest me. Thanks in advance.
Regards
Shri
When do I execute query COPY TO ... CSV, I create CSV file. BUt when open it column with names in excel that should be with national characters are not as it should be. So my question is, If it is possible within a sql query to change this encoding to utf8? Or something else? Because I want that new created CSV file to be as final product for user on web. I hope someone understood what I want:)
I write regular expression for alphanumerics, but it is not taking space.
I want space (whitespace between characters).
I write like this:
^[a-zA-Z0-9_]*$
Hi everyone. I'd ideally like a vim answer to this:
I want to change
[*, 1, *, *] to [*, 2, *, *]
Here the stars refer to individual characters in the substring, which I would like to keep unchanged. For example
[0, 1, 0, 1] to [0, 2, 0, 1]
[1, 1, 1, 1] to [1, 2, 1, 1]
If people know how to do this in perl or python or whatever, that would be equally good.
Cheers
Hello all,
I have a JavaScript variable that I echo out using PHP which is shown like this in the page source:
var db_1 = 'C:\this\path';
When I set the value of a text field with that variable like so:
$('#myinput').val(db_1);
The slashes have disappeared and only the other characters are left!
Why is this and how can I put the slashes back in??
Thanks all
Hello,
I need to rename all the files in a directory. Some examples of the source filenames are:
alpha--sometext.381928
comp--moretext.7294058
The resultant files would be renamed as:
alpha.sometext.381928
comp.moretext.7294058
The number of characters before and after the -- is not consistant.
The script needs to work on current installations of Ubuntu and FreeBSD. These are lean LAMP servers so only the necessary packages have been installed.
Thanks
Is there a way in python to programmatically determine the width of the console? I mean the number of characters that fits in one line without wrapping, not the pixel width of the window.
Edit
Looking for a solution that works on Linux
After upgrading to the latest Rails version the path used by the image_tag helper is messed up with these characters: /%5C%22 \%22
http://localhost:3000/%5C%22/uploads/f0b07364-90bb-11/de-a278-0019dbf8d19d/Neues_LOGO_unten_mini.JPG?1275396335\%22
RAILSENV is development.
Anyone having the same problem?
I want someone to type words in the console, and autocomplete from a list when they hit "tab" key. However, raw_input won't return a string until someone hits [Enter].
How do I read characters into a variable until the user hits [Enter]?
*Note: I don't want to use import readline for autocompletion because of OS issues.
Pardon my noobness. I'm making a game in which several characters have relationships with each other and they need to be able to interact with each other and store some relationship data regarding how they feel about each other.
I have an object for each character. Is it bad for each of those character objects to have an array of all the other character objects in order to perform these interactions? Is there a better way to do this?
How to create a new data type for Go which to can check/validate its schema when is created a new variable (of that type)?
By example, to validate if a string has 20 characters, I tried:
// Format: 2006-01-12T06:06:06Z
func date(str string) {
if len(str) != 20 {
fmt.Println("error")
}
}
var Date = date()
type Account struct {
domain string
username string
created Date
}
but it fails because Date is not a type.
i need to trim a string to its first 100 characters using jquery/javascript.
also is it possible to scan a string and look for a particular combination of keywords such as #key?
thanks a lot for the help.
I'm not sure how password hashing works (will be implementing it later), but need to create database schema now.
I'm thinking of limiting passwords to 4-20 characters, but as I understand after encrypting hash string will be of different length.
So, how to store these passwords in the database?
How to truncate sthe string to 75 characters only in python
This is how it was done in javascript
var data="saddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddsaddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddsadddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd"
var info = (data.length > 75) ? data.substring[0,75] + '..' : data;
I have some unicode codepoints (\u5315\u4e03\u58ec\u4e8c\u4e0a\u53b6\u4e4b), which I have to convert into actual characters they represent.
What's the simplest way to do so?
Thank you.
I'm trying to append to a char[] array that contains blank spaces on the end. The char array for example contains the characters 'aaa'. When I append the first time the method functions properly and outputs 'aaabbb'. The initial capacity of the array is set to 80 or multiples of 80. The second time I try and append my output looks like"aaabbb bbb". Any psuedocode would be great.
I'm trying to clean some html text with javascript, there are white spaces included before and after some words (text is poorly formatted).
Currently I have this regex:
$("#" + target + " *").replaceText(/([\S][\u05B0-\u05C4]*)/gi, '<span class="marked">$1<\/span>');
This will capture all the non white-space characters and wrap them in a span element, but will not capture spaces between words (I need the span).
How would you solve this?
I am using OleDB for executing my queries in C#,
Is there any way I can execute multiple queries in one command statement?
I tried to separate them with semi-colon (;) but it gives error "Characters found at the end"
I have to execute a few hundreds of queries at once.
question 1)
between different characters&real numbers , finding specific one
how could i do
question 2)
myfriend asked me a good question :
can we divide two matrices to each other
// in math , we havenot learned but maybe someone knows where we find the answer
Do we have a standard way of converting a char* to int (or long) in a strict way, i.e. we should get proper result only if all characters are digits and can fit in an int (or long) -- some way by using strtol etc.. ?
Thus "sbc45", "4590k", " 56", "56 ", should be all invalid using that function.