Can’t set locale; make sure $LC_* and $LANG are correct! This suddenly appeared on all my servers one day after some updates. All of them were running Debian. And I thought at first there was some bad packages or settings in some of the new updates. Little did I know the problem wasn’t related to Debian or my server at all. But my Laptop. I had also updated MacOS the same day.
Can’t set locale; make sure $LC_* and $LANG are correct!
If you get Can’t set locale; make sure $LC_* and $LANG are correct, is it only when using a particular program. Or is it when you SSH in from another computer? If you get it from SSH, try to see if you get the same error when using terminal locally. If it only appears when using SSH, you probably have the same issue I had. At least it is something with the SSH client.
To fix your SSH client, assuming you are running MacOS, you need to edit the /etc/ssh/ssh_config file. That is where the problem is. If you have an older OS X like Mountain Lion, you will find the file at /etc/ssh_config. What you need to do is remove or comment out this line: SendEnv LANG LC_*
By removing the SendEnv LANG LC_* you stop your client from sending invalid locale information to your server, or computer you SSH into.
Another type of error that can be caused by invalid locale, is various Python script errors. If you ever got this error “UnicodeEncodeError: ‘ascii’ codec can’t encode character …”. You should also try to remove the SendEnv LANG LC_* from ssh_config. Other users have reported that to be the solution to this issue.
Xcode 9 iOS icon sizes overview. They keep adding more and more icon sizes. Xcode 9 has the most icon sizes so far. No wonder since it is the version supporting the most iOS versions and iOS devices. Every iPhone since iPhone 5 and a bunch of iPads and iPods is supported. Many of the different devices have their own screen resolution and screen size. That requires a lot of different resolutions for their icons. Below is a complete list of all the different icon sizes you need to upload your app to App Store. Yes, you need them all.
I used to make an icon at 1024×1024 pixels, and just edit the resolution for all the different sizes in Photoshop. That is quite tedious work. If you cant be bothered to do that your self, jump to the end of this article where there is a short-cut.
If you look at the icon form in Xcode where you put all the icons, there are some sizes listed. First time I created an app, I thought that was the size of the icons. It is the size, but not in pixels. They call it points. So if you see 29pt and under the icon, it says 2x. That means 29×2 pixels which should be 58×58 pixels. Here we go with the Xcode 9 iOS icon sizes.
That’s all the icons sizes you need to publish your app in the App Store. As I promised at the beginning of the articles, here is a shortcut to your app icons sizes. You create one icon at 1536×1536 pixels and head over to MakeAppIcon. There you upload your one icon, the site process the icon and sends you an email with a link to download all the correct sizes you need. Saves you a ton of time. They even sell a MacOS app to create the icons for you. For me, the site does a good enough job.
You might find something interesting on my YouTube channel as well.
Working on some ios apps created with Xcode 8 and your images don’t show after upgrading to Xcode 9? Took me awhile to find out why. Maybe you see this message in the console: “Could not load the image referenced from a nib in the bundle with identifier”.
Xcode 9 uiimage image not shown because Xcode 9 wants you to keep all your image files inside the Assets.xcassets file. Uiimage will let you select image files outside the Assets, but will make the uiimage control to not show at all.
If Xcode 9 uiimage image not shown move your images inside the Assets file, select the image again in the uiimage properties and give it another go. That worked for me.
How to find minecraft on mac is quite easy. There is two places you need to look. The Minecraft game itself is located in the Application folder. By default called minecraft.app. The full path to the Application folder is /Application. It means it is in the root folder of your hard drive. This is just the executable. Not much you can do with that on. Unless you want to delete it.
How to find minecraft on mac if you are looking for your saved games, resource pack or skins. You need to look in the Application Support folder. So how to get to it?
How to find minecraft on mac containing saved maps and settings
Open your Finder window and go to your home folder. Look for a folder inside your home folder called Library. Can´t see it? No worries. While in your Finder click View on the menu. Almost at the bottom you will see Show View Options. And tick / select Show Library Folder. Now your Library folder should show. Go into the Library folder. Then go into Application Support. Inside Application Support you will find a folder called Minecraft. There you should find all the relevant Minecraft folders containing your maps and other stuff you need to modify your Minecraft.
If you are looking for Minecraft maps to try out, go to Minecraft Maps.
Xcode 8 iOS icon sizes overview. There are even more icon sizes since Xcode 7. And it can be an extra challenging with all those different resolutions. Current Xcode (version 8), supports all iPhones since 4s, most iPods, and most iPads. You will need quite a few different icons sizes. That’s what I will list up here. A complete list of all different sizes for the different icons needed for an iOS application used today.
If you look at the picture above, you will see something like 29pt under the iPhone spotlight icon. First time I believed that was the icons size. And it is. But not in pixels. Above you see two empty icon windows saying 2x and 3x. That means 29 x 2 for the first window (58×58 pixels) and 29 x 3 for the second icon (87×87 pixels). Just multiply the pt value with x value, and you have the size in pixels. I usually create the largest icon (1024×1024 and uses photoshop (or any other image editing software) to make the smaller resolutions out of the biggest one.
Anyway, below you will find the list for the latest Xcode from when this article was written.
Swift Capitalize is done with a string instance property. Check the example below to see how to use it. There is also a link at bottom to Apples Swift documentation. let str = “first, second, third” print(str.capitalized)
This will output: First, Second, Third
It will capitalize every word in this string. Lets remove the commas and see what happens.
Change str = “first second third”
The output now will be: First Second Third
Check Apple Swift Capitalizion documentation for more information about the string instance property.
Swift Capitalizion Produce a string with the first character from each word changed to the corresponding uppercase value.
Record text to speech mac is an easy thing to do. All the software you need is included with your mac. You can also change between several voices and languages. If you need something else than American english you might need to download updates. That is easily done within your system preferences.
Record text to speech mac – How to
Record text to speech mac using only TextEdit and iTunes.
– Open TextEdit and write in the text you want to save as speech in an m4a file.
– Select all the text within TextEdit and right click (or double-tap).
– Add to iTunes as Spoken Track.
Next window click continue and the audio file will be added to iTunes.
You can now change to your iTunes window, it should already be open. And at the top you should see your new speech file. Right click it (or double-tap) and select show in finder. There is your new text to speech file saved as an m4a (mp4 or mpeg 4 audio). Most modern software where you can use audio files, can use m4a files. If not there is a ton of converters out there.
That is how you record text to speech mac.
This method uses the speech settings from your system preferences. If you need to change speech rate or anything. Go to System preferences -> Accessibility -> Speech
You can also watch the video below to see a demo on how it is done.
didMove never get called when creating a new project with Xcode using the Game template. I selected Swift and SpriteKit. I found this issue when I was following a course on Udemy.com, and I couldn’t get a simple project to run like in the course videos. Creating a new project after deleting the one I was working on, after trying to debug the error, gave me the same result. didMove never get called. I did only one change to the project created with game template. That was to put in print(“didMove did run”). But it never was.
The only way I would get the didMove to run was calling the scene like this in the GameViewController. let scene = MainMenuScene(size: CGSize(width: 1536, height: 2048))
Tried to google, and I found this one post on Stack Overflow with the same issue. He said it was caused by a period in his project name. Crazy, but I did use a – in my project name. Was only a test project, so calling it physics-test was not a good idea. I renamed it to PhysicsTest, and the didMove was called.
Not sure if it is a language setting issue or anything. I’m using english language and Norwegian region settings on my computer. Not sure if that got anything to do with it, but in the tutorial video I was following it worked great using – in the project name.
Anyway, if you experience didMove never get called in Xcode, it might be worth removing any non letter and number characters.
Screenflick record gameplay or screen on a mac. You could also be using the preinstalled QuickTime software. It is great for recording the screen. If you want to record the sound as well, thats where it starts to get tricky. QuickTime doesn’t have an option for that out of the box. You need to install Soundflower to be able to record the sound from any game or other application you want the sound from.
An easier approach to the whole process is to buy Screenflick from Araelium. You can download a trial version to play with first. The only difference between the licensed version and trial version is that the trial version put a watermark on your video. However any recordings done with the trial version will have the watermark removed when you buy the full version.
Screenflick also helps you with installing the Soundflower, and use the correct settings to record any sounds. It also helps you with using the webcam if you want to put any recording of your self into your gameplay videos. All from a easy to understand control panel.
The price of Screenflick is only $29, and worth every penny if you are into screen or gameplay recording on a mac. And no I’m not affiliated to Araelium in any way. Doesn’t get a penny from them no matter what. Here is where you can download Screenflick.