Categories
Cryptocurrency Ethereum Mastering Development

Understanding gas tokens and create2

I am going through a sample gas token code on Ethereum. The token mints some dummy smart contracts using CREATE2 and then calculates the address later on destroys them to get gas refund. Minting part looks like this assembly { mstore(0, 0x746d4946c0e9F43F4Dee607b0eF1fA1c3318585733ff6000526015600bf30000) for {let i := div(value, 32)} i {i := sub(i, 1)} { pop(create2(0, […]

Categories
Linux Mastering Development

ssh session freezing when connecting via router

My ssh sessions to my virtual machines keep freezing/dropping/locking up. I never had any problems with any of my other machines, which I ssh to/from regularly. I am only having probems when sshing to this VM, and only when I ssh via a router. This is to say that – If I connect from the […]

Categories
Mastering Development

How to redirect the customer to the success page after Payment from Stripe?

I am using Stripe to handle my payments for my own rental website. (Backend – DJANGO) Previously, I was using Stripe ChargesAPI and was manually sending out payouts to the Host of the property but I came to know that it can be automated by using Stripe PaymentIntentsAPI. I have successfully managed to onboard my […]

Categories
Mastering Development

Storing the last value of a file from SD card using arduino

I am making a device that moves back and fourth and needs to store its last position so that upon power up, the last stored value can be grabbed from the last line of the file on an SD card, and it can resume operation. This file will then be destroyed and re-written. For this […]

Categories
Mastering Development

typescript .d.ts file not recognized by typescript but vsc

Update: it isnt a typescript, but ts-node "issue" i answered to myself so if ure still interested in the "issue" – read further 🙂 sorry for the confusion maybe I have a TOTALLY wrong idea of the index.d.ts file.. but my idea was, that i can declare types within it and they are then "globally […]

Categories
Mastering Development

How to specify foreign relations with Embedded Entity

I’ve a student table and an embedded type address. Student Schema +—-+——+————+ | id | name | address_id | +—-+——+————+ | 1 | John | 1 | | 2 | Jane | 2 | +—-+——+————+ Address Schema +—-+——————+ | id | addressLine | +—-+——————+ | 1 | 123 Acme Street | | 2 | 456 […]

Categories
Mastering Development

Kotlin smart-cast assumes too much?

I was reading here: https://kotlinlang.org/docs/reference/typecasts.html#type-erasure-and-generic-type-checks When I came upon this: fun handleStrings(list: List<String>) { if (list is ArrayList) { // `list` is smart-cast to `ArrayList<String>` } } And I had a nagging feeling that the smart-cast might be assuming too much about the generic parameter that it’s casting too. AKA, how does it know that […]

Categories
Mastering Development

how to solve the error Must Declare the Scalar Variable

I have encountered an error in vb.net. It shows Must declare the scalar variable "@FieldDeg". I can only insert data into the database by using the insertSql but not insertSql2 because it keeps showing the error at the FieldDeg, can anyone help with this codes. Thanks alot. Here is my codes. Imports System.Data.SqlClient Public Class […]

Categories
Mastering Development

Python/Pyspark : Remove postalcode from the address column

I have a column which has the addresses like below – Address 5 HARBOURplace st. HARBOURFRONT T 98899 PULAV AYTR CHAIWAN 98644 4500 BAYTOWN DRIVE, ROOM 2466 77555 77210 22567 SPRINGlane VILLAGE drive 77355-1445 PO BOX 2422 F2K 6L2 FERKERN 30 4044 ATTN : PALACE SHIP 7654 I want to separate postalcode out of it […]

Categories
Mastering Development

heatmaply + flexdashboard = Error in validateCssUnit(sizeInfo$width) : CSS units must be a single-element numeric or character vector

— title: heatmaply and flexdashboard don’t mix… output: flexdashboard::flex_dashboard — ### Chart 1 “`{r} library(heatmaply) heatmaply(mtcars) I saw this question (2018): R shiny error: Error in html tools::validateCssUnit(height); CSS units must be a single-element numeric or character vector presumably they are related… Heatmaply is version: 1.1.1 flexdashboard is version: 0.5.2