NoThIng (Erkberg) Mac OS

NoThIng (Erkberg) Mac OS

May 29 2021

NoThIng (Erkberg) Mac OS

Repairing, Restoring, or Reinstalling Mac OS X Software

If you have a problem with your Mac software or hardware, Mac OS X provides repair
and restore utilities that may eliminate problems and can even restore your software
to its original factory settings. You can access these utilities from the Mac OS X Utilities
application, even if your computer isn’t starting up correctly.

Use the Mac OS X Utilities application to:

I can't spend $3,000 with Apple to get a MacBook with 16GB to give up 250GB of hard drive space for the same size screen just to run the newer OS and update Firefox. It is unreasonable for Firefox support to have been dropped for MAC OS systems prior to 10.9 - it's a. Make sure that your Mac has a connection to the internet. Then turn on your Mac and immediately press and hold Command (⌘)-R until you see an Apple logo or other image. If you're asked to select a user you know the password for, select the user, click Next, then enter their administrator password. MacOS Big Sur elevates the most advanced desktop operating system in the world to a new level of power and beauty. Experience Mac to the fullest with a refined new design. Enjoy the biggest Safari update ever. Discover new features for Maps and Messages. And get even more transparency around your privacy.

Â

Repair your computer’s disk using Disk Utility.

Â

Restore your software and data from a Time Machine backup.

43

Chapter 3

Problem, Meet Solution

Â

Reinstall Mac OS X and Apple applications.

Â

Restore your computer to its factory settings by erasing its disk and reinstalling
Mac OS X and your Apple applications.

If your computer detects a problem, it opens the Mac OS X Utilities application
automatically. You can also open it manually by restarting your computer.

To open the Mac OS X Utilities application:

m

Restart your computer while holding down the Command (x) and R keys. The Mac OS X
Utilities pane appears.

Important: 

If the Mac OS X Utilities application doesn’t open after restarting, hold

down Command (x)-Option-R and restart the computer to access the Mac OS X
Utilities software from the Internet. Your computer must be connected to a network
that has access to the Internet.

Some utilities in the Mac OS X Utilities application require access to the Internet and
the Mac App Store. You may need to make sure your computer is connected to the
Internet by using your Ethernet or Wi-Fi network.

To connect by using a Wi-Fi network:

1

Choose a network from the Wi-Fi status menu in the upper right corner of the screen.

2

If necessary, type the network password.

To join a closed network, choose Join Other Network. Enter the network’s name
and password.

44

Chapter 3

Problem, Meet Solution

Repairing a Disk with Disk Utility

If you have a problem with your computer, or if you start your computer and see the
Mac OS X Utilities application, you may need to repair your computer’s disk.

1

Select Disk Utility in the Mac OS X Utilities pane and click Continue.

Nothing Ekberg Mac Os Catalina

2

Select the disk or partition in the list on the left, and then click the First Aid tab.

3

Click Repair Disk.

If Disk Utility can’t repair the disk, back up as much of your information as possible,
and then follow the instructions in “Reinstalling Mac OS X and Apple Applications” on
page 45.

For information about Disk Utility and its options, see Help Center, or open Disk Utility
(in the Utilities folder in Launchpad) and choose Help > Disk Utility Help.

Restoring Information Using a Time Machine Backup

If you previously created a Time Machine backup, use the Restore utility to restore
everything on your computer to its previous state.
Use your Time Machine backup to restore information only to the computer that was
the source of the backup. If you want to transfer information to a new computer, use
Migration Assistant (in the Utilities folder in Launchpad).

1

If your backup is on a Time Capsule, make sure you’re connected to an Ethernet or
Wi-Fi network. (To connect to a Wi-Fi network, follow the instructions on page 43.)

2

In the Mac OS X Utilities pane, select Restore From Time Machine Backup and
click Continue.

3

Select the disk that contains the Time Machine backup, and then follow the onscreen
instructions.

45

(Erkberg)

Chapter 3

Problem, Meet Solution

Reinstalling Mac OS X and Apple Applications

Under some circumstances, you may need to reinstall Mac OS X and Apple applications.
You can reinstall while keeping your files and user settings intact.

1

Make sure your MacBook Air is connected to the Internet by using an Ethernet or Wi-Fi
network. (To connect to a Wi-Fi network, follow the instructions on page 43.)

2

In the Mac OS X Utilities pane, select Reinstall Mac OS X and click Continue.

3

Versions

In the pane where you’re asked to select a disk, select your current Mac OS X disk
(in most cases, it is the only one available).

4

To select or deselect optional software, click Customize.

5

Click Install.

You can install Mac OS X without erasing the disk, which saves your existing files
and settings, or you can erase the disk first, which erases all your data and leaves the
computer ready for you to reinstall Mac OS X and Apple applications.

After installing Mac OS X, you can go to the Mac App Store and re-download your
Apple applications.

Important: 

Mac Os Download

Apple recommends that you back up the data on the disk before restoring

software. Apple is not responsible for any lost data.

Restoring Your Computer to Its Factory Settings

When you restore your computer to its factory settings, everything on your computer
(your user accounts, network settings, and all of your files and folders) is deleted. Before
you restore, back up any files you want to keep by copying them to another disk.
Write down your network settings from Network preferences to make it easier to get
connected again after reinstalling Mac OS X.

46

Chapter 3

Problem, Meet Solution

1

Make sure your MacBook Air is connected to the Internet by using an Ethernet or Wi-Fi
network. (To connect to a Wi-Fi network, follow the instructions on page 43.)

2

In the Mac OS X Utilities pane, select Disk Utility and click Continue.

3

Select the disk in the list on the left, and then click the Erase tab.

4

Select Mac OS Extended (Journaled) from the Format pop-up menu, type a name for
the disk, and then click Erase.

5

After the disk is erased, choose Disk Utility > Quit Disk Utility.

6

In the Mac OS X Utilities pane, select Reinstall Mac OS X and click Continue.

7

To reinstall Mac OS X and your applications, follow the instructions in the Mac OS X
Installer.

After restoring Mac OS X and your Apple applications, you can selectively restore your
other data and applications from a Time Machine backup.

Regular expressions is a powerful tool for solving many problems related to text. It can be misused as any good tool, but there are moments when they are the best solution for a given problem. At those moments the lack of regular expressions for Cocoa on Mac OS X and Cocoa Touch on iPhone OS is a pain in the butt.

Or are regular expressions really missing? Regular expressions can be used with NSPredicate that is part of Core Data, available since Mac OS X 10.4 and officially announced for iPhone OS 3.0. Cocoa’s WebView and the equivalent UIWebView in Cocoa Touch both support JavaScript with regular expressions. So there sure is regular expressions available on the platforms, but how do you make it available for your own code?

An Ugly Solution

You can actually get access to the regular expression engine through JavaScript, unfortunately this requires a roundtrip through WebKit. On an iPhone this means you have to use an off-screen instance of UIWebView, and delegate execution of regular expression to it.

The complexity of an off-screen WebView or UIWebView could be hidden by a utility class. But the extra glue code needed to make something useful out of the single method stringByEvaluatingJavaScripFromString:, would be allot.

What Apple Recommends

For most problems the official stance is correct; do not use regular expressions. Instead use NSScanner, that is perfect for sequentially parse texts. It is very fast and can substitute any regular expressions that only relies on:

  • Character sets
  • Exact string matches
  • Numerical matches
  • Uniform input text

These conditions hold true to 95% of everything regular expressions is ever used for. For the other 5%, Apple leaves you to fend for your own.

Other Solutions

PCRE compiles perfectly with Cocoa, since it is written in C, one of the many advantages of Objective-C. PCRE is very capable, and almost a standard, but also very large. For an iPhone application the PCRE implementation could end up as the majority of your executables file-size. If this is something you can live with, then the open source RegexKit framework wraps PCRE in Cocoa and Cocoa Touch friendly Objective-C.

Another regular expressions framework is OgreKit. The advantage of OgreKit is full unicode support, with the same disadvantage of size. And the fact that the documentation is in Japanese.

A Pretty Solution

It turns out that Mac OS X for years, and iPhone OS since inception, has been shipped with a perfectly good regular expressions engine. This engine is based on the ICU specification, so it works perfectly with unicode and is well on par with PCRE for functionality. This framework is simply called ICU Core, and has a C interface. But for a Cocoa programmers the C interface is not nice enough, and thankfully John Engelhart has done this work for us, with RegexKitLite. RegexKitLite is a little brother to RegexKit that wrapps ICU Core instead of PCRE.

RegexKitLite is published under BSD license, and is simply two files you add to your project, fully compatible with all available versions of both Mac OS X and iPhone OS. The tricky part is that ICU Core is not a public API officially supported by Apple, even though it has existed unchanged for years. Good news is that using ICU Core is not a show stopper for publishing on the iPhone App Store, application out there already uses it, both well known and not so well known.

Setting Up RegexKitLite

  1. Download the latest version from the sourceforge webpage, or SVN.
  2. Add RegexKitLite.h and RegexKitLite.m to your project.
  3. Link your project against ICU Core, by adding the linker flag -licucore to Other Linker Flags under your projects build settings.

Optionally you can also add the documentation to Xcode with these easy steps:

  1. Open Help -> Documtantion.
  2. Press the Gears button in the lower left corder, and select New Subscription….
  3. Enter feed://regexkit.sourceforge.net/RegexKitLiteDocSets.atom as URL.

Using RegexKitLite

This post is not a tutorial on regular expressions, but a tutorial on a partical API for executing regular expressions. If you want to learn more about regular expressions themselves I would recomend you look at Regular Expressions.info.

RegexKitLite provides it’s functionality as categories on NSString and NSMutableString. This way using regular expressions with Cocoa is just as easy and normal string manipulation. This is best described using examples.

A simple example that normalizes a text with single white spaces, kind of like how a HML renderer would do, so this is handy when scraping web pages:

Or you can split a text, such as semi-colon delimeted data:

And you can extract more complex data using capture groups:

This may look like it could be slow to perform matches on the same regular expression twice, but it is not. RegexKitLite is very smart, and will cache your previous matches for very high performance.

RegexKitLite is a very capable, and also much active open source project, with version 3.0 as a release candidate in SVN. Use it, and use it well.

NoThIng (Erkberg) Mac OS

Leave a Reply

Cancel reply