Skip to content
Advertisement

Tag: c++

Cross-platform file name handling in .NET Core

How to handle file name in System.IO classes in a cross-platform manner to make it work on Windows and Linux? For example, I write this code that works perfectly on Windows, however it doesn’t create a file on Ubuntu Linux: Answer Windows using Backslash. Linux using Slash. Path.Combine set the right symbol : Path.Combine Method – MSDN

Uniscan: loadable library and perl binaries are mismatched

Uniscan is a tool for scanning websites which comes in kali linux and other pen tests distros. I used to use it weekly to test my applications but after some updates of my linux tools it is now giving the following error when I run it: xs/Moose.c: loadable library and perl binaries are mismatched (got handshake key 0xdb00080, needed 0xdb80080)

How to emit signal when the label text change?

I have 3 forms (main form, password form and menu form). The user clicks menu to open menu form, but before the menu form shows, the password form display to authenticate the user. He could display RFID card or enter his Id and password. When he puts his card the socket notifier in main form recieved the RFID card data

How to print a binary value(1010) into decimal value(10) in GDB?

I want to print the decimal value of 1010 in gdb, but it prints the result as it is what I gave last. Answer GDB’s p[rint] command prints the value of the expression you provide, which is interpreted in the source language of the program being debugged. In C, your 1010 is a decimal literal, not a binary literal, so

Socket connection in Linux

I just got a error from connect API in linux. I knew ‘connect’ will return zero if connection is successful, I got return value “3” is it error code? or is there something else what don’t know? I got value 3 from sock. Answer To get the return value of connect(), it is most straight forward to use a variable

Why is SIGFPE not triggered after adding a printf line?

I am playing with a simple program (source code below). And my computer configuration: Linux mymachine 3.13.0-49-generic #83-Ubuntu SMP Fri Apr 10 20:11:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) I intend to trigger the SIGFPE in this program by calling the executable in this way: As you can see, the SIGFPE is successfully triggered. However,

Is it possible to set timer with local time in Linux?

I’m on my IOT project with raspberry pi, And I want to raise event in certain time like 06:00:00 and 12:00:00 But I can’t do this with jiffies because jiffies only counts the time since the os started. I have an Idea : I may raise interrupt every second and check local time, compare it with certain time. But I

Advertisement