instruction
stringlengths
0
30k
I am trying to reverse-engineering a device (an 8 bit microcontroller) that comunicates with the PC. Each device has a Serial number of two digits (in decimal) that is used to calculated a checksum. For the same data message the checksum changes. Each message starts with an 0x02 and ends with a 0x03. The checksum is th...
Identify the checksum algorithm
|algorithm|checksum|puzzle|8051|identify|
null
I had the same problem. this happened because of a NVM misconfiguration. follow these steps to fix. - check `node -v` on WSL terminal. command wouldn't work. - check installed node versions by `nvm ls`. see `default -> N/A`? this is the issue. - bind a node version to default by `nvm alias default <node_version>` ...
I have this integral, the semi standard deviation for calculation the Sortino ratio, however I cannot seem to get an analytical solution to this [The mathematical expression of the integral](https://i.stack.imgur.com/8iKoS.png) ``` import sympy as sy c = sy.Symbol('B') x = sy.Symbol('x') a= sy.Symbol('-sy...
|math|sympy|symbolic-integration|
Create one HTML table from multiple arrays
I have ~250 gzipped JSONL files (150mb each) sitting in an S3 bucket that i'm unnesting into a flattened table (Table 1). I'm then using CTAS to write the results into a table WITH format=Parquet (Table 2) so that I'm not unnesting at the query layer. My files in S3 are just subsets of a larger file, they aren't organi...
How to understand partitions vs indexing in AWS Athena?
|amazon-web-services|indexing|amazon-athena|partitioning|
I'm using EAS to build my Expo app, and today I started getting this error when attempting to run an iOS build, either local or on EAS servers. I'm thinking it's an issue with Apple servers, so I'm hoping it gets fixed soon. Output from build command: ``` ✔ Select platform › iOS ✔ Using remote iOS credentials (...
I have been facing a problem for several days, I have not found a solution on the various forums and in the documentation that I have read I need to create a SQL query that allows me to retrieve data from an Excel file. This file has a first column that I always have to retrieve, and 38 others columns which correspo...
I am using wiremock-standalone-3.4.2, trying to emulate a 3rd party that upon a request from me responds with a certain field with UUID value X and sends the same value X to a webhook. The value X needs to change from request to request so it needs to be randomized. I can't seem to find a way to have the emulator retur...
Wiremock webhook and response won't return same random value
|wiremock-standalone|
null
|php|stripe-payments|
I'm using roproxy instead of roblox to get around cord measures, requestbody is username,ctype ,password and useridand for the headers I'm just doing xcrs token:xcrs. It's just returning 403(). Is this an xcrs token thing? Couldn't find anything about it online. Ideally, it would print the incorect password error, o...
|php|laravel|curl|xampp|laravel-11|
I think the first question you should is answer is: > *Am I going to do this myself or am I going to hire somebody to help me?* This choice will, to some extend, determine the other choices you have. If you do hire a professional I would suggest to discuss these things with that person. It can be hard to find someon...
null
You can create your own Widget to do what you need. I created a sample for you: **Result** [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/wHDkg.gif **Explanation** First, I created this code, where the main value is "show text", when the user press the button, the value wil...
In git bash, `/usr/bin/start` is a shell script that invokes `"$COMSPEC" //c start "${@//&/^&}"`. If invoked with a `.txt` file as an argument. You can examine the file itself; it's an 8-line text file. It's specific to git bash under Windows. It's a way to provide the equivalent of the `cmd.exe` `START` command, o...
On iOS, the keyboard does not offer a 6-character SMS code
|javascript|ios|reactjs|react-native|keyboard|
null
I think a demo would be easier than going back and forth: https://github.com/quyentho/submodule-demo You can check my `dist/` folder in the `placeholder-lib` to see if your generated build has similar structure. I have no problem to import like this in my `consumer`: import { Button } from "placeholder-lib/co...
I am setting up a project with `NextJS 14` and `Shadcn UI`. I have just started the project with constructing the menu navgation. https://ui.shadcn.com/docs/installation/next : that is how I set `ShadCn UI`. This is my nav component: ```react.js import * as React from "react"; import Link from "next/link"; im...
null
Clean architecture/OOP and optimization: how to organize for classes with same logic
|java|oop|clean-architecture|
I am using node server for the backend. Connection to Cassandra is done using cassandra-driver nodejs. Connection is done as follows: const client = new cassandra.Client({ contactPoints: ['h1', 'h2'], localDataCenter: 'datacenter1', keyspace: 'ks1' }); 1. In contactPoints, do I j...
I use docker compose with very basic node image configuration. I can use `npm install` after the container build. But I want to do so during it and the volumes I've bound in docker-compose.yaml seems not to work then, only after the build. Is it right behavior? If yes then should I just COPY package.json file during...
|r|
null
To me it looks like you are not waiting for every single character to be sent out. You are just updating the uartData on every clock cycle without checking the uartRdy signal. So I assume the TX_SEND_WAIT state you commented out would be actually what you need. In that state (or create a second one) you just have to...
```plugins { id("com.android.application") id("org.jetbrains.kotlin.android") id("com.google.devtools.ksp") id("com.google.dagger.hilt.android") version "2.49" apply false } android { namespace = "com.example.notesapp" compileSdk = 34 defaultConfig { multiDexEnabled =...
*Bar chart* panel expects data in format |Categories|Column1|Column2| |--|--|--| |Category1|value|value| |Category2|value|value| |Category3|value|value| Your initial query is just fine in terms of providing needed data. But it requires some massaging to put it into expected format. First, to leave only lat...
|python|http-post|fastapi|pydantic|http-status-code-422|
``` TITLE —— 1 nuit 1 nuit 1 nuit 1 nuit 1 nuit total : 5 nuits —— 1 nuit 1 nuit 1 nuit total : 3 nuits —— 1 nuit 1 nuit 1 nuit 1 nuit 1 nuit 1 nuit ``` and so on ... I'm having this paragraph in which I'd like to select the last lines after the occurrence of the last `——`. It should ...
Select all lines after last occurrence of a certain character
so I am new to Rust but recently came across a problem I don't know how to solve. It's to work with nested (and multi-dimensional) value-key pair arrays in Rust that is dynamically generated based on string splitting. The sample dataset looks something like the example below: Species | Category Dog ...
ValueError: Kernel shape must have the same length as input, but received kernel of shape (3, 3, 1, 32) and input of shape (None, None, 48, 48, 1). from keras.models import load_model from tensorflow.keras.utils import img_to_array from keras.preprocessing import image import cv2 import numpy...
Thanks for your feedback. I changed my message. Cheers.
null
I am taking a look a the speech to text API and I had some questions: 1. What is the difference between v1 and v1p1? 2. Does the chirp model in stt v2 support transcribing audio from a streaming input?
I'm using roproxy instead of roblox to get around cord measures, requestbody is username,ctype ,password and useridand for the headers I'm just doing xcrs token:xcrs. It's just returning 403(). Is this an xcrs token thing? Couldn't find anything about it online. Ideally, it would print the incorect password error, o...
I'm using roproxy instead of roblox to get around cord measures, requestbody is username,ctype ,password and useridand for the headers I'm just doing xcrs token:xcrs. It's just returning 403(). Is this an xcrs token thing? Couldn't find anything about it online. Ideally, it would print the incorect password error, o...
I think you should use state for the list of words. ```js import wordsArray from "./components/wordsArray"; export default function App() { const [word, setWord] = useState(getRandomWord()); const [wordlist, setWordlist] = useState(wordsArray); const getRandomWord = () => { return wordlist[Math.flo...
I am trying to reverse-engineering a device (an 8 bit microcontroller) that comunicates with the PC. Each device has a Serial number of two digits (in decimal) that is used to calculated a checksum. For the same data message the checksum changes. Each message starts with an 0x02 and ends with a 0x03. The checksum is th...
Your container's ID contains a space and they're illegal. <div id="Sign-In TempUI" Get rid of it. Also... document.addEventListener('DOMContentLoaded', Why are you in such a hurry? Use LOAD... document.addEventListener('load', The only time one would need to listen to *DOMContentLo...
{"Voters":[{"Id":1563833,"DisplayName":"Wyck"}],"DeleteType":1}
I am trying to reverse-engineering a device (an 8 bit microcontroller) that comunicates with the PC. Each device has a Serial number of two digits (in decimal) that is used to calculated a checksum. For the same data message the checksum changes. Each message starts with an 0x02 and ends with a 0x03. The checksum is th...
Why docker-compose volume binding doesn't work during build? Should I always COPY necessary for build files?
|docker|npm|docker-compose|docker-volume|docker-build|
null
I have the following query in mysql, ``` SELECT COALESCE(sum(COALESCE(amount, 0)), 0) as sum_amount, COALESCE(sum(COALESCE(fees_amount, 0)), 0) as sum_fees_amount FROM incoming_operation WHERE status = 'CLEARED' and merchant_id = ? and shop_id IN (?) and currency = ? and cycle_id is null FOR...
mysql query takes too long because if wrong indexes usage
|mysql|
I'm migrating Spring 5.2./Spring Security 5.8 backend to Spring 6.1/Spring Security 6.2 together with ditching spring-security-oauth2 and adding spring-security-oauth2-authorization-server and it looks a bit complicated. First of all, current architecture: 1. Users are mobile apps that authenticates/authorises u...
null
I was wondering how can you do a crazy hard gpu stress test using only HTML I tried a stress test by getting my device to make 510K random points using complex math but that did not really work... But I do thing that photon mapping would be the best option.
How can you do a heavy gpu test only using HTML? Like a real hard stress test for your device?
|html|
null
Есть задание никак не нет возможности связаться с заказчиком. задание такое: "Нужно скачать через браузер или программу страницу https://nameOfTheSide(имя сайта убрал на всякий случай) и в сохраненной копии поменять часть этой страницы под логотипом, начиная с элемента с классом “collection-title” по дизайну из фигмы...
Comprehension in order
|javascript|html|css|
You forgot the `return` statement ``` { title: 'Tags', key: 'tags', dataIndex: 'tags', render: (_,{tags})=>{ return <> {tags.map((tag)=>{ return( <Tag key={tag}>{tag}</Tag>...
Explain the below problem: ``` main() { static char s[25]="vector"; int i=0; char ch; ch=s[++i]; printf("%c", ch); ch=s[i++]; printf("%c", ch); ch=i++[s]; printf("%c", ch); ch=++i[s]; printf("%c", ch); } ``` OUTPUT :: eecu I'm trying to figure out how the word 'eec' came to be, ...
I'm trying to solve a non-linear equation with nleqslv, and I know a priori if I want a positive or negative solution (it's a dataset on choice under risk, and I'm trying to compute the risk aversion coefficient for each individual under CRRA assumption. Since I can observe the DMs' choices, I already know if each DM i...
Is there a way to force nleqslv to find positive solutions?
|r|
null
So when checking for duplicates in an array (that's what I think the algorithm is for; correct me if I'm wrong), you want to check each element against each other element once. Let's have a 2D array `pairs` of all possible pairs of elements you can check. For an array with 4 elements, the 2D array would look like th...
I've set up my \_app.js and store.js in what seems to be the expected format. This is my first attempt as using both so if I'm missing something obvious, please let me know. store.js: ``` import { configureStore } from '@reduxjs/toolkit'; import { createWrapper } from 'next-redux-wrapper'; import authReducer f...
One regular expression is: function replaceFraction(str) str = string.gsub(str, "(%S+)/(%S+)", "\\frac{%1}{%2}") return str end Examples: print(replaceFraction("Hello a/b hi")) -- Hello \frac{a}{b} hi print(replaceFraction("a/b hi")) -- \frac{a}{b} hi print(replaceFraction("H...
I'm trying to have an element project a shadow / blurred edge onto an element behind it, causing the latter to "dissolve", without impacting the background. Hopefully the following images can better illustrate my problem. This is what I was able to get: ![Shadow clearly stands out from the background](https://i.sta...
I am trying to reverse-engineering a device (an 8 bit microcontroller) that comunicates with the PC. Each microcontroller has a Serial number of two digits (in decimal) that is used to calculated a checksum. For the same data message the checksum changes. Each message starts with an 0x02 and ends with a 0x03. The check...
I make it work executing the init_async function and using asynccontextmanager form fast api: import py_eureka_client.eureka_client as eureka_client from fastapi import FastAPI from contextlib import asynccontextmanager from landus.controladores import controladorRouter @asynccont...
I have no issue with ANSI color codes and how they work but I have no idea how to exactly color the entire background with such color. I want to make it so that the entire background of the console changes to the ANSI color code. Is there a way I can do this? The answer does not have to be the same on all platforms ...
Is there a way I can color the entire console (like setting the background color) using ANSI color codes?
|c#|
I am trying to reverse-engineering a device (an 8 bit microcontroller) that comunicates with the PC. Each microcontroller has a Serial number of two digits (in decimal) that is used to calculated a checksum. For the same data message the checksum changes from device to device. Each message starts with an 0x02 and ends ...
I’m working with a quadruped robot to learn locomotion behavior with DRL using Ros2 and Drake in c++, and I want to apply domain randomization in my learning. I would like some advice from the community to How I can change the physical properties of the robot (like mass, inertia, joint friction) and plane properties...
How to change the physical properties of the robot and plane to apply Domain Randomization ?- Drake
|drake|
null
|stripe-payments|checkout|
I'm using roproxy instead of roblox to get around cord measures, requestbody is username,ctype ,password and useridand for the headers I'm just doing xcrs token:xcrs. It's just returning 403(). Is this an xcrs token thing? Couldn't find anything about it online. Ideally, it would print the incorect password error, o...
I'm getting the error "'RNAppAuthAuthorizationFlowManager.h' file not found" on AppDelegate.h every time I build my app after migrating from react-native 0.61.5 to 0.69.12. AppDelegate.h: ``` #import <React/RCTBridgeDelegate.h> #import <UIKit/UIKit.h> #import <React/RCTLinkingManager.h> #import <AppAuth/AppAu...
'RNAppAuthAuthorizationFlowManager.h' file not found
|ios|xcode|react-native|appdelegate|appauth|
null
I want the date and time to be formatted based on the criteria(below objects) for each datetime component. And the separators between them should be taken based on locale. Is there way to achieve this in java { year: numeric, month: long, day: two-digit, weekday: short } { year: numeric, month: ...
|java|datetime|localization|date-formatting|
the error is as follows: C:\Users\user\Desktop\attachment_perfomance_munashe-main\attachment_perfomance_munashe-main>composer update Loading composer repositories with package information Updating dependencies Your requirements could not be resolved to an installable set of packages. Problem 1 - laravel...