Displaying 20 results from an estimated 24 matches for "user_comments".
2011 Jan 26
13
undefined method `model_name' for NilClass:Class
I am new to Ruby on Rails and have a very simple foreign key example
that is driving me nuts. I am using Rails 3 under Windows Vista and have
two tables: users and user_comments. user_comments.user_id should
point to the user a comment is about.
In my show view for user I have a link to the new method of
user_comments to allow a comment to be created. This throws:
Showing c:/Gpsappm/app/views/user_comments/_form.html.erb where line #1
raised:
undefined method `model_na...
2006 Nov 27
3
ActiveRecord: Reference same table twice
Hi,
I have 2 tables, "users", and "user_comments". I am trying to allow
users to leave comments on each other''s profiles (eg, think youtube like
this: http://www.youtube.com/profile_comment_all?user=google).
Here is a simplified view of my database schema:
mysql> describe users;
+-----------------+--------------+------+-----+--...
2001 Nov 11
1
Reading tags (again)...
...le.h>
int main()
{
FILE *fp;
OggVorbis_File *ovFile;
vorbis_comment *ovComment;
// ovFile=malloc(sizeof(OggVorbis_File));
ovFile=new OggVorbis_File;
fp=fopen("foo.ogg","rw");
ov_open(fp,ovFile,NULL,0);
ovComment=ov_comment(ovFile,-1);
if(ovComment->user_comments)
{
printf("has comments - %i\n",ovComment->comments);
for(int i=0;i<ovComment->comments;i++)
{
cout << ovComment->user_comments[i] << endl;
}
// vorbis_comment_add_tag(ovComment, "title", "Cheese B...
2006 Aug 24
1
AMD64 bug
...if(len<0)return(OC_BADHEADER);
@@ -180,7 +180,8 @@
_tp_readbuffer(opb,tc->vendor, len);
tc->vendor[len]='\0';
- _tp_readlsbint(opb,(long *) &tc->comments);
+ _tp_readlsbint(opb,&tmp);
+ tc->comments=tmp;
if(tc->comments<0)goto parse_err;
tc->user_comments=_ogg_calloc(tc->comments,sizeof(*tc->user_comments));
tc->comment_lengths=_ogg_calloc(tc->comments,sizeof(*tc->comment_lengths));
2007 Aug 10
5
[Patch] Const correct tags functions
...lock_init(vorbis_dsp_state *v, vorbis_block *vb);
--- lib/info.c (revision 13502)
+++ lib/info.c (working copy)
@@ -59,7 +59,7 @@
memset(vc,0,sizeof(*vc));
}
-void vorbis_comment_add(vorbis_comment *vc,char *comment){
+void vorbis_comment_add(vorbis_comment *vc,const char *comment){
vc->user_comments=_ogg_realloc(vc->user_comments,
(vc->comments+2)*sizeof(*vc->user_comments));
vc->comment_lengths=_ogg_realloc(vc->comment_lengths,
@@ -71,7 +71,7 @@
vc->user_comments[vc->comments]=NULL;
}
-void vorbis_comment_add_tag(vorbis_comment *vc, char *tag, char *conte...
2008 May 07
1
i-best, grep function
...ot;, "Sample_File_Name", "Size", "Height", "Area_in_Point", "Area_in_BP", "Data_Point", "Begin_Point", "Begin_BP", "End_Point", "End_BP", "Width_in_Point", "Width_in_BP", "User_Comments", "User_Edit"))
T1 <- subset(T1, Size < 1000 & Size > 50)
T1.B <- cbind(T1[grep("^B", as.character(T1$Color),perl=T),3],T1[grep("^B", as.character(T1$Color),perl=T),5])
T1.B <- cbind(T1.B, T1.B[,2]/sum(T1.B[,2]))
It works alright until the las...
2006 Aug 29
0
Bug#383793: libtheora0: not 64-bit clean
...if(len<0)return(OC_BADHEADER);
@@ -180,7 +180,8 @@
_tp_readbuffer(opb,tc->vendor, len);
tc->vendor[len]='\0';
- _tp_readlsbint(opb,(long *) &tc->comments);
+ _tp_readlsbint(opb,&tmp);
+ tc->comments=tmp;
if(tc->comments<0)goto parse_err;
tc->user_comments=_ogg_calloc(tc->comments,sizeof(*tc->user_comments));
tc->comment_lengths=_ogg_calloc(tc->comments,sizeof(*tc->comment_lengths));
2004 Aug 06
0
No subject
typedef struct vorbis_comment{
/* unlimited user comment fields. libvorbis writes 'libvorbis'
whatever vendor is set to in encode */
char **user_comments;
int *comment_lengths;
int comments;
char *vendor;
} vorbis_comment;
'user_comments' is the associative array of sorts that the usual
comments are. 'vendor' is just a string that's also stored there. Read
"Vorbis Illuminated" (www.mathdogs.com/vorbis-illu...
2004 Aug 06
0
No subject
typedef struct vorbis_comment{
/* unlimited user comment fields. libvorbis writes 'libvorbis'
whatever vendor is set to in encode */
char **user_comments;
int *comment_lengths;
int comments;
char *vendor;
} vorbis_comment;
'user_comments' is the associative array of sorts that the usual
comments are. 'vendor' is just a string that's also stored there. Read
"Vorbis Illuminated" (www.mathdogs.com/vorbis-illu...
2017 Apr 06
2
Zero length reported.
...mode (_fileno (stdout), _O_BINARY);
#endif
if (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0)
{
fprintf (stderr, "Input does not appear to be an Ogg bitstream.\n");
exit (1);
}
{
char** ptr = ov_comment (&vf, -1)->user_comments;
vorbis_info* vi = ov_info (&vf, -1);
while (*ptr)
{
fprintf (stderr, "%s\n", *ptr);
++ptr;
}
fprintf (stderr, "\nBitstream is %d channel, %ldHz\n", vi->channels, vi->rate);
fprintf (stderr, &quo...
2017 Apr 06
2
Zero length reported.
...mode (_fileno (stdout), _O_BINARY);
#endif
if (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0)
{
fprintf (stderr, "Input does not appear to be an Ogg bitstream.\n");
exit (1);
}
{
char** ptr = ov_comment (&vf, -1)->user_comments;
vorbis_info* vi = ov_info (&vf, -1);
while (*ptr)
{
fprintf (stderr, "%s\n", *ptr);
++ptr;
}
fprintf (stderr, "\nBitstream is %d channel, %ldHz\n", vi->channels, vi->rate);
fprintf (stderr, &quo...
2008 Mar 31
1
Problem creating ogg comment header for theatrical/stage/disco lighting stream
...ebuffer(cpi->oggbuffer, "libava", 6);
_tp_writelsbint(cpi->oggbuffer, vendor_length);
_tp_writebuffer(cpi->oggbuffer, vendor, vendor_length);
_tp_writelsbint(cpi->oggbuffer, tc->comments);
if(tc->comments){
int i;
for(i=0;i<tc->comments;i++){
if(tc->user_comments[i]){
_tp_writelsbint(cpi->oggbuffer,tc->comment_lengths[i]);
_tp_writebuffer(cpi->oggbuffer,tc->user_comments[i],tc->comment_lengths[i]);
}else{
oggpackB_write(cpi->oggbuffer,0,32);
}
}
}
#ifndef LIBOGG2
op->packet=oggpackB_get_buffer(cpi->oggbuffer);...
2001 Oct 13
1
small bug
...he _v_readstring (correctly, for comment headers w/ embedded NULs)
has a byte-count, and should work just fine when unpacking correctly-formed
headers (but would would bomb or give garbled poetry as it reads past the
short end-of-packet).
Of course, to add 8-bit clean data, one has to muck with vc.user_comments
directly, since no easy way to add an 8-bit-clean comment is provided
by the current API.
Anyway, either the spec or the code has to change. I hope it's the code,
so I can make my totally unworthy t-shirt claim. And yah, I realize the
comment tools don't handle the spec'ed 8-bit clea...
2017 Apr 11
1
[Vorbis-dev] Zero length reported.
...en_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0)
>> {
>> fprintf (stderr, "Input does not appear to be an Ogg bitstream.\n");
>> exit (1);
>> }
>>
>> {
>> char** ptr = ov_comment (&vf, -1)->user_comments;
>> vorbis_info* vi = ov_info (&vf, -1);
>>
>> while (*ptr)
>> {
>> fprintf (stderr, "%s\n", *ptr);
>> ++ptr;
>> }
>>
>> fprintf (stderr, "\nBitstream is %d channel, %...
2007 Mar 15
2
Logging album info for ogg-vorbis
Hi, i just joined the list. I was wondering if anyone would be interested
in a change to icecast that logs album info as well as ARTST and TRACK. I
have made the changes to the source code and it's working fine. If there
is any interest, I could look into making it an addition to the code.
Let me know.
thanks,
--
Aaron
-------------- next part --------------
An HTML attachment was
2017 Apr 07
0
Fwd: [Vorbis-dev] Zero length reported.
...ndif
>
> if (ov_open_callbacks (stdin, &vf, NULL, 0, OV_CALLBACKS_NOCLOSE) < 0)
> {
> fprintf (stderr, "Input does not appear to be an Ogg bitstream.\n");
> exit (1);
> }
>
> {
> char** ptr = ov_comment (&vf, -1)->user_comments;
> vorbis_info* vi = ov_info (&vf, -1);
>
> while (*ptr)
> {
> fprintf (stderr, "%s\n", *ptr);
> ++ptr;
> }
>
> fprintf (stderr, "\nBitstream is %d channel, %ldHz\n", vi->channels, vi-&g...
2007 Mar 26
0
Logging album info for ogg-vorbis
...y all comment fields
+ ogg_info->metadata_count = source_vorbis->vc.comments;
+ ogg_info->metadata_len = source_vorbis->vc.comments; //space for tag separators
+ for(i=0; i < source_vorbis->vc.comments; ++i) {
+ ogg_info->metadata[i] = strdup(source_vorbis->vc.user_comments[i]);
+ ogg_info->metadata_len += source_vorbis->vc.comment_lengths[i];
+ }
free (ogg_info->title);
comment = vorbis_comment_query (&source_vorbis->vc, "TITLE", 0);
@@ -573,6 +590,7 @@
else
ogg_info->title = NULL;
+
free (ogg_info...
2002 Dec 27
1
Vorbisgain in ogg123
I'm considering patching my copy of ogg123 to support vorbisgain tags. Is
there any interest in folding this sort of patch into the main line ogg123?
Has anyone done this already (or to another command line ogg player)?
John
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to
2000 Dec 13
2
ov_clear segfaults?
..."test.ogg", "r");
if (!fp) {
fprintf(stderr, "File not found.\n");
return;
}
if( ov_open(fp, &vf, NULL, 0) < 0 ) {
fprintf(stderr,"File does not appear to be an Ogg bitstream.\n");
return;
}
ptr = ov_comment(&vf, -1)->user_comments;
while(*ptr){
fprintf(stderr, "%s\n", *ptr);
++ptr;
}
vi = ov_info(&vf, -1);
fprintf(
stderr, "\nBitstream is %d channel, %ldHz\n", vi->channels, vi->rate
);
fprintf(stderr, "Encoded by: %s\n\n", ov_comment(&vf, -1)->vendor);...
2010 Feb 16
0
Strange routing(?) Issue
...PUT /users/:user_id/
articles/:id(.:format)
{:action=>"update", :controller=>"articles"}
DELETE /users/:user_id/
articles/:id(.:format)
{:action=>"destroy", :controller=>"articles"}
user_comments GET /users/:user_id/
comments(.:format)
{:action=>"index", :controller=>"comments"}
POST /users/:user_id/
comments(.:format)
{:action=>"create", :controller=>"comments"}
new_user_comment GE...