Posts in 2021
-
Most votes on oop questions 2
May 01, 2021 in FAQ
Most votes on oop questions 2. #11 Why use getters and setters/accessors? #12 What is the difference between an abstract function and a virtual function? #13 Why not inherit from List<T>? #14 Interface vs Abstract Class (general OO) #15 What is the meaning of single and double underscore before an object name? #16 Why do Python classes inherit object? #17 What are the differences between type() and isinstance()? #18 Naming Classes - How to avoid calling everything a "<WhatEver>Manager"? #19 What is the difference between a field and a property? #20 What is the purpose of the word 'self'?
Read all the top votes questions and answers in a single page. #11: Why use getters and setters/accessors? (Score: 1644) Created: 2009-10-14 Last updated: 2017-12-06 Tags: java, oop, setter, getter, abstraction What’s the advantage of using …
-
Most votes on oop questions 10
May 01, 2021 in FAQ
Most votes on oop questions 10. #91 Why should I prefer to use member initialization lists? #92 What does it mean to hydrate an object? #93 How do I get a PHP class constructor to call its parent's parent's constructor? #94 Python function overloading #95 What is the point of interfaces in PHP? #96 difference between variables inside and outside of init() #97 What is the best method to merge two PHP objects? #98 How do you design object oriented projects? #99 Are getters and setters poor design? Contradictory advice seen #100 How to get the parents of a Python class?
Read all the top votes questions and answers in a single page. #91: Why should I prefer to use member initialization lists? (Score: 241) Created: 2009-05-29 Last updated: 2020-07-05 Tags: c++, oop, object-construction I’m partial to using …
-
Most votes on oop questions 1
May 01, 2021 in FAQ
Most votes on oop questions 1. #1 What are metaclasses in Python? #2 Difference between staticmethod and classmethod #3 Understanding Python super() with init() methods #4 Are static class variables possible in Python? #5 When to use self over $this? #6 What is Inversion of Control? #7 What's the difference between a method and a function? #8 What is the difference between an interface and abstract class? #9 Prefer composition over inheritance? #10 Meaning of @classmethod and @staticmethod for beginner?
Read all the top votes questions and answers in a single page. #1: What are metaclasses in Python? (Score: 6146) Created: 2008-09-19 Last updated: 2021-01-13 Tags: python, oop, metaclass, python-class, python-datamodel In Python, what are metaclasses …
-
Most votes on objective-c questions 9
May 01, 2021 in FAQ
Most votes on objective-c questions 9. #81 Generate JSON string from NSDictionary in iOS #82 When to use NSInteger vs. int #83 How to scale a UIImageView proportionally? #84 Create singleton using GCD's dispatch_once in Objective-C #85 How do I add 1 day to an NSDate? #86 Emulating aspect-fit behaviour using AutoLayout constraints in Xcode 6 #87 How do I use NSTimer? #88 Convert an NSURL to an NSString #89 library not found for -lPods #90 Hidden Features of Xcode
Read all the top votes questions and answers in a single page. #81: Generate JSON string from NSDictionary in iOS (Score: 346) Created: 2011-06-16 Last updated: 2015-12-11 Tags: ios, objective-c, json, string I have a dictionary I need to generate a …
-
Most votes on objective-c questions 8
May 01, 2021 in FAQ
Most votes on objective-c questions 8. #71 How to write iOS app purely in C #72 "sending 'const NSString *' to parameter of type 'NSString *' discards qualifiers" warning #73 How can I reverse a NSArray in Objective-C? #74 Best way to define private methods for a class in Objective-C #75 Global constants file in Swift #76 How do I draw a shadow under a UIView? #77 Get the current first responder without using a private API #78 Difference between objectForKey and valueForKey? #79 Use of alloc init instead of new #80 What are best practices that you use when writing Objective-C and Cocoa?
Read all the top votes questions and answers in a single page. #71: How to write iOS app purely in C (Score: 365) Created: 2012-04-23 Last updated: 2017-05-23 Tags: objective-c, ios, c, cocoa-touch, objective-c-runtime I read here Learn C Before …
-
Most votes on objective-c questions 7
May 01, 2021 in FAQ
Most votes on objective-c questions 7. #61 How do I convert NSMutableArray to NSArray? #62 Creating a blurring overlay view #63 Applications are expected to have a root view controller at the end of application launch #64 Easy way to dismiss keyboard? #65 How to sort a NSArray alphabetically? #66 How exactly does attribute((constructor)) work? #67 Objective-C ARC: strong vs retain and weak vs assign #68 Determine device (iPhone, iPod Touch) with iOS #69 UILongPressGestureRecognizer gets called twice when pressing down #70 How to remove empty cells in UITableView?
Read all the top votes questions and answers in a single page. #61: How do I convert NSMutableArray to NSArray? (Score: 387) Created: 2009-11-20 Last updated: 2013-05-04 Tags: objective-c, cocoa-touch, cocoa, nsmutablearray, nsarray How do I convert …
-
Most votes on objective-c questions 6
May 01, 2021 in FAQ
Most votes on objective-c questions 6. #51 iPad Multitasking support requires these orientations #52 What goes into your .gitignore if you're using CocoaPods? #53 How do I make an HTTP request in Swift? #54 File is universal (three slices), but it does not contain a(n) ARMv7-s slice error for static libraries on iOS, anyway to bypass? #55 How dangerous is it to compare floating point values? #56 Core Data: Quickest way to delete all instances of an entity #57 Assign a variable inside a Block to a variable outside a Block #58 What is the difference between #import and #include in Objective-C? #59 Set UIButton title UILabel font size programmatically #60 How to dismiss keyboard for UITextView with return key?
Read all the top votes questions and answers in a single page. #51: iPad Multitasking support requires these orientations (Score: 411) Created: 2015-09-14 Last updated: 2020-10-23 Tags: ios, objective-c, iphone, xcode, ipad I’m trying to submit …
-
Most votes on objective-c questions 5
May 01, 2021 in FAQ
Most votes on objective-c questions 5. #41 How do I iterate over an NSArray? #42 How do I set up NSZombieEnabled in Xcode 4? #43 What does the "__block" keyword mean? #44 What is the difference between class and instance methods? #45 How to print out the method name and line number and conditionally disable NSLog? #46 @import vs #import - iOS 7 #47 Getting current device language in iOS? #48 throwing an exception in objective-c/cocoa #49 Is It Possible to NSLog C Structs (Like CGRect or CGPoint)?
Read all the top votes questions and answers in a single page. #41: How do I iterate over an NSArray? (Score: 458) Created: 2009-06-14 Last updated: 2009-06-14 Tags: objective-c, cocoa, iteration, nsarray, enumeration I’m looking for the …
-
Most votes on objective-c questions 4
May 01, 2021 in FAQ
Most votes on objective-c questions 4. #31 Should IBOutlets be strong or weak under ARC? #32 How do I create a basic UIButton programmatically? #33 How to programmatically send SMS on the iPhone? #34 Creating an abstract class in Objective-C #35 How to navigate through textfields (Next / Done Buttons) #36 How to set the title of UIButton as left alignment? #37 Set the maximum character length of a UITextField #38 How to hide UINavigationBar 1px bottom line #39 How to add percent sign to NSString #40 How to check if an NSDictionary or NSMutableDictionary contains a key?
Read all the top votes questions and answers in a single page. #31: Should IBOutlets be strong or weak under ARC? (Score: 559) Created: 2011-10-06 Last updated: 2015-08-28 Tags: ios, objective-c, cocoa-touch, interface-builder, automatic-ref-counting …
-
Most votes on objective-c questions 3
May 01, 2021 in FAQ
Most votes on objective-c questions 3. #21 iOS 8 UITableView separator inset 0 not working #22 How do I test if a string is empty in Objective-C? #23 Send and receive messages through NSNotificationCenter in Objective-C? #24 Location Services not working in iOS 8 #25 What does the NS prefix mean? #26 UITextField text change event #27 How to convert an NSString into an NSNumber #28 dispatch_after - GCD in Swift? #29 In Objective-C, how do I test the object type? #30 @synthesize vs @dynamic, what are the differences?
Read all the top votes questions and answers in a single page. #21: iOS 8 UITableView separator inset 0 not working (Score: 671) Created: 2014-09-10 Last updated: 2017-05-25 Tags: ios, objective-c, swift, uitableview, ios8 I have an app where the …