Search Results

Search found 4763 results on 191 pages for 'adams john'.

Page 110/191 | < Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >

  • Ok to implement backend/shared functionality for iPhone in JavaScript?

    - by John Wright
    Is it ok to use the Webkit Javascript engine to implement cross-platform, non-GUI backend functionality on the iPhone, iPad? In my case, I was interested in re-using Javascript code that I have that works on top of SQLite. I thought I would need to re-implement the logic in Obj-C but perhaps I could just share it and expose some hooks into Obj-C using JSCocoa or straight through JavaScript core. Is this legal per Apple guidelines?

    Read the article

  • Rails: unexpected behavior updating a shared instance

    - by Pascal Lindelauf
    I have a User object, that is related to a Post object via two different association paths: Post --(has_many)-- comments --(belongs to)-- writer (of type User) Post --(belongs to)-- writer (of type User) Say the following hold: user1.name == "Bill" post1.comments[1].writer == user1 post1.writer == user1 Now when I retrieve the post1 and its comments from the database and I update post1.comments[1].writer like so: post1.comments[1].writer.name = "John" I would expect post1.writer to equal "John" too. But it doesn't! It still equals "Bill". So there seems to be some caching going on, but the kind I would not expect. I would expect Rails to be clever enough to load exactly one instance of the user with name "Bill"; instead is appears to load two individual ones: one for each association path. Can someone explain how this works exactly and how I am to handle these types of situations the "Rails way"?

    Read the article

  • [solved] IE6 PNG-transparency CSS hack not working

    - by John
    I looked around and decided to use a CSS approach rather than rely on JS... I figure the kind of corporate users stuck with IE6 might also have JS disabled by IT departments. So In my HTML I have: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> <title>My Page</title> <link rel="stylesheet" type="text/css" href="default.css" /> <!--[if IE 6]><link rel="stylesheet" type="text/css" href="ie6.css"><![endif]--> </head> <body> <img src="media/logo.png"/> </body> Then my ie6.css consists simply of: img { filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(...); } However none of this makes the slightest difference, no transparency. I commented out all the rest of the page so it is literally that one and still no luck. I removed the default.css stylesheet and still no difference. EDIT: I now got it working, using the .htc method, loading that file in a conditional IE6 test block. It turned out the problem I was having was that Windows 7 had 'locked' the file (I don't even know what this means) and this blocked IE from loading/using it.

    Read the article

  • R: how can I concatenate a list?

    - by John
    I'm trying to produce a single variable which is a concatenation of two chars e.g to go from "p30s4" "p28s4" to "p30s4 p28s4". I've tried cat and paste as shown below. Both return empty variables. What am I doing wrong? > blah = c("p30s4","p28s4") > blah [1] "p30s4" "p28s4" > foo = cat(blah) p30s4 p28s4 > foo NULL > foo = paste(cat(blah)) p30s4 p28s4 > foo character(0)

    Read the article

  • Recreating iPhone stock application with nested views

    - by john
    I am trying to create an app similar to the Yahoo Stocks app that comes on the iPhone, with the split-screen interface (table on the top, graph on the bottom). I'm struggling with the view hierarchy. What is the easiest way to implement a split-screen type of application. I basically want two views nested in a parent view. My problem is a little bit more complex because I want functionality like having a uipagecontrol (does this require another viewcontroller, or is simply implemented in the initial view controller)? To what degree do I need to use IB? I would prefer to do this all in Xcode. Thanks in advance!

    Read the article

  • how to separate debug and release mode code

    - by john
    during debug mode or while i am doing testing, i need to print lost of various information, so i use this method ifdef TESTING // code with lots of debugging info else // clean code only endif // TESTING` Is this the good method, or is there any other simple and elegant method. But this way, I am repating the same code in two places and if anything is to be changed later on in the code, I have to do it in both places, which is time consuming and error prone. Thanks. I am using MS Visual Studio.

    Read the article

  • Why does grails use hsqldb when I ask for mysql?

    - by John
    I'm following the racetrack example from Jason Rudolph's book at InfoQ, using grails-1.2.1. I got up to the part where I was to switch from hsqldb to mysql. I think I've deleted every reference to hsqldb in the DataSource.groovy file, but I get an exception and the stack trace shows it's still using hsqldb. DataSource.groovy dataSource { boolean pooled = true String driverClassName = "com.mysql.jdbc.Driver" String url = "jdbc:mysql://localhost/dfpc2" String dbCreate = "create" String username = "dfpc2" String password = "dfpc2" dialect = org.hibernate.dialect.MySQL5InnoDBDialect } hibernate { cache.use_second_level_cache=true cache.use_query_cache=true cache.provider_class='net.sf.ehcache.hibernate.EhCacheProvider' } // environment specific settings environments { development { } test { } production { } } When I grails run-app it all starts up with no errors. I can navigate to the home page. But when I click on one of the links, I get a stack trace: java.sql.SQLException: Table not found in statement [select this_.id as id0_0_, this_.version as version0_0_, this_.name as name0_0_, this_.variant as variant0_0_ from domainObject this_ limit ?] at org.hsqldb.jdbc.Util.throwError(Unknown Source) at org.hsqldb.jdbc.jdbcPreparedStatement.<init>(Unknown Source) at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source) at dfpc2.domainObjectController$_closure2.doCall(script1269434425504953491149.groovy:13) at dfpc2.domainObjectController$_closure2.doCall(script1269434425504953491149.groovy) at java.lang.Thread.run(Thread.java:619) My mysql database shows no tables created. (I don't think groovy's connected to mysql yet.) Things I've checked: mysql-connector-java-5.1.6.jar is in lib directory. I've tried grails clean I tried putting the dataSource info in the development environment (I haven't graduated to test or prod yet), but it seemed to make no difference. The stdout shows I'm using development env. I've googled for solutions, but the only solution I've found is when people don't change the test or production environments.

    Read the article

  • Using Core Data Concurrently and Reliably

    - by John Topley
    I'm building my first iOS app, which in theory should be pretty straightforward but I'm having difficulty making it sufficiently bulletproof for me to feel confident submitting it to the App Store. Briefly, the main screen has a table view, upon selecting a row it segues to another table view that displays information relevant for the selected row in a master-detail fashion. The underlying data is retrieved as JSON data from a web service once a day and then cached in a Core Data store. The data previous to that day is deleted to stop the SQLite database file from growing indefinitely. All data persistence operations are performed using Core Data, with an NSFetchedResultsController underpinning the detail table view. The problem I am seeing is that if you switch quickly between the master and detail screens several times whilst fresh data is being retrieved, parsed and saved, the app freezes or crashes completely. There seems to be some sort of race condition, maybe due to Core Data importing data in the background whilst the main thread is trying to perform a fetch, but I'm speculating. I've had trouble capturing any meaningful crash information, usually it's a SIGSEGV deep in the Core Data stack. The table below shows the actual order of events that happen when the detail table view controller is loaded: Main Thread Background Thread viewDidLoad Get JSON data (using AFNetworking) Create child NSManagedObjectContext (MOC) Parse JSON data Insert managed objects in child MOC Save child MOC Post import completion notification Receive import completion notification Save parent MOC Perform fetch and reload table view Delete old managed objects in child MOC Save child MOC Post deletion completion notification Receive deletion completion notification Save parent MOC Once the AFNetworking completion block is triggered when the JSON data has arrived, a nested NSManagedObjectContext is created and passed to an "importer" object that parses the JSON data and saves the objects to the Core Data store. The importer executes using the new performBlock method introduced in iOS 5: NSManagedObjectContext *child = [[NSManagedObjectContext alloc] initWithConcurrencyType:NSPrivateQueueConcurrencyType]; [child setParentContext:self.managedObjectContext]; [child performBlock:^{ // Create importer instance, passing it the child MOC... }]; The importer object observes its own MOC's NSManagedObjectContextDidSaveNotification and then posts its own notification which is observed by the detail table view controller. When this notification is posted the table view controller performs a save on its own (parent) MOC. I use the same basic pattern with a "deleter" object for deleting the old data after the new data for the day has been imported. This occurs asynchronously after the new data has been fetched by the fetched results controller and the detail table view has been reloaded. One thing I am not doing is observing any merge notifications or locking any of the managed object contexts or the persistent store coordinator. Is this something I should be doing? I'm a bit unsure how to architect this all correctly so would appreciate any advice.

    Read the article

  • CSS- How to align background image over bottom border line? Jsfiddle included

    - by John Robinson
    I have an image I am trying to display over the top of a bottom border, but it is being arranged behind the bottom border element (in this example, named "divider"), and I can't get it to align correctly. I would like the image to be displayed in the middle of the the border element and over the top of it. Vertically, I am trying to get the 1px line on the left and right side of the image to align with the 1px border to appear as if it is one element. Here is the code: .divider { border-bottom: 1px solid #c3c3c3; clear: both; display: block; margin-bottom: 20px; padding-top: 20px; width: 100%; } .sidearrow { background: url(http://s16.postimage.org/sbf7v9n75/sidearrow.png) 50% 14px no-repeat; width: 100%; height: 25px; }? <p>Here is some content above</p> <div class="sidearrow"></div> <div class="divider"></div> <p>Here is some content below</p>? And the jsfiddle: http://jsfiddle.net/F5xjx/2/ Any ideas how to get this to work? Thanks in advance.

    Read the article

  • How to reduce the need for IISRESET for developing ASP.NET web app in IIS 5.1

    - by John Galt
    I have a web application project on my dev PC running WinXP and hence IIS 5.1. The changes I'm making to this site seem to "take effect" only after I do IISRESET. That is, I make a source change, Rebuild the project and then Start without Debugging (or with debugging). The newly changed code is not "visible" or in effect unless I intervene with an IISRESET. BTW, the "web" tab on the Properties display for the web app project is configured to use the Local IIS web server at project Url: http://localhost/myVirtualDirectory ... but I've noticed the same issue when using the VStudio Dev Server (i.e. I have to stop it by visiting the taskbar tray area in order to see my source changes take effect). Is this something I can change? EDIT UPDATE: Just wanting to clear this up if possible. Two answers diverge below; not sure how to move forward. One states this is to be expected (weakness of IIS 5.1 which in turn is the best WinXP can provide). Another states this is not expected behavior (and I tend to agree since this is the first I've encounted this on the same old WinXP dev platform I've had a long time). I suspect it may be something "deep inside" the Visual Studio 2008 web app which was upgraded to this new IDE from VStudio 2002 (ASP.NET 1.1). I've tried to add comment/questions down each answer path. Thanks.

    Read the article

  • Mod_rewrite and redirects with training forward slash not working

    - by john williams
    I'm using the following lines of code in my .htaccess file to create redirects. The problem is, whenever I go to example.com/register/ it cant find the css files because it's looking for example.com/register/mycss.css instead of example.com/mycss.css. Redirect 301 register.php http://example.com/register RewriteRule ^register/?$ register.php How can I correct this? I'm new to any kind of htaccess/mod_rewrite functions so feel free to point me in the right direction if there are any other flaws.

    Read the article

  • Dojo and unregistering widgets

    - by John Korsnes
    Hi, I am new to the Dojo Toolkit. I'm getting the error Tried to register widget with id=myButton but that id is already registered whenever I try to load dojo content twice (meaning I load HTML content through jQuery.Load into a container div). Is there a way of unregistering already registered widgets in dojo? I've seen some examples, but I don't really get them working. My button: <button dojoType="dijit.form.Button" id="myButton">button</button>

    Read the article

  • For-Each and Pointers in Java

    - by John
    Ok, so I'm tyring to iterate through an ArrayList and remove a specefic element. However, I am having some trouble using the For-Each like structure. When I run the following code: ArrayList<String> arr = new ArrayList<String>(); //... fill with some values (doesn't really matter) for(String t : arr) { t = " some other value "; //hoping this would change the actual array } for(String t : arr) { System.out.println(t); //however, I still get the same array here } My question in, how can I make 't' a pointer to 'arr' so that I am able to change the values in a for-each loop? I know I could loop through the ArrayList using a different structure, but this one looks so clean and readable, it would just be nice to be able to make 't' a pointer. All comments are appreciated! Even if you say I should just suck it up and use a different construct.

    Read the article

  • What to keep in mind when creating your own custom web services API?

    - by John Conde
    I have created a website which allows users to sign up for, and use, an online service. To help promote the website we will be have resellers who will be offering their own branded services through us. The initial plan is to allow resellers to place registration, login, and lost password forms on their own website and use an API created by us to handle these requests. I have begun outlining how I expect the API to work (and starting documenting it as well) and I want to make sure I get it right, or as close to right, as I can from the beginning as I know once you have declared a public API you want to avoid changing that API at all costs. So far I have decided: To have the user pass their account credentials with each request To require SSL for all requests What else should I be keeping in mind?

    Read the article

  • getcwd for current location based on ftp account permission

    - by John Doe
    Hello. I'm trying to make a small script that's changing the permission for specific file using a ftp connection. My problem is the absolute path. I have a ftp account wich land on the script directory (/script/). If i'm using getcwd, it will return the whole path (/home/user/public_html/script) but i need only the difference between the full path and the current path (getcwd path: /home/user/public_html/script/ ftp landing path: /script). So, how can i use getcwd to get the current directory for a ftp account? For example, if the user is landing in public_html, the path to the script will be /script/, or if he is landing inside /user, the path will be /public_html/script. Thanks

    Read the article

  • Javascript Split: without losing character

    - by Rohan
    I want to split certain text using JavaSscript. The text looks like: 9:30 pm The user did action A. 10:30 pm Welcome, user John Doe. 11:30 am Messaged user John Doe Now, I want to split the string into events. i.e.: 9:30 pm The user did action A. would be one event. I'm using RegEx for this: var split = journals.split(/\d*\d:/); Thing is, the first two characters are getting lost. The split appears like this: 30 pm The user did action A. How do I split so that the split maintains the first two/three characters (ie 9: or 10:) etc? Thanks!

    Read the article

  • Best way to get a Web Service to return a database result as XML?

    - by John
    I am building a webservice using jax-rs and querying a DB2 z/OS database with SQLJ and getting the result set as an arraylist. I would like to return this list as XML, but not sure how to do it. Does anyone have an example of returning a result set as XML and is using an Arraylist the best way to do this? Should I use JAXB? if so how?

    Read the article

  • When are sqlite3 views updated?

    - by John Smith
    I have a database on the iPhone which as a view. When I update the dependent tables the view is not updated. It's only updated when I close and reopen the application. From there onwards things are okay: updates reflect immediately. Is there something I need to do to force update of a VIEW?

    Read the article

  • Why aren't operator conversions implicitly called for templated functions? (C++)

    - by John Gordon
    I have the following code: template <class T> struct pointer { operator pointer<const T>() const; }; void f(pointer<const float>); template <typename U> void tf(pointer<const float>); void g() { pointer<float> ptr; f(ptr); tf(ptr); } When I compile the code with gcc 4.3.3 I get a message (aaa.cc:17: error: no matching function for call to ‘tf(pointer<float>&)’) indicating that the compiler called 'operator pointer<const T>' for the non-templated function f(), but didn't for the templated function tf(). Why and is there any workaround short of overloading tf() with a const and non-const version? Thanks in advance for any help.

    Read the article

  • window.open causing error in IE only.

    - by John Isaacks
    I am calling this from ie8: function verify_ssl() { window.open ("https://seal.godaddy.com/verifySeal?sealID=129275340046e2e09512711f05bc73f617fac022950185486622550", "ssl-window","status=0,toolbar=0,menubar=0,resizable=0,width=540,height=435"); } It says invalid argument, It works fine in FF and Chrome. Any idea what the issue is in IE?

    Read the article

  • How to set xmlns when serializing object in c#

    - by John
    I am serializing an object in my ASP.net MVC program to an xml string like this; StringWriter sw = new StringWriter(); XmlSerializer s = new XmlSerializer(typeof(mytype)); s.Serialize(sw, myData); Now this give me this as the first 2 lines; <?xml version="1.0" encoding="utf-16"?> <GetCustomerName xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> my question is, How can I change the xmlns and the encoding type, when serializing? Thanks

    Read the article

  • WPF: How to efficiently update an Image 30 times per second

    - by John
    Hello, I'm writing a WPF application that uses a component, and this component returns a pointer (IntPtr) to pixels of a bitmap (stride * height). I know in advance that the bitmap is a 24bits rgb, its width and height. Updating the Image control with these bitmaps makes up a video to the user, but I'm not sure what's the most efficient way to do that, most of the time the CPU usage goes to 75%+ and memory changing from 40mb to 500mb and the nI think GC starts to work and then it drops again to 40mm. The app starts to not be responsive. What shoud I do? thanks!

    Read the article

  • HTML not appearing in Emails

    - by John
    My website sends out html emails but most of my recipients are receiving them as HTML marked up source pages instead of the nice table layouts. The problem doesn't appear to be an email client issue since the emails display properly in web mail clients like gmail, yahoo, hotmail etc... They also display properly when viewed through outlook or thunderbird that are connected to gmail, yahoo, hotmail etc... However, I have one domain name that I registered with a shared hosting provider called 1and1.com. I tried viewing my emails through their webmail client, thunderbird and outlook, but in all three cases, only the html mark up showed up. Also, I assume most of my recipients use MS Outlook with MS Exchange Server because they are business/finance people. Unfortunately, I don't know how to get an email that's managed by an MS Exchange Server. I made sure I'm sending my emails with the following headers: MIME-Version: 1.0 Content-type: text/html; charset=iso-8859-1 Does anyone know what might be wrong? can anyone recommend a solution?

    Read the article

< Previous Page | 106 107 108 109 110 111 112 113 114 115 116 117  | Next Page >