Cannot connect to server with SSMS 18

I’m having an issue all of a sudden with SSMS 18. Today, the authentication method is grayed out and I cannot get it to connect to a server. I’ve rebooted, reinstalled 18.6, uninstalled and installed 18.5 and run it as an Administrator. I have no idea what the issue could be and cannot seem to locate any info on through Google searches.

enter image description here

Go to Source
Author: jradich1234

How to change the Media Uploader screen from WordPress admin to normal browse screen for frontend users for featured image submission

I have a theme form in my frontend which takes the featured image from the user. But my problem is when the user clicks the upload button they are taken to the normal MEDIA UPLOADER screen which is normal for admin users. On top of that, the site visitors can also see the other media library images. I want to change this media uploader screen to just file browse screen. My site users are of “Authors” category. Please need help!

Go to Source
Author: Muhammad Aurangzeb Khan

What’s the deal with X25519 Support in Chrome/Firefox?

RFC8446/TLSv1.3 Section 9.1 says that “implementations SHOULD support X25519”.

An online list
of software supporting Curve25519 list both Firefox and /Chrome
as supporting it for TLS.

I did an experiment and created a self-signed TLS cert with Ed25519. Both Chromium 84 and Firefox 79 complain
about not being able to negotiate the cipher list/version. I’ve also noticed that they initiate TLSv1.2 handshakes when
connecting to localhost, but use TLSv1.3 handshakes when connecting to google for example. wget on the other hand,
has no problem connecting (I used --no-check-certificate,
but afaik that shouldn’t matter here)

I then looked at the TLSv1.3 handshakes. neither browser offers Ed25519 as a signature in their ClientHello (even when connecting to google via TLSv1.3). Again, wget does offer it
as part of the ClientHello.

Chromium 84.0 TLSv1.3 Supported Signatures

So I figured this might be a platform issue with my distro (Fedora), but this Blog Post also claims that the major browsers don’t supports X25519. While ChromeStatus says it’s been supported since Chrome 50 (I’m assuming chrome and upstream chromium do not differ in this).

I’m totally confused. What’s the current state of X25519 support on major browsers? is it a google chrome vs. upstream chromium issue?

Go to Source
Author: Jim Landy

Printing all existing windows on a windows container

I wrote a simple cpp console app that prints all the open windows titles:

Printf("hellon");
for (HWND hwnd = GetTopWindow(NULL); hwnd != NULL; hwnd = GetNextWindow(hwnd, GW_HWNDNEXT)) { 
    if (!IsWindowVisible(hwnd)) continue; 
    int length = GetWindowTextLength(hwnd);
    char* title = new char[length+1];     
    GetWindowText(hwnd, title, length+1); 
    printf(" Title: %s", title);
}

The main reason of that app is to monitor the windows another exe is opening.
However, it only prints hello and no titles at all.
While it does works on the host windows os and prints all the existing windows on it.
What is the difference on docker and how can I make it work similarly?

Go to Source
Author: flowerProgrammer

Doing a validation check on a AJAX post and returning the error message

I have an AJAX post that does this

  $.ajax({
                    type: "POST",
                    url: "@MyWebSite.Url/myController/myView",
                    contentType: "application/json; charset=utf-8",
                    data:
                    JSON.stringify({ myModel: myData }),
                    dataType: "json",
                    traditional: true,
                    success: function () {
                        alert('Success!');
                    },
                    error: function () {
                        alert('Error! ');
                    }

My controller does the validation check but it is not correctly returning the error message.
This is what my controller looks like

 if (totalQty < part.QtyInItem)
                    {
                        //ModelState.AddModelError("", "There is " + part.QtyInItem + " of Part " + part.PartName + " used in item " + part.ItemID + " but you only handled " + totalQty + ". Please verify you are handling all parts used in the item.");
                        //RedirectToAction("myControler", myModel);
                        return this.Json(new { success = false, message = "There is " + part.QtyInItem + " of Part " + part.PartName + " used in item " + part.ItemID + " but you only handled " + totalQty + ". Please verify you are handling all parts used in the item." });
                    }

When I tried adding an error to the model state it just returned “ERROR!” and not the error message I had associated with it. And when I try doing the this.JSON return it returns “success” to the view and not the error message.

How can I do this validation check for my AJAX post

Go to Source
Author: ryan

Ubuntu 20.04 LTS WSL2 Windows 10 Networking/connectivity issue

fresh install
Linux mybox 4.19.104-microsoft-standard #1 SMP Wed Feb 19 06:37:35 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I am unable to ping. it seems that there are no netplan configs, the folder is there but not .yaml configs.

”’/etc/network$ ls -lta
total 16
drwxr-xr-x 92 root root 4096 Aug 10 08:21 ..
drwxr-xr-x 2 root root 4096 Apr 22 23:42 if-up.d
drwxr-xr-x 2 root root 4096 Apr 22 23:42 if-pre-up.d
drwxr-xr-x 4 root root 4096 Apr 22 23:41 .”’

I am unable to ifconfig -a :
”’$ ifconfig -a

Command ‘ifconfig’ not found, but can be installed with:

sudo apt install net-tools”’

no interfaces file:
”/etc/network$ ls -lta
total 16
drwxr-xr-x 92 root root 4096 Aug 10 08:21 ..
drwxr-xr-x 2 root root 4096 Apr 22 23:42 if-up.d
drwxr-xr-x 2 root root 4096 Apr 22 23:42 if-pre-up.d
drwxr-xr-x 4 root root 4096 Apr 22 23:41 .””

”’$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 96::2e brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether a6::70 brd ff:ff:ff:ff:ff:ff
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00::09 brd ff:ff:ff:ff:ff:ff
inet 172.23.69.191/20 brd 172.23.79.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::215:5dff:fe52:ea09/64 scope link
valid_lft forever preferred_lft forever
5: sit0@NONE: mtu 1480 qdisc noop state DOWN group default qlen 1000
link/sit 0.0.0.0 brd 0.0.0.0”’

tried to restart, uninstall/reinstall no luck with the same result.

Please advise

Go to Source
Author: ninjaneer

Is there any method to check options table existence?

I am writing a method that is responsible for creating table, and it depends on an option.

When I run this on a fresh database, it throws error that options table does not exists. Is there any prepared method in wordpress for checking of options table existence?

I am using following code for checking a specific option and then creating required table:

if (!get_option('my_specific_key', 0)) {

   ... running sqls here

Go to Source
Author: BABAK ASHRAFI

How do I recover Windows 10 with files recovered from a drive

I had a drive failure about 2 months ago on my custom built PC with Windows 10 (probably professional version). It was a Seagate drive and they sent the drive to recovery and sent back a USB slimdrive with all of the files recovered.

My question is: How do I now recover back to Windows 10?

I was hoping I could copy those files onto a new drive and boot up Windows, but that results in “No MBR Found”. I also tried booting from the USB slimdrive, but that results in a different message telling me to select a proper boot device.

Go to Source
Author: Andrew

How actual is `cvt` utility now?

With a simple input like this:

cvt 1920 1080 60

or

cvt -r 1920 1080 60

it gives two modes with pixelclocks of 173 MHz and 138.5 MHz, respectively.

However, CEA-861 states that 1920×1080@60Hz mode should have a pixelclock of 148.5 MHz. My fullhd monitor happens to have been receiving exactly this frequency, as it shows in its on-screen menus.

Why is there such discrepancy and can the output of cvt be trusted at all, for any other modes such as 1920×1200@60 or 2560×1600@120 ?

Go to Source
Author: lvd

Resource collision in Azure Devops Pipeline

The system I’m working with is using a private agent pool rather than hosted.

Roughly, my yaml defined procedure is the following and each step is dependent on the last:

  1. Build (to check for build failures)
  2. Test
  3. Deploy (I simply build and output the files into another predefined folder of servers on the local network)

The Issue in Detail

For different pipelines, the devops service is able to create different folders for each pipeline and I have little issues. However, regarding on the subject matter of different branches on the same pipeline; the issue I am running into is that if the CI/CD trigger gets scheduled too closely, the build and test directories for the pipeline will race condition causing at least one of the runs to fail. Furthermore, they can also interfere with each other’s “deploy” if the build tries to write to the same remote folder.

  • Is there a way to define a separate workspace for each branch so that building and testing happens in isolation from other runs?
  • Is there some sort of locking system I can implement so that only one
    job can execute my entire pipeline job atomically?

FYI

Scouring through the DevOps documentation, it appears you’re not supposed to be able to define the output folders or workspace folder through normal means.

I tried using the Exclusive Lock feature, but couldn’t find any documentation or examples on how to make this work with my pipeline (I instead, found an open issue on the Microsoft documentation GitHub saying the documentation was missing). It is my understanding this feature is extremely new.

I also noticed that the Hosted Agents use a separate vm container for each run that largely eliminate resource collision. Are we supposed to setup something similar on the private agent?

For reference, I am relatively new to Azure DevOps.

Go to Source
Author: Bennett Yeo

attach csv file on email sent from postgres

I have the following code to send emails and wanted to see if it’s possible to attach a csv file?

CREATE OR REPLACE FUNCTION public.send_email_html(text, text, text, text)
 RETURNS integer
 LANGUAGE plperlu
AS $function$
    use Net::SMTP;

    my ($recipientString, $sendFrom, $subject, $message) = @_;
    my @recipients = split /;/, $recipientString;
    my $smtp=Net::SMTP->new("localhost");
    
    $smtp->mail($sendFrom);
    foreach(@recipients)
    {
        $smtp->recipient($_);
    }
    $smtp->data();
    foreach(@recipients)
    {
        $smtp->datasend("To: $_n");
    }
    
    $smtp->datasend("Subject: $subjectn");
    $smtp->datasend("Content-Type: text/html;n");
    $smtp->datasend("$messagen");
    $smtp->quit();

    return 1;
$function$
;

Go to Source
Author: Matias

How to deploy python microservices app updates?

I’m working on python microservices based app and I’m wondering how to ship updates.

Let’s start by a summary of what I have:

  • Code base on git (several repos)
  • The app is running on several remote raspberry pis
  • I access these via vpn network
  • Raspberry pis have a limited access to internet via GSM MtoM network
  • The main custom lib is installed with pip
  • Dependencies are installed at the first launch in house with good internet connection
  • The code of each service is ofuscated in place
    At the moment when I update my services I wrote a shell script which goes and download latest version for each service.
    It feels like it’s such a repetitive task for each device.

I only see 2 simple options:

  • connect to each device via vpn + ssh and run the update script (even an enhanced version)
  • At the end of the CI run a script that send latest.zip and create a service (script + cron ? python + systemd ) on each device that check for new .zip to update the services.
    Each of those options doesn’t look pretty clean.

What is usualy done in similar cases ?

Do you have any idea to share with me I don’t find anything that suits my needs.

Thanks for your inputs !

Go to Source
Author: AFZ84

How to contact Google G Suite without having an account?

I obtained a mail from gsuite-noreply@google.com about inactive classic sites. I do not know about which site they are talking.

On their support page, one needs to connect using a G Suite account in order to contact them, but I think I do not have such an account.

Does somebody if they can be contacted without G Suite account?

[Tell me if this question is inappropriate.]

Go to Source
Author: Karlo