search for: myhandle

Displaying 15 results from an estimated 15 matches for "myhandle".

Did you mean: myhandler
2006 Feb 02
8
this pointer in Event.observe function
Hello, please consider the following code example. It applies the onclick handler to all image tags, and through window.event it ensures that it works in IE too: -------------------------------------------------- var imgs = $(''foo'').getElementsByTagName(''img''); for(var i=0; i<imgs.length; i++) { // Apply onclick handler imgs[i].onclick=function() {
2005 Jul 19
0
draggables bug(s)
Loving using draggables/sortables in rails... two small issues though - First bug: creating a draggable object with a handle in rails: <%= draggable_element "item_#{item.id}", :handle=>"myhandle" %> this generates code like this: <script type="text/javascript">new Draggable(''item_7'', {handle:myhandle})</script> *** notice the missing quotes in the associative array around myhandle -- simple fix to the javascript helpers for rails adding...
2012 May 22
1
Capturing signals from within external libs
...f significant lag between events. When processing an event, I can make use of R_CheckUserInterrupt, but while the external library code is waiting on a new event, I don't have an opportunity to call this - my entry points are only on events. I can capture a SIGINT by redefining signal(SIGINT, myhandler) before calling the lib, but I am somewhat at a loss in terms of what I can do within the handler that would let me pass control back to R. void myhandler (int s) { error("interrupt caught!"); } Works, but I am sure it isn't supposed to. In fact I know it is wrong, since after i...
2005 May 10
0
Fwd: Extract just some fields from XML]
...;{ > els = list() > > startElement = function(node, ...) { > > if(xmlName(node) %in% elementNames) > els[[length(els) + 1]] <<- node > > node > } > > list(startElement = startElement, els = function() els) >} > >So you can use it as > > myHandlers = getElements("PubDate") > xmlTreeParse(URL, handlers = myHandlers) > >And then > myHandlers$els() > >returns a list of the the three PubDate elements in the document. > >If you wanted both PubDate and PubMedPubDate elements, >you could use > > myHand...
2006 Jun 16
11
Detecting Body Onload
I have a piece of code that "waits" for body onload. Every 30ms, it tests $(''body''). Seems that isn''t always good enough. I''ve hit situations where the DOM is "partially" loaded somehow. I fixed matters by setting a global flag... <body onload="bodyLoaded=true;"> which provides a better test... of course I could
2008 May 30
0
Mongrel handler and root_handler
...e appreciated Thanks Manu class MyServer def initialize( ip, port, log ,etc..) //saving all param in internal attributes ... @a = SomeObject.new end def start server = Mongrel::HttpServer.new(''localhost'', ''port'') server.register("/", MyHandler.new(@a) end end Following is the handler code class Myhandler < Mongrel::HttpHandler def initialize(a, b, c) @a = a end def process(request, response) // some code... @a = > this is a hash and not the real object passed originally end end
2008 Jan 14
3
Reading HTTP Request parameters
...h send this request to a mongrel HTTPHandler : res=Net::HTTP.post_form(URI.parse(''http://localhost:3000/test''),{"a"=>1,"b"=>2}) But in the handler I can''t read the parameters one by one, I can read the entire String only : class Serveur class MyHandler < Mongrel::HttpHandler def process(req, resp) ... @params=req.params @params.http_body ... end end ... end @params.http_body give me : a=1&b=2 which is a string I would like a code which return me 1 for something[:a] and 2 for som...
2006 Feb 06
2
ROR Production issue
Currently I am not getting much traffic on my site, when I visit my site after a long interval I get the dreaded "Rails application error" in Mozilla/ "Internal server error" in IE.Once I click refresh then the site comes to life. My guess is this is due to the fact that all FCGI process have died and there are no active listeners. Has anyone else experienced this issue. How
2007 Nov 20
4
Win32 service question
Hi All, First, I''m new to the list, so I''d like to say hello to all fellow mongrelists :) Second, I''d like to ask you if there''s any way to make a simple mongrel script run multithreaded? No rails, just plain old class MyHandler < Mongrel::HttpHandler . . . h = Mongrel::HttpServer.new("127.0.0.1", "80") stuff. Since win32 lacks fork, I don''t know if I can make it process multiple request simultaneously. I''ve read about the mongrel rails service thing, but that''s only for...
2006 May 09
4
Ajax calls and characters encoding (accents)
Hello, my application controller defines before_filter :set_charset def set_charset @headers["Content-Type"] = "text/html; charset=ISO-8859-1" end Everything is fine and accents are rendered correctly in the browser. However, when I call a controller/action from Ajax (Prototype), the charset is not taken in account and accents are garbage displayed (''?''
2005 Jul 20
3
examples of drag n drop
...ail.com> > Content-Type: text/plain; charset=ISO-8859-1 > > Loving using draggables/sortables in rails... two small issues though - > > First bug: creating a draggable object with a handle in rails: > > <%= draggable_element "item_#{item.id}", :handle=>"myhandle" %> > > this generates code like this: > > <script type="text/javascript">new Draggable(''item_7'', > {handle:myhandle})</script> > > *** notice the missing quotes in the associative array around myhandle > -- simple fix to the...
2016 Jun 21
2
Redirecting port 8080 to port 80 - how to add in /etc/sysconfig/iptables file?
On Tue, 2016-06-21 at 15:46 +0100, Always Learning wrote: > On Tue, 2016-06-21 at 16:24 +0200, Alexander Farber wrote: > > > *nat > > :INPUT ACCEPT > > :OUTPUT ACCEPT > > :PREROUTING ACCEPT > > :POSTROUTING ACCEPT > > -A PREROUTING -p tcp --dst 144.76.184.154 --dport 8080 -j REDIRECT > > --to-port 80 > >
2016 Jun 20
3
Redirecting port 8080 to port 80 - how to add in /etc/sysconfig/iptables file?
..."nobody" at the port 8080 using the /etc/systemd/system/websocket-handler.service file: [Unit] Description=WebSocket Handler Service After=network-online.target [Service] Type=simple User=nobody Group=nobody ExecStart=/usr/bin/java -classpath '/usr/share/java/jetty/*' de.afarber.MyHandler 144.76.184.151:8080 ExecStop=/bin/kill ${MAINPID} SuccessExitStatus=143 [Install] WantedBy=multi-user.target However I actually need my Jetty program to run at port 80 - so that users behind corporate firewalls can connect too. The Jetty doc at https://www.eclipse.org/jetty/documentation/curre...
2005 Oct 10
2
Catching warning and error output
...se, I'm not very familiar with R, so these suggestions are probably not "the right way to do it". What I've tried so far: 1) Directing stderr-output to a file (using sink ()): This solution splits warnings, and errors from "regular" output. Using options (error=quote (myhandler ()) I can additionally tell warnings and errors apart after the fact. However, this solution is problematic, in that then the output is handled asynchronously, and I can not tell, at which position in the output a warning should have been printed. Further, if the user runs one "sink ()&quo...
2006 Oct 02
22
Multi Byte Strings
Hey guys, We''ve been talking about the multi-byte patch and I think it''s time to get feedback from you guys on a possible way forward. We can include ActiveSupport::Multibyte with rails 1.2, and update all of the relevant helpers to use the String#chars proxy. This will mean that none of the action view helpers will mangle multibyte strings. Similarly, if any Strings are being