Categories
Mastering Development

How to add using LINQ query in C#

using System; using System.Collections.Generic; using System.Globalization; using System.Linq; using System.Text; using System.Text.RegularExpressions; namespace Assignment_1_Keshav_Thakur_991549498 { class PayrollDatabase { static List<Payroll> Payroll = new List<Payroll> { new Payroll("1", "S3001","32", "10", "01-01-2020"), new Payroll("2", "S3002","23", "20", "02-01-2020"), new Payroll("3", "S3003","20", "30", "03-02-2020"), new Payroll("4", "S3004","40", "40", "04-05-2020"), new Payroll("5", "S3005","25", "50", "07-08-2020"), };//Payroll menu public static void […]

Categories
Arduino Ask Engineering

NodeMcu 1.0 keeps resetting automatically after random time

I want to show some digits in a 3×3 p10 red led panel where the number will come from the cloud and the number keeps updating. For this, I have used esp8266 based Nodemcu. I have used WiFi Manager library and DMD2 library for this and I am requesting the server every 5 seconds to […]

Categories
Mastering Development

Fast way to remove array of specific row values from 2D numpy array

I have a 2D array like this: a = np.array([[25, 83, 18, 71], [75, 7, 0, 85], [25, 83, 18, 71], [25, 83, 18, 71], [75, 48, 8, 43], [ 7, 47, 96, 94], [ 7, 47, 96, 94], [56, 75, 50, 0], [19, 49, 92, 57], [52, 93, 58, 9]]) and I want to […]

Categories
Mastering Development

Select row, in which the value in one column corresponds to more different values in other column

I am trying to select rows from the table, where to one value in column A correspond both options in column C The data is here: A<-c(1,2,3,4,2,5,5,2,7,8) B<-c(100,200,300, 50, 60,30,80,100, 90,1000) C<-c("X", "Y", "Y", "X", "Y", "Y", "X", "X", "Y", "Y") data.frame(A,B,C) And the result should look like this: A B C 2 2 200 […]

Categories
Mastering Development

Turning a dataset into a nested tuple

I have a .txt dataset that I need to convert into a nested tuple. Here’s part of the dataset: Morocco, Rabat, 0.75 million|Algeria: 1000 KM, Tunisia: 400 KM, Western Sahara: 50 KM|North Atlantic Ocean Western Sahara, , 1.51 million|Morocco: 50 KM, Mauritania: 350 KM|North Atlantic Ocean Senegal, Dakar, 0.5 million|Mauritania: 50 KM, Guinea Bissau: 30 […]

Categories
Mastering Development

combining data and putting zeros in non-existent abbreviations in R

How can i combine data in this way? in this dataset forest=structure(list(ADR.N.14.0 = c(8140010250001, 8140010250002, 8140010250005 ), Соста.C.254 = structure(c(3L, 1L, 2L), .Label = c("10WB", "6AS 4WB", "7AS 3WB"), class = "factor"), PLSVYD.N.16.6 = c(3, 2, 36), PRBPOR.C.254 = structure(c(1L, 2L, 1L), .Label = c("AS", "WB"), class = "factor"), NOMYAR.N.16.6 = c(1, 1, 1), KOFPOR1.N.16.6 […]

Categories
User Help

How to print partition list in the order of there presence on disk (Manjaro linux)

Sda is partitioned this way : Note the specific sequence : sda11 > sda6 > sda7 > sda9 > … Want to print the info of partitions in this same sequence and store it in a text file. What I have tried – gdisk -l /dev/sda [manjaro@manjaro-10ahs0wn00 ~]$ sudo gdisk -l /dev/sda GPT fdisk (gdisk) […]

Categories
CMS Mastering Development Wordpress

Update blog option during create new blog?

I have situation where I want to update blog blog options during creation of new blog. I want to update options like, home, default_comment_status, default_ping_status permalinks structure, etc … So I created function: function setup_multisite_action($data){ $blog_id = (int) $data->blog_id; update_blog_option($blog_id, ‘home’, ‘https://test.local’); update_blog_option($blog_id, ‘default_comment_status’, ‘closed’); update_blog_option($blog_id, ‘default_ping_status’, ‘closed’); } add_action( ‘wp_insert_site’, ‘setup_multisite_action’, 50, 1 ); […]

Categories
Mastering Development

Predict model classes only on ROI part in cv2 video frame

Following is my code with ROI rectangle in it. I want to make predictions of my model based on the image captured in the ROI box only and not the whole image import numpy as np import cv2 from keras.models import load_model import keras model = keras.models.load_model(‘Desktop/BCD_nothing_rmsprop.h5’) def sketch_transform(frame): return frame cam_capture = cv2.VideoCapture(0) cv2.destroyAllWindows() […]

Categories
Mastering Development

t test x not enough ‘x’ observations using R with package rstatix

I have the following dataset: structure(list(AgeGroup = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, […]