List of C++ IDEs for Linux

Ankith Reddy
Updated on 30-Jul-2019 22:30:23

425 Views

The following are some of C++ IDEs for linux − Eclipse Galileo with CDT Plugin Eclipse is a well-known open source and cross platform IDE. It provides full functional C/C++ IDE with the following features − Code editor with support for syntax highlighting Support for folding and hyperlink navigation Source code refactoring plus code generation Tools for visual debugging such as memory, registers etc. NetBeans IDE NetBeans is free, open source and popular IDE for C/C++. These are some of its features − Support for automatic packaging of compiled application into .tar, .zip and many more archive ... Read More

Print All Common Elements of Two Lists in Python

Chandu yadav
Updated on 30-Jul-2019 22:30:23

1K+ Views

Given two lists, print all the common element of two lists. Examples − Input : L1 = [5, 6, 7, 8, 9] L2 = [5, 13, 34, 22, 90] Output : {5} Explanation The common elements of both the list is 5. Algorithm Step1 : create two user input lists. Step2 : Convert the lists to sets and then print set1&set2. Step3 : set1 and set2 returns the common elements set, where set1 is the list1 and set2 is the list2. Example Code # Python ... Read More

Concrete Exceptions in Python

Arjun Thakur
Updated on 30-Jul-2019 22:30:23

2K+ Views

There are some common exceptions in python. These exceptions are usually raised in different programs. These may raise by the programmer explicitly, or the python interpreter can raise these type of exceptions implicitly. Some of these exceptions are − Exception AssertionError The AssertionError may raise, when an assert statement fails. In python there are some, we can also set some assert statement in our code. The assert statement always must be true. if the condition fails, it will raise AssertionError. Example Code class MyClass: def __init__(self, x): self.x = ... Read More

Filter Input Array Function in PHP

George John
Updated on 30-Jul-2019 22:30:23

574 Views

The filter_input_array() function gets names of external variables and filters them optionally. Syntax filter_input_array(type, arraydefine, add_empty) Parameters type − There are five types of inputs to check i.e. INPUT_GET, INPUT_POST, INPUT_COOKIE, INPUT_SERVER, or INPUT_ENV. arraydefine − It specifies an array of filter arguments. It is optional. add_empty − If value is True, it adds missing keys as NULL to the return value. Return The filter_input_array() function returns an array containing the values of the variables on success, or false on failure. Example The following is an example that use the filter_input_array() function to filter POST ... Read More

New Changes Introduced in C++11

Arjun Thakur
Updated on 30-Jul-2019 22:30:23

236 Views

C++11 is a version of standard C++ language. It was approved by International Organization for Standardization (ISO) on 12 August 2011 then C++14 and C++17. C++11 makes several additions to the core language. There are some of the new changes introduced in C++11 − nullptr − In the previous nullptr, zero used to be the value and it had a drawback of implicit conversion to integral value. The null pointer literal is represented by std::nullptr_t. In this nullptr, no implicit conversion exists. Lambdas − The lambda expression allows to define functions locally. Anonymous functions are known as lambda. We ... Read More

Python Implementation of Automatic Tic Tac Toe Game Using Random Number

Samual Sam
Updated on 30-Jul-2019 22:30:23

1K+ Views

This is very funny game. In this game no player is needed, it is an automatic game. Here we are using two Python modules numpy and random. In this game the mark on the board is put automatically instead of asking the user to put a mark on the board, and it will display the board after each turn unless a player wins. It returns -1 If the game gets draw. Example code import numpy as np import random from time import sleep # first creates an empty board def my_create_board(): return(np.array([[0, 0, 0], [0, ... Read More

Filter_var_array Function in PHP

George John
Updated on 30-Jul-2019 22:30:23

623 Views

The filter_var_array() function is used to filter multiple variables. Syntax filter_var_array(arrayname, parameters) Parameters arrayname − An array to filter the data. parameters − It specifies an array of filter arguments. Return The filter_var_array() function returns an array of values of the requested variables on success or false on failure. Example Live Demo The following is the output. Array ( [stname] => Jack [stmarks] => 95 [stemail] => jack@abcde.com )

Draw an Ellipse in C#

Samual Sam
Updated on 30-Jul-2019 22:30:23

3K+ Views

To draw an ellipse, use the drawEllipse() method in C# that belong to the Graphics object. It has a pen object as well as a rectangle object. You need windows form to draw shapes in C#. Set graphics object. Graphics g = this.CreateGraphics(); Now, the pen object. Pen p = new Pen(new SolidBrush(Color.Red), 15); The following is the rectangle object. Rectangle r = new Rectangle(120, 60, 180, 180); Now use the drawEllipse() method with the graphics object and add both the objects in it to draw an ellipse. s.DrawEllipse(p, r);

Python Text Wrapping and Filling

George John
Updated on 30-Jul-2019 22:30:23

6K+ Views

In python the textwrap module is used to format and wrap plain texts. There are some options to format the texts by adjusting the line breaks in the input paragraph. To use these modules, we need to import the textwrap module in our code. import textwrap The Textwrapper instance attributes of the constructors are as follows − Sr.No. Attribute & Description 1 width The maximum length of lines. Default value is 70 2 expand_tabs If the value of this attribute is true, then all tabs will be replaced by spaces. Default value ... Read More

Chaining Comparison Operators in C#

Chandu yadav
Updated on 30-Jul-2019 22:30:23

616 Views

C# has many operators that work on the left-right and righ-left associativity. Chanining depends on the left-to-right associativity on operators with same precedence. Operator precedence determines the grouping of terms in an expression. This affects evaluation of an expression. Certain operators have higher precedence than others do; for example, the multiplication operator has higher precedence than the addition operator. The operators with the highest precedence appear at the top of the table, those with the lowest appear at the bottom. Within an expression, higher precedence operators are evaluated first. To check whether a string is null or not, you can ... Read More

Advertisements