Search Results

Search found 221 results on 9 pages for 'danny g'.

Page 6/9 | < Previous Page | 2 3 4 5 6 7 8 9  | Next Page >

  • iOS MapKit: Selected MKAnnotation coordinates.

    - by Oh Danny Boy
    Using the code at the following tutorial, http://www.zenbrains.com/blog/en/2010/05/detectar-cuando-se-selecciona-una-anotacion-mkannotation-en-mapa-mkmapview/, I was able to add an observer to each MKAnnotation and receive a notification of selected/deselected states. I am attempting to add a UIView on top of the selection annotation to display relevant information about the location. This information cannot be conveyed in the 2 lines allowed (Title/Subtitle) for the pin's callout. - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { Annotation *a = (Annotation *)object; // Alternatively attempted using: //Annotation *a = (Annotation *)[mapView.selectedAnnotations objectAtIndex:0]; NSString *action = (NSString *)context; if ([action isEqualToString:ANNOTATION_SELECTED_DESELECTED]) { BOOL annotationSelected = [[change valueForKey:@"new"] boolValue]; if (annotationSelected) { // Actions when annotation selected CGPoint origin = a.frame.origin; NSLog(@"origin (%f, %f) ", origin.x, origin.y); // Test UIView *v = [[UIView alloc] init]; [v setBackgroundColor:[UIColor orangeColor]]; [v setFrame:CGRectMake(origin.x, origin.y , 300, 300)]; [self.view addSubview:v]; [v release]; }else { // Accions when annotation deselected } } } Results using Annotation *a = (Annotation *)object origin (154373.000000, 197135.000000) origin (154394.000000, 197152.000000) origin (154445.000000, 197011.000000) Results using Annotation *a = (Annotation *)[mapView.selectedAnnotations objectAtIndex:0]; origin (0.000000, 0.000000) origin (0.000000, 0.000000) origin (0.000000, 0.000000) The numbers are large. They are not relative to the view (1024 x 768). I believe they are relative to the entire map. How would I be able to detect the exact coordinates relative to the entire view so that I can appropriately position my view?

    Read the article

  • Losing URI segments when paginating with CodeIgniter

    - by Danny Herran
    I have a /payments interface where the user should be able to filter via price range, bank, and other stuff. Those filters are standard select boxes. When I submit the filter form, all the post data goes to another method called payments/search. That method performs the validation, saves the post values into a session flashdata and redirects the user back to /payments passing the flashdata name via URL. So my standard pagination links with no filters are exactly like this: payments/index/20/ payments/index/40/ payments/index/60/ And if you submit the filter form, the returning URL is: payments/index/0/b48c7cbd5489129a337b0a24f830fd93 This works just great. If I change the zero for something else, it paginates just fine. The only issue however is that the << 1 2 3 4 page links wont keep the hash after the pagination offset. CodeIgniter is generating the page links ignoring that additional uri segment. My uri_segment config is already set to 3: $config['uri_segment'] = 3; I cannot set the page offset to 4 because that hash may or may not exists. Any ideas of how can I solve this? Is it mandatory for CI to have the offset as the last segment in the uri? Maybe I am trying an incorrect approach, so I am all ears. Thank you folks.

    Read the article

  • Ant 1.8 include or import with nested resource collection

    - by Danny
    I'd like to have Ant automatically include or import resources matching a particular pattern, but I'm really struggling with the syntax. Here's what I've tried: <import> <fileset dir="${basedir}" includes="*-graph.xml" /> </import> However, I just get the error message import requires file attribute or at least one nested resource The documentation for import (and include) both say that you can use a nested resource collection, and the documentation for resource collections says <fileset> is a resource collection. I've Googled and can't find any useful examples at all. I'm using Ant 1.8.1 (verified with ant -version)

    Read the article

  • Volatile fields in C#

    - by Danny Chen
    From the specification 10.5.3 Volatile fields: The type of a volatile field must be one of the following: A reference-type. The type byte, sbyte, short, ushort, int, uint, char, float, bool, System.IntPtr, or System.UIntPtr. An enum-type having an enum base type of byte, sbyte, short, ushort, int, or uint. First I want to confirm my understanding is correct: I guess the above types can be volatile because they are stored as a 4-bytes unit in memory(for reference types because of its address), which guarantees the read/write operation is atomic. A double/long/etc type can't be volatile because they are not atomic reading/writing since they are more than 4 bytes in memory. Is my understanding correct? And the second, if the first guess is correct, why a user defined struct with only one int field in it(or something similar, 4 bytes is ok) can't be volatile? Theoretically it's atomic right? Or it's not allowed simply because that all user defined structs(which is possibly more than 4 bytes) are not allowed to volatile by design?

    Read the article

  • JSF 2.1 Spring 3.0 Integration

    - by danny.lesnik
    I'm trying to make very simple Spring 3 + JSF2.1 integration according to examples I googled in the web. So here is my code: My HTML submitted to actionController.actionSubmitted() method: <h:form> <h:message for="textPanel" style="color:red;" /> <h:panelGrid columns="3" rows="5" id="textPanel"> //all my bean prperties mapped to HTML code. </h:panelGrid> <h:commandButton value="Submit" action="#{actionController.actionSubmitted}" /> </h:form> now the Action Controller itself: @ManagedBean(name="actionController") @SessionScoped public class ActionController implements Serializable{ @ManagedProperty(value="#{user}") User user; @ManagedProperty(value="#{mailService}") MailService mailService; public void setMailService(MailService mailService) { this.mailService = mailService; } public void setUser(User user) { this.user = user; } private static final long serialVersionUID = 1L; public ActionController() {} public String actionSubmitted(){ System.out.println(user.getEmail()); mailService.sendUserMail(user); return "success"; } } Now my bean Spring: public interface MailService { void sendUserMail(User user); } public class MailServiceImpl implements MailService{ @Override public void sendUserMail(User user) { System.out.println("Mail to "+user.getEmail()+" sent." ); } } This is my web.xml <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener> <listener> <listener-class> org.springframework.web.context.request.RequestContextListener </listener-class> </listener> <!-- Welcome page --> <welcome-file-list> <welcome-file>index.xhtml</welcome-file> </welcome-file-list> <!-- JSF mapping --> <servlet> <servlet-name>Faces Servlet</servlet-name> <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> my applicationContext.xml <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <bean id="mailService" class="com.vanilla.jsf.services.MailServiceImpl"> </bean> </beans> my faces-config.xml is the following: <application> <el-resolver> org.springframework.web.jsf.el.SpringBeanFacesELResolver </el-resolver> <message-bundle> com.vanilla.jsf.validators.MyMessages </message-bundle> </application> <managed-bean> <managed-bean-name>actionController</managed-bean-name> <managed-bean-class>com.vanilla.jsf.controllers.ActionController</managed-bean-class> <managed-bean-scope>session</managed-bean-scope> <managed-property> <property-name>mailService</property-name> <value>#{mailService}</value> </managed-property> </managed-bean> <navigation-rule> <from-view-id>index.xhtml</from-view-id> <navigation-case> <from-action>#{actionController.actionSubmitted}</from-action> <from-outcome>success</from-outcome> <to-view-id>submitted.xhtml</to-view-id> <redirect /> </navigation-case> </navigation-rule> My Problem is that I'm getting NullPointerExeption because my mailService Spring bean is null. public String actionSubmitted(){ System.out.println(user.getEmail()); //mailService is null Getting NullPointerException mailService.sendUserMail(user); return "success"; }

    Read the article

  • UI suggestions on how to display suggested tags for a given text to a user?

    - by Danny
    I am writing a web-app that uses a tagging system to organize the user's submitted reports. Part of it uses ajax to get suggestions for tags to present to the user based on the content of their report. I am looking for suggestions on how to present this information for the user. I'm not quite certain what a friendly way to do this would be. Edit: Well, most of the responses here seem to be focused on the user typing in keywords. The idea I'm trying to define here is more towards presenting the user a set of suggested keywords that they may accept or decline without having to type a tag in manually. (That option is of course still available to them) --------------------------- # say they can checkoff or select tags they like. | o[tag2] x[foo] o[moo] | | x[tag1] o[bar] | ---------------------------

    Read the article

  • What tech stack/platform to use for a project?

    - by danny z
    Hey guys, This is a bit of a weird meta-programming question, but I've realized that my new project doesn't need a full MVC framework, and being a rails guy, I'm not sure what to use now. To give you a gist of the necessary functionality; this website will display static pages, but users will be able to log in and 'edit their current plans'. All purchasing and credit card editing is being handled by a recurring payment subscriber, I just need a page to edit their current plan. All of that will be done through (dynamic) XML API calls, so no database is necessary. Should I stick with my typical rails/nginx stack, or is there something I could use that would lighten the load, since I don't need the Rails heft. I'm familiar with python and PHP but would prefer not to go that route. Is Sinatra a good choice here? tl;dr: What's a good way to quickly serve mostly static pages, preferably in Ruby, with some pages requiring dynamic XML rendering?

    Read the article

  • Is my natural deduction proof correct?

    - by Danny King
    Hello, Given the sequent: |- p v ¬p (that is, no left-hand-side, derives p or not p) I have taken this from http://www.danielclemente.com/logica/dn.en-node38.html but I got a different proof to his solution. I think my simpler proof is correct but could someone verify it for me to check I have understood it? I'd appreciate it very much! 1. ¬(p v ¬p) assumption {note this is equivalent to ¬p ^ p} 2. ¬p ^elimination 1 3. p ^elimination 1 4. contradiction ¬elimination 3, 2 5. p v ¬p ¬introduction 1-4 Thanks!

    Read the article

  • Passing a 'var' into another method

    - by Danny
    Hi, I am probably totally missing the point here but.... How can I pass a 'var' into another method? (I am using linq to load XML into an Enumerable list of objects). I have differernt object types (with different fields), but the final step of my process is the same regardless of which object is being used. XNamespace xmlns = ScehmaName; var result = from e in XElement.Load(XMLDocumentLocation).Elements(xmlns + ElementName) select new Object1 { Field1 = (string)e.Element(xmlns + "field1"), Field2 = (string)e.Element(xmlns + "field2") }; var result2 = Enumerable.Distinct(result); This code will vary for the different type of XML files that will be processed. But I then want to iterate though the code to check for various issues: foreach (var w in result2) { if (w.CheckIT()) { //do something } } What I would love is the final step to be in a method in the base class, and I can pass the 'var' varible into it from each child class.

    Read the article

  • Convert .jar to an OSX executable?

    - by Danny King
    Hello, I made a Java application which I would like to distribute on Windows, OSX and Linux without distributing a jar file. I used the great Windows exe wrapper http://launch4j.sourceforge.net/ to create an .exe file complete with my icon that won't scare Windows users. Are there similar wrappers that I can use for OSX/Unix? An important consideration is that I would like to have my own icon on the executable (especially for mac users). Thanks!

    Read the article

  • Can't create new "enterprise" project in netbeans

    - by Danny
    I'm running netbeans 6.7.1 on Ubuntu Karmic. On the services tab I added a new glassfish v3 prelude server, I installed it to my home directory using the download button. I started the server and opened localhost:4848 to verify I can get into the admin panel. Then I did file-new projct and created a new java web-web application. On the configuration step of the wizard it preselected glassfish v3 prelude and java ee 5. I accepted and did a test run. I ran the project just fine. So now I did file-new projecct and attempted to create a Java EE-ejb module. When I arrive to the server configuration stage of the wizard, it doesn't show any servers on the server dropdown list (so it's empty), it also doesn't see any version of java on the "java ee version" dropdown list. This also happens for the other "Java EE" project types. I can't seem to get my head around why I can make a new web application but not an ejb module. Can anyone provide any insight to why it might not be seeing that I have java or glassfish installed when I try to make a new java ee project but I see it when I try to make a java web project?

    Read the article

  • Creating a MySQL trigger to verify data on another table

    - by Danny Herran
    I am trying to set up a MySQL trigger that does the following: When someone inserts data into databaseA.bills, it verifies if databaseB.bills already has that row, if it doesn't, then it does an additional insert into databaseB.bills. Here is what I have: CREATE TRIGGER ins_bills AFTER INSERT ON databaseA.bills FOR EACH ROW BEGIN IF NOT EXISTS (SELECT 1 FROM databaseB.bills WHERE billNumber=NEW.billNumber) THEN INSERT INTO databaseB.bills (billNumber) VALUES (NEW.billNumber) END IF END;// DELIMITER ; The problem is, I can't create it through mysql console or phpMyAdmin. It returns syntax errors near END IF END, and I am sure it's a delimiter problem. #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END IF END' at line 6 What am I doing wrong?

    Read the article

  • Save jQuery callback functions in a separate file

    - by Danny Herran
    Probably I missed something, but lets say I have this: $('a.delete').click(function(){ resp=window.confirm("Are you sure you want to delete this?"); if(resp) return true; else return false; } Now, I want to save that callback function into a separate js file, because I will use it in several pages. My logic told me to do this: $('a.del').click(delete_element()); Having my js file like this: function delete_element(){ resp=window.confirm("Are you sure you want to delete this?"); if(resp) return true; else return false; } This doesn't work. Everytime my page loads, it displays the confirm window, even if I haven't clicked the link. It is clear that my logic failed this time. What am I missing?

    Read the article

  • Get CruiseControl to talk to github with the correct public key.

    - by Danny Lister
    Hi All, Has anybody installed git and ControlControl and got CruiseControl to pull from GitHub on a window 2003 server. I keep getting public key errors (access denied) - Which is good i suppose as that confirms git is talking to github. However what is not good is that I dont not know where to install the rsa keys so they will be picked up by the running process (git in the context of cc.net). Any help would save me a lot of hair! I have tried installing the keys into; c:\Program Files\Git.ssh Whereby running git bash and cd ~ take me to: c:\Program Files\Git Current error from CC.net is Error Message: ThoughtWorks.CruiseControl.Core.CruiseControlException: Source control operation failed: Permission denied (publickey). fatal: The remote end hung up unexpectedly . Process command: C:\Program Files\Git\bin\git.exe fetch origin Thanks in advance

    Read the article

  • Default value for public attributes

    - by Danny Chen
    I have a public attribute in some class. I want a default value -1 for this attribute without an private variable like _MyAttr(because too many attributes, i won't add them one by one). public int MyAttr { get; set; } [DefaultValueAttribute] is not working for this issue i think. Any ideas? Thanks.

    Read the article

  • Git is ignoring .git directories in subdirectories

    - by Danny
    I'm using git as a backup tool and 'roaming profile' for my $HOME directory between laptop and desktop. My problem is that under my $HOME I have a Development directory with multiple git projects I'm working on. Git will not allow me to add the subdirectories .git folders. So to commit to these projects I have to push the changes into my $HOME git repo, pull on laptop (where they were created and .git dir exsits) and commit. I've read about submodules, but it's not really what I want. I just want the children .git folders to be treated like any old directory so I can move them around and back them up. Has anyone done this or have an idea how I would?

    Read the article

  • installing glassfish on ubuntu karmic using synaptics package manager

    - by Danny
    I'm trying to learn to use glassfish for the first time. My IDE is netbeans and I've installed the glassfish plugin for netbeans. I opened up synaptics package manager and typed in glassfish. My choices were imqv2 glassfish-activaton glassfish-mail glassfish-appserv glassfish-toplink-essentials glassfish-jmac-api glassfish-javaee I'm not sure what is in each package, or which package are needed. I can't seem to find anything that tells me anything descriptive about these packages. I've seen a lot of tutorials on how to install glassfish, but I'd prefer to use apt-get / synaptics to install glassfish so that syntactics can take care of updating.

    Read the article

  • Using the same code in different (partial) views

    - by Danny Chen
    Maybe this question is quite simple because I'm new to MVC2. I have a simple demo MVC project. (1) A weak-typed view: Index.aspx <% Html.RenderPartial("ArticalList", ViewData["AllArticals"] as List<Artical>); %> (2) A strong-typed partical view: ArticalList.ascx <%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<List<Artical>>" %> <% foreach (Artical a in Model) { %> <%= Html.ActionLink(a.Title, "About", new { id = a.ID })%><br /> <%} %> (3) Here is the HomeController.cs public ActionResult Index() { ViewData["AllArticals"] = Artical.GetArticals(); return View(); } public ActionResult ArticalList() { return PartialView(Artical.GetArticals()); } Sorry I'm using a Web-Form "angle", because if I'm using a Web-Form, when I visit Index.aspx, rendering ArticalList.ascx will call public ActionResult ArticalList(). But here I need to write Artical.GetArticals() twice in two actions. How can I put them in one?

    Read the article

  • How can I get the type I want?

    - by Danny Chen
    There are a lot of such classes in my project (very old and stable code, I can't do many changes to them, maybe slight changes are OK) public class MyEntity { public long ID { get; set; } public string Name { get; set; } public decimal Salary { get; set; } public static GetMyEntity ( long ID ) { MyEntity e = new MyEntity(); // load data from DB and bind to this instance return e; } } For some reasons, now I need to do this: Type t = Type.GetType("XXX"); // XXX is one of the above classes' name MethodInfo staticM= t.GetMethods(BindingFlags.Public | BindingFlags.Static).FirstOrDefault();// I'm sure I can get the correct one var o = staticM.Invoke(...); //returns a object, but I want the type above! If I pass "MyEntity" at beginning, I hope I can get o as MyEntity! Please NOTE that I know the "name of the class" only. MyEntity e = staticM.Invoke(...) as MyEntity; can't be used here.

    Read the article

  • Object Oriented Programming Problem

    - by Danny Love
    I'm designing a little CMS using PHP whilst putting OOP into practice. I've hit a problem though. I have a page class, whos constructor accepts a UID and a slug. This is then used to set the properties (unless the page don't exist in which case it would fail). Anyway, I wanted to implement a function to create a page, and I thought ... what's the best way to do this without overloading the constructor. What would the correct way, or more conventional method, of doing this be? My code is below: <?php class Page { private $dbc; private $title; private $description; private $image; private $tags; private $owner; private $timestamp; private $views; public function __construct($uid, $slug) { } public function getTitle() { return $this->title; } public function getDescription() { if($this->description != NULL) { return $this->description; } else { return false; } } public function getImage() { if($this->image != NULL) { return $this->image; } else { return false; } } public function getTags() { if($this->tags != NULL) { return $this->tags; } else { return false; } } public function getOwner() { return $this->owner; } public function getTimestamp() { return $this->timestamp; } public function getViews() { return $this->views; } public function createPage() { // Stuck? } }

    Read the article

  • How to automatically email customers registration keys?

    - by Danny
    I've written a bit of software that I'd like to share with others (a Mac Dashboard widget, specifically), but I'd also like to be compensated a bit for the time I spent on it. I've devised my own simple registration key algorithm, which takes a customer's email address and creates a 12-character alphanumeric key. The software itself is finished, demo limitations, key validation & all. I just need to get the keys to customers. How do I simply alert a key generation script to automatically email a customer a key, upon notification that they paid my account? Can I use PayPal IPN & JavaScript? The simplest solution will do - this is a five dollar widget. :)

    Read the article

< Previous Page | 2 3 4 5 6 7 8 9  | Next Page >