Skip to main content

Posts

Showing posts from July, 2017

C++ STL List Container – std::list

In this tutorial you will learn about C++ STL list container i.e. std::list and methods which can be applicable on it. List comes under sequence containers. List stores elements in non-contiguous memory locations. List works same as double linked list. It can traverse in both directions. This is the reason list is slow in traversing when compared to vector. But it supports constant time insertion and removal of elements from anywhere in the container. If we want to implement single linked list then we should use forward list. The main disadvantage by this list is, unlike other sequence containers elements of this container can’t be accessed by its index position. C++ STL List Declaring List list<data_type> listName; Operations Applicable on List Container pus_front(x): It adds the new element ‘x’ at front of the list. push_back(x): It adds the new element ‘x’ at the end of the list. insert(): This function inserts the new elements to the list before the element at a s...

dotnet sdk list and dotnet sdk latest

Can someone make .NET Core better with a simple global command? Fanie Reynders did and he did it in a simple and elegant way. I'm envious, in fact, because I spec'ed this exact thing out in a meeting a few months ago but I could have just done it like he did and I would have used fewer keystrokes! Last year when .NET Core was just getting started, there was a "DNVM" helper command that you could use to simplify dealing with multiple versions of the .NET SDK on one machine. Later, rather than 'switching global SDK versions,' switching was simplified to be handled on a folder by folder basis. That meant that if you had a project in a folder with no global.json that pinned the SDK version, your project would use the latest installed version. If you liked, you could create a global.json file and pin your project's folder to a specific version. Great, but I would constantly have to google to remember the format for the global.json file, and I'd constan...

Difference between Geek and Nerd

Here you will learn about Difference between Geek and Nerd. It is common for people to think that a geek and a nerd are the same things. In fact, anyone would be forgiven to think so. Most think that these are smart, extraordinary people who wear large glasses and are obsessed with computer science and related matters. However, both categories are far more than that. To avoid confusion when you meet one during your efforts to get an affordable search engine optimization company , then this publication will highlight what it is that makes these two kinds of people different. It is a very interesting topic you do not want to miss. Who is a Geek? According to various descriptions from popular dictionaries, they all lead to the understanding that a geek is a person with increased interest in some discipline or hobby that they pursue by all means. As much as the history of the terminology is vague, it is good to understand that it is slang. In most cases, geeks are associated with ...

Monospaced Programming Fonts with Ligatures

Typographic ligatures are when multiple characters appear to combine into a single character. Simplistically, when you type two or more characters and they magically attach to each other, you're using ligatures that were supported by your OS, your app, and your font. I did a blog post in 2011 on using OpenType Ligatures and Stylistic Sets to make nice looking wedding invitations . Most English laypeople aren't familiar with ligatures as such and are impressed by them! However, if your language uses ligatures as a fundamental building block, this kind of stuff is old hat. Ligatures are fundamental to Arabic script and when you're typing it up you'll see your characters/font change and ligatures be added as you type. For example here is ل ا with a space between them, but this is لا the same two characters with no space. Ligatures kicked in. OK, let's talk programming. Picking a programming font is like picking a religion. No matter what you pick someone will say y...

How to Install Atom Text Editor in Ubuntu (Linux)

In this tutorial you will learn to install atom text editor in Ubuntu (Linux). Atom is a free and open-source text and source code editor for macOS, Linux, and Microsoft Windows with support for plugins written in Nodejs and embedded Git control developed by GitHub, which provides us with a platform to create responsive and interactive web applications. Atom is a desktop application built using web technologies. Atom is based on Electron (known as atom shell), It can also be used as an integrated development environment (IDE). There is a web inspector that will reveal all code that runs the app on the fly. Now let’s see how to install this on Ubuntu. How to Install Atom Text Editor in Ubuntu (Linux) There are different ways to install this. Here I will show you popular two ways of them. Method 1: Using SNAP SNAP is a universal Linux package. Snaps work on any distribution or device. Snaps are faster to install, easier to create, safer to run and they update automatically and our...

C++ STL Deque Container – std::deque

Here you will learn about C++ STL Deque container i.e. std::deque and all functions applicable on it. Note: Deque should be pronounced as “deck”. It named because D ouble E nded Que ue (DEQUE). Deques are come under sequence containers. These are double ended with features of expansion and contraction on both the ends. These are similar to vectors. But more efficient than vectors in case of insertion and deletion of elements not only at end but also at the beginning of the sequence. But here contiguous memory allocation may not be guaranteed. Also Read:  C++ STL Vector Container – std::vector C++ STL Deque To use deque we must include its header <deque> i.e. #include<deque> Different Syntax for Declaring Deque Creating an empty deque: deque <int> dequeName; Creating a deque with 10 empty elements: deque <int> marks(10); Creating a deque with 10 elements, each element have value 3: deque <int> marks(10,3); Array to deque: int array [5...

Android PopupWindow Example

Here you will get Android PopupWindow example code. Popup window is a floating view that is displayed on top of an activity. Android provides PopupWindow class for creating a popup window with custom design. Below I have shared code to create simple popup window in android with a text and button to close it. Android PopupWindow Example Create an android project with package name com.popupwindow.  Add following code in respective files. res/layout/activity_main.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" tools:context="com.popupwindow.MainActivity" android:id="@+id/linearLayout1"> <Button android:layou...

C++ STL Vector Container – std::vector

Here you will learn about C++ STL Vector Container i.e. std::vector and various functions applicable on it. Vector, as we discussed earlier vector is dynamic array that grows in one direction. Also Read:  C++ STL Array Container – std::array C++ STL Vector Vectors are dynamic arrays. When we insert a new element or delete an element from vector, it has ability to resize itself automatically. Vector elements also stored in contiguous memory locations, so that they can traverse and accessed by iterators. Inserting and deleting at end takes constant , O(1) time. By using vectors we can avoid array_index_outof_bound exceptions. Syntax of STL Vector vector <data_type> vectorName; Functions Used with Vector Container push_back(): This is used to insert element into vector. It inserts element at the end of the vector. [] operator: This operator returns the reference of the element positioned at index where we access like vectorName[index_position]. at(): This oper...

C++ STL Array Container – std::array

Here you will learn about STL Array Container in C++ i.e. std::array. I Hope you know about C-type arrays (arrays in C language). Since C++ is just extension to C language we can use those. The main property is that, Array contains series of elements of same type placed in contiguous memory locations. i.e suppose we have marks of 100 students, instead of declaring 100 variables, using array the 100 int values can store in contiguous memory locations and all can be accessed through same identifier, by just adding some number to identifier which points to particular index. Declaring Normal Array Syntax: type arrayName[size]; Example: int marks[5];  //This is array of type int which stores marks of 5 students Initializing Arrays int marks [5] = { 10, 23, 15, 20, 25 }; This stores the elements in contiguous locations, that in index 0, element 10 will be stored remaining follows as same. Accessing the elements   of the array : Syntax: arrayName[index]; Example...

URLs are UI

What a great title. "URLs are UI." Pithy, clear, crisp. Very true. I've been saying it for years. Someone on Twitter said "this is the professional quote of 2017" because they agreed with it. Except Jakob Nielsen said it in 1999 . And Tim Berners-Lee said " Cools URIs don't change " in 1998. So many folks spend time on their CSS and their UX/UI but still come up with URLs that are at best, comically long, and at worst, user hostile. Search Results that aren't GETs - Make it easy to share Even non-technical parent or partner things URLs are UI? How do I know? How many times has a relative emailed you something like this: "Check out this house we found! https://www.somerealestatesite.com/ homes/for_sale/ search_results.asp" That's not meant to tease non-technical relative! It's not their fault! The URL is the UI for them. It's totally reasonable for them to copy-paste from the box that represents where they are an...

Review: The AmpliFi HD (High-Density) Home Wi-Fi Mesh Networking System

I've been very happy with the TP-Link AC3200 Router I got two years ago. It's been an excellent and solid router. However, as the kids get older and the number of mobile devices (and smart(ish) devices) in the house increase, the dead wifi spots have become more and more noticeable. Additionally I've found myself wanting more control over the kids' internet access. There's a number of great WiFi Survey Apps but I was impressed with the simplicity of this Windows 10 WiFi Survey app , so I used it to measure the signals around my house, superimposed with a picture of the floor plan. Here's the signal stretch of the TP-Link. Note that when you're using a WiFi Survey app you need to take into consideration if you're measuring 2.4GHz that gives you better distance at slower speeds, or 5GHz that can give you a much faster connection at the cost of range. As a general rule in a single room or small house, 5GHz is better and you'll absolutely notice it w...