Daily Archives

Articles indexed Saturday May 1 2010

Page 22/76 | < Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >

  • -Unzip failed...Access is denied- error while adding Android SDK components to Eclipse

    - by vmitsura
    Eclipse (3.5) --Window--Android SDK and AVD Manager--< When Adding SDK Components, there is the following error message: Downloading Documentation for Android SDK, API 7, revision 1 Installing Documentation for Android SDK, API 7, revision 1 Unzip failed: C:\Program Files\Android_SDK\temp\DocPackage.new01\navtree_data.js (Access is denied). This is followed by another message: -Nothing is installed- I use Windows 7 64-bit system. Could anyone please help to get around this? Thank you in advance. vmitsura

    Read the article

  • Compressing as GZip WCF requests (SOAP and REST)

    - by Joannes Vermorel
    I have a .NET 3.5 web app hosted on Windows Azure that exposes several WCF endpoints (both SOAP and REST). The endpoints typically receive 100x more data than they serve (lot of data is upload, much fewer is downloaded). Hence, I am willing to take advantage from HTTP GZip compression but not from the server viewpoint, but rather from the client viewpoint, sending compressed requests (returning compressed responses would be fine, but won't bring much gain anyway). Here is the little C# snippet used on the client side to activate WCF: var binding = new BasicHttpBinding(); var address = new EndpointAddress(endPoint); _factory = new ChannelFactory<IMyApi>(binding, address); _channel = _factory.CreateChannel(); Any idea how to adjust the behavior so that compressed HTTP requests can be made?

    Read the article

  • iphone/ipad with 2 side by side tables

    - by jesse001
    I want to create a view with 2 tables side by side, where selecting the row on 1 table effects the content of the other and vice versa (not parent child). My problem is how to send the request. I started with a utility app using core data, and added 2 table view controllers. I added these to the main view nib and moved the tables to the view. One table controls a list from Core Data, then on selecting a row I want it to move to the other table which is based on a mutable array. On didselectrow I want to tell the other table to update, however I can only find samples that are parent/child so involves initializing. Does anyone know of a way to do this for an active view? Thanks heaps for your help.

    Read the article

  • Perl script -need some help.

    - by benjamin button
    I have an sql file which will give me an output like below: 10|1 10|2 10|3 11|2 11|4 . . . I am using this in a perl script like below: my @tmp_cycledef = `sqlplus -s $connstr \@DLCycleState.sql`; after this above statement,since tmp_cycledef has all the output of the sql query i want to show the output as: 10 1,2,3 11 2,4 how could i do this using perl?

    Read the article

  • Django's USE_L10N does not work

    - by jack
    I already set USE_L10N = True in settings.py But in following view: from django.contrib.humanize.templatetags.humanize import intcomma dev view_name(request): output = intcomma(123456) Output is always "123,456" for all locales.

    Read the article

  • Javascript setInterval and `this` solution

    - by Michael
    I need to access this from my setInterval handler prefs: null, startup : function() { // init prefs ... this.retrieve_rate(); this.intervalID = setInterval(this.retrieve_rate, this.INTERVAL); }, retrieve_rate : function() { var ajax = null; ajax = new XMLHttpRequest(); ajax.open('GET', 'http://xyz.com', true); ajax.onload = function() { // access prefs here } } How can I access this.prefs in ajax.onload ?

    Read the article

  • ergonomics: what's better; trackball, ergonomic mouse or some other pointing device (a-la touchscree

    - by mauriciopastrana
    So I bit into the hype and recently purchased an apple wireless keyboard and that evil bar-of-soap thing apple makes for a mouse. Couple of hundred dollars later and this is where I begin to worry about RSI. Go figure. Don't get me wrong, this apple mouse is genius and looks pretty as hell, but my right wrist feels tired after a full day's worth of work, so i'm thinking of switching. Anyone out there use a trackball? is this worse? should I get a super-ergonomic mouse instead? I've seen mouse-trackball combos but am not sold, they still elicit the same end-finger behaviour detrimental for RSI, right? I also have a wrist-rest mousepad, but couldn't find one suitable for my keyboard. I've even considered having a small touchscreen where the mousepad should go, no mouse (or alternatively, a usb trackpad). Just looking for ideas, is the trackball better than the mouse? /mp

    Read the article

  • Accessing Content Page elements

    - by Abdel Olakara
    Hi all, I am facing a strange problem.. may be i am overlooking something and not able to find the silly issue. Need your help! I have a Master page and a Content Page: <form id="AccountForm" runat="server"> <div> <asp:ContentPlaceHolder ID="MenuHolder" runat="server"> </asp:ContentPlaceHolder> </div> <hr /> <div> <asp:ContentPlaceHolder ID="ContentHolder" runat="server"> </asp:ContentPlaceHolder> </div> And my content page has some form elements: <asp:Content ID="Content3" ContentPlaceHolderID="ContentHolder" runat="server"> First Name: <asp:TextBox ID="fName" runat="server"></asp:TextBox> <br /> Middle Name: <asp:TextBox ID="mName" runat="server"></asp:TextBox> <br /> Family Name: <asp:TextBox ID="lName" runat="server"></asp:TextBox> <br /> Birthday: <asp:TextBox ID="birthday" runat="server"></asp:TextBox> <br /> Mobile Phone: <asp:TextBox ID="mobile" runat="server"></asp:TextBox> <br /> Alternate Phone: <asp:TextBox ID="phone" runat="server"></asp:TextBox> <br /> I also have the code for submit button in the content page where i try to retrieve the values from the form elements and persist it into DB. Here is the SubmitButton_Click code: protected void SubmitButton_Click(object sender, EventArgs e) { log.Info("From Submit button: " + customerObject.first_name + " " + customerObject.family_name); if (fName != null) log.Info("First Name is not null"); log.Info("First Name:" + fName.Text); log.Info("Middle Name:" + mName.Text); log.Info("Family Name:" + fName.Text); log.Info("Mobile:" + mobile.Text); log.Info("Phone: " + phone.Text); log.Info("Address:" + bAddressL1.Text + bAddressL2.Text); Strangly.. i don't get any data that is filled into my text fields? Their objects are not null as well!! why is this behaviour happening? I am not trying to access elements in master page or other.. all the fields are in the content page.. only thing is there is no form element in the content page and the form element is in master page! Thanks in advance for your suggestions and answers. Abdel Raoof Olakara

    Read the article

  • Converting regex statment for sentance extraction to Ruby

    - by DavidP6
    I found this regex statement on the wiki (http://en.wikipedia.org/wiki/Sentence_boundary_disambiguation) for Sentence boundary disambiguation, but am not able to use it in a Ruby split statment. I'm not too good with regex so maybe I am missing something? This is statment: ((?<=[a-z0-9)][.?!])|(?<=[a-z0-9][.?!]\"))(\s|\r\n)(?=\"?[A-Z]) and this is what I tried in Ruby, but no go: text.split("((?<=[a-z0-9)][.?!])|(?<=[a-z0-9][.?!]\"))(\s|\r\n)(?=\"?[A-Z])")

    Read the article

  • jqGrid dynamic select option

    - by Jo
    I'm creating a jqgrid with drop down columns and I'm using cell editing. I need the options of the drop down columns to change dynamically and I've tried implementing this by setting the column to be: { name: "AccountLookup", index: "AccountLookup", width: 90, editable: true, resizable: true, edittype: "select", formatter: "select" }, and then in the beforeCellEdit event I have: beforeEditCell: function(id, name, val, iRow, iCol) { if(name=='AccountLookup') { var listdata = GetLookupValues(id, name); if (listdata == null) listdata = "1:1"; jQuery("#grid").setColProp(name, { editoptions: { value: listdata.toString()} }) } }, GetLookupValues just returns a string in the format "1:One;2:Two" etc. That works fine however the options are populated one click behind - ie i click on AccountID in row 1, and the dropdown is empty, however when I then click on AccountID in row 3 the options I set in the row 1 click are shown in the row 3 click. And so on. So always one click behind. Is there another way of achieving what I need? Bacially the dropdown options displayed are always changing and I need to load them as user enters the cell for editing. Perhaps I can somehow get at the select control in the beforeEditCell event and manually enter its values instead of using the setColProp call? If so could I get an example of doing that please? Another thing - if the dropdown is empty and a user doesn't cancel the cell edit, the grid script throws an error. I'm using clientarray editing if that makes a difference. Greatly appreciate any help. Regards, Jo

    Read the article

  • Troubles Iterating Over A HashMap with JSF, MyFaces & Facelets

    - by Lee Theobald
    Hi all, I'm having some trouble looping over a HashMap to print out it's values to the screen. Could someone double check my code to see what I'm doing wrong. I can't seem to find anything wrong but there must be something. In a servlet, I am adding the following to the request: Map<String, String> facetValues = new HashMap<String, String>(); // Filling the map req.setAttribute(facetField.getName(), facetValues); In one case "facetField.getName()" evaluates to "discipline". So in my page I have the following: <ui:repeat value="${requestScope.discipline}" var="item"> <li>Item: <c:out value="${item}"/>, Key: <c:out value="${item.key}"/>, Value: <c:out value="${item.item}"/></li> </ui:repeat> The loop is ran once but all the outputs are blank?!? I would have at least expected something in item if it's gone over the loop once. Checking the debug popup for Facelets, discipline is there and on the loop. Printing it to the screen results in something that looks like a map to me (I've shortened the output) : {300=0, 1600=0, 200=0, ... , 2200=0} I've also tried with a c:forEach but I'm getting the same results. So does anyone have any ideas where I'm going wrong? Thanks for any input, Lee

    Read the article

  • Change a Recursive function that has a for loop in it into an iterative function?

    - by Bill
    So I have this function that I'm trying to convert from a recursive algorithm to an iterative algorithm. I'm not even sure if I have the right subproblems but this seems to determined what I need in the correct way, but recursion can't be used you need to use dynamic programming so I need to change it to iterative bottom up or top down dynamic programming. The basic recursive function looks like this: Recursion(i,j) { if(i>j) return 0; else { //This finds the maximum value for all possible subproblems and returns that for this problem for(int x = i; x < j; x++) { if(some subsection i to x plus recursion(x+1,j) is > current max) max = some subsection i to x plus recursion(x+1,j) } } } This is the general idea, but since recursions typically don't have for loops in them I'm not sure exactly how I would convert this to iterative. Does anyone have any ideas?

    Read the article

  • wav stopped working with AudioServices on my iPhone app?

    - by user157733
    I have a wav file that was working fine. It is played using the AudioServices methods. Suddenly it stopped working. The weird thing is if i change he wav file to a different one that works. Any idea what is going on? The non working sound is slightly longer (still <10seconds) but it was originally working so I just can't figure it out. Any suggestions of what to try would be most appreciated. Thanks :-)

    Read the article

  • Search field based on multiple parameter

    - by Manoj Wadhwani
    Can anybody modify this , when i insert Emp. name it go to first search and it does not check other paramete could you plz modify this sp for exact search on based on parameter. --select * from Training_TRNS --USP_SearchEmployee '','2008-04-18 00:00:00.000','','','','','' alter Procedure USP_SearchEmployee @EmpName varchar(100)=null, @DateFrom varchar(100)=null, @DateTo varchar(100)=null, @CourseName varchar(100)=null, @JobFunction varchar(100)=null, @Region varchar(100)=null, @Status varchar(100)=null AS BEGIN if (@EmpName!='' and @EmpName is not null) BEGIN select EmpName,convert(varchar,DueDate,101) as DueDate,SpeCourse_ID as CourseName, EmpJobFunction as JOBFunction,EmpRegion as Region,Status from Training_TRNS where EmpName like '%'+@EmpName+'%' END ELSE IF (@CourseName!='' and @CourseName is not null) BEGIN select EmpName,convert(varchar,DueDate,101) as DueDate,SpeCourse_ID as CourseName, EmpJobFunction as JOBFunction,EmpRegion as Region,Status from Training_TRNS where SpeCourse_ID like '%'+@CourseName+'%' END ELSE IF (@JobFunction!='' and @JobFunction is not null) BEGIN select EmpName,convert(varchar,DueDate,101) as DueDate,SpeCourse_ID as CourseName, EmpJobFunction as JOBFunction,EmpRegion as Region,Status from Training_TRNS where EmpJobFunction like '%'+@JobFunction+'%' END ELSE IF (@Region!='' and @Region is not null) BEGIN select EmpName,convert(varchar,DueDate,101) as DueDate,SpeCourse_ID as CourseName, EmpJobFunction as JOBFunction,EmpRegion as Region,Status from Training_TRNS where EmpRegion like '%'+@Region+'%' END ELSE IF (@Status!='' and @Status is not null) BEGIN select EmpName,convert(varchar,DueDate,101) as DueDate,SpeCourse_ID as CourseName, EmpJobFunction as JOBFunction,EmpRegion as Region,Status from Training_TRNS where Status like '%'+@Status+'%' END ELSE IF (@DateFrom!='' and @DateFrom is not null) BEGIN select EmpName,convert(varchar,DueDate,101) as DueDate,SpeCourse_ID as CourseName, EmpJobFunction as JOBFunction,EmpRegion as Region,Status from Training_TRNS where convert(varchar,DueDate,101) like '%'+convert(varchar,@DateFrom,101)+'%' END Else BEGIN select EmpName,convert(varchar,DueDate,101) as DueDate,SpeCourse_ID as CourseName, EmpJobFunction as JOBFunction,EmpRegion as Region,Status from Training_TRNS END END

    Read the article

  • Post data to aspx page from iphone application

    - by Dipen
    Hi, I am developing a application. In which i am posting a image to .aspx page.The HTML for the page is as below. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd>"> <html xmlns="http://www.w3.org/1999/xhtml>"> <head><title> Untitled Page </title><link href="App_Themes/XXX/XXX.css" type="text/css" rel="stylesheet" /></head> <body> <form name="form1" method="post" action="Default16.aspx" id="form1" enctype="multipart/form-data"> <div> <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUKLTQwMjY2MDA0Mw9kFgICAw8WAh4HZW5jdHlwZQUTbXVsdGlwYXJ0L2Zvcm0tZGF0YWRktr+hG1VVXZsO01PCyj61d6Ulqy8=" /> </div> <div> <div style="float:left;margin:10px"> <input type="file" name="fuImage" id="fuImage" /> </div> <div style="float:right"> <input type="submit" name="btnPost" value="Post Image" id="btnPost" /> </div> </div> </form> </body> </html> Now i am sending a request from my application then i am getting " Error Domain=kCFErrorDomainCFNetwork Code=303 UserInfo=0xf541c0 "Operation could not be completed. (kCFErrorDomainCFNetwork error 303.)"" I have tried using SynchronousRequest and aSynchronousRequest but both are not working. I have also used apple sample code. Here is the code for iPhone app UIImage *image=[UIImage imageNamed:@"photo2.jpg"]; NSData *imageData = UIImageJPEGRepresentation(image, 90); NSString *urlString = @"http://XXXXXXXX.com/Post.aspx"; NSMutableURLRequest *request = [[[NSMutableURLRequest alloc] init] autorelease]; [request setURL:[NSURL URLWithString:urlString]]; [request setHTTPMethod:@"POST"]; NSString *boundary = [NSString stringWithString:@"----WebKitFormBoundarylU9pAl5wPrF+Tk52"]; NSString *contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", boundary]; [request addValue:contentType forHTTPHeaderField:@"Content-Type"]; NSMutableData *body = [NSMutableData data]; [body appendData:[[NSString stringWithFormat:@"\r\n--%@\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithString:@"Content-Disposition: form-data; name=\"fuimage\"; filename=\"asd.jpg\"\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[[NSString stringWithString:@"Content-Type: image/jpeg\r\n\r\n"] dataUsingEncoding:NSUTF8StringEncoding]]; [body appendData:[NSData dataWithData:imageData]]; [body appendData:[[NSString stringWithFormat:@"\r\n--%@--\r\n", boundary] dataUsingEncoding:NSUTF8StringEncoding]]; [request setHTTPBody:body]; // NSData *returnData = [NSURLConnection sendSynchronousRequest:request returningResponse:nil error:nil]; // NSString *returnString = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding]; // NSLog(returnString); NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:request delegate:self]; if( theConnection ) { webData = [[NSMutableData data] retain]; } else { NSLog(@"theConnection is NULL"); } Thanks in Advance.

    Read the article

  • Best deployment strategy for Python google app engine

    - by sushant
    I wonder if there are any best practices/patterns for deploying python apps on Google app engine specifically Django. The best practice should be combination of existing best practices viz. Fabric, Paver, Buildout etc. Also please share best practice patterns for developing (I could not get virtualenv running with Django and Django App engine helper)

    Read the article

  • Preview for create/edit content doesn't work

    - by Snazzy
    Hi! I'm configuring a DRUPAL site web (that it was previously created) and I'm testing the diferent options. When I create a new content or edit a old content and change anything and then I click on 'Preview' doesn't appear the recent changes (just appear the old values), I have to save it before. NOTE: I do the accions as ROOT (it not a privilege problem). Anyone knows what is happened?

    Read the article

  • Caching web API proxy?

    - by Jeremy Dunck
    I was wondering if anyone knows of a caching proxy specifically for dealing with API responses? Ideally, I'd be able to declare what caching policy to use for different API semantics, e.g. cache album art for 1 day, cache favorite tweets for 5 minutes, cache map tiles forever, except invalidate when this other API is called. I know about using Apache, Squid, etc for caching in general -- I'm just hoping for something with nicer usage semantics by restricting the design goal to dealing with APIs rather than the web in general.

    Read the article

  • C++0x rvalue references - lvalues-rvalue binding

    - by Doug
    This is a follow-on question to http://stackoverflow.com/questions/2748866/c0x-rvalue-references-and-temporaries In the previous question, I asked how this code should work: void f(const std::string &); //less efficient void f(std::string &&); //more efficient void g(const char * arg) { f(arg); } It seems that the move overload should probably be called because of the implicit temporary, and this happens in GCC but not MSVC (or the EDG front-end used in MSVC's Intellisense). What about this code? void f(std::string &&); //NB: No const string & overload supplied void g1(const char * arg) { f(arg); } void g2(const std::string & arg) { f(arg); } It seems that, based on the answers to my previous question that function g1 is legal (and is accepted by GCC 4.3-4.5, but not by MSVC). However, GCC and MSVC both reject g2 because of clause 13.3.3.1.4/3, which prohibits lvalues from binding to rvalue ref arguments. I understand the rationale behind this - it is explained in N2831 "Fixing a safety problem with rvalue references". I also think that GCC is probably implementing this clause as intended by the authors of that paper, because the original patch to GCC was written by one of the authors (Doug Gregor). However, I don't this is quite intuitive. To me, (a) a const string & is conceptually closer to a string && than a const char *, and (b) the compiler could create a temporary string in g2, as if it were written like this: void g2(const std::string & arg) { f(std::string(arg)); } Indeed, sometimes the copy constructor is considered to be an implicit conversion operator. Syntactically, this is suggested by the form of a copy constructor, and the standard even mentions this specifically in clause 13.3.3.1.2/4, where the copy constructor for derived-base conversions is given a higher conversion rank than other implicit conversions: A conversion of an expression of class type to the same class type is given Exact Match rank, and a conversion of an expression of class type to a base class of that type is given Conversion rank, in spite of the fact that a copy/move constructor (i.e., a user-defined conversion function) is called for those cases. (I assume this is used when passing a derived class to a function like void h(Base), which takes a base class by value.) Motivation My motivation for asking this is something like the question asked in http://stackoverflow.com/questions/2696156/how-to-reduce-redundant-code-when-adding-new-c0x-rvalue-reference-operator-over ("How to reduce redundant code when adding new c++0x rvalue reference operator overloads"). If you have a function that accepts a number of potentially-moveable arguments, and would move them if it can (e.g. a factory function/constructor: Object create_object(string, vector<string>, string) or the like), and want to move or copy each argument as appropriate, you quickly start writing a lot of code. If the argument types are movable, then one could just write one version that accepts the arguments by value, as above. But if the arguments are (legacy) non-movable-but-swappable classes a la C++03, and you can't change them, then writing rvalue reference overloads is more efficient. So if lvalues did bind to rvalues via an implicit copy, then you could write just one overload like create_object(legacy_string &&, legacy_vector<legacy_string> &&, legacy_string &&) and it would more or less work like providing all the combinations of rvalue/lvalue reference overloads - actual arguments that were lvalues would get copied and then bound to the arguments, actual arguments that were rvalues would get directly bound. Questions My questions are then: Is this a valid interpretation of the standard? It seems that it's not the conventional or intended one, at any rate. Does it make intuitive sense? Is there a problem with this idea that I"m not seeing? It seems like you could get copies being quietly created when that's not exactly expected, but that's the status quo in places in C++03 anyway. Also, it would make some overloads viable when they're currently not, but I don't see it being a problem in practice. Is this a significant enough improvement that it would be worth making e.g. an experimental patch for GCC?

    Read the article

< Previous Page | 18 19 20 21 22 23 24 25 26 27 28 29  | Next Page >