instruction stringlengths 0 30k ⌀ |
|---|
|firebase-cloud-messaging|vite|service-worker| |
|php|sql-server|pdo|sqlsrv|table-valued-parameters| |
The simplest option to find the `project-id`:
1. Right-click the main GitLab page of your project
2. Select "View Page Source" (`Ctrl + U` in Chrome)
3. Search for:
```txt
Project ID:
```
There you go.
I discovered that it is displayed depending on your role in the project. But GitLab apparently just “... |
The `jarModule` is intended as you suggested to hold third party libraries which can indeed be packaged inside skinny war artifacts.
I think it more come in needs when there is common dependencies between war modules inside a single ear one. |
**Context:**
Let's say i'm building a finance app where the transactions are linked (like blockchain).
In the sense, `Transaction 1` has no link, `Transaction 2` should have link to `transaction 1`, `Transaction 3` should have link to `transaction 2` and so on.
And these links should be specific to `accounts... |
- Use `REDUCE` to iterate through the string
- Find the number of `-`s by (``REGEX``)``REPLAC``ing all characters that are not `-`( `[^-]`) with nothing and calculate the remaining `LEN`gth of the string. This is the number of times we need to iterate.
- In each iteration, we use `REGEXEXTRACT` using
- regex `... |
How top app updating the UI component without app update from play store? |
|android|flutter|on-demand-feature-function|deferred-components| |
I have just resolved this issue. It appears that you may have used a Macbook M1 for the pip install process.
The solution involves not using a different runtime to build the layer file.
Use Docker to create an environment identical to that of your lambda function. For me, the issue is resolved.
If you use arm64... |
For this problem, I would like to model out this constraint in cplex.But I am not sure if the indexes that I put is correct or not. Can anyone help me to explain if I did it wrong. Here are some of my codes:
```
Data:
Products = {P1 P2 P3};
NbOperations = 10;
NbPeriods = 3;
LeadTime = [1,1,3,5,0,0,3,0,0,0];
{s... |
You can do it in 2 different ways:
If you use `<androidx.fragment.app.FragmentContainerView` tag in xml, it is as follows:
```kotlin
class MainActivity : AppCompatActivity() {
private lateinit var navigationController: NavController
override fun onCreate(savedInstanceState: Bundle?) {
s... |
Nginx unable to get request from React Native app over internet |
|spring-boot|react-native|nginx| |
null |
I have used below peace of code for calling third party API from my spring boot application.
```
@GetMapping("/client-call")
public String getResponseFromClient(){
String result = null;
for (int i = 0; i < 100; i++) {
RestTemplate restTemplate = new RestTemplate();
... |
Third party API call not working from microsoft azure |
|spring-boot|azure|azure-devops|azure-web-app-service| |
null |
If you are not allowed to modify COPY1 as @BruceMartin suggests, try...
COPY COPY1 REPLACING
==01 AREA1 PIC X (10).== BY ====
==01 AREA3 PIC X (10).== BY ====
.
|
1. If you're using [CSV Data Set Config][1] - it will read next line on next iteration of each virtual user. In order to read all values during 1st iteration - convert them into 29 columns instead of 29 rows
2. In case you cannot control the CSV file format the options are in:
- switch to [__CSVRead() functio... |
I use segmented picker in iOS which contains few items. When user tap on not selected item this item becomes selected. Some of items can contain sub items. So when user tap on already selected type I need to show modal window with subitems for choosing one of them.
But taps on already selected items of segmented picke... |
```ts
// GameFactory.ts
export default class GameFactory {
public static create(): AbstractGame {
DependencyRegistrar.registerDependencies();
return container.get<AbstractGame>(TYPES.Game);
}
}
```
```ts
// AbstractGame.ts
export default abstract class AbstractGame {
constructor(
@inje... |
How does inRequestScope method works? |
|inversifyjs| |
null |
Okay, it was due to the missing `await` keyword:
```js
await producer.publishMessage("info", "somemessage");
await producer.publishMessage("info", "somemessage");
``` |
Use `keydown` and `keyup` to store state of `ctrlKey` and `shiftKey`. In case of the special key combo, we cancel the event and insert text to textarea in a patchy manner.
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
var ctrl = false
var shift = false... |
the one that worked for me
Caching your GitHub credentials in Git
GitHub Docs
https://docs.github.com › getting-started-with-git › cachi... |
# [Binary Search][1] (ES6)
---
These functions return the element's position (index) within the sorted array if it was found or `-1` if it wasn't.
### Bottom-up
<!-- begin snippet: js hide: false console: true babel: false -->
<!-- language: lang-js -->
function binarySearch(arr, val) {
let sta... |
If you want the words with Jack and there must be at least `Jack#` you can match the part of the string containing Jack# using a negated character class `[^,\n]*` excluding matching comma's or newlines.
If there is a match, then split the match on one or more whitspace characters and filter the result containing the... |
I have webservices hosted on server but I am using Retrofit to fetch data from the server but When I am running my app it is showing exception `Unresolve host` but when I am using the same Url in Postman and browser it is working fine.I have also add Internet permission in app manifest file.
Below is my code:
**R... |
import requests
from database_utils import connect_to_database
class Tick:
def __init__(self):
self.symbol = ""
self.name = ""
self.last = 0.0
self.high = 0.0
def tickprice(code):
url = f"http://qt.gtimg.cn/q={code}"
... |
How can the code be optimized? The execution takes too long. It recalls API to retrieve many stock prices and writes those prices into a table |
|python|sqlite|optimization|query-optimization| |
I am working on an indoor navigation application that involves two floor plan images: one is the original floor plan, and the other includes nodes and paths (used for navigation). Using Python and the OpenCV library, I have successfully extracted the XY coordinates of all nodes from the navigation floor plan. However, ... |
WebServices not working with Retrofit but working properly in Postman |
We can use a vectorized operation using `cbind`: ` M[cbind(indices, 1:ncol(M))]`
```
set.seed(123)
(M <- matrix(rnorm(25), 5))
indices <- c(2, 3, 1, 4, 4)
# vectorized
vect1 <- M[cbind(indices, 1:ncol(M))]
# loop
vect <- c()
for(i in 1:5) {
vect <- c(vect, M[indíces[i], i])
}
# benchmark
library(... |
null |
[Constraint][1]
For this problem, I would like to model out this constraint in cplex.But I am not sure if the indexes that I put is correct or not. Can anyone help me to explain if I did it wrong. Here are some of my codes:
```
Data:
Products = {P1 P2 P3};
NbOperations = 10;
NbPeriods = 3;
LeadTime = [1,1,3,5,... |
In the WordPress core, WordPress uses the sanitize_title hook to apply its own filter (you can find that in this code):
https://github.com/WordPress/WordPress/blob/master/wp-includes/default-filters.php
The function it call is sanitize_title_with_dashes:
https://developer.wordpress.org/reference/functions/sanitize... |
**service.py**
def add_goods_to_cart(goods_id, user, addend):
goods = Goods.objects.filter(pk=goods_id).first()
if goods:
the_goods_already_in_cart = Cart.objects.filter(user=user, goods=goods, order=None).first()
if the_goods_already_in_cart:
... |
Here is somewhat a basic question but the reason is not spelled out clearly anywhere.
Say we have 2 web applications running on `https://one.abc.com` and `htts://two.xyz.com`.
I visit `https://one.abc.com` and a page is displayed which has a button on it and when clicked, submits to `https://one.abc.com` and respon... |
[Example](https://i.stack.imgur.com/ujcMb.jpg)
I need to choose a hierarchical database management system for my project, which hierarchical database management system would you advise me to use? Thank you in advance. Thank you
haven't tried anything yet. |
I have this route defined:
Route::match(['get', 'post'], '/{class}/{function}/', [OldBackendController::class, 'apiV1']);
If I do this request:
POST /api/v2_1/wishlist/archive
Laravel enters int the `OldBackendController`, and the value of `$class` variable (in the controller), is this:
api/v... |
Laravel controller does not get correct parameter from route definition, and enters in the wrong controller function |
|php|laravel|laravel-10| |
While on the transaction in parallel situation, prisma throw error like that message
so i wanna know why it error occured, and how to resolove it,
ERROR MESSAGE
```
[Nest] 43187 - 2024. 03. 17. 오후 4:14:56 ERROR [ExceptionsHandler] Transaction API error: Transaction not found. Transaction ID is invalid, refer... |
How to accurately translate image coordinates from Python/OpenCV to Android ImageView? |
|android|opencv|coordinates|android-imageview| |
|powerbi|dax|powerbi-desktop| |
There is a function inside which determines whether metadata is saved (by metadata I mean saving dtypes). When I save a Dataframe to a parquet file and then read data from that file I expect to see metadata persistence. I will perform this check in this way:
```
In [6]:(pd.read_parquet(os.path.join(folder, 's_parq... |
Problem in defining dtypes of categorical data obtained from parquet file |
|pandas|dataframe|parquet| |
null |
I'm using AG Grid table v31 for `agDateColumnFilter` I'm trying to change default date format from `mm/dd/yyyy` to `dd.mm.yyyy`.
If I use the exact `valueFormatter` just for column it works but in the filter doesn't work.
[![enter image description here][1]][1]
```typescript
{
field: 'createdDate',
... |
AG Grid table format date value in the filter "agDateColumnFilter" doesnt't work |
I use Prisma to generate data types.
model artworks {
id String @id @default(dbgenerated("uuid_generate_v4()")) @db.Uuid
title String @db.VarChar(255)
artistid String @db.Uuid
description String?
dataadded DateTime? ... |
How to access the nested objects in Prisma |
|reactjs|next.js|prisma| |
I'm writing a function that decodes a morse code message to plain text. The problem I'm running into, is that it doesn't add spaces where needed. Keep in mind that every morse code character/letter, is separated with a blank space and every full word, is separated by 3 spaces. I want the function to add a single blank ... |
Is there a way to get all values level by all level in a Pandas MultiIndex? |
|pandas| |
I have an HTML/CSS/JS website where I'm embedding facebook posts, and adding some text (with various info and action buttons) to the top of each post. I'm adding the text that goes above each post dynamically in Javascript, so that the embedded post (iframe) is in a separate container than the text that goes above it. ... |
how do i detect 3 blank spaces in a string array |
|php|arrays|string| |
## Need: `getDownloadURL` on external bucket
We have a Firebase/GCP project and we want to use the [`getDownloadURL` Firebase storage function][1] in Node.js to create a permanent signed URL for an object in a bucket in a different project.
Specifically, we have an asset bucket and we want to generate long-lived ... |
Firebase-admin node.js getDownloadURL permission error on external bucket |
|firebase|google-cloud-platform|google-cloud-storage|firebase-storage|firebase-admin| |
Based on [Yoast SEO][1], it determine whether the title is too long based on its width instead of number of characters.
So, how to know the font, font size, and font style used in Google search results?
Also how to know the visible width for Google search results, from moz, it is said to be 600 pixels
```
proce... |
{"OriginalQuestionIds":[43969277],"Voters":[{"Id":11107541,"DisplayName":"starball","BindingReason":{"GoldTagBadge":"visual-studio-code"}}]} |
Refer to this ticket: [Error message when trying to add a Team Member][1]
The cause of the issue is that the Product Team made some changes to boards a few weeks ago. it leads to issues of identity.
Now, Product Team has reverted the change that was causing the issues with assigned to.
You can try to assign t... |
I am trying to implement circuit breaker pattern in my spring boot application. I am referring to https://redhat-scholars.github.io/spring-boot-k8s-tutorial/spring-boot-tutorial/05-resiliency.html this tutorial. I am getting above error. Not sure what point I am missing.
import org.springframework.boot.autocon... |
|angular|typescript|ag-grid-angular| |
please help me to understand the problem. I recently made a build with expo dev, everything went well. But after some time, I needed to make another build and I got the following error:
`✔ Preparing the list of your Firebase projects
Firebase project not found or not correctly mentioned on config.json
error Comma... |
Expo dev - have a build error "Firebase project not found or not correctly mentioned on config.json" |
|android|ios|reactjs|mobile|expo| |
null |
I have a simple animation where I have a static rectangle slowly moving horizontally so that it pushes a circle across the 'floor'.
How can I make the circle roll instead of slide?
I tried adding friction to the circle and the floor, and removing friction from the pushing rectangle, but it makes no difference.
... |
User
```dart
TextFormField(
enableInteractiveSelection: false,
controller: _runningKmsController,
keyboardType: TextInputType.number,
inputFormatters: [
LengthLimitingTextInputForma... |
Consider defining a bean of type 'org.springframework.cloud.circuitbreaker.resilience4j.Resilience4JCircuitBreakerFactory' in your configuration |
|spring-cloud|circuit-breaker|resilience4j| |
It happens sometimes because of Android Studio cache issues. Try to invalidate caches and restart the studio. In below image select all the options.[][1]
[1]: https://i.stack.imgur.com/x06qu.png |
> I think it probably requires to use `index_sequence` but I'm not sure
> how.
Yes, it's very easy to do this using `index_sequence`:
template<typename... Args, std::size_t... Is>
void foo_impl(std::index_sequence<Is...>, const Args&... args)
{
using typeLists = std::tuple<Args...>;
... |
To successfully serve static files in production, I used WhiteNoise and deployed it to Azure App Service.
I used your git repo code and made the necessary changes.
To use whitenoise, I added the lines below in the settings. py file, as shown below:
Note: Add whitenoise middleware after the security middleware.... |
I've been using Firebase for several years now and have recently set up a new project to run with Firebase.
The problem occurs when I try to run `firebase deploy`.
I get the errors:
`[project root]/functions/.eslintrc.js`
`0:0 error Parsing error: Cannot read file '[project root]/functions/functions/tscon... |
Get Width of Title Like Yoast SEO does |
|fonts|seo|yoast| |
As the first step of a larger process, I'm trying to get the column names from some .dat files. I'm getting the "FileNotFoundError: [Errno 2] No such file or directory:" error, but I'm passing it the directory path and it is telling me the first file in the folder, so it doesn't seem to be the usual suspect of the rel... |
Python - "FileNotFoundError: [Errno 2] No such file or directory:" |
|python|pandas| |
null |
The answer with `declare global { ...` didn't work out for me.
The recommanded approach is to create a type declaration file, for example `env.d.ts` with the following declaration:
```ts
declare namespace NodeJS {
interface ProcessEnv {
JWT_TOKEN: string;
}
}
```
And then add this reference in y... |
Using a *hacky* [`defaultdict`][1] :
```
from collections import defaultdict
genid = defaultdict(lambda: len(genid) + 1)
out = {
k: v if v in ("VDD", "GND")
else genid[v] for k, v in my_dict.items()
}
```
Output (*before/after*) :
```
{ # {
"1": "VDD", # ... |
You certainly can use `parfor` in the functions invoked using `parfeval`. It is difficult to do this in a non-trivial manner in R2019b though. In later releases of MATLAB (>=R2020a), you can use a [thread pool][1] inside each local process worker. It's awkward to set up though, and even then there might be challenges g... |
I'm implementing a custom WOPI host and currently is working with word, excel and power points documents. But when I try to open a visio document (vsdx extension) I'm getting the following error:
[![WOPI error opening visio documents][1]][1]
I found the following searching on the web but I was not able to solve t... |
Wopi host implementation unable to open visio documents |
|visio|ms-wopi| |
You can get index of selected item and then remove that item from your list and insert that removed item into your list(now it appears as the first element in your list).
for example, selected item index is 5
myList.removeAt(5) // 5 is your selected item index
then
myList.insert(0, element... |
I'm normally very comfortable performing joins in my work/on online practice sets but sort of blanked when I got this question.
Here's the data: The image for the data set > (https://i.stack.imgur.com/iUmN0.png)
I was asked to perform a select * statement on the two tables, and write down the result for all 5 kin... |
<!-- language-all: lang-dos -->
This works:
if exist %1\* echo Directory
Works with directory names that contains spaces:
C:\>if exist "c:\Program Files\*" echo Directory
Directory
Note that the quotes are necessary if the directory contains spaces:
C:\>if exist c:\Program Files\* ech... |