ruby-on-rails

Regex finding entire line from paragraph

Regex finding entire line from paragraph Question: I need to find the actual line from the paragraph, and the paragraph drawing by the markdown editor you can add a checkbox, radio, textbox, and paragraph through the editor. The actual str is something like this, this is paragraph line1 ?[question_2]{"category":[]}[who are you]=[] {1,2} [] OPTION 1 …

Total answers: 2

How to integrate a standalone Python script into a Rails application?

How to integrate a standalone Python script into a Rails application? Question: I’ve got a program that has a small file structure going on and is then ran using python do_work.py foo bar I want my Rails users to press a button and have this happen for them, with the result either uploaded somewhere or …

Total answers: 5

Easiest way to tackle this web crawling task?

Easiest way to tackle this web crawling task? Question: I currently have been assigned to create a web crawler to automate some reporting tasks I do. This web crawler would have to login with my credentials, search specific things in different fields (some in respect to the the current date), download CSVs that contain the …

Total answers: 3

twitter/social data mining – Ruby or Django?

twitter/social data mining – Ruby or Django? Question: I am a decent c/c++ programmer, but don’t know much about web dev. I am interested in twitter/social data mining. So which is a better tool – RoR or Django? I am on level zero in both ruby and python. But python’s syntax seemed easier to understand/learn. …

Total answers: 3

What is the equivalent of a Python docstring in Ruby?

What is the equivalent of a Python docstring in Ruby? Question: In Python, you can access an object’s docstring by using obj.__doc__. What is the equivalent action in Ruby? Asked By: parzival || Source Answers: I don’t believe ruby supports this. Answered By: Olly Ruby does not have a Python __doc__ equivalent. They often use …

Total answers: 4

Is there something similar to 'rake routes' in django?

Is there something similar to 'rake routes' in django? Question: In rails, on can show the active routes with rake (http://guides.rubyonrails.org/routing.html): $ rake routes users GET /users {:controller=>”users”, :action=>”index”} formatted_users GET /users.:format {:controller=>”users”, :action=>”index”} POST /users {:controller=>”users”, :action=>”create”} POST /users.:format {:controller=>”users”, :action=>”create”} Is there a similar tool/command for django showing the e.g. the URL pattern, …

Total answers: 4