Search Results

Search found 2582 results on 104 pages for 'mike selby'.

Page 57/104 | < Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >

  • iphone - gesture not working on animated view

    - by Mike
    I have this animated view and a gesture assigned to it... [self.view setUserInteractionEnabled:YES]; UIImageView *sequence = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"frame0.png"]]; [sequence setUserInteractionEnabled:YES]; sequence.center = CGPointMake(centroX, centroY); NSMutableArray *array = [[NSMutableArray alloc] init] ; for (int i=0; i<30; i++) { UIImage *oneImage = [UIImage imageNamed:[NSString stringWithFormat:@"frame%d.png",i]]; [array addObject:oneImage]; } sequence.animationImages = array; sequence.animationDuration = 1.0; sequence.animationRepeatCount = 1; [self.view addSubview:sequence]; [sequence release]; sequence.startAnimating; sequence.image = [UIImage imageNamed:@"frame29.png"]; // doSomething never runs when I tap the image... why? UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(doSomething)]; [singleTap setDelegate:self]; [singleTap setCancelsTouchesInView:NO]; [singleTap setDelaysTouchesEnded:NO]; [sequence addGestureRecognizer:singleTap]; [singleTap release]; The gesture is never called... why? I have no other gesture associated anywhere. thanks for any help.

    Read the article

  • I need information about Informatica

    - by Mike
    I need some information about the Informatica ETL tool. I am a rookie with that, so could you please recommend where can I get some tutorials to get started. Can I download the tool, and if so where can I download it? What are the alternatives to Informatica?

    Read the article

  • xpath 2.0 query - how to test for the first occurence of an element in a xml document

    - by Mike
    I have the following xsl template: <xsl:template match="para"> <fo:block xsl:use-attribute-sets="paragraph.para"> <!-- if first para in document --> <!--<xsl:if test="//para[1] intersect .">--> <xsl:if test="//para[1] intersect ."> <xsl:attribute name="space-after">10pt</xsl:attribute> <xsl:attribute name="background-color">yellow</xsl:attribute> </xsl:if> <xsl:choose> <xsl:when test="preceding-sibling::*[1][self::title]"> <xsl:attribute name="text-indent">0em</xsl:attribute> </xsl:when> <xsl:when test="parent::item"> <xsl:attribute name="text-indent">0em</xsl:attribute> </xsl:when> <xsl:otherwise> <xsl:attribute name="text-indent">1em</xsl:attribute> </xsl:otherwise> </xsl:choose> <xsl:apply-templates/> </fo:block> </xsl:template> The problem I am having is selecting the very first para node in the document from the following xml: <document> <section> <paragraph> <para>Para Text 1*#</para> <para>Para Text 2</para> </paragraph> </section> <paragraph> <para>Para Text 3*</para> <para>Para Text 4</para> <para>Para Text 5</para> <sub-paragraph> <para>Para Text 6*</para> <para>Para Text 7</para> </sub-paragraph> </paragraph> <appendix> <paragraph> <para>Para Text 8*</para> </paragraph> <paragraph> <para>Para Text 9</para> </paragraph> </appendix> </document> the xpath I am currently using is "//para[1] intersect ." which is selecting the first para for each group of para (denoted with a * in XML sample). Any ideas on how I can just select the first occurance of para within document (denoted with a #)?

    Read the article

  • How do I convert integers to characters in C#?

    - by Mike Webb
    I am trying to convert an index of 1 to 27 into the corresponding uppercase letter. I know that in C++ I could type this: char letter = 'A' + (char)(myIndex % 27); This same code does not work in C#. How can I accomplish this task in C#? EDIT: I'd rather not have to encode an enum or switch statement for this if there is a better mathematical solution like the one above.

    Read the article

  • scheme recursive lambda

    - by Mike
    Is there a way to have a recursive lambda expression in scheme without relying an external identifier? I know you can have (define fact (lambda (n) (if (= n 0) 1 (fact (- n 1)))) but it would be nice if fact wasn't hard coded in the lambda expression, it seems improper.

    Read the article

  • C# switch: case not falling through to other cases limitation

    - by Mike Fielden
    This question is kind of an add-on to this question In C#, a switch case cannot fall through to other cases, this causes a compilation error. In this case I am just adding some number to the month total for the selected month and each subsequent month thereafter. (simple example, not meant to be real) switch (month) { case 0: add something to month totals case 1: add something to month totals case 2: add something to month totals default: break; } Is there a logical alternative to this in C# without having to write out a ton of if statements? if (month <= 0) add something to month if (month <= 1) add something to month if (month <= 2) add something to month .... etc

    Read the article

  • MySQL Triggers to Disable A User Account

    - by Mike D
    I am trying to create a MySQL Trigger to disable someone's account if they have logged in to the site 3 times. I have tried to create this trigger using the following code, but it is not setting is_active to 0 no matter what times_logged_in is. Any help would be appreciated. CREATE TRIGGER updateTrigger AFTER UPDATE ON users FOR EACH ROW BEGIN UPDATE users SET is_active=0 WHERE NEW.is_code=1 AND NEW.times_logged_in>=3 AND NEW.user_id=user_id; END;

    Read the article

  • Windows code pages, what are they?

    - by Mike D
    I'm trying to gain a basic understanding of what is meant by a Windows code page. I kind of get the feeling it's a translation between a given 8 bit value and some 'abstraction' for a given character graphic. I made the following experiment. I created a "" character literal with two versions of the letter u with an umlaut. One created using the ALT 129 (uses code page 437) value and one using the ALT 0252 (uses code page 1252) value. When I examined the literal both characters had the value 252. Is 252 the universal 8 bit abstraction for u with an umlaut? Is it the Unicode value? Aside from keyboard input are there any library routines or system calls that use code pages? For example is there a function to translate a string using a given code table (as above for the ALT 129 value)?

    Read the article

  • Website Sitemaps and <priority>, is it working?

    - by Mike Gleason jr Couturier
    Hi, My "Privacy Policy" page is seen more important by Google than other really more important pages on my website. I'm currently creating a script to generate a sitemap, should I bother with the priority? How do you effectively assign priorities to pages? I consider one of my page important but the page have less content than another one less important to my eyes... but maybe Google bot will see it the other way around. If my degree of "importantness" differs from the one of Google, will I get penalized on the ranking for a particular page? Thank you for sharing your black art with us :P

    Read the article

  • Pyton, print delimited list

    - by Mike
    Consider this Python code for printing a list of comma separated values for element in list: print element + ",", What is the preferred method for printing such that a comma does not appear if element is the final element in the list. ex a = [1, 2, 3] for element in a print str(element) +",", output 1,2,3, desired 1,2,3

    Read the article

  • iphone - passing an object on an UIToolbarButton action

    - by Mike
    Is that possible to make a UIToolbarButton pass an object to its target by using some exoteric method (as it seems not to be possible using regular button use)? I mean something like UIBarButtonItem *Button = [[UIBarButtonItem alloc] initWithImage:buttonImage style:UIBarButtonItemStylePlain target:self action:@selector(doSomething:) **withObject:usingThis**]; I know I can trigger a method that will launch the full method with the object, but for the sake of elegance I was trying to minimize the code... I suspect it is not possible, but as you guys out there are insanely good you may come with an transcendental answer... who knows...

    Read the article

  • Convert MSSQL Varbinary field to MYSQL, keeping data intact

    - by Mike Sheridan
    I was given the daunting task of converting a ASP website to PHP and MSSQL to MySQL, and I ran into an issue that hopefully somebody can help I have a user table which has a password field with datatype Varbinary(128), are using pwdencrypt to encrypt the password. Is there a way to transfer that over to MySQL, and somehow i need to be able to keep the password intact... how can i go about that? any pointers would be greatly appreciated!

    Read the article

  • MVC keeping the PartialView in its own context - ignore the main view holding the partial view

    - by Mike
    I'm looking at the partialview components of the MVC Framework. i want my partial view to be handled in its own action and for the rest of the view to handle itself, but i'm getting an exception because the main page is not getting its view fired. Am i going around this the wrong way? My Main View (Jobs/Index.aspx): <%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<MvcApplication3.Models.JobViewModel>" %> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <% Html.RenderPartial("JobListing", Model.Jobs); %> </asp:Content> The partialview (Jobs/JobListing.ascx): <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<List<MvcApplication3.Models.Job>>" %> <table> <tr> <td> Job Title </td> <td> Job Location</td> </tr> <% foreach (var job in Model) { %> <tr> <td> <%= job.Title %> </td> <td> <%= job.Location %> </td> </tr> <% } %> <% Html.BeginForm("DoSomeStuff", "Job", null, FormMethod.Post); %> <%= Html.TextBox("SomeInfo") %> <button type="submit" id="submit" /> <% Html.EndForm(); %> The main controller for both the main view (Index) and the partialview (DoSomeStuff()) public class JobController : Controller { public ActionResult Index() { JobProvider provider = new JobProvider(Session); JobViewModel vm = new JobViewModel(); vm.Jobs = provider.GetJobs(); return View(vm); } public PartialViewResult DoSomeStuff() { return PartialView("JobListing"); } } As you can see in the partial view, it has its own form that posts to the Action called DoSomeStuff(). i want this action to handle any data submitted from that form. but when the form is submitted the main action (Index) does not fire and then i get an exception as the Model (.Models.JobViewModel) is not passed to the view that the partialview (JobListings) lives in. basically what im saying is, if i have a myview.aspx with lots of html.RenderPartialView('apartialview') that have forms in them, can i get it so these forms post to their own actions and the main view (with what ever model it inherits) is handled as well. Rather then having all the form submitting code in the main action for the view. am i do this wrong?

    Read the article

  • C++: Implementing Named Pipes using the Win32 API

    - by Mike Pateras
    I'm trying to implement named pipes in C++, but either my reader isn't reading anything, or my writer isn't writing anything (or both). Here's my reader: int main() { HANDLE pipe = CreateFile(GetPipeName(), GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); char data[1024]; DWORD numRead = 1; while (numRead >= 0) { ReadFile(pipe, data, 1024, &numRead, NULL); if (numRead > 0) cout << data; } return 0; } LPCWSTR GetPipeName() { return L"\\\\.\\pipe\\LogPipe"; } And here's my writer: int main() { HANDLE pipe = CreateFile(GetPipeName(), GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); string message = "Hi"; WriteFile(pipe, message.c_str(), message.length() + 1, NULL, NULL); return 0; } LPCWSTR GetPipeName() { return L"\\\\.\\pipe\\LogPipe"; } Does that look right? numRead in the reader is always 0, for some reason, and it reads nothing but 1024 -54's (some weird I character). Solution: Reader (Server): while (true) { HANDLE pipe = CreateNamedPipe(GetPipeName(), PIPE_ACCESS_INBOUND | PIPE_ACCESS_OUTBOUND , PIPE_WAIT, 1, 1024, 1024, 120 * 1000, NULL); if (pipe == INVALID_HANDLE_VALUE) { cout << "Error: " << GetLastError(); } char data[1024]; DWORD numRead; ConnectNamedPipe(pipe, NULL); ReadFile(pipe, data, 1024, &numRead, NULL); if (numRead > 0) cout << data << endl; CloseHandle(pipe); } Writer (client): HANDLE pipe = CreateFile(GetPipeName(), GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, 0, NULL); if (pipe == INVALID_HANDLE_VALUE) { cout << "Error: " << GetLastError(); } string message = "Hi"; cout << message.length(); DWORD numWritten; WriteFile(pipe, message.c_str(), message.length(), &numWritten, NULL); return 0; The server blocks until it gets a connected client, reads what the client writes, and then sets itself up for a new connection, ad infinitum. Thanks for the help, all!

    Read the article

  • Converting a year from 4 digit to 2 digit and back again in C#

    - by Mike Wills
    My credit card processor requires I send a two-digit year from the credit card expiration date. Here is how I a currently processing: I put a DropDownList of the 4-digit year on the page. I validate the expiration date in a DateTime field to be sure that the expiration date being passed to the CC processor isn't expired. I send a two-digit year to the CC processor (as required). I do this via a substring of the value from the year DDL. Is there a method out there to convert a four-digit year to a two-digit year. I am not seeing anything on the DateTime object. Or should I just keep processing it as I am?

    Read the article

  • Can I use ANTLR for both two-way parsing/generating?

    - by Mike Q
    Hi all, I need to both parse incoming messages and generate outgoing messages in EDIFACT format (basically a structured delimited format). I would like to have a Java model that will be generated by parsing a message. Then I would like to use the same model to create an instance and generate a message. The first half is fine, I've used ANTLR before to go from raw - Java objects. But I've never done the reverse, or if I have it's been custom. Does ANTLR support generating using a grammar or is it really just a parse-only tool?

    Read the article

  • Rails I18n accepts_nested_attributes_for and error_messages_for

    - by Mike
    I've got two models class SurveyResponse has_many :answers, :class_name => SurveyResponseAnswer.name accepts_nested_attributes_for :answers end class SurveyResponseAnswer belongs_to :survey_response validates_presence_of :answer_text end In my nested form if validation fails I get this error displayed on the screen: "answers answer text can't be blank" I've customized my attribute names somewhat successfully using rails I18n. It doesn't behave exactly how I would expect though. The yml file below doesn't affect how the attribute name is printed in error_messages_for en: activerecord: models: survey_response: answers: "Response" But if from script/console I try SurveyResponse.human_attribute_name("answers") I get the expected result of "Response". What I'd like to do is have the validation error message say: "Response answer text can't be blank". Any ideas what I need to fix?

    Read the article

  • resource-ref at application scope in EJB 2.1 Project

    - by Mike Deck
    Is it possible to define resource references that are applicable to all EJBs in an application? Currently I have an ejb-jar.xml that looks something like this: <ejb-jar> <enterprise-beans> <session id="foo"> <!-- snip --> <resource-ref> <res-ref-name>jdbc/myDatasource</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> </session> <session id="bar"> <!-- snip --> <resource-ref> <res-ref-name>jdbc/myDatasource</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> </resource-ref> </session> </enterprise-beans> </ejb-jar> You'll notice that both EJBs have the same resource-ref defined for both of them. Is there a way to factor this duplication out within a J2EE 1.4 application? Ideally I should be able to define the jdbc/myDatasource resource once within the application and have anything running inside that container be able to access it by doing a JNDI lookup for "java:comp/env/jdbc/myDatasource". Is there any way to accomplish this?

    Read the article

  • C# streamreader, delimiter problem.

    - by Mike
    What I have is a txt file that is huge, 60MB. I need to read each line and produce a file, split based on a delimiter. I'm having no issue reading the file or producing the file, my complication comes from the delimiter, it can't see the delimiter. If anybody could offer a suggestion on how to read that delimiter I would be so grateful. delimiter = Ç public void file1() { string betaFilePath = @"C:\dtable.txt"; StringBuilder sb = new StringBuilder(); using (FileStream fs = new FileStream(betaFilePath, FileMode.Open)) using (StreamReader rdr = new StreamReader(fs)) { while (!rdr.EndOfStream) { string[] betaFileLine = rdr.ReadLine().Split('Ç'); { sb.AppendLine(betaFileLine[0] + "ç" + betaFileLine[1] + betaFileLine[2] + "ç" + betaFileLine[3] + "ç" + betaFileLine[4] + "ç" + betaFileLine[5] + "ç" + betaFileLine[6] + "ç" + betaFileLine[7] + "ç" + betaFileLine[8] + "ç" + betaFileLine[9] + "ç" + betaFileLine[10] + "ç"); } } } using (FileStream fs = new FileStream(@"C:\testarea\load1.txt", FileMode.Create)) using (StreamWriter writer = new StreamWriter(fs)) { writer.Write(sb.ToString()); } }

    Read the article

  • Is it possible to inject a bean into a spring form bean

    - by Mike
    I tried to do it 2 different ways, but neither way worked. @Component public class EmailForm{ ... private QuestionDAO questionDAO; ... @Autowired public void setQuestionDAO(QuestionDAO questionDAO) { this.questionDAO = questionDAO; } ... Another way: @Component public class EmailForm implements ApplicationContextAware { ... public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { this.questionDAO = (QuestionDAO)applicationContext.getBean("questionDAO"); } ... Neither way results in questionDAO being injected Form bean is populated by spring: @RequestMapping(method = RequestMethod.POST) public String submit(@Valid final EmailForm emailForm, BindingResult result, final Model model) {

    Read the article

  • RIA Services for transmitting non DB object-graph

    - by Mike Gates
    I have been getting into RIA services because I thought it would simplify dealing with the services layer of web applications I wish to build. I see lots of examples out there showing how to create DomainService classes which expose and consume entities that have some kind of relational database backing, and therefore have foreign-key relationships. However, I would like to know how to expose and consume normal object graphs...objects that contain references to eachother but don't have foreign keys. For example, say I want a service operation called "GetFolderInformation(string pathToFolder)". I want this to return a custom object called "FolderInformation" structured with: - string Name - IEnumerable<FileInformation> Files I cannot get this to work because it seems that RIA wants to deal with entities that have foreign key relationships. Why? Why can't the serializer just see my object references and recreate that in the proxy on the other side? Data exists behind service layers that doesn't necessarily have foreign key relationships...like folder/file for example. EDIT: I realized I hadn't asked my question! My question is, is there a way to do what I am trying to do?

    Read the article

< Previous Page | 53 54 55 56 57 58 59 60 61 62 63 64  | Next Page >