Categories
CMS Mastering Development Wordpress

How to capture hidden values with Gravity Forms

I will be using the following code from ActiveProspects and what it do is basically pass some hidden values (in this case basically a dynamic url) to the server along with the form fields which we need to capture and store in our DB. Now I am using Gravity Forms with my WordPress site but […]

Categories
Linux Mastering Development Ubuntu

Wallpaper setting

Everytime I try to set a new wallpaper on my desktop, it appears zoomed and loses clarity. How do I fix this so that it’s just its normal size and retains clarity? I’m using Ubuntu 20.04

Categories
Apple User Help

File System Update Delay

I regularly move/copy/remove files from the terminal using mv/cp/rm shell commands. With Catalina (10.15.5), file system updates are not reflected in the Finder windows until several minutes later. That is, I can rm a file and it will still show up in the corresponding Finder window for at least several minutes. How should I go […]

Categories
Cryptocurrency Ethereum Mastering Development

Weird error during buy tokens with eth on ropsten and other testnets

I get this error when executing swap token for ether on arb detection. Error Message: execution reverted (uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves(); at getReserves() at Opcode: [STATICCALL] in 0xbc03cf2c6443d9bb25c8fd9b701d9eb22f85f584 Opcode: [CALL] in 0xbc03cf2c6443d9bb25c8fd9b701d9eb22f85f584 In nodejs, the error response is: err…Error: Transaction has been reverted by the EVM: { "blockHash": "0x1c668xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", "blockNumber": 8143875, […]

Categories
Linux Mastering Development

firewall-cmd (ModuleNotFoundError: No module named ‘six’)

I’m try to open port using firewall-cmd but I get error ModuleNotFoundError: No module named ‘six’. I’m try to reinstall six using easy_install, pip, pip3 and pip3.6 but it not work. os: centos 8 python: 3.6.8 pip 20.1.1

Categories
Mastering Development

How to Design an Oblique Progress Bar with CSS?

I am making progress bar with CSS. I want to make the end of the section inside the bar oblique. How can I do as pictured? .progress-bar{ height: 34px; background: #0C0C0C; display: flex; flex: 1 auto; width: 100%; position: relative; } .progress-bar div{ width: 69%; background: #1EA614; height: 100%; } .progress-bar div span{ position: absolute; […]

Categories
Mastering Development

How does this if statement determine whether num%2 is true or false

Okay, so here is a piece of code. The function of the code is to take a value and determine whether or not it is odd or even. def isEvenOrOdd(num): return ‘odd’ if num % 2 else ‘even’ Now my question lies in why this works. The way I am currently looking at this, is […]

Categories
Mastering Development

Incorrect counting of number of lines

#include <stdio.h> int main() { int c, nl; while ((c = getchar()) != EOF) { if ( c == ‘\n’) { nl++; printf("\n%d", nl); } } return 0; } Input : asdsndjkasndasjldk asdsndjkasndasjldk asdsndjkasndasjldk asdsndjkasndasjldk asdsndjkasndasjldk Output : 4 The code counts the number of input lines, however, when I compile and run the code […]

Categories
Mastering Development

Java8 streams : Creating a new object and adding it to list while iterating over another list

I have two lists as follow List<String> color = new ArrayList<>(); color.add("red"); color.add("white"); color.add("pink"); List<Specification> specList = new ArrayList<>(); Specification soundSystem = new Specification("MusicSysten", "harman Kardon"); Specification price = new Specification("Price", "50000"); specList.add(soundSystem); specList.add(price); I want to create a new instance of specification object for each color item and add that to the specList. I […]

Categories
Mastering Development

How to use react-router to PROMPT user leaving page with a half filled form in React JS

import React from "react"; import { Formik } from "formik"; import * as Yup from "yup"; import { Button } from ‘react-bootstrap’; import { Prompt } from ‘react-router’; const validationSchema = Yup.object({ name: Yup.string().required("Product Name is required"), quantity: Yup.number().required("Quantity is required"), price: Yup.number().required("Price is required"), manufacturer:Yup.string().required("Manufacturer details required"), description:Yup.string().required("Descriptopn Needed") }); export default class ProductForm […]