search for: newp

Displaying 10 results from an estimated 10 matches for "newp".

Did you mean: new
2020 Apr 20
1
Re: [PATCH nbdkit 2/2] Add insert function and use the new vector library in several places.
...> 6 files changed, 119 insertions(+), 123 deletions(-) > +++ b/plugins/eval/eval.c > @@ -104,21 +106,12 @@ compare_script (const void *methodvp, const void *entryvp) > static int > insert_method_script (const char *method, char *script) > { > - struct method_script *newp; > - size_t i; > int r; > + size_t i; > + struct method_script new_entry = { .method = method, .script = script }; > > - newp = realloc (method_scripts, > - sizeof (struct method_script) * (nr_method_scripts + 1)); > - if (newp == NULL) { > -...
2003 Feb 24
0
Is Samba made for trash?!? Newp.
> -----Original Message----- > From: Jean-Paul ARGUDO [mailto:jean.paul.argudo@pack-solutions.com] > Many times a day, clients here when oppening a MS Word 97 > document have > it in "READ ONLY" mode, but seems no reason fort that!! Make very, very sure that you have no network problems. I had a very similar problem with AutoCAD that turned out to be a user who was on
2008 Aug 28
2
sample consecutive integers efficiently
...sampled integers need to be consecutive. Im hoping somebody knows a faster way of doing it than I have. ATM its way to slow on large vectors. samplePos<-function(l){ start.pos<-sample(pos,1) end.pos<-start.pos+l-1 posies<-start.pos:end.pos posies } s.start<-c() newPos<-function(a){ rp<-samplePos(a) #test sampled range is consecutive, if not resample if (length(rp) != rp[a]+1 -rp[1]){rp<-samplePos(a)} pos<-setdiff(pos,rp) rp[1] } newps<-c() newps<-unlist(lapply(lengths,newPos)) I think the bottleneck may be on the setdiff...
2020 Apr 19
2
[PATCH nbdkit 1/2] vddk: Use new vector library to allocate the argv list.
--- plugins/vddk/vddk.c | 41 +++++++++++++++++++++++++---------------- TODO | 1 - 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/plugins/vddk/vddk.c b/plugins/vddk/vddk.c index 87c0d146..d1a3015f 100644 --- a/plugins/vddk/vddk.c +++ b/plugins/vddk/vddk.c @@ -51,6 +51,7 @@ #include "isaligned.h" #include "minmax.h" #include
2013 Apr 07
3
mlogit error
...1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L ), GPspec = structure(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("Special interest GP", "No special interest"), class = "factor"), Newp = structure(c(4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L), .Label = c("Always among first to try new product", "Like to try new regimens when available", "Wait to be confortable how the product works", "Prefe...
2005 Oct 14
1
Diff between attr_accessible and attr_accessor
I''m going though the paper back edition of agile development with Rails. On page #128 I encountered following lines of code: attr_accessor :password attr_accessible :name,:password What''s the difference between attr_accessor and attr_accessible? -=- Neeraj _______________________________________________ Rails mailing list
2020 Apr 19
0
[PATCH nbdkit 2/2] Add insert function and use the new vector library in several places.
...pt); +static method_script_list method_scripts; static int compare_script (const void *methodvp, const void *entryvp) @@ -104,21 +106,12 @@ compare_script (const void *methodvp, const void *entryvp) static int insert_method_script (const char *method, char *script) { - struct method_script *newp; - size_t i; int r; + size_t i; + struct method_script new_entry = { .method = method, .script = script }; - newp = realloc (method_scripts, - sizeof (struct method_script) * (nr_method_scripts + 1)); - if (newp == NULL) { - nbdkit_error ("insert_method_script: re...
2007 Mar 09
0
17 commits - libswfdec/js libswfdec/swfdec_js.c libswfdec/swfdec_js_global.c libswfdec/swfdec_js.h libswfdec/swfdec_js_movie.c libswfdec/swfdec_movie.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_root_movie.c
...1 2007 +0100 still return JS_TRUE in the failure case, JS_FALSE is for OOM diff --git a/libswfdec/swfdec_js.c b/libswfdec/swfdec_js.c index 44f9cb8..3e96503 100644 --- a/libswfdec/swfdec_js.c +++ b/libswfdec/swfdec_js.c @@ -497,5 +497,5 @@ swfdec_js_construct_object (JSContext *c fail: *newp = NULL; - return JS_FALSE; + return JS_TRUE; } diff-tree c37dc7eeab2b781b1400b15b8e4a1c50b846543b (from 2840d8d12a279fe3b7132f236d73789a4c5d3403) Author: Benjamin Otte <otte@gnome.org> Date: Fri Mar 9 14:02:45 2007 +0100 unregister trace signal when unsetting player diff --git a/pl...
2007 Jun 27
0
Branch 'as' - 16 commits - configure.ac libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_frame.h libswfdec/swfdec_as_function.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_script_function.c
...ail (cx != NULL); - g_return_if_fail (str != NULL); - - swfdec_js_eval_internal (cx, obj, str, &val, TRUE); -} - -/** - * swfdec_js_construct_object: - * @cx: the #JSContext - * @clasp: class to use for constructing the object - * @constructor: a jsval possibly referring to a constructor - * @newp: pointer to variable that will take the created object or NULL on - * failure - * - * Constructs a JSObject for the given @constructor, if it really is a - * constructor. - * <note>The object is only constructed, the constructor is not called. - * You can easily do this with JS_Invok...
2009 Aug 03
1
[PATCH 1/2] Convert all TABs-as-indentation to spaces.
...;guestfs_int_lvm_%s_list *\n" typ; - pr "parse_command_line_%ss (void)\n" typ; - pr "{\n"; - pr " char *out, *err;\n"; - pr " char *p, *pend;\n"; - pr " int r, i;\n"; - pr " guestfs_int_lvm_%s_list *ret;\n" typ; - pr " void *newp;\n"; - pr "\n"; - pr " ret = malloc (sizeof *ret);\n"; - pr " if (!ret) {\n"; - pr " reply_with_perror (\"malloc\");\n"; - pr " return NULL;\n"; - pr " }\n"; - pr "\n"; - pr " ret->guestfs_int_lvm...