Pull to refresh
427.84
Rating

Programming *

The art of creating computer programs

Show first
Rating limit

Why does my app send network requests when I open an SVG file?

PVS-Studio corporate blog Information Security *Programming *.NET *C# *

0923_SVG_XXE_ru/image1.png


You decided to make an app that works with SVG. Encouraged by the enthusiasm, you collected libraries and successfully made the application. But suddenly you find that the app is sending strange network requests. And data is leaking from the host-machine. How so?

Read more →
Total votes 3: ↑3 and ↓0 +3
Views 880
Comments 0

Introduction to Engineering

Programming *System Analysis and Design *Studying in IT IT career Systems engineering

This is a set of chapters for young engineers. We give practical advice and discuss goals, challenges and approaches used in modern software engineering.

Along with classical foundations this article contains original ideas of conceptualizing engineer's work with emphasis on bringing order to the situation and finding an insight. Engineering is approached as work in uncertainty with other people which requires special skills. Non-obvious complications regarding modern production in big companies are discussed.

This article is based on 15 years of experience in engineering and management in high-tech industries.

Read more
Rating 0
Views 626
Comments 3

Virtual function calls in constructors and destructors (C++)

PVS-Studio corporate blog Programming *C++ *

Virtual function calls in constructors (C++)
In different programming languages, the behavior of virtual functions differs when it comes to constructors and destructors. Incorrect use of virtual functions is a classic mistake. Developers often use virtual functions incorrectly. In this article, we discuss this classic mistake.

Read more →
Total votes 2: ↑2 and ↓0 +2
Views 967
Comments 0

How to create bilingual books. Part 2. Lingtrain Alignment Studio

Open source *Programming *Learning languages Natural Language Processing *
Tutorial

title


How to make a parallel book for language learning. Part 1. Python and Colab version


This is a second article on making parallel books. Today we will use the more advanced tool which will bring rich UI functionality. Lingtrain Alignment Studio is a web application written on Vue and Python. The main purpose of it is to extract the parallel corpora from two raw texts and make a bilingual (or even multilingual) parallel book. This is an open-source project and I will be glad to hear all of your bright ideas. Links to the sources and our community contacts can be found below. Los geht's!


Setup


The app is packed into the docker container. It's a simple technology to deploy your stuff anywhere from the server to your local machine. It's available across all the operating systems. So at first, you need a docker installed locally. Then you need to run two simple commands. The first will download the container:


docker pull lingtrain/aligner:v4

And the second one will run the application:


docker run -v C:\app\data:/app/data -v C:\app\img:/app/static/img -p 80:80 lingtrain/aligner:v4

C:\app\data and C:\app\img — your local folders.


The app will be available on the 80th port. Let's open the localhost page in your favorite browser.


Lingtrain app 1


We will make three simple steps: Load, Align, Create

Continue reading
Total votes 8: ↑8 and ↓0 +8
Views 713
Comments 0

How the Carla car simulator helped us level up the static analysis of Unreal Engine 4 projects

PVS-Studio corporate blog Programming *C++ *Game development *Unreal Engine *

One of the mechanisms of static analysis is method annotations of popular libraries. Annotations provide more information about functions during errors detecting. CARLA is an impressive open-source project in C++ that helped us implement this mechanism to our analyzer. Subsequently, the simulator became a test-target for the improved PVS-Studio static analyzer.


0888_Carla/image2.png

Read more →
Total votes 1: ↑1 and ↓0 +1
Views 455
Comments 0

All hail bug reports: how we reduced the analysis time of the user's project from 80 to 4 hours

PVS-Studio corporate blog Programming *.NET *C# *

0885_SupportAndAnalyzerOptimizations/image1.png


People often see work in support as something negative. Today we'll look at it from a different perspective. This article is about a real communication of 100+ messages, exceptions, the analysis that didn't complete in three days...

Read more →
Total votes 4: ↑3 and ↓1 +2
Views 317
Comments 0

How to detect a cyberattack and prevent money theft

Positive Technologies corporate blog Information Security *Programming *Research and forecasts in IT

Money theft is one of the most important risks for any organization, regardless of its scope of activity. According to our data, 42% of cyberattacks on companies are committed to obtain direct financial benefits.  You can detect an attack at various stages—from network penetration to the moment when attackers start withdrawing money.  In this article, we will show how to detect an attack at each of its stages and minimize the risk, as well as analyze two common scenarios of such attacks: money theft manually using remote control programs and using special malware—a banking trojan.

Read more
Rating 0
Views 1.1K
Comments 0

Lingtrain Aligner. How to make parallel books for language learning. Part 1. Python and Colab version

Open source *Programming *Machine learning *Learning languages Natural Language Processing *
Tutorial

title


If you're interested in learning new languages or teaching them, then you probably know such a way as parallel reading. It helps to immerse yourself in the context, increases the vocabulary, and allows you to enjoy the learning process. When it comes to reading, you most likely want to choose your favorite author, theme, or something familiar and this is often impossible if no one has published such a variant of a parallel book. It's becoming even worse when you're learning some cool language like Hungarian or Japanese.


Today we are taking a big step forward toward breaking this situation.


We will use the lingtrain_aligner tool. It's an open-source project on Python which aims to help all the people eager to learn foreign languages. It's a part of the Lingtrain project, you can follow us on Telegram, Facebook and Instagram. Let's start!


Find the texts


At first, we should find two texts we want to align. Let's take two editions of "To Kill a Mockingbird" by Harper Lee, in Russian and the original one.

Read more →
Total votes 5: ↑5 and ↓0 +5
Views 971
Comments 0

How we sympathize with a question on StackOverflow but keep silent

PVS-Studio corporate blog Programming *

How we sympathize with a question on StackOverflow but keep silent
On the stackoverflow.com website, we frequently see questions about how to look for bugs of a certain type. We know that PVS-Studio can solve the problem. Unfortunately, we have to keep silent. Otherwise, StackOverflow moderators may consider it as an obvious attempt to promote our product. This article describes a particular case of such a situation that makes us suffer deeply.

Read more →
Total votes 2: ↑1 and ↓1 0
Views 482
Comments 0

Big Data Tools with IntelliJ IDEA Ultimate, PyCharm Professional, DataGrip 2021.3 EAP, and DataSpell Support

JetBrains corporate blog Programming *Big Data *Data Engineering *

Recently we released a new build of the Big Data Tools plugin that is compatible with the 2021.3 versions of IntelliJ IDEA and PyCharm. DataGrip 2021.3 support will be available immediately after the release in October. The plugin also supports our new data science IDE – JetBrains DataSpell. If you still use previous versions, now is the perfect time to upgrade both your IDE and the plugin. 

This year, we introduced a number of new features as well as some features that have been there for a while, for example, running Spark Submit with a run configuration.

Here’s a list of the key improvements:

Read more
Rating 0
Views 890
Comments 0

Creating Roslyn API-based static analyzer for C#

PVS-Studio corporate blog Programming *.NET *Visual Studio *C# *
Tutorial

After you read this article, you'll have the knowledge to create your own static analyzer for C#. With the help of the analyzer, you can find potential errors and vulnerabilities in the source code of your own and other projects. Are you intrigued? Well, let's get started.

Read more
Total votes 2: ↑1 and ↓1 0
Views 1.6K
Comments 0

Access the power of hardware accelerated video codecs in your Windows applications via FFmpeg / libavcodec

Intel corporate blog Working with video *Programming *
Tutorial
Since 2011 all Intel GPUs (integrated and discrete Intel Graphics products) include Intel Quick Sync Video (QSV) — the dedicated hardware core for video encoding and decoding. Intel QSV is supported by all popular video processing applications across multiple OSes including FFmpeg. The tutorial focuses on Intel QSV based video encoding and decoding acceleration in Windows native (desktop) applications using FFmpeg/libavcodec for video processing. To illustrate concepts described, the open source 3D Streaming Toolkit is used.
Read more →
Total votes 3: ↑3 and ↓0 +3
Views 3.4K
Comments 0

XSS: attack, defense — and C# programming

PVS-Studio corporate blog Information Security *Programming *.NET *C# *

XSS - or cross-site scripting - is one of the most common vulnerabilities in web applications. It has been on the OWASP Top 10 list (the list of the most critical security risks to web applications) for a while now. So let's figure out together how your browser can acquire and execute a script from a third-party website, and what this may lead to (spoiler: your cookies could get stolen, for example). And while we're at it, we'll talk about ways you can protect yourself from XSS.

Read more
Total votes 1: ↑1 and ↓0 +1
Views 1.5K
Comments 1

One does not simply calculate the absolute value

Programming *Java *Mathematics *
Translation

It seems that the problem of calculating the absolute value of a number is completely trivial. If the number is negative, change the sign. Otherwise, just leave it as it is. In Java, it may look something like this:


public static double abs(double value) {
  if (value < 0) {
    return -value;
  }
  return value;
}

It seems to be too easy even for a junior interview question. Are there any pitfalls here?

Read more →
Total votes 11: ↑10 and ↓1 +9
Views 30K
Comments 4

Tutorial: how to port a project from Interop Word API to Open XML SDK

PVS-Studio corporate blog Programming *.NET *C# *Development for Office 365 *
Tutorial

With the .NET5 release further development of some projects was questionable due to the complexity of porting. One can abandon small outdated libraries or find a replacement. But it's hard to throw away Microsoft.Office.Interop.Word.dll. Microsoft doesn't plan to add compatibility with .NET Core/5+, so in this article we focus on creating Word files with Open XML SDK.

Read more
Total votes 4: ↑3 and ↓1 +2
Views 1.1K
Comments 0

Go Code Generation from OpenAPI spec

Programming *Go *
Tutorial

OpenAPI specification


One of the nicest features of Go is the power of code generation. go generate command serves as a Swish knife allowing you to generate enums, mocks and stubs. In this article, we will employ this feature to generate a Go code from OpenAPI specification. OpenAPI specification is a modern industrial standard for REST API. This standard has fantastic tooling support and allows you to conveniently render and validate the spec. We are going to befriend the power of Go code generation with the elegance and clarity of the OpenAPI specification. In this way, you don't have to manually update the Go boilerplate code after every change in the spec. You also ensure that your docs and your code are a single entity, as your code is being begotten from the docs.


Let's start dead-simple: we have a service that accepts order requests. Let's declare endpoint order/10045234 that accepts PUT requests, where 10045234 is an ID of a particular order. We expect to receive an order as a JSON payload in the following format.


    {"item":  "Tea Table Green", "price":  106}

How can describe this endpoint in the OpenAPI spec?

Read more →
Total votes 3: ↑3 and ↓0 +3
Views 2.4K
Comments 0

Authors' contribution