News for hackers. Stuff that matters.

griffindy

Re:W3C HTML JSON form submission on Thursday November 27, 2014 @12:58PM (#8668251)
jersey[0], the reference implementation of JAX-RS[1] does this if you specify an incoming query string parameter as a `List`

[0] https://jersey.java.net/ [1] https://jax-rs-spec.java.net/

Re:Practical Typography on Wednesday July 24, 2013 @07:29AM (#6095516)
While the fonts themselves are proportional, usually each letter (counting space as a letter) has the same width every time, it just happens that an 'i' takes up less space than 'w'. Regular spaces are usually 'en-spaces', meaning the width of the 'n' in whatever typeface you're using.

That being said, spacing is obviously very different in justified type (and a huge pain to set by hand), where it will change depending on which words fit in the line.

Re:Why Ruby rocks on Tuesday July 09, 2013 @09:59PM (#6016995)
> What kind of creation are you building that you are expecting > to not know which methods are available while running your program?

`method_missing` is more useful for dynamically responding to method calls than actually not knowing how to respond. A good example of this is rails' (version 3.2 and lower) dynamic finders:

User.find_by_username('a_username')

`find_by_username` is never defined anywhere, it is dynamically responded to using method missing. this allows code to be much more precise and DRY (though at the expense of readability if you don't know what's going on)

but very few people who are in college right now were perhaps old enough to remember floppy disks. I graduated from college in 2012 and remember having floppy disks as a kid (I think for Encarta?) but don't remember ever using them.

I think that we're right on the cusp of people graduating college who have never used a floppy disk.

Re:PHP 5.5 on Thursday June 20, 2013 @07:48AM (#5911481)
If michh is working on plugins for other people, shared hosts can be pretty behind on their PHP versions. I just had to backport a wordpress plugin to 5.2(!), which came out in 2006.

EDIT: meant PHP versions, not plugins.

Re:Students build computers out of cardboard on Saturday February 23, 2013 @03:38PM (#5271380)
me too, and I was very pleasantly surprised!
Re:Linux Jobs Forecast: Pressing Need for Linux Talent on Thursday February 21, 2013 @08:46AM (#5257320)
I'm not trying to be rude or anything, but what exactly is a 'linux' or 'unix' pro?
Re:Keeping Passwords in Source Control on Wednesday February 06, 2013 @06:49PM (#5179685)
on a unix system you could put them inside `/etc/profile.d/user.sh` as environment variables so that whenever that user is running something those variables exist. then if you're using chef (not familiar with puppet, etc.) you could keep those passwords/keys in an encrypted data bag and set them during provisioning.
Re:Micro Responsive Grid - a tiny little fluid grid on Tuesday February 05, 2013 @07:36AM (#5170311)
a nice framework and a great site, good job!
I've always liked testing ajax requests with sinon [1]. It injects its own version of an XMLHttpRequest object to keep track of all requests, and you can also send specific responses to test success and failure handling.

[1] http://sinonjs.org/docs/#useFakeXMLHttpRequest

Re:How SublimeText Bodybags vim+Terminator on Sunday February 03, 2013 @10:06AM (#5159846)
I know about vim scripts, I just don't think the process is as smooth as sublime's package control
Re:How SublimeText Bodybags vim+Terminator on Sunday February 03, 2013 @09:18AM (#5159709)
Other than the central repository (which vim does lack, there are quite a few plugins I'll admit), I don't see anything too different from vim, or am I just missing something. not trying to be mean spirited, just curious.
Re:Crafting Code in Clojure on Friday February 01, 2013 @08:09PM (#5154621)
slightly more idiomatic, though perhaps not quite as clear as the clojure:

    def unique_keys(*hashes)
      result = {}
      hashes.each do |hash|
        result.merge! hash
      end
      return result.keys.map(&:to_s).sort.join(', ') unless result.empty?
      '<none>'
    end
https://gist.github.com/4695388

Older »