The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
65 views

using C scope syntax for code organization purposes

Would you ever use curly braces for making your code more organized and readable? for instance I could have: - (void)methodName { ... // action 1 { ... } ... } Where ...
2
votes
2answers
126 views

iOS/Objective-C “if” best practice

I've got this code that I found in a project and I'm wondering how can it be done better: - (void) setAlpha:(float)alpha { if (self.superview.tag == noDisableVerticalScrollTag) { if ...
1
vote
2answers
117 views

PHP Class Inheritance / Object Instantiation / Object / Property Scope w/ Child / Parent Classes & Dependency Container Class

In PHP, I have a parent/child class and am using dependency container to load them. I am trying to use the same database connection on all of them without duplicating the object. CLARIFICATION: MY ...
0
votes
1answer
47 views

Is declaring a property as `public` insecure?

I posted a question few weeks back, on making a PHP Login Script. Most of you guys told me not to use global variables and especially for something like MySQLi connection object as it may be insecure. ...
2
votes
1answer
71 views

Better way to avoid trapping vars in a closure's scope?

I have a quandary with regard to exactly how the JavaScript scope chain works in a particular situation, and despite my searching and reading I am still mainly working on assumptions. I was wondering ...