SE-Notes | Notes for UW Software Engineering
kandi X-RAY | SE-Notes Summary
kandi X-RAY | SE-Notes Summary
Write notes in Markdown with embedded LaTeX. When you push to develop, get CircleCI to render HTML pages using a small Ruby script and Pandoc, and then push the results to a Github Pages branch.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of SE-Notes
SE-Notes Key Features
SE-Notes Examples and Code Snippets
Community Discussions
Trending Discussions on SE-Notes
QUESTION
The following code
...ANSWER
Answered 2021-Jun-09 at 11:43QUESTION
For some reason I am unable to build my project. Yesterday everything worked fine, looking at https://firebase.google.com/support/release-notes/android#update_-_april_02_2019 there is a critical update from 5/11/21.
I tried to change the minSdkVersion as suggested but still no resolution.
This is the error:
...ANSWER
Answered 2021-May-15 at 03:22I faced this issue recently, and resolving this is pretty easy. you would need to upgrade your native-push-notification. I suggest you change this in your package.json as so native-push-notification version to ^7.3.0. this worked for me. Iho[e this helps.
QUESTION
When asserting that a field is definitely initialized in a class, what’s the difference between !
(exclamation point, definite assignment assertion) and the declare
modifier?
The following code is an error in strict mode since TS doesn’t know for sure that the field has been initialized.
...ANSWER
Answered 2021-Jun-08 at 18:08declare name: string;
QUESTION
I'm currently working on a microservices application for my internship using Consul for service discovery and feign clients for communicating between the services. When we started working on the existing project which already was built using microservices, we upgraded Spring boot to 2.4.3 & cloud to 2020.0.1, so that we could make use of Java 15 to use records instead of normal classes for dtos. The problem we have now is that, whenever we make a call to a composite service, that will try to retrieve data from multiple services (for example users and teams service), that we get the following stacktrace:
...ANSWER
Answered 2021-Jun-04 at 07:23Can you try excluding ribbon dependency as shown below
QUESTION
We are using Azure Pipelines (azure-pipelines.yml
) to automate ci/cd. Part of our configuration completes the versioning of our project for publishing to Azure Artifacts. We're also trying to configure this to update the existing version number in package.json
without triggering a new pipeline in Azure DevOps.
This is the relevant section for our azure-pipelines.yml
file:
ANSWER
Answered 2021-Jun-04 at 02:36You can add another script task to push back to your devops git repo. But firstly, you need to add checkout step and set the persistCredentials to true to authenticate the git command. See below example:
QUESTION
I want to create a Typescript Type for an array of objects. In this array of objects, I require only one object to have a property set to true.
You can probably solve it just with this typescript example, but I will provide a long and detailed explanation.
Let's say (just an example!) I want to recreate a tag (or a dropdown list).
My custom select has two have at least two options and I always want to have only one object to be active.
I have three models:
abstract class SimpleDropDownListElement {
constructor(public label: string, public value: any) {}
}
class DropdownListElement extends SimpleDropDownListElement {
constructor(public label: string, public value: any, public active?: false) {
super(label, value);
}
}
class DropdownActiveListElement extends SimpleDropDownListElement {
active = true;
constructor(public label: string, public value: any) {
super(label, value);
}
}
I want to have an array with at least one (or more) DropdownListElement(s) and one (always one - e.g. never 0 or 2+) DropdownActiveListElement. Any order (object with active set to true can be everywhere in the array).
So my idea was to create a type like this:
type DropDownOptionsArray = [DropdownActiveListElement, DropdownListElement,
...Array];
And that works, however, I need to have the object with the active property set to true as the first element of my array.
So my idea was to reverse the array (not very smart), but I still get problems if the array holds more than 3 values.
type Reverse = Tuple extends [infer A, ...infer B]? [...Reverse, A] : [];
const dropInvertedWithInvertedType: Reverse =
[new DropdownListElement('b', 'b'), new DropdownActiveListElement('a', 'a')];
const dropInvertedWithInvertedType1: Reverse =
[new DropdownListElement('b', 'b'), new DropdownActiveListElement('a', 'a'),
new DropdownListElement('b', 'b')]; // errors
Then I started to go crazy with rest elements (hoping for TS v4 to help me with some magic):
type DropDownOptionsArray = [...[DropdownActiveListElement],
...Array, ...Array];
// OK
const twoEntries: DropDownOptionsArray = [new DropdownActiveListElement('a', 'a'),
new DropdownListElement('b', 'b')];
const fourEntries: DropDownOptionsArray = [new DropdownActiveListElement('a', 'a'),
new DropdownListElement('b', 'b'), new DropdownListElement('b', 'b'),
new DropdownListElement('b', 'b')];
// should not error - but errors
const twoEntriesRandomPos: DropDownOptionsArray = [new DropdownListElement('b', 'b'),
new DropdownActiveListElement('a', 'a'), new DropdownListElement('b', 'b')];
const twoEntriesRandomPos: DropDownOptionsArray = [new DropdownListElement('b', 'b'),
new DropdownListElement('b', 'b'), new DropdownActiveListElement('a', 'a')];
// should error
const twoActiveEntries: DropDownOptionsArray = [new DropdownActiveListElement('a', 'a'),
new DropdownListElement('b', 'b'), new DropdownActiveListElement('a', 'a')];
const noActiveEntry : DropDownOptionsArray = [new DropdownListElement('b', 'b')]; // should have a different error
Writing overloads verbosely is not feasible, we could have an array of 20+ elements.
To summarize, I would need this Type:
array of objects
holds at least two or more objects
only one object has to have property active = true (all other objects may have active = false)
the object with property active = true can be placed at any index in the array (from index 0 to index array.length - 1 )
Thank you!!
ANSWER
Answered 2021-May-27 at 15:25I believe this is impossible, and I have created some examples to validate the assertion.
By way of explanation, it is true that you can a define variable-length tuple type with multiple fixed types at the start, eg
QUESTION
Windows Subsystem for Linux 2 is great tool, but has some issues as it's still a work in progress. I'm not on Insiders Program, so I don't get newest builds. I need to deal with some memory issues which are supposed to be fixed already, but I can't figure out if I already have required build or do I need to do some upgrading or is it available only for Insiders at the moment.
My Windows build is 19042.985 (v.20H2)
On Settings -> Apps there's WSL described with 4.19.104
So which build am I using?
...ANSWER
Answered 2021-May-19 at 06:20I think I found it by running this command in Powershell
QUESTION
Maven blocks external HTTP repositories by default since version 3.8.1 (see https://maven.apache.org/docs/3.8.1/release-notes.html)
Is there a way to disable that or to exempt a repository from this rule?
...ANSWER
Answered 2021-Apr-08 at 11:16I found a solution to do this by inspecting the commit in the Maven git repository that is responsible for the default HTTP blocking: https://github.com/apache/maven/commit/907d53ad3264718f66ff15e1363d76b07dd0c05f
My solution is as follows:
In the Maven settings (located in ${maven.home}/conf/settings.xml
or ${user.home}/.m2/settings.xml
), the following entry must be removed:
QUESTION
I've recently updated GKE cluster used in our project to version 1.18.16-gke.1200. One of the features we've been looking forward to were the startup probes. According to the overview of feature gates on Kubernetes' site, startup probes entered Beta stage in version 1.18 of Kubernetes and should be enabled by default, unless explicitly disabled in kubelet configuration. On the 1.18 cluster deployed with minikube the Deployment has its startup probes discovered properly:
On the GKE 1.18 cluster there is no mention of the probe:
Both Deployments have the API version apps/v1
and have the same probe configuration, but the startup probe one is ignored by GKE.
I've executed kubectl cluster-info dump
against the GKE cluster to determine the parameters of the --feature-gates
flag of kubelet, if the StartupProbe
wasn't disabled by Google for that version. However, the only feature gates information returned by the dump is the parameter of kube-proxy container, which looks as follows: --feature-gates=DynamicKubeletConfig=false,RotateKubeletServerCertificate=true
. There is no mention of startup probes in the dump at all, which means that the probes should be enabled.
GKE release notes does not seem to mention startup probes anywhere, even in the entry about introducing version 1.20 where the probes entered GA, although the graduation of some other feature (RuntimeClass) is mentioned. Could it be that Google is preventing introduction of startup probes in GKE for some reason? Is there any other way to enable startup probes for version 1.18 of GKE? I'm not using alpha cluster and the probes are not an alpha feature anyway anymore.
...ANSWER
Answered 2021-May-15 at 20:13I have realized pretty obvious thing I should mention in my question: I'm using Helm to deploy my applications. Since Helm is merely generating Kubernetes YAMLs and applying them to the cluster, the startup probe configuration was ignored when applied to GKE 1.16 cluster.
The solution was very simple: redeploying all the Helm Charts, so that the generated templates including the startup probe information will be properly handled by the cluster.
Hope this helps somebody too.
QUESTION
I am using Docker Desktop for Mac.
Since version 3.3.0 and with 3.3.1 I cannot connect to altssh.gitlab.com on port 443 any more whereas 3.2.2 and earlier work.
So, these commands both work in 3.2.2 (I downgraded and verified):
...ANSWER
Answered 2021-May-14 at 14:17As of Docker 3.3.2 and newer, the bug has been fixed.
• Disable the HTTP and HTTPS transparent proxies when there is no upstream proxy set. Fixes docker/for-mac#5572.• Revert to the HTTP and HTTPS proxy implementation used in 3.2.2.
Previously...
Looks like the bug is known, though not exactly in this context.
The reason being that supposed "HTTPS" / TLS connections are dropped when they do not use SNI (server name indication), which SSH as a non-SSL/TLS protocol probably does not do.
There's already an open Docker Desktop for Mac issue:
https://github.com/docker/for-mac/issues/5568
And the linked StackOverflow question:
Cannot reach SSL IP when in docker container over bridge. Getting SSL_ERROR_SYSCALL
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install SE-Notes
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page