Displaying 20 results from an estimated 3000 matches similar to: "How to insert snippets in textmate from the keyboard"
2007 Jul 22
1
html.erb and textmate. Cant get snippets to work.
Hello!
I moved to html.erb but the snippets fail to work.
eg
.rhtml
lia(tab) gives me link_to
.html.erb
lia with a tab after it =)
I have tried the comment suggested here:
http://ryandaigle.com/articles/2007/2/21/what-s-new-in-edge-rails-rhtml-and-rxml-to-die-a-slow-and-painful-death
David Demaree:
"
1. Select Bundles > Bundle Editor > Edit Languages... from the menu bar.
2. Find
2006 Jan 29
16
counting rows via associations
Hi:
I have a table called clients and each client has many lists (a
has_many and belongs_to has been created in the class.
What I need to do is get a count of the rows in each list for each
client. I was hoping I could do something like
client.lists.count but it does not seem to work. Any suggestions?
bruce
2005 Dec 31
6
I don''t even know how to ask the question (4 lines of code)
I create a hash using this line of code @x = Account.find(:all)
I then want to go through each element in turn and add a key value
pair to the end of it. I thought this would work, but it does not.
@x.each do |a|
a.merge({"balance"=>50}
I used merge because I thought ''a'' would be a hash (how do you find
out the type of an object?)
I then guess it was
2006 Jan 19
3
A book we may wish to buy
Hi:
Some French fellow posted a notice yesterday about a book that had
come out. It''s called "Ruby on Rails" and is apparently by DHH &
David Thomas. Is this a scam? If not, does anyone know where I can
buy this book in English? I''ve searched the usual places but can''t
turn anything up.
Bruce
2006 Jan 01
11
Can rails make use of accesskeys?
I added :accesskey=>"D" to the html options hash of my link_to tag
but nothing happened.
Should I keep trying or is this not an option yet?
bruce
2005 Dec 24
2
Trying to grasp the difference between local variables and instance variables/
Hi:
Would it be fair to say (or completely out to lunch) that a local
variable is local to a method and an instance variable is local to an
object. Thus an instance variable is a sort of limited global
variable or super-powered local variable. Its scope is larger than a
local but smaller than a global. Or that it is a global within a
limited domain (the object).
or is it a whole lot
2006 Jan 02
5
How can one use GRUFF with locomotive ( I guess there is a wider question here, also)
Hi:
I love Locomotive and use it exclusively for my rails projects. I''d
like to install GRUFF and give it a try (a graph image creation
package). I know I can do sudo gem install gruff from the command
line for normal ruby and rails. How do I make gems available to
Locomotive?
bruce
2006 Jan 22
3
dumping out mysql data only (no structure)
Is it possible? It is mentioned in AWDWR but I cannot find that
option in the MySQL documentation. I can dump the whole db or just
the structure, but I''d like to be able to dump just the contents.
bruce
2010 Aug 17
1
replace loops with matrix
Hey, R users
I am using?numerical method for my research paper and the computation burden is
very heavy. first I tried to do it with loops, example code as following, and it
take hours to converge for only 200 obs. and my real data has 4000 obs. and the
optimization command that I use is:
optim(guess,myfunc1,data=mydata, method="BFGS",hessian=T))
then I tried matrix
2006 Jan 05
7
repost - Can one edit the file that generates the scaffolding.css?
I am reposting this because not only am I VERY interested in the
answer but because I think it would also be useful to many, many people.
We kind of have a house-style here, so it would be nice if the
generated scaffold.css would accommodate that. My questions are?
Is it possible?
Is it safe?
How?
bruce
2010 Sep 15
1
optim with BFGS--what may lead to this, a strange thing happened
Dear R Users
on a self-written function for calculating maximum likelihood probability (plz
check function code at the bottom of this message), one value, wden, suddenly
jump to zero. detail info as following:
w[11]=2.14
lnw =2.37 2.90 3.76 ...
regw =1.96 1.77 1.82 ....
wden=0.182 0.178 0.179...
w[11]=2.14
lnw=2.37 2.90 3.76 ...
regw =1.96 1.77 1.82 ....
wden=0.182
2006 Jan 06
8
How do I write a generator?
I''d like to take some advice and write a generator to change the
scaffold.css. How do I do that? I looked on the wiki and googled it
but have not found anything yet.
Any help would be much appreciated.
bruce
2006 Jan 23
1
simple problem
Hi,
look this:
> summary(fam??lia)
Anacardiaceae Annonaceae Bombacaceae Cecropiaceae
2 4 1 3
Chrysobalanaceae Clusiaceae Euphorbiacaea Fabacea
1 1 4 3
Fabaceae Flacourtiaceae Humiriaceae indeterminada
2005 Dec 08
7
Help shut down webbrick on mac?
Hello,
I just installed radrails and it will not run the webbrick because a
version is already running on my mac.
I do not know how to shut down the mac version.
Thanks
Regards,
Frank Rocco
farocco-H+0wwilmMs3R7s880joybQ@public.gmane.org
2006 Apr 26
2
MASC = A New Way to Use Textmate Snippets
Just thought I''d announce this on the Rails list since I know several
of you use Textmate: there''s a new feature I''m calling "Multiple
Arbitrary Simultaneous Carets" or MASC for short, which is available
in my personal TM bundle. It''s been handy enough for me that I
thought others might enjoy it.
2006 Feb 04
1
Can I reset the cycle helper?
Hi:
I have lines in a table I wish to stripe BUT, every now and then
there is another type of line, a section header line. I''d like to be
able to start the line after a section heading always as one of the
two classes the cycle helper is cycling between. Is it possible? If
so, how?
bruce
PS. I realise I could do this with ''odd_or_even'' or the %2 method
(mod
2006 Jan 04
1
I''d like to edit the scaffolding file - is it possible?
I notice that I begin each project with a standard css file which is
the one produced by scaffolding PLUS some other stuff. I could cut
and paste a copy from an old project but I thought it would be
"cooler" amongst other things (like more efficient) to just have the
scaffold.css file be created for me.
Is it possible? Is it safe(ish), What would I have to do?
Thanks in
2005 Dec 20
1
How do I persist a value in a collection_select
Hi:
I am using a collection_select to select which client''s records I
want. Everything works properly EXCEPT the list box reverts to its
initial value rather than holding onto the client whose records I am
now viewing.
?
2010 Sep 07
5
question on "optim"
Hey, R users
I do not know how to describe my question. I am a new user for R and write the
following?code for a dynamic labor economics?model and use OPTIM to get
optimizations and parameter values. the following code does not work due to
the?equation:
?? wden[,i]<-dnorm((1-regw[,i])/w[5])/w[5]
where w[5]?is one of the parameters (together with vector a, b and other
elements in vector
2006 Jan 04
10
Is Webrick good enough?
Hi all,
On the rails list I''ve seen that it''s hard to integrate Rails with Apache
(especially apache2), that it''s hard to change the default port (3000), and
that Apache runs Rails stuff slowly.
Is it reasonable to run Rails stuff on Webrick while simultaneously running
other stuff on Apache? How does one simultaneously run two rails applications
on Webrick, when