similar to: Mixins

Displaying 20 results from an estimated 20000 matches similar to: "Mixins"

2006 Jun 27
5
Rails cronjob?
I want to be able to write a script in Ruby which regularly consumes an XML feed from a fixed source, re-formats it, produces a large file for web delivery, and updates a database with the contained information. It''s simple - just running a script from a cron job, and some basic data manipulation... But I''d prefer to use the Rails database mapping constructs than roll my
2006 May 10
1
model mixin module madness
If I have several models which exhibit the same functionality, it seems makes sense to create a mixin, ''include'' it in each model and save myself some work and repeated code. Where can I define a module which will be available to all models? I can''t seem to find a documented place for them. Alternatively, is there a Rails-standard way of achieving the effect? Ben
2006 May 12
9
Version control for deployment?
If I can get root access, I''ll use version control for deployment as well... It beats ftp and scp hands down for speed. Setting up a repository on a remote server means I get automatic off-site backup as part of the development cycle, and deployment/site update is as simple as a three word command line entry. Small changes on remote test sites can be made with Vim (or your *nix
2006 Jun 01
9
More flexible file column?
The file column plug-in is great, but there is a problem with it. Well, two... But the other is well documented now. :^) Consider a time when you''ve created a CMS for a client and it''s been in use for over a year. Say 1500+ images have been uploaded so far. Now the client comes back with a simple request... ''Can you change the thumbnail size to 80/90, rather than
2006 May 17
3
Help mixin in class methods
Starting to feel more confident and code is DRYing up nicely, but I''ve hit a brick wall here and hoping someone can help me. I''ve got a module, TrustRanking, which extends a number of model''s instance methods, and I want to extend their class methods too, but I can seem to work out how to do it. Simply including the module from the class works a treat for the
2006 May 16
2
Good and Bad Experiences with Hosting Companies
I''m about to get hosting for an on-line shop application in the UK. I''m leaning towards Bytemark, as they seem to have the right product range and attitude. Support sound knowledgeable and helpful and they show a marked preference for Debian, which I happen to be fond of. Has anyone tried them? Has anyone had good or bad experiences with other hosting companies
2006 Jul 21
7
nullmailer recommendations
Just wondering what people tend to use for nullmailers on their centos boxes (i.e. a minimal outgoing-only MTA)? I guess the obvious solution is a minimal postfix config, but that seems reasonably heavyweight and easy to misconfigure - is there anything lighter floating around the centos universe? Cheers, Gavin -- Gavin Carr Open Fusion - Open Source Business Solutions [ Linux - Perl - Apache
2010 Nov 15
2
How to add an exe to Rails app
I have been hacking around with this for a bit but want to see if there is an easy way: I am using Heroku and I have the wkhtmltopdf static binary in: rails_root/vendor/wkhtmltopdf I am not using any plug ins for wkhtmltopdf, just the executable, on purpose and want to keep it this way. My code wants to execute wkhtmltopdf: # tell wkhtmltopdf to convert html file to pdf
2007 Apr 10
3
MultiSearch and ActionView Questions
Hey all, I had some pressing questions about acts_as_ferret and had not heard about this mailing list yet, so I contacted Jens directly and he was kind enough to answer my questions. I would like to post our exchange here and continue the dialogue in hopes that it''s useful to someone else out there. Question #1: How should I be setting up my form helper? >>
2019 Mar 29
2
Higher level program analysis
preejackie via llvm-dev <llvm-dev at lists.llvm.org> writes: > Are you suggesting that static analysis is much inferior than > profiling in finding "next executing function" ? I'm stuck at > deciding which one to prefer & implement during this summer project, > Could you please help me? I suspect this is highly code-dependent. For example, it's probably
2006 Jul 28
3
Forms: handle foreign keys (AssociationTypeMismatch)
Hi all I tried and tried and tried, but I still fail in creating a form with proper validation and stuff for foreign keys... So I''d really like to get some help here. I''m creating a booking site for DJ''s, and for every booking one can choose one of different countries: class Booking < ActiveRecord::Base validates_presence_of :country_id
2007 Feb 08
0
derive.js - Ruby-esque derivation/mixins for Prototype
All, I whipped up a small extension for Prototype to solve some modeling issues I was having on a large JS project. I know there have been serveral alternative "write JS in Ruby" type efforts, including ruby.js, rb2js, and prototype.js itself, but I was hoping to keep it as light as possible while gaining the most powerful aspects of derivation/mixins/callbacks. Much like the prototype
2007 Aug 21
5
[PATCH] Add I/O hypercalls for i386 paravirt
In general, I/O in a virtual guest is subject to performance problems. = The I/O can not be completed physically, but must be virtualized. This = means trapping and decoding port I/O instructions from the guest OS. = Not only is the trap for a #GP heavyweight, both in the processor and = the hypervisor (which usually has a complex #GP path), but this forces = the hypervisor to decode the
2007 Aug 21
5
[PATCH] Add I/O hypercalls for i386 paravirt
In general, I/O in a virtual guest is subject to performance problems. = The I/O can not be completed physically, but must be virtualized. This = means trapping and decoding port I/O instructions from the guest OS. = Not only is the trap for a #GP heavyweight, both in the processor and = the hypervisor (which usually has a complex #GP path), but this forces = the hypervisor to decode the
2005 Nov 06
1
mixins not reloaded as expected?!
Hi guys, in development mode a module mixed into a helper class seems not to be reloaded inside app/helpers: class TestHelper include EvenMoreHelp #foo end module EvenMoreHelp # bar end the contents of #foo get refreshed, but not #bar... is there a way to fix that behaviour. I intend a full reload in development mode for obvious reasons. Regards Peter
2007 May 01
2
Using mixins versus delegation
I''ve been working on a plugin called Http Test where I add HTML validation and link checking to controller and integration tests through an after filter in ApplicationController. I used to mix in a bunch of methods that I needed into the ApplicationController class, but to me this had a bad smell, so I broke much of the code out into separate classes that I delegate to.
2006 Apr 11
1
Mixins?
As is often the case when I tackle a new platform/language, I get the big picture very quickly (because frameworks are frameworks are frameworks) but its the nitty-gritty of the language that bogs me down... So I have some similar methods on a few of my model classes that I wanted to push into a helper. Now I reckoned that the Ruby way was to create a module and mix it in with include. However, I
2016 Apr 08
2
Tool to Manage KVM with Web Browser
On 8 April 2016 at 09:52, Morgan Cox <morgancoxuk at gmail.com> wrote: > https://www.ovirt.org/ ? > > On 8 April 2016 at 09:23, FrancisM <francis at mytechrepublic.com> wrote: > > > Hi All, > > > > Is there someone out there using web browser to manage multiple KVM > > host servers right now in checking the MIST.IO Cloud platform and there > >
2009 Mar 30
2
[LLVMdev] RFC: X86InstrFormats.td Refactoring
There is some redundancy at the instruction format level in the x86 .td files. For example, in X86InstrFormats.td: // SSE1 Instruction Templates: // // SSI - SSE1 instructions with XS prefix. class SSI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> pattern> : I<o, F, outs, ins, asm, pattern>, XS, Requires<[HasSSE1]>; // SSE3 Instruction
2009 Mar 30
0
[LLVMdev] RFC: X86InstrFormats.td Refactoring
On Monday 30 March 2009 16:12, David Greene wrote: > There is some redundancy at the instruction format level in the x86 .td > files. For example, in X86InstrFormats.td: > > // SSE1 Instruction Templates: > // > // SSI - SSE1 instructions with XS prefix. > > class SSI<bits<8> o, Format F, dag outs, dag ins, string asm, list<dag> > pattern> > >