Search Results

Search found 2011 results on 81 pages for 'matt robinson'.

Page 12/81 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • EXC_BAD_ACCESS when scrolling table after json data is imported

    - by Michael Robinson
    Hello, I'm having a bear of a time trying to figure out why I'm getting a EXC_BAD ACCESS error. The console is giving me this eror: " -[CFArray objectAtIndex:]: message sent to deallocated instance 0x3b14110", I Can't figure it out...Thanks in advance. // Customize the number of rows in the table view. - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [rows count]; } // Customize the appearance of table view cells. - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease]; } // Configure the cell. NSDictionary *dict = [rows objectAtIndex: indexPath.row]; cell.textLabel.text = [dict objectForKey:@"name"]; cell.detailTextLabel.text = [dict objectForKey:@"age"]; return cell; } // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; self.navigationController.navigationBar.tintColor = [UIColor colorWithRed:0.0/255.0 green:207.0/255.0 blue:255.0/255.0 alpha:1.0]; self.title = NSLocalizedString(@"How Big Now", @"How Big Now"); NSURL *url = [NSURL URLWithString:@"http://10.0.1.8/~imac/iphone/jsontest.php"]; NSString *jsonreturn = [[NSString alloc] initWithContentsOfURL:url]; // NSLog(jsonreturn); // Look at the console and you can see what the restults are NSData *jsonData = [jsonreturn dataUsingEncoding:NSUTF32BigEndianStringEncoding]; NSError *error = nil; // In "real" code you should surround this with try and catch NSDictionary * dict = [[CJSONDeserializer deserializer] deserializeAsDictionary:jsonData error:&error]; if (dict) { rows = [dict objectForKey:@"member"]; } NSLog(@"Array: %@",rows); [jsonreturn release]; } - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [super dealloc]; } @end

    Read the article

  • Does Flickr "Know" if a Hotlinked Image Does Not Link Back to Source?

    - by Michael Robinson
    From Flickr's community guidelines: "Do link back to Flickr when you post your photos elsewhere. The Flickr service makes it possible to post images hosted on Flickr to outside web sites. However, pages on other web sites that display images hosted on flickr.com must provide a link from each photo back to its photo page on Flickr." Our company currently allows image hotlinking for user-uploaded images. It turns out that this has been more popular than we had expected, and I would like to capitalize on this if possible. We will be altering the guidelines to include a clause similar to Flickr's, quoted above. As hotlinking costs us, both in terms of server load and bandwidth, we would like to get at least something out of it, other than merely a warm feeling inside. My question: Does Flickr "know" if a hotlinked image does not link back to its source? Bonus: if Flickr knows, how?

    Read the article

  • Resolve php endless recursion issue

    - by Matt
    Hey all, I'm currently running into an endless recursion situation. I'm implementing a message service that calls various object methods.. it's quite similar to observer pattern.. Here's whats going on: Dispatcher.php class Dispatcher { ... public function message($name, $method) { // Find the object based on the name $object = $this->findObjectByName($name); // Slight psuedocode.. for ease of example if($this->not_initialized($object)) $object = new $object(); // This is where it locks up. } return $object->$method(); ... } class A { function __construct() { $Dispatcher->message("B", "getName"); } public function getName() { return "Class A"; } } class B { function __construct() { // Assume $Dispatcher is the classes $Dispatcher->message("A", "getName"); } public function getName() { return "Class B"; } } It locks up when neither object is initialized. It just goes back and forth from message each other and no one can be initialized. I'm looking for some kind of queue implementation that will make messages wait for each other.. One where the return values still get set. I'm looking to have as little boilerplate code in class A and class B as possible Any help would be immensely helpful.. Thanks! Matt Mueller

    Read the article

  • What is the optimum way to secure a company wide wiki?

    - by Mark Robinson
    We have a wiki which is used by over half our company. Generally it has been very positively received. However, there is a concern over security - not letting confidential information fall into the wrong hands (i.e. competitors). The default answer is to create a complicated security matrix defining who can read what document (wiki page) based on who created it. Personally I think this mainly solves the wrong problem because it creates barriers within the company instead of a barrier to the external world. But some are concerned that people at a customer site might share information with a customer which then goes to the competitor. The administration of such a matrix is a nightmare because (1) the matrix is based on department and not projects (this is a matrix organisation), and (2) because in a wiki all pages are by definition dynamic so what is confidential today might not be confidential tomorrow (but the history is always readable!). Apart from the security matrix, we've considered restricting content on the wiki to non super secret stuff, but off course that needs to be monitored. Another solution (the current) is to monitor views and report anything suspicious (e.g. one person at a customer site having 2000 views in two days was reported). Again - this is not ideal because this does not directly imply a wrong motive. Does anyone have a better solution? How can a company wide wiki be made secure and yet keep its low threshold USP? BTW we use MediaWiki with Lockdown to exclude some administrative staff.

    Read the article

  • Modularizing web applications

    - by Matt
    Hey all, I was wondering how big companies tend to modularize components on their page. Facebook is a good example: There's a team working on Search that has its own CSS, javascript, html, etc.. There's a team working on the news feed that has its own CSS, javascript, html, etc... ... And the list goes on They cannot all be aware of what everyone is naming their div tags and whatnot, so what's the controller(?) doing to hook all these components in on the final page?? Note: This doesn't just apply to facebook - any company that has separate teams working on separate components has some logic that helps them out. EDIT: Thanks all for the responses, unfortunately I still haven't really found what I'm looking for - when you check out the source code (granted its minified), the divs have UIDs, my guess is that there is a compilation process that runs through and makes each of the components unique, renaming divs and css rules.. any ideas? EDIT 2: Thanks all for contributing your thoughts - the bounty went to the highest upvoted answer. The question was designed to be vague- I think it led to a really interesting discussion. As I improve my build process, I will contribute my own thoughts and experiences. Thanks all! Matt Mueller

    Read the article

  • Enhanced Podcasts and MPMoviePlayerViewController

    - by Ben Robinson
    Hi, This is a bit of an odd/specific one - possibly a bug? I'm using MPMoviePlayerViewController to play a variety of files, including Enhanced Podcasts - these are audio files, but with a slideshow of images, often created using GarageBand. Until (i think) iOS 3.2 they weren't supported at all, now they are and play fine in the iPod app, but in my app the slideshow doesn't start, the full screen movie player opens, and the audio begins, but all I see is the QuickTime logo. If I scrub the track the pictures appear - and will continue to play correctly - but I see nothing if I don't scrub! Any ideas?? On a related note, these files also include a small rectangluar button containing an (i) button on the right hand side - anybody know what it is or should do?! It does nothing for me!

    Read the article

  • Recommendations for a C++ polymorphic, seekable, binary I/O interface

    - by Trevor Robinson
    I've been using std::istream and ostream as a polymorphic interface for random-access binary I/O in C++, but it seems suboptimal in numerous ways: 64-bit seeks are non-portable and error-prone due to streampos/streamoff limitations; currently using boost/iostreams/positioning.hpp as a workaround, but it requires vigilance Missing operations such as truncating or extending a file (ala POSIX ftruncate) Inconsistency between concrete implementations; e.g. stringstream has independent get/put positions whereas filestream does not Inconsistency between platform implementations; e.g. behavior of seeking pass the end of a file or usage of failbit/badbit on errors Don't need all the formatting facilities of stream or possibly even the buffering of streambuf streambuf error reporting (i.e. exceptions vs. returning an error indicator) is supposedly implementation-dependent in practice I like the simplified interface provided by the Boost.Iostreams Device concept, but it's provided as function templates rather than a polymorphic class. (There is a device class, but it's not polymorphic and is just an implementation helper class not necessarily used by the supplied device implementations.) I'm primarily using large disk files, but I really want polymorphism so I can easily substitute alternate implementations (e.g. use stringstream instead of fstream for unit tests) without all the complexity and compile-time coupling of deep template instantiation. Does anyone have any recommendations of a standard approach to this? It seems like a common situation, so I don't want to invent my own interfaces unnecessarily. As an example, something like java.nio.FileChannel seems ideal. My best solution so far is to put a thin polymorphic layer on top of Boost.Iostreams devices. For example: class my_istream { public: virtual std::streampos seek(stream_offset off, std::ios_base::seekdir way) = 0; virtual std::streamsize read(char* s, std::streamsize n) = 0; virtual void close() = 0; }; template <class T> class boost_istream : public my_istream { public: boost_istream(const T& device) : m_device(device) { } virtual std::streampos seek(stream_offset off, std::ios_base::seekdir way) { return boost::iostreams::seek(m_device, off, way); } virtual std::streamsize read(char* s, std::streamsize n) { return boost::iostreams::read(m_device, s, n); } virtual void close() { boost::iostreams::close(m_device); } private: T m_device; };

    Read the article

  • Ensuring a divs content has changed over time in Selenium

    - by Stewart Robinson
    I have a div that contains a slideshow. ( http://film.robinhoodtax.org/issues/education ) I am using Selenium to test it. So far I have been using the HTML/Selenium script below to validate that the slideshow is actually working. But my assertEval is failing. How can I correctly detect the slideshow and make sure it is moving?. You can see I've approached this by storing the HTML and waiting then trying again but it isn't working. <?xml version="1.0" encoding="UTF-8"?> <!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 profile="http://selenium-ide.openqa.org/profiles/test-case"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="selenium.base" href="" /> <title>New Test</title> </head> <body> <table cellpadding="1" cellspacing="1" border="1"> <thead> <tr><td rowspan="1" colspan="3">New Test</td></tr> </thead><tbody> <tr> <td>open</td> <td>/issues/education</td> <td></td> </tr> <tr> <td>waitForPageToLoad</td> <td></td> <td></td> </tr> <tr> <td>assertElementPresent</td> <td>css=div[id='views-nivo-slider-ImagesGallery-block_1']</td> <td></td> </tr> <tr> <td>storeHtmlSource</td> <td>css=div[id='views-nivo-slider-ImagesGallery-block_1']</td> <td>first</td> </tr> <tr> <td>pause</td> <td>3000</td> <td></td> </tr> <tr> <td>storeHtmlSource</td> <td>css=div[id='views-nivo-slider-ImagesGallery-block_1']</td> <td>second</td> </tr> <tr> <td>assertEval</td> <td>${first} == ${second}</td> <td>second</td> </tr> </tbody></table> </body> </html>

    Read the article

  • Should a connect method return a value?

    - by Matt S
    I was looking at some code I've inherited and I couldn't decided if I like a bit of code. Basically, there is a method that looks like the following: bool Connect(connection parameters){...} It returns true if it connects successfully, false otherwise. I've written code like that in the past, but now, when I see this method I don't like it for a number of reasons. Its easy to write code that just ignores the returned value, or not realize it returns a value. There is no way to return an error message. Checking the return of the method doesn't really look nice: if (!Connect(...)){....} I could rewrite code to throw an exception when it doesn't successfully connect, but I don't consider that an exceptional situation. Instead I'm thinking of refactoring the code as follows: void Connect(Connection Parameters, out bool successful, out string errorMessage){...} I like that other developers have to provide the success and error strings so they know the method has error conditions and I can know return a message Anyone have any thoughts on the matter? Thanks -Matt

    Read the article

  • A PHP Library / Class to Count Words in Various Languages?

    - by Michael Robinson
    Some time in the near future I will need to implement a cross-language word count, or if that is not possible, a cross-language character count. I'd love it if I just had to look at English, but I need to consider every language here, Chinese, Korean, English, Arabic, Hindi, and so on. I would like to know if Stack Overflow has any leads on where to start looking for an existing product / method to do this in PHP, as I am a good lazy programmer* *http://blogoscoped.com/archive/2005-08-24-n14.html

    Read the article

  • Using PHP session_id() to Make Sure iframe is Generated by Our Server Dynamically

    - by Michael Robinson
    We use iframes to show ads on our site. Iframes are used to allow us to keep the ad generation code and other site modules separate. As we track ad views on our site, and need to be able to keep an accurate count of which pagetype gets what views, I must ensure that users can't simply copy-paste the iframe in which the ad is loaded onto another site. This would cause ad count to become inflated for this page, and the count would not match the view count of the page the iframe "should" be displayed in. Before anyone says so: no I can't simply compare the page view count with the ad view count, or use the page view count * number of ads per page, as # of ads per page will not necessarily be static. I need to come up with a solution that will allow ads to be shown only for iframes that are generated dynamically and are shown on our pages. I am not familiar with PHP sessions, but from what little reading I have had time to do, the following seems to be to be an acceptable solution: Add "s = session_id()" to the src of the ad's iframe. In the code that receives and processes ad requests, only return (and count) and ad if s == session_id(). Please correct me if I'm wrong, but this would ensure: Ads would only be returned to iframes whose src was generated alongside the rest of the page's content, as is the case during normal use. We can return our logo to ad calls with an invalid session_id. So a simple example would be: One of our pages: <?php session_start(); ?> <div id="someElement"> <!-- EVERYONE LOVES ADS --> <iframe src="http//awesomesite.com/ad/can_has_ad.php?s=<?php echo session_id(); ?>></iframe> </div> ad/can_has_ad.php: <?php session_start(); ?> if($_GET['s'] == session_id()){ echo 'can has ad'; } else{ echo '<img src="http://awesomesite.com/images/canhaslogo.jpg"/>'; } And finally, copied code with static 's' parameter: <!-- HAHA LULZ I WILL SCREW WITH YOUR AD VIEW COUNTS LULZ HAHA --> <iframe src="http//awesomesite.com/ad/can_has_ad.php?s=77f2b5fcdab52f52607888746969b0ad></iframe> Which would give them an iframe showing our awesome site's logo, and not screw with our view counts. I made some basic test cases: two files, one that generates the iframe and echos it, and one that the iframe's src is pointed to, that checks the 's' parameter and shows an appropriate message depending on the result. I copied the iframe into a file and hosted it on a different server, and the correct message was displayed (cannot has ad). So, my question is: Would this work or am I being a PHP session noob, with the above test being a total fluke? Thanks for your time! Edit: I'm trying to solve this without touching the SQL server

    Read the article

  • programmatically creating property list from json to include an array

    - by Michael Robinson
    [{"memberid":"18", "useridFK":"30", "loginName":"Johnson", "name":"Frank", "age":"23", "place":"School", },] Someone else posted a similar question but without the fact that it was coming from a JSON deserialization. Quinn had some suggestions but it was confused about where to place/replace the following code (if it's correct): NSDictionary *item1 = [NSDictionary dictionaryWithObjects:[NSArray arrayWithObjects:@" member",[NSNumber numberWithInt:3],nil] forKeys:[NSArray arrayWithObjects:@"Title",@"View",nil]]; into this: NSData *jsonData = [jsonreturn dataUsingEncoding:NSUTF32BigEndianStringEncoding]; NSError *error = nil; NSDictionary * dict = [[CJSONDeserializer deserializer] deserializeAsDictionary:jsonData error:&error]; if (dict) { rowsArray = [dict objectForKey:@"member"]; [rowsArray retain]; } My Array.plist needs to look like the following: Root: Dictionary V Rows: Array V Item 0: Dictionary Title: String 18 V Children Array V Item 0 Dictionary Title String 30 etc. Thanks in advance. Every tutorial on JSON only shows a simple array being returned, never a 2-D..It's driving me crazy trying to figure this out.

    Read the article

  • Getting all objects with a certain element inside a collection of strings with criteria API.

    - by Jens Jansson
    Hey. I'm trying to build a Hibernate Criteria query to find entities that have a specific element inside a collection. We can take as an example a Book -object that looks like this: public class Book { private Long id; private String title; private Set<String> authors = new HashSet<String>(); } The entity is mapped like this: <class name="Book" table="Book"> <id name="id" column="BOOK_ID"> <generator class="native"/> </id> <property name="title"/> <set name="authors" table="Book_Authors"> <key column="BOOK_ID"/> <element type="string" column="AUTHORS"/> </set> </class> Now I would like to find out which books are written by Matt. With pure SQL I can do a query like this: String author = "Matt"; String query = "SELECT * FROM Book " + "WHERE BOOK_ID IN " + "(SELECT BOOK_ID FROM Book_Authors " + "WHERE authors = :author )"; List<Book> result = session.createSQLQuery(query) .addEntity(Book.class) .setParameter("author", author) .list(); This works all good and well, and I get out all books that Matt has been a part of writing. The project I work in, however, uses the Criteria API instead of raw SQL, and I haven't found a way to express the same query in that form. I've taken a look on the Restrictions API and the closest I've found is Restions.in(propertyName, collection) but that works the other way around (one value in object, many values to match against). Any ideas?

    Read the article

  • Including a NSUserDefault password test in 1st Tab.m to load a loginView gives eror?

    - by Michael Robinson
    I have a name and password in NSUserDefaults for login. I have this in my 1stTab View.m class to test for presence and load a login/signup loginView.xib modally if there is no password or name stored in the app. Here is the pulling of the defaults: -(void)refreshFields { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; usernameLabel.text = [defaults objectForKey:kUsernameKey]; passwordLabel.text = [defaults objectForKey:kPasswordKey]; { Here is the Test: - (void)viewDidAppear:(BOOL)animated { [self refreshFields]; [super viewDidAppear:animated]; if ([usernameLabel.text length] == 0 || [passwordLabel.text length] == 0) { LoginViewController * vc = [[[LoginViewController alloc] initWithNibName:@"LoginView" bundle:nil] autorelease]; [self presentModalViewController:vc animated: false]; } else { [[self tableView ]reloadData]; } } Thanks in advance, I'm getting this error in the console: * Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key usernameLabel.'

    Read the article

  • Enumerating pixel formats for adaptors and modes with OpenGL

    - by Robinson
    I'm trying to code an OpenGL path for my 3D engine. The D3D path enumerates all device adaptors, all modes (by mode I mean bit depth, dimensions, available windowed, and refresh rate) for each adaptor and then all pixel formats available for the given mode and adaptor, along side certain useful caps (shader version, filter types, etc.). So, I have broadly got the following protected functions in the class: // Enumerate all back/front buffer combinations. virtual void EnumerateBackFrontBufferCombinations(CComPtr<IDirect3D9>& d3d9); // Enumerate all depth/stencil formats. virtual void EnumerateDepthStencilFormats(CComPtr<IDirect3D9>& d3d9); // Enumerate all multi-sample formats. virtual void EnumerateMultiSampleTypes(CComPtr<IDirect3D9>& d3d9); // Enumerate all device formats, i.e. dynamic, static, render target, etc. virtual void EnumerateMapFormats(CComPtr<IDirect3D9>& d3d9); // Enumerate all capabilities. virtual void EnumerateCapabilities(CComPtr<IDirect3D9>& d3d9); The adaptors are enumerated with EnumDisplayDevices, the modes (resolutions and refresh rates) are enumerated with EnumDisplaySettings, so this can be done for either GL or D3D. The other functions I'm not so sure about with OpenGL. What are the equivalents to the IDirect3D9's CheckDeviceType, CheckDeviceFormat, CheckDeviceMultiSampleType, CheckDepthStencilMatch? I know I can use DescribePixelFormat, given a DC, but you kind-of need to have created the window before you can use a DC with it, but you can't create the window correctly until you know what formats you're going to use. Any tips you can give me? Thanks.

    Read the article

  • UIScrollView Infinite Scrolling

    - by Ben Robinson
    I'm attempting to setup a scrollview with infinite (horizontal) scrolling. Scrolling forward is easy - I have implemented scrollViewDidScroll, and when the contentOffset gets near the end I make the scrollview contentsize bigger and add more data into the space (i'll have to deal with the crippling effect this will have later!) My problem is scrolling back - the plan is to see when I get near the beginning of the scroll view, then when I do make the contentsize bigger, move the existing content along, add the new data to the beginning and then - importantly adjust the contentOffset so the data under the view port stays the same. This works perfectly if I scroll slowly (or enable paging) but if I go fast (not even very fast!) it goes mad! Heres the code: - (void) scrollViewDidScroll:(UIScrollView *)scrollView { float pageNumber = scrollView.contentOffset.x / 320; float pageCount = scrollView.contentSize.width / 320; if (pageNumber > pageCount-4) { //Add 10 new pages to end mainScrollView.contentSize = CGSizeMake(mainScrollView.contentSize.width + 3200, mainScrollView.contentSize.height); //add new data here at (320*pageCount, 0); } //*** the problem is here - I use updatingScrollingContent to make sure its only called once (for accurate testing!) if (pageNumber < 4 && !updatingScrollingContent) { updatingScrollingContent = YES; mainScrollView.contentSize = CGSizeMake(mainScrollView.contentSize.width + 3200, mainScrollView.contentSize.height); mainScrollView.contentOffset = CGPointMake(mainScrollView.contentOffset.x + 3200, 0); for (UIView *view in [mainContainerView subviews]) { view.frame = CGRectMake(view.frame.origin.x+3200, view.frame.origin.y, view.frame.size.width, view.frame.size.height); } //add new data here at (0, 0); } //** MY CHECK! NSLog(@"%f", mainScrollView.contentOffset.x); } As the scrolling happens the log reads: 1286.500000 1285.500000 1284.500000 1283.500000 1282.500000 1281.500000 1280.500000 Then, when pageNumber<4 (we're getting near the beginning): 4479.500000 4479.500000 Great! - but the numbers should continue to go down in the 4,000s but the next log entries read: 1278.000000 1277.000000 1276.500000 1275.500000 etc.... Continiuing from where it left off! Just for the record, if scrolled slowly the log reads: 1294.500000 1290.000000 1284.500000 1280.500000 4476.000000 4476.000000 4473.000000 4470.000000 4467.500000 4464.000000 4460.500000 4457.500000 etc.... Any ideas???? Thanks Ben.

    Read the article

  • GDI+ Rotated sub-image

    - by Andrew Robinson
    I have a rather large (30MB) image that I would like to take a small "slice" out of. The slice needs to represent a rotated portion of the original image. The following works but the corners are empty and it appears that I am taking a rectangular area of the original image, then rotating that and drawing it on an unrotated surface resulting in the missing corners. What I want is a rotated selection on the original image that is then drawn on an unrotated surface. I know I can first rotate the original image to accomplish this but this seems inefficient given its size. Any suggestions? Thanks, public Image SubImage(Image image, int x, int y, int width, int height, float angle) { var bitmap = new Bitmap(width, height); using (Graphics graphics = Graphics.FromImage(bitmap)) { graphics.TranslateTransform(bitmap.Width / 2.0f, bitmap.Height / 2.0f); graphics.RotateTransform(angle); graphics.TranslateTransform(-bitmap.Width / 2.0f, -bitmap.Height / 2.0f); graphics.DrawImage(image, new Rectangle(0, 0, width, height), x, y, width, height, GraphicsUnit.Pixel); } return bitmap; }

    Read the article

  • Password test in 1st Tab.m to load a loginView gives class error?

    - by Michael Robinson
    I have a name and password in NSUserDefaults for login. I have this in my 1stTab View.m class to test for presence and load a login/signup loginView.xib modally if there is no password or name stored in the app. Here is the pulling of the defaults: -(void)refreshFields { NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults]; usernameLabel.text = [defaults objectForKey:kUsernameKey]; passwordLabel.text = [defaults objectForKey:kPasswordKey]; { Here is the Test: - (void)viewDidAppear:(BOOL)animated { [self refreshFields]; [super viewDidAppear:animated]; if ([usernameLabel.text length] == 0 || [passwordLabel.text length] == 0) { LoginViewController * vc = [[[LoginViewController alloc] initWithNibName:@"LoginView" bundle:nil] autorelease]; [self presentModalViewController:vc animated: false]; } else { [[self tableView ]reloadData]; } } Thanks in advance, I'm getting this error in the console: * Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[ setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key usernameLabel.'

    Read the article

  • On Render Callback For G+ Button

    - by Michael Robinson
    How might I go about performing an action only when a G+ button has finished rendering? Facebook allows one to do this using the following: FB.XFBML.parse(document, function() { alert('rendering done'); }); I've perused Google's documentation, but didn't see anything helpful. Currently my workaround is to monitor the G+ element until certain elements have been added, then perform my action: (function() { var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true; po.src = 'https://apis.google.com/js/plusone.js'; po.onload = function() { var awaitRender = function(element) { if (element.firstChild && element.firstChild.firstChild && element.firstChild.firstChild.tagName.toUpperCase() === 'IFRAME') { alert('rendered!'); } else { window.setTimeout(function() { awaitRender(element) }, 100); } }; var buttons = document.getElementsByClassName('googleplus-button'); for(var i = 0; i < buttons.length; i++) { awaitRender(buttons[i]); } } var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s); })(); I'd like to know please, if there is either: A correct way one should do this for G+ buttons A better implementation that what I've hacked together above

    Read the article

  • How can a large number of developers write software without either a cumbersome process or poor qual

    - by Mark Robinson
    I work at a company with hundreds of people writing software for essentially the same product. The quality of the software has to be high because so many people depend on it (not least the developers themselves). Because of this every major issue has resulted in a new check - either automated or manual. As a result the process of delivering software is becoming ever more burdensome. So that requires more developers which... well you can see it is a vicious circle. We now have a problem with releasing software quickly - the lead time even to change one line of code for a very serious issue is at least one day. What techniques do you use to speed up the delivery of software in a large organization, while still maintaining software quality?

    Read the article

  • Interesting LinqToSql behaviour

    - by Ben Robinson
    We have a database table that stores the location of some wave files plus related meta data. There is a foreign key (employeeid) on the table that links to an employee table. However not all wav files relate to an employee, for these records employeeid is null. We are using LinqToSQl to access the database, the query to pull out all non employee related wav file records is as follows: var results = from Wavs in db.WaveFiles where Wavs.employeeid == null; Except this returns no records, despite the fact that there are records where employeeid is null. On profiling sql server i discovered the reason no records are returned is because LinqToSQl is turning it into SQL that looks very much like: SELECT Field1, Field2 //etc FROM WaveFiles WHERE 1=0 Obviously this returns no rows. However if I go into the DBML designer and remove the association and save. All of a sudden the exact same LINQ query turns into SELECT Field1, Field2 //etc FROM WaveFiles WHERE EmployeeID IS NULL I.e. if there is an association then LinqToSql assumes that all records have a value for the foreign key (even though it is nullable and the property appears as a nullable int on the WaveFile entity) and as such deliverately constructs a where clause that will return no records. Does anyone know if there is a way to keep the association in LinqToSQL but stop this behaviour. A workaround i can think of quickly is to have a calculated field called IsSystemFile and set it to 1 if employeeid is null and 0 otherwise. However this seems like a bit of a hack to work around strange behaviour of LinqToSQl and i would rather do something in the DBML file or define something on the foreign key constraint that will prevent this behaviour.

    Read the article

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