similar to: Sorting a hash

Displaying 20 results from an estimated 4000 matches similar to: "Sorting a hash"

2006 Apr 09
1
http request, hash table
Hello, My problem is that I cannot figure out how to format data in the http post request using external C++ application, so then I could write in my controller: @myHash = params[:person] print ''Name: '', @myHash[:name] or @name = params[:person][:name] Thanks in advance! -- Jakub P. Nowak
2011 Feb 27
10
How to store the same key multi times in a Hash ?
given an Arra tags[] I need to produce a resulting Hash as following .. { "$in" => [tags[0]], "$in" =>[tags[1], ...} in which the key should be always the same and the value being an Array I tried this : myHash = {} tags.each do |tag| h = {"$in" => [tag]} myHash.merge!(h) end but the merge! is only
2006 Jun 18
4
share an hash ..
Hello, How to share an Hash between all objects (model, controller ect ...) => I did a static Hash in my model where a static method fill it basically, this is the code class Person < ActiveModel @@anHash.new def Person.anHelperMethod(aKey) if anHash.size==0 ... load the hash, some SQL to fill the Hash end return anHash[aKey] end => The problem,: it always
2006 Apr 19
2
how to pass a hash as a parameter in link_to_remote
When using link_to_remote, I''d like to pass along some auxiliary data in the request. It''s a hash of dynamic data that can change with each request. But I get an error when rails trying to "stringify" the hash. For the regular link_to, it works because it turns the hash into a regular GET-like query string. I''m expecting to be able to get my hash as
2016 Dec 01
0
clang error: static_assert failed "Cache the hash code or make functors involved in hash code and bucket index computation default constructible"
Hi, Consider below test case: 1 #include <unordered_map> 2 3 using key=const int; 4 struct Myhash { 5 Myhash() = default; 6 std::hash<int> hash_int_t; 7 inline size_t operator()(const key& x) const throw() { 8 return hash_int_t(x); 9 } 10 }; 11
2010 May 30
4
Data Frame as Hash Table
I'm interested in using a data frame as if it were a hash table. For instance if I had the following, > (d <- data.frame(key=seq(0.5, 3, 0.5), value=rnorm(6))) key value 1 0.5 -1.118665122 2 1.0 0.465122921 3 1.5 -0.529239211 4 2.0 -0.147324638 5 2.5 -1.531503795 6 3.0 -0.002720434 Then I'd like to be able to quickly retrieve the "value" of "key" 1.5
2006 Jul 10
11
prototype hash method
var v1 = { a: ''value for a'', b:''value for b'' } var v2 = { c: ''value for c'', d: function(){some code...} }; var v3 = v2.merge(v1); I''m getting an error doing this... what is wrong?
2006 Jan 24
2
collect array values
This may be more of a Ruby question, but I wasn''t sure. Is there a way to run a find on a model and then save two fields as key => value in an array for each row. Then use this array on the template for checking if various checkbox or select values are checked? I''m trying to avoid running one query to check the value for each box in the form. - Kyle
2023 Mar 18
2
Custom SASL authentication
An HTML attachment was scrubbed... URL: <https://dovecot.org/pipermail/dovecot/attachments/20230318/8ce3c29a/attachment-0001.htm>
2010 Jul 12
13
ANNOUNCE: Puppet 2.6.0 - Release Candidate 2 available!
Welcome back again to the Puppet release cycle with the long-awaited eleventy times better RC2 release. The 2.6.0 release is a major feature release and includes a huge variety of new features, fixes, updates and enhancements. These include the complete cut-over from XMLRPC to the REST API, numerous language enhancements, a complete rewrite of the events and reporting system, an internal Ruby
2012 Mar 28
4
Hash iteration order in a template not consistent
Hi, I did some basic googling, but didn''t find an answer yet. I am sorry if this is a FAQ. In a manifest for creating an Apache config file, I define a hash like this: $aliases = { ''/foo/'' => ''/home/foo/www/'', ''/bar/'' => ''/home/bar/www/'', ''/baz/'' =>
2006 Feb 16
0
RE: Applying list-item format depending on action (Diego Scataglini)
Seth, It really depends how often you do that check. If it happens only once or twice in your whole application, that''s just fine. If it happens more than that and in multiple controllers/views then maybe you want to create a helper for it. Something like this: (didn''t test it, but should be working) module ApplicationHelper def current_id_select(controller, action) (
2014 Jun 02
3
[LLVMdev] -fvisibility=hidden, and typeinfo, and type-erasure
[Was initially posted on cfe-users, sorry.] Hi, I'm sorry my message is quite long, the TL;DR version is "g++ and clang++ seem to have different opinions on how RTTI, templates, and ELF visibility should interact". I can't tell whether this is a bug or not: I have found no relevant documentation that could help me decide whether this behavior is meant, or not. All I can say
2005 Jul 28
2
test failed with acl patch
In the mandriva rpm of rsync, we apply for our rpm the acl patch in the patches directory. I am trying to update our rpm to rsync 2.6.6 but one of the test failed with this patch. It seems to be a minor problem, but can you have a look ? Thanks by advance. Following the message (a bit long): ----- itemize log follows Testing for symlinks using 'test -h' +
2018 Mar 16
3
cat(fill=N)
Hi all, I expect I'm getting something wrong, but cat("foo bar baz foo bar baz foo bar baz", fill = 10) should be broken into lines of width 10, whereas I get: > cat("foo bar baz foo bar baz foo bar baz", fill = 10) foo bar baz foo bar baz foo bar baz This is on R 3.4.3, but I don't see mentions of it fixed in 3.4.4 or r-devel NEWS. Cheers, David
2007 Apr 11
0
Fwd: [ mocha-Bugs-8687 ] Block''s return value is dropped on stubbed yielding methods.
---------- Forwarded message ---------- From: noreply at rubyforge.org <noreply at rubyforge.org> Date: 11-Apr-2007 15:31 Subject: [ mocha-Bugs-8687 ] Block''s return value is dropped on stubbed yielding methods. To: noreply at rubyforge.org Bugs item #8687, was opened at 2007-02-15 17:29 You can respond by visiting:
2009 Jul 26
1
Need help of exclusion options in rsync-3.0.6
Hi, I have a situation where I want to delete some of my excluded patterns but still want to preserve some other. For example consider below source and destination directory hierarchy. Source Dest ---------- --------- /foo/bar/ /foo/bar/ | -> baz | -> baz | -> xyz | -> xyz | ->
2008 Mar 02
3
DO NOT REPLY [Bug 5297] New: merge test fails
https://bugzilla.samba.org/show_bug.cgi?id=5297 Summary: merge test fails Product: rsync Version: 3.0.0 Platform: Other OS/Version: SunOS Status: NEW Severity: normal Priority: P3 Component: core AssignedTo: wayned@samba.org ReportedBy: bfriesen@simple.dallas.tx.us QAContact:
2007 Dec 24
2
Build a cmdline for exec from optional parameters
How can I do this?: foo { name: $bar => "frob" } define foo( $bar = false, $baz = false ) { if #$bar and $baz both defined $cmd = "frobnicate --bar=$bar --baz=$baz ${name}" else if #$bar defined $cmd = "frobnicate --bar=$bar ${name}" else if #$baz defined $cmd = "frobnicate --baz=$baz ${name}" else
2008 Apr 15
1
rsync-3.0.2 fails testsuite in itemize
HI, rsync-3.0.2 with patches/acls.diff,patches/xattrs.diff,patches/slp.diff fails (most of the time) in the itemize test: ----- itemize log follows Testing for symlinks using 'test -h' makepath /usr/src/packages/BUILD/rsync-3.0.2/testtmp/itemize/from/foo makepath /usr/src/packages/BUILD/rsync-3.0.2/testtmp/itemize/from/bar/baz cd+++++++++ ./ cd+++++++++ bar/