Value In Brief – by Abanoub Hanna
All You Need To Know Explained In Brief

Posts Tagged with programming languages

Plain Socket Communication Between Two Go Programs, the Easy Way

Go programming languages
Because there was an interesting discussion at reddit, suggesting using SSE, gRPC, Message queues (and there are plenty of others), I thought about making an article on (comparing) those communication protocols. But in the end, I decided otherwise. I see all those protocols as something that is adding more code to your project. I mean, you have to import something. You have to use an additional library. And I wanted something, that have less code below.

WebSocket Communication Between Two Go Programs, the Easy Way

Go programming languages
This article was written with one idea in mind: to show you, how to make a communication between two Go programs, using WebSockets. The simplest possible way. When using WebSockets, one program has to act as a server. But there can be numerous other programs as clients. In this article we will create one server and one client. WebSocket Server The code for server is pretty simple. And because we don’t want to reinvent the wheel, we will use gobwas module.

Go: functions, methods, pointers and interfaces

Go programming languages
This article was created especially for my son, who had hard times understanding using pointers and interfaces. To make the explanation complete, I added (with his help) two things: functions and methods. I see those two as a complement to pointers and/or interfaces. Or vice versa. This explanation is divided into six parts, each part adding onto previous part. I tried to make it all as simple as possible. The basics We will start with something very simple.

7 Reasons You Should Try Go

Go programming languages
This article is written with 20+ years spent in development, 10+ years actively writing in Java, 7+ years actively writing in C# and 3+ years actively writing in Go. This article is a personal opinion. This article advocates you, to try and use Go language. Speed of development When I am about to write a piece of software nowadays (and I can surely write it in all three languages), I will always choose Go.

Kotlin for Android - Documentation and Code Snippets

Kotlin programming languages
All you need to start creating Android app in Kotlin. Kotlin Syntax Print to console print("Amit Shekhar") println("Amit Shekhar") Constants and Variables var name = "Amit Shekhar" val name = "Amit Shekhar" Assigning the null value var otherName : String? otherName = null Verify if value is null text?.let { val length = text.length } // or simply val length = text?.length Concatenation of strings var firstName = "Amit" var lastName = "Shekhar" var message = "My name is: $firstName$lastName" New line in string val text = """ |First Line |Second Line |Third Line """.

Java for Android – Documentation and Code Snippets

Java programming languages
All you need to create Android app in Java. Java Syntax Primitive Data Types byte short int long float double char boolean Java Operators: Arithmetic: + , – , * , ? , % Assignment: = , -= , += , *= , /= , %= , &= , ^= , |= , «= , »= , »>= Bitwise: ^ , & , | Logical: && , || Relational: < , > , <= , >= , == , !

How to Shutdown PC using C++ ?

C++ programming languages Tutorials
If you want to shutdown your Windows PC from your C++ code, use this code snippet. #include <stdio.h>#include <stdlib.h> int main() { system("c:\\Windows\\system32\\shutdown /s"); return 0; } I hope this helps. Do you recommend reading this blog post? share it!

Comparing Two Integers in C Programming Language

C programming languages
Here is the code snippet in C programming language. #include <stdio.h> int main() { int a, b; a = 11; b = 99; // to take values from user input uncomment the below lines − // printf("Enter value for A :"); // scanf("%d", &a); // printf("Enter value for B :"); // scanf("%d", &b); if(a > b) printf("a is greater than b"); else printf("a is not greater than b"); return 0; }

Elixir Cheatsheet - Elixir in Brief

Elixir programming languages
Elixir is a dynamic functional compiled language that runs over an Erlang Virtual Machine called BEAM. Erlang and its BEAM is well known for running low-lattency, distributed and fault-tolerant applications. Elixir was designed to take all that advantages in a modern coding language. Elixir data types are immutable. In Elixir a function is usually described with its arity (number of arguments), such as: is_boolean/1. File Types .exs => Elixir script file .

Python Cheatsheet

Python programming languages scripting languages
Python sys Variables variable meaning argv Command line args builti­n_m­odu­le_­names Linked C modules byteorder Native byte order check_­int­erval Signal check frequency exec_p­refix Root directory executable Name of executable exitfunc Exit function name modules Loaded modules path Search path platform Current platform stdin, stdout, stderr File objects for I/O versio­n_info Python version info winver Version number Python sys.