Learning to use the most appropriate class or object for the task at hand is fundamental to writing efficient code. This is especially true when dealing with collections. Happily, there’s a document named Collections Programming Topics on Apple’s Developer Library that explains in detail the differences between the available classes, as well as which situations suit each class. It’s a must read document for anyone looking to work with collections.TLDR? Here’s a quick synopsis of the most common collection types: Arrays: Ordered list of values. Quick lookup by index, slow…
Author: Enrico
Come reinizializzare, reimpostare o ripristinare il PC
Se hai problemi con il PC, puoi provare a reinizializzarlo, reimpostarlo o ripristinarlo. La reinizializzazione del PC comporta la reinstallazione di Windows mantenendo le tue impostazioni e i tuoi file personali, nonché le app fornite con il PC e le app installate da Windows Store. La reimpostazione del PC comporta la reinstallazione di Windows, con l’eliminazione di file, impostazioni e app, ad eccezione delle app fornite con il PC. Il ripristino del PC consente di annullare le modifiche apportate recentemente al sistema. Se vuoi eseguire il backup e il ripristino…
Use a reuseIdentifier Where Appropriate
A common mistake in app development is not setting the correct reuseIdentifier for UITableViewCells, for UICollectionViewCells, or even UITableViewHeaderFooterViews. For maximum performance, a table view’€™s data source should generally reuse UITableViewCell objects when it assigns cells to rows in tableView:cellForRowAtIndexPath:. A table view maintains a queue or list of UITableViewCell objects that the data source has marked for reuse.What happens if you don’t use a reuseIdentifier? If you don’t, your table view will configure a brand-new cell each time a row is displayed. This is an expensive operation and will…
Xcode 5: general info
Xcode is the most used IDE for iOS development. Apple is doing a great job in updating and adding features to it. Knowing how to take advantage of its capabilities can help you code faster and more efficiently. Check out this Guide for Xcode 5 shortcuts, tips and tricks. Xcode’s workspace window is split into 5 main areas: the toolbar, the navigation area, the editing area, the debug area and the utility area: Navigating in Xcode The navigation area has a toolbar as well. It has 8 tabs: project navigator,…
Using report parameters in local mode
What are report parameters used for? The most common use of report parameters is to specify a criterion for subsetting data. The value of the parameter may be set programmatically by the host application, or one report may pass a parameter to another report. When you drillthrough from one report to another, the main report passes the id of the item the user clicked on to the drillthrough report as a report parameter. The drillthrough report then uses the parameter value to only display data corresponding to the item the…
TDD Kata | String Calculator
Kata is a Japanese word describing detailed choreographed patterns of movements practiced either solo or in pairs. most commonly known for the presence in the martial arts. The idea is if you practice something regularly, at some point it will be come natural. (As they call it “Muscle memory” :)). Even though Test Driven Development has been preached as best practice for years now, there is still resistance in many IT shops to adapt TDD (Test Driven Developer). So the best way to teach your team to start making TDD…
Building of an organizational chart for AdventureWorks & AdventureWorks2008
— SQL recursive CTE to find subordinates of executive, manager & supervisor– Tree processing – find all descendants – find children – self-referencing tableDECLARE @EmployeeID INT SET @EmployeeID = 109 USE AdventureWorks; WITH cteEmployeeName AS (SELECT FullName = FirstName + ‘ ‘ + LastName, EmployeeID FROM HumanResources.Employee e INNER JOIN Person.Contact c ON e.ContactID = c.ContactID), cteSubordinates AS (SELECT EmployeeID, LEVEL = 0 FROM HumanResources.Employee WHERE EmployeeID = @EmployeeID UNION ALL SELECT e.EmployeeID, LEVEL + 1 FROM cteSubordinates cte INNER JOIN HumanResources.Employee e ON cte.EmployeeID = e.ManagerID) SELECT FullName, s.EmployeeID,…