This is probably not the correct interpretation of this error.
The Win32 error above is more likely to indicate the actual problem.
Flags
Severity
Success
This code indicates success, rather than an error.
This may not be the correct interpretation of this code,
or possibly the program is handling errors incorrectly.
I am currently trying to save the animation made in openGL to a video file. I have tried using openCV's videowriter but to no advantage. I have successfully been able to generate a snapshot and save it as bmp using the SDL library. If I save all snapshots and then [...] read more
I am witnessing very counter-intuitive effect in my network setup. I have a network setup with three devices (let's call them server, laptop and nettop, all running Linux, details below) connected to a gigabit ethernet switch. I measure network throughput (a) by transferring a file from the server to the [...] read more
I'm trying to install .NET 3.5 on my Windows 8 box and it keeps throwing Error 0x800f0922 at me. From what I've read on answers.microsoft.com and StackOverflow I gather the easiest way to fix this is to perform a system refresh, however this will remove all software I've installed from [...] read more
I've got a NetApp as my nfs server, and two Linux servers as the nfs clients. The problem is that the newer of the two servers has extremely differing read and write speeds whenever it is doing read and writes simultaneously to the nfs server. Separately, reads and writes look [...] read more
I want to convert SwiftUI view Color to UIKit UIcolor component. I have tried several ways and also refer the StackOverflow already given answers, But they did not work. It was also mentioned by some users in those posts. I have gone through the below code which is proposed by [...] read more
I want to get a pixel color from another window. The code I have is: using System; using System.Drawing; using System.Runtime.InteropServices; sealed class Win32 { [DllImport("user32.dll")] static extern IntPtr GetDC(IntPtr hwnd); [DllImport("user32.dll")] static extern Int32 ReleaseDC(IntPtr hwnd, IntPtr hdc); [DllImport("gdi32.dll")] static extern uint GetPixel(IntPtr hdc, int nXPos, int nYPos); static [...] read more
I want to implement the DEADLINE scheduling policy in C. I know the feature is implemented since Linux 3.14.10 and I'm using Ubuntu 14.04 Linux #### 3.17.0-031700-lowlatency #201410060605 SMP PREEMPT which should be recent enough. I develop the program with Eclipse (launched as sudo). I've defined _GNU_SOURCE and included sched.h [...] read more
I'm investigating some poor nfs performance on a new server, as compared to an old server. Both the old and the new server are nfs clients, and they connect to the same exact NetApp nfs server. My specific question: How to I change the "Advertised pause frame use" setting? I [...] read more
A specific part of my PHP script crashes randomly and I'm not sure why. The only difference on this page and the rest of the pages, is that I'm doing a PDO SQLSRV call. But 80% of the time there are no issues, and then suddenly IIS7 will just start [...] read more
Does anybody know if there is a .NET Framework equivalent for swapping the order of bytes in an uint? I am trying to port some custom c hashing code that is using MSFTs _byteswap_ulong (the equivalent of Apples OSSwapInt32 or Bswap32 in *Nix world) to c#. I can write this [...] read more
I start working with HART (Highway Addressable Remote Transducer) Protocol and I found something, let's say different and I try to understand it, more precisely the uint24. I understand that this structure uses an UInt32 internally for storage and most other common expected integer functionality, so using a 24-bit integer [...] read more
I've a server with 2 IP's. * 10.10.1.50 (255.255.255.0) * 10.10.2.50 (255.255.255.0) I've also a DC which has it's IP on 10.10.1.30 and has no way to reach 10.10.2.50. When I ping the server from DC it responds with 10.10.2.50. So I went with the obvious way to deal with [...] read more
CentOS 5.x I configured my CenTOS server to use full duplex. I did this by editing the network script: more /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO=static IPADDR=192.168.1.200 NETMASK=255.255.255.0 HWADDR=00:14:5E:0C:8B:E3 ETHTOOL_OPTS="speed 100 duplex full autoneg off" (IPs and MAC has been renamed to protect the innocent =) ) After making this change, I [...] read more
Can someone please explain to me why the upper 32 bits of a uint64_t are set to one in case number #2: uint64_t ret = 0; ret = (((uint64_t)0x00000000000000FF) << 24); printf("#1 [%016llX]\n", ret); ret = (0x00000000000000FF << 24); printf("#2 [%016llX]\n", ret); uint32_t ret2 = 0; ret2 = (((uint32_t)0x000000FF) << [...] read more
Have a strange problem with my wired network interface. Here goes: 1. I plug in the cable. 2. Both diodes light up (one green / one orange) and dmesg gives [ 66.847512] tg3: eth0: Link is up at 1000 Mbps, full duplex. [ 66.847516] tg3: eth0: Flow control is off [...] read more
Reported to Qt as a bug: https://bugreports.qt.io/browse/QTBUG-93475 -------------------------------------------------------------------------------- I am re-drawing a QPixmap multiple times in different locations, with differnt rotations by transforming the QPainter. In certain situations the QPixmap is not drawing correctly. The GIF below shows my initial discovery of this issue with a QPixmap containing a green [...] read more
I've been given a task to create a program that would read the name of a file and then copy its insides to other file, name of which is also read from the input. I wrote the program itself, but it appeared to do nothing. Experimenting further, I've discovered that, [...] read more
Recently, our teacher gave us the task to convert a colorful image to a 1-bit image using Java. After a little experimentation I had the following result: BufferedImage image = ... for (int y = 0; y < image.getHeight(); y++) { for (int x = 0; x < image.getWidth(); x++) [...] read more
i'm making kinda ms paint application, that draws conture and fill inside.I wrote recursive function that fills conture. It works fine ,but if conture is too big program throws stackoverflow exception. How can i solve this problem?? i even can't catch this exception(( using System; using System.Collections.Generic; using System.ComponentModel; using [...] read more
My issue is so specific that I have to give the code for this, sorry if the code is too convoluted or complicated, I am a bit new to UIKit since I have been learning SwiftUI more instead of UIKit. I have a really complicated UITableView header with some nice [...] read more
I'm trying to create a RGB Surface from another surface with SDL_CreateRGBSurfaceFrom because it's a TTF surface and I want to change the depth to access the surface pixels, this function is supposed to return a SDL_Surface* pointer but the compilers says it returns an int and I cant assign [...] read more
I wang to converting I420 to BGRA ,but i only search the method converting I420 to ARGB: public static int[] I420toARGB(byte[] yuv, int width, int height) { boolean invertHeight=false; if (height<0) { height=-height; invertHeight=true; } boolean invertWidth=false; if (width<0) { width=-width; invertWidth=true; } int iterations=width*height; int[] rgb = new int[iterations]; [...] read more
I'm trying to set Windows SystemTime in a c# Application on Windows. I've implemented the example that is in every forum (including here) but it's not responding. I have a private class with two methods: GetSystemTime() and SetSystemTime(). GetSystemTime is working fine, but SetSystemTime is not setting the time I'm [...] read more
Im using lenevo M5 server which have Gbps ethernet cards, but strangely when i read cat /sys/class/net/eth3/speed it show 100 similarly when using ethtool it show 100Mbps only.The output of dmesg and ethtool are below. Any idea why is that root@server1:~# dmesg |grep eth1 [ 3.027487] tg3 0000:16:00.1 eth1: Tigon3 [...] read more
I am using a traffic shaping by IP hashing filter. I have Five networks /24 : 192.168.1.0/24, 192.168.2.0/24 .. 192.168.5.0/24 so i create a table with 5 cells and each cells has 256 cells. this is a part of my configuration : $tc qdisc add dev $DEV root handle 1: [...] read more
I use Ubuntu server for my things,but when i config speed 1000 and duplex full the error occur. I've tried the answers from here,does not work, the command i used is ethtool -s eth0 speed 100 duplex full Before this happened I changed my network settings, but unfortunately forgot what [...] read more
I'm running debian squeeze on a rented dedicated server and in the recent time the server gets more often unreachable from one moment to the other with any external service. During this downtime, the crontabs etc. are running normally and I couldn't find any clou of a crash or related [...] read more
I have a RHEL 5 workstation with 2 nvidia Quadro FX4500 cards, with one display attached to each card. After doing a clean install of RHEL 5.5, the second display doesnt work (it worked ok in RHEL 5.2). Neither separate X screens nor Xinerama are working. The kernel version is [...] read more
Here is my xorg.conf file. The problem is that my resolution setting 1600x900 is getting ignored. The resolution keeps popping to 1280x1024 Edit The resolution comes up as 640x480 after unplugging the physical monitor. When my file gets ignored, the system seems to read my monitor to find it's capabilities [...] read more
I am working with a TM4C lunchpad and need to assign Ports E and B as inputs and outputs to be able to control a simple traffic light built on a breadboard. There are three LEDs on the board as well as two buttons: when btn1 is pressed, the LEDs [...] read more
I create a CIImage from an IOSurface. Then I render it to a CVPixelBuffer. If I skip the CIImage step the color is fine, however I intend to crop the image with CIImage/CIContext functions. However the problem is that the CIImage/CIContext step introduces color changes. See the example image, left [...] read more
running this code leads to the title question: if you resize the window you will not see any flicker (repaint sended by the system) if you move mouse inside the window, severe flicker will occurr (repaint sended by me) how to reproduce the system-driven WM_PAINT? #include <windows.h> #include <wingdi.h> LRESULT [...] read more
I have recently run the following commands to install qemu. sudo apt-get install qemu-user sudo mkdir -p /opt/arm/10 wget 'https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf.tar.xz?revision=d0b90559-3960-4e4b-9297-7ddbc3e52783&la=en&hash=985078B758BC782BC338DB947347107FBCF8EF6B' -O gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf.tar.xz sudo tar Jxf gcc-arm-10.2-2020.11-x86_64-arm-none-linux-gnueabihf.tar.xz -C /opt/arm/10 Now there are a no. of ARM files i would like to compile and execute on my linux subsystem. It would be [...] read more
In Visual Studio, you can customize the font and color of any display items such as C++ keywords, C++ parameters, C++ local variables, function names, macros, etc. You can do so through selecting the menu "Tools -> Options -> Fonts and Colors". In the setting dialog, I am confused by [...] read more
I want build program with plain text ="hello i'm jhon" then encrypt to cipher text and then decrypt to plain text again. So first I search and get code from internet with format data integer. I found camellia-java-BSD-1.0.1.tar.gz from here. So write this code but I get error run: Exception [...] read more
I'm working on a GUI for a photo editor and currently I'm stuck on loading a 32bit BMP image from a file. It was all going smoothly until I've started experimenting with multiple layers and molding them into a single one. (Layer molding and image saving is beeing done by [...] read more
Basically I'm drawing a grid with 250k tiles. If I draw in a loop this grid the memory stays at 120mb but if I translate the coordinates of each tile with an offset, as soon as the grid starts to get drawn outside of the window viewport, then the memory [...] read more
Someone I know was recently asked this question in a coding interview. They were asked to write a function reverseBytes below such that if you pass it 0xabcdef12 it'd output 0x12efcdab. They gave the following solution. unsigned int reverseBytes (unsigned int x) { unsigned int ans = 0; ans = [...] read more
I have been trying to find the answer all morning, so happy to close this question if it is a duplicate. I am tying to get the first 2 digits of a hex number that has 8 digits. I understand that >> moves x bits to the right. So doing [...] read more
I have a function decoding CS:GO crosshair codes into key value object. (Previously I asked question about how to decode share codes from CS:GO Here) How can it be reversed from decoding these values, to encoding them into "share code" which consist of alphanumeric characters? Function decoding share codes: const [...] read more
I'm trying to write piece of code, to send data via I2C on my Zynq7020 device. There are 11 register asociated with I2C and I'm prety sure, that I have set this properly. I also double check registers asociated with CPU_1X clock enable a and I2C reset, but they are [...] read more
Assuming the following C code runs on a 32 bit platform (so sizeof(int) = 4), is the following code portable between big endian and little endian? When I ask "is it portable" I mean is the app going to print: a) on a little endian platform Address is 0xAABBCCDD MSB [...] read more
I am new to windows programming. I want to display the raw pixel array to the screen without using SetPixel function because it's too slow in my standards. I am using this question as my reference. I made a small program below to fill the pixel array with random RGB [...] read more
I would like to use a quantized tensorflow lite model but the current ByteBuffer I have is using floating point. I would like this to be integer representation. Right now the model wants 270000 bytes and I am trying to pass it 1080000 bytes. Is it as simple as casting [...] read more
I'm trying to write my own Color struct for a task I have. My goal is that my buffer will always contain a RGBA value, even if it is initialized with ARGB values. I have 2 constructors: 1. Takes R,G,B,A values of type uint8_t separately - Works like a charm. [...] read more
I have a string, consisting of 8 chars. std::string input = { 'A', 'B', 'C', 'D', 'E', 'F', 'A', 'F' }; I have a 64 bit integer which will hold the hexadecimal correspondence of this string. And four 16 bit integers, which the number will be parsed into. uint64_t number [...] read more
I am trying to port some graphics code that is written using java.awt.* library to instead use the android.graphics.* library. However, I don't have much experience with graphics. Here is the java.awt.* code (which works): /** * Converts the given <code>MyImageBitmap</code> to the specified image format and returns it as [...] read more
I wanted to calculate the brightness of an UintList image. The image I used are picked from my phone (Using image_picker plugin in flutter). I tried a for loop on every value of this list and did this: int r = 0, b = 0, g = 0, count = [...] read more
I'm new to working with fiber so please bear with me. I've got a Dell R520 that I've just installed a Chelsio T520-SO fiber adapter into. The server is running Ubuntu 18. I've got a compatible Chelsio SM10G-SR:10G transceiver on the adapter side and the switch (HP5406) which is using [...] read more
TC-u32 man page states that HANDLE is: HANDLE := { u12_hex_htid:[**u8_hex_hash:[u12_hex_nodeid]** | 0xu32_hex_value } so the size of the bucket should range from 0x00 to 0xff as it is a u8 value. The problem is I can't create a bucket greater than 0x1f (five bits). I got: RTNETLINK answers: Invalid [...] read more
I am trying to set up a point to point connection between two Linux host machines. I've connected both of them with crossover cable, but they can't ping each other. Here are the configurations for each laptop: Laptop 1 (eth0 configuration) IP Address - 128.110.1.6 Subnet Mask - 255.255.255.240 Gateway [...] read more
I picked up this server for like $20 and just using it for my homelab setup. The problem is that the ethernet speeds are peaking at 8MB/s on the LAN and even worse to the internet down to like 5MB/s. This would normally point to being connected at 100Mbps but [...] read more
I assembled a new pc earlier today and have been trying for hours to install the realtek HD audio drivers with no luck. It goes all the way untill the very end of the installation and then says "audio driver failure 0x000000ff". I've tried the drivers that came on the [...] read more
I've got a server that's displaying odd behaviour on one of it's network ports. It seems unable to process/respond to any traffic (ping etc.). Below is what is listed using 'ifconfig' (assigned static address 10.100.0.80) eth0 Link encap:Ethernet HWaddr 00:18:7D:0E:53:8B inet addr:10.100.0.80 Bcast:10.255.255.255 Mask:255.0.0.0 inet6 addr: fe80::218:7dff:fe0e:538b/64 Scope:Link UP BROADCAST [...] read more
I am trying to set up a network as following : ============================= DHCP fix addresses : PC1 => 192.168.0.38 PC2 => 192.168.0.39 ============================= PC1: eth0 inet addr:10.10.0.2 Bcast:10.255.255.255 Mask:255.0.0.0 wlan0 inet addr:192.168.0.38 Bcast:192.168.0.255 Mask:255.255.255.0 Destination Gateway Genmask Flags Iface 0.0.0.0 192.168.0.254 0.0.0.0 UG wlan0 10.0.0.0 0.0.0.0 255.0.0.0 U eth0 172.17.0.0 [...] read more
I am running Windows 7 SP1. I have installed CygWin with OpenSSH, so now I have a running SSH Daemon that seems to be working OK, except for a problem with an interactive command-line program that requires keystrokes to be managed. This is the program (OCLHashCat, a GPU number cruncher): [...] read more
I hope you can help me after umpteen failed attempts to load Windows 7 on an ASUS P5WD2 premium board and dual core intel 3.4Ghz 2Gig Ram processor ran the beta versions beautifully, the mini dump info is as folllows, fails at approx 98 % load on install same every [...] read more
I have the following function to convert a given id of an object into an RGB color: int r = ((int) id & 0x000000FF) >> 0; int g = ((int) id & 0x0000FF00) >> 8; int b = ((int) id & 0x00FF0000) >> 16; How would I receive the original [...] read more
This is a very strange issue. I'm working on an GPU based crypto miner and I have an issue with a SHA hash function. 1 - The initial function calls a SHA256 routine and then prints the results. I'm comparing those results to a CPU based SHA256 to make sure [...] read more
I'm trying to load an image file into the clipboard in order to then paste it in Discord with Ctrl+V. It is possible to paste a PNG into Discord and conserve the transparency, as I am able to right click to copy an image on Mozilla or Chrome and then [...] read more
In the listener when I detect double click in treeview, I cannot receive the caret bounds of the codearea for some reason. It bugs out saying this -> Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: This ParagraphText is not the parent of the given shape (CaretNode(name=main-caret position=41 paragraphIndex=2 columnPosition=0 Path[elements=[MoveTo[x=0.0, [...] read more
EDIT: I worked around this issue but to rephrase my question - is it possible to create the CVPixelBuffer to match the CGImage? For example I would like to have 16 bits per component instead of 8. -------------------------------------------------------------------------------- As the title says. For example, when I NSLog my buffer it [...] read more
I have this very simple code snippet in which a simple TCP listener is created. using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Net.Sockets; using System.Text; using System.Threading.Tasks; namespace TCPListenerTest { class Program { static void Main(string[] args) { IPAddress localAddr = IPAddress.Any; TcpListener server = null; bool done [...] read more
I'm looking for help because I'm stuck on the problem for a long time. I have at home an ESP32 wrover kit that I have connected in uart to a Zigbee gateway module. I would like to send via uart some commands to the module, for that I put the [...] read more
I want to create a quiz game. As a first state i want a menu to show up and i want to do it like if the image start is clicked than change a state. So the problem is that my picture with menu didn't even show up. And i [...] read more
Hi i have a file with IP addresses stored as ssIpAddress: AC1AF0F1 . . . ssIpAddress: AC1AF011 and so on, i am using awk to find and print this as follows, awk ' /ssIpAddress/ { str = sprintf("0x%s", $2) ssIp = strtonum(str) printf ("%d.%d.%d.%d\t", rshift(and(ssIp,0xff000000),24), rshift(and(ssIp,0x00ff0000),16), rshift(and(ssIp,0x0000ff00),08), rshift(and(ssIp,0x000000ff),00)) }' <file> [...] read more
I've a project in which I have to implement unions so I'm doing so with a packed representation and component-wise representation of a hexadecimal color. The code below will clear things up but basically I'm stuck on how to convert from the hexadecimal to a QString so that I can [...] read more
Recently I had copied this code (Thanks CristiFati): Python- How to communicate with printer While its working on its own, I can't figure out how can I get total page counting to work, I added it to DEFAULT_FIELDS var and to NotifyData method, without luck as follow: def NotifyData(self): if [...] read more
I referred to a python program about this function, but I can't understand how it works. In my opinion, it just sends the packet to a connection which is from 'pymysql.connect'. How can I realize this function using C++; self._stream_connection.wfile.write(packet) #the packet is data which maintains the payload I did [...] read more
I'm trying to capture a view as a screenshot and print it via bluetooth using (Xprinter), but everytime i try to convert the bitmap to greyScale it produces an empty bitmap. here is my captureScreenshot method, it seems like well.. public static Bitmap captureScreenshot(View view) { Bitmap bitmap = null; [...] read more
I not understand how why the EK is having an array size 44, but each round the function is only modify the data of rkexp[0], rkexp[1], rkexp[2], and rkexp[3]. There are total 10 round and i am showing two of the round. I also not understand that how the rkexp [...] read more
QUESTION: How do I draw an rgb pixel image (array of rgb structs) to the display using SDL2 and OpenGL2 as fast & as efficiently as possible? I tried mapping to a 2d texture and blitting an SDL_Surface... I think the 2d texture is slightly faster but it uses more [...] read more
I'm trying to implement a video converting solution on AWS Lambda following their article named Processing user-generated content using AWS Lambda and FFmpeg. However when I run my command with subprocess.Popen() it returns -11 which translates to SIGSEGV (segmentation fault). I've tried to process the video with the newest (4.3.1) [...] read more
I'm trying to use the triangle primitive in XRender to draw stroked lines. According to the (quite limited) documentation (see section 10): > Abutting edges must match precisely. When specifying two polygons abutting > along a common edge, if that edge is specified with the same coordinates in > each [...] read more
I am trying to serialize a Java object in such a way that its content can be read by an existing reader.cc module, which currently reads binaries generated in C++. The following is a snippet from reader.cc, where it reads 3 variables (name_len, fname, and feature_names_count): uint32_t name_len; in.read((char *)&name_len, [...] read more
On starting the java application from the firefox browser plugin, I get an error before even sending a message (so I am assuming this is some 'handshake'). I am on Ubuntu I am using JDK: java-11-openjdk-amd64 I start the native application through a sh script: #!/bin/sh set echo off cd [...] read more
I have a subclassed button that I am trying to highlight when the mouse cursor is over it. However, I cannot seem to get the TrackMouseEvent() function to work properly. Here is the code that creates the subclass: hBtn = CreateWindow(L"button", L"", WS_CHILD | WS_VISIBLE | BS_OWNERDRAW, 0, 0, 0, [...] read more
My English skill is poor because I'm not a native English speaker. Please understand. I compiled some test code that operating alright in IAR with LLVM infra but the generated code was not operated on my test board. Detail are as follows. TEST GOAL I want to see operating the [...] read more
I am writing a program that outputs a list of RGBA values to a bitmap image. It seems to work fine, except when alpha is 0. When alpha is 0, alpha seems to be ignored instead of transparent. When alpha is 0x01 though, everything seems to be fine. Currently the [...] read more
I am using MPLAB X IDE and MPLAB Code Configurator (MCC). i generated the library of the flash read/write and erase with MCC. then when i used "FLASH_ReadPage" built in function created from the MCC its not working, and after debugging i found it stucked in a while loop that [...] read more
My problem is to convert a hexadecimal color string, with alpha value, and obtain the four channels R G B A. The lenght of the string is 8 (for example: 4faabbaa) I've tried the following code, with bitwise operators, to convert the string and obtain the rgba. var hex = [...] read more
I am trying to fire a function every time an ESP32 node receives a certain char. I can receive the data and parse the char out of a packet structure I have made. I register all my actions in a map of type <char,callback_function>, where typedef void (*callback_function)(void); The idea [...] read more
I am building an application which has a Camera inside. After I take a photo, I want to analyze it to know the brightness of this picture, if it is bad I have to take again the photo. This is my code right now, it's a javascript function that I [...] read more
Im currently trying to develop a chat application that implement Camellia 128-bit as its encryption algorithm. I succesfully build and run the code from it official page [here][1]. The problem is the algorithm encrypt for Integer datatype. When im trying to encrypt String message, i converted it into ASCII form, [...] read more
I am a beginner in MIPS and I need to write a code that will draw a box on the bitmap display using 4 loops for each side of the box, the box should have the marquee effect and have a 5 ms delay. And it should have keyboard funtionality [...] read more
I am trying to paint in the non-client area, to produce a custom "skin". Though I can trap the WM_NCPAINT message, I cannot get any of the drawing functions to work. Here is a test code, to draw a small, red rectangle in the NC area. The coordinates in this [...] read more
When I first ran into problems I read this article: Tesseract Doc on Improving Quality. I tried various transformations on my image and did manage to get some significant improvement. However it is still a long way from reasonable. Here is what a game result screen looks like straight out [...] read more
(I am new to ARM microcontrollers. Pardon me if this is a naïve question. ) ARM-M3 processor provides a unique bit-banding feature which maps a bit in the first 1M address range of SRAM and peripheral regions to a 32-bit word in another alias address ranges, respectively. My questions are: [...] read more
I'm trying to 32 bits data send and receive between Pi and FPGA using spi. So, I set the Pi as master and FPGA as slave. And use xfer2 function from spidev. But, I couldn't read data. How can I fix it?. First 4 bytes for deciding read or write [...] read more
I have a problem with SDL2, I'm trying to render a fully red surface with SDL2 but it doesn't work, the window closes immediately, it seems like the program exits in SDL_RenderPresent() function, I think the wrong part is my fillSurface function but I don't see what I did wrong [...] read more
I am wrtiing a program in PLP assembly that repeatedly reads the value of the switches (address: 0xf0100000) and displays a pattern on the LED array (address: 0xf0200000) based on what switches are clicked. Each time the switch value is read, the pattern should be displayed (regardless of whether the [...] read more
I made two extensions, one for firefox and one for chrome(will post only firefox code here, if it is necessary to post Chrome code, let me know, but it is extremely similar) that has some actions, calls to native host app. One of this calls returns a message with > [...] read more
So I am learning about Native messaging with chrome extension using Java. I got the following error while testing the app: Error when communicating with the native messaging host. I wasn't sure what was the problem or how can I track the error. Here's my checker.bat file: @echo off javac [...] read more
I know I'm just dumping a lot of code here, but this error message that I am getting does not give a real line number nor does it show up on Google for me. I don't even know what it is supposed to mean, since F3 and G3 are both [...] read more
We have 2 PCB's we want to send data to individually, both PCB share the same IP and same Port (192.168.249.2:4000). Now the only difference its that PCB1 its connected to "Ethernet1" card on my PC and PCB2 its connected to "Etherne2t". PC---------Ethernet 1 (ip 192.168.249.11) ---------- PCB 1 ( [...] read more
A game I am currently developing uses a 5x5 matrix to change the colors of the image on a per pixel basis. I was wondering if anyone has developed an extremely fast algorithm for something like this. For every Pixel(setPixel(sourcePixel * Matrix)) I have built my own algorithm for this [...] read more
I am trying to write junit for JavaFX. I am using testFx. in my fxml file: <Text fx:id="actiontarget" GridPane.columnIndex="1" GridPane.rowIndex="6"/> I have a functionality in my controller class: @FXML protected void handleSubmitButtonAction(ActionEvent event) { actiontarget.setText("Sign in button pressed"); Now I when I am writing test class : @Test public void [...] read more
So we have this to break a 32 bit integer into 8-bit chunks: var chunks = [ (num & 0xff000000) >> 24, (num & 0x00ff0000) >> 16, (num & 0x0000ff00) >> 8, (num & 0x000000ff) ] How can you tell how many chunks it will be before computing the chunks? [...] read more
I'm porting some c++ SIMD instruction code to netCore Intrinsics and went over following line: __m128i ssd = _mm_set1_epi32((unsigned __int32)(alpha_value & 0x000000FF) << 24); //ALPHA CHANNEL MASK In the docs of netCore SSE2 Intrinsics I could not find any corresponding method for the _mm_set1_epi32 intrinsic. What this instruction does is [...] read more
I'm working on a voxel engine and my shadow map has some strange behavior. When I turn my directional light to a certain angle, some shadows are cut off. here a pic how it looks like and my shadow map. this is how I render my shadows: glDisable(GL_CULL_FACE); glEnable(GL_DEPTH_TEST); glViewport(0, [...] read more
I am trying to get atomic averaging working on a voxelization shader based on https://www.seas.upenn.edu/~pcozzi/OpenGLInsights/OpenGLInsights-SparseVoxelization.pdf Shader code: #version 440 core #extension GL_ARB_shader_image_load_store : require layout(binding = 0) uniform sampler2D albedo; layout(r32ui, binding = 1) uniform volatile uimage3D voxels; layout(binding = 2) uniform sampler2DShadow shadowMap; in vec2 uv; in flat int [...] read more
I would like to save several integers in a char pointer and then send this pointer with sendto (winsock2). Unfortunately my char pointer always only contains "\n". Right at the creation and also after filling. What have I done wrong? uint32_t id = getID(); uint8_t inputType = getInputType(), inputValue = [...] read more
I have found an old script written in C and when I try to compile it I get the following message # gcc libipt_rope.c -o libipt_rope.so libipt_rope.c:349: error: variable ‘rope’ has initializer but incomplete type libipt_rope.c:350: error: unknown field ‘next’ specified in initializer libipt_rope.c:350: warning: excess elements in struct initializer [...] read more
I need a widget to receive the onTap event and is draggable. child: GestureDetector( onTap: _setVisibleSelect(), child: Draggable<Color>( data: Color(0x000000ff), child: Image.asset('assets/photo.png', color: Colors.yellow, width: 60, height: 60,), feedback: Image.asset('assets/photo.png', color: Colors.yellow, width: 60, height: 60,), childWhenDragging: Container(), ), I can see _setVisibleSelect() doesn't work when onTap but Dragging. How [...] read more
I'm having color like this "CC0000" Now to assign this color to my selected segment, I tried using this extension first. extension UIColor { // MARK: - Initialization convenience init?(hex: String) { var hexSanitized = hex.trimmingCharacters(in: .whitespacesAndNewlines) hexSanitized = hexSanitized.replacingOccurrences(of: "#", with: "") var rgb: UInt32 = 0 var r: [...] read more
I'm writing a program in C++ to read and decode data received over TCP which I store in a char* buffer. Method 1 Since I found useful to be able to read the buffer for debugging purposes, I firstly used this function to extract a given number of bytes from [...] read more
I have the following JNI method which I want to convert to Android's RenderScript because that would make my project a little bit simpler to manage. Here is the JNI method: static void applyRGBCurve(int width, int height, int *pixels, int *rgb) { int R[256]; int G[256]; int B[256]; // It [...] read more
Since iOS 13, the colors getting assigned to UIControls don't seem to be the same colors that ultimately end up getting displayed. Here is an example that can be copy & pasted into an xcode playground: import UIKit import PlaygroundSupport // https://www.hackingwithswift.com/example-code/uicolor/how-to-convert-a-hex-color-to-a-uicolor extension UIColor { public convenience init?(hex hexUser: String) [...] read more
I need to convert image to a hexadecimal value. When I try to get a color code of specific pixel on uiimage I got the wrong value. In Java I'm using bitmap.getpixel() method to reach pixel color and I'm getting correct value which is 255 but on swift same image [...] read more
I have found this piece of code that I have posted below that should convert bytes to integers, however I do not fully understand how this piece of code works in java. I believe bytebuffer is used in this case in a full piece of code as it is just [...] read more
I am working with a NAO-robot on a Windows-XP machine and Python 2.7. I want to detect markers in speech. The whole thing worked, but unfortunately I have to face now a 10 Secounds delay and my events aren't detected (the callback function isnt invoked). First, my main-function: from naoqi [...] read more
When I run the following code (headers and main entry ommitted) void fork11() { pid_t pid[N]; int i; int child_status; for (i = 0; i < N; i++) if ((pid[i] = fork()) == 0) exit(100+i); /* Child */ for (i = N-1; i >= 0; i--) { pid_t wpid = [...] read more
I am trying to access the framebuffer of an SDL_Renderer as an array of Uint32* pixel to pass to Libretro's display function. I created this minimal example to show two methods of accessing SDL's framebuffer that I have seen online, neither of which work. #include <iostream> #include "SDL.h" const int [...] read more
Suppose I have a function that should be able to extract any integer type (char, int, long, etc) from any other integer type because some data outputting device likes to pack small data into bigger data types (ie 4 chars in a uint32_t). I write a function that 1. Takes [...] read more
I know why this isn't working here but i just want to ask if there is a way to somehowe get a height width w or y position from void or int function. Or just how to recreate this to work it on mouse klik on exact picture. I know [...] read more
I have an excel file and i need to check the column B for a certain range (for example range: 1:3000) and if is present a value different from "new" and empty cell so i need to change the row color in grey from column B to O. Like this: [...] read more
This error shows in my serial monitor see the code below for ESP32 and please help me to solve > Guru Meditation Error: Core 1 panic'ed (Cache disabled but cached memory > region accessed) Core 1 register dump: PC : 0x400d1580 PS : 0x00060034 A0 : > 0x400847fc A1 : [...] read more
My code implements TFlite and I have two classes: 1) Deals with camera activity and processing of image 2) Deals with specifics of the model and detector. I have a method in the extended class which runs the model. I am trying to call that method from within the main [...] read more
I'm making a BMP to PNG Converter. The BMP Images are uncompressed. So my question is when the BMP File is converted to a PNG File, then is the PNG File compressed i.e is the image data compressed. If so how is the image data aligned in the PNG File [...] read more
I am working on a project which outputs to an odd circuit and need to invert half the byte I am sending. So for example, if I am sending the number 100 as a byte, it comes out in the chip as 01100100, nice and easy. The problem is that [...] read more
I perform ethtool as below and found the speed is 100Mb/S on HP Server. and I want to change it to 1000Mb/s I already tried too change it manually but the eth goes down and returned back only when I adjusted it again to 100 Mb/s So is the issue [...] read more
I am about to program a game which is a pong game and I have to set its graphics but I don't know how, can someone help me with that? I'm using dev c++. Attached is the pong game source codes that I copied from the internet. Bascically this doesn't [...] read more