Signup/Sign In

Answers

All questions must be answered. Here are the Answers given by this user in the Forum.

Personally, I use Emacs with **hexl-mod**.
Emacs is able to work with really huge files. You can use search/replace value easily. Finally, you can use **'ediff'** to do some diffs.
4 years ago
***awk '{ for(i=3; i<=NF; ++i) printf $i""FS; print "" }'***
4 years ago
Using AWK you can do:
***awk '{ sub("\r$", ""); print }' dos.txt > unix.txt***

Using Perl you can do:
***perl -pe 's/\r$//' < dos.txt > unix.txt***
4 years ago
You can try these two when you are getting the error: 'could not find or load main class'
If your class file is saved in following directory with **HelloWorld** program name **d:\sample**
***java -cp d:\sample HelloWorld***
***java -cp . HelloWorld***
4 years ago
First list all iptables rules with this command:
***iptables -S***

it lists like:
***-A XYZ -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT***

Then copy the desired line, and just replace **-A** with **-D** to delete that:
***iptables -D XYZ -p ...***
4 years ago
Add this line to your Dockerfile (You can run any linux command this way)
***RUN useradd -ms /bin/bash yourNewUserName***
4 years ago
If you are connecting to the server from Windows, the Putty version of scp ("pscp") lets you pass the password with the **-pw** parameter.
4 years ago
I am not sure if this is the case for all versions of Windows, however on the XP machine I have, I need to use the following:
***set /p Var1="Prompt String"***
Without the prompt string in **quotes**, I get various results depending on the text.
4 years ago
You need to use the makecert tool.
Open a command prompt as admin and type the following:
***makecert -sky exchange -r -n "CN=" -pe -a sha1 -len 2048 -ss My ".cer"***
Where **** = the name of your cert to create.
Then you can open the Certificate Manager snap-in for the management console by typing certmgr.msc in the Start menu, click personal > certificates > and your cert should be available.
4 years ago
The default media type in a POST request is **application/x-www-form-urlencoded**. This is a format for encoding key-value pairs. The keys can be duplicate. Each key-value pair is separated by an & character, and each key is separated from its value by an = character.
For example:
***Name: John Smith
Grade: 19***
Is encoded as:
***Name=John+Smith&Grade=19***
This is placed in the request body after the HTTP headers.
4 years ago
if you are using http get please remove this line
***urlConnection.setDoOutput(true);***
4 years ago
With Windows PowerShell you can use:
***Get-Content -Wait***
4 years ago