Send Email on new sql agent job

What would be the least intrusive method to add an email notification to the DBA team when a new sql agent job is added to production? Would a trigger on MSDB database on insert be the way to go? Curious as if anyone has setup any type of notification like this before.

wpf – Prism EventAggregator. Receive the event and send it again

In my project I have three ViewModels (for example, ViewModelA, ViewModelB and ViewModelC).
I need to write the following logic.
The ViewModelA sends the value to ViewModelB using the EventAggregator from Prism.
The ViewModelB receives the value and sends it to ViewModelC.
The ViewModelC receives the value and doing something.

Here is the code:

// The data that will be send using the event aggregator.
class EventData : PubSubEvent<int>
{ 
}

class ViewModelA
{
    IEventAggregator m_eventAggregator;

    public ViewModelA(IEventAggregator eventAggregator)
    {
        m_eventAggregator = eventAggregator;

        // Publish some value.
        eventAggregator.GetEvent<EventData>().Publish(10);
    }
}

class ViewModelB
{
    IEventAggregator m_eventAggregator;

    public ViewModelB(IEventAggregator eventAggregator)
    {
        m_eventAggregator = eventAggregator;

        // Publish some value.
        eventAggregator.GetEvent<EventData>().Subscribe(OnDataReceived);
    }

    void OnDataReceived(int value)
    {
        // Here I want to send the value to the ViewModelC. How can I do it?
    }
}

PS: it is the part of the big project. So don’t please suggest sending from ViewModelA to ViewModelC directly, without the ViewModelB.

macos – Send keys to app in background / send keys to other app without losing focus of current app

How can I make some automated service type something in a non-focussed application without making that other application the frontmost?

I found a StackOverflow answer which suggests using AppleScript:

tell application "System Events"
    tell process "Google Chrome"
        set frontmost to true
        key code 4
        key code 14
        key code 37
        key code 35
    end tell
end tell

Unfortunately at the time of that answer in 2018 there were apparently no ways to make this AppleScript and its target application run in the background.

How can I simulate keyboard input to a background application on macOS Catalina 10.15.5?

Lightning LND gRPC send direct payment returns invalid_key_length error

I’m trying to send a direct payment on testnet from my node A to my node B. Both have only channels with public nodes, not between themselves, so that a route contains multiple hops.

I followed the Bidirectional-streaming RPC example from https://dev.lightning.community/guides/javascript-grpc/

//var dest_pubkey = <RECEIVER_ID_PUBKEY>;
var dest_pubkey = '033d4933c29885ab84cc5eacbcf3cd3bc87d3c36b36e81d9b09a0691946dfa3493';

var dest_pubkey_bytes = ByteBuffer.fromHex(dest_pubkey);

var call = lightning.sendPayment();
call.on('data', function(payment) {
  console.log("Payment sent:");
  console.log(payment);
});

call.write({ dest: dest_pubkey_bytes, amt: 11 });

I get the response

Payment sent:
{
  payment_error: 'invalid key length',
  payment_preimage: <Buffer >,
  payment_route: null,
  payment_hash: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
}

from which I get the impression that I am providing the wrong pub key. Is my nodes’ public identifier the pubkey which can be obtained by the identity_pubkey property from getinfo command?

When I use a Buffer instead of ByteBuffer:

var dest_pubkey_bytes = Buffer.from(dest_pubkey, 'hex');

instead of

var dest_pubkey_bytes = ByteBuffer.fromHex(dest_pubkey);

I don’t get the invalid_key_length error but an incorrect_payment_details error:

Payment sent:
{
  payment_error: 'incorrect_payment_details',
  payment_preimage: <Buffer >,
  payment_route: null,
  payment_hash: <Buffer 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
}

from which I get the impression that I need provide other data in the request besides dest and amt. Do I need to add something more to the request? e.g. a keysend flag or something similar to lncli sendpayment —keysend

sending direct payment via cli works:

tlncli2 sendpayment --keysend --dest 033d4933c29885ab84cc5eacbcf3cd3bc87d3c36b36e81d9b09a0691946dfa3493 --amt 11

response:

Amount + fee:   11 + 2.001 sat
Payment hash:   644beaa4aafbaa2c1c4bace2735c038446bfdaae6942e4900f511f1a0fbec1b1
Payment status: SUCCEEDED, preimage: 92a304c1c5b47afe887faf3e0e137d618c014a9d27edd6897b49411121c5d2e9

My nodes have version

lnd version 0.10.0-beta commit=v0.10.0-beta

How to send notifications from php server side to Visual Basic client side like android

Is it possible to send a notification from php server side to Visual Basic or do I have to synchronize the server side database with the local database every x minutes to check for any changes?

<?php
require("connection.php");
include 'send_notification.php';
if (!$conn) {
    $response("response") = false;
    $response("log") = mysqli_error($conn);
    $response("exception") = 1;
    echo json_encode($response);
} else {
    $pricing = json_decode($_POST('pricing'), true);
    $user = json_decode($_POST('user'), true);

    // Here update database....

    $company_token = getCompanyToken($user("id")); // Find company token from MySql database to send FCM to Android Client


    sendNotification($company_token); // Send Notification To Android...It works fine..

    // Same notification to Visual Basic Windows Client...
    // Help!! Synchronize local database with the server or is there any other way?


    }
    mysqli_close($conn);
    }
?>

How to find what is suitable transaction fee to send 10 mBTC?

Using MultiBit Desktop Wallet, I can see that the default transaction fee is set to 0.5 mBTC per KB.

Usually that default rate worked fine. But yesterday, when I tried that and my transaction has not been confirmed for over 12 hours now.

So today I increased the fee to 1mBTC per KB and tried to send another 10mBTC to the same destination wallet. It is half an hour now and it has not confirmed either.

It is really frustrating. I’m wondering what is wrong here, and how can I choose a fee that make near instant transaction possible.

CSF not send email notifications

Registration at Web Hosting Talk is completely free and takes only a few seconds. By registering you’ll gain:

– Full Posting Privileges.

– Access to Private Messaging.

– Optional Email Notification.

– Ability to Fully Participate.

– And Much More.

Register Now, or check out the Site Tour and find out everything Web Hosting Talk has to offer.

gnupg – Encrypt backup files and send them to AWS S3

I know it’s not specifically your question, but S3 has an inbuilt ability to encrypt/decrypt already, and it’s probably a better solution.

Here’s how it works, when you upload the data to S3, you specify a kms key to encrypt the data. Ensure your IAM role assigned to your ubuntu machine must have the right permissions to do upload and encryt, namely kms:Encrypt.

Then for downloading and decrypting this data, ensure that the downloading machine has the right IAM role with the right permission to decrypt it, namely kms:Decrypt.

This ensures that data is viewable only to the party that has the right permission (AWS Credentials) to both download & decrypt the file — without the need for client-side encryption that can get both messy and insecure.

nginx – WebServer: Send file that is still being written

I have a long-running process that creates large files for a web application that are stored in the file system.

Is there a way to deliver the download of this file via the web server (currently nginx) without ending the download if the file created up to that point has been downloaded and then waiting for the file to be created further?

At the moment there is always a wait until the file is complete, but therefore the download starts much later.

Kind Regards

ssl – unable to send email via apache james smtp server

I have setup Apache James server at xxx.xom domain and i am able to receiver message from outer domains like ###@yahoo.com .

bit when trying to send email from xx.com to ##@yahoo.com i am getting :

on thunder bird client :
550 5.1.1 Unknown user

on server —

javax.net.ssl.SSLHandshakeException: Client requested protocol SSLv3 not enabled
INFO 08:19:43,676 | org.apache.james.protocols.netty.BasicChannelUpstreamHandler | Connection established from 18.204.244.186
INFO 08:19:46,127 | org.apache.james.protocols.netty.BasicChannelUpstreamHandler | Connection closed for 18.204.244.186
INFO 08:19:46,736 | org.apache.james.protocols.netty.BasicChannelUpstreamHandler | Connection established from 18.204.244.186
ERROR 08:19:48,357 | org.apache.james.protocols.netty.BasicChannelUpstreamHandler | Unable to process request
javax.net.ssl.SSLHandshakeException: Client requested protocol SSLv3 not enabled or not supported
at sun.security.ssl.Handshaker.checkThrown(Handshaker.java:1521)
at sun.security.ssl.SSLEngineImpl.checkTaskThrown(SSLEngineImpl.java:528)
at sun.security.ssl.SSLEngineImpl.readNetRecord(SSLEngineImpl.java:802)
at sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:766)
at javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:624)
at org.jboss.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1219)
at org.jboss.netty.handler.ssl.SslHandler.decode(SslHandler.java:852)
at org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:425)
at org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303)
at