Everything explained at this link:
http://suretalent.blogspot.de/2011/07/how-to-shutdown-windows-2008-without.html
My Tips and Tricks for C#, C, C++, MatLAB, Java, LaTeX, Python and more!
Tuesday, December 29, 2015
Monday, December 7, 2015
Mastering CLASSPATH
Useful information about CLASSPATH at this link
http://kevinboone.net/classpath.html
http://kevinboone.net/classpath.html
Tuesday, December 1, 2015
How to combine gets.chomp and ARGV in a Ruby script
Are trying to learn Ruby? Nice!
You have just written a script that combines gets.chomp and command line arguments via ARGV
and you are getting this error ?
`gets': No such file or directory @ rb_sysopen
Well the solution is to modify slightly gets.chomp, it needs to be $stdin.gets.chomp
Here is a working script (example1.rb) .
# -*- coding: utf-8 -*-
puts ""
puts "Hello World (in Ruby)"
print "Insert some input here: "
user_input = $stdin.gets.chomp
print "You inserted: #{user_input} \n"
# parse 3 command line arguments...
f1, f2, f3 = ARGV
puts "First argument is: #{f1}"
puts "Second argument is: #{f2}"
puts "Third argument is: #{f3}"
Try it!
>> ruby example1.rb Hello1 Hello2 Hello3
You have just written a script that combines gets.chomp and command line arguments via ARGV
and you are getting this error ?
`gets': No such file or directory @ rb_sysopen
Well the solution is to modify slightly gets.chomp, it needs to be $stdin.gets.chomp
Here is a working script (example1.rb) .
# -*- coding: utf-8 -*-
puts ""
puts "Hello World (in Ruby)"
print "Insert some input here: "
user_input = $stdin.gets.chomp
print "You inserted: #{user_input} \n"
# parse 3 command line arguments...
f1, f2, f3 = ARGV
puts "First argument is: #{f1}"
puts "Second argument is: #{f2}"
puts "Third argument is: #{f3}"
Try it!
>> ruby example1.rb Hello1 Hello2 Hello3
Friday, November 6, 2015
How to kill a windows services that hangs on "starting" or "stopping"
To kill a Windows process that hasn't started correctly you need to use the terminal.
1) Get the name of the service from the services window (run "services.msc", select your service and then with a right click get the services name)
2) In a command prompt enter:
sc queryex <servicename>
where <servicename> is what you got at step 1)
3) Get the <PID> from the output of step 2) and use it in the command:
taskkill /f /pid <PID>
Source:
http://www.examiner.com/list/how-to-kill-a-windows-service-that-s-stuck-on-stopping-or-starting
1) Get the name of the service from the services window (run "services.msc", select your service and then with a right click get the services name)
2) In a command prompt enter:
sc queryex <servicename>
where <servicename> is what you got at step 1)
3) Get the <PID> from the output of step 2) and use it in the command:
taskkill /f /pid <PID>
Source:
http://www.examiner.com/list/how-to-kill-a-windows-service-that-s-stuck-on-stopping-or-starting
Sunday, August 30, 2015
How to sort files and folder by date in total commander... in five clicks!
TotalCommander is a great tool but by default it does not sort folders by date, it sorts them by name no matter when they were created. This is pretty annoying. However the solution is just five-clicks away :)
The first two clicks: Select Configuration -> Options...
Choose Display (the third click), and then select (fourth click) Like Files (also by time) in the Sorting directories section.
Last click for OK. :)
Enjoy!
The first two clicks: Select Configuration -> Options...
Choose Display (the third click), and then select (fourth click) Like Files (also by time) in the Sorting directories section.
Last click for OK. :)
Enjoy!
Tuesday, August 18, 2015
Python: links for the beginner
Here are some links for the people willing to learn "Python"
A tutorial:
http://hetland.org/writing/instant-python.html
A crash-course:
http://stephensugden.com/crash_into_python/
A complete online book:
http://learnpythonthehardway.org/book/
and obviously...
https://docs.python.org/2/tutorial/index.html
A tutorial:
http://hetland.org/writing/instant-python.html
A crash-course:
http://stephensugden.com/crash_into_python/
A complete online book:
http://learnpythonthehardway.org/book/
and obviously...
https://docs.python.org/2/tutorial/index.html
google's programming styles
Nice reference to the Google's programming styles in C++/Java etc
Worth to read!
http://google-styleguide.googlecode.com/svn/trunk/
Worth to read!
http://google-styleguide.googlecode.com/svn/trunk/
Subscribe to:
Posts (Atom)