Daily Archives

Articles indexed Friday April 16 2010

Page 14/120 | < Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >

  • iphone facebook framework

    - by satyam
    i'm able to successfully integrate facebook into my iphone application. but just before publishing, it will show a dialog which is an instance of "FBStreamDialog". I'm only setting "userMessagePrompt" which is "Share the app with Facebook and follow the link to obtain the app" and "attachment" with "Share the app". When the app is run and when FBStreamDialog is shown, I'm seeing only "attachment" and not "userMessagePrompt". Why?

    Read the article

  • How do I use a modalViewController Identically in Two Controllers?

    - by Theory
    I'm using the Three20 TTMessageController in my app. I've figured out how to use it, adding on a bunch of other stuff (including TTMessageControllerDelegate methods and ABPeoplePickerNavigationControllerDelegate methods). It works great for me, after a bit of a struggle to figure it out. The trouble I'm having now is a design issue: I want to use it identically in two different places, including with the same delegate methods. My current approach is that I've put all the code into a single class inheriting from NSObject, called ComposerProxy, and I'm just having the two controllers that use it use the proxy, like so: ComposerProxy *proxy = [[ComposerProxy alloc] initWithController:this]; [proxy go]; The go method constructs the TTMessageController, configures it, adds it to a UINavigationController, and presents it: [self.controller presentModalViewController: navController animated: YES]; This works great, as I have all my code nicely encapsulated in ComposerProxy and I need only the above two lines anywhere I want to use it. The downside, though, is that I can't dealloc the proxy variable without getting crashes. I can't autorelease it, either: same problem. So I'm wondering if my proxy approach is a poor one. How does one normally encapsulate a bunch of behaviors like this without requiring a lot of duplicate code in the classes that use it? Do I need to add a delegate class to my ComposerProxy and make the controller responsible for dismissing the modal view controller in a hypothetical composerDidFinish method or some such? Many TIA!

    Read the article

  • how to find missing rows in oracle

    - by user203212
    Hi, I have a table called 2 tables create table ORDERS ( ORDER_NO NUMBER(38,0) not null, ORDER_DATE DATE not null, SHIP_DATE DATE null, SHIPPING_METHOD VARCHAR2(12) null, TAX_STATUS CHAR(1) null, SUBTOTAL NUMBER null, TAX_AMT NUMBER null, SHIPPING_CHARGE NUMBER null, TOTAL_AMT NUMBER null, CUSTOMER_NO NUMBER(38,0) null, EMPLOYEE_NO NUMBER(38,0) null, BRANCH_NO NUMBER(38,0) null, constraint ORDERS_ORDERNO_PK primary key (ORDER_NO) ); and create table PAYMENTS ( PAYMENT_NO NUMBER(38,0) NOT NULL, CUSTOMER_NO NUMBER(38,0) null, ORDER_NO NUMBER(38,0) null, AMT_PAID NUMBER NULL, PAY_METHOD VARCHAR(10) NULL, DATE_PAID DATE NULL, LATE_DAYS NUMBER NULL, LATE_FEES NUMBER NULL, constraint PAYMENTS_PAYMENTNO_PK primary key (PAYMENT_NO) ); I am trying to find how many late orders each customer have. the column late_days in PAYMENTS table has how many days the customer is late for making payments for any particular order. so I am making this query SELECT C.CUSTOMER_NO, C.lname, C.fname, sysdate, COUNT(P.ORDER_NO) as number_LATE_ORDERS FROM CUSTOMER C, orders o, PAYMENTS P WHERE C.CUSTOMER_NO = o.CUSTOMER_NO AND P.order_no = o.order_no AND P.LATE_DAYS>0 group by C.CUSTOMER_NO, C.lname, C.fname That means, I am counting the orders those have any late payments and late_days0. But this is giving me only the customers who have any orders with late_days0, but the customers who does not have any late orders are not showing up. so if one customer has 5 orders with late payments then it is showing 5 for that customer, but if a customer have 0 late orders,that customer is not selected in this query. Is there any way to select all the customers , and if he has any late orders, it will show the number and also if he does not have any late orders, it will show 0.

    Read the article

  • asp.net mvc cookies not being sent back

    - by brian b
    My application at mysubdomain.mydomain.com needs to set a cookie that contains some user session information. They log in at a https page. We authenticate them and set some session info in a cookie. We do this in a helper library that takes in the controller context contextBase.Response.Cookies[CookiePayload.CookieName].Value = encryptedTicket; contextBase.Response.Cookies[CookiePayload.CookieName].Expires = cookieExpires; contextBase.Response.Cookies[CookiePayload.CookieName].Domain= ConfigHelper.CookieDomain; contextBase.Response.Cookies[CookiePayload.CookieName].HttpOnly=true; We do a quick redirect in the controller (to a non https page): this.ControllerContext.HttpContext.Response.Redirect(redirectTo, false); return null; The cookie appears in the response (according to firebug's net tab). But neither fireforx nor ie send the cookie on subsequent gets. We are setting the cookie domain to mydomain.com even though the site is mysubdomain.mydomain.com. Skipping the redirect command has no effect, nor does changing the cookie value. I'm baffled. Thanks for any suggestions.

    Read the article

  • How to exit an if clause

    - by Roman Stolper
    What sorts of methods exist for prematurely exiting an if clause? There are times when I'm writing code and want to put a break statement inside of an if clause, only to remember that those can only be used for loops. Lets take the following code as an example: if some_condition: ... if condition_a: # do something # and then exit the outer if block ... if condition_b: # do something # and then exit the outer if block # more code here I can think of one way to do this: assuming the exit cases happen within nested if statements, wrap the remaining code in a big else block. Example: if some_condition: ... if condition_a: # do something # and then exit the outer if block else: ... if condition_b: # do something # and then exit the outer if block else: # more code here The problem with this is that more exit locations mean more nesting/indented code. Alternatively, I could write my code to have the if clauses be as small as possible and not require any exits. Does anyone know of a good/better way to exit an if clause? If there are any associated else-if and else clauses, I figure that exiting would skip over them.

    Read the article

  • How to launch new Firefox window with multiple tabs using Python

    - by newbie py
    Hi, I want to create a MSWindows Python program that would launch a new Firefox window with multiple tabs each time it is run. For example if I want to search "hello", a new window pops out (even if a Firefox window is already open) and then launches a Google and Bing tabs searching for "hello". If I change the keyword to "world", a new browser pops out again with Google and Bing tabs searching for "world". I've looked at the webbrowser module but couldn't get it to: 1. Launch a new browser when a browser is already open: e.g. webbrowser.open('http://www.google.com',new=1) will instead open a new tab 2. Launch multiple tabs simultaneously in the same window Appreciate the help. Thanks.

    Read the article

  • c++ Initializing a struct with an array as a member

    - by Drew Shafer
    I've got the following reduced testcase: typedef struct TestStruct { int length; int values[]; }; TestStruct t = {3, {0, 1, 2}}; This works with Visual C++, but doesn't compile with g++ under linux. Can anyone help me make this specific kind of initializer portable? Additional details: the actual structure I'm working with has several other int values, and the array can range in length from a single entry to over 1800 entries. Any help much appreciated. Thanks!

    Read the article

  • In Ruby, is there are better way of selecting a constant (or avoiding the constant altogether) based

    - by Vertis
    Not sure the title fully describes the problem/question I'm trying to ask, sorry. I'm One of my fellow developers has created classes as such: class Widget attr_accessor :model_type ... end and: class ModelType MODEL1 = "model1" MODEL2 = "model2" MODEL3 = "model3" end Now he wants me to convert a retrieved string "MODEL1" to the constant. So that when he is referencing that model elsewhere he can use ModelType::MODEL1. Obviously I've got to convert from the string I'm being given with something like the following: case model_type when 'MODEL1' @model_type = ModelType::MODEL1 ... end I feel like this is clunky, so I'd like to know if there is a better DRYer way of providing this kind of functionality.

    Read the article

  • plupload with webpy.

    - by markus
    Hi, i have a problem. I want to upload a file with plupload with the HML5 runtime. This is my html/js code : jQuery(function(){ jQuery("#uploader").pluploadQueue({ // General settings runtimes : 'html5', name : 'file', url : 'http://server.name/addContent', max_file_size : '${maxSize}$_("GB")', }); jQuery('#form_upload_file').submit(function(e) { var uploader = jQuery('#uploader').pluploadQueue(); // Validate number of uploaded files if (uploader.total.uploaded == 0) { // Files in queue upload them first if (uploader.files.length > 0) { // When all files are uploaded submit form uploader.bind('UploadProgress', function() { if (uploader.total.uploaded == uploader.files.length) jQuery('#form_upload_file').submit(); }); uploader.start(); } else alert('You must at least upload one file.'); e.preventDefault(); } }); }); <form id="form_upload_file" action="#" method="POST"> <div id="uploader"></div> <input type="hidden" name="token" value="token" /> <input type="hidden" name="idUser" value="$idUser" /> </form> So, when i click in the button to upload(the submit() method is not called), it does an OPTIONS HTTP request to my server so i don't know what i must do to save the file? this is my webpy code : def OPTIONS(self): web.header('Content-type', 'text/plain: charset=utf-8') web.header('Cache-Control', 'no-store, no-cache, must-revalidate') web.header('Cache-Control', 'post-check=0, pre-check=0', False) web.header('Pragma', 'no-cache') def POST(self): input = web.input(_unicode=False, file={})#on récupère les input self.copy(input.file.file) etc. any idea ? thanks.

    Read the article

  • Image not showing in UIImageView in Interface Builder / iPhone

    - by dbonneville
    I have a UIView with an UIImageView dragged onto the view. All of a sudden, for all my xibs, the image no longer shows up. There is a blue X. However, when it builds, the image is there. At one point, I deleted and regenerated all my images and moved some into a subfolder in XCode. Normally, when you go to select an image for an UIImageView, IB allows you to pick from any image in the project. But, I can't see any of the images I had put in the folder anymore in the dropdown. All I see in the dropdown on the Inspector is the one image I want, but that is also the one that is not showing up. And like I said, if I build it on the device or simulator, it all works. There is some cache or something screwed up somewhere. Everything builds with no errors. I cleared the caches and rebuilt. It all works. No error or warnings. But...I can't see any other images and IB still thinks it's missing the image that is clearly selected in the dropdown. So how do I get XCode and IB back on track and see what assets it properly should be seeing in the XIBs?

    Read the article

  • deleting dublicates in listview delphi

    - by radick
    hi all I am trying to remove dublicates in my listview my function like this below procedure RemoveDuplicates(const LV:TbsSkinListView); var i,j: Integer; begin LV.Items.BeginUpdate; LV.SortType := stText; try for i := 0 to LV.Items.Count-1 do begin for j:=i+1 to LV.Items.Count-1 do begin if SameText(LV.Items[i].SubItems[0], LV.Items[j].SubItems[0]) and SameText(LV.Items[i].SubItems[1], LV.Items[j].SubItems[1]) and SameText(LV.Items[i].SubItems[2], LV.Items[j].SubItems[2]) and SameText(LV.Items[i].SubItems[3], LV.Items[j].SubItems[3]) then LV.Items.Delete(j); end; end; finally LV.SortType := stNone; LV.Items.EndUpdate; end; ShowMessage('Deleted'); end; but its not doing what i intended can anyone help me ?

    Read the article

  • Windows: redirect stdout and stderror to nothing

    - by Ramblingwood
    I have a command I am running produces a ton of output, I want to silence the output without writing to a file. I have used the following to send all output to a file, but again I don't want any file output: command > out.txt 2>&1 I have used command > /bin/null on my CentOS box before, but I can't find a similar thing for windows.

    Read the article

  • Consuming an .ics in YQL

    - by Josh
    How would one consume an ICS file in YQL? Given an .ics such as: http://www.hebcal.com/export/ba/8a35a5efbb27548bc0272b94b8de96.ics?subscribe=1&v=1&year=2010&month=x&nh=on&tag=fp.ql&c=off How would I go about using YQL to select certain events based on fields, etc. I've tried the standard formats, and the only format that seems to even parse the file is HTML - which puts it all in a <p>, and removes the line returns that give the file meaning. I've had some success with using Yahoo Pipe's Fetch Feed Source, but was wondering if it's possible to do this entirely in YQL. Any ideas?

    Read the article

  • Trying to establish remote debug with visual studio running inside vmpalyer

    - by Kazoom
    i have this configuration a visual studio running inside virtual machine. the host machine has xp on it and so does the virtual machine. i have to run remote debug on the third machine which is connected to the host machine. i m currently facing this problem i m not able to ping my virtual machine from my host machine, however reverse is possible. how to resolve that? both my machine are on same workgroup (not domain, arent they both same?)

    Read the article

  • jQuery dialog breaking after closing - I'm using dialog destroy

    - by pedalpete
    I've got a few demo videos I've been making as tutorials, and I'm using a link to open a dialog box and put the demo video in that box. I use the same div to show other notes on the page when a user selects to view a complete note. The code I use to show the notes is jQuery('span.Notes').live('click', function(){ var note=jQuery(this).data('note'); jQuery('div#showNote').text(note); jQuery('div#showNote').append(''); jQuery('div#showNote').dialog({ modal: true, close: function(){ jQuery('div#showNote').dialog('destroy').empty(); } }); }); The code I use for the demo videos is VERY similar. jQuery('a.demoVid').click(function(){ var videoUrl=jQuery(this).attr('href'); jQuery('div#showNote').dialog({ modal: true, height: 400, width: 480, close: function(){ jQuery('div#showNote').dialog('destroy').empty(); } }); swfobject.embedSWF(videoUrl,'showNote','480','390','8.0.0'); return false; }); I can click on as many notes as I want, and the dialog opens up and shows the note. However, when I click the demoVid, the dialog opens, but then closing the dialog kills any other 'showNote' dialogs on the page, so I can't open any more notes, or demo videos.

    Read the article

  • Simulating graphing paper on iPhone

    - by Rick
    I need to implement 'graphing paper' in an iPhone app. The user should be presented with a grid. They user can touch individual squares to turn them on, or if they're already on, off.The user can pinch to zoom and scroll around the paper as well.. So far I'm thinking Quartz 2D + UIScrollView is the way to do this but these are both areas of iPhone development that I'm unfamiliar with. Does this seem like a reasonable strategy?

    Read the article

< Previous Page | 10 11 12 13 14 15 16 17 18 19 20 21  | Next Page >