search for: end_index

Displaying 20 results from an estimated 38 matches for "end_index".

2007 Oct 31
0
2 commits - libswfdec/swfdec_sound.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie_html.c
...ext_field_movie.c +++ b/libswfdec/swfdec_text_field_movie.c @@ -1033,7 +1033,7 @@ swfdec_text_field_movie_set_text_format (SwfdecTextFieldMovie *text, g_return_if_fail (SWFDEC_IS_TEXT_FIELD_MOVIE (text)); g_return_if_fail (SWFDEC_IS_TEXT_FORMAT (format)); g_return_if_fail (start_index < end_index); - g_return_if_fail (end_index <= (guint) g_utf8_strlen (text->input->str, -1)); + g_return_if_fail (end_index <= text->input->len); g_assert (text->formats != NULL); g_assert (text->formats->data != NULL); @@ -1051,7 +1051,7 @@ swfdec_text_field_movie_set_text...
2007 Oct 22
0
5 commits - libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c test/trace
..._text_field_movie.c b/libswfdec/swfdec_text_field_movie.c index df76d49..ef8f2ce 100644 --- a/libswfdec/swfdec_text_field_movie.c +++ b/libswfdec/swfdec_text_field_movie.c @@ -1544,7 +1544,14 @@ swfdec_text_field_movie_replace_text (SwfdecTextFieldMovie *text, g_return_if_fail (start_index <= end_index); g_return_if_fail (str != NULL); - text->input = g_string_insert (text->input, start_index, str); + text->input = g_string_erase (text->input, + g_utf8_offset_to_pointer (text->input->str, start_index) - + text->input->str, + g_utf8_offset_to_pointer (...
2011 Apr 29
1
RCurl and postForm()
...he command line: $ curl -d "Archbishop Huxley" "http://www.datasciencetoolkit.org/text2people" [{"gender":"u","first_name":"","title":"archbishop","surnames":"Huxley","start_index":0,"end_index":17,"matched_string":"Archbishop Huxley"}] Trying the same thing, or what I *think* is the same thing (obvious not) in R (Mac OS 10.6.7, R 2.13.0) produces: > library(RCurl) Loading required package: bitops > api <- "http://www.datasciencetoolkit.org/text2pe...
2011 Oct 15
2
function for handling time
Dear all I have the following time stamps (in the following format) MeasurementSet$TimeStamps        [,1] [,2] [,3] [,4] [,5]   [,6]   [1,] 2011    7    2   13   43 48.718   [2,] 2011    7    2   13   43 54.281   [3,] 2011    7    2   13   43 59.843   [4,] 2011    7    2   13   44  5.390   [5,] 2011    7    2   13   44 10.859   [6,] 2011    7    2   13   44 16.375   [7,] 2011    7    2   13   44
2007 Oct 19
1
3 commits - libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field_movie.c
...ncasecmp (tag->name, "p", 1)) || + (tag->name_length == 2 && !g_strncasecmp (tag->name, "li", 2)))) + { + GSList *iter; + + for (iter = data->tags_closed; iter != NULL; iter = iter->next) { + ParserTag *f = iter->data; + if (f->end_index < tag->index) + break; + if (f->name_length == 4 && !g_strncasecmp (f->name, "font", 4)) { + ParserTag *n = g_new0 (ParserTag, 1); + n->name = f->name; + n->name_length = f->name_length; + n->index = data->text->len; + n->end_index = data-&...
2007 Jan 30
3
How to find series of small numbers in a big vector?
...0.025, 0.026, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.900, 0.022, 0.023, 0.025, 0.333, 0.027, 0.028, 0.900, 0.900, 0.900, 0.900, 0.900) I seek the R program to report: start_index of 12 and an end_index of 16 -- and also -- start_index of 23 and an end_index of 27 because that is were there happens to be search_length numbers within my search_range. It should _not_ report the series at start_index 40 because that 0.333 in there violates the search_range. I could brute-force hard-code an R progra...
2007 Oct 25
0
6 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_event.c libswfdec/swfdec_event.h libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_resource.c
...ext_field_movie.c +++ b/libswfdec/swfdec_text_field_movie.c @@ -1030,7 +1030,7 @@ swfdec_text_field_movie_set_text_format (SwfdecTextFieldMovie *text, g_return_if_fail (SWFDEC_IS_TEXT_FIELD_MOVIE (text)); g_return_if_fail (SWFDEC_IS_TEXT_FORMAT (format)); g_return_if_fail (start_index < end_index); - g_return_if_fail (end_index <= g_utf8_strlen (text->input->str, -1)); + g_return_if_fail (end_index <= (guint) g_utf8_strlen (text->input->str, -1)); g_assert (text->formats != NULL); g_assert (text->formats->data != NULL); @@ -1110,7 +1110,7 @@ swfdec_text_...
2007 Oct 22
0
12 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h test/trace
...swfdec_text_field_movie.h +++ b/libswfdec/swfdec_text_field_movie.h @@ -133,6 +133,7 @@ void swfdec_text_field_movie_set_text_format (SwfdecTextFieldMovie * text, SwfdecTextFormat *swfdec_text_field_movie_get_text_format (SwfdecTextFieldMovie * text, guint start_index, guint end_index); +const char * swfdec_text_field_movie_get_text (SwfdecTextFieldMovie * text); const char * swfdec_text_field_movie_get_html_text (SwfdecTextFieldMovie * text); void swfdec_text_field_movie_set_listen_variable (SwfdecTextFieldMovie * text, const char * value); diff --git a/libswfde...
2007 Nov 01
0
libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie_html.c
...ield_movie.c index 4dd9c07..5d499b2 100644 --- a/libswfdec/swfdec_text_field_movie.c +++ b/libswfdec/swfdec_text_field_movie.c @@ -1063,6 +1063,10 @@ swfdec_text_field_movie_set_text_format (SwfdecTextFieldMovie *text, findex_new = g_new (SwfdecFormatIndex, 1); findex_new->index_ = end_index; findex_new->format = swfdec_text_format_copy (findex->format); + if (findex_new->format == NULL) { + g_free (findex_new); + break; + } iter = g_slist_insert (iter, findex_new, 1); } @@ -1071,6 +1075,10 @@ swfdec_text_field_movie_set_text_format (SwfdecTextFi...
2007 Oct 29
0
20 commits - libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h
...text_field_movie.c +++ b/libswfdec/swfdec_text_field_movie.c @@ -102,7 +102,7 @@ swfdec_text_paragraph_add_block (SwfdecParagraph *paragraph, int index_, static void swfdec_text_field_movie_generate_paragraph (SwfdecTextFieldMovie *text, - SwfdecParagraph *paragraph, guint start_index, guint end_index) + SwfdecParagraph *paragraph, guint start_index, guint length) { SwfdecTextFormat *format, *format_prev; guint index_; @@ -113,18 +113,14 @@ swfdec_text_field_movie_generate_paragraph (SwfdecTextFieldMovie *text, g_assert (SWFDEC_IS_TEXT_FIELD_MOVIE (text)); g_assert (paragraph !...
2011 Nov 15
3
Sweave and accented letters
...t \spacing single \use_hyperref false \papersize default \use_geometry false \use_amsmath 1 \use_esint 1 \use_mhchem 1 \use_mathdots 1 \cite_engine basic \use_bibtopic false \use_indices false \paperorientation portrait \suppress_date false \use_refstyle 1 \index Index \shortcut idx \color #008000 \end_index \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \paragraph_indentation default \quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict false \end_header \begin_body...
2007 Oct 17
0
libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie.c
...{ - PangoAttrList *attr_list; - GList *iter_attrs; - - attr_list = pango_attr_list_new (); - - for (iter_attrs = paragraphs[i].attrs; iter_attrs != NULL; - iter_attrs = iter_attrs->next) - { - PangoAttribute *attr; - - attr = (PangoAttribute *)iter_attrs->data; - - if (attr->end_index <= block->index_ + skip) - continue; - - attr = pango_attribute_copy (attr); - if (attr->klass->type == PANGO_ATTR_FOREGROUND && trans != NULL && - !swfdec_color_transform_is_identity (trans)) - { - SwfdecColor color; - PangoColor pcolor; - -...
2007 Oct 25
0
12 commits - libswfdec/swfdec_as_internal.h libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.c libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c test/trace
...ec_text_field_movie.c diff --cc libswfdec/swfdec_text_field_movie.c index 8cdd015,bd42350..88207a2 --- a/libswfdec/swfdec_text_field_movie.c +++ b/libswfdec/swfdec_text_field_movie.c @@@ -1592,8 -1601,7 +1592,8 @@@ swfdec_text_field_movie_replace_text (S } prev = iter; } + - if (end_index == g_utf8_strlen (text->input->str, -1)) { + if (end_index == (guint) g_utf8_strlen (text->input->str, -1)) { if (SWFDEC_AS_OBJECT (text)->context->version < 8) { SWFDEC_FIXME ("replaceText to the end of the TextField might use wrong text format on version...
2007 Oct 17
0
6 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_movie.c libswfdec/swfdec_movie.h libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...ibswfdec/swfdec_text_field_movie.h b/libswfdec/swfdec_text_field_movie.h index a19fcb9..02b7b73 100644 --- a/libswfdec/swfdec_text_field_movie.h +++ b/libswfdec/swfdec_text_field_movie.h @@ -88,10 +88,11 @@ void swfdec_text_field_movie_set_text_format (SwfdecTextFieldMovie * text, guint end_index); void swfdec_text_field_movie_set_scroll (SwfdecTextFieldMovie * text, int value); -const char * swfdec_text_field_movie_get_variable_text (SwfdecTextFieldMovie * text); -void swfdec_text_field_movie_set_variable_text (SwfdecTextFieldMovie *text, - const char * value); con...
2011 Feb 20
7
Using Nokogiri to insert a <span> tag into existing text
All, I''m using Nokogiri to handle the following problem: I have a piece of HTML, and for certain text nodes, I need to insert <span> tags into the text of these nodes at a certain place. What I am doing is finding the place where I want to insert the <span>, let''s say index X of the text node''s text, and doing the following: 1) Setting the node''s
2010 Jul 16
1
[PATCH] ocfs2: make __ocfs2_page_mkwrite handle file end properly.
__ocfs2_page_mkwrite now is broken in handling file end. 1. the last page should be the page contains i_size - 1. 2. the len in the last page is also calculated wrong. So change them accordingly. Signed-off-by: Tao Ma <tao.ma at oracle.com> --- fs/ocfs2/mmap.c | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/ocfs2/mmap.c b/fs/ocfs2/mmap.c index
2007 Oct 19
0
3 commits - libswfdec/swfdec_as_interpret.c libswfdec/swfdec_html_parser.c libswfdec/swfdec_sprite_movie_as.c libswfdec/swfdec_text_field_movie.c
...dec_html_parser.c +++ b/libswfdec/swfdec_html_parser.c @@ -246,8 +246,6 @@ swfdec_text_field_movie_html_parse_tag (ParserData *data, const char *p) if (tag != NULL && name_length == tag->name_length && !g_strncasecmp (name, tag->name, name_length)) { - tag->end_index = data->text->len; - if (data->cx->version == 6) { if ((name_length == 1 && !g_strncasecmp (name, "p", 1)) || (name_length == 2 && !g_strncasecmp (name, "li", 2))) { @@ -255,6 +253,8 @@ swfdec_text_field_movie_html_parse_tag (ParserData...
2007 Oct 15
0
6 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_codec_audio.c libswfdec/swfdec_codec_video.c libswfdec/swfdec_text_field.c libswfdec/swfdec_text_field.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c
...ibswfdec/swfdec_text_field_movie.c index d6e89e9..e40001f 100644 --- a/libswfdec/swfdec_text_field_movie.c +++ b/libswfdec/swfdec_text_field_movie.c @@ -686,7 +686,7 @@ void swfdec_text_field_movie_set_text_format (SwfdecTextFieldMovie *text, SwfdecTextFormat *format, guint start_index, guint end_index) { - SwfdecFormatIndex *findex, *findex_new; + SwfdecFormatIndex *findex, *findex_new, *findex_prev; guint findex_end_index; GSList *iter, *next; @@ -698,10 +698,13 @@ swfdec_text_field_movie_set_text_format (SwfdecTextFieldMovie *text, g_assert (text->formats != NULL); g_assert...
2007 Oct 18
0
14 commits - libswfdec/swfdec_as_strings.c libswfdec/swfdec_initialize.as libswfdec/swfdec_initialize.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_field_movie.c libswfdec/swfdec_text_field_movie.h libswfdec/swfdec_text_format.c
...dec_text_field_movie.c b/libswfdec/swfdec_text_field_movie.c index c0263ed..4272c7c 100644 --- a/libswfdec/swfdec_text_field_movie.c +++ b/libswfdec/swfdec_text_field_movie.c @@ -1475,8 +1475,10 @@ void swfdec_text_field_movie_replace_text (SwfdecTextFieldMovie *text, guint start_index, guint end_index, const char *str) { + SwfdecFormatIndex *findex; char *text_new; - GSList *iter; + GSList *iter, *prev; + gboolean first; g_return_if_fail (SWFDEC_IS_TEXT_FIELD_MOVIE (text)); g_return_if_fail (end_index <= strlen (text->text_display)); @@ -1492,12 +1494,40 @@ swfdec_text_fiel...
2007 Oct 25
0
18 commits - libswfdec/swfdec_player_internal.h libswfdec/swfdec_text_field_movie_as.c libswfdec/swfdec_text_format.c libswfdec/swfdec_text_format.h libswfdec/swfdec_xml.c libswfdec/swfdec_xml_node.c libswfdec/swfdec_xml_node.h test/trace
...field_movie_as.c index 38a746a..244c76c 100644 --- a/libswfdec/swfdec_text_field_movie_as.c +++ b/libswfdec/swfdec_text_field_movie_as.c @@ -992,8 +992,8 @@ swfdec_text_field_movie_setTextFormat (SwfdecAsContext *cx, { SwfdecTextFieldMovie *text; SwfdecTextFormat *format; - int start_index, end_index; - int i; + int val, start_index, end_index; + guint i; SWFDEC_AS_CHECK (SWFDEC_TYPE_TEXT_FIELD_MOVIE, &text, ""); @@ -1001,18 +1001,23 @@ swfdec_text_field_movie_setTextFormat (SwfdecAsContext *cx, return; i = 0; - if (argc >= 2) { - start_index = swfdec_as...