I would like to wrap the text 5 characters before the end of window (without breacking the line).
I don't know how to do this without putting an EOL character in the text (wrapmargin/textwidth).
Hello, I need to print last 20 characters of string, but only whole words. Delimiter is a space "". Let's consider this example:
string="The quick brown fox jumps over the lazy dog"
echo $string | tail -c20
returns s over the lazy dog. And I need it to return over the lazy dog instead. Do you know how to accomplish that? Thanks!
Hi,
I have been having trouble searching through a MySQL table, trying to find entries with the character (UTF-16 code 200E) in a particular column.
This particular code doesn't have a glyph, so it doesn't seem to work when I try to paste it into my search term. Is there a way to specify characters as their respective code point instead for a query?
Thanks,
-Ben
this data is stored in an array (using C++) and is repitition of 125 bits each one varying from other also has 8 messages of 12 ASCII characters each at end.....
Please suggest that should i use diffential compression within array and how?
or i should apply some other compression scheme as whole onto the array?
thanks in advance
Regards
Haider
Hi! i'm doing a project, i'm not going to details but i will simplify my idea, i'm using Morse Code ( dot and dash) and i have 2 methods: convert_MorseToChar() and Convert_MorseTonum()
in the convert_MorseToChar() method there is swich to compare the input from a user which will be Morse codes and mapping it to characters:
private String convert_MorseToChar(ref string Ch)
{
switch (Ch)
{
Case ".-":
MorsetoChar = "a"
break;
Case "-...":
MorsetoChar = "b"
break;
Case "-.-.":
MorsetoChar = "c"
break;
Case "-..":
MorsetoChar = "d"
break;
Case ".":
MorsetoChar = "e"
break;
}
}
and the other method Convert_MorseToNum(), ues the SAME combinations of Morse codes but mapping them to numbers:
private String Convert_MorseToNum(ref string Ch)
{
switch (Ch)
{
Case ".-":
MorsetoChar = "1"
break;
Case "-...":
MorsetoChar = "2"
break;
Case "-.-.":
MorsetoChar = "3"
break;
Case "-..":
MorsetoChar = "4"
break;
Case ".":
MorsetoChar = "5"
break;
}
}
now the senario is: there are 2 Textbox, one the user will write Morse codes in it and the other is for the output. The user will write dot "." and dash "-" from the keyboard and press Enter then the program will go to ONE of the 2 methods to convert the Morse codes. Now what tells the program where to go to convert?? my question is: I want to create mode key to swich between 2 modes: MorseTochar and MorseToNum. i want the down arrow key to act like a mode, when a user press the down arrow then it the program will be in MorseToChar mode, when ever the user input the program directly use the method convert_MorseToChar to convert to characters. and when the user press the down arrow agian, the prohram will swich to MorseToNum mode here when ever the user input as morsecode, the program will directly use the method Convert_MorseToNum() to convert to numbers. HOW I CAN DO THAT Pleaaaas!!! help me!
Please excuse my English, English is not my native language :)
How do you decide what you name your servers?
Do you keep it simple/boring like svr-01, svr-02; make it descriptive like citrix-01, share-01; or do you make it creative like the names of the planets, peanuts characters, etc?
How many characters are allowed to be in the subject line of Internet email?
I had a scan of The RFC for email but could not see specifically how long it was allowed to be.
I have a colleague that wants to programmatically validate for it.
If there is no formal limit, what is a good length in practice to suggest?
Cheers,
I have form where user submits field. Field can have letters, numbers, and punctuation. But I want to check to make sure that at least 3 of the characters are letters. How can I regex that?
Thanks
Is there a disadvantage to using a dynamic Python file to generate the CSS for a webpage? I'd like computers with an administrator cookie to show special admin panel CSS, and show regular CSS for all other users. I'm planning to use:
<link rel="stylesheet" href="/css.py" type="text/css" />
I am running Turbo Pascal 3.01A on CP/M 2.2. Suppose my Pascal program, which I run using the R menu option in Turbo Pascal, has a bug and goes into an infinite loop. Is there a special control character that will interrupt my program and return to the Turbo Pascal menu?
The only difference is that Winmain takes char* for lpCmdLine parameter, while wWinMain takes wchar_t*.
On Windows XP, if an application entry is WinMain, does Windows convert the command line from Unicode to Ansi and pass to the application?
If the command line parameter must be in Unicode (for example, Unicode file name, conversion will cause some characters missing), does that mean that I must use wWinMain as the entry function?
I need a regex or a function in PHP that will validate a string to be a good XML element name.
Form w3schools:
XML elements must follow these naming
rules:
Names can contain letters, numbers, and other characters
Names cannot start with a number or punctuation character
Names cannot start with the letters xml (or XML, or Xml, etc)
Names cannot contain spaces
I can write a basic regex that will check for rules 1,2 and 4, but it won't account for all punctuation allowed and won't account for 3rd rule
\w[\w0-9-]
How to dynamically create urls/links like:
www.restaurant.com/restaurant/restaurant-name-without-some-characters-like-space-coma-etc/132
what are the keywords i can use to google some articles on this topic? (how to genererate and handle this kind of urls inside asp.net mvc)
There are some questions:
How to generate links? (store slugs in db?)
Redirect or not if slug isn't canonical?
edit: apparently they are called slugs
Write a program to creates two childs by using send –pipe and receive –pipe primitives.Each child Process reads from a different serial line and sends the character read back to parent process through a pie. The parent process outputs all characters received. A child terminates when exclamation point character is received.The parent process terminates after both children have terminate.
Hi,
I am passing the email address as part of the url,
for ex. http://example.com/hello/[email protected]
but, when being passed to the application controller it is changed to " user%40hotmail.com ".
I can't seem to understand this special character escaping; confusion.
please help me explain the problem here, and also what can I do to fix it.
I am using python's "webapp" web application framework.
I'd like to use ngrep and/or perl to monitor the incoming data stream on a socket, then, when the appropriate characters arrive, like in this case, the string "192.168.1.101:8080", input to the data stream a redirect to another ipaddress, such as "192.168.1.102"
Is this even possible?
I have a bunch of text files that are encoded in ISO-8851-2 (have some polish characters). Is there a command line tool for linux/mac that I could run from a shell script to convert this to a saner utf-8?
HI,
I would like to create a function that beautify my text. For this I use a regex who remplace some characters, but it not run. Can you give me the regular expression for this :
Replace the first letter by a caps
Replace any underscore _ by a space
So for example: the_pack_2 will be The pack 2.
Thx
I'm trying to write a program to help me manage my iTunes library, including removing duplicates and cataloging certain things. At this point I'm still just trying to get it to walk through all the folders, and have run into a problem: I have a small amount of Japanese music, where the artist and/or album is written in Japanese characters. Because of how iTunes arranges things in its library the directories contain these characters. "shouldn't be a problem, though." I thought, because the boost::filesystem library has a wide character version of its recursive iterator. but when I actually try to use it, it seems to completely stop when it hits the first Japanese char. complete stop as in it doesn't finish printing the line, no carriage return or anything.
now, I'm still pretty new to programming, so I'm assuming it's my mistake, anyone know why this is happening?
here's what I think is the relevant code:
fs::wrecursive_directory_iterator end_it;
int i;
try
{
for(fs::wrecursive_directory_iterator rec_it(full_path);
rec_it != end_it;
++rec_it)
{
for(i = 0; i < rec_it.level(); i++)
{
out << "\t";
}
out << rec_it->string() << std::endl;
}
}
catch(std::exception e)
{
out << "something went wrong: " << e.what();
}
and from my output file, minus some of the path:
/Test Libs/Combine
/Test Libs/Lib1
/Test Libs/Lib1/02 Too Long.m4a
/Test Libs/Lib1/03 Like a Hitman, Like a Dancer.mp3
/Test Libs/Lib1/A Certain Ratio
/Test Libs/Lib1/A Certain Ratio/Beyond Punk!
/Test Libs/Lib1/A Certain Ratio/Unknown Album
/Test Libs/Lib1/A Certain Ratio/Unknown Album/Do The Du.mp3
/Test Libs/Lib1/A Certain Ratio/Unknown Album/Shack Up.mp3
/Test Libs/Lib1/
finally, what I expect:
/Test Libs/Combine
/Test Libs/Lib1
/Test Libs/Lib1/02 Too Long.m4a
/Test Libs/Lib1/03 Like a Hitman, Like a Dancer.mp3
/Test Libs/Lib1/A Certain Ratio
/Test Libs/Lib1/A Certain Ratio/Beyond Punk!
/Test Libs/Lib1/A Certain Ratio/Unknown Album
/Test Libs/Lib1/A Certain Ratio/Unknown Album/Do The Du.mp3
/Test Libs/Lib1/A Certain Ratio/Unknown Album/Shack Up.mp3
/Test Libs/Lib1/???
/Test Libs/Lib1/Bring it on
/Test Libs/Lib1/04 Bring it on.mp3
any thoughts?
Thanks.
I have made an App that can connect to a program that I am running on a server, but it only seems to work with WiFi. When I try to use 3G it doesn't make the connection. Is there something special that I have to turn on or set in order to use 3G?
I have a java class that uses complex static fields which need special operations as close() so that they are safely cleaned by GC.
For the initialization of static fields I use the static block. But I don't now how to unload the static field safely, so that I can call the close() method before the field is cleaned up by GC.
Is there any way to unload a static field, similar to the static initialization block?
As we all know, By default in PHP+MySQL, we can upload a file of size 1.4MB (max).
1) My Question is how can i increase the limitation of this uploading file size?
2) What is the maximum limitation for file to be uploaded in database?
Thanx for viewing my query and special thanx for answering my questin.
Is there a way in JQuery to loop through or assign to an array all of the classes that are assigned to an element?
ex.
<div class="Lorem ipsum dolor_spec sit amet">Hello World!</div>
I will be looking for a "special" class as in "dolor_spec" above. I know that I could use hasClass() but the actual class name may not necessarily be known at the time.
Hi I need a regular expression that'll give me something like this part
./something\", [something.sh
from something like this string
("./something\", [something.sh", ["./something\", [something.sh"], [/* 37 vars */])
is that possible? I'm having real trouble making this since there's that \" escape sequence and also that ',' character, so I cannot simply use match everything instead of these characters.
I'm working on unix so it's also possible to use pipeline of few greps or something like that.
Thanks for advice.
I have a WinForm program that checks a database for changes, and if there are any, it will open another WinForm telling the user what is happening (the popup WinForm has some special functionality making a MessageBox insufficient for this task). Each time one of these popup WinForms shows up, a new icon shows up in the system tray and does not go away even if you hover over it (this isn't a tray refresh issue).
What I'm wondering is how to get the popup WinForm to display no tray icon at all.