You need Admin rights on your Mac because you forgot your admin password and your current account doesn't have admin rights.Solution:
1. Turn on the computer and when you hear the startup chime hold CMD+S
2. At the prompt type in: "/sbin/mount -uw"
3. Now type "rm /var/db/.applesetupdone"
4. Type "reboot"
5. Go through the rest of the setup process. Select "Do Not Transfer My Data"
6. Be sure to make the admin account different from the existing one.Explanation:
I stumbled on this gem today. It allows one to give themselves admin rights on any Apple computer running Snow Leopard (maybe Lion didn't try). Frankly, it's quite scary how easy it is and how clever it is in what it does.
-- In short it deletes the file that tells the Mac that one has logged into the machine...ever, as in it thinks this is your initial setup stage, however it doesn't delete any other accounts created. Once you log-in as admin you have the ability to grant any account you like with admin rights, logout of the newly created account and then log-in as your old account now with admin rights. Once you are in you have the ability to delete your newly created admin account making it look like it never existed.
UPDATE: I ran the update again on my new AppleTV second gen and it did not flake. I'm not sure what the original problem was? The only thing I can say I did before I ran the update for the first time when it broke was purchase a movie and not watch it. I wish I knew why this problem happened on my original but Apple has that TV locked up tight.
I did the latest Apple TV update and my Apple TV flaked, per the iTunes logo and USB cable that displayed on the TV (Apple speak for restore)
I did a restore (connect Apple TV up to computer using micro USB and initiate a restore through iTunes)
on my Apple TV 2nd generation and I get this error: The Apple TV "Apple TV" could not be restored. An unknown error occurred (1602)
I read quite a few posts. None gave a solution. I tinkered for a few hours and came up with nothing (there just isn't that many things you can do with an Apple TV in terms of tinkering) I think this is too knew of an issue with Apple. I took my Apple TV back to the Apple store and they gave me a new one
. I think I'm going to hold off on the update for a while until Apple gets this resolved.
Other suggested solutions that did not work for me.
1. Clean restore using iTunes, using a micro USB cable making sure the power cord
is plugged into the Apple TV.
2. Use your xCode to restore the code to the Apple TV. Still no love for me.Explanation:
Apple doesn't let too many bugs go out on this scale with this kind of impact. It's rare, but they respected the issue with me by simply giving me a new Apple TV after I set up an appointment online for the Genius Bar.
error: expected '=', ',', ';', 'asm' or '__attribute__' before '>' tokenSolution:
You didn't close your "<" or ">" when implementing a protocol. Take a peak, I bet that is it.Example:
@interface YouRock : UIViewController UITableViewDelegate, UITableViewDataSource> <-- Notice the missing "<" in front of UITableViewDelegateExplanation:
Syntax, they are the easiest errors to fix. You should have got this, but guess what I did the same damn thing.
You want to know a good Diff application for the Mac. Well you are in luck, there is one bundled with xCode. It's called FileMerge, so you know what to do from here right. No? I'll tell you. Hit that Mother F#cking (apple)command-spacebar to bring up spotlight and type "FileMerge." If you have it, it will show up right at the top. Now hit enter, go on, hit it. Now didn't that feel nice. Welcome to the world of FileMerge.
Coffman out! <-- My tribute to Californication.
How do I flush cache on a mac.Solution:
Open up terminal: hit "command or apple spacebar
," type "terminal
" once in terminalFor 10.5 type:dscacheutil -flushcacheFor older versions type:lookupd -flushcache
Now you have flushed your cache home skillet and I will throw in a funny picture to make this post more than just boring text. Found my info on this discussion board post --> http://hints.macworld.com/article.php?story=20071027100807321
It's a good question.
There are some types that are not derived from NSObject, these types are called "Primitive Types." Some examples of these types are
Sooooo basically any type that is not derived from the NSObject class is a Primitive type and does not require a "*".
Now I bet you are wondering how do I figure out if it's a primitive type or not.
- An easy way is to look at the color of the syntax in xCode, is it deep blue or a sky blue? Deep blue = primitive type, but this is not entirely reliable as the standards for coloring syntax can fluctuate or change.
- You can option-click on the object after you have typed it in xCode, click the little book in the upper right hand corner, when the class reference viewer comes up, look and see if it inherits from NSObject. If it doesn't it's Primitive and you don't need a "*".
There are some alternatives to using the primitive type int
, such as the reference type NSInteger,
some nice baked in functionality of distinguishing between 32 bit and 64
bit, but not all primitive types have an alternative reference type in Objective C.Just for fun:
In .Net they have primitive types too(I believe they call them value types
), kinda. The compiler recognizes traditional primitive types and therefore lets you use the syntaxint i = 5;
But despite the compiler letting you do this, this type still maps back to System.Int32. All things in .Net are mapped back to System.Object. Everything is a reference type, but .Net lets you keep the traditional syntax instead of writing:System.Int32 i = new System.Int32(5);UPDATE:
Enumerations types also do not use a * (star) and they have the sky blue coloration that may make you think you need a *.
Last night around 3:30am I was having a little trouble sleeping, consequently I picked up my laptop pulled up the most recent edition of Diggnation
and hoped the wonderful drunk-tech humor would push me off to a restful sleep land. It worked! Then disaster struck, as I was closing the laptop on my night stand, the laptop fell off. In slow motion I watched my laptop hit the ground and the backlight on the monitor break. Damn, I’m more tired than disappointed; I’ll address it in the morning.
I woke up in the morning hoping the laptop would have somehow healed itself. It didn’t. Apple store here I come. $1200 bucks, ahhh no thank you, any other solutions I ask the genius dude. He gently says, yes, Mission Repair
. Doing a little research I find them online, engadget
has recognized these guys! Instantly a legit shop in my mind and they are based in KC, happiness throughout the body, though most of their business is web based mail-ins. I walk in and find out a good amount of their employees are ex-Apple employees. My lapy is in good hands. They quote me $400 for a new glossy screen, a third of the cost of Apple, I asked if they could fix it in the next hour, they replied with a warming, "yup." At this point I want to hug somebody, anybody really. Flash forward 10 minutes and Mission computer says they are out of the glossy screens, they can have some in tomorrow or they will install a mat finish for 100 dollars less, due to the inconvenience, making my total 300. Done Deal. 30 minutes later I walk out with a
fully functional screen on my Macbook
I will be working with Mission Repair
quite a bit more for my out of warranty repairs.
When is the right time to use dot notation vs bracket notation in objective C, or should I not use dot notation at all? I searched around for information on this, read quite a few opinions, but this blog post
seems to give an answer of why
. I quote the most important part; I suggest you don't read the blog post. The post is very technical and what you really want to know is right below here. If you need to know the details, eschatology does a great job at giving them.
Most important parts of blog post:
- Use dot notation to get and set objects’ state.
- Use bracket notation to invoke objects’ behavior.
Eschatology -- http://eschatologist.net/blog/?p=160
A bit of a dark name for a blog, but the name doesn't affect the quality of the post.
Not being able to do a simple compare in an "if statement" between two alpha or numerical statements while programing in objective C.The Solution:
NSOrderedSameExample Of Use:
This compares the value of "key" to the value of "support." If they are equal then you get a return value of true.
if ([key compare:Support] == NSOrderedSame)
For some reason Objective-C decided to make it a little bit harder to compare values. Instead of just using the traditional way "[key compare:Support]" return a true value for the if statement OR "([key compare:Support] == 0) OR "([key compare:Support] == true)" they decided to make it a little bit more complex. As demonstrated above. I'm sure the writers of Objective-C have a good reason for this, but one more level of abstraction could make Objective-C that much friendlier to it's programmers and isn't that what it's all about in the end...getting more people to develop in your language.Some of other comparisons you might want to use are:
-- The left operand is smaller than the right operand.
This is equivalent to using "<" in most languages.NSOrderedDescending
-- The left operand is greater than the right operand.
This is equivalent to using ">" in most languages.
unable to read unknown load command 0x80000022Fix:
Upgrade to xCode 3.2 with the 10.6 libraries.Explanation:
This error doesn't do anything to your application except provide some really annoying output to your Debugger Console
. File under annoying. You can get xCode 3.2 DOWNLOAD HERE
for free at the apple website. It will require you to create a login.
Snow Leopard has only been out since Friday, but a few people got the OS upgrade early and blogged all the good stuff. Knowing this, I'm still going to blog about the new OS from Apple.
I'll cover the price, the security upgrade, the cool new features, the size reduction and make a fun little video demonstrating some of the features in Snow Leopard.
$29 dollars. The low price is largely because Snow Leopard is more of an upgrade than a whole new OS. It offers only a few new flashy features that mac users have come to expect. Most of its added features are in unseen functionality such as Grand Central Dispatch,
that most will never see or care about. Just knowing their computer runs faster is good enough. Examining these aspects Apple marketing said $29 bucks is a fair price. I agree, skip a few drinks this weekend and you have your new upgrade.
Security has always been a big aspect enthusiast place on Apple vs. Windows. Sadly even with this new upgrade, Snow Leopard is not as secure Windows 7. Windows 7 has some new security functionality, such as Address Space Layout Randomization (ASLR) and Data Execution Prevention (DEP). Elinor Mills wrote a great article on it here
. The real question about Max OS X security: does Apple need to have the latest security practices incorporated into their OS? If their OS isn't being targeted, yet, why put a large costly focus on having the newest security practices when it doesn't reduce any potential threats on their OS. This is a small advantage Apple has by having 5% market share next to Windows world domination market share. SIDE NOTE:
This will most likely be changing with future generations, have you seen a college lecture hall these days, it looks like a glowing apple orchard
Finally the upgrade has the potential to reduce the size of the OS's footprint on your hard drive up to half in some cases. Curiosity has me wondering how they did such dramatic size reductions while still adding functionality.
The love I have for Apple continually grows stronger. Here's why.
Other then Apple's continual innovation, leading the market in trends:
iPod, iPhone, iTunes, superior technology in their OS, and overall
beauty, their customer service really wraps up the complete package nicely.
My latest example is an expanding battery (see image). An
issue that has been tracked back not to a specific computer
manufacturer, but to the company
who makes the batteries. This company
sells these batteries to Dell and Apple. Understanding the fact that
each manufacturer (Apple and Dell) gets the batteries from the same location, how they
deal with the situation is the issue at hand. Scenario 1 -- Dell
Had I bought a Dell with
Microsoft Windows, I would have to call Dell, speak with an Indian
representative (work through a language barrier that is only exasperated over the phone), have
Dell email a return slip, print the return slip, mail the battery back and have
Dell send me a new battery, a 2 day process at minimum. In my experience I would estimate 3-4 days.
Scenario 2 -- Apple
Not the case with Apple. I go online, make an appointment at my local genius bar
for 7:15 PM the very same day, (note: Apple store is open until 9:00 PM on a Saturday...wow), walk in at 7:15 PM, an "Apple Genius" sees me promptly; takes one look at the battery and tells me I have a defective battery. Next the "Apple Genius" goes in the back gets a new battery, scans the old battery's and new battery's barcode and slides the new battery into my laptop. He then looks at me and says, "You are good to go." Wait?... what?... 7 minutes, that's it? No out of coverage warranty talk or I need your name, your address and the name of your first born? ...Nice, peace "Apple Genius". It took more time to walk from my parking spot to the store than the appointment itself. That is what makes a lifetime Apple customer!