Using Eclipse-CDT - c++

I am already using eclipse for JAVA and I wanted to install eclipse-CDT for C/C++ program development. To install eclipse-CDT I typed
sudo apt-get install eclipse-cdt
in the terminal and it installed correctly. But when I launch eclipse again and go to file->new, I don't see any provision for creating a C/C++ project. Kindly help

You can install CDT as follows:
Download zip file directly from here and use CDT by unzipping it.
Using update site.
Go to Help → Install New Software
Select Copy p2 software repository path for your eclipse release from the above link
Paste this link in Work with text box and then select all the features install CDT.

Maybe you should use eclipse gui installer. I never had a problems with cdt. You can to download it from official eclipse website.

Related

how to run a django project (made on linux) on windows?

I am new to programming and started working on Linux, now I want to switch to windows and open my project there, look at the tutorials, it is written to activate the virtual environment in the Settings / activate.bat folder. but in my project there is no such folder and such file with the extension .bat. what should I do?
Please download & Install interpreter from https://www.python.org/downloads/
(make sure you are using windows 10, because previous
version create problems)
Download pycharm professional addition (if you have university account) other wise go for community https://www.jetbrains.com/pycharm/download/
Click for Django project
Set the interpreter
Go to. manage.py task
Run command migrate
Enjoy
First thing get all the requirements like the library you installed through pip inside
a txt file by writing this command pip freeze > requirements.txt.
Get only the source folder where you made the project and app.
Create a folder.
Create an environment inside the folder. (virtualenv name_of_the_env)
Go inside the env you created and activate the Script. (.\Scripts\activate)
Copy the source folder inside the env and either you can install all the library
manually using pip or you can use requirement.txt that you have created to install the
library by writing this command pip install -r requirement.txt.
You need python and pip installed to work

Installing tensorflow on Pycharm (Mac)

I was trying to use tensorflow in Pycharm IDE.
It seems that in Pycharm, it is one-click to install a package. It was very easy with bumpy. Now error occurs when I was trying to install tensorflow.
Tensorflow was installed through terminal on Mac, as screenshot shows, using the command
sudo pip install --upgrade https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py2-none-any.whl
(Refer to https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html#pip-installation)
Any suggestions ? Thanks.
If you install tensorflow with the virtualenv option and want to use it from Pycharm for a project, you need to set up a corresponding virtualenv interpreter. There are a few solutions on the forum, for example How to get VirtualEnv TensorFlow to work in PyCharm?, however, that one didn't work for me with a "python packaging tools not found pycharm" error.
This is a working solution for me, first create a virtualenv from Pycharm and then install tensorflow there:
In Pycharm, Preferences -> Project interpreter -> Create VirtualEnv -> give the virtualenv a name and location of your choice, and select "inherit global site-packages" option -> OK.
In command line, install tensorflow in the virtualenv location you created in Step 1. For the above case, the location is ~/tensorflow_pycharm, therefore, run command virtualenv --system-site-packages ~/tensorflow_pycharm
In Pycharm, select the created project interpreter, and select the tensorflow package, double click to install the package.
If Step 3 is successful, set run configuration, and try run a sample program.
Update - Nov. 1, 2017:
Tried successfully with Latest Jetbrain PyCharm Community Edition (2017.2.4) and Python 2.7.14, with Installing with virtualenv of https://www.tensorflow.org/install/install_mac.
Install tensorflow with virtualenv
Add Local to Project Interpreter.
Run the script
Generate graph
Run tensorboard --logdir=/tmp/tensorflow_logs in Terminal of PyCharm
Go Preferences and search for the interpreter. You may see several interpreters. Select any interpreter which has the tensorflow package installed.
Check out the installed packages and double check the versions of tensorflow as shown in this picture.
To summarize (on Mac) :
Step 1, get latest Python (2.7.11 today) on Pycharm:
Pycharm, can not find Python version 2.7.11
Step 2, follow "Pip Installation" of https://www.tensorflow.org/versions/r0.8/get_started/os_setup.html#download-and-setup
Step 3, Pycharm-- preference -- project interpreter, install the latest versions of numpy, protobuf, six.
Tensorflow import error on Pycharm (Mac)
Note, maybe have to click the "specify version" when installing.
Step 4, Pycharm-- preference -- project interpreter, install the latest version of tensorflow (v 0.8.0 today).
Note, if not find v0.8.0, then maybe have to manually click "Manage Repositories" and then add the link of Step 2 (https://storage.googleapis.com/tensorflow/mac/tensorflow-0.8.0-py2-none-any.whl)
These steps worked well on both Mac computers of mine. Thanks for all helps during the procedure from contributors.
Steps I followed
1. Use the virtualenv option in tensor flow's official guide for installation and follow the steps exactly to install and set up tensor flow. Although we've already created a virtual environment here, I created a separate one for Pycharm projects.
This is how you do it.
1. Create a new project. Go to Preferences. Go to interpreter and create a new virtualEnv. Give it a name and check on the box "inherit global site-packages". Press "OK".
creating a virtualenv
Below are a list of Packages. Here's where I couldn't find tensor flow initially. If this is the case, there's a + symbol on the bottom left. Click on it and manually search for "tensorflow". Click on "install package" on the bottom left.
installing tensorflow package
After the installation is done press OK.Close this screen. Tensorflow will now appear on the installed packages list.
Press ok. Now test your installation with a program.
import tensorflow as tf
hello = tf.constant("hello TF")
sess = tf.Session()
print(sess.run(hello))
Hope this helps.

SQLpp11 installation with PostgreSQL connector

How do I install SQLpp11 with PostgreSQL connector on Linux?
I use Linux Mint 17.2, Eclipse CDT and I have PostgreSQL 9.4 already installed.
I know, it's trivial but I'm doing this first time. I'm a newbie.
GitHub repository:
https://github.com/rbock/sqlpp11
https://github.com/matthijs/sqlpp11-connector-postgresql
Both repositories are using cmake, therefore you should be fine with
mkdir build
cd build
cmake .. # maybe some other options
make
make install
in each of the repos, starting with sqlpp11.

How do I 'securely' download pip on Windows 7?

I want to install pip on Windows 7. On http://www.pip-installer.org/en/latest/installing.html#id6 it says that 'securely' download it. Not sure what does it mean. When I click on get-pip.py I am directed to a page https://raw.github.com/pypa/pip/master/contrib/get-pip.py with loads of binary data.
I want to install pip on Windows 7.
First, make sure you have installed an official supported version of Python; the most reliable way to do this is to install from the official windows installer page.
Next, navigate to this page and then search for pip and you will see Windows installer packages for different versions of pip that correspond to different versions of Python. Download the one that matches the version of Python you have installed.
Once the package is downloaded, double click it to install it just like any other Windows application.
https://raw.github.com/pypa/pip/master/contrib/get-pip.py is not a download page. It's a installation file. The doc is quite clear about that.
To install or upgrade pip, securely download get-pip.py. [1]
Then run the following (which may require administrator access):
python get-pip.py

How setup C++ SDK in IntelliJ IDEA on linux?

I need to know how to configure the path to C++ SDK for IntelliJ IDEA 10.04.
I installed C/C++ plugin, however I don't know what is the proper path to C++ SDK.
I am using ubuntu 11.04.
after running
sudo aptitude install build-essential
then restart idea and go to terminal and run
which gcc
now copy the output into ideas settings -> IDE settings -> c/c++
and paste what you copied into the path to gcc.
do the same process for the gdb
after doing that then idea will add the sdk to the drop down menu in the create project menu
after installing the c++ plugin you should see the C/C++ project option when you create a new module - i think you're seeing the point where it's asking you for the cpp sdk location.
run
sudo aptitude install build-essential
Then restart intellij - it should autodetect that it's installed and offer you the option in the drop down instead of asking you to browse to the SDK directory