search for: stringify

Displaying 20 results from an estimated 159 matches for "stringify".

2011 Nov 05
1
Newbie Question/Feature Request
Hi, I'm working on a plugin for qpsmtpd (a perl smtp frontend) that delivers mail via dovecot's LDA. I can only get mail delivered by writing the email to file, then calling 'deliver -d someone -f someone-else < /path/to/temp/email' All good, expected behavior. A perl snippet: local $/=undef; open FH, "< ./demo.mail"; my $stringified = <FH>; # this is
2003 Jan 29
2
substitute, eval and hastables
I have the following problem. I have an automatically generated named list with "stringified" names: a <- list("A"=..., "B"=..., "C"=..., ) then I want to refer to the elements of the list, stored as an vector of names: nn <- c("A", "B", "C"), so that I could get list elements like a$nn[1], a$nn[2], etc. Obviously it
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 params[:myhash] # => my hash data inside my controller action, but this only works for link_to, not link_to_remote. My work...
2011 Jan 26
1
[PATCH] Display verbose error message when guest storage isn't found
...$self->{vmm}->get_storage_volume_by_path($path); }; - die(user_message(__x("Failed to retrieve storage volume {path}:". - "{error}", - path => $path, - error => $@->stringify()))) if($@); + if ($@->code == Sys::Virt::Error->ERR_NO_STORAGE_VOL) { + die user_message(__x("Failed to retrieve volume information for ". + "{path}. This could be because the volume ". + &q...
2014 Oct 02
3
[LLVMdev] How do I update Ocaml debug info? (was Re: [llvm] r218914 - DI: Fold constant arguments into a single MDString)
-llvm-commits, +llvmdev > On Oct 2, 2014, at 2:57 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: > > Author: dexonsmith > Date: Thu Oct 2 16:56:57 2014 > New Revision: 218914 > > URL: http://llvm.org/viewvc/llvm-project?rev=218914&view=rev > Log: > DI: Fold constant arguments into a single MDString > > This patch addresses the first
2006 Jan 17
9
Formatting a float with a set number of decimals
Another newbie question: How do i convert a float to a string, rounded to a certain number of decimals? Thanks -- Posted via http://www.ruby-forum.com/.
2020 May 13
0
Tip/Question about encoding temporary data for storage in Asterisk variable to use in AGI
...all! The following is a simple example which just encodes and decodes the agi variables themselves as they're an object in ts-agi (I'm using the ts-agi node package here as an example - https://github.com/sergey12313/ts-agi/ ) await ctx.setVariable('testvar2', Buffer.from(JSON.stringify(ctx.variables), 'utf8').toString('base64')) const testvar2 = (await ctx.getVariable('testvar2')).value const decoded = JSON.parse(Buffer.from(testvar2, 'base64').toString('utf8')) console.log('decoded is', decoded) Hope this helps someon...
2020 Apr 17
0
[PATCH i-g-t v3 1/5] lib/igt_core: Fix igt_assert_fd() documentation
From: Lyude Paul <lyude at redhat.com> As Petri Latvala pointed out, some of the documentation in this macro is mistakenly copied from the other igt_assert*() macros. Let's fix that. Signed-off-by: Lyude Paul <lyude at redhat.com> --- lib/igt_core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/igt_core.h b/lib/igt_core.h index b97fa2fa..3f69b072
2020 Sep 30
0
[PATCH i-g-t v5 1/5] lib/igt_core: Fix igt_assert_fd() documentation
From: Lyude Paul <lyude at redhat.com> As Petri Latvala pointed out, some of the documentation in this macro is mistakenly copied from the other igt_assert*() macros. Let's fix that. Signed-off-by: Lyude Paul <lyude at redhat.com> --- lib/igt_core.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/igt_core.h b/lib/igt_core.h index c5871520..e74ede8b
2006 Jan 15
1
Cloning a one-many association
...opy of an object with its associations, and I am looking for an elegant solution. This is what I intuitively think should work, but it doesn''t: order2 = order1.clone order1.line_items.each do |o| order2.line_items.build(o) end This doesn''t work because a model class does not stringify its keys ... so I can''t pass an object into a method that wants a hash, because an object doesn''t convert itself to a hash when needed. Is there a simple way to solve this problem, or is this something where I will need to do my own plumbing of sorts? Thanks Joerg -- Posted...
2012 Jan 26
1
[PATCH v2] libxl: fix mutex initialization
...const char *s, libxl_mac mac); /* compare mac address @a and @b. 0 if the same, -ve if a<b and +ve if a>b */ _hidden int libxl__compare_macs(libxl_mac *a, libxl_mac *b); +/* init a recursive mutex */ +_hidden int libxl__init_recursive_mutex(libxl_ctx *ctx, pthread_mutex_t *lock); #define STRINGIFY(x) #x #define TOSTRING(x) STRINGIFY(x)
2015 Jan 09
5
[LLVMdev] Enable changing UnsafeFPMath on a per-function basis
...n), change the function attribute in the IR based on the value of command line option “enable-unsafe-pf-math” (EnableUnsafeFPMath, defined in CommandFlags.h). 2. Replace usages of TargetOptions::UnsafeFPMath with calls to a function which gets the value of attribute “unsafe-fp-math” in the IR. 3. Stringify function attribute “unsafe-fp-math” and append it to the string that is used as the lookup key in TargetMachine::getSubtargetImpl(const Function&). Also, pass the function attribute to the subtarget constructors that need it to construct itself (e.g., ARM) or construct one of the backend object...
2008 May 30
1
Drag and Drop with scriptaculous
Hello, I''m making my first steps with prototype and scriptaculous. I''m playing around with drag and drop. What I try to do: I have some Draggables and some Droppables. You can drag each Draggables to each Droppables. When I drop a Draggables I want to center the Draggables inside the Droppable. And here I get my first problems:-( I use this code: Droppables.add(
2008 Jan 18
6
[PATCH 0/10] Tree fixes for PARAVIRT
Hi, This small series provides some more fixes towards the goal to have the PARAVIRT selectable for x86_64. After that, just some more small steps are needed. The first fix is not even specific for PARAVIRT, and it's actually preventing the whole tree from booting.
2008 Jan 18
6
[PATCH 0/10] Tree fixes for PARAVIRT
Hi, This small series provides some more fixes towards the goal to have the PARAVIRT selectable for x86_64. After that, just some more small steps are needed. The first fix is not even specific for PARAVIRT, and it's actually preventing the whole tree from booting.
2019 Mar 22
0
[PATCH 4/4] OCaml tools: output messages into JSON for machine readable
...= -1) + unix_error (errno, (char *) "clock_gettime", Val_unit); + + if (localtime_r (&ts.tv_sec, &tm) == NULL) + unix_error (errno, (char *) "localtime_r", caml_copy_int64 (ts.tv_sec)); + + /* Sadly strftime does not support nanoseconds, so what we do is: + * - stringify everything before the nanoseconds + * - print the nanoseconds + * - stringify the rest (i.e. the timezone) + * then place ':' between the hours, and the minutes of the + * timezone offset. + */ + + ret = strftime (buf, sizeof (buf), "%Y-%m-%dT%H:%M:%S.", &tm); + if...
2007 Jan 30
5
errors while testing resource controller using rpec
I am testing a resource called venue in this piece of code (generated using script/rspec_resource) ==================== context "Requesting /venues using POST" do controller_name :venues setup do @mock_venue = mock(''Venue'') @mock_venue.stub!(:save).and_return(true) @mock_venue.stub!(:to_param).and_return(1) Venue.stub!(:new).and_return(@mock_venue)
2020 Sep 30
9
[PATCH i-g-t v5 0/5] Add nouveau-crc tests
From: Lyude Paul <lyude at redhat.com> Nouveau has finally gotten CRC support, and at this point that support has made its way upstream. Hooray! So, let's start adding some relevant tests for it since nvidia's CRC implementation has some rather interesting design choices that needed to be worked around. Lyude Paul (5): lib/igt_core: Fix igt_assert_fd() documentation
2015 Apr 30
0
[PATCH 4/6] x86: introduce new pvops function spin_unlock
...f --git a/arch/x86/kernel/paravirt_patch_32.c b/arch/x86/kernel/paravirt_patch_32.c index d9f32e6..628c23b 100644 --- a/arch/x86/kernel/paravirt_patch_32.c +++ b/arch/x86/kernel/paravirt_patch_32.c @@ -1,4 +1,6 @@ #include <asm/paravirt.h> +#include <asm/spinlock.h> +#include <linux/stringify.h> DEF_NATIVE(pv_irq_ops, irq_disable, "cli"); DEF_NATIVE(pv_irq_ops, irq_enable, "sti"); @@ -12,6 +14,14 @@ DEF_NATIVE(pv_mmu_ops, read_cr3, "mov %cr3, %eax"); DEF_NATIVE(pv_cpu_ops, clts, "clts"); DEF_NATIVE(pv_cpu_ops, read_tsc, "rdtsc")...
2010 Mar 31
3
[PATCH] Remove v2v-snapshot
...- else { - print $dom->toString(); - } -} - -else { - eval { - $vmm->define_domain($dom->toString()); - }; - - if($@) { - print STDERR user_message(__x("Unable to create guest: {error}", - error => $@->stringify())); - print STDERR user_message(__"Consider using the --outputxml option"); - - # Write the output to a temporary file - my ($out, $outputxml) = tempfile(_get_guest_name($dom).'-XXXXXX', - SUFFIX => '.xml');...