aws – How MySQL keyring_aws plugin stores the master key securely?

From MySQL internal doc, I am presuming that keys of keyring_aws are stored locally after generation. All the mandatory information like master key needed to decrypt table is configured locally using variable named ‘keyring_aws_cmk_id’.

If Intruder gets disk access then he/she get access to Mysql data directory and the master key stored in mysql conf file. Could be of great help if anyone could share some insights on security.

How to add 1 question in Google Forms which takes multiple inputs from the user and stores in a single column in Google sheets

Hello, I am struggling to create a custom question in Google forms which can ask the user for Multiple inputs or Short texts.

For example If I ask a question to a shopkeeper: “Name all the vegetables you keep in your stall?”.. The shopkeeper should be able to add multiple vegetable names in same question..

Secondly the responses should be listed one below the other in single column in Google sheets

I dont have much coding knowledge in Apps script Editor but can I make use of an automatic transpose Function here ?

open source – Is it possible to build an Android conformant calendar app which stores its data as shareable file?

Or is there already one?

I don’t know Androids calendar infrastructure so maybe my question sounds a bit fuzzy.

I dislike (non self hosted) cloud services but I like the ability to share my calendar among devices (and even people). Since I’m not alone I wonder whether someone already built a calendar app which stores it’s data (encrypted) in a way which can be shared via Syncthing, Sparkleshare, Dropbox, …
This app would have to ‘monitor’ changes on this file in order to update itself, notify the user about changes and not overwrite changes ‘from outside’.

So my question is actually two questions: is (are) there such apps already (and how are they called, so I can search myself) or is this possible in the first place (or why not?).

sql server – How to trim the log file that stores information about job history execution?

I was having a look at my sql server jobs and proxies on an specific server in the production environment.

I pretty much have an script to check the status of the jobs but in case I have to troubleshoot why a job failed on this particular server it has been using the following settings:

  • log to table
  • append output to existing entry in table
  • include step output in history

But no file has been specified, so when I click on View to check that has been going on, I get and out of memory exception, as the table is too big.

enter image description here

the way I find out the size of this log file (which I am not sure where is stored):

    use msdb 
    go
    
    declare @job_id    UNIQUEIDENTIFIER 
           ,@job_name  sysname   
    
    select @job_name= N'DBA - my job name'
    
    exec sp_help_jobsteplog @job_name=@job_name

there is basically one for each step in the job as you can see on the picture below:

enter image description here

===================================

Exception of type ‘System.OutOfMemoryException’ was thrown. (Microsoft.SqlServer.Smo)


Program Location:

at Microsoft.SqlServer.Management.Smo.Agent.JobStep.EnumLogs()
at Microsoft.SqlServer.Management.SqlManagerUI.JobStepAdvancedLogging.ReadStepLogToFile(JobStep step)
at Microsoft.SqlServer.Management.SqlManagerUI.JobStepAdvancedLogging.viewTableLog_Click(Object sender, EventArgs e)

TITLE: Microsoft SQL Server Management Studio

Exception of type ‘System.OutOfMemoryException’ was thrown. (Microsoft.SqlServer.Smo)


BUTTONS:

OK

My question would be:

How do I trim this log file ?

I know I could simply set the long to an external text file, but that would only be my second option.

Looking for feedback on a simple maven/gradle project that stores and installs git hooks from a cloned git repo

I wanted to experiment with a way to keep git hooks in source control with the code. So if we want to do code style checks, and other things, we could have all of that with the code that it will be applied to. Also, these things work best if they are transparent to the developer. We can do some things on the server side, but some things make more sense, at least to me, when done on the client side. So this is my attempt to make that happen. I completely realize that there are lots of other ways to do these things, but this might be helpful in certain situations. I would like to get some feedback from anyone who is interested in checking this out. This is a very minimal example that shows a way to store a script to run for a pre-commit hook, and how to get it set up in someone’s cloned git repo directory.

https://github.com/Steve973/maven-automatic-git-hook

Since I have to attach some code, here is some of the main bash script that I call from either build tool to link the script into the hooks:

#!/usr/bin/env bash
PROJECT_BASE_DIR=${1}
PRE_COMMIT_FILE="${PROJECT_BASE_DIR}/.git/hooks/pre-commit"
PRE_COMMIT_HOOK_SCRIPT="${PROJECT_BASE_DIR}/project-resources/git/hooks/pre-commit.sh"

# Ensure that the project-resources git pre-commit hook script is executable
if [ ! -x "${PRE_COMMIT_HOOK_SCRIPT}" ] ; then
  chmod +x "${PRE_COMMIT_HOOK_SCRIPT}"
  if [ ! -x "${PRE_COMMIT_HOOK_SCRIPT}" ] ; then
    exit 1
  fi
fi

# Install the project-resources git pre-commit hook as a symlink in the git hooks directory
if [ ! -L "${PRE_COMMIT_FILE}" ] ; then
  ln -sfn "${PRE_COMMIT_HOOK_SCRIPT}" "${PRE_COMMIT_FILE}"
  if [ ! -L "${PRE_COMMIT_FILE}" ] ; then
    exit 2
  fi
fi

Then I use maven and gradle to call this script. So anytime a developer clones the repo and first builds the project, the hooks are set up.

How can I find which table belongs to which two users in a MySQL database that stores user messages?

I’m building a chat application in which I want to store user messages in a MySQL database. I have came up with the solution of creating a seperate database for messages and creating tables for each conversation between users. One example table would look like this:

+-----------------+-----------------+------+-----+---------+----------------+
| Field           | Type            | Null | Key | Default | Extra          |
+-----------------+-----------------+------+-----+---------+----------------+
| message_count   | bigint unsigned | NO   | PRI | NULL    | auto_increment |
| message_content | varchar(2000)   | YES  |     | NULL    |                |
| sent_by         | varchar(32)     | YES  |     | NULL    |                |
| sent_at         | datetime        | YES  |     | NULL    |                |
+-----------------+-----------------+------+-----+---------+----------------+

But how would I be able to figure out which table should I load for a given two users? I could store the usernames of both participants of the chat room in a column named “participants” seperated by a whitespace and use a query that looks like SELECT FROM chats WHERE participants LIKE username, but that does not sound like a healthy solution at all.

A simple console in Rust that stores variables runs commands

I’m a C/C++ programmer and this is my first Rust program. A heavy simplification of the console system like used in Quake and Source engine games, that lets you set variables and run commands.

I’m aware the parsing algorithm is bad, it’s just supposed to be simple. I want to know how I can improve this code to make it less ugly or more idiomatic Rust. I think I’m still writing with a leftover C++ mindset and Rust does not like that. Even for something this simple I had to fight the compiler (see the comment // can't print immediately because of borrowing rules) over wanting to print a console message in the middle of a console function. (I didn’t want to duplicate the code in the message function, that’d be ugly and wouldn’t work in a console with a more complex message function.)

Usually in my C++ programs I have Console as just a global state namespace, not an object, but that seems like a bad idea to even try in Rust. However with Console as an object, ConCommand callbacks aren’t able to use the message method because they have no handle to Console. Every part of a large game would need a handle to Console just for debug messages. I’d also like an easier way of registering newly-created variables/commands with the Console. Is there something better I can do on that front as well?

console.rs:

pub struct ConVar {
    pub name: String,
    pub value: String,
}

pub struct ConCommand {
    pub name: String,
    pub callback: fn(args: &(String))
}

pub struct Console {
    // line history, for rendering if used in a gui program, or a dump lines to file command
    pub history: Vec<String>,
    pub commands: Vec<ConCommand>,
    pub variables: Vec<ConVar>
}

impl Console {
    pub fn new() -> Console {
        Console {
            history: Vec::new(),
            commands: Vec::new(),
            variables: Vec::new()
        }
    }

    pub fn print(&mut self, msg: String) {
        println!("CONSOLE: {}", msg);
        self.history.push(msg);
    }

    pub fn execute(&mut self, args: &(String)) {
        if args.is_empty() {
            return;
        }

        let mut msg = String::new();
        for i in self.variables.iter_mut() {
            if i.name == args(0) {
                if args.len() > 1 {
                    i.value = args(1).clone();
                    return;
                } else {
                    // can't print immediately because of borrowing rules
                    msg = format!(""{}" is "{}"", i.name, i.value);
                    break;
                }
            }
        }
        if !msg.is_empty() {
            self.print(msg);
            return;
        }

        for i in self.commands.iter_mut() {
            if i.name == args(0) {
                (i.callback)(args);
                return;
            }
        }

        self.print(format!("Unknown command "{}"", args(0)));
    }

    pub fn parse(&mut self, str: String) {
        if str.is_empty() {
            return;
        }

        let mut args: Vec<String> = Vec::new();
        for c in str.chars() {
            match c {
                'n' => { continue; }
                'r' => { continue; }
                ' ' => {
                    if args.len() > 0 {
                        args.push(String::from(""));
                    }
                }
                _ => {
                    let index = args.len();
                    if index > 0 {
                        if let Some(s) = args.get_mut(index - 1) {
                            s.push(c);
                        } else {
                            args.push(String::from(c));
                        }
                    } else {
                        args.push(String::from(c));
                    }
                }
            }
        }

        args.retain(|s| { !(s.is_empty()) });
        if args.len() == 0 {
            return;
        }

        self.execute(args.as_slice());
    }
}

main.rs:

mod console;

use console::*;
use std::io::Write;

fn echo(args: &(String)) {
    if args.len() < 2 {
        println!("Usage: echo <message>");
        return;
    }
    println!("{}", args(1));
}

fn main() {
    let mut con = Console::new();

    let cvar = ConVar {
        name: "testvar".to_owned(),
        value: "default".to_owned(),
    };
    con.variables.push(cvar);

    let cmd = ConCommand {
        name: "echo".to_owned(),
        callback: echo,
    };
    con.commands.push(cmd);

    loop {
        print!(">");
        std::io::stdout().flush().unwrap(); // show the prompt
        let mut line = String::new();
        match std::io::stdin().read_line(&mut line) {
            Ok(_) => con.parse(line),
            Err(e) => println!("Err: {}", e)
        }
    }
}

i need help in linking my expandcart store’s sitemap to google search console

Everytime i try to auto crawl a sitemap from
the store it gives me an error, then i added the sitemap link and it also gives me a HTML ERROR, so i need some help as according to expandcart SUPPORT team there is no problem from their side.
and as expandcart is cloud based they don’t have access to robot.txt

this is the link to my sitemap

egysouq.store/index.php?route=feed/google_sitemap and my robots.txt file which cannot be changed due to expandcart using cloud based hosting, egysouq.store/robots.txt
enter image description hereenter image description hereenter image description here

Can online bussinesses such dropshipping affect offline stores ?

Recently marketing and businesses have gone global .
People now have online stores through which they sell their products without physical contact with the buyer.
People now prefer to buy online because it is easier and sometimes fast though may be expenses compared when bought from offline stores.
Do you see the probability of offline stores going into distinction because of online stores