instruction stringlengths 0 30k ⌀ |
|---|
|javascript|angular|typescript|twitter-bootstrap| |
null |
|delphi|nested| |
I had the same problem. The thing with gc.collect() and cuda.empty_cache() is that these methods don't remove the model from your GPU they just clean the cache.
So you need to delete your model from Cuda memory after each trial and probably clean the cache as well, without doing this every trial a new model will re... |
I've already setup workload identity federation. We have created a management service account Where we are impersonating other Service Accounts.
We have 2 different release pipeline to deploy cloud function. We are using 2 different SA (service account) for each. Let's say SA1 and SA2.
When I deploy first release ... |
I have a SSRS report that I need to export as PPT file
In order to generate the slides, I put rectangles of the exact size of a slide in cm (33.867 x 19.05 cm), for each slide with the necessary content inside
There is a footer on each page (2cm) so each rectangle has a height of 17,05cm instead of 19,05
I rem... |
I wasn't able to make proposed `static_unique_ptr_cast` working. Here is a working version:
```
#include <iostream>
#include <memory>
class Base {
public:
virtual void Do() { std::cout << "Base::Do" << std::endl; }
};
class Derived: public Base {
public:
void Do() override { std::cout << "Derive... |
We are migrating to Azure platform as a service, and it looks like we can't use Crystal Reports. We use CR to generate PDFs based on the rpt files. I want to see if there is any low code tools out there that have a visual designer than will allow database data (or JSON data) and generate a PDF.
I know we can work... |
Alternative to Crystal Reports in Azure PAAS (app model) |
|azure|crystal-reports| |
I'm using an incredibly simple pipeline to build my angular App. I run it on an openshift cluster.
these are the two tasks:
```
tasks:
- name: fetch-source
params:
- name: url
value: $(params.repo-url)
- name: revision
value: feature/tekton
taskRef:
... |
I have a nextjs application. its hosted on Ubuntu OS.
When I run, npm run start or npm start, the application runs.
but when the terminal is closed, service stops and site gets down.
On same server, I also have an express application. I am using pm2 to start the express server.
But when I try to run next ... |
Issue with next js site deployment (production mode) |
|next.js|deployment| |
null |
I am newbie in bash linux.
I already make Boot Menu in Batch and Powershell. I want to make it in bash.
In bash, when i type efibootmgr, the output:
```
BootCurrent: 0003
Timeout: 2 seconds
BootOrder: 0011,0000,0001,0013,0014,0015,0004,0003,0016,0017
Boot0000* ThrottleStop UEFI
Boot0001* rEFInd Boot Manag... |
As of reticulate version 1.34.0.9000 In this case, you need to explicitly pass the conda env in one of the 3 forms:
NOTE: 1 and 2 will work in older versions.
1)
use_condaenv(condaenv="r-reticulate")
2)
use_condaenv(condaenv="C:\\Users\\caleb\\AppData\\Local\\r-miniconda\\envs\\r-reticulate\\... |
I have table which represents sequence of points, I need to get sum by all possible combinations. The main problem is how to do it with minimum actions because the Real table is huge
|Col1|col2|col3|col4|col5|col6|ct|
|Id1 |id2 |id3 |id4 |id5 |id6 |30|
|Id8 |id3 |id5 |id2 |id4 |id6 |45|
The expected r... |
I'am working on a React app and i use react-avatar-editor to resize a user profil picture, i have a problem while trying to zoom in the picture, at one point the zoom also applies to the browser tab instead of just the picture,
```
import { useRef, useState } from "react";
import AvatarEditor from "react-avatar-... |
SpringBatch ItemRepositoryReader, How to change datasources in a JPARepository? |
|spring-batch|jparepository| |
Given an existing table:
```
create table if not exists test.my_table (
name string,
value int64
);
insert into test.my_table (name, value)
values ('alex', 10);
```
You can merge new values using `UNION ALL` and many `select` statements.
```
merge into test.my_table t
using (
(select 'alex' n... |
Also answered here: https://forum.camunda.io/t/what-is-the-life-cycle-of-an-external-task-topic/50957.
But for reference here, there is no direct storage of the topic in any camunda tables. Actually the topic name is saved in the table ACT_RU_EXT_TASK as part of the external task. Once all external tasks associated ... |
I use this, but I cannot confirm if it works Jupyter notebooks or not.
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = "0" # or "1", "2", "3", ... |
```
import pandas as pd
data = {'A': ['1, 1, 1', '1', '2', '3', '1'],
'B': ['1', '1,1,1,1', '2', '4', '1'],
'C': ['1, 1', '2', '3', '5', '1']}
df = pd.DataFrame(data)
def all_same(row):
cc = set()
for val in row:
try:
val = set(val.replace(" ", "").split(","))... |
It's going to depend a bit on your XSLT processor. In the Java world you're generally either using Xalan (which is XSLT 1.0) or Saxon (which is XSLT 3.0), but you've tagged the question XSLT 2.0 so we're left guessing a bit.
One way to handle this is with `use-when` attributes:
`<xsl:message use-when="$debug-leve... |
|python|pysimplegui| |
```
import pandas as pd
data = {'A': ['1, 1, 1', '1', '2', '3', '1'],
'B': ['1', '1,1,1,1', '2', '4', '1'],
'C': ['1, 1', '2', '3', '5', '1']}
df = pd.DataFrame(data)
def all_same(row):
cc = set()
for val in row:
try:
val = set(val.replace(" ", "").split(","))... |
Here are the relevant links
* https://www.sandbox.paypal.com/bizsignup/
* https://developer.paypal.com/dashboard/accounts -> Link other sandbox accounts to this developer account
* https://www.sandbox.paypal.com/businessprofile/settings/email
* https://developer.paypal.com/dashboard/notifications |
I get an error when using Pyrogram with Threading in Tkinter |
|python|multithreading|tkinter|customtkinter|pyrogram| |
null |
If I run the code below, `xStep1` does not have an attribute named pivot. According to the doc's it should have this attribute. Any help would be appreciated.
x=Diagonal(10000)
x[1,3]=0.3
x[3,1]=0.3
xStep1=chol(x,pivot=TRUE) |
If you have similar enums which are all based on a single value, you can let them implement a common interface:
```java
public interface ValueAware<V> {
V getValue();
}
```
And then use the following method to find instances based on a value:
```java
public static <T extends Enum<T> & ValueAware<V>, V> Opt... |
{"OriginalQuestionIds":[45781692],"Voters":[{"Id":7582247,"DisplayName":"Ted Lyngmo","BindingReason":{"GoldTagBadge":"c++"}}]} |
I used react to develop my website and deployed it on github pages, but the problem is, the home page works, but other pages cannot be found. It loads shows the page and then suddenly goes off and says “404, file can not be found” after few seconds.
I don’t understand why, I have tried various methods to fix it. Kin... |
One of my pages keeps showing file not found |
|http-status-code-404|custom-error-pages|file-not-found| |
null |
here is my prometheus yml:
global:
scrape_interval: 3s # Set the scrape interval to every 3 seconds. Default is every 1 minute.
evaluation_interval: 5s # Evaluate rules every 5 seconds. The default is every 1 minute.
# scrape_timeout is set to the global default (10s).
# Alertmana... |
|sapui5|sap| |
You can try with the below snippets. It will work as per your requirement.
%dw 2.0
output application/json
var inpDate = "03/01/2024" as Date {format:"MM/dd/yyyy"}
var today = now() as Date {format:"MM/dd/yyyy"}
---
{
"inpDate": inpDate,
today:today,
"isChec... |
I'm helping a user get setup with Cytoscape on our HPC and I'm wondering if there are ways besides the opencl support to get higher performance from Cytoscape. What I mean is I have a 94 cpu node that seems to be running one of the layout operations of a sample dataset in almost the same speed as the user's desktop mac... |
I am trying to plot a scatterplot for the data frame(posted below). I want to represent the scatterplot with the different stages being shown as different markers(circle,square etc) and different products being shown as different colors(red,blue etc). so far i have done that but i have a hard time showing a legend that... |
create table login
(
meter_no number(30,5),
username varchar2(20),
name varchar2(20),
password varchar2(20),
user varchar2(20)
);
create table login
(
meter_no number(30,5),
username varchar2(20),
name varchar2(20), ... |
|sql|oracle| |
how to use custom function ?
example in documentation nuxt not working
```
export default async function customSearchContent(search: Ref<string>) {
const runtimeConfig = useRuntimeConfig()
const { integrity, api } = runtimeConfig.public.content
const { data } = await useFetch(`${api.baseURL}/search${i... |
I am interested in the 'CSI-Prediction' repository by sharanmourya available on GitHub at https://github.com/sharanmourya/CSI-Prediction. This repository contains PyTorch code for 'Spectral Temporal Graph Neural Network for massive MIMO CSI Prediction.' I would like to run the code and reproduce the results mentioned i... |
Inquiry about Running the Source Code - CSI-Prediction Repository |
|pytorch|stem| |
null |
I am trying to analyse execution time of a query. I used the following statement to check CPU and elapsed time:
SET STATISTICS IO, TIME ON;
For a single query, I can understand the CPU and elapsed time. But when it comes to a complex query, say as follows (Pretty big and for the time being, not sharing any sa... |
<!-- begin snippet: js hide: false console: true babel: null -->
<!-- language: lang-js -->
$(function() {
$('.map').maphilight();
});
var myData = {
"left-eye": {
"title": "",
"image":"",
"description": "Lorem ipsum A dolor sin ame... |
### What are the details of your problem?
I have a [Sonatype Nexus Repository Manager](https://www.sonatype.com/products/sonatype-nexus-repository) that has an unknown number of hosted repositories for the [Maven-3 m2](https://maven.apache.org/settings.html) format. I'd like to easily make sure all available options... |
I'm trying to run a dag with some `DbtTestOperator` and `DbtRunOperator` but got an error as the `dbt_packages` is not in the repo bucket.
Even though, I added the `dbt_utils` package in the file `packages.yml` the dag failed because of inexistent `dbt_packages` folder.
packages.yml
```
packages:
- package: c... |
Error in Cloud Composer with DBT where path /dbt_packages/dbt_utils/dbt_project.yml is not found |
|airflow|dbt|airflow-2.x| |
null |
Try this approach:
```sql
UPDATE dbo.[user]
SET NewName = (
SELECT STRING_AGG(
(SELECT CHAR(65 + CAST(RAND() * 26 AS INT)) -- Generates a random uppercase letter (A-Z)
FROM master..spt_values AS s
WHERE s.type = 'P'
FOR XML PATH('') -- conver... |
Zoom problem while using onWheel with react-avatar-editor |
|reactjs| |
null |
When you subtract `p1` from `p2` i.e. `(p2 - p1)`, you're essentially finding the difference between their memory addresses. Since both pointers are pointing to elements within the same array, the difference between their addresses indicates how many elements apart they are in the array. So, `p2 - p1` gives you 2, indi... |
I have a Symfony application using Doctrine ORM. When creating a new Temp entity with relationships and trying to persist it, I get a 500 Internal Server Error.
My`TaskController.php`:
```php
/**
* @Route("/tasks", name="task_list")
*/
public function listTasks(TaskRepository $taskRepository):... |
Symfony 7: Doctrine EntityManager persist() fails on new entity with relationships |
|php|symfony|doctrine-orm|doctrine|entitymanager| |
```
$upgradeInvoke = Invoke-Command -Session $session -ScriptBlock {
try {
Shutdown.exe /r /f /t 1200 /d p:4:2 /c "Triggerd Reboot Timer for 20 minitus"
$arguments = "/s", "/v`"/qn REBOOT=ReallySuppress`""
$process = Start-Process -FilePath $using:setupFullPath -... |
Is there a way to have joiner/indexer or composite node with an update policy? The update policy has the requirement:
1. The output is ready once at least one port receives a value.
2. Mechanism to check if a port is ready at the receiving node e.g. null pointer or default constructor or user defined invalid value ... |
Update Node from OneTBB Library |
|c++|graph|intel|tbb|tbb-flow-graph| |
Use a set, aggregate with [`issuperset`]():
```
Type = {3,4,5}
df['Date'] = pd.to_datetime(df['Date'])
keep = df.groupby('Date')['Type'].agg(Type.issubset)
out = df[df['Date'].isin(keep.index[keep])]
```
Variant:
```
Type = {3,4,5}
df['Date'] = pd.to_datetime(df['Date'])
out = df[df.groupby('Date')... |
I have a Python/Flask code that executes two SQL queries :
```
def valeurs_thematiques():
query_thematiques = """
SELECT NOMTHEMATIQUE
FROM THEMATIQUES
"""
connection = connect(path)
cursor = connection.cursor()
cursor.execute(query_thematiques)
res_them = cursor.fetchall()
... |
You are getting the errors because you have not indented after your if-statements, the engine expects to run everything **one indentation in** from the if-statement if it evaluates to `true`.
Hence solving your errors for each if-statement would simply be i.e.
``` yaml
- ${{ if contains(parameters.host, '_T1_')... |
You shouldn't open/close the file each time you're writing something in it, as you did in your `WriteToFile` function (in append mode)
Just create an `ofstream` object (part of std library) and pass it to your `WriteToFile` function like this.
void SongLibrary::SaveAllToFile(string fileName)
{
... |
I have an Enum that I already use for multiple other purposes, however in those cases I use the Enum like a public variable of the class meaning I can access it like `EntityManager.FAll`.
However, in the new use case I have for it I want to use the Enum in that class as a function parameter of another class's function... |
WSO2 MI 4.2.0
I am using Wso2 micro integrator version 4.2.0. and a rollover policy based on a time period for the log files. I'm trying to delete old rollover files with more than 58 days, meaning that I want to keep ~58 days of logs with the following configuration (as recommended on https://apim.docs.wso2.com/en/... |
n <- 9
success <- 0
throw <- function(last_throw = 1, hist = "") {
if (nchar(hist) == n) {
success <<- success + 1L
return(NULL)
}
for (i in last_throw:6) throw(last_throw = i, hist = paste0(hist, i))
}
success
# [1] 2002
Simplified:
... |
If you want to replicate **SectionList** component using FlashList, your data array needs to look different. It is still a flat array of items.
So in regular FlashList implementation like a **FlatList** you have an array like this:
const data = [{...card0}, {...card1}, {...card2}]
If you want to impleme... |
In my VM, the IP address changed, so changing the **/etc/hosts** file by adding the following at the end solved the issue.
192.168.0.7 puppet-master puppet-master.local
192.168.0.8 puppet-client puppet-client.local
192.168.0.7 puppet puppet.local
Here puppet-master is the name of the puppet server s... |
I have this code but I don't actually get the email text.
Have I got to decode the email text?
import sys
import imaplib
import getpass
import email
import email.header
from email.header import decode_header
import base64
def read(username, password, sender_of_interest... |
How to get the text of the email body? |
|email| |
I have table which represents sequence of points, I need to get sum by all possible combinations. The main problem is how to do it with minimum actions because the Real table is huge
|Col1|col2|col3|col4|col5|col6|ct|
|:---|:---|:---|:---|:---|:---|:-|
|Id1 |id2 |id3 |id4 |id5 |id6 |30|
|Id8 |id3 |id5 |id... |
Remote X11 apps are slow unless running over a Gigabit LAN, and I'm looking for a protocol somewhere between ANSI escape codes and Postscript programs, that enables rendering graphical UI widgets and windows sent by a remote process over SSH to the local X11 server.
Can I somehow seamlessly redirect connections from... |
In my application the user can assume one of 3 different roles.
These users can be assigned to programs, and they can be assigned to 3 different fields, each of those exclusevely to a role.
In my API I'm trying to query all my users and annotate the programs they are in:
```
def get_queryset(self):
... |
I have
all project 'org.springframework.boot' version '3.2.3'
1. spring authorization Oauth 2.0 server http://auth-server:9000
2. User Interface (React JS application)
3. Gateway (aka Oauth 2.0 client)
4. Resource server
Below is the configuration of SecurityConfig Resurce - server
`@Configuration
@Enab... |
An expected CSRF token cannot be found or No static resource oauth2/authorization/l |
|spring-security-oauth2|spring-cloud-gateway|spring-resource-server| |
null |
You can use a view composer or share data directly with all views using a closure in boot method.
use Illuminate\Support\Facades\View;
public function boot(): void
{
View::composer('*', function ($view) {
$user = auth()->user();
$view->with('current_user', $user);
... |
I have created APINetworkManagerAll here i have created serviceCall and calling that in viewcontroller. here postGenericCall2() is called and response also coming but my given `param` values not coming instead it says nil why? i am passing same values in postmn then response coming properly? where am i wrong? guide me ... |
I need to create a custom deserializer for arrays because I get them sometimes as strings. I did it but now it can't deserializer normal arrays.
Is there a way to call super deserializer and only when it fails call the custom one?
the code:
```
class ArrayDeserializer : JsonDeserialolizer<Array<Int>>() {
... |
null |
Here is my solution, first sort the array as then call the recursive function.
public static void main(String[] args) {
int[] input = new int[]{2, 7, 11, 15};
Arrays.sort(input);
System.out.println(twoSumWithRecursion(input, 99, 0, input.length-1));
}
private static Strin... |
I am new to thymeleaf and spring boot. This is my first Project and I am unable to solve the above mentioned error.
My index.html looks like:
```
<!DOCTYPE HTML>
<html xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
xmlns:th="http://www.thymeleaf.org"
layout:decorate ="~{layout/default}... |
Post method generic codable API response not coming properly in swift |
|json|swift|web-services|parameters|codable| |
I have a code below:
```
'use client';
import { Swiper, SwiperSlide } from 'swiper/react';
import 'swiper/css';
import 'swiper/css/pagination';
export default function Component() {
const cards = [{ id: 0 }, { id: 1 }, { id: 2 }];
return (
<Swiper
slidesPerView={3}
spaceBetween={30}... |
Next.js Swiper slide has full width before width calculation |
|javascript|reactjs|typescript|next.js13|swiper.js| |