similar to: How to get first 10 items from hash in ruby?

Displaying 20 results from an estimated 10000 matches similar to: "How to get first 10 items from hash in ruby?"

2009 Sep 17
2
Can i use "form_remote_tag" inside the "form_tag"?
Hi all, How can i use form_remote_tag inside the form_tag helper . My application has following view subscribe.html.haml - form_tag :action => :subscribe do /other form element %input{:type=>''radio'', :name=>''tariff_plan_id'', :value=>"monthly"} %input{:type=>''radio'',
2013 Jul 25
1
[LLVMdev] Passing String to an external function in llvm
> OK - seems you might want to take a few steps back & understand how > C++ code is written/structured generally (and/or take a look at other > parts of the compiler). You'll need a header file with the declaration > of your function & you can include that header file in the > hashtable.cpp and testing.cpp - if that sentence doesn't make sense to > you yet, please
2013 Jul 25
0
[LLVMdev] Passing String to an external function in llvm
On Thu, Jul 25, 2013 at 11:40 AM, Abhinash Jain <omnia at mailinator.com> wrote: > I have one file named hashtable.cpp whose link is > "http://pastebin.com/Cq2Qy50C" > > and one llvm pass named testing.cpp whose link is > "http://pastebin.com/E3RemxLF" > > Now on this testing.cpp pass I have computed the string named "expr" which I > want
2013 Jul 25
2
[LLVMdev] Passing String to an external function in llvm
I have one file named hashtable.cpp whose link is "http://pastebin.com/Cq2Qy50C" and one llvm pass named testing.cpp whose link is "http://pastebin.com/E3RemxLF" Now on this testing.cpp pass I have computed the string named "expr" which I want to pass to the function named hashtable(string) in hashtable.cpp (on line 106 of testing.cpp) > looking at simple
2008 Apr 06
3
Multiset Permutations
Dear R users, I want to perform an exact permutation of multisets. I have looked at the coin package, but it doesn't seem to offer what I am looking for. I want to perform permutations (exact - without duplications) on multisets of scalars (e.g., the multiset 0,0,1,2,2). I want to output all the possible permutations into a data frame so that each multiset permutation occupies a row (or
2005 Aug 12
8
Java Problems
Hi. This post follows on from: http://lists.xensource.com/archives/html/xen-devel/2005-04/msg00185.html And is possibly related to the bug referenced here: http://bugs.sun.com/bugdatabase/view_bug.do;:YfiG?bug_id=4335360 In summary: Java processes are doing odd things. 1) It appears that number values are mysteriously changing. e.g. if you look at the Hashtable error there is no way the
2010 Mar 11
1
Associative array?
Hi, can someone tell me how to use associative arrays in R? It can be a hashtable or some kind of tree, as long as the lookups aren't O(n). One way to do this is to use names, e.g. in: list(a=3, ...)[["a"]] presumably looking up "a" is very quick. (Can someone tell me offhand how that is implemented? Hashtable?) However, if I wanted to, say, memoize a numeric
2014 Nov 12
2
How to maintain memory in R extension
Hello, I wrote a system to perform data analysis in C++. Now I am integrating it to R. I need to allocate memory for my own C++ data structures, which can't be represented by any R data structures. I create a global hashtable to keep a reference to the C++ data structures. Whenever I allocate one, I register it in the hashtable and return its key to the R code. So later on, the R code can
2017 Jun 30
2
llvm-profdata determinism
On Thu, Jun 29, 2017 at 7:03 PM Xinliang David Li <davidxl at google.com> wrote: > On Thu, Jun 29, 2017 at 6:27 PM, David Blaikie <dblaikie at gmail.com> wrote: > >> I haven't tested it, but it looks to me like llvm-profdata merge (well, >> InstrProfWriter specifically) would not have deterministic output. >> >> Certainly the textual output iterates
2017 Jun 30
0
llvm-profdata determinism
On Thu, Jun 29, 2017 at 7:26 PM, David Blaikie <dblaikie at gmail.com> wrote: > > > On Thu, Jun 29, 2017 at 7:03 PM Xinliang David Li <davidxl at google.com> > wrote: > >> On Thu, Jun 29, 2017 at 6:27 PM, David Blaikie <dblaikie at gmail.com> >> wrote: >> >>> I haven't tested it, but it looks to me like llvm-profdata merge (well,
2012 Aug 16
1
Where does "cmd" initailize in qemu_command.c?
Hi, Excuse me, I have a question when I reading the libvirt source codes. I have known the process of how libvirt start/manage qemu, since I need to write a driver based on libvirt. But one thing also confused, please give me some tips. 1. In qemu_command.c, there is a function call "cmd = virCommandNewArgList(emulator, "-S", NULL);", which
2012 Aug 30
0
[PATCH 09/11] vmci_resource.patch: VMCI resource hash table implementation.
Signed-off-by: George Zhang <georgezhang at vmware.com> --- drivers/misc/vmw_vmci/vmci_resource.c | 190 +++++++++++++++++++++++++++++++++ drivers/misc/vmw_vmci/vmci_resource.h | 59 ++++++++++ 2 files changed, 249 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/vmw_vmci/vmci_resource.c create mode 100644 drivers/misc/vmw_vmci/vmci_resource.h diff --git
2012 Aug 30
0
[PATCH 09/11] vmci_resource.patch: VMCI resource hash table implementation.
Signed-off-by: George Zhang <georgezhang at vmware.com> --- drivers/misc/vmw_vmci/vmci_resource.c | 190 +++++++++++++++++++++++++++++++++ drivers/misc/vmw_vmci/vmci_resource.h | 59 ++++++++++ 2 files changed, 249 insertions(+), 0 deletions(-) create mode 100644 drivers/misc/vmw_vmci/vmci_resource.c create mode 100644 drivers/misc/vmw_vmci/vmci_resource.h diff --git
2006 Jan 30
2
beginner Q: hashtable or dictionary?
Hi, Is there something like a hashtable or (python) dictionary in R/Splus? (If not, is there a reason why it's not needed / typical way to accomplish the same thing?) Thank you
2004 Jun 25
4
more questions.
I forgot to ask a few more. Is there a relation between the hashtable ID /(parent,handle) so that if I used 2: for a hash table I could or couldn''t use 2: for a (parent,handle)ID? I also noticed that you type the hashtables like 2:2: can you have more levels with this? like 2:2:2:1: ? and I guess the same question with the parent/handles. thanks again. -- When dealing with a slow
2009 Aug 03
2
[PATCH] New commands to list devices by UUID and label
This isn't very well tested at the moment because my main testing machine is broken. So just for comment, only to be applied with caution. This patch has two new commands which make it much easier to look up filesystems by their UUID or label. They are: list-devices-by-uuid list-devices-by-label Each returns a hashtable (or whatever the equivalent structure is in your favourite
2009 Apr 22
1
[PATCH 1/1] OCFS2: fasten dlm_lock_resource hash_table lookups
#backporting the 3 patches at http://kernel.us.oracle.com/~smushran/srini/ to 1.2. enlarge hash_table capacity to fasten hash_table lookups. Signed-off-by: Wengang wang <wen.gang.wang at oracle.com> -- diff -up ./svnocfs2-1.2/fs/ocfs2/dlm/dlmdebug.c.orig ./svnocfs2-1.2/fs/ocfs2/dlm/dlmdebug.c --- ./svnocfs2-1.2/fs/ocfs2/dlm/dlmdebug.c.orig 2009-04-22 11:00:37.000000000 +0800 +++
2009 Jun 08
1
[SUGGESSTION 1/1] OCFS2: automatic dlm hash table size
backgroud: ocfs2 dlm uses a hash table to store dlm_lock_resource objects. the often used lookup is performed on the hash table. problem: for usages that there are huge number of inodes(thus huge number of dlm_lock_resource objects) in a ocfs2 volume, the lookup performance becomes a problem. the lookup holds spin_lock which could put all others cpus into the state of aquring the spinlock. if
2015 Mar 19
4
[PATCH 8/9] qspinlock: Generic paravirt support
On Thu, Mar 19, 2015 at 11:12:42AM +0100, Peter Zijlstra wrote: > So I was now thinking of hashing the lock pointer; let me go and quickly > put something together. A little something like so; ideally we'd allocate the hashtable since NR_CPUS is kinda bloated, but it shows the idea I think. And while this has loops in (the rehashing thing) their fwd progress does not depend on other
2015 Mar 19
4
[PATCH 8/9] qspinlock: Generic paravirt support
On Thu, Mar 19, 2015 at 11:12:42AM +0100, Peter Zijlstra wrote: > So I was now thinking of hashing the lock pointer; let me go and quickly > put something together. A little something like so; ideally we'd allocate the hashtable since NR_CPUS is kinda bloated, but it shows the idea I think. And while this has loops in (the rehashing thing) their fwd progress does not depend on other