Programming Leftovers

-
10 eureka moments of coding in the community | Opensource.com
If you've written code, you know it takes practice to get good at it. Whether it takes months or years, there's inevitably a moment of epiphany.
We wanted to hear about that time, so we asked our community to share about that time they sat down and wrote code that truly made them proud.
-
Announcing the new erlang.org
We are pleased to announce the launch of the new erlang.org website!
The design and content are roughly the same as the old website. The most notable changes are: [...]
-
Tech focus: Software tools | Scientific Computing World
Software tools are an essential part of the HPC ecosystem, for both scientists and all potential HPC users. While there are a huge number of different categories of tools available to the HPC community, the exascale projects in the US and Europe are focused on the development of open source software, or software that can facilitate the use of a wide range of resources.
-
Complexity is killing software developers | InfoWorld
The shift from building applications in a monolithic architecture hosted on a server you could go and touch, to breaking them down into multiple microservices, packaged up into containers, orchestrated with Kubernetes, and hosted in a distributed cloud environment, marks a clear jump in the level of complexity of our software. Add to that expectations of feature-rich, consumer-grade experiences, which are secure and resilient by design, and never has more been asked of developers.
-
How to use python csv writer
In this blog, we will see how we can use the python csv writer to write the list data to csv.
-
I just want to run this one Python script | die-welt.net
So I couldn't sleep the other night, and my brain wanted to think about odd problems…
Ever had a script that's compatible with both, Python 2 and 3, but you didn't want to bother the user to know which interpreter to call? Maybe because the script is often used in environments where only one Python is available and users just expect things to work? And it's only that one script file, no package, no additional wrapper script, nothing.
Yes, this is a rather odd scenario. And yes, using Python doesn't make it easier, but trust me, you wouldn't want to implement the same in bash.
Nothing that you will read from here on should ever be actually implemented, it will summon dragons and kill kittens. But it was a fun midnight thought, and I like to share nightmares!
The nice thing about Python is it supports docstrings, essentially strings you can put inside your code which are kind of comments, but without being hidden inside commnent blocks. These are often used for documentation that you can reach using Python's help() function. (Did I mention I love help()?)
-
Add to Array in Ruby
When it comes to storing related and non-complex information in a program, arrays always come up. Arrays are a collection of an ordered list of items. Using arrays, you can store related values in a single variable, making your code efficient and easy to manage. In Ruby, arrays contain lots of built-in methods, making working with list data much more effortless.
This article describes various methods you can use to add items to an array in Ruby.
-
PHP Strtotime() Function
The UNIX timestamp value is calculated from 1st January 1970. The strtotime() is a built-in PHP function to convert human-readable date and time values into UNIX timestamp values. The way to use this function in PHP for different purposes has shown in this tutorial with examples.
-
PHP Sprint() Function
The sprint() function of PHP works like the printf() function. Both functions generate the formatted output, but one difference between these functions is that the output of the sprinf() function is stored into a variable, and the output of the printf() function is displayed in the browser. How sprint() function works and the uses of this function is shown in this tutorial.
-
Split PHP String
Sometimes we need to divide the string data based on the particular separator for programming purposes. Many ways exist in PHP to do this task. Three built-in functions of PHP that can be used to split string data are explode(), str_split(), and preg_split(). These functions create an array by dividing the string value based on the particular delimiter or pattern. How these functions work and the uses of these functions to split PHP strings have shown in this tutorial.
-
PHP If..Else Statements
The conditional statement is used to execute the block of statements based on the particular condition. The ‘If..else’ statement is one type of condition statement that works with the particular condition(s). Different types of ‘if..else’ statements can be used in PHP for implementing conditional statements. These are mentioned below.
-
PHP Associative Array
Mainly two types of the array can be created in any programming language. One is a numeric array and another is an associative array. Each value of an array is accessible by the index of that value. The index value is not required to define for numeric array and the sorted numeric index is generated automatically for this array if no index is defined. If it is required to create a particular string value for each index of the array, then the associative array is used to do the task.
PHP associative array can contain a number or both number and string in the index value. The user-defined index is used in an associative array. The ‘=>’ is used to assign the key-value pair of the associative array in PHP. The way to define and use associative array in PHP was shown in this tutorial.
-
Peeking through logs
Then, one part of the article caught my eye:
I assume each and every message could itself be malicious. I treat inspecting the log files with care. If any system was compromised, an attacker could theoretically pivot to other systems via carefully crafted malicious syslog messages. Would anyone do this? I doubt it.
Brace yourselves, for what follows is a recount of a case I've helped solve where the initial attack was performed via a carefully crafted syslog message and a tiny bit of social engineering.
Before I go into details, I have to mention that I am not at liberty to disclose the exact details, I cannot go into deeper specifics. So read what follows with that in mind. If something isn't clear, that's probably because I cannot clear it up without breaching confidentiality.
With that out of the way, lets set the stage!
-

- Login or register to post comments
Printer-friendly version- 1932 reads
PDF version
More in Tux Machines
- Highlights
- Front Page
- Latest Headlines
- Archive
- Recent comments
- All-Time Popular Stories
- Hot Topics
- New Members
digiKam 7.7.0 is released
After three months of active maintenance and another bug triage, the digiKam team is proud to present version 7.7.0 of its open source digital photo manager. See below the list of most important features coming with this release.
|
Dilution and Misuse of the "Linux" Brand
|
Samsung, Red Hat to Work on Linux Drivers for Future Tech
The metaverse is expected to uproot system design as we know it, and Samsung is one of many hardware vendors re-imagining data center infrastructure in preparation for a parallel 3D world.
Samsung is working on new memory technologies that provide faster bandwidth inside hardware for data to travel between CPUs, storage and other computing resources. The company also announced it was partnering with Red Hat to ensure these technologies have Linux compatibility.
|
today's howtos
|








.svg_.png)
Content (where original) is available under CC-BY-SA, copyrighted by original author/s.

Recent comments
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago
1 year 11 weeks ago