similar to: MySQL index question

Displaying 20 results from an estimated 1000 matches similar to: "MySQL index question"

2012 Jun 30
5
Problems with associations
Hello guys, I have two tables, tasks and projects, and each model I put: Task.rb class Task < ActiveRecord::Base attr_accessible :user_id, :project_id, :name belongs_to :project end Project.rb class Project < ActiveRecord::Base attr_accessible :name, :description has_many :tasks end But when I go to my prompt and I make a SELECT with task, none project is returned.
2006 Jul 18
13
RANDOM
I am pretty much new at this ROR game and had what I think to be a simple question. I have a set of Sponsors that I would like to be able to select one at random and display in the my html. I have already set up the DB, scaffolded, set index controller and all is working smoothly. I know that I can display them all by doing <% for sponsor in @sponsors %> <%= sponsor.name %>
2006 Feb 17
1
AJAX and radio buttons
Hi! How can i use ajax with radio buttons? I have form with 2 radio buttons, which updates div with the value of selected radio button. It worked correctly when i used submit button, but when i removed it and used observers it didn''t. When i press the first button it displays its value, but when i press the second button it displays new value for a moment (0.5s ?) and then suddenly
2019 Aug 14
4
[PATCH libnbd 0/2] Use free callback to dereference NBD.Buffer.
In this patch series we use the newly introduced free callback on the completion function to dererence the OCaml NBD.Buffer. I will make the same kind of change for Python later in a separate series. The completion function is always called at the C level, even if the OCaml program didn't use the optional argument. That's because the free callback doesn't run otherwise. There is a
2019 Aug 14
0
[PATCH libnbd 2/2] ocaml: Remove NBD.Buffer.free function, use the completion callback instead.
By using the completion free callback function we don't need to manually free the buffer. Note that after this patch OClosures are always called from OCaml, because we might need the side effect of freeing the buffer. This reverts part of commit fef1c281a65d061127bf178e5f8cfca0a2475c56. --- generator/generator | 59 +++++++++++++++++++++----------- ocaml/buffer.c
2019 Aug 15
13
[PATCH libnbd v2 00/10] Callbacks and OCaml and Python persistent buffers.
This is a combination of these two earlier series: https://www.redhat.com/archives/libguestfs/2019-August/msg00235.html https://www.redhat.com/archives/libguestfs/2019-August/msg00240.html plus changes to allow .callback = NULL / .free != NULL, and to reduce the complexity of freeing callbacks. Although it's rather long there's nothing complex here. We might consider squashing some
2009 Jun 02
9
XML::LibXML::Reader
is there anybody who knows how we can get child values using libxml (Reader class) def xml_import_to_brands require''xml'' reader = XML::Reader.file(''c:/brands.xml'') . . .
2010 Dec 25
6
undefined local variable or method?
I have: <%= form_for(@supplier) do |f| %> ....... ...... <%= render ''sector_categories'', :locals => {:f => f} %> in _sector_categories partial I have: <div class="field"> <div id="category_update"> <% for category in @categories %> <%= f.check_box :category_ids[], category.id,
2009 Mar 11
4
[LLVMdev] a different hash for APInts
I'm working on a bug where LLVM takes over six minutes to compile a module. After some hand-editing, the module looks like this: class half { private: union uif { unsigned int i; float f; }; static const uif _toFloat[1 << 16]; }; const half::uif half::_toFloat[1 << 16] = { {0x00000000}, {0x33800000}, {0x34000000}, {0x34400000}, {0x34800000},
2012 Feb 15
0
[LLVMdev] We need better hashing
On Feb 14, 2012, at 10:47 PM, Talin wrote: > /// Add a pointer value > template<typename T> > void add(const T *PtrVal) { > addImpl( > reinterpret_cast<const uint32_t *>(&PtrVal), > reinterpret_cast<const uint32_t *>(&PtrVal + 1)); > } > > This violates TBAA rules and looks pretty dangerous to expose as public API.
2012 Feb 15
3
[LLVMdev] We need better hashing
On Tue, Feb 14, 2012 at 2:44 AM, Chris Lattner <clattner at apple.com> wrote: > On Feb 13, 2012, at 2:00 AM, Talin wrote: > > Just out of curiosity, why not MurmurHash3 ? This page seems to >> suggest that #2 has some flaw, and #3 is better all round: >> >> https://sites.google.com/site/murmurhash/ >> >> The main reason is because there's no
2010 May 25
2
Rails 2.3.6 and Authlogic 2.1.4 or 2.1.3
In the test environment, logging out and back in is not working for me. The log for the first login looks like this: Processing UserSessionsController#create (for 127.0.0.1 at 2010-05-24 19:53:57) [POST] Parameters: {"user_session"=>{"remember_me"=>"true", "password"=>"[FILTERED]", "login"=>"test"},
2017 Apr 28
2
RFC: Improving performance of HashString
According to... https://github.com/rurban/smhasher/blob/master/README.md Bernstein has quality problems (while xx is as good as you get in a non-crypto hash), and xx is 7x (32 bit) - 12x (64 bit) faster. That's on long strings. It would be worth checking the startup overhead for typically short identifiers in programs. See later on in the README: "When used in a hash table the
2010 Oct 04
4
http caching a dynamic page
Is it possible to take advantage of http caching/proxy caching with dynamic pages? i.e. pages with section/part that can change over time but certain part of the page remain the same. I would rather not keep re-rendering the static part but insure the dynamic part are rendered with fresh data. I am using memcached mostly as an object store that I can minimize db hits but I still am rendering a
2019 Jun 04
1
Re: [PATCH libnbd v2 2/4] generator: Callback returns int instead of void.
On 6/4/19 4:59 AM, Richard W.M. Jones wrote: > Callback functions now return an int instead of a void. This allows > in some cases for the callback to indicate that there was an error. > > This is a small change to the API: Indeed; and my work to let nbdkit-nbd use libnbd is slightly impacted. If I want to support both 0.1.2 and 0.1.x, I now have to do a conditional compilation
2010 Apr 15
2
Linux/Unix DNS question
While traveling, I found a motel with WiFi where Firefox and the DNS utilities, nslookup and dig, worked as expected, but wget, termtter (a CLI Twitter client), my Ruby on Rails applications, and several other programs could not resolve any domain names (getaddrinfo error, from memory). If I plugged the IP address obtained with nslookup into /etc/hosts, they worked as expected. Could anyone
2006 Jul 11
8
Stop updated_at from auto updating?
Hi Is there any way to temporarily stop the updated_at field from being updated when a record is modified with ActiveRecord? I have a date field which is keeping track of when the record data was last checked by my application and my app manually updates it, of course when I do this the updated_at field is also touched making it fairly useless for finding out when the actual data was changed
2010 Feb 11
3
[LLVMdev] FoldingSet #collisions comparison
On Mon, Feb 08, 2010 at 10:31:23AM -0800, Chris Lattner wrote: > On Feb 7, 2010, at 1:03 PM, Gregory Petrosyan wrote: > > >On Sat, Feb 06, 2010 at 04:51:15PM -0800, Chandler Carruth wrote: > >>While I've not reviewed the patch in too much detail, it looks > >>promising. Can you run some end-to-end benchmarks to make sure that > >>cache pressure in the
2011 Oct 11
10
Create Two objects at the same time
I have user model and referral model. Referral model has user_id as field. Now when a new user is created, I need to call referral#create as well and pass it the id of the newly generated user to user_id of referral model. How can I do that. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to
2012 Oct 23
7
Not updating the updated_at field
This is for Rails 3.1.1 I have a field called last_seen in a model. This field will be updated when the something about the record is seen in the real world (don''t worry about this part) So I go x.update_attribute(:last_seen, Time.now) and the following happens is UPDATE "blah" SET "last_seen" = ''2012-10-23 08:57:46.179288'', "updated_at"