Displaying 10 results from an estimated 10 matches for "08d".
Did you mean:
08
2005 Dec 19
8
Simply Ruby question: "zerofill"
Hi there-
What''s the easiest/most efficient way to perform a zerofill in Ruby?
i.e. Given the value ''val'', I would like to do something like:
val = 43
puts val.zerofill(8)
---> "00000043"
gsub? sprintf of some sort?
Jake
--
Posted via http://www.ruby-forum.com/.
2010 Feb 01
1
Number with fixed digit length - zero fill-up
Dear R-help members,
I'm quite new to R and I apologize for my basic question, but I haven't
been able to find a solution yet.
I try to interpret vector entries as a binary code, but unfortunately
every first digit which is zero disappears.
So how can I set any number (e.g. x = 10110) to a 8-digit zero fill-up (x
= 00010110) in order to address digit indices?
Or other way round, how
2007 Sep 18
2
Making attachment_fu polymorphic
...Attachment_kung''s
public_filename.
def public_filename(thumbnail = nil)
if path_prefix != ""
path_prefix.gsub!(''public'','''') if path_prefix.include?
(''public'')
path_prefix + ''/'' + ("%08d" %
main_attachment_id).scan(/..../).map{|e|e.to_s + ''/''}.to_s + filename
else
begin
Technoweenie::AttachmentFu::Backends::S3Backend::s3_url
rescue NoMethodError
raise ''Attachment has a bad path, please delete it and upload
it ag...
2010 Oct 10
0
Fwd: Theora developer question.
...udio-st.ogg
> >
> > For the subtitles:
> > kateenc -t srt -l en -c SUB -o output/ogg/tmp-subs_en.ogg
> > input/subtitles/sintel_en.srt
> > (and so on for each sub)
> >
> > For the video:
> > ffmpeg2theora --keyint 250 --framerate 24 -v 7 input/png/%08d.png
> > --title "$title" --artist "$author" --copyright "$copyright"
> > --license "$license" -o output/ogg/tmp-2k.ogv
> >
> > And to mux it all together:
> > oggz-merge output/ogg/tmp-2k.ogv output/ogg/tmp-audio-st.ogg
> >...
2016 Mar 07
0
Re: [PATCH v2] Use less stack.
...(const char *pattern, int len, const char *path)
> int
> do_fill_dir (const char *dir, int n)
> {
> - size_t len = strlen (dir);
> - char filename[len+10];
> int fd;
> int i;
>
> for (i = 0; i < n; ++i) {
> - snprintf (filename, len+10, "%s/%08d", dir, i);
> + CLEANUP_FREE char *filename;
Missing "= NULL" here.
> diff --git a/daemon/luks.c b/daemon/luks.c
> index a720e25..b8530c5 100644
> --- a/daemon/luks.c
> +++ b/daemon/luks.c
> @@ -91,9 +91,11 @@ luks_open (const char *device, const char *key, cons...
2010 Nov 15
21
[XCP] converting a .img to xva
Hey,
Is it possible to covert a .img to a xva?
I have a virtual machine on a xen machine that i would like to run in a xen
cloud.
I used the xva.py and it gave me a xva + kernel i followed the copy
instructions but i get this:
[root@box ~]# xe vm-start vm=converted
Error code: WARNING: /dev/xvda is not a disk image
Error parameters: Traceback (most recent call last):, File
2010 Nov 15
21
[XCP] converting a .img to xva
Hey,
Is it possible to covert a .img to a xva?
I have a virtual machine on a xen machine that i would like to run in a xen
cloud.
I used the xva.py and it gave me a xva + kernel i followed the copy
instructions but i get this:
[root@box ~]# xe vm-start vm=converted
Error code: WARNING: /dev/xvda is not a disk image
Error parameters: Traceback (most recent call last):, File
2016 Mar 07
2
[PATCH v2] Use less stack.
...quot;, len);
@@ -127,13 +133,16 @@ do_fill_pattern (const char *pattern, int len, const char *path)
int
do_fill_dir (const char *dir, int n)
{
- size_t len = strlen (dir);
- char filename[len+10];
int fd;
int i;
for (i = 0; i < n; ++i) {
- snprintf (filename, len+10, "%s/%08d", dir, i);
+ CLEANUP_FREE char *filename;
+
+ if (asprintf (&filename, "%s/%08d", dir, i) == -1) {
+ reply_with_perror ("asprintf");
+ return -1;
+ }
CHROOT_IN;
fd = open (filename, O_WRONLY|O_CREAT|O_NOCTTY|O_CLOEXEC, 0666);
diff --git a/...
2016 Mar 06
8
[PATCH 0/5] Use less stack.
Various changes/fixes to use smaller stack frames.
Rich.
2013 Jul 15
21
[PATCH 00 of 21 RESEND] blktap3/drivers: Introduce tapdisk server.
This patch series copies the core of the tapdisk process from blktap2, with
updates coming from blktap2.5.
Signed-off-by: Thanos Makatos <thanos.makatos@citrix.com>