Programming Leftovers
-
seife's assorted rants: Multiple stage servers in open build service
The open build service publisher has a configuration variable in BSConfig.pm, where you can define a rsync server to publish the built repos to.
Unfortunately, the documentation apart from the actual code (in src/backend/bs_publish function sync_to_stage) seems scarce, so let's document one non-standard usage here.
-
SmartGit Git client SFS created
Arguably SmartGit rates about the best GUI Git client. My opinion anyway, having played with a few over the years. I first discovered SmartGit in 2016...
-
Gitea Joins the SCM/CI Party! - Open Build Service
As we disclosed a few days ago, the roll-out of the SCM/CI feature was not the end. The proof is that we are here to announce another important milestone regarding the OBS SCM/CI integration. Starting today, Gitea is available for you to be integrated with OBS!
-
Nim 1.6.8 compiled in OE with simplified recipe
-
Operator Precedence in C
When we evaluate any expression that involves the usage of different operators in it, we are obliged to solve the expression to compute its values based on operator precedence. Precedence is the term for assigning a priority or weightage to some value/term, so the operator precedence assigns the priority to operators in an expression. To understand this, assume any expression, e.g., 8*3+2, and the answer to this expression could result in two different values, “26” and “40”, respectively. However, we will choose the result of the expression as “26”, since the multiplication “*” operator has more operator precedence as compared to the addition operator “+” hence, the expression will first compute the multiplication between 8 and 3 and the result will be then added with the 2. Many operators in the programming language C have more priority over the other operators.
-
Constants in C
We need to declare and initialize the values, either changing or fixed in some places, to give a value or assign a weightage for the reference or the manipulation of the specific information while writing a program. For these assignments of the values, we store these values in variables and constants. Constant is the type of that variable whose value remains unchanged/fixed throughout the entire program. Primary constants represent the integers, real numbers, and character constants, whereas secondary constants represent the structures, arrays, unions, and pointers. When we initially declare a constant in a program, we cannot change its value to any other value afterward. We are obliged to use that value as it is in the entire code.
-
Malloc Function in C
“Within the C language, memory allocation is a very known concept, and we have many functions to allocate memories to different mutable, i.e., dynamic memory, static memory, etc. The malloc() function of C is one of those functions that not only allocates memory to a specific mutable but also returns an address pointer where that memory has been stored. This article would be helping you with the use of malloc in C while using Ubuntu 20.04 system. Make your system up to date before jumping on the implementation of C code because it will help you smoothly run your codes at the shell. Thus, we have updated it so far, and it asked us to add the password for the user that is currently working. We provided it with a password, and the process was finished in a few seconds.”
-
Posix Signals in C
“While driving on the roadside, what do you do when you have an encounter with a red signal? You stop driving for a while to wait for your turn until the signal turns green. Similarly, when a signal has an orange color, you continue to drive and never stop. POSIX Signals work the same as the traffic signal works. The POSIX Signal library came up with a very simple function to be utilized in the C code to generate signals, make your programs wait for their execution, and many more. This article would be demonstrating all those signal functions. We have been starting our examples with the creation and opening of a C file.”
-
Typedef in C
The typedef is the predefined keyword, which instructs the compiler to assign the user-defined types to the predefined types of C, i.e., int, float, decimal, double float, etc.
Typedef can be used when it is difficult to type multiple times in a program. For example, multiple-time use of “unsigned int” increases the complexity of the program. To reduce that complexity, we can define a user-friendly name for that type. For example, if we are using it in student ID, marks, etc., then we can simply name it “student”.
In simple words, we can say that typedef reduces the complexity of the program and also provides clarity of the code.
-
Is it time to retire C and C++ for Rust in new programs? [Ed: New job title for Steven J. Vaughan-Nichols: Microsoft megaphone and outsourcer. Whatever pays the bills...]