Skip to content
Question Defense
Technical answers for technical questions
Question Defense
  • Backtrack Linux
    • Backtrack Article Request
  • HTTP ERROR
  • Kali Linux
    • Kali Linux Article Request
  • Privacy Policy
  • Tools
    • Class Of Device – Bluetooth CoD List In Binary And Hex
    • phpMyAdmin Blowfish Secret Generator
  • Documentation
    • check_postgres.pl
    • Linux Man Pages
      • insmod
      • kill
      • Logrotate
      • ls
      • lsmod
      • mail
      • modprobe
      • more
      • mysqldump
      • ntfsprogs
      • ntfsresize
      • pg_dump
      • psql
      • rmmod
      • screen
    • Monarch
      • Monarch Commands
      • Monarch Control
      • Monarch Escalations
      • Monarch Groups
      • Monarch Management of Nagios Hosts
      • Monarch Managing Nagios Contacts
      • Monarch Managing Nagios Hosts
      • Monarch Profiles
      • Monarch Services Template
      • Monarch Time Periods
      • Monarch Tools
  • Tags
  • Contact
Linkedin page opens in new windowTwitter page opens in new window
Search:
Search
  • Backtrack Linux
    • Backtrack Article Request
  • HTTP ERROR
  • Kali Linux
    • Kali Linux Article Request
  • Privacy Policy
  • Tools
    • Class Of Device – Bluetooth CoD List In Binary And Hex
    • phpMyAdmin Blowfish Secret Generator
  • Documentation
    • check_postgres.pl
    • Linux Man Pages
      • insmod
      • kill
      • Logrotate
      • ls
      • lsmod
      • mail
      • modprobe
      • more
      • mysqldump
      • ntfsprogs
      • ntfsresize
      • pg_dump
      • psql
      • rmmod
      • screen
    • Monarch
      • Monarch Commands
      • Monarch Control
      • Monarch Escalations
      • Monarch Groups
      • Monarch Management of Nagios Hosts
      • Monarch Managing Nagios Contacts
      • Monarch Managing Nagios Hosts
      • Monarch Profiles
      • Monarch Services Template
      • Monarch Time Periods
      • Monarch Tools
  • Tags
  • Contact

Daily Archives: April 23, 2009

You are here:
  1. Home
  2. 2009
  3. April
  4. 23

Technology Insights

Adding members to Ruby objects dynamically

InsightsBy Chirag PatelApril 23, 2009Leave a comment

If you want to dynamically add a member to a Ruby object, use the hash/array brackets and symbol (:user_id) as shown in the iRb session below. As you can see the dot notation will not work. bash >> d = AccessMode.find(1) => #<AccessMode id: 1, device_id: 31218, mode: "dialup", timestamp: "2007-12-25 15:52:55"> >> d[:user_id] =…

Technology Errors

json/common.rb:122:in `parse’: 574: unexpected token at ” (JSON::ParserError)

ErrorsBy alexApril 23, 2009Leave a comment

I have been writing some scripts in ruby to parse JSON generated data. To do this it requires the json ruby gem which works great to parse through JSON output. Anyhow I was loading files into ruby and parsing them without issue until i got to a larger file and I received the below error. Error:…

Technology Insights

Use vi To Find And Replace Content While Breaking a Line

InsightsBy alexApril 23, 2009Leave a comment

The power of the Unix command vi never ceases to amaze me. I have known how to search and replace easily using vi for a long time however I didn’t know how to find and replace plus insert a line break during the replace. After toying around with vi for awhile I was able to…

Question Defense
© 2019 question-defense.com

>>> Brave Browser Tipping: Support us by downloading, installing and then tipping us with Brave! <<<
Amazon Associate Disclaimer: As an Amazon Associate we earn from qualifying purchases.

Go to Top