I have several Python packages developed locally, which I often use in VSCode projects. For these projects, I create a new virtualenv and install these packages with pip install -e ../path/to/package. This succeeds, and I can use these packages in the project. However, VSCode underlines the package's import line in yellow, with this error: Import "mypackage" could not be resolved Pylance(reportMissingImports) Again, mypackage works fine in the project, but VSCode reports that error, and I lose all autocomplete and type hint features when calling mypackage in the project. I ensured that the rig
I am trying to run a a project with docker-compose and I am getting mkdir: cannot create directory ‘/home/postgres/pgdata/data’: permission denied. This problem only occurs on windows, on macOS the setup works fine. I think it has to do with user permissions on windows for docker. The compose config: volumes: volume_name: name: data postgres: container_name: postgres image: timescale/timescaledb-ha:pg14.7-ts2.10.2-latest ports: - "5433:5432" volumes: - ./data:/home/postgres/pgdata env_file: - ./.envs/.local/.postgres Any idea what I could do to fix this? Thanks in advance, help is much appreci
I have a simple question that I haven't found or understood anywhere on the internet. I'm a novice powerapps user. I would like to click a button and clear all fields (inputText, checkbox, etc) from a gallery. Details: My data source is some excel tables; this gallery (not a collection or a form for god's sake) has some information from my data source (tab_lista). I tried the following command without success: Mybutton OnSelect ForAll(BrowseGallery1.AllItems; If(ThisRecord.Checkbox1.Value = true;Checkbox1.Value = false);; ThisRecord.InputText1.Text = "" ) Segue uma imagem.
I am using the latest apt packages on Ubuntu 18.04.6: Boost 1.65.1 valgrind-3.13.0 Here is the test file; it intentionally doesn't include any tests: // temp.cpp #define BOOST_TEST_MODULE some_name_here #include <boost/test/included/unit_test.hpp> The source is compiled then linked like this (dumped from cmake): /usr/bin/clang++-12 -O3 -DNDEBUG -Wall -Wextra -O0 -g -std=gnu++17 -o temp.o -c temp.cpp /usr/bin/clang++-12 -O3 -DNDEBUG temp.o -o temp /usr/lib/x86_64-linux-gnu/libboost_unit_test_framework.so I invoke valgrind on the executable: valgrind --leak-check=full --show-leak-kinds=all --tra
When one builds a Flutter web app with flutter build web --release --web-renderer=html then the app does not load (blank screen) when one views it through Safari 16.4 on desktop. It works if one clicks on "Allow WebGL in Web Workers" in the Safari settings (Develop > Experimental Features > Allow WebGL in Web Workers). Can anyone help me with what can be done to fix this with the html web renderer, please? There is no problem on Chrome nor on an older version of Safari (for example 15.5). There is also no problem when one uses --web-renderer=canvaskit, but I can't use that because I need a fas
I have been using Tailwind CSS in VS Code. But suddenly I did notice I can't see the color preview.. I opened the laptop and started working again in the project. I disabled all the extensions and reenabled again. . I restarted the laptop. In the input.css file when I switch the language mode to CSS . I can see it. But when I switch it back to postCSS , I can't see it again . ( @tailwind base; @tailwind components; @tailwind utilities; ) throws an unknown error. I am expecting to see the color preview boxes on the left side again
How can we generate time sorted UUID in snowflake? The function "UUID_STRING()" in snowflake helps to generate random UUIDs but if we want to generate sequential UUIDS or time sorted UUID or we call type-7 UUID, is there any quick way to do that using sql in snowflake and generate around ~100million rows using it to populate in a table?
I’m planning to bring my birth certificate to Japan because the ward office requires you to have original copy of it in order to get married. Would it be possible if I bring it just for that purpose? I’m only staying in Japan for a month and get back to Canada to start my gf’s immigration process so she can live here in Canada with me. Will I have trouble with the Japanese immigration? My other option is sending it through DHL or FedEx to my gf’s address.
I have a project in UIKit, with a Calendar. I implemented a slide animation every time the month is changed. This was the code: /// Desliza una vista hacia derecha o izquierda /// /// - Parameter direccion: Dirección de desplazamiento func deslizarHacia(_ direccion:DireccionDeslizamiento, tipoTransicion: CATransitionType = .push) { let slideInFromLeftTransition = CATransition() // Customize the animation's properties slideInFromLeftTransition.type = CATransitionType.push slideInFromLeftTransition.subtype = convertToOptionalCATransitionSubtype((direccion == .derecha) ? CATransitionSubtype.fromL
I am currently working on an UnrealEngine 5 project and have run into an issue. The project works perfectly fine in the editor and the only warning I see during the packaging process are: “VerifyImport: Failed to find script package for import object 'Package /Script/SQLiteExt”, “VerifyImport: Failed to find script package for import object 'Package /Script/InterchangeFactoryNodes”, and “VerifyImport: Failed to find script package for import object 'Package /Script/InterchangePipelines” After the packaging process is complete though, the game instantly crashes upon loading after opening the ex
I am using laravel websocket in my laravel project. In broadcasting.php, there is pusher configuration like this below: 'pusher' => [ 'driver' => 'pusher', 'key' => env('PUSHER_APP_KEY'), 'secret' => env('PUSHER_APP_SECRET'), 'app_id' => env('PUSHER_APP_ID'), 'options' => [ 'cluster' => env('PUSHER_APP_CLUSTER'), 'encrypted' => false, 'host' => '127.0.0.1', 'port' => 6001, 'scheme' => 'http' ], ], My question is what will be the value of host here when on live server ? My domain is https://test.something.domain. Also can I keep the port number 6001 on live server as in local ?
I am storing my public web resources (CSS, JS) in the 'static' folder, with the following path: 'java/com/myapp/resources/static/**'. Here my configuration classes: SecurityConfig.java @Configuration @EnableWebSecurity public class SecurityConfig { @Bean public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { http .authorizeHttpRequests(authorize -> authorize .anyRequest().authenticated()) .formLogin(form -> form .loginPage("/login") .permitAll()); return http.build(); } @Bean public WebSecurityCustomizer webSecurityCustomizer() throws Exception { return (web) -> w
I would like to count the tokens of my OpenAI API request in R before sending it (version gpt-3.5-turbo). Since the OpenAI API has rate limits, this seems important to me. Example: The function I use to send requests: ask_chatgpt <- function(prompt) { response <- POST( url = "https://api.openai.com/v1/chat/completions", add_headers(Authorization = paste("Bearer", api_key)), content_type_json(), encode = "json", body = list( model = "gpt-3.5-turbo", messages = list(list( role = "user", content = prompt )) ) ) str_trim(content(response)$choices[[1]]$message$content) } Example api_key <- "your_op
I want to assign values of correlations from a matrix to the thickness of areas in the Igraph package using R. Here is my data require(igraph) links = (AI)# AI in a correlation matrix links= as.matrix(AI)#coersÃo do data sete em uma matrix matrixnetwork = graph.adjacency(links, mode="undirected", weighted = TRUE, add.colnames=NULL, diag=FALSE) plot(matrixnetwork) #here I change to network for igraph I try this form edge.width=strength(matrixnetwork) *2.3 #Set node thickness using strength and match within the graph edge.width=E(matrixnetwork)$weight*2.3#I set the thickness of the node using th
I would like to use PCA on the point clouds to find the lane. So the principal component analysis should work fine for this problem. So I’m not sure how to correctly use PCA with Point Clouds and ROS. Here is the code that I have created so far: #include <iostream> #include "ros/ros.h" #include "std_msgs/String.h" #include <vector> #include <sensor_msgs/LaserScan.h> #include <sensor_msgs/PointCloud2.h> #include <sensor_msgs/PointCloud.h> #include <laser_geometry/laser_geometry.h> #include <tf/transform_listener.h> #include <Eigen/Core> #include <pcl_ros/point_cloud.h> #include <pcl/point_types
How do I implement the make file to link everything together correctly? What I have: CC = g++ # Compiler flags: # -g - debugging info. # -Wall - used to turn on most compiler warnings. CFLAGS = -g -Wall # The build target TARGET = icbins # To bring exe up to date: $(TARGET): main.o m1/cell.o m1/abstractions.o m1/expression.o m1/arithmetic.o m1/logic.o m1/cell.o m1/grid.o parsing/token.o parsing/lexer.o parsing/parser.o interface/icbins.o $(CC) $(CFLAGS) -o $(TARGET) main.o m1/cell.o m1/abstractions.o m1/expression.o m1/arithmetic.o m1/logic.o m1/cell.o m1/grid.o parsing/token.o -lncurses main.
so my code is supposed to be implementing karatsuba algorithm for multiplication. this is my code #include<stdio.h> #include<string.h> #include<stdlib.h> /* karatsuba's algo: you have 2 numbers x,y you halve each of them a = 1st halve of x b = 2nd halve of x c = 1st halve of y d = 2nd halve of y n = number of digits of the biggest number if it's odd then it is decremented by 1 id n is odd then a and c take a bigger part than b and d respectively. if number of digits of both numbers are different we shift as in concat zeros to the right of the lowest by the difference of the number of digits be
I am starting to use Polars as a replacement for Pandas. I am very interested in using the show_graph() method to my team to show some of the benefits. One of the biggest benefits I can see is the use of scan_csv. However I am seeing some oddities that I cannot explain. I have the following code using the iris data set. import polars as pl x = pl.scan_csv('iris.csv') x.show_graph() x = pl.scan_csv('iris.csv').filter(pl.col('variety') == "Setosa").select("petal.length").sum() x.show_graph() I am getting random pi and sigma characters. Can anyone explain what the pi and sigma mean? In addition i
I am using Spring boot 3.0.5 along with Spring Security 6. I am facing this issue when I am trying to call an endpoint to register an account into the application: An expected CSRF token cannot be found @Configuration @EnableWebSecurity @RequiredArgsConstructor public class SecurityConfig { private final JwtAuthenticationFilter jwtAuthenticationFilter; private final AuthenticationProvider authenticationProvider; @Bean public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { return http .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests() .requestMatchers(
I have a table with two columns which contains date and sales order. I want to create an another table using DAX which contains distinct sales orders getting data from sales order column for making some relationships with other tables. I use below DAX code, but my issue is even after filtering the data from the sheet1 table my DAX table shows all the distinct sales orders from the sales order table. I want to get distinct sales order from filtered table if there any filter for the date. Distinct Sales orders = DISTINCT(Sheet1[Sales Order])
$ npm start > [email protected] start > react-scripts start "react-scripts" no se reconoce como un comando interno o externo, programa o archivo por lotes ejecutable. al querer ejecutar npm start para ver mi proyecto en el navegador, se genera este problema y no lo ejecuta. Nose que hice.
I have a panel dataset (multiple time series indexed on IDs and time) in which I want to perform multi-step forecasts (e.g. 5-steps forecasts). An example of the dataset (pandas dataframe) is the following: IDs, time, f1, f2, ... 1 0 4.1 50 ... 1 1 3.3 44 ... 1 2 2.6 11 2 0 2.1 79 2 1 4.9 56 ... 2 2 0.1 11 ... ... ... ... ... However, i don't know how to train my models and specifically how should I split my data (train/test set). The end goal is to perform 5-steps forecasts given as inputs to the trained model x-length windows. I was thinking to split the data as follows: 80% of the IDs would
I use Harbor as a private Registry for my Docker images, and I store my images in different projects (ex: myproject1, myproject2, etc). Then I create one robot account in my project "myproject1" and one robot account in "myproject2" Finally, I use the DOCKER_AUTH_CONFIG variable in Gitlab to set up robot accounts, such as : { "auths": { "myharborregistry/myproject1": { "auth": "base64.... token 1 created in myproject1" }, { "myharborregistry/myproject2": { "auth": "base64.... token 2 created in myproject2" } } } The problem is that with this configuration, Gitlab randomly takes one of the 2 au
i need to show random number that change every day (24h) and keep show generated number day before that not change when user refresh page this what i have only for generate random number <script type="text/javascript"> // this gets an iterable of all elements with a class of "result" const elements = document.getElementsByClassName("result"); // you can use for..of to iterate over the elements. Don't use array methods like forEach on elements, elements is NOT an array. for( let element of elements ) element.innerText = Math.floor((Math.random() * 10000) + 99999); </script> i need the number fr
Team, I am required to use developer mode on my iPhone 16, and all the articles suggest that I need Macbook to unlock developer mode using Xcode. But I do not have access to macbook. Is there no other way I can do it just by iPhone itself. Any help will be highly appreciated.
In python, it is possible to create slots classes which do have an explicit __dict__ available. However, I am struggling to get this working with dataclasses: from dataclasses import dataclass @dataclass(slots=True) class A: __dict__: dict[str, object] A() This raises the following on the last line: TypeError: __dict__ must be set to a dictionary, not a 'mappingproxy' It is not even clear to me where this exception actually occurs since there is no further information provided. There also seems to be no information regarding this problem on google. What is the problem here? How do I create a s
I'm at a loss for understanding why I'm getting this vague ItemSpecifics error with my code. import ebaysdk import csv from ebaysdk.trading import Connection as Trading from ebaysdk.exception import ConnectionError from item_description import code_block from item_definition import myitem def addItem(): try: api = Trading(config_file='ebay.yaml') # Open our CSV file that has individual auction item details. with open("auction_data.csv") as auction_data_file: auction_item = csv.reader(auction_data_file) # Skip headers. next(auction_item, None) for row in auction_item: myitem["Item"]["Title"] =
I am trying to learn how SVD works to use it in PCA (principal component analysis), but the problem is that it seam I get wrong results, I tried using np.linalg.svd and this is my code: A = np.array([[2, 2], [1, 1]]) u, s, v = np.linalg.svd(A, full_matrices=False) print(u) print(s) print(v) And this is the result I got: [[-0.89442719 -0.4472136 ] [-0.4472136 0.89442719]] [3.16227766e+00 1.10062118e-17] [[-0.70710678 -0.70710678] [ 0.70710678 -0.70710678]] And I tried to get SVD decomposition on WolframAlpha and I got these results: The magnitude of values seems correct, but the sign is not cor
I am trying to deal with a circular import solely because of type checking, hence I was wondering if there was a TypeScript equivalent of Python's from typing import TYPE_CHECKING ?