instruction stringlengths 0 30k ⌀ |
|---|
I need help with the architecture pattern I should use in a NestJS project.
So I am using a command/query approach for developing my RestAPIs. Right now it's a Monolith and not a microservice architecture, but I am developing it in a way that tomorrow it will be easy to switch to Microservice.
So consider a scen... |
How to decode audio stream using tornado websocket? |
|python|python-3.x|torchaudio| |
If you don't want to use styles, you can make a simple subclass:
public class TextImageButton extends ImageTextButton {
public TextImageButton(String text, Skin skin,Texture texture) {
super(text, skin);
clearChildren();
add(new Image(texture));
add(getLabel());
}
... |
In all four cases you presented, Oracle would do a normal index seek (binary tree search) on the leading column `eid` because an equality predicate was provided for this column in each of your cases. But what else it does with the index depends on what other columns you're filtering on:
1. **First column** (`eid`) o... |
python virtual environment get deleted on HPC authomatically |
|hpc| |
I need to validate English words. I have used https://www.npmjs.com/package/an-array-of-english-words but it is not comprehensive. Please suggest me a good JS NPM library. Thanks. |
Assistance with sum for multiple separate rows using multiple criteria please |
I'm unable to ping/or perform curl to any website from an instance which has only ipv6 address assigned whereas I'm able to ping/access internet if I create a windows instance with same settings (Ubuntu or Amazon Linux instances are not working), some of the details are as follows
ip -6 addr:
 {
arr = val // unexcepted error!
}
```
PlayGround: https://www.typescriptlang.org/play?ssl=19&ssc=27&pln=15&pc=1#code/JYOwLgpgTgZ... |
Why keyof a picked type is not picked keys in function generic? |
|typescript| |
Can't change the width of the div the wraps the img. The div has the class of slick-slide and slick active. The 2 imgs shown are inside the div while the 3rd is outside. The sliderContainer class affects the next button while i can't even see the prev button.[The current situation](https://i.stack.imgur.com/ohY11.png)
... |
How to create a route on a web map (Flask) using folium and osmnx? |
|python|flask|networkx|folium|osmnx| |
null |
I copied the following code from a tutorial, but still couldn't figure out whether I made a mistake somewhere or whether it has to do with the browser support.
<html>
<head>
<script type="text/javascript">
function loadXMLDoc(dname)
{
if(window.XMLHttpRequest)
{
xhtt... |
How do I fix error in visual studio code of submodules not opening/cloning correctly? |
You can use [eval][1] to set variables in a recipe. From [this answer here][2], I understand that you can even create pseudo local variables that way, by automatically prefixing them with the target. This is achieved by prefixing the variable with `$@_`.
```Makefile
mytarget:
$(eval $@_foo = bar)
@echo mytarget... |
I am having problem when i want to encode data like ttsjson or is there any way that can get the data to encode it?
[enter image description here](https://i.stack.imgur.com/pfM9K.png)
Please tell me what I need to do.
I tried decoding but the code often crashes. Is there any way to read how the web encodes? |
Separation of Students and Users in NestJS Microservice architecture |
|node.js|architecture|microservices|nestjs-microservice| |
I am trying to evaluate CNN model using two different approaches:
1.
model.evaluate(test_data)
In this case I get 79% accuracy score: [1.2163524627685547, 0.7924528121948242]
2.
I want to get the actual prediction values and use scikit-learn metrics to get accuracy score:
test_prediction=model.p... |
Difference between model.evaluate and metrics.accuracy_score |
|machine-learning|deep-learning|conv-neural-network|metrics|evaluation| |
I have a spring boot application where I get request text and files as form-data
If I send text data in code format, I get this error
```
JSON parse error: Unexpected character ('b' (code 98)): was expecting comma to separate Object entries
at org.springframework.http.converter.json.AbstractJackson2HttpMessage... |
Spring boot JSON parse error: Unexpected character error |
|javascript|json|spring-boot| |
null |
So I am basically very new to Assembly in general. I was trying to write this simple code where I need to sort numbers in an ascending order from source data and rewrite it into destination data.
and whenever I run it, it shows: executables selected for download on to the following processors doesn't exist...
here... |
How can i change the width of the slider in react slick? |
|reactjs|react-slick| |
null |
{"Voters":[{"Id":1506454,"DisplayName":"ASh"},{"Id":19648279,"DisplayName":"Harshitha"},{"Id":9214357,"DisplayName":"Zephyr"}],"SiteSpecificCloseReasonIds":[16]} |
## odoo ## odoo ##
docker exec -it (id conatianer odoo) /bin/bash
after installed : pip install dropbox , pip install pyncclient, pip install nextcloud-api-wrapper , pip install boto3 , pip install paramiko
for module auto_database_backup |
|c++|function|parsing|lambda|c++17| |
I encountered a error
PS C:\\Users\\91789\\Desktop\\Underwater-Image-Enhancement\\WPFNet\> python Underwater_test.py C:\\Users\\91789\\Desktop\\input C:\\Users\\91789\\Desktop\\New folder ./checkpoint/generator_600.pth
C:\\Users\\91789\\AppData\\Local\\Programs\\Python\\Python312\\python.exe: can't open file 'C:\... |
Encountering Errors Running GitHub Project: Wavelet-pixel domain progressive fusion network for underwater image enhancement - Seeking Assistance |
|python|github| |
null |
There are several aspects to your question which I cannot make out, so here are some general thoughts:
* if performance is an issue, you ***must*** profile your code so that you don't waste your time optimising the wrong parts
* you don't necessarily have to convert your *entire* video frame to `PIL.Image` if you... |
I have a custom layout that lays views from left to right and if horizontal space runs out then it lays the next views below. If I put a basic text element that says hello inside this custom layout then the view occupies all the horizontal space. How can I adjust my setup so the custom layout only occupies the needed h... |
Aren't you meant to be passing a **blob-URL** for the image instead of just blob-data?
Because it doesn't look like you're converting the blob to a URL with this...
canvas.toBlob(function (blob){
jQuery.ajax({
url:"//domain.com/wp-admin/admin-ajax.php",
type: "POST",
... |
I am working on a **Spring Boot** project. For production environment, I am using **SQL Server** AND **Azure App Service**. I followed following steps to configure my deployment.
My database url is-
```jdbc:sqlserver://spring-sql-server.database.windows.net:1433;database=<database-name>;user=<username>@spring-sql-s... |
Driver com.microsoft.sqlserver.jdbc.SQLServerDriver claims to not accept jdbcUrl, ${SPRING_DATASOURCE_URL}: GitHub Actions |
|sql-server|spring-boot|azure-web-app-service|github-actions|azure-sql-database| |
|rust|cors|network-programming|actix-web| |
another approach is to use HTTP Live Streaming - HLS - the web server is simply a standard httpd server - video/audio is preprocessed on server side into a set of bitrate playlists.
The heavy lifting logic is on the client side to retrieve the media as a series of 6 second files, based on bandwidth appropriate playli... |
Need to calculate Matrix exponential with Tailor series with MPI matrix is small 3 x 3 for example
Meanwhile
```
vector<vector<double>> matrixExp(const vector<vector<double>>& A) {
int n = A.size();
vector<vector<double>> E(n, vector<double>(n, 0));
vector<vector<double>> T(n, vector<double>(n, 0))... |
Create one entity for multiple tables? |
I know how to work with Data type in SwiftData (or CoreData). But the one question I feel missed is what is the correct way to care about memory management in different cases.
For example, I have the model for image Data:
```swift
@Model class ImageModel {
@Attribute(.externalStorage) let data: Data
... |
Memory management for image data storing and retrieving with SwiftData (or CoreData) |
|ios|arrays|swift|xcode|swift-data| |
null |
Cannot edit functions.php and any of the website pages anymore on localhost |
{"Voters":[{"Id":20259506,"DisplayName":"Chamalka Jayashan"}],"DeleteType":1} |
I recommend wrapping the Editor inside `ClientOnly` (from remix-utils). |
CSS "position: fixed" respects parent's margin property. Why? |
I'm getting this error:
> Entity Framework Core 6.0.25 initialized 'GerenciadorContext' using provider 'Microsoft.EntityFrameworkCore.SqlServer:6.0.25' with options: None
>
> fail: Microsoft.EntityFrameworkCore.Database.Connection[20004]
> An error occurred using the connection to database 'GerenciadorDeProjet... |
I would like to build a very basic daily sales report. I'm am trying to decide how to structure the database to best accomplish this. Here is a use case for it:
- On Jan 5, 2011, Provider A makes $500 total off of its products
- On Jan 5 2011, Provider A makes $200 total off of its products
- On Jan 6, 2011, Provi... |
Structuring a daily sales database |
I'm developing a library for obtaining information from files in the portable executable format.
It is important for me that the library works in both 32-bit and 64-bit modes.
During testing, I used hard paths for example: L"C:\\Windows\\System32\\ntoskrnl.exe" to display a list of exported functions.
In Windo... |
32-bit applications do not display some files in Windows 10 |
That mention of task placement is specifically referring to the selected VPC subnets, which is definitely still a thing that you have to do. That answer is still completely correct. You have to get your Fargate task to communicate with the outside service through a NAT Gateway. The NAT Gateway's public IP is the IP tha... |
null |
I'm reading the Nick Hodges' book "Coding in Delphi" to learn the Delphi Programming Language and I'm trying to understand the interface usage part in the book.
In a unit, I've put a simple interface:
unit INameInterface;
interface
type
IName = interface
['{CE5E1B61-6F44-... |
How to encode ttsJson data? |
|json| |
null |
[enter image description here][1]My name is Eduardo sorry for my bad English not my native language.
Im playing with Databricks with DLT and I have a question.
When a Play with regular ETL I can full manage the compute resource. I can tur on/off. But when a create a DLT Pipeline the 'job compute' is always on.
... |
If the MDC Adapter you use is the one that uses `ThreadLocal`, e.g. `LogbackMDCAdapter`, then the filter you posted will work fine for virtual threads as well as for platform threads. If your virtual thread would be suspended and then _continued_ on another _Carrier_ (platform) thread, then its `ThreadLocal`s would be ... |
My name is Eduardo sorry for my bad English not my native language.
Im playing with Databricks with DLT and I have a question.
When a Play with regular ETL I can full manage the compute resource. I can tur on/off. But when a create a DLT Pipeline the 'job compute' is always on.
If there is an explanation about ... |
[duckdb-wasm](https://www.npmjs.com/package/@duckdb/duckdb-wasm) npm module is big since it comprise also test and different deployments. Minimal stripped down version should be around 40MB uncompressed / 7.3 MB after compression.
[duckdb](https://www.npmjs.com/package/duckdb) module is also possibly an option.
B... |
IIUC, you need to pass the [`centroid`][1] of the [`unary_union`][2] as the *origin* of the rotation :
```
out = gpd.GeoDataFrame(
geometry=gdf.rotate(
angle=-90, origin=list(gdf.unary_union.centroid.coords)[0]
)
)
```
***NB**: There is no need to [`explode`][3] the geometry, because you do not ... |
> [my home screen showing like this](https://i.stack.imgur.com/abwOE.jpg)
i have used react navigation and my status bar is coming inside background image but not the bottom button which comes on my android device
```
import { View, Text, StyleSheet, Image, Animated } from 'react-native';
import { useWindowDimen... |
Remove the `@Component` annotation from your `@interface` class and add it to the `@Aspect` class. Then, modify your @Around annotation to: `@Around(value="@annotation(fully.qualified.package.here.ValidateUser)")` . I've removed the `execution(* *(..))` part as then the aspect would be involved on *every* (public) meth... |
**I try to provide some more kontext:**
ultralytics_crop_objects is a list with like 20 numpy.ndarray, which are representing pictures (59, 381, 3) e.g.:[ultralytics_crop_objects[5]](https://i.stack.imgur.com/x6QvJ.png).
I started passing a single picture out of the list to recognize.
pipeline.recognize([... |
Here's a better and more general way to handle this. In addition, it won't strip out "#" that are in the middle of a string, as yours would. This relies on the fact that a ### header must be followed by a space.
```
function render(md){
let code = "";
let mdLines = md.split('\n');
for(let i = 0; ... |
{"Voters":[{"Id":1883316,"DisplayName":"Tim Roberts"}],"DeleteType":1} |
I found the solution that I was looking for. first use watch method to detect changes on variable you are storing data on like this:
watch: {
input: function () {
if (isLocalStorage() /* function to detect if localstorage is supported*/) {
localStorage.setItem('storedData', this.input)... |
{"Voters":[{"Id":23825920,"DisplayName":"AlGM93"}],"DeleteType":1} |
The easiest way is to use [Howard Hinnant's free, open-source, header-only date.h][1]:
#include "date/date.h"
#include <iostream>
#include <string>
int
main()
{
using namespace date;
using namespace std::chrono;
auto time = system_clock::now();
std::... |
I am creating physics simulation engine in C++ and SFML. I encountered issues where I want to draw a vector of objects however draw does not draw first object from the vector. If I want to draw next objects it works fine. Has anybody else had any similar issues?
`main.cpp`:
```
#include "../include/engine.hpp"
... |
How do you specify if storage should be local or session when using VueUse?
It doesn't seem to mention it in the docs https://vueuse.org/core/usestorage/ |
How do you specify if storage should be local or session when using VueUse? |
Swift UI custom layout occupies all horizontal space |
|swift|swiftui| |
I am trying to figure out the next term in the following sequence but I'm stumped.
```
1, 5, 2, 10, 3, 15, ....
```
Can someone explain the pattern and hence what the next term should be? |
Sequences - Find the next term in the sequence |
|sequence|series|discrete-mathematics| |