search for: optimistations

Displaying 20 results from an estimated 1002 matches for "optimistations".

Did you mean: optimisations
2006 Apr 11
1
Implementing Optimistic Offline Lock - How ?
I understand that ActiveRecord supports the "optimistic offline lock"-pattern through magic fields (created_at, updated_at). However, a scaffolded CRUD-Controller doesn''t generate the necessary code to support this feature (the model state gets lost between two action calls). What is the best practice to prevent users from overwriting objects with outdated data ? --
2009 Dec 17
2
RFC: conflict_warnings plugin
Greetings, I was hoping to get some feedback on a plugin I wrote. The plugin is called conflict_warnings and is currently available from my github repository at http://github.com/EmFi/conflict_warnings The purpose of the plugin is to provide a simple methods of preventing data inconsistencies that could arise from multiple users interacting with the same resource. Under basic operation a
2010 Jun 08
1
[PATCH] Fix optimistic locking during vm migration
Signed-off-by: Loiseleur Michel <mloiseleur at linagora.com> --- src/db-omatic/db_omatic.rb | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/src/db-omatic/db_omatic.rb b/src/db-omatic/db_omatic.rb index da11bfa..79f29d2 100755 --- a/src/db-omatic/db_omatic.rb +++ b/src/db-omatic/db_omatic.rb @@ -195,6 +195,9 @@ class DbOmatic < Qmf::ConsoleHandler end
2006 May 09
7
When to use optimistic locking?
Hi All, I''m having some trouble deciding when and how to implement optimistic locking. Let''s say I have a multiuser Rails app, and let''s say it stores, among other things "vital" customer information. The standard methods created by the Rails generate scaffold script look like this: def edit @customer = Customer.find(params[:id]) end
2009 May 19
4
proper way to ensure atomic model changes
Hi! Say we have a rails active-record-based model called "instance" which can have different states - STOPPED, RUNNING, STARTING_UP, SHUTTING_DOWN, etc... There is a method #start which changes the instance state to STARTING_UP only if it is STOPPED. def start if self.state == STOPPED self.state = STARTING_UP self.save ... end end As you understand if we have multiple
2008 Aug 22
0
[LLVMdev] Dependence Analysis [was: Flow-Sensitive AA]
In the general case, I think you have to be conservative about this because programmers may deliberately want this kind of "wraparound" behavior, e.g., with periodic boundary conditions. But 99.9% of programs probably don't need that so it would be bad to penalize them for this corner case. In such a situation, I think you just have to support both choices, but choose the
2012 Jun 15
1
help in sentDetect() fuction
hello, I am using the following code >s<-"I am very happy, excited, and optimistic.I am very scared, annoyed, and irritated.Iraq?s political crisis entered its second week one step closer to the potential.dissolution of the government, with a call for elections by a vital coalition partner and a suicide attack that extended the spate of violence. that has followed the withdrawal.of
2006 Jan 04
2
Rename lock_version field?
Hi, Is there a way to tell Rails that the magic field name for optimistic database locking is not lock_version? I have a legacy database where the optimistic locking field is named "version". Thanks, Phil -- Posted via http://www.ruby-forum.com/.
2013 Feb 26
0
Feedback Needed: Optimistic Locking Destroy Bug
Need feedback on what I think is a bug in AR related to destroying models with optimistic locking. Please check this PR for more information: https://github.com/rails/rails/pull/9448 -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To unsubscribe from this group and stop receiving emails from it, send an email to
2007 Mar 25
1
Optimistic locking and update_attributes: not working?
Hi all, I''ve searched the forumns, but I can''t seem to find an answer to this one. I''m having trouble getting optimistic locking (OL) to work in my app, even though all of the pieces are there: * table has lock_version column, with default of 0 (zero) * lock_version column is being incremented by the first update (but the second doesn''t catch it) *
2014 Jul 08
1
arguments to .Call(), .External should be read-only?
hi. if i'm reading correctly, "Writing R Extensions" appears to be inconsistent on the question of whether the arguments passed to a routine called via .Call() or .External() should considered read-only. section 5.2, "Interface functions .C and .Fortran", says ---- However, when character vectors are used other than in a read-only way, the .Call interface is much to be
2018 Aug 23
2
[RFC] "Properly" Derive Function/Argument/Parameter Attributes
After I spend some time working with the function attribute* deduction pass** [1,3], I would like to propose a "proper" organization***. Why? Because we do not derive nearly as many attributes as we could****, while we do maintain various (separate and diffently organized) "data-flow-like analyses" to do so. What else? I propose a single optimistic data-flow
2013 Feb 25
7
Optimistic Locking Enhancements: Gem or Core?
I''m working on an app that makes use of rails'' optimistic locking feature and seeing some possibilities for improvements. It seems a bit tedious to have to add :lock_version to forms wherever the model is used. You also have to "hack" around rails'' UJS feature to add it as a URL parameter when using remote: true, method: [:put, :patch, :post, :delete].
2009 Aug 10
1
[PATCH server] Fixed db-omatic so it doesn't die due to an unhandled ActiveRecord::StaleObjectError exception.
The error is caused by the save! method updating an object that another thread (most likely in taskomatic) already updated. In the case of this race condition, we retry saving. However, a proper fix would involve fixing the locking. --- src/db-omatic/db_omatic.rb | 23 ++++++++++++++++++++--- 1 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/db-omatic/db_omatic.rb
2008 Aug 22
5
[LLVMdev] Dependence Analysis [was: Flow-Sensitive AA]
>However, there is one issue I have ignored - possibility of overflow in >the index expression. Suppose, we have such a loop: > for (i8 i = 0; i != 200; ++i) { > A[2 * i + 5] = ... > ... = A[2 * i + 3] > } >If both index expressions are evaluated in 8-bit arithmetic, >then the dependence equation should be solved in modular arithmetic: > 2 * i + 5 == 2 * (i +
2009 Aug 10
0
[PATCH server] Fixed db-omatic so it doesn't die due to unhandled exceptions related to saving db objects in update_host_state and update_domain_state.
The underlying issue has to do with optimistic locking for active record, and contention between db-omatic and task-omatic. That still needs to be fixed, especially since contention issues might get worse when the two daemons are made multithreaded. --- src/db-omatic/db_omatic.rb | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git
2006 May 17
6
ActiveRecord#to_param
Hello, to implement some some kind of optimistic locking, I want to build a view, where an object is displayed together with a link containing the data of the displayed object. My first try looked something like <%= object.object_discription %> <%= link_to "action", :action => "take_action", :data => object %> this won''t work because object is of
2000 Nov 18
5
Sample still has horrorible distortions... anyone know why?
Hi, I am subscribed to this list, and have learned a lot just from the discussions i see although i don't reply to the msgs, simply coz i'm no big deal programmer. I feel, though, that as i'm really optimistic about vorbis and want it to grow and start to have more and more people using it, i feel that i should warn you about a bug the encoder have (i'm sure monty receives loads
2005 May 25
2
[LLVMdev] llc -march=ia64 support
Hi, For the PyPy project ( http://codespeak.net/pypy ) I am working on the x64-64 support. I would like to use llc -march=ia64 to generate the assembly but that is not supported at the moment. As a workaround I let llc generate C code that gets compiled, but this unfortunately is not a good way to show the power of llvm. A understood this ia64 support will be worked on soon. First week of july
2009 Nov 24
6
[LLVMdev] New 8bit micro controller back-end
On Monday 23 November 2009 09:01, Anton Korobeynikov wrote: > Hello > > > It is a RISC with around 60 instructions like a 80c51 instruction set > > (without mul/div) and with Direct or indirect memory acces. > > My estimate is something like a man-week for a person, who knows what to do > :) That's pretty optimistic, even for someone who knows what to do. The