News for hackers. Stuff that matters.

ephemient

On stock JB, even with USB debugging turned on, it's been tightened down. http://android-developers.blogspot.com/2013/02/security-enha...
Re:SSH uses four TCP segments for each character you type on Thursday May 30, 2013 @05:30PM (#5795367)
Are you thinking of EXTPROC/LINEMODE? There's outstanding patches to bash, telnet, and ssh to support these, which enables local line-editing that works smarter than just local echo.

TIOCPKT_IOCTL(EXTPROC) and TIOCSIG support landed in Linux kernel 2.6.36: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux....

My workaround is to click an element, then type into console

    $0.appendChild(document.createElement('tagName'))
but yeah, a [+] button would be nice…
Android WebKit and Chrome use V8.
Re:Chrome Beta channel for phones and tablets on Android 4.0+ on Friday January 11, 2013 @01:32AM (#5041643)
Browser's gone from the stock image on the Nexus 4, 7, and 10.

android.webkit.WebView is still the same Android WebKit engine that Browser used (whether it's installed or not); Chrome brings along its own WebKit port.

Re:A vim interface for gmail: Vmail on Friday December 14, 2012 @04:44PM (#4923529)
OAuth authentication for IMAP (via SASL): https://developers.google.com/google-apps/gmail/oauth_overvi...

I don't know if there are many clients that support it yet, though.

Not true. Internet Explorer used to work with both NSAPI and ActiveX plugins, until they pulled support for the former.

"""Netscape-style plug-ins are supported in Internet Explorer 5.5 Service Pack 1 (SP1) and earlier, but are not supported in Internet Explorer 5.5 Service Pack 2 (SP2) and Internet Explorer 6.""" -- http://support.microsoft.com/kb/306790

Re:To understand the command line... on Monday October 01, 2012 @03:30PM (#4598915)
After switching between keyboards with Esc in different places, I've learned to use

    Ctrl-[
instead. Can hit it without moving that far, and it works just as well in GVim as it does in all terminal programs.

The only downside is being confused when nothing happens in a browser...

Re:Unix Commands I Abuse Every Day on Wednesday September 05, 2012 @06:59PM (#4481945)
Nope,

    <file ./command --args
and even

    ./command <file --args
works fine in Bash and Zsh.
Re:The Beauty of Bresenham's Algorithm on Tuesday August 07, 2012 @09:10PM (#4353329)
So that you can do tricks like this:

    #define ever (;;)
    for ever {...}
;-)
As far as I know, it's an avoidance for a WebKit bug wherein elements' pixel positions and sizes are simply wrong at non-default zoom levels; see https://bugs.webkit.org/show_bug.cgi?id=60318 and all related.
As said above, it's only Win32 that's broken. NT filenames (e.g. \\?\...) aren't limited by MAX_PATH.
Re:Firefox 5 Beta is available for download on Tuesday May 24, 2011 @03:06PM (#2581127)
Chrome bundles a PDF renderer. (You won't find it in the open Chromium sources; it's by proprietary license from a third party.)

http://blog.chromium.org/2010/06/bringing-improved-pdf-suppo...

It's already sandboxed and pretty fast and light-weight, so I'm not sure the Chromium developers would put much work into a replacement.

Re:Linux on Windows (Wine in reverse) on Sunday May 22, 2011 @10:52PM (#2574842)
See also (2001): "LINE Is Not an Emulator. LINE executes unmodified Linux applications on Windows by intercepting Linux system calls."

http://sourceforge.net/projects/line/

I'm not sure if you can access its state programmatically, but Android already does detection: the WiFi status icon is green if the system can make a connection to Google's servers, and grey otherwise.

IPv[46] have nothing to do with it. "Captive portal" pages are meant to prevent you from getting to the larger Internet, until you do whatever magic is required to dismiss them.

Re:"The worst algorithm in the world?" on Wednesday May 11, 2011 @11:27PM (#2539368)
I have not profiled the code, but I expect that the Newtonian approximation of sqrt is the slowest part.

It would surprise me if "powers" was a big problem relative to the rest. And no shortcuts: each of [1, b b², b³, b⁴, b⁵, …] (up to n) is used in the binomial expansion.

Re:"The worst algorithm in the world?" on Wednesday May 11, 2011 @11:19PM (#2539357)
Hmm, I screwed up and wrote iterate instead of iterate' where I intended. Not that it really makes a difference.

In any case, the average time to print the first 20 Fibonacci numbers is 0.4157ms with matrix exponentiation and 1.707063s with exact integer math (yes, the units are different) on a T400.

Re:"The worst algorithm in the world?" on Wednesday May 11, 2011 @08:24PM (#2539014)
http://stackoverflow.com/questions/4327846/calculating-fibon...

It's straightforward (if messy) to calculate two rationals exactly, then approximate √5 to within certain error bounds.

I wrote some code which does this, just as an experiment... and it's unbearably slow. Just try it.

  import Control.Arrow
  import Data.Ratio

  newtype Matrix2 a = Matrix2 (a, a, a, a) deriving (Show, Eq)
  instance (Num a) => Num (Matrix2 a) where
      Matrix2 (a, b, c, d) * Matrix2 (e, f, g, h) =
          Matrix2 (a*e+b*g, a*f+b*h, c*e+d*g, c*f+d*h)
      fromInteger x = let y = fromInteger x in Matrix2 (y, 0, 0, y)
  fib n = let Matrix2 (_, x, _, _) = Matrix2 (1, 1, 1, 0) ^ n in x

  binom n =
      scanl (\a (b, c)-> a*b `div` c) 1 $
      takeWhile ((/=) 0 . fst) $ iterate (pred *** succ) (n, 1)
  evens (x:_:xs) = x : evens xs
  evens xs = xs
  odds (_:x:xs) = x : odds xs
  odds _ = []
  iterate' f x = x : (iterate f $! f x)
  powers b = iterate (b *) 1
  esqrt e n = x where
      (_, x):_ = dropWhile ((<=) e . abs . uncurry (-)) $ zip trials (tail trials)
      trials = iterate (\x -> (x + n / x) / 2) n
  fib' n = (a, b) where
      d = 2 ^ n
      a = sum (zipWith (*) (odds $ binom n) (powers 5)) % d
      b = sum (zipWith (*) (evens $ binom n) (powers 5)) % d
  fib2 n = numerator r `div` denominator r where
      (a, b) = fib' n
      l = lcm (denominator a) (denominator a)
      r = a + esqrt (1 % l) (b * b / 5) + 1 % 2
Re:Intel Reinvents Transistors Using New 3-D Structure on Thursday May 05, 2011 @01:29PM (#2518174)
Wikipedia says "Intel still holds an ARM license even after the sale of XScale." http://en.wikipedia.org/wiki/XScale

I don't know if it's true five years later now, though.

Re:Firefox 4 is here on Wednesday March 23, 2011 @01:26PM (#2360344)
Are you on OS X Leopard?

My understanding is that the out-of-process rendering used by Chrome forces blitting the whole page from the child process to the parent chrome on systems predating Snow Leopard.

Re:Firefox 4 is here on Wednesday March 23, 2011 @01:20PM (#2360315)
Do you?

http://chromium.hybridsource.org/the-iron-scam

At a glance, it doesn't seem like much has changed. Some more tweaks and a minor amount of development.

Re:"God's Number" is 20 - Rubik's cube has been "solved" on Tuesday August 10, 2010 @05:53PM (#1593080)
It may be the Java plugin crashing when loading the applet. Try disabling it.