I wonder if Perl, Python, or Ruby can be used to write a program so that it will look for 0x12345678 in the memory of another process (probably the heap, for both data and code data) and then if it is found, change it to 0x00000000? It is something similar to Cheat Engine, which can do something like that on Windows.
...
So I've inherited this legacy rails codebase and there's a bug i need to fix where a given form is retaining values (that have not yet been saved to the DB) even after Page Refresh.
Use Case:
User fills data in form but does not press submit.
User Clicks refresh button on browser.
The Values in the form are retained instead of refreshi...
i am using ruby gems json_pure and when i get parsing errors i am not able to determine the line number where the error is occuring. i was expecting to find a validator written in ruby that would tell me the line number. what is the best ruby approach to finding the json errors quickly?
thanks!
...
A member of my team is developing a Rails app on Windows XP. We are finding that when we run the app, either launching it within NetBeans or by opening a console and calling script/server, the Rails development log does not scroll by. There is only the Webrick startup message. The app is definitely running, but when we hit various pages ...
Hi, I'm sure there's a simple answer for this; I just can't seem to find it. I made a nested function in Ruby, and I was having trouble accessing variables from the outer function inside the inner function:
def foo(x)
def bar
puts x
end
bar
42
end
foo(5)
I get: NameError: undefined local variable or method x' for main:Obj...
I'm using a flash notice in a Rails application, with the following code:
flash[:notice] = "Sorry, we weren't able to log you in with those details."
render :action => :new
The flash message renders as expected on the 'new' action, but then it also shows on the next page the user visits (whatever that might be). It should only show on...
I want to start coding in Python or Ruby. Since I own a Lego Midstorms kit I thought it would be nice to program against it. Are there any good translators / interpeters for the Mindstorms brick?
...
I would like to crop images on upload using Paperclip to get square thumbs from the center of the original picture. I find out a method in documentation that seems to do exactly what I want:
transformation_to(dst, crop = false)
The problem is that I can't figure out where to use this method. It would be great to simply pass something a...
I have an csv file, the data, and an HTML file, the template.
I want a script that will create an individual html file per record from the csv file, using the html file as a template.
Which is the best way to do this in Ruby? Python?
Is there a tool/library I can use for this in either language?
...
hello
I was using ruby and glade2 to design the user interface for a while in the new version of glade3 i can use gtkbuilder format to generated xml file instead of libglade.
is there any example? i searched google but i had no luck!
...
Assuming I have 5 tables. Can ActiveRecord handle this? How would you set it up?
The hierarchy:
Account (Abstract)
CorporateCustomer (Abstract)
PrivateCustomer
PublicCustomer
GovernmentCustomer
Edit: In nhibernate and castle activerecord the method needed to enable this scenario is called "joined-subclasses".
...
Hi All,
I'm in the process of deploying a rails application to Windows machines. I do all of my development with OS X and Linux, but the final app will actually run on Windows machines.
That said, my client is looking for an all-in-one Apache(I had to talk him out of IIS)+Rails+Application deployment/installer. He wants to hand all o...
Hello, I just wanted to get some feedback on better ways to model a team/team membership in rails.
I currently have the following:
class User
has_many :teams, :foreign_key => "owner_id" #user owns this team
has_many :memberships #user is a member of these teams
class Team
belongs_to :team_administrator, :class_name => "Use...
We have a grid control that allows a user to filter text in different fields. A number of these fields might be timestamps, like created_at and updated_at.
Now, a user can do many different types of filters, including >, <, >=, <=, etc. So, a query that comes across from the control might look like:
"created_at > 2009", or "created_at ...
You include the modules in classes to extend the class functionality in terms of both adding class methods and instance methods to that particular class.
module M
def self.class_method_from_module
'from class_method_from_module'
end
def instance_method_from_module
'from instance_method_from_module'
end
end
class C
include M
...
I want to display a list of articles in my tag's show view. I'm using the acts as taggable redux plugin in a Rails 2.3.2 and SQLite3 app. I've got as far as the basic example takes me, assigning tags and then displaying a list of them with the article.
Now I want to display a list of articles belonging to a tag but get the following er...
I'm in the process of learning Ruby on Rails and I've set myself the task of putting together a very basic shopping cart system. I have a table items that costs of a price column currently set to integer. I have no problem with inputting the data in cent, but when it comes to displaying the price in th view, well I obviously want it to b...
I have a rake task I need to run as a daily job on a Windows XP machine. I discovered the Windows "scheduled tasks" control panel. I'm trying to figure out how to get it to run my Rake task.
Two of the fields are "run" (with a browse button) and "start in". I tried to enter rake mycategory:mytask into "run" and my Rails project dir cont...
I know this is simple, but how do you take a string and convert it to lower case, or upper case in ruby.
...
When you write an HTML/CSS/JavaScript app for Adobe AIR, the source files sit in a directory visible to anyone who looks.
Appcelerator Titanium lets you code in JavaScript, Python, and Ruby. Is the bundling similar to AIR, with all the source exposed?
...