Categories
Database Development

expected output not comes for the following trigger

USE `test`; DELIMITER $$ DROP TRIGGER IF EXISTS test.new_table_AFTER_INSERT$$ USE `test`$$ CREATE DEFINER=`root`@`localhost` TRIGGER `test`.`new_table_AFTER_INSERT` AFTER INSERT ON `new_table` FOR EACH ROW BEGIN DECLARE vOriginal_query VARCHAR(1024); DECLARE vLAST_LO VARCHAR(15) DEFAULT ‘NONE’; DECLARE vLAST_GL ENUM(‘ON’,’OFF’) DEFAULT ‘OFF’; SET vLAST_LO=@@log_output; SET vLAST_GL=IF(@@general_log=0,’OFF’,’ON’); SET GLOBAL log_output = ‘TABLE’; SET GLOBAL general_log = ‘ON’; SELECT argument INTO vOriginal_query FROM […]

Categories
Mastering Development

regex separator that matches spaces, and the nul space before and after any non Alphanumeric character

For the life of me I can’t seem to figure out how to properly format my regex pattern. I’m trying to write a line of code that splits a string at these two locations: Every space in the string immediately before and after any non alphanumeric character for example if I have the string: “This, […]

Categories
Mastering Development

deploying ruby-rails + react-js on heroku error

I am having trouble deploying an app I made with ruby on rails and react.js on heroku. Has anyone ran into these errors while deploying? I am completely stuck and hopeless remote: Usage: npm <command> remote: remote: where <command> is one of: remote: access, adduser, audit, bin, bugs, c, cache, ci, cit, remote: clean-install, clean-install-test, […]

Categories
Mastering Development System & Network

Migration of password hashes from glftpd 2.01 (PKCS5_PBKDF2_HMAC_SHA1) to proftpd + mod_sql_passwd

For migrating from the de-factor closed source glftpd 2.01 to proftpd I need to migrate password hashes of the user accounts from glftpd to proftpd. Reading about the topic I figured mod_sql_passwd should do the trick. I therefore set up my proftpd server like this: <global> SQLBackend mysql SQLAuthTypes Crypt SQLAuthenticate users groups SQLConnectInfo testdbuser@testdbhost […]

Categories
Mastering Development

Telegram bot _ wants me to replace word driven menu by a button drive menu

have developed a Telegram bot based on Google web app using JavaScript language reading/writing data from/to Google sheets user types: menu bot sends back a word list for the user to select and type; user types a word, bot receives it, interprets and executes respective command works like a charm! an acquaint wants to add […]

Categories
Mastering Development

fairlearn’s ExponentiatedGradient and sklearn’s cross_val_score

I’m trying to use fairlearn‘s ExponentiatedGradient in a scikit-learn pipeline, but I’m getting an error related to cloning. Here’s a minimal code to reproduce the error: import pandas as pd from sklearn.linear_model import LogisticRegression from fairlearn.reductions import ExponentiatedGradient, DemographicParity from sklearn.model_selection import cross_val_score from tempeh.configurations import datasets dataset = datasets[‘lawschool_passbar’]() X, _ = dataset.get_X(format=pd.DataFrame) y, […]

Categories
Mastering Development

TRANSIENT_ERROR for TPU in Google Colab

I’m trying to run a lrcn keras model on TPUs with tensorflow 2.0. The model and generator work on CPU/GPU but I included them for reference. I also initialize the TPU and it is visible and everything looks good except for when I run .fit(): def frame_generator(self, batch_size, train_test, data_type): “””Return a generator that we […]

Categories
Mastering Development

Parsing a text file by a delimiter and outputting multiple files with R

I’m trying to break down my server-log into multiple files so I can run some metrics on them. I have this cronjob that adds a string and a timestamp to my server-log at the first of every month, the string looks like this ‘Monthly Breakpoint, March 1 2020’. The idea is that I can break […]

Categories
Mastering Development

Android: How to save the best score in a game?

I am a beginner programmer and I create a game for android and I came across a problem that I want after finishing the game to show me the best score that I managed to achieve in playing this game I made a condition if(DOD> sharedPreferences.getInt(“DOD_SHA”,0)); of course I use sharedPreferences to save the best […]

Categories
Mastering Development

How to compare values with multiple values from another table in SQL using IN and LIKE operator?

I have a list of values in one table: GenericUserNames test temp trainee 123 Those values need to be compared to values in this table: UserName, FirstName, LastName test123, test, 123 GriffinPeter, Peter, Griffin trainee123, trainee, 123 If the second table contains users with username, first- or last name matching the ones in the first […]