Search Results

Search found 566 results on 23 pages for 'alan neal'.

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

  • Where should I store and verify files manipulated by an app

    - by Alan W. Smith
    I'm working on a little Ruby script to move screenshots while renaming them based on a specific convention. I'll be writing tests to confirm the behavior. Ruby has lots of conventions for where to store files (e.g. the "spec" and "features" directories for RSpec and Cucumber, respectively), but I'm not finding best practices for storing files that will be acted upon by the tests. The same goes for a destination for the final copies of the files. So, the question in two parts is: Where should I store files that the test cases will use for a source input. Where should tests that need to write output files send them to.

    Read the article

  • What are the Consequences for using Relative Location Headers?

    - by Alan Storm
    According to the spec, Location headers used in a redirect require a server name HTTP/1.1 301 Moved Permanently ... Location: http://example.com/foo/baz/bar However, in 2012, most web browsers will recognize a relative path and redirect you to the new location using the original server name HTTP/1.1 301 Moved Permanently ... Location: /foo/baz/bar Are there any negative/surprising consequences to using the relative URLs in the Location headers? My particular concern is how Google/search-engines will interpret this, but if there's anything else I'm not thinking about I'd love to hear it.

    Read the article

  • Earliest use of Comments as Semantically Meaningful Things in a Program?

    - by Alan Storm
    In certain corners of the PHP meta-programming world, it's become fashionable to use PHPDoc comments as a mechanism for providing semantically meaningful information to a program. That is, other code will parse the doc blocks and do something significant with the information encoded in those comments. Doctrine's annotations and code generation are an example of this. What's the earliest (or some early) use of this technique? I have vague memories of some early java Design by Contract implementations doing similar things, but I'm not sure of those folks were inventing the technique, or if they got it from somewhere. Mainly asking so I can provide some historical context for PHP developers who haven't come across the technique before, and are distrustful of it because it seems a little crazy pants.

    Read the article

  • Sweden Windows Azure Group Meeting in November &amp; Fast with Windows Azure Competition

    - by Alan Smith
    SWAG November Meeting There will be a Sweden Windows Azure Group (SWAG) meeting in Stockholm on Monday 19th November. Chris Klug will be presenting a session on Windows Azure Mobile Services, and I will be presenting a session on Web Site Authentication with Social Identity Providers. Active Solution have been kid enough to host the event, and will be providing food and refreshments. The registration link is here: http://swag14.eventbrite.com If you would like to join SWAG the link is here: http://swagmembership.eventbrite.com Fast with Windows Azure Competition I’ve entered a 3 minute video of rendering a 3D animation using 256 Windows Azure worker roles in the “Fast with Windows Azure” competition. It’s the last week of voting this week, it would be great if you can check out the video and vote for it if you like it. I have not driven a car for about 15 years, so if I win you can expect a hilarious summery of the track day in Vegas. My preparation for the day would be to play Project Gotham Racing for a weekend, and watch a lot of Top Gear.   My video is “Rapid Massive On-Demand Scalability Makes Me Fast!”. The link is here: http://www.meetwindowsazure.com/fast/

    Read the article

  • Will Ubuntu be releasing an update for Cedar Trail Processors?

    - by Alan
    There is a file available on the Intel web site with the file name "cdv-gfx-drivers-1.0.1_bee.tar.bz2" and a date of July 6, 2012. It can be found by searching the Intel Download Center for the filename or the string "Linux* PowerVR Graphics/Media Drivers". The download page links to the file, release notes and a link, Enabling hardware accelerated playback that takes one to a page containing links to two pdf documents titled "Enabling Hardware Accelerated Playback for Intel® AtomTM Processor N2000/D2000 Series", one for Ubuntu and one for Fedora. The instruction and release notes speak to working with kernel 3.1.0 and since I do not feel I have the skills, knowledge or training to do anything else but, follow the instructions to the "T", I am very reluctant to try anything on my freshly updated 3.2.0 kernel. I would much rather use a Ubuntu supported kernel that applies these drivers and doesn't break anything in the process. Is it a case where this is so new that Canonical has not yet included these drivers but, soon will do so?

    Read the article

  • error: no such partition after 11.10 upgrade to 12.04

    - by Alan King
    -I recently upgraded my 11.10 install to 12.04 LTS and got the above error message upon reboot after a GNU GRUB version ubuntu3 display showing Ubuntu 3.2.0-23-generic pae and other kernels or memory tests to choose from. The upgrade had to be done by CD because the Update Manager did not show the 12.04 upgrade option. After selecting the default install option of upgrading 11.10 to 12.04, I was presented with a screen saying that I had not specified a swap partition. Upon selection the 'back' key, I was taken to a partition page which listed two current partitions (only Ubuntu 11.10 had been installed - no Windoz): an ext4 partition plus a small 1.8GB partition. I double clicked the small partition and selected it as the swap partition even though I wondered at the time why this even came up. I can see the two user folders under home from the file manager screen while runnning 12.04 from the CD but if I try to access either one an error message is displayed saying I do not have permission while I get a loading message in the lower right corner of the window that does not go away. I have two questions: Can I access the user folders prior to recovery via the Terminal? If so, how? How do I fix the GRUB issue?

    Read the article

  • How do I implement URL rewriting in my .htaccess file?

    - by Alan
    I'd like to do some URL rewriting (Why? See this question.) so that instead of users seeing addresses like labouseur.com/course-compilers.html they can instead see and use simply labouseur.com/course-compilers (Even better, maybe I should restructure that so that it's courses/compilers.) I'm using a Linux-based shared hosting service for my website, so I do not have administrative control of the server, but I do have control over .htaccess. The references I've read online seemed less than clear to me, so I'm looking for a little clarity and advice here. Thanks!

    Read the article

  • After one has made many grid based puzzles how does one make then into a PDF ready for printing

    - by alan ross
    After one has generated many grid based puzzles like sudoku, kakuro or even plain crosswords and now one has to print them in a book. How does one make a pdf (book file) from them automatically. To explain the question better. One has the puzzle ready in computer format like ..35.6.89 for all nine rows. The dot being the empty cell. How does one convert then to a picture on a PDF page complete with box, automatically without doing them individually and then print a book from the pdf file. As can be seen there are other things also printed on the page all this is done automatically.

    Read the article

  • I have a performance problem

    - by Alan
    (copied from my wordpress blog). So start 95% of the performance calls that I receive. They usually continue something like: I have gathered some *stat data for you (eg the guds tool from Document 1285485.1), can you please root cause our problem? So, do you think you could? Neither can I, based on this my answer inevitably has to be "No". Given this kind of problem statement, I have no idea about the expectations, the boundary conditions, or even the application. The answer may as well be "Performance problems? Consult your local Doctor for Viagra". It's really not a lot to go on. So, What kind of problem description is going to allow me to start work on the issue that is being seen? I don't doubt that there really is an issue, it just needs to be pinned down somewhat. What behavior exactly are you expecting to see? Be specific and use business metrics. For example "run-time", "response-time" and "throughput". This helps us define exit criterea. Now, let's look at the system that is having problems. How is what you are seeing different? Use the same type of metrics. The answers to these two questions take us a long way towards being able to work a call. Even more helpful are answers to questions like Has this system ever worked to expectation? If so, when did it start exhibiting this behavior? Is the problem always present, or does it sometimes work to expectation? If it sometimes works to expectation, when are you seeing the problem? Is there any discernible pattern? Is the impact of the problem getting better, worse, or remaining constant? What kind of differences are there between when the system was performing to expectation and when it is not? Are there other machines where we could expect to see the same issue (eg similar usage and load), but are not? Again, differences? Once we start to gather information like this we start to build up a much clearer picture of exactly what we need to investigate, and what we need to achieve so that both you and me agree that the problem has been solved. Please help get that figure of poorly defined problem statements down from it's current 95% value.

    Read the article

  • How to get my windows docs ; pics, mp3, and docs off an external usb hard drive (sata 3.5 enclosure)

    - by Alan
    Back when I had windows 7, I cloned my internal hard drive to an enclosed external usb hard drive. I then formatted my internal hard drive and installed ubuntu 11.10 as my only OS. How do I migrate my files, pics, mp3's, and etc off the external drive and back to my internal drive which now only has ubuntu on it. (and why is this process not made easier?) I have tried logging in as the root user but I cannot find the external device. I have downloaded several different apps to manage files, usb sticks and etc. PLEASE HELP!!!

    Read the article

  • GDB Not Skipping Functions without Debug Info

    - by Alan Lue
    I compiled GDB 7 on a Mac OS X Leopard system. When stepping through a C program, GDB fails to step through 'printf()' statements, which probably don't have associated debug information, and starts printing "Cannot find bounds of current function." Here's some output: $ /usr/local/bin/gdb try1 GNU gdb (GDB) 7.1 Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-apple-darwin10". (gdb) list 1 #include <stdio.h> 2 static void display(int i, int *ptr); 3 4 int main(void) { 5 int x = 5; 6 int *xptr = &x; 7 printf("In main():\n"); 8 printf(" x is %d and is stored at %p.\n", x, &x); 9 printf(" xptr holds %p and points to %d.\n", xptr, *xptr); 10 display(x, xptr); (gdb) b 6 Breakpoint 1 at 0x1e8e: file try1.c, line 6. (gdb) r Starting program: /tmp/try1 Breakpoint 1, main () at try1.c:6 6 int *xptr = &x; (gdb) n 7 printf("In main():\n"); (gdb) n 0x0000300a in ?? () (gdb) n Cannot find bounds of current function (gdb) n Cannot find bounds of current function Any idea what's going on? Alan

    Read the article

  • Binary file email attachment problem

    - by Alan Harris-Reid
    Hi there, Using Python 3.1.2 I am having a problem sending binary attachment files (jpeg, pdf, etc.) - MIMEText attachments work fine. The code in question is as follows... for file in self.attachments: part = MIMEBase('application', "octet-stream") part.set_payload(open(file,"rb").read()) encoders.encode_base64(part) part.add_header('Content-Disposition', 'attachment; filename="%s"' % file) msg.attach(part) # msg is an instance of MIMEMultipart() server = smtplib.SMTP(host, port) server.login(username, password) server.sendmail(from_addr, all_recipients, msg.as_string()) However, way down in the calling-stack (see traceback below), it looks as though msg.as_string() has received an attachment which creates a payload of 'bytes' type instead of string. Has anyone any idea what might be causing the problem? Any help would be appreciated. Alan builtins.TypeError: string payload expected: File "c:\Dev\CommonPY\Scripts\email_send.py", line 147, in send server.sendmail(self.from_addr, all_recipients, msg.as_string()) File "c:\Program Files\Python31\Lib\email\message.py", line 136, in as_string g.flatten(self, unixfrom=unixfrom) File "c:\Program Files\Python31\Lib\email\generator.py", line 76, in flatten self._write(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 101, in _write self._dispatch(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 127, in _dispatch meth(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 181, in _handle_multipart g.flatten(part, unixfrom=False) File "c:\Program Files\Python31\Lib\email\generator.py", line 76, in flatten self._write(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 101, in _write self._dispatch(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 127, in _dispatch meth(msg) File "c:\Program Files\Python31\Lib\email\generator.py", line 155, in _handle_text raise TypeError('string payload expected: %s' % type(payload))

    Read the article

  • Templates vs. coded HTML

    - by Alan Harris-Reid
    I have a web-app consisting of some html forms for maintaining some tables (SQlite, with CherryPy for web-server stuff). First I did it entirely 'the Python way', and generated html strings via. code, with common headers, footers, etc. defined as functions in a separate module. I also like the idea of templates, so I tried Jinja2, which I find quite developer-friendly. In the beginning I thought templates were the way to go, but that was when pages were simple. Once .css and .js files were introduced (not necessarily in the same folder as the .html files), and an ever-increasing number of {{...}} variables and {%...%} commands were introduced, things started getting messy at design-time, even though they looked great at run-time. Things got even more difficult when I needed additional javascript in the or sections. As far as I can see, the main advantages of using templates are: Non-dynamic elements of page can easily be viewed in browser during design. Except for {} placeholders, html is kept separate from python code. If your company has a web-page designer, they can still design without knowing Python. while some disadvantages are: {{}} delimiters visible when viewed at design-time in browser Associated .css and .js files have to be in same folder to see effects in browser at design-time. Data, variables, lists, etc., must be prepared in advanced and either declared globally or passed as parameters to render() function. So - when to use 'hard-coded' HTML, and when to use templates? I am not sure of the best way to go, so I would be interested to hear other developers' views. TIA, Alan

    Read the article

  • sIFR 3 rev 436 - copy link to clipboard

    - by Alan Forsyth
    This was originally a question, but is now a code enhancement, since it's a very minor (but useful) update. When heading (or other) text is used as a link with sIFR 3, you now get the two 'open link / open link in new window' options in the right-click flash context menu for the link. When I came across sIFR for the first time yesterday, I was wanting to copy a header (h2) link to the clipboard, on a site that used sIFR 2.x, and was frustrated that I couldn't. Thanks to the wonders of open source (and well written code), I can suggest the following enhancement to sIFR 3: [In the file flash/sIFR.as, find the section starting with the comment "// Have to set up menu items first!" through to ");" and replace with the following, then add font information to the .fla and export the swf as per the tutorial:] // Have to set up the menu items first! menuItems.push( new ContextMenuItem("Follow link", function() { getURL(sIFR.instance.primaryLink, sIFR.instance.primaryLinkTarget) }), new ContextMenuItem("Open link in new window", function() { getURL(sIFR.instance.primaryLink, "_blank") }), new ContextMenuItem("Copy link to clipboard", function() { System.setClipboard(sIFR.instance.primaryLink) }) ); Now I'm happy... :-) Alan.

    Read the article

  • .NET Embedded Manifest Crashes XP

    - by Alan Spark
    Hi, I am embedding a manifest in a .NET exe so that it can request elevated permissions in Vista and Windows 7. The manifest that I am using is as follows: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <assemblyIdentity version="1.0.0.0" name="ElevationTest" type="win32"/> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="requireAdministrator"/> </requestedPrivileges> </security> </trustInfo> </assembly> It works as expected in Vista and Windows 7 but crashes XP with the standard "... has encountered a problem and needs to close..." error. If I don't embed any manifest then it works as expected but will obviously not have the required permissions in Vista and Windows 7. What is a standard way of producing an exe that will function with the correct permissions in XP and Vista / Windows 7? Thanks, Alan

    Read the article

  • PHP Mailer Class - Securing Email Credentials

    - by Alan A
    I am using the php mailer class to send email via my scripts. The structure is as follows: $mail = new PHPMailer; $mail->IsSMTP(); // Set mailer to use SMTP $mail->Host = 'myserver.com'; // Specify main and backup server $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = '[email protected]'; // SMTP username $mail->Password = 'user123'; // SMTP password $mail->SMTPSecure = 'pass123'; It seems to me to be a bit of a security hole having the mailbox credentials in plain view. So I thought I might put these in an external file outside of the web root. My question is how would I then assign the $mail object these values. I of course no how to use include and/or requires... would it simple be a case of.... $mail->IsSMTP(); // Set mailer to use SMTP $mail->Host = 'myserver.com'; // Specify main and backup server $mail->SMTPAuth = true; // Enable SMTP authentication includes '../locationOutsideWebroot/emailCredntials.php'; $mail->SMTPSecure = 'pass123'; Then emailCredentails.php: <?php $mail->Username = '[email protected]'; $mail->Password = 'user123'; ?> Would this be sufficient and secure enough? Thanks, Alan.

    Read the article

  • What's the best way to refresh a UITableView within a UINavigationController hierarchy

    - by Steve Neal
    Hi, I'm pretty new to iPhone development and have struggled to find what I consider to be a neat way around this problem. I have a user interface where a summary of record data is displayed in a table inside a navigation controller. When the user clicks the accessory button for a row, a new view is pushed onto the navigation controller revealing a view where the user can edit the data in the corresponding record. Once done, the editing view is popped from the navigation controller's stack and the user is returned to the table view. My problem is that when the user returns to the table view, the table still shows the state of the data before the record was edited. I must therefore reload the table data to show the changes. It doesn't seem possible to reload the table data before it is displayed as the call only updates displayed records. Reloading it after the table has been displayed results in the old data changing before the user's eyes, which I'm not too happy with. This seems to me like a pretty normal thing to want to do in an iPhone app. Can anyone please suggest the best practice approach to doing this? I feel like I'm missing something. Cheers - Steve.

    Read the article

  • Titanium webview bug or "feature"? Numbers converted to telephone links

    - by Alan Neal
    I can't stop Titanium's webview from converting numbers to telephone links. For instance, let's say I programmatically set the innerHTML of a div called test to 96840664702 and then write javascript... alert(document.getElementById('test').innerHTML In Mobile Safari on the iPhone, Firefox, etc., the alert will read "96840664702". If I point Titanium's webview to the same page, the alert will read: <a href="tel:96840664702" x-apple-data=detectors="true">96840664702</a> How can I globally disable the data-detectors? I tried a couple meta-tags... <meta name=”format-detection” content=”telephone=no” > <meta name="x-" http-equiv="x-rim-auto-match" forua="true" content="none"/> ... but they didn't work. I couldn't find a reference for a meta tag that specifically mentioned Apple's detectors. Again, it's only a problem in Titanium's webview. It works everywhere else.

    Read the article

  • Query only the first detail record for each master record

    - by Neal S.
    If I have the following master-detail relationship: owner_tbl auto_tbl --------- -------- owner --- owner auto year And I have the following table data: owner_tbl auto_tbl --------- -------- john john, corvette, 1968 john, prius, 2008 james james, f-150, 2004 james, cadillac, 2002 james, accord, 2009 jeff jeff, tesla, 2010 jeff, hyundai, 1996 Now, I want to perform a query that returns the following result: john, corvette, 1968 jeff, hyundai, 1996 james, cadillac, 2002 The query should join the two tables, and sort all the records on the "year" field, but only return the first detail record for each master record. I know how to join the tables and sort on the "year" field, but it's not clear how (or if) I might be able to only retrieve the first joined record for each owner. Three related questions: Can I perform this kind of query using LINQ-to-SQL? Can I perform the query using T-SQL? Would it be best to just create a stored procedure for the query given its likely complexity?

    Read the article

  • How can I prevent tab characters etc. from being pasted into an asp.net textbox?

    - by Neal
    Hello, I'd like to have an asp.net textbox that people can paste content into and it works like notepad, i.e. no formatting or special characters will get entered. I take text and pass it to a web service which manipulates it and converts it into a tab delimited file. The problem I've experienced is sometimes people copy from MS Word and paste that content in and somehow even the tab characters etc. get passed to the web service. I run routines now to strip that information out but it would be so much easier if the textbox on the web page didn't capture anything but the text itself, i.e. visible characters (numbers, letters, punctuation). Anyone have a suggestion to have a textbox that doesn't capture formatting and non-visual characters? Thank you.

    Read the article

  • Parallel.For System.OutOfMemoryException

    - by Martin Neal
    We have a fairly simple program that's used for creating backups. I'm attempting to parallelize it but am getting an OutofMemoryException within an AggregateExcption. Some of the source folders are quite large, and the program doesn't crash for about 40 minutes after it starts. I don't know where to start looking so the below code is a near exact dump of all code the code sans directory structure and Exception logging code. Any advise as to where to start looking? using System; using System.Diagnostics; using System.IO; using System.Threading.Tasks; namespace SelfBackup { class Program { static readonly string[] saSrc = { "\\src\\dir1\\", //... "\\src\\dirN\\", //this folder is over 6 GB }; static readonly string[] saDest = { "\\dest\\dir1\\", //... "\\dest\\dirN\\", }; static void Main(string[] args) { Parallel.For(0, saDest.Length, i => { try { if (Directory.Exists(sDest)) { //Delete directory first so old stuff gets cleaned up Directory.Delete(sDest, true); } //recursive function clsCopyDirectory.copyDirectory(saSrc[i], sDest); } catch (Exception e) { //standard error logging CL.EmailError(); } }); } } /////////////////////////////////////// using System.IO; using System.Threading.Tasks; namespace SelfBackup { static class clsCopyDirectory { static public void copyDirectory(string Src, string Dst) { Directory.CreateDirectory(Dst); /* Copy all the files in the folder If and when .NET 4.0 is installed, change Directory.GetFiles to Directory.Enumerate files for slightly better performance.*/ Parallel.ForEach<string>(Directory.GetFiles(Src), file => { /* An exception thrown here may be arbitrarily deep into this recursive function there's also a good chance that if one copy fails here, so too will other files in the same directory, so we don't want to spam out hundreds of error e-mails but we don't want to abort all together. Instead, the best solution is probably to throw back up to the original caller of copy directory an move on to the next Src/Dst pair by not catching any possible exception here.*/ File.Copy(file, //src Path.Combine(Dst, Path.GetFileName(file)), //dest true);//bool overwrite }); //Call this function again for every directory in the folder. Parallel.ForEach(Directory.GetDirectories(Src), dir => { copyDirectory(dir, Path.Combine(Dst, Path.GetFileName(dir))); }); } }

    Read the article

  • UISegmentedControl Best Practice

    - by Neal L
    Hi all, I'm trying to work out the "best" way to use a UISegmentedControl for an iPhone application. I've read a few posts here on stackoverflow and seen a few people's ideas, but I can't quite sort out the best way to do this. The posts I'm referring to are: http://stackoverflow.com/questions/1559794/changing-views-from-uisegmentedcontrol and http://stackoverflow.com/questions/1047114/how-do-i-use-a-uisegmentedcontrol-to-switch-views It would seem that the options are: Add each of the views in IB and lay them out on top of each other then show/hide them Create each of the subviews separately in IB, then create a container in the main view to populate with the subview that you need Set up one really tall or really wide UIView and animate it left/right or up/down depending on the selected segment Use a UITabBarController to swap out the subviews - seems silly For tables, reload the table and in cellForRowAtIndex and populate the table from different data sources or sections based on the segment option selected (not the case for my app) So which approach is best for subview/non-table approaches? Which is the easiest to implement? Could you share some sample code to the approach? Thanks!

    Read the article

  • Adapting existing HTML/Javascript model to Titanium's latest release (v 0.9)

    - by Alan Neal
    In pre-0.9 versions of Titanium, one could simply specify an .html file (local or remote) in the tiapp.xml file and interact with it in the same manner as one would on a website. As of version 0.9, that is no the longer case. One creates their entire app dynamically. Unfortunately, this broke my previous implementation and, other than an updated Kitchen Sink, much of the new model and API calls are not covered in the documentation (e.g., createLabel). So, my question is this... What are the simplest steps for re-creating the previous effect (knowingly forgoing some of the advantages of the Titanium's latest approach if necessary)? My previous implementation was exactly as it functions on the website. The website has a single index.html file with no content other than links to JavaScript and style files. The document body's onload event called the first JavaScript function (located in the main script) and, from that point forth, the entire content was dynamically created. How can I set up the latest version of Titanium so that I am poised to do the exact same thing? BTW: Whereas I previously had the choice to keep the files local or remote, I don't believe that remote access (e.g., simply using the webView widget to point to the website) is viable. That's because pages displayed via the webView do not have access to most of the API. Since the iPhone and Safari browsers do not support the file input type, the only means for uploading files (something my app requires) is calling Titanium's function. Thanks in advance.

    Read the article

  • MFMailComposeViewController hangs my app

    - by Neal L
    Hi, I am trying to add email functionality to my app. I can get the MFMailComposeViewController to display correctly and pre-populate its subject and body, but for some reason when the user clicks on the "Cancel" or "Send" buttons in the nav bar the app just hangs. I inserted a NSLog() statement into the first line of mailComposeController"didFinishWithResult:error and it doesn't even print that line out to the console. Does anybody have an idea what would cause the MFMailComposeViewController to hang like that? Here is my code from the header: #import "ManagedObjectEditor.h" #import <MessageUI/MessageUI.h> @interface MyManagedObjectEditor : ManagedObjectEditor <MFMailComposeViewControllerDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate> { } - (IBAction)emailObject; @end from the implementation file: if ([MFMailComposeViewController canSendMail]) { MFMailComposeViewController *mailComposer = [[MFMailComposeViewController alloc] init]; mailComposer.delegate = self; [mailComposer setSubject:NSLocalizedString(@"An email from me", @"An email from me")]; [mailComposer setMessageBody:emailString isHTML:YES]; [self presentModalViewController:mailComposer animated:YES]; [mailComposer release]; } [error release]; [emailString release]; and here is the code from the callback: #pragma mark - #pragma mark Mail Compose Delegate Methods - (void)mailComposeController:(MFMailComposeViewController *)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error { NSLog(@"in didFinishWithResult:"); switch (result) { case MFMailComposeResultCancelled: NSLog(@"cancelled"); break; case MFMailComposeResultSaved: NSLog(@"saved"); break; case MFMailComposeResultSent: NSLog(@"sent"); break; case MFMailComposeResultFailed: { UIAlertView *alert = [[UIAlertView alloc] initWithTitle:NSLocalizedString(@"Error sending email!",@"Error sending email!") message:[error localizedDescription] delegate:nil cancelButtonTitle:NSLocalizedString(@"Bummer",@"Bummer") otherButtonTitles:nil]; [alert show]; [alert release]; break; } default: break; } [self dismissModalViewControllerAnimated:YES]; } Thanks!

    Read the article

  • SOAPUI: Document Type Webservices Testing.

    - by Neal Johnson
    Hi , I am new to SOAP UI usage. I would like to test one of the webservices generated using weblogic 8.1 SP 6. The webservice is a document type webservice. Is there any way to test this webservice using SOAP UI ?? Or is there any tool which helps to test document type webservices?? Thanks in advance.

    Read the article

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