PyCharm configuration

When you install PyCharm, the default Python interpreter is may not the version you want to use for your new projects. When you create a new project, and the project interpreter is not set, you may get the following error message: Executed command: /var/folders/_x/_f0zzs1s4sx6bk4s8n78l2jsbn9r3z/T/tmpBoQLx_pycharm-management/pip-9.0.1/setup.py install Error occurred: 40:357: execution error: /System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: …

Python ImportError: No module named …

Symptom: from MY_FOLDER.MY_FILE import MY_CLASS causes an error: ImportError: No module named MY_FOLDER.MY_FILE Debugging: Execute the program in debug mode, In the Variables window expand Special Variables, Read the __warningregistry__ value. Possible cause: The __init__.py file is missing in the directory of the referenced class. Solution: Create an empty __init__.py file in the directory where the class is referenced …

Python basics

Great Python introductory video for C# developers https://www.youtube.com/watch?v=jj60geqaP08 __  (double underscore) Starting the attribute name with double underscore attribute makes it private. To expose the private attributes and methods print(dir(MY_CLASS))   Code hierarchy In Python indentation denotes the hierarchy of the instructions, not curly braces, like in C# or Java. Directories When you create a directory …

Working with PyCharm

Project management Create a new project in PyCharm In the File menu select New Project…, On the left side select the Python framework you want to use, Enter the name for your project to the end of the Location path, If you have selected a framework that asks for more information Click the More Settings link …

GitKraken installation and configuration

GitKraken is a Git user interface to manage Git repositories. Installation Download the GitKraken installer from https://www.gitkraken.com/download Configuration Start the GitKraken application Login with your GitHub account, or create a new account or Connect to a Git repository Click the Open a Repository button Select a repository folder and click the Open button

error: package … does not exist in NetBeans

If your Java source code imports packages, you have to add the JAR files containing them to the Library. When you try to compile your Java application in NetBeans, and you get the error message: error: package … does not exist In the NetBeans Project view right-click the Libraries folder In the drop down menu select Add …

Undefined method or attribute error in a Chef recipe

There are multiple reasons Chef can display the following error message NoMethodError ————- Undefined method or attribute `…’ on `node’   There are many ways to reference an attribute in a Chef recipe: node[‘ATTRIBUTE_NAME’] (the recommended style) node[“ATTRIBUTE_NAME”] node[:ATTRIBUTE_NAME] (use it only if the single or double quotes (‘ or “) would cause a problem …

How to restore a Microsoft SQL database from backup with the Microsoft SQL Server Management Studio (MSSMS) user interface

There are multiple reasons to restore a database from backup. One of them can be disaster recovery, the other is to bring the production database to the developer machine. In both cases, the computer already has the old version of the database. In the new version of Microsoft SQL Server Management Studio (MSSMS) we cannot find …