Displaying 20 results from an estimated 100 matches similar to: "Prototype.js Hash Methods"
2005 Dec 09
5
Prototype Enumerable, Array and Hash Documentation
Hey guys,
I recently published an article documenting some of the more useful
and interesting parts of Prototype''s Enumerable, Hash and Array objects.
You can find it here: http://encytemedia.com/blog/articles/
2005/12/07/prototype-meets-ruby-a-look-at-enumerable-array-and-hash
If you have any feedback or suggestions, fire away.
Cheers,
-Justin Palmer
2007 May 02
1
why is Hash#toQueryString including functions
Why function stored in a Hash are serialized by toQueryString. I mean
what''s the use-case for this? to eval them on server-side ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group.
To post to this group, send email to
2005 Dec 02
0
Prototype Hash#map & #each
Hello,
I wanted to apply escape on every property of an object using the
Hash.map method in prototype library. Check out this code:
<script type="text/javascript">
// Regular Array
var a = ["john doe", "john-Ch9RrZxMC0c@public.gmane.org", "say hello to me"];
a.map(escape).each(function(x) {
document.write(x + "<br />"); //nice
2006 Jun 16
3
onCreate not getting triggered.
I am trying to get a loader to display during ajax requests, but the
"onCreate" is not getting triggered. The onComplete does.
function loadComponent(section){
values = arguments[1]
pars = $H(values).toQueryString()
pars = "section="+section+"&"+pars
var url = ''/internal/ajax/requests.php'';
var ComponentLoader = new
2005 Oct 27
3
String.protoype.toQueryParams
Hi, I am trying to play with all the methods in the Array Object.
Just wanted to check with you guys if this is the correct explanation of toQueryParams().
If yes, then I''ll add it to the documentation as well.
Works for me (but I am not sure if it''s the correct way to use it).
/* String.prototype.toQueryParams takes a query string, i.e, string with
name value pairs
2007 Jul 10
9
Other parameters on InPlaceEditor
Hi to all,
I have a doubt on like passing other URL parameters to InPlaceEditor
function.
For Ajax.Updater I can use "parameters:", but for InPlaceEditor (or
InPlaceCollectionEditor) I cannot use "parameters". How I make to pass
other parameters to the page that callback?
A sample code:
----------------------------------
var editor= new Ajax.InPlaceCollectionEditor(el, url,
2007 Apr 17
5
Problem with toQueryParams()
I''m sure this has been covered before, but here goes...
Anybody noticing some odd behavior with submitting forms through
Ajax.Request? I thought at first it was a problem with Form.serialize,
but was able to trace it back to line #975 (in prototype 1.5.1_rc2)
which calls "toQueryParams" on the parameters that are passed into the
new Ajax object if it is a string. This is the
2011 Aug 10
3
How to quickly convert a data.frame into a structure of lists
Hello,
This is my first project in R, so I'm trying to work 'the R way', but it
still feels awkward sometimes.
The problem that I'm facing right now is that I need to convert a data.frame
into a structure of lists. The data.frame has columns in the order of tens
(I need to focus on only three of them) and rows in the order of millions.
So it's quite a big dataset.
Let say
2005 Apr 22
1
Beginner in R
hello ( and sorry for my poor english ... )
I'm a newbie on R software and I need to obtain this kind of system :
a structure, like a liste :
my_struct <- list()
my_struct$a <- a_value
my_struct$b <- another_value
my_struct$c <- one_more_value
and a function with two args : the first is a instance of the structure,
and the second is any component of the structure (here $a, $b
2007 May 28
5
CTI in ActiveRecord
I search an plugin or gem, but don''t find nothing satisfactory. I
believe to be stranger a technology that nails the DRY, have that create
you vary equal tables, instead of using inheritance.
Exists an soluction for this? I want a solution similar to this:
create_table :people |t| do
t.column :name
t.column :address
end
create_table :customer |t| do
t.column :person_id
2006 May 04
6
Login generator ALWAYS says login unseccesfull
Hey I just ran this "ruby script/generate login loging_in" here is my
SQL:
CREATE TABLE `users` (
`id` int(11) NOT NULL auto_increment,
`user_name` varchar(80) default NULL,
`login` varchar(120) NOT NULL default '''',
`last_update` timestamp NOT NULL default ''0000-00-00 00:00:00'',
`last_attack` timestamp NOT NULL default ''0000-00-00
2006 Apr 28
3
Serialize / deserialize an associative array
Perhaps I missed something but I don''t see an easy way to do this ?
Basically just wanna hold some ui state in a cookie.
Did I miss something obvious ?
Best
Matt
***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
Authorized and
2007 Oct 26
0
prototype's toQueryString() weird behavior in IE?
Hi all,
situation: uploader + form with a "title", a "description" and a
"tags" field.
Using prototype I encode those (among other values) to a querystring.
In the case a field is left empty, i want the querystring to look like
this: &title=&message= ...etc.
No problem in FF (pc/mac) but when i submit the empty values to IE,
they are returned as
2007 Mar 25
2
Heaven and Earth
I'm trying to get the Heaven & Earth program (available at
http://www.downport.com/wbd/Traveller_Heaven_&_Earth.ZIP ) to run and am
having problems. There's a read-me at
http://www.downport.com/wbd/Read%20Me.htm which mentions a couple of
possible problems - which I've checked and sorted out, but when I try to
run the program I get a dialog with "System Error
2007 Dec 13
4
please explain find_with_ferret, retrieve_records, :include and :conditions
Hello, I''m using find_with_ferret to search multiple models and it
works great. The trouble is I need to filter the results
using :include and :conditions.
I get two errors depending on the syntax I use in the search. Reading
the source, I see the retrieve_records method seems to filter
the :include and :conditions so that they only apply to the relevant
model when searching
2013 Jul 25
3
is there any way to see what are the resources exported by a node?
Hello folks,
Is there any way to see what are the resources exported by a node when
using puppetdb and exported resources.
I am running puppet 2.7.22 and puppetdb 1.3 on Ubuntu 10.4. I have tried to
use e API and its not working for me(see
https://groups.google.com/forum/#!topicsearchin/puppet-users/puppetdb$20API$20v2$20is$20not$20working$20for$20me/puppet-users/WFo9YEw6oRo
)
Anyone know
2006 May 05
0
Login generator ALWAYS says login unsuccessfull
I''m having a similar problem running Radiant CMS. I set ROR and the
mysql database as instructed but when I try to login with the default
admin login I get the same result as Mohammed. Below is the output from
my log, which is very similar to what he is seeing, along with what I
believe is the hashed password stored in MySQL. The two values don''t
match. I don''t
2008 Jan 16
0
GET Using encodeURIComponent
In my site I use the GET method in Ajax.Request. The problem is that I
make an encodeURIComponent in my personal JavaScript and call other
personal method called "f_ajax" that implement the Ajax.Request. Then
happens 2 encodeURIComponent with my params. Why the GET method make
the encode? Could have an option in Ajax.Request to disable the
encodeURIComponent in prototype (toQueryPair and
2008 Jan 19
1
Set Return Type XML in Prototype
Please help i can''t return xml data using prototype.
If i use data from direct xml file then it works fine but when i use
ajax request with header content xml it''s not working
My code just work on IE but in FF it does not working. My code sample
are given below
If any one already done this kinds of job Please help me as soon as
possible.
var xmlDoc;
function Claulate()
{
var
1998 Jul 01
1
ordinal(): [was "a handy function ..." in March..]
I'm finally cleaning up old things / todo's;
We had about half a dozen e-mails on R-devel back in mid March......
Here is my proposal, a sometimes useful utility for constructing strings
in cat() or text(), legend(), etc.:
ordinal <-
function(i, language =3D "english", gender =3D c("female","male"), sep=3D""=
) {
ii <- i