![](http://webcf.waybackmachine.org/web/20210215042752im_/https://habrastorage.org/getpro/habr/avatars/902/a1e/3fb/902a1e3fbb25664c55da6958b309f753.png)
Surely every C# developer has used out-parameters. It seems that everything is extremely simple and clear with them. But is it really so? For a kickoff, let's start with a self-test task.
Static code analysis is a crucial component of all modern projects. Its proper application is even more important. We decided to set up a regular check of some open source projects to see the effect of the analyzer's frequent running. We use the PVS-Studio analyzer to check projects. As for viewing the outcome, the choice fell on SonarQube. As a result, our subscribers will learn about new interesting bugs in the newly written code. We hope you'll have fun.
Let's say you use GitHub, write code, and do other fun stuff. You also use a static analyzer to enhance your work quality and optimize the timing. Once you come up with an idea - why not view the errors that the analyzer gave right in GitHub? Yeah, and also it would be great if it looked nice. So, what should you do? The answer is very simple. SARIF is right for you. This article will cover what SARIF is and how to set it up. Enjoy the reading!
In this modern era of technological advancements, it is important to connect with people who matter the most to your business i.e. customers. Are you searching for a secure online video platform for your business?
Do you know what is secure streaming!
Well, various online video platforms can help you in providing seamless videos to your customers. But what we need is a secure online video platform that can also protect our digital content from various e-hazards. Read on to know more about some of the most secure online video platforms in the market.
The flag of the Netherlands consists of three colors: red, white and blue. Given balls of these three colors arranged randomly in a line (it does not matter how many balls there are), the task is to arrange them such that all balls of the same color are together and their collective color groups are in the correct order.
For simplicity instead of colors red, white, and blue we will be dealing with ones, twos and zeroes.
Let's start with our intuition. We have an array of zeroth, ones, and twos. How would we sort it? Well, we could put aside all zeroes into some bucket, all ones into another bucket, and all twos into the third. Then we can fetch all items from the first bucket, then from the second, and from the last bucket, and restore all the items. This approach is perfectly fine and has a great performance. We touch all the elements when we iterate through the array, and then we iterate through all the elements once more when we "reassamble" the array. So, the overall time complexity is O(n) + O(n) ~= O(n). The space complexity is also O(n) as we need to store all items in the buckets.
Can we do better than that? There is no way to improve our time complexity. However, we can think of a more efficient algorithm in regard to space complexity. How would we solve the problem without the additional buckets?
Let's make a leap of faith and pretend that somehow we were able to process a part of the array. We iterate through part of the array and put encountered zeroes and ones at the beginning of the array, and twos at the end of the array. Now, we switched to the next index i with some unprocessed value x. What should we do there?
Hey everyone! I represent a game studio without a name, and the project we’re working on goes by the technical name of "CGDrone". I started writing this article earlier today, having tortured myself for ages with sketches, colours, algorithms and correcting bugs in rotations based on quaternions (the last one just about finished me off). You can probably understand I needed a break.
I’ve often come across stories people have posted online about how they made their game, the difficulties they faced, and the result they achieved at the end. Likewise, our team has its own story, and I’d like to share a bit about it.
Entrepreneurs make for easy targets. Whatever your business is doing, it’s guaranteed to ruffle some feathers. But don’t be quick to blame the public. Most times, being sceptical of change is only logical.
Even those who buy into your product will probably expect it to fail. 20% of businesses shut their doors during their first year, and less then half survive for more than five. We may not know these numbers, but we know it from experience — most of them overpromise, underdeliver and ultimately disappoint.
As such, it’s no surprise that the internet is full of passive-aggressive tech coverage. No matter what you do, your business is going to be attacked and demeaned. No one is immune.
Look no further than the original iPhone’s early reviews. It generated a lot of negative coverage for the sake of negative coverage. CNET’s main complaints revolved over a lack of physical buttons, completely missing the entire point of having a touchscreen. A Techcrunch columnist went even further and outright damned it to failure. Sounds funny now, but 14 years ago these people were dead serious.
Of course, these days everyone is an expert and the comment sections matter more than the articles they follow. Unlike traditionally restrained media professionals, the overconfident amateurs on popular UGC platforms openly take pleasure in attacking whatever they come across. It might be their way of letting off steam from being bullied at work or having financial difficulties, but no matter the reason, you still have to deal with a bunch of people trying to paint you in a negative light. And that’s not easy.
There is an open project COVID-19 CovidSim Model, written in C++. There is also a PVS-Studio static code analyzer that detects errors very well. One day they met. Embrace the fragility of mathematical modeling algorithms and why you need to make every effort to enhance the code quality.
In PVS-Studio, we often check various compilers' code and post the results in our blog. Decompiler programs, however, seem to be a bit neglected. To restore justice in this world, we analyzed the ILSpy decompiler's source code. Let's take a look at the peculiar things PVS-Studio found.
There is a myriad of articles about where to find remote jobs, particularly in tech. Some of them are outdated and most of them don't provide detailed reviews. So that's why I decided to do my own research. I did a basic search by "React" skill (where possible) and expected to see mostly "Frontend Developer" vacancies.
Speech analytics is the process of analysing recorded speech, such as phone calls, to gather customer information to improve communication and future customer interaction. Speech analytics as a technology has been evolving especially rapidly over the last few years. It gives the ability to structure and analyse previously lost streams of insight-rich data, such as phone conversations. Empowered with this technology, operations can gather incredibly valuable business intelligence to drive call delivery performance improvements. It’s smart in that it automatically identifies focus areas in which customer service or sales teams may need additional call training which then, in turn, improves the call’s successful outcome. Speech analytics, as a process, can isolate buzzwords and phrases used most frequently within a given time period, plus indicate usage is trending up or down. This data is highly useful to call managers to spot changes in consumer behaviour so that action can be taken to improve customer satisfaction.
Zadarma is a leading global VoIP provider and offers a smart speech analytics feature as part of their incredibly easy to use telecommunications offering. The tool is free as part of the wider PBX phone system bundles, included in the free recognition minutes. Zadarma’s analytics feature allows data access to every internal or external call conversation. The benefits of speech analytics include:
You may have already read a recent article about the first PVS-Studio run and filtration of warnings. We used the GTK 4 project as an example. It's about time we worked with the received report in more detail. Our regular readers may have already guessed that this article will be a description of errors found in the code.
The PVS-Studio analyzer is regularly updated with new diagnostic rules. Curiously enough, diagnostics often detect suspicious code fragments before the end of the work. For example, such a situation may happen while testing on open-source projects. So, let's take a look at one of these interesting finding.
In 2013 Canonical tried to crowdfund Ubuntu Edge smartphone. Its main feature could be the ability to use the smartphone as a full-fledged PС. Unfortunatly, the crowdfunding campaign did not accumulate enough money, so a dream of having a universal device remained to be the dream.
I've been searching for universality, too, on the software side, not the hardware one. Today I can confidently say I found the necessary combination: Git and JavaScript.
As you know, I have already described the benefits of browser applications (nCKOB static site generator) and the benefits of using Git instead of yet another back-end with API (GitBudget to track personal spendings). Once GitBudget was out, I spent the remaining 2020 to build a system allowing one to create browser applications right inside browsers. GitJS is the name of that system.
Home of this article: https://robotics.snowcron.com/coins/02_head_or_tail.htm
The global objective of these articles is to build a coin classifier, capable of scanning your pocket change and find rare / valuable coins. This is a second article in a series, so let me remind you what happened earlier (https://habr.com/ru/post/538958/).
During previous step we got a rather large dataset composed of pairs of images, loaded from an online coins site meshok.ru. Those images were uploaded to the Internet by people we do not know, and though they are supposed to contain coin's head in one image and tail in the other, we can not rule out a situation when we have two heads and no tail and vice versa. Also at the moment we have no idea which image contains head and which contains tail: this might be important when we feed data to our final classifier.
So let's write a program to distinguish heads from tails. It is a rather simple task, involving a convolutional neural network that is using transfer learning.
Same way as before, we are going to use Google Colab environment, taking the advantage of a free video card they grant us an access to. We will store data on a Google Drive, so first thing we need is to allow Colab to access the Drive:
Hey everyone! This post was born from a question asked by an IT forum member. The summary of the question looked as follows:
The one who asked a question worked as a TAC engineer. It is often that they collect or receive from the customers some text 'snapshots' of the network state for further offline analysis while troubleshooting the issues. Some automation could really save a lot of time.
I found this task interesting and also applicable to my own needs, so I decided to write a Proof-of-Concept implementation in Python 3 for Cisco IOS, IOS-XE, and ASA routing table format.
In this article, I’ll try to reconstruct the resulting script development process and my considerations behind each step.
Let’s get started.
AngelList is a social network designed to connect startups with investors and vice versa. The founders of it were dissatisfied with how opaque the VC world was, and found a way to increase the amount of available data. The project began in partnership with just 50 volunteer investors wishing to allocate $80 million in capital, and has grown to be the leading website of its kind. Over the past three years more than 75% of startups that received seed funding from American investors used AngelList to make it happen.
All Prometheus metrics are based on time series - streams of timestamped values belonging to the same metric. Each time series is uniquely identified by its metric name and optional key-value pairs called labels. The metric name specifies some characteristics of the measured system, such as http_requests_total - the total number of received HTTP requests. In practice, you often will be interested in some subset of the values of a metric, for example, in the number of requests received by a particular endpoint; and here is where the labels come in handy. We can partition a metric by adding endpoint label and see the statics for a particular endpoint: http_requests_total{endpoint="api/status"}. Every metric has two automatically created labels: job_name and instance. We see their roles in the next section.
Prometheus provides a functional query language called PromQL. The result of the query might be evaluated to one of four types:
Scalar (aka float)
String (currently unused)
Instant Vector - a set of time series that have exactly one value per timestamp.
Range Vector - a set of time series that have a range of values between two timestamps.
At first glance, Instant Vector might look like an array, and Range Vector as a matrix.
If that would be the case, then a Range Vector for a single time series "downgrades" to an Instant Vector. However, that's not the case: