How can I use console logging in Internet Explorer?

You can access IE8 script console by launching the “Developer Tools” (F12). Click the “Script” tab, then click “Console” on the right. From within your JavaScript code, you can do any of the following: <script type=”text/javascript”> console.log(‘some msg’); console.info(‘information’); console.warn(‘some warning’); console.error(‘some error’); console.assert(false, ‘YOU FAIL’); </script> Also, you can clear the Console by calling … Read more

How to get result of console.trace() as string in javascript with chrome or firefox?

I’m not sure about firefox, but in v8/chrome you can use a method on the Error constructor called captureStackTrace. (More info here) So a hacky way to get it would be: var getStackTrace = function() { var obj = {}; Error.captureStackTrace(obj, getStackTrace); return obj.stack; }; console.log(getStackTrace()); Normally, getStackTrace would be on the stack when it’s … Read more

How to add a Timeout to Console.ReadLine()?

I’m surprised to learn that after 5 years, all of the answers still suffer from one or more of the following problems: A function other than ReadLine is used, causing loss of functionality. (Delete/backspace/up-key for previous input). Function behaves badly when invoked multiple times (spawning multiple threads, many hanging ReadLine’s, or otherwise unexpected behavior). Function … Read more

Read input from console in Ruby?

Are you talking about gets? puts “Enter A” a = gets.chomp puts “Enter B” b = gets.chomp c = a.to_i + b.to_i puts c Something like that? Update Kernel.gets tries to read the params found in ARGV and only asks to console if not ARGV found. To force to read from console even if ARGV … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)