Daily Archives

Articles indexed Sunday April 25 2010

Page 3/72 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • slide div from bottom to top using javascript

    - by Salil
    Hi All, I have a login button at the footer of my main page or landing page.Currently when user click on the button a login form will get open from TOP to BOTTOM i.e. from the start of form to the "LOGIN" button.What i want is that when i click on the login button it should open the form using slide effect but from the BUTTON to the TOP.I don't want to include library like jQuery as there are some conflict issue with it. Please help me out or refer me some url where it happens. Regards, Salil Gaikwad

    Read the article

  • Don't fire onfocus when selecting text?

    - by Casey Hope
    I'm writing a JavaScript chatting application, but I'm running into a minor problem. Here is the HTML structure: <div id="chat"> <div id="messages"></div> <textarea></textarea> </div> When the user clicks/focuses on the chat box, I want the textbox to be automatically focused. I have this onfocus handler on the chat box: chat.onfocus = function () { textarea.focus(); } This works, but the problem is that in Firefox, this makes it impossible to select text in the messages div, since when you try to click on it, the focus shifts to the textarea. How can I avoid this problem? (Semi-related issues: In Chrome, textarea.focus() doesn't seem to shift the keyboard focus to the textarea; it only highlights the box. IE8 does not seem to respond to the onfocus at all when clicking, even if it tabindex is set. Any idea why?)

    Read the article

  • How to call web service with Android

    - by BobbyShaftoe
    I am having a lot of trouble finding good information on how to call a standard SOAP/WSDL web service with Android. All I've been able to find are either very convoluted documents and references to "kSoap2" and then some bit about parsing it all manually with SAX. ... Ok, that's fine but it's 2008 so I figured there should be some good library for calling standard web services. The Web Service is just basically one created in NetBeans. I would like to have IDE support for generating the plumbing classes. I just need the easiest/most-elegant way to contact a WSDL based web service from an Android based phone. Thanks.

    Read the article

  • VLC Media Server

    - by Josh
    We are using VLC on ubuntu, and trying to set up a streaming media server. We have the http interface working fine from remote computers, and we can also see the video playing as text if we don't screen VLC. Our problem is the output streaming. When we use the main VLC page you get when you goto the servers IP it does not save the output MRL (refreshing page it will go away, even after clicking save.) We tried to VLM page and it appears to work fine from the http page (it buffers, plays, timers go up when not paused, etc.) However, we still cannot connect remotely with a VLC client. The output parameters do save properly on the VLM page. We are noobs when it comes to this. Does anyone have a very to the point procedure of getting a file X to play and stream on ubuntu using VLC assuming VLC is installed?

    Read the article

  • Javascript + Firebug : "cannot access optimized closure" What does it mean?

    - by interstar
    I just got the following error in a piece of javascript (in Firefox 3.5, with Firebug running) cannot access optimized closure I know, superficially, what caused the error. I had a line options.length() instead of options.length Fixing this bug, made the message go away. But I'm curious. What does this mean? What is an optimized closure? Is optimizing an enclosure something that the javascript interpretter does automatically? What does it do?

    Read the article

  • super() in Python 2.x without args

    - by Slava Vishnyakov
    Trying to convert super(B, self).method() into a simple nice bubble() call. Did it, see below! Is it possible to get reference to class B in this example? class A(object): pass class B(A): def test(self): test2() class C(B): pass import inspect def test2(): frame = inspect.currentframe().f_back cls = frame.[?something here?] # cls here should == B (class) c = C() c.test() Basically, C is child of B, B is child of A. Then we create c of type C. Then the call to c.test() actually calls B.test() (via inheritance), which calls to test2(). test2() can get the parent frame frame; code reference to method via frame.f_code; self via frame.f_locals['self']; but type(frame.f_locals['self']) is C (of course), but not B, where method is defined. Any way to get B?

    Read the article

  • sscanf for doubles

    - by bobobobo
    This is a simple problem, but I can't see it: char *s = "f 8.649292" ; double d ; sscanf( s, "f %f", &d ) ; printf( "d is %f\n", d ) ; Why is d not containing the double value 8.649292?

    Read the article

  • How do I disable "eager" validation entirely using jquery validate ?

    - by Kevin J
    Is there a way to disable "eager" validation using the jquery.validate plugin? Either through an option in the script or as a hack? "Eager" validation kicks in once the form has been validated once - after that, invalid fields are validated onfocusout. I want to disable this behavior, and change my forms to only be validated when the submit button is pressed. I don't mind hacking through the validate script itself also, so if that's what the solution requires that's acceptable.

    Read the article

  • Source for Names to use in web scraping

    - by PyNEwbie
    Can anyone suggest a good source of names that I can use to help analyze some tables on web pages. The first column of the tables I am scraping have names alone, names and titles or just titles. The names can be as varied as John Smith to Vikram Saksena. I have been poking around for a compiled list of words that can be found in proper names.

    Read the article

  • iPhone configuration file

    - by Pirks
    I try to create iPhone configuration file via c# script as proposed in "Enterprise deployment Guide" of Apple and faced the following problem : iPCU.exe TestScript.cs // This command should create the profile but he not . He just run iPhone configuration //utility. TestScrip.cs consist example from Apple's pdf. Maybe somebody know the way that really work ?

    Read the article

  • memory usage in C# (.NET) app is very high, until I call System.GC.Collect()

    - by Chris Gray
    I've written an app that spins a few threads each of which read several MB of memory. Each thread then connects to the Internet and uploads the data. this occurs thousands of times and each upload takes some time I'm seeing a situation where (verified with windbg/sos and !dumpheap) that the Byte[] are not getting collected automatically, causing 100/150MB of memory to be reported in task manager if I call System.GC.Collect() i'm seeing a huge drop in memory, a drop of over 100MB I dont like calling System.GC.Collect() and my PC has tons of free memory. however if anyone looks at TaskManager they're going to be concerned, thinking my app is leaking horribly. tips?

    Read the article

  • ASIHTTPRequest wrapper usage for Macs

    - by Rob
    I am trying to apply the ASIHTTPRequest wrapper to a very basic Objective C program. I have already copied over the necessary files into my program and after giving myself an extreme headache trying to figure out how it works through their website I thought I would post a question on here. The files copied over were: ASIHTTPRequestConfig.h ASIHTTPRequestDelegate.h ASIProgressDelegate.h ASIInputStream.h ASIInputStream.m ASIHTTPRequest.h ASIHTTPRequest.m ASIFormDataRequest.h ASIFormDataRequest.m My program is very basic: #import <Foundation/Foundation.h> int main (int argc, const char * argv[]) { NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; // Defining the various variables. char firstName[20]; char lastName[20]; char rank[5]; int leaveAccrued; int leaveRequested; // User Input. NSLog (@"Please input First Name:"); scanf("%s", &firstName); NSLog (@"Please input Last Name:"); scanf("%s", &lastName); NSLog (@"Please input Rank:"); scanf("%s", &rank); NSLog (@"Please input the number leave days you have accrued:"); scanf("%i", &leaveAccrued); NSLog (@"Please input the number of leave days you are requesting:"); scanf("%i", &leaveRequested); // Print results. NSLog (@"Name: %s %s", firstName, lastName); NSLog (@"Rank: %s", rank); NSLog (@"Leave Accrued: %i", leaveAccrued); NSLog (@"Leave Requested: %i", leaveRequested); [pool drain]; return 0; } How do I utilize the wrapper to export these 5 basic variables to a web server via an http request?

    Read the article

  • How to center list tags inside an unordered list?

    - by Jack
    How can list tags that are given a display:block and are floated left, be centered inside an unordered list. The HTML: <div id="navigation"> <ul> <li>Home</li> <li>About Us</li> <li>Contact</li> <li>News</li> <li>Events</li> <li>Video</li> <li>Photos</li> </ul> </div><!-- navigation --> The CSS: #navigation { border: 3px solid orange; overflow: hidden; } #navigation ul { list-style-type: none; text-align: center; } #navigation ul li { float: left; display: block; padding: 10px 8px; border: 1px solid green; }

    Read the article

  • select always returns -1 while trying to read from socket and stdin

    - by Aleyna
    Hello I have the following code implemented on C++(Linux) to check on my listening socket and stdin using select. select however keeps returning -1 no matter what I try to do! What's wrong with that code :s I will appreciate any help. Thanks highsock = m_sock; //listening socket memset((char *) &connectlist, 0, sizeof(connectlist)); memset((char *) &socks, 0, sizeof(socks)); int readsocks; struct timeval timeout; timeout.tv_sec = 60; timeout.tv_usec = 0; while (1) { updateSelectList(); //cout << "highest sock: " << highsock << endl; tempreadset = readset; readsocks = select(highsock+1, &tempreadset, NULL, NULL, &timeout); //cout << "# ready: " << readsocks << endl; if (readsocks < 0) { if (errno == EINTR) continue; cout << "select error" << endl; } if (readsocks > 0) { readFromSocks(); } } void readFromSocks() { if (FD_ISSET(STDIN, &readset)) { ... } else if (FD_ISSET(m_sock, &readset)) { ... } } void updateSelectList() { FD_ZERO(&readset); FD_SET(STDIN, &readset); FD_SET(m_sock, &readset); for (int i=0; i<MAXCONNECTIONS; i++) { if (connectlist[i] != 0) { FD_SET(connectlist[i], &readset); if (connectlist[i] > highsock) highsock = connectlist[i]; } } highsock = max(max(m_sock, STDIN), highsock); }

    Read the article

  • How to test a struts 2.1.x developer?

    - by Jason Pyeron
    We employ test to filter out those who can't. The tests are designed to be very low effort for those who can and too much effort for those who can't. Here is an example for java web application developer on an Oracle project: We only work with contractors who can use the tools we use, to determine if you can use the tools we have devised some very simple tests. Instructions If you are prepared and knowledgeable this will take you about 2-5 minutes. Suggested knowledge and tools: * subversion 1.6 see http://subversion.tigris.org/ or http://cygwin.com/setup.exe * java 1.6 see http://java.sun.com/javase/downloads/index.jsp * oracle >=10g see http://www.oracle.com/technology/software/products/jdev/index.html * j2ee server see http://tomcat.apache.org/download-55.cgi or http://www.jboss.org/jbossas/downloads/ Steps 1. check out svn://statics32.pdinc.us/home/subversion/guest 2. deploy the war file found at trunk/test.war 3. browse to the web application you installed from the war file and answer the one SQL question: How many rows are in the table 'testdata' where column 'value' ends with either an 'A' or an 'a'? The login credentials are in trunk/doc/oracle.txt 4. make a RESULTS HASH by submitting your answer to the form. 5. create a file in tmp/YourUserName.txt and put the RESULTS HASH in it, not the answer. 6. check in your file (don't forget to add the file first). 7. message me with the revision number of your check in. As such I am looking for ideas on how to test for someone to be a struts 2.1 w/ annotations.

    Read the article

  • iPhone and OpenCV

    - by Pascal T.
    I know that OpenCV was ported to Mac OS X, however I did not find any info about a port to the iPhone. I am not a Mac developer, so that I do not know whether a Mac OS X port is enough for the iPhone. Does anyone know better than me? Edit: Thanks for the informed answer Adam.

    Read the article

  • Creating a mouse drag done observable with Reactive Extensions

    - by juharr
    I have the following var leftMouseDown = Observable.FromEvent<MouseButtonEventArgs>(displayCanvas, "MouseLeftButtonDown"); var leftMouseUp = Observable.FromEvent<MouseButtonEventArgs>(displayCanvas, "MouseLeftButtonUp"); var mouseMove = Observable.FromEvent<MouseEventArgs>(displayCanvas, "MouseMove"); var leftMouseDragging = from down in leftMouseDown let startPoint = down.EventArgs.GetPosition(displayCanvas) from move in mouseMove.TakeUntil(leftMouseUp) let endPoint = move.EventArgs.GetPosition(displayCanvas) select new { Start = startPoint, End = endPoint }; which when I subscribe to it will give me the start point of the drag and the current end point. Now I need to do something once the drag is done. I was unsuccessful in attempting to do this completely with RX and ended up doing leftMouseDragging.Subscribe(value=> { dragging = true; //Some other code }); leftMouseUp.Subscribe(e=> { if(dragging) { MessageBox.Show("Just finished dragging"); dragging = false; } }); This works fine until I do a right mouse button drag. Then when I click the left mouse button I get the message box. If I only do a left button drag I get the message box, and then clicking the left mouse button doesn't produce the box. I'd like to do this without the external state, but if nothing else I'd at least like for it to work properly. FYI: I tried making dragging volatile and using a lock, but that didn't work. EDIT It turns out my problem was with a right click context menu. Once I got rid of that my above code worked. So, now my problem is how to I get to have the context menu and still have my code work. I assume the Context menu was handling the left mouse click and that somehow caused my code to not work, but I'm still puzzling it out.

    Read the article

  • Rails: form input type and getting the filename

    - by Shyam
    Hi, As I am using Ruby on Rails to build an application, which only runs locally, I am lost in the woods (a nuby without a compass). I have a simple MVC application and my view is missing one thing I could really use. I want to select a local file just to retrieve it's filename. I know it's relatively easy to use the form tag helpers for uploading: <%= file_field 'upload', 'datafile' %></p> I wonder how I could get the filename from the selected file, without uploading the file.

    Read the article

  • Ruby: would using Fibers increase my DB insert throughput?

    - by Zombies
    Currently I am using Ruby 1.9.1 and the 'ruby-mysql' gem, which unlike the 'mysql' gem is written in ruby only. This is pretty slow actually, as it seems to insert at a rate of almost 1 per second (SLOOOOOWWWWWW). And I have a lot of inserts to make too, its pretty much what this script does ultamitely. I am using just 1 connection (since I am using just one thread). I am hoping to speed things up by creating a fiber that will create a new DB connection insert 1-3 records close the DB connection I would imagine launching 20-50 of these would greatly increase DB throughput. Am I correct to go along this route? I feel that this is the best option, as opposed to refactoring all of my DB code :(

    Read the article

  • unrecognized rule in lex

    - by Max
    I'm writing a program in lex, and it gives me the following error: scanner.l:49: unrecognized rule Line 49 is: {number} {return(NUM);} Here's my code: #include <stdio.h> %token BOOL, ELSE, IF, TRUE, WHILE, DO, FALSE, INT, VOID %token LPAREN, RPAREN, LBRACK, RBRACK, LBRACE, RBRACE, SEMI, COMMA, PLUS, MINUS, TIMES %token DIV, MOD, AND, OR, NOT, IS, ADDR, EQ, NE, LT, GT, LE, GE %token NUM, ID, PUNCT, OP int line = 1, numAttr; char *strAttr; %} /* regular definitions */ delim [ \t] ws {delim}+ letter [A-Za-z] digit [0-9] id ({letter} | _)({letter} | {digit} | _)* number {digit}+ %% {ws} {/* no action and no return */} [\n] {line++;} bool {return(BOOL);} else {return(ELSE);} if {return(IF);} true {return(TRUE);} while {return(WHILE);} do {return(DO);} false {return(FALSE);} int {return(INT);} void {return(VOID);} {id} {return(ID);} {number} {return(NUM);} // error is here "(" {yylval = LPAREN; return(PUNCT);} ")" {yylval = RPAREN; return(PUNCT);} "[" {yylval = LBRACK; return(PUNCT);} "]" {yylval = RBRACK; return(PUNCT);} "{" {yylval = LBRACE; return(PUNCT);} "}" {yylval = RBRACE; return(PUNCT);} ";" {yylval = SEMI; return(PUNCT);} "," {yylval = COMMA; return(PUNCT);} "+" {yylval = PLUS; return(OP);} "-" {yylval = MINUS; return(OP);} "*" {yylval = TIMES; return(OP);} "/" {yylval = DIV; return(OP);} "%" {yylval = MOD; return(OP);} "&" {yylval = ADDR; return(OP);} "&&" {yylval = AND; return(OP);} "||" {yylval = OR; return(OP);} "!" {yylval = NOT; return(OP);} "!=" {yylval = NE; return(OP);} "=" {yylval = IS; return(OP);} "==" {yylval = EQ; return(OP);} "<" {yylval = LT; return(OP);} "<=" {yylval = LE; return(OP);} ">" {yylval = GT; return(OP);} ">=" {yylval = GE; return(OP);} %% What is wrong with that rule? Thanks.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >