Displaying 20 results from an estimated 53 matches for "indexof".
2007 Jun 28
0
Branch 'as' - 3 commits - libswfdec/swfdec_as_string.c libswfdec/swfdec_as_strings.c test/trace
libswfdec/swfdec_as_string.c | 25 +++++++++++++++++++++++++
libswfdec/swfdec_as_strings.c | 1 +
test/trace/Makefile.am | 7 +++++++
test/trace/string-indexof-5.swf |binary
test/trace/string-indexof-5.swf.trace | 19 +++++++++++++++++++
test/trace/string-indexof-6.swf |binary
test/trace/string-indexof-6.swf.trace | 19 +++++++++++++++++++
test/trace/string-indexof-7.swf |binary
test/trace/string-indexof-7.swf.trace | 19 +++++++...
2006 Mar 17
1
Autocompleter.Local problem/desparate plea for help...
...= []; // Beginning matches
var entry = instance.getToken ();
var firstMatch= -1;
for (var i = 0; i < instance.options.array.length; i++) {
var wasMatch = false;
var elem = instance.options.array[i];
var foundPos = instance.options.ignoreCase ?
elem.toLowerCase().indexOf(entry.toLowerCase()) : elem.indexOf(entry);
while (foundPos != -1) {
if (foundPos == 0 && elem.length != entry.length) {
wasMatch = true;
if (firstMatch < 0){
firstMatch=i;
}
ret.push("<li class=\"selected\"><st...
2010 Jul 01
4
Index of Character
Hi,
I am a newbie to R and this may be too simple to ask.
I am trying to find out a string function in R that returns the index of a
character.
For e.g. indexOf("Test1234", '4') would return 8.
Is there a similar function in R.
I tried searching the documentation and could find other useful string
functions, but not the index function.
Thanks in advance.
Regards,
Harsh Yadav
[[alternative HTML version deleted]]
2006 Mar 16
3
This is driving me crazy!!!
...inputs = document.getElementsByTagName(''input'');
inputs = $A(inputs);
inputs.each( function(input) {
try {
if(validInputs.indexOf(input.id) != -1) {
//input.onblur = this.alertBox.bindAsEventListener(this);
Event.observe(input.id,''blur'',this.alertBox.bind(this),false);
}
} catch(e) {...
2006 Jun 15
8
Loading CSS for AJAX apps.
I am working on an update to my content management system and I am
using a lot of AJAX to load in the different "Modules"
I want each module to be self contained, including all its specific
js and CSS.
Does any one know of a good solution for loading in new CSS to go
with the code loaded in via the AJAX call?
Thanks.
2006 Jun 20
4
Prototype Array bug??
...if(isArray($aTOC)){
for($t in $aTOC){
$temp += ''t='' + $t + '', '' + $aTOC[$t].name +
''<BR>'';
}
$(''test1'').innerHTML = $temp;
}
}
When I run this code as you see it, this is the result:
t=indexOf, undefined
t=without, undefined
t=flatten, undefined
t=compact, undefined
t=last, undefined
t=first, undefined
t=clear, undefined
t=_each, undefined
t=_reverse, undefined
t=entries, undefined
t=member, undefined
t=select, undefined
t=find, undefined
t=map, undefined
t=inspect, undefined
t=zip, unde...
2007 Nov 29
5
Dynamic JS or RJS ?
...re, probably you will be
faster than me finding an answer.
The next:
I have a static site where I embed a player using an external js
The html:
<script type="text/javascript"
src="http://www.mysite.com/scripts/player.js"></script>
The JS:
if(navigator.userAgent.indexOf("Opera")!=-1){
document.write(''<div id="tab" style="position: absolute;
background-color: #000000; left: 635px; top: 85px; height: 10px; width:
184px;" >'');
document.write(''<object id="MediaPlayer" width="184" hei...
2007 Jul 19
0
ASP.NET AJAX Web Services and Prototype Version 1.5.1.1
...cause it required less code changes to Prototype.
These are my Prototype changes:
Replace this at line 1047:
this.body = this.method == ''post'' ? (this.options.postBody ||
params) : null;
this.transport.send(this.body);
With this:
if (this.options.contentType.indexOf(''json'') >= 0) {
this.transport.send(Hash.toJSON(this.options.postBody));
} else {
this.body = this.method == ''post'' ? (this.options.postBody ||
params) : null;
this.transport.send(this.body);
}
Replace this at line 1145:
evalJSON...
2005 Nov 24
1
Extended $ function called $$
...bstring(1,part.length);
var element = $(id);
if(element){
// return a single element
if(partArray.length <= 1){
elements.append(element);
// return the children of the single element with more selectors
}else{
var selectorRest = selector.substring(selector.indexOf(''
'')+1,selector.length);
elements.append($$.getSubelementsBySelector(element,selectorRest));
}
}else{
throw new Error("Element with id "+id+" not found");
}
// find multiple elements
}else{
elements.append($$.getSubelementsBySe...
2007 Aug 24
0
7 commits - libswfdec/swfdec_as_context.c libswfdec/swfdec_as_interpret.c libswfdec/swfdec_as_object.h libswfdec/swfdec_as_string.c test/trace
...-1067,6 +1067,13 @@ EXTRA_DIST = \
string-convert-6.swf.trace \
string-convert-7.swf \
string-convert-7.swf.trace \
+ string-fake.as \
+ string-fake-5.swf \
+ string-fake-5.swf.trace \
+ string-fake-6.swf \
+ string-fake-6.swf.trace \
+ string-fake-7.swf \
+ string-fake-7.swf.trace \
string-indexof.as \
string-indexof-5.swf \
string-indexof-5.swf.trace \
diff-tree b132dd4594747f32a97fed84d447973bdc768ae8 (from 9bab9da501869ee04f07294e9172dbe996c86045)
Author: Pekka Lampila <pekka.lampila at iki.fi>
Date: Fri Aug 24 14:45:46 2007 +0300
Add test case for tracing strings objects...
2006 Jan 11
9
Prototype & Cookies
Has anyone written any "cookie" class using prototype?
Basically, what I am looking for is if there is an easy way to store mutiple cookies in a single cookie using hash or something - easy writing and retrieval (updating the cookie value).
For eg -
If I had 25 cookies for my domain 5 of the cookies would either get dropped or not be set (as there is a limit of 20 cookies per domain).
2005 Sep 05
3
Prototype 1.4.0_pre4 + script.aculo.us 1.5_pre4?
Hello,
I''m maintaining the PEAR-installable PHP packages for both script.aculo.us
and Prototype on Pearified.com.
I saw the 1.5_pre4 release of script.aculo.us yesterday, and would like to
release the update on Pearified.com, but don''t want to release hacked
versions of Prototype.
I saw that Prototype was updated to 1.4.0_pre4 yesterday as well ... Is that
a suitable package
2006 Feb 07
1
Help needed with conflicting EventObserver
Hello everyone,
I have a page that populates/updates make, model and year select lists
via Ajax.Updater and I think that an EventObserver is causing a
conflict.
Here''s what I''m trying to do. I''m using this page as a create and
edit page for a car database. If I''m calling the page in edit mode,
I''ll want the make, model and year set (using the
2006 Jun 16
2
Javascript error?
...helpers. Is this what is preventing the requests from being made?
How do I go about fixing it?
Thanks, Ryan
Here is all the relevant code:
--Generated HTML--
<form action="/album/new/4" enctype="multipart/form-data"
method="post" onsubmit="if (this.action.indexOf(''upload_id'') < 0){
this.action += ''?upload_id=1''; }this.target =
''UploadTarget1'';$(''UploadStatus1'').innerHTML=''Upload starting...'';
if($(''UploadProgressBar1'')){$(''UploadProgre...
2009 Jul 07
0
[PATCH server] Update app to work with rails 2.3.2
...options.choices ; i++) {
+ for (var i = 0; i < instance.options.array.length &&
+ ret.length < instance.options.choices ; i++) {
var elem = instance.options.array[i];
- var foundPos = instance.options.ignoreCase ?
- elem.toLowerCase().indexOf(entry.toLowerCase()) :
+ var foundPos = instance.options.ignoreCase ?
+ elem.toLowerCase().indexOf(entry.toLowerCase()) :
elem.indexOf(entry);
while (foundPos != -1) {
- if (foundPos == 0 && elem.length != entry.length) {
-...
2010 Sep 02
1
[PATCH 1/1] Introduce an option to always pxe-boot a vm.
...if(nics.length > 0 &&
- (e.target.value == "<%= Vm::PXE_OPTION_VALUE %>" ||
+ (e.target.value == "<%= Vm::PXE_OPTION_VALUE %>" ||e.target.value == "<%= Vm::PXE_ALWAYS_OPTION_VALUE %>" ||
e.target.value.indexOf("<%= Vm::PROFILE_PREFIX %>@<%= Vm::COBBLER_PREFIX %>") == 0)){
$('#vm_network_config_select_0').val(nics[0].network_id).trigger('change');
}
diff --git a/src/task-omatic/taskomatic.rb b/src/task-omatic/taskomatic.rb
index 1dfd74f..6f699...
2007 Jun 27
0
Branch 'as' - 3 commits - libswfdec/Makefile.am libswfdec/swfdec_as_interpret.c libswfdec/swfdec_js_video.c libswfdec/swfdec_player.c libswfdec/swfdec_player_internal.h libswfdec/swfdec_video_movie_as.c libswfdec/swfdec_video_movie.c
...397,6 @@ swfdec_player_advance (SwfdecPlayer *pla
g_return_if_fail (SWFDEC_IS_PLAYER (player));
g_return_if_fail (msecs > 0);
-#if 0
- while (TRUE)
- swfdec_js_run (player, "i = new Object(); i.foo = 7", NULL);
- //swfdec_js_run (player, "s=\"/A/B:foo\"; t=s.indexOf (\":\"); if (t) t=s.substring(0,s.indexOf (\":\")); else t=s;", NULL);
-#endif
-
frames = SWFDEC_TICKS_TO_SAMPLES (player->time + SWFDEC_MSECS_TO_TICKS (msecs))
- SWFDEC_TICKS_TO_SAMPLES (player->time);
g_signal_emit (player, signals[ADVANCE], 0, msecs, fra...
2017 Sep 21
6
prevent users from fiddling with network?
Dear Experts,
"this is system from the hell!"
Than was my first reaction when I realized that logged in with GUI (X11)
user can turn off (and on) network interfaces. Without being in sudoers
file. Wow, this is scary to see on workstations I manage centrally. Even
though I did consider local user to be able to execute the command
"shutdown" (which distinguished RedHat and
2017 Oct 01
0
prevent users from fiddling with network?
...idn't see any more ideas in this thread.
The way I solved this was to use policykit.
Created the file /etc/polkit-1/rules.d/20-networkmanager.rules with the following content
/* require authentication to modify network settings */
polkit.addRule(function(action, subject) {
if (action.id.indexOf("org.freedesktop.NetworkManager." ) == 0 ) {
return polkit.Result.AUTH_ADMIN;
}
});
That will require someone with admin privileges to authenticate for NetworkManager
actions to succeed.
regards,
Thomas
2024 Oct 22
0
njs-0.8.7
...ion for js_body_filter.
*) Improvement: improved error messages for module loading
failures.
Core:
*) Feature: implemented fs.readlink() and friends.
*) Improvement: implemented lazy stack symbolization.
*) Bugfix: fixed heap-buffer-overflow in Buffer.prototype.indexOf().
The issue was introduced in 0.8.6.
*) Bugfix: fixed Buffer.prototype.lastIndexOf() when `from` is
provided.