Search Results

Search found 82 results on 4 pages for 'user246114'.

Page 1/4 | 1 2 3 4  | Next Page >

  • How to find a folder on Mac OS X 10.5?

    - by user246114
    I'm on Mac OS X 10.5 (Leopard). What's the best way to find a folder for which I'm not sure of the full name? For example, I know the folder name I want is like: "farm-animal-type" But the full name may be something like: "farm-animal-type-horse" On Windows, I would just use the find tool through Windows Explorer.

    Read the article

  • Using WebView setHttpAuthUsernamePassword?

    - by user246114
    Hi, I'm trying to do basic authentication to view a protected url. I want to access the protected url which looks like this: http://api.test.com/userinfo/vid?=1234 So I do the following with a WebView: mWebView.setHttpAuthUsernamePassword("api.test.com", "", "john", "password123"); mWebView.loadUrl("http://api.test.com/userinfo/vid?=1234"); but the authentication doesn't seem to work, I'm just getting an output error page. Am I using the WebView method correctly here? Thanks

    Read the article

  • Creating an inline function in a jsp?

    - by user246114
    Hi, I'm coming from (some limited) PHP experience, in which you can just declare functions in-line. I'm trying to the same thing with a JSP but not working. Trying something like: <%! private void generateSomething() { %> <p> Hello there! </p> <% } %> <% generateSomething(); %> is something like that possible? Basically I have a jsp that can generate a 3 different pages, and I wanted to put these each in a separate method. I have seen a few posts saying this is not a good idea, and to separate the presentation stuff, which is fine, I just want to see this in action, if possible, now I'm just curious, Thanks

    Read the article

  • YouTube player api - addEventListener() does not work for me?

    - by user246114
    Hi, I'm using the youtube player api. I'm following the doc here: http://code.google.com/apis/youtube/js_api_reference.html having a problem adding an event listener on the player, it seems to just get stuck there. I put an alert statement directly after, which never gets called: ytplayer.addEventListener("onStateChange", "onytplayerStateChange"); alert("I never get called..."); any idea why this would happen? Running it through FF chrome safari, same thing happens on all. Other player features all work fine. I'm using the swfobject version. I'm running this live from a server too. I don't get it. Thanks

    Read the article

  • Reading a document's content from the gdata API?

    - by user246114
    Hi, I'm using the java library to access the gdata api. I just want to be able to print the contents of a document. I setup my project to list all the docs in my feed, now that I have a document listing, I want to print its contents: for (DocumentListEntry entry : feed.getEntries()) { // Ok, how do we print the doc's contents now? entry.getContents(); } It looks like we're supposed to get the URL from the entry, then read the contents at the URL ourselves. I found a post stating that this is how we get that URL: MediaContent content = (MediaContent)entry.getContent(); String url = content.getUri(); but when I try to read from it, I get an html response saying 'this content has moved'. I read that this is because we have to authenticate our http-read method, but I'm not sure how to do that. Is there really no built-in way to do this? Thanks

    Read the article

  • gdata api + javascript library for accessing documents?

    - by user246114
    Hi, I wanted to do the following with the gdata javascript library: get a list of a user's documents. read the contents of a chosen document. edit its contents, update the document. If I'm reading correctly, this is not supported by the javascript library? I got this to work with the java library, but would like to push this functionality to the client. Is it possible? If not, are there any ways around it? Thank you

    Read the article

  • Concerns about reading a file in Flash 10

    - by user246114
    Hi, I'd like to read an xml file on a user's machine (which can be kind of large). There's no point in me sending the file to my server as I can do all the work I need on the file right on the client's machine. Not sure if this is a good fit though, was wondering if anyone can answer these questions before I dive in: I see at adobe's website that Flash 10 has like 94% penetration, is this true, I thought it was just released not too long ago? After opening the xml file in flash, is it possible to just throw it to a javascript function on my same page for further processing? I'd like to go into flash world for as short a time as possible. Is it at all common to use flash for file upload stuff? I heard aol/flickr are? I would need to buy flash in order to do this right, they don't have a free ide/compiler yet? Thanks

    Read the article

  • Level of SVG SMIL (animation) support among the browsers

    - by user246114
    Hi, Does anyone know the current state of SVG SMIL animation support in the popular browsers? It looks like Safari, Chrome, and Opera support it. Firefox has confusing reports in their dev pages about SMIL support having been added, but I don't see it as of v3.6: https://bugzilla.mozilla.org/show_bug.cgi?id=216462 I am ignoring IE since they don't even support SVG at all, and probably never will, much less SMIL. The other thing - just comparing this test page between Safari, Chrome, and Opera: http://srufaculty.sru.edu/david.dailey/svg/ovaling.svg looks like Opera is the only one that renders it correctly. Should we not be using SMIL - kind of looks half-baked in all the browsers (sadly)? Blast. Thanks

    Read the article

  • How to use ColorDrawable with ImageView?

    - by user246114
    Hi, I have a layout with an ImageView defined like: <ImageView android:layout_width="45dip" android:layout_height="45dip" android:scaleType="fitXY" /> now I just want to set the imageview to be a static color, like red or green. I'm trying: ColorDrawable cd = new ColorDrawable("FF0000"); cd.setAlpha(255); ImageView iv = ...; iv.setImageDrawable(cd); the imageview is just empty though, no color. The 45dip space is being used up though. What do I need to do to get the color to be rendered? Thanks

    Read the article

  • Height of screen in portrait mode only?

    - by user246114
    Hi, How can I get the height of the device for portrait mode? I have to create a bitmap (which is zoomable) and I just want to get a rough idea what the tallest height should be. getResources().getDisplayMetrics().heightPixels; does the above return the height, in portrait mode only? I'm not binding my UI to this absolute value, it's just a rough fit, Thanks

    Read the article

  • Session expiry times?

    - by user246114
    Hi, I've enabled sessions on my app: // appengine-web.xml <sessions-enabled>true</sessions-enabled> they seem to work when I load different pages under my domain. If I close the browser however, looks like the session is terminated. Restarting the browser shows the last session is no longer available. That could be fine, just wondering if this is documented anywhere, so I can rely on this fact? I tried the following just to test if we can tweak it: // in web.xml <session-config> <session-timeout>10</session-timeout> </session-config> also // in my servlet getThreadLocalRequest().getSession().setMaxInactiveInterval(60 * 5); but same behavior, session data is no longer available after browser restart. I looked at the stats for my project and I see data being used for something like "_ah_SESSION" objects. Are those the sessions from above? If so, shouldn't they be cleaned since they're no longer valid? (Hopefully gae takes care of that automatically?) Thanks

    Read the article

  • How to generate a key for a group entity?

    - by user246114
    Hi, I'm trying to make a group entity. Something like: class User { } class UserColor { } ... Key key = new KeyFactory.Builder( User.class.getSimpleName(), username). .addChild(UserColor.class.getSimpleName(), ???).getKey(); I know the unique username up-front to use for the key of the User object. But I just want app engine to generate a random unique value for the key value of the UserColor instance. I think this is described here, but I don't understand their wording: http://code.google.com/appengine/docs/java/datastore/transactions.html To create an object with a system-generated numeric ID and an entity group parent, you must use an entity group parent key field (such as customerKey, above). Assign the key of the parent to the parent key field, then leave the object's key field set to null. When the object is saved, the datastore populates the key field with the complete key, including the entity group parent. and this is their example: @Persistent @Extension(vendorName="datanucleus", key="gae.parent-pk", value="true") private Key customerKey; but I don't understand - should UserColor look like this then?: class UserColor { @Persistent @Extension(vendorName="datanucleus", key="gae.parent-pk", value="true") private Key mKeyParent; @Primary private Key mKey; // leave null } ... Key keyParent = new KeyFactory.Builder( User.class.getSimpleName(), username); UserColor uc = new UserColor(); uc.setKeyParent(keyParent); pm.makePersistent(uc); // now generated for me automatically? is that correct? Using this method, I should be able to use a User and a UserColor object in a transaction together, right? Thanks

    Read the article

  • Read a local file

    - by user246114
    Hi, Is there no way for javascript hosted on a webserver to read a file on a client's local machine? (this has obvious security risks). I guess I'm wondering if there's any access granting a user can do, like drag and dropping a file into the browser, or explicitly selecting a file from a popup to get around this? I know flash 10 allows reading of a local file, just wondering if there were any method to do this in javascript. Thanks

    Read the article

  • Using jquery to make a POST, how to properly supply 'data' parameter?

    - by user246114
    Hi, I'd like to make an ajax call as a POST, it's going to go to my servlet. I want to send parameterized data, like the following: var mydata = 'param0=some_text&param1=some_more_text'; I supply this as the 'data' parameter of my jquery ajax() call. So this should be inserted in the body of the POST, right? (I mean, not appended to my 'mysite/save' url?): $.ajax({ url: 'mysite/save', type: 'POST', data: mydata }); it appears to work correctly. In my servlet, I am just dumping all received parameters, and I see them all come through nicely: private void printParams(HttpServletRequest req) { Enumeration paramNames = req.getParameterNames(); while (paramNames.hasMoreElements()) { // print each param key/val here. } } also, I should url encode my data string manually before use, right? Like: var mydata = 'param0=' + urlencode('hi there!'); mydata += '&param1=' + urlencode('blah blah'); mydata += '%param2=' + urlencode('we get it'); Thanks!

    Read the article

  • Wrap text around a right-aligned icon?

    - by user246114
    Hi, Is it possible to make a small box (which will be a row element in a list for me) with an icon in the upper right corner, and text wrapped around it? Something like: ------------------------------------------------- | Some text here which may wrap around [icon] | | if it were to get too long, but then fit well | | around the icon in the upper right corner? | ------------------------------------------------- I was going to use this as a row in a list, and the user could click the icon in the upper-right to delete the row. I could use either a <div> or a <table>, I'm not sure which will be better?: <div> <p>The text</p> <img src="close.png" align="upper-right"> </div> Thanks

    Read the article

  • Using a Filter to serve a specific page?

    - by user246114
    Hi, I am using a class which implements Filter for my jsp stuff. It looks like this: public class MyFilter implements Filter { public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { request.getRequestDispatcher("mypage.jsp").forward(request, response); } } So the target, "mypage.jsp", is just sitting in my top-level directory. The filter works fine if I'm entering urls like: http://www.mysite.com/foo http://www.mysite.com/boo but if I enter a trailing slash, I'll get a 404: http://www.mysite.com/foo/ http://www.mysite.com/boo/ HTTP ERROR: 404 /foo/mypage.jsp RequestURI=/foo/mypage.jsp it seems if I enter the trailing slash, then the filter thinks I want it to look for mypage.jsp in subfolder foo or boo, but I really always want it to just find it at: http://www.mysite.com/mypage.jsp how can I do that? Thank you

    Read the article

  • How long do you keep session cookies around for?

    - by user246114
    Hi, I'm implementing a web app, which uses sessions. I'm using GWT and app engine as my client/server, but I don't think they're doing anything really different than I would do with PHP and apache etc. When a user logs into my web app, I am using HttpSession to start a session for them. I get the session id like this: // From my login servlet: getThreadLocalRequest().getSession(false).getId(); I return the sessionId back to the client, and they store it in a cookie. The tutorial I'm using sets this cookie to 'expire' in two weeks: Cookie.write("sid", theSessionId, 1000 * 60 * 60 * 24 * 14); // two weeks Here's where I'm confused: if the cookie expires in two weeks, then my user will go along using the webapp happily, only to one day browse to my site and be shown a login screen. What are my options? Can I just set no expiration time for this cookie? That way the user would have to explicitly log out, otherwise they could just use the app forever without having to log back in? Or is there a better way to do this? I can't remember sites like Twitter having ever asked me to log back in again. I seem to be permanently logged in. Do they just set no expiration? The webapp isn't protecting any sort of highly sensitive data, so I don't mind leaving a cookie that doesn't expire, but it seems like there must be a better way? This is the tutorial I'm referencing: http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ Thanks

    Read the article

  • Horrible eclipse performance on macbook pro running 10.5.8

    - by user246114
    Hi I am using eclipse galileo on my macbook pro. After a few minutes it starts dragging really badly, like it takes 8 seconds to open a file. I don't have many files open at all. I already modified the config file to increase ram and all that stuff. Is there something wrong with this version of eclipse, never had it run so poorly on here, Thanks

    Read the article

  • Horrible eclipse performance on macbook pro running 10.5.8

    - by user246114
    Hi I am using eclipse galileo on my macbook pro. After a few minutes it starts dragging really badly, like it takes 8 seconds to open a file. I don't have many files open at all. I already modified the config file to increase ram and all that stuff. Is there something wrong with this version of eclipse, never had it run so poorly on here, Thanks

    Read the article

  • Creating a json array and json items with jquery?

    - by user246114
    Hi, I made a simple javascript class like this: function Horse() { this.color = 'brown'; this.speed = 'somewhat slow'; } I attached a few instances to some elements, like this: $("#horse1").data('d', new Horse()); $("#horse2").data('d', new Horse()); $("#horse3").data('d', new Horse()); now I want to create a JSON array with a JSON representation of each horse object. So I'm doing this: // How do I create an empty JSON array here?: var myJsonArray = ?; var children = $("#horses").children(); for (var i = 0, m = children.size(); i < m; i++) { var panel = children[i]; var horse = $(panel).data('h'); // And how do I create a JSON rep of my horse here? var myJsonHorse = new JsonHorse(?); // Finally, how do I add it to the json array? myJsonArray.push(myJsonHorse); } yeah my end goal is to have a single json array of all the horses after iterating over all the children - not sure if this should be done in plain javascript or in jquery? Thanks

    Read the article

  • Flash - eval() available?

    - by user246114
    Hi, Is there any way to execute arbitrary code in Flash, like javascript's eval()? I'd like to take some code as a string and execute it, if possible (I understand this is not a great idea), Thanks

    Read the article

  • Transaction to find an entity - locks all entities of that type?

    - by user246114
    Hi, Reading the docs for transactions: http://code.google.com/appengine/docs/java/datastore/transactions.html An example provided shows one way to make an instance of an object: try { tx.begin(); Key k = KeyFactory.createKey("SalesAccount", id); try { account = pm.getObjectById(Employee.class, k); } catch (JDOObjectNotFoundException e) { account = new SalesAccount(); account.setId(id); } ... When the above transaction gets executed, it will probably block all other write attempts on Account objects? I'm wondering because I'd like to have a user signup which checks for a username or email already in use: tx.begin(); "select from User where mUsername == str1 LIMIT 1"; if (count > 0) { throw new Exception("username already in use!"); } "select from User where mEmail == str1 LIMIT 1"; if (count > 0) { throw new Exception("email already in use!"); } pm.makePersistent(user(username, email)); // ok. tx.commit(); but the above would be even more time consuming I think, making an even worse bottleneck? Am I understanding what will happen correctly? Thanks

    Read the article

  • Is this a legitimate implementation of a 'remember me' function for my web app?

    - by user246114
    Hi, I'm trying to add a "remember me" feature to my web app to let a user stay logged in between browser restarts. I think I got the bulk of it. I'm using google app engine for the backend which lets me use java servlets. Here is some pseudo-code to demo: public class MyServlet { public void handleRequest() { if (getThreadLocalRequest().getSession().getAttribute("user") != null) { // User already has session running for them. } else { // No session, but check if they chose 'remember me' during // their initial login, if so we can have them 'auto log in' // now. Cookie[] cookies = getThreadLocalRequest().getCookies(); if (cookies.find("rememberMePlz").exists()) { // The value of this cookie is the cookie id, which is a // unique string that is in no way based upon the user's // name/email/id, and is hard to randomly generate. String cookieid = cookies.find("rememberMePlz").value(); // Get the user object associated with this cookie id from // the data store, would probably be a two-step process like: // // select * from cookies where cookieid = 'cookieid'; // select * from users where userid = 'userid fetched from above select'; User user = DataStore.getUserByCookieId(cookieid); if (user != null) { // Start session for them. getThreadLocalRequest().getSession() .setAttribute("user", user); } else { // Either couldn't find a matching cookie with the // supplied id, or maybe we expired the cookie on // our side or blocked it. } } } } } // On first login, if user wanted us to remember them, we'd generate // an instance of this object for them in the data store. We send the // cookieid value down to the client and they persist it on their side // in the "rememberMePlz" cookie. public class CookieLong { private String mCookieId; private String mUserId; private long mExpirationDate; } Alright, this all makes sense. The only frightening thing is what happens if someone finds out the value of the cookie? A malicious individual could set that cookie in their browser and access my site, and essentially be logged in as the user associated with it! On the same note, I guess this is why the cookie ids must be difficult to randomly generate, because a malicious user doesn't have to steal someone's cookie - they could just randomly assign cookie values and start logging in as whichever user happens to be associated with that cookie, if any, right? Scary stuff, I feel like I should at least include the username in the client cookie such that when it presents itself to the server, I won't auto-login unless the username+cookieid match in the DataStore. Any comments would be great, I'm new to this and trying to figure out a best practice. I'm not writing a site which contains any sensitive personal information, but I'd like to minimize any potential for abuse all the same, Thanks

    Read the article

  • Which svn client to install on Windows 7 machine?

    - by user246114
    I just got a new PC running Windows 7 (64-bit). I'd like to install an SVN client (command line only, I don't want TortoiseSVN). I'm not sure which of these to install: http://subversion.apache.org/packages.html#windows does anyone have any opinions on this? I tried going for the ones hosted by Tigris, but the downloaded zip says to read an install file hosted at their site, but the link is broken. Do we simply download, then call svn.exe as needed, no need for a real 'install'?

    Read the article

1 2 3 4  | Next Page >