Happy MMXVIII new year or JavaScript in WP post

This is the first my post in 2018. The main goal of this post is to check how javascript code embedded into WP post works. The javascript code which is used in this post may be downloaded from here. It is pure javascript impementation without jQuery or other libraries. The purpose of the code is… Read More »

EOVERFLOW error on 32-bit Linux

EOVERFLOW (Value too large for defined data type) error or error with code 75 is defined in errno.h file. The error is very common on 32-bit Linux OS when code tries to proceed with size 2 GB or more. It is very simple to simulate the error. Let us create file with size which exceeds… Read More »

How To Find Parent Process in Windows

Everything has been started by someone. It is related also to any application executed in operating system, except system itself. If you start notepad from command prompt the parent process of notepad process is command prompt. Currently most of the people find parent process using WMI query. For example: C:\projects>wmic process get processid,parentprocessid,name | findstr… Read More »

Processing Output Debug String Event

In previous article “Writing Windows Debugger in C#” the whole debugger architecture for Windows OS was discuss. This post describe how to process output debug string event sent by debugged process. On debugger side output debug string event is triggered by OutputDebugString function call, which has 2 versions: ASCII version OutputDebugStringA and Unicode version OutputDebugStringW.… Read More »

Writing Windows Debugger in C#

Actually C# is not the best language to call Windows Debugging functions. Several pinvokes and debugging structures definitions are required. They may be taken for winbase.h include file. In attached projects these pinvoke and structures definitions are located in PInvokes.cs file. Debugger is a program to debug another process. The debugger may start new process… Read More »

Analyzing application crash in CentOS Linux.

To diagnose program crashing failure let us create our own simple c++ application which will be crashing during execution. Save it as exemplo.cpp. Build executable without debug information: g++ -o exemplo exemplo.cpp When we start it we receive information that application crashed because of segmentation fault: ./exemplo Crashing application Segmentation fault (core dumped) The simplest… Read More »

DNS Client with Response Parser

Query to DNS server and response that NNS client receives are not so user friendly as for SMTP or FTP. DNS query and response formats presented in RFC-1035. For example A type query to DNS sever to get IP addresses of cnn.com domain in byte-by-byte hex dump looks like: 000000  02 01 00 00 01… Read More »

My first Leetcode experience and achievement

Started to play with Leetcode problems. Pretty addictive activity. The first task I selected was “Longest Substring Without Repeating Characters“. I wrote the code in C# and got a result – 22.9% in “Accepted Solutions Runtime Distribution”. It means that my solution has beaten only one fifth of other submitted implementations. I reprogrammed in C++… Read More »

Remote Monitoring System with Minimum Coding

This is the example how to organize remote monitoring of processes running on Linux devices. Let us create simple script which executes ps command, saves results in html file and uploads the file in http server. 2 arguments are required to run the script: the fist one is html file name without extension and the… Read More »

Automatic web page generation and update using task scheduler

The simple idea is simple: periodically automatically generate file locally and upload it to web server using ftp. Implementation Several years ago when I was passionate about Sudoku game I created my own Sudoku generator which is located in http://sudoku.smike.ru. There were several version of the generator. The version presented here generates Sudoku in PDF… Read More »