Displaying 15 results from an estimated 15 matches for "n_items".
Did you mean:
_items
2017 Aug 18
1
Meta-regression of categorical variables
...coefficients for each category of the moderator variable?
Take the reliablity generalization as an example. Here is an example of my code.
#meta-analysis using transformed alpha values (using the transformation suggested by Bonett, 2002)
res<-rma(measure="ABT", ai=ai, ni=size, mi=n_items, dat=data)
res
backtransf_res<-predict(res, transf=transf.iabt)
backtransf_res
#meta-regression of categorical variables
#take var1 as an example of categorical moderator variable
res_var1<-rma(measure="ABT", ai=ai, ni=size, mi=n_items, mods=~var1, dat=data)
res_var1
transf_res_var...
2007 Mar 05
0
11 commits - configure.ac libswfdec/swfdec_js_movie.c libswfdec/swfdec_root_movie.c libswfdec/swfdec_root_movie.h libswfdec/swfdec_script.c libswfdec/swfdec_sprite.c libswfdec/swfdec_sprite.h libswfdec/swfdec_sprite_movie.c libswfdec/swfdec_swf_decoder.c
...ec/swfdec_script.c
+++ b/libswfdec/swfdec_script.c
@@ -1459,6 +1459,36 @@ swfdec_action_init_object (JSContext *cx
}
static JSBool
+swfdec_action_init_array (JSContext *cx, guint action, const guint8 *data, guint len)
+{
+ JSStackFrame *fp = cx->fp;
+ JSObject *array;
+ int i, j;
+ guint n_items;
+
+ if (!JS_ValueToECMAUint32 (cx, fp->sp[-1], &n_items))
+ return JS_FALSE;
+ if ((guint) (fp->sp - fp->spbase) < n_items + 1) {
+ SWFDEC_ERROR ("not enough stack space");
+ return JS_FALSE;
+ }
+
+ /* items are the wrong order on the stack */
+ j = - 1 - n...
2007 Feb 14
0
7 commits - libswfdec/swfdec_image.c libswfdec/swfdec_script.c libswfdec/swfdec_script.h test/Makefile.am test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_list.c test/swfedit_tag.c test/swfedit_token.c test/swfedit_token.h test/swfscript.c
...edit_list.c
index 289d7de..36e0295 100644
--- a/test/swfedit_list.c
+++ b/test/swfedit_list.c
@@ -46,9 +46,25 @@ swfedit_list_changed (SwfeditToken *toke
swfedit_token_set_visible (token, j, entry->value != NULL);
}
}
+ /* update length */
+ j = list->def[i % list->n_defs].n_items;
+ if (j != 0) {
+ SwfeditTokenEntry *entry = &g_array_index (token->tokens,
+ SwfeditTokenEntry, j - 1);
+ if (entry->type == SWFEDIT_TOKEN_UINT32) {
+ SwfdecOut *out = swfdec_out_open ();
+ SwfdecBuffer *buffer;
+ swfedit_tag_write_token (token, out, i);
+ bu...
2007 Feb 13
0
9 commits - libswfdec/js libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_codec_screen.c libswfdec/swfdec_image.c libswfdec/swfdec_script.c test/Makefile.am test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_file.c
...nt;
offset = 0;
while (TRUE) {
def = list->def;
@@ -120,7 +121,10 @@ swfedit_list_new_read (SwfdecBits *bits,
def++;
for (;def->name != NULL; def++) {
- swfedit_tag_read_tag (SWFEDIT_TOKEN (list), bits, def);
+ SwfeditTagDefinition def2 = *def;
+ if (def2.n_items)
+ def2.n_items += offset;
+ swfedit_tag_read_tag (SWFEDIT_TOKEN (list), bits, &def2);
}
offset += list->n_defs;
}
diff --git a/test/swfedit_list.h b/test/swfedit_list.h
index d51ae73..e0666f7 100644
--- a/test/swfedit_list.h
+++ b/test/swfedit_list.h
@@ -49,7 +49,8 @@ stru...
2007 Jan 24
0
Branch 'interpreter' - 8 commits - libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_js.c libswfdec/swfdec_js.h libswfdec/swfdec_script.c test/swfdec_out.c test/swfdec_out.h test/swfedit_tag.c test/swfedit_token.c test/swfedit_token.h
..._rgb_write, swfedit_rgb_read },
+ { swfedit_rgba_write, swfedit_rgba_read },
};
void
@@ -156,14 +182,16 @@ swfedit_tag_read_token (SwfeditToken *to
typedef struct {
const char * name; /* name to use for this field */
SwfeditTokenType type; /* type of this field */
- guint n_items; /* field to look at for item count */
+ guint n_items; /* field to look at for item count (or 0 to use 1 item) */
guint hint; /* hint to pass to field when creating */
} SwfeditTagDefinition;
static const SwfeditTagDefinition ShowFrame[] = { { NULL, 0, 0, 0 } };
+static const Swfed...
2008 Jan 07
0
12 commits - configure.ac doc/swfdec.types Makefile.am test/crashfinder.c test/dump.c test/Makefile.am test/swfdec-extract.c test/swfdec_out.c test/swfdec_out.h test/swfedit.c test/swfedit_file.c test/swfedit_file.h test/swfedit_list.c test/swfedit_list.h
...ist_changed (SwfeditToken *token, guint i)
-{
- guint j;
- SwfeditList *list = SWFEDIT_LIST (token);
- SwfeditTokenEntry *entry = &g_array_index (token->tokens, SwfeditTokenEntry, i);
-
- /* update visibility */
- for (j = i + 1; j % list->n_defs != 0; j++) {
- if (list->def[j].n_items == (j % list->n_defs) + 1) {
- swfedit_token_set_visible (token, j, entry->value != NULL);
- }
- }
- /* update length */
- j = list->def[i % list->n_defs].n_items;
- if (j != 0) {
- entry = &g_array_index (token->tokens,
- SwfeditTokenEntry, j - 1);
- if (entry...
2007 Apr 04
0
Branch 'as' - 4 commits - libswfdec/Makefile.am libswfdec/swfdec_as_context.c libswfdec/swfdec_as_frame.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_interpret.h libswfdec/swfdec_as_object.c libswfdec/swfdec_as_types.c libswfdec/swfdec_as_types.h
...urn JS_FALSE;
+ }
+ fp->sp -= 2 * n_args;
+ fp->sp[-1] = OBJECT_TO_JSVAL (object);
+ return JS_TRUE;
+}
+
+static void
+swfdec_action_init_array (SwfdecAsContext *cx, guint action, const guint8 *data, guint len)
+{
+ JSStackFrame *fp = cx->fp;
+ JSObject *array;
+ int i, j;
+ guint n_items;
+
+ if (!JS_ValueToECMAUint32 (cx, fp->sp[-1], &n_items))
+ return JS_FALSE;
+ if (!swfdec_script_ensure_stack (cx, n_items + 1))
+ return JS_FALSE;
+
+ /* items are the wrong order on the stack */
+ j = - 1 - n_items;
+ for (i = - 2; i > j; i--, j++) {
+ jsval tmp = fp->...
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
...uot;);
+ if (!swfdec_script_ensure_stack (cx, 2 * n_args + 1))
return JS_FALSE;
- }
object = JS_NewObject (cx, &js_ObjectClass, NULL, NULL);
if (object == NULL)
@@ -1519,10 +1553,8 @@ swfdec_action_init_array (JSContext *cx,
if (!JS_ValueToECMAUint32 (cx, fp->sp[-1], &n_items))
return JS_FALSE;
- if ((guint) (fp->sp - fp->spbase) < n_items + 1) {
- SWFDEC_ERROR ("not enough stack space");
+ if (!swfdec_script_ensure_stack (cx, n_items + 1))
return JS_FALSE;
- }
/* items are the wrong order on the stack */
j = - 1 - n_items;
@@...
2007 Jul 18
0
12 commits - configure.ac doc/swfdec-sections.txt libswfdec-gtk/swfdec_playback_alsa.c libswfdec/jpeg libswfdec/Makefile.am libswfdec/swfdec_amf.c libswfdec/swfdec_as_array.c libswfdec/swfdec_as_boolean.h libswfdec/swfdec_as_context.c
...0100
fix warning I missed earlier
diff --git a/test/swfedit_list.c b/test/swfedit_list.c
index 36e0295..45e0dd5 100644
--- a/test/swfedit_list.c
+++ b/test/swfedit_list.c
@@ -49,7 +49,7 @@ swfedit_list_changed (SwfeditToken *toke
/* update length */
j = list->def[i % list->n_defs].n_items;
if (j != 0) {
- SwfeditTokenEntry *entry = &g_array_index (token->tokens,
+ entry = &g_array_index (token->tokens,
SwfeditTokenEntry, j - 1);
if (entry->type == SWFEDIT_TOKEN_UINT32) {
SwfdecOut *out = swfdec_out_open ();
diff-tree 6ae045ecd4718c78b02f2e0b...
2007 Apr 04
0
Branch 'as' - 17 commits - configure.ac doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt doc/swfdec.types libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_gtk_loader.h
...text *cx, Swf
SWFDEC_ERROR ("no parse func for AMF type %u", type);
return FALSE;
}
- return func (cx, bits, rval);
+ return func (context, bits, rval);
}
+/* FIXME: parsed values aren't gc rooted... */
guint
-swfdec_amf_parse (JSContext *cx, SwfdecBits *bits, guint n_items, ...)
+swfdec_amf_parse (SwfdecAsContext *context, SwfdecBits *bits, guint n_items, ...)
{
va_list args;
guint i;
- g_return_val_if_fail (cx != NULL, 0);
+ g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), 0);
g_return_val_if_fail (bits != NULL, 0);
va_start (args, n_items);...
2010 Mar 11
2
[PATCH FOR DISCUSSION ONLY] Rewrite libguestfs-supermin-helper in C.
This needs loads more testing before we include it. However it's in
good shape for testing and review.
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
-------------- next part
2002 Oct 05
2
ogg123 remote interface
...ay = playlist_to_array(options.playlist, &items);
+ playlist_array = playlist_to_array(options.playlist);
playlist_destroy(options.playlist);
options.playlist = NULL;
}
@@ -342,10 +341,16 @@
/* Shuffle playlist */
if (options.shuffle) {
- srandom(time(NULL));
+ int n_items = 0;
+
+ for (i = 0; playlist_array[i]; i++) {
+ n_items++;
+ }
- for (i = 0; i < items; i++) {
- int j = i + random() % (items - i);
+ srandom(time(NULL));
+
+ for (i = 0; playlist_array[i]; i++) {
+ int j = i + random() % (n_items - i);
char *temp =...
2007 Jul 02
0
Branch 'as' - 24 commits - configure.ac doc/Makefile.am doc/swfdec-sections.txt libswfdec/Makefile.am libswfdec/swfdec_amf.c libswfdec/swfdec_as_array.c libswfdec/swfdec_as_context.c libswfdec/swfdec_as_context.h libswfdec/swfdec_as_frame.c
...fail:
- swfdec_as_object_unroot (array);
return FALSE;
}
@@ -207,7 +200,6 @@ swfdec_amf_parse_one (SwfdecAsContext *c
return func (context, bits, rval);
}
-/* FIXME: parsed values aren't gc rooted... */
guint
swfdec_amf_parse (SwfdecAsContext *context, SwfdecBits *bits, guint n_items, ...)
{
diff --git a/libswfdec/swfdec_as_array.c b/libswfdec/swfdec_as_array.c
index 7415667..dc2fc56 100644
--- a/libswfdec/swfdec_as_array.c
+++ b/libswfdec/swfdec_as_array.c
@@ -132,9 +132,7 @@ swfdec_as_array_new (SwfdecAsContext *co
g_return_val_if_fail (context->Array != NULL, NULL);...
2007 Feb 06
0
109 commits - configure.ac libswfdec/js libswfdec/Makefile.am libswfdec/swfdec_bits.c libswfdec/swfdec_bits.h libswfdec/swfdec_buffer.c libswfdec/swfdec_button_movie.c libswfdec/swfdec_codec_screen.c libswfdec/swfdec_color.c libswfdec/swfdec_color.h
..._rgb_write, swfedit_rgb_read },
+ { swfedit_rgba_write, swfedit_rgba_read },
};
void
@@ -156,14 +182,16 @@ swfedit_tag_read_token (SwfeditToken *to
typedef struct {
const char * name; /* name to use for this field */
SwfeditTokenType type; /* type of this field */
- guint n_items; /* field to look at for item count */
+ guint n_items; /* field to look at for item count (or 0 to use 1 item) */
guint hint; /* hint to pass to field when creating */
} SwfeditTagDefinition;
static const SwfeditTagDefinition ShowFrame[] = { { NULL, 0, 0, 0 } };
+static const Swfed...
2008 Jan 21
0
70 commits - configure.ac libswfdec-gtk/Makefile.am libswfdec-gtk/swfdec-gtk.h libswfdec-gtk/swfdec_gtk_loader.c libswfdec-gtk/swfdec_gtk_player.c libswfdec-gtk/swfdec_gtk_socket.c libswfdec-gtk/swfdec_gtk_socket.h libswfdec-gtk/swfdec_playback_alsa.c
..._val_if_fail (context->global != NULL, 0);
g_return_val_if_fail (bits != NULL, FALSE);
g_return_val_if_fail (rval != NULL, FALSE);
g_return_val_if_fail (expected_type < SWFDEC_AMF_N_TYPES, FALSE);
@@ -208,6 +209,7 @@ swfdec_amf_parse (SwfdecAsContext *context, SwfdecBits *bits, guint n_items, ...
guint i;
g_return_val_if_fail (SWFDEC_IS_AS_CONTEXT (context), 0);
+ g_return_val_if_fail (context->global != NULL, 0);
g_return_val_if_fail (bits != NULL, 0);
va_start (args, n_items);
commit fb9079df6b7d92e5efee09d58b0ae3d526e2a375
Author: Benjamin Otte <otte at gnome....