外文分享

Apple Push Notification service must incorporate the new root certificate (AAACertificateServices) - APNS certificate update [duplicate]

帅比萌擦擦* 提交于 2021-02-20 08:34:02
问题 This question already has an answer here : Apple Push Notification service server certificate update (1 answer) Closed 3 days ago . I got this mail from Apple. "On March 29, 2021, token and certificate-based HTTP/2 connections to the Apple Push Notification service must incorporate the new root certificate (AAACertificateServices 5/12/2020) which replaces the old GeoTrust Global CA root certificate. To ensure a seamless transition and to avoid push notification delivery failures, verify that

Create database if db not exist

不羁的心 提交于 2021-02-20 08:33:27
问题 I want to make SQL Server scritp for creating database if not exist. IF NOT EXISTS(SELECT * FROM sys.databases WHERE name = 'DataBase') BEGIN CREATE DATABASE DataBase USE DataBase CREATE TABLE TableName ( Id INT PRIMARY KEY IDENTITY (1, 1), Name VARCHAR(100) ) --more tables here --some procedures here too END From code above i getting this error: Msg 911, Level 16, State 1, Line 5 Database 'DataBase' does not exist. Make sure that the name is entered correctly. How to make database with

What does it mean by live bindings?

怎甘沉沦 提交于 2021-02-20 08:33:07
问题 I am following a tutorial and it says ES modules uses live bindings. It means a feature to support cyclical dependencies. But I don't clearly understand this concept. What does this mean? 回答1: Live bindings is a concept introduced in ES modules. It means that when the exporting module changes a value, the change will be visible from the importer side. This is not the case for CommonJS modules. Module exports are copied in CommonJS. Hence importing modules cannot see changes happened on the

For what is the JsonObjectAttribute.Id?

浪子不回头ぞ 提交于 2021-02-20 08:32:36
问题 JSON.NET JsonObjectAttribute has a property Id. It's inherited from the JsonContainerAttribute. I cannot find, for what is the Id property is used? 回答1: It's used by Json.NET Schema to override the default "$id" property value when generating a schema for a type. E.g. if I have the following type: [JsonObject(Id = "http://foo.bar/schemas/rootobject.json")] public class RootObject { } And auto-generate a schema using JSchemaGenerator as follows: var schema = new JSchemaGenerator().Generate

How do I see a list of all minikube clusters running in Docker on my mac?

巧了我就是萌 提交于 2021-02-20 08:32:22
问题 I run a Kubernetes cluster on my mac using the latest Docker community edition. I usually do: $ minikube start --vm-driver=hyperkit and it works well for me. Today, I ran that command multiple times in a script. Now, how do I know how many minikube VMs are running on a mac? How do I delete all but one of them? Can I see a list of all minikube vms running? $ minikube status shows: minikube: Running cluster: Running kubectl: Correctly Configured: pointing to minikube-vm at 192.168.64.3 Is

How to get the logger wrapped in slf4j?

六眼飞鱼酱① 提交于 2021-02-20 08:32:13
问题 Is it possible to get the logger wrapped by slf4j ? For example, in debug mode, when I inspect org.slf4j.LoggerFactory.getLogger(loggerName) , I can see the logger (here, java.util.logging ) : I want to do something like : // Get the real logger, cast in java.util.logging java.util.logging.Logger myLogger = LoggerFactory.getLogger(loggerName))...; // Use the java.util.logging methods myLogger.setLevel(Level.parse(level)); 回答1: I've found a solution using reflection. Looking for the "logger"

Programmatically open a file in Visual Studio (2010)

余生长醉 提交于 2021-02-20 08:32:12
问题 I'm building a VS package, and I'm trying to send a command from the package to Visual Studio to open up a user selected file in a new tab (just like a user would do it by going to File -> Open...). I remember seeing at some point how to do this. Can anybody refresh my memory? 回答1: I believe you want one of: IVsUIShellOpenDocument.OpenStandardEditor DTE.OpenFile DTE.ItemOperations.OpenFile In the end, I think they all boil down to the same behavior. 回答2: I like to use the DTE method

Disturbing order of evaluation

空扰寡人 提交于 2021-02-20 08:32:08
问题 When I work with my favorite containers, I tend to chain operations. For instance, in the well-known Erase–remove idiom: v.erase( std::remove_if(v.begin(), v.end(), is_odd), v.end() ); From what I know of the order of evaluation, v.end() (on the rhs) might be evaluated before the call to std::remove_if . This is not a problem here since std::remove* only shuffle the vector without changing its end iterator. But it could lead to really surprising constructs, like for instance (demo): #include

No metadata when recording an audio webm with MediaRecorder

若如初见. 提交于 2021-02-20 08:31:52
问题 For my project I record user audio using MediaRecorder and it almost works fine. My problem rises when I wish to display a waveform of the user recording using Wavesurfer.js, which doesn't load my recording. Playing the recording with an Audio element works fine, though. After trying different sources, it seams that it is because the final .webm file doesn't have much metadata, not even a duration or bitrate (even though I set it in the MediaRecorder options). Here is the output from ffprobe

Create database if db not exist

老子叫甜甜 提交于 2021-02-20 08:31:49
问题 I want to make SQL Server scritp for creating database if not exist. IF NOT EXISTS(SELECT * FROM sys.databases WHERE name = 'DataBase') BEGIN CREATE DATABASE DataBase USE DataBase CREATE TABLE TableName ( Id INT PRIMARY KEY IDENTITY (1, 1), Name VARCHAR(100) ) --more tables here --some procedures here too END From code above i getting this error: Msg 911, Level 16, State 1, Line 5 Database 'DataBase' does not exist. Make sure that the name is entered correctly. How to make database with