on-internet

Oracle poorly performing SQL

I am working on a legacy system which uses Oracle database. Please don't ask me why data is stored the way it is :), there is a table ofsd_temp which has a varchar2 column entity_nums which has string type numbers separated by pipe delimiters. e.g. |432124| |12678|762333|74774| There are about 300K records in ofsd_temp table, there is another table ofdl which has 150K records, but the column type is number instead of string. The below SQL which is taking a very long time to execute, returns about 130K rows. I can't change the way data are stored, but if you have any suggestions to make it fast

Join the discussion →

I cannot install flash-attention

I try to run my vector search code but I got this error: ImportError: This modeling file requires the following packages that were not found in your environment: flash_attn. Run `pip install flash_attn --no-build-isolation` as in the github repository. This error probably occured in this line: model = AutoModel.from_pretrained(model_dir, trust_remote_code= True).cuda().eval() There are two ways mentioned in the readme file inside the flash-attn repository. The first one is pip install flash-attn --no-build-isolation and the second one is after cloning the repository, navigating to the hooper f

Join the discussion →

No guarda fecha y hora en campo date de bd oracle

Tengo un problema con un campo de tipo date en Oracle ya que no guarda la fecha y hora actual; solo guarda la fecha. Hago un insert desde una app java y coloco, donde va el campo fecha, SYSDATE para que me inserte fecha y hora y solo inserta fecha. Ya intenté colocar CURRENT_TIMESTAMP, TO_CHAR(sysdate,'dd/mm/yy hh;mm:ss'), SYSDATE y no ha funcionado. ¿Será que el tipo de dato debe ser timespan en lugar de date? "Insert into act (id,folio,claveservicio,idcontri,clvusuario,fecha,fecharegistro,fechaact,clvusuaruiact,concluye,observaciones,clvstatus) values(?, select nvl(max(folio)+1) from act),?,

Join the discussion →

Converting FOCAL to language without GOTO: can an "if" statement with multiple GOTO be parsed algorithmically?

I know that I can translate simple GOTO inside a for or while loop by using if/else or break statements. My question is about trying to write a 'translator' function which automatically converts FOCAL ternary IF statements, e.g IF (x-5) 3.1, 4, 6.2 , where those numbers indicate GOTO the designated line numbers elsewhere in the code. Since the target lines may then lead to other IF statements or even back to the original IF statement, can an algorithm successfully "de-spaghettify" the code, or is this one of those software problems that is known to be incomplete? Presumably a chunk of translat

Join the discussion →

How to access Youtube APIs from server

I'm building a yt summarizer app. So for that I'm using youtube-transcript-api & pytube, to get the transcript, or audio if the first is disabled. Worked fine on my Windows laptop. But on my Apache server running on Ubuntu, linux VM (DigitalOcean droplet), it isn't working at all. It says subtitles are disabled when it actually isn't, HTTP Error 400: Bad Request, "This request has been detected as a bot, please try again or log in to view". What can I do to make it work? No api-keys or creds are given in code at the moment, it directly worked locally.

Join the discussion →

xf:dispatch : dynamic event name based on context node not working?

I'm trying to define a bank of buttons based on the contents of an instance. I am doing this to de-clutter my view, by placing the actions in the model. I am using the dispatch element to fire off a dynamically named event (using the 'name' element). It seems the context of the node is lost within a group or repeat? Here's a test case - the first case works - where I hardcode an explicit XPath to my data, the other test-cases show that the context is apparently not available when I try and reference this dynamically. <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="declarative4all

Join the discussion →

IllegalStateException: ApplicationContext failure

I have spring boot application with 3.1.2 version and trying to migrate spring boot to the latest version i.e 3.3.2. But I am facing problem while running Test Suite. I am using TestNG v7.4.0 <dependency> <groupId>org.testng</groupId> <artifactId>testng</artifactId> <version>7.4.0</version> <scope>test</scope> </dependency> I have abstract class which extends AbstractTestNGSpringContextTtests @ContextConfiguration(locations={"classpath:service-data-context.xml"}) @TestExecutionListeners({DependencyInjectionTestExecutionListener.class, TransactionalTestExecutionListener.class}) @Transactional p

Join the discussion →

Android sdk 34 java.lang.RuntimeException:Requested enabled DevSupportManager, but BridgeDevSupportManager class was not found or could not be created

After upgrading the Android SDK from version 33 to 34, the app crashes on Android 34, although it runs smoothly on Android 33. the following changes have been made: buildscript { ext { googlePlayServicesVersion = "+" firebaseMessagingVersion = "21.1.0" buildToolsVersion = "34.0.0" minSdkVersion = 21 compileSdkVersion = 34 targetSdkVersion = 34 androidXAnnotation = "1.1.0" androidXBrowser = "1.0.0" pdfViewer = "3.1.0-beta.1" } My current React Native version is 0.68.6. Error in Android 34: FATAL EXCEPTION: java.lang.RuntimeException: Unable to create application com.appname.MainApplication: jav

Join the discussion →

Expected number of full neighbors of a Voronoi cell in $\mathbb{R}^3$

Given a Voronoi diagram in three dimensions, what is the expected number of full neighbors E(C) of a Voronoi cell? Two adjacent cells are considered full (or Gabriel) neighbours in R^3 if the line joining their generator points intersects their common face [1] What I have tried I came across table 5.5.2 in [1] that claims E(C) is exactly 8. I cannot understand how this number of derived. Cross referencing with figure 5.5.15 shows empirical evidence in the form of a unimodal histogram with mean ~8. But I can't understand the process that was used to derive it. As an experiment, this python scri

Join the discussion →

My ECS task mapped with portMapping = 9200 but the application end point is running only in port 8080

I am fairly new to AWS and Docker. What I have done is: I have created a sample Spring Boot get endpoint Created a docker image from it and pushed the same to DockerHub Created an ECS cluster and defined the task for the same, selected Fargate. My cluster and task definition both are running. While creating the task, I configured the portMapping to be 9200: but when I hit the public IP url with http://[ip]:9200/(endpoint), this gives "The site can't be reached" But when I hit the url with 8080 port http://[ip]:8080/(endpoint), I get proper response. My question is what is the reason for the sa

Join the discussion →

Decoding Google News Redirect URLs

I am currently working on a project that involves crawling news articles from Google News via RSS feeds. After gathering these news articles, my next task is to convert the provided Google News redirect URLs into their original URLs. Google News typically provides redirect links like this: https://news.google.com/rss/articles/CBMivAFBVV95cUxQQ2J4MGNnRjR2SzdKM2hjQzdkVV83cE8xU3BYN0RhbVhGWTZfXzFrcWMxZnpONmFrbE53ZEVXVy1CSnZZT1ZPQl9UblljRHdBelRJdEdXLUhBajFQMlRidEZ1dUtqY0U0dXI5R2tnWU9uT1cteGg2UTVtNU9oaU1TRGJuLXAxa3A2cnhqeURaUG1YdjRwZk9IZ0VFaG1ON01xLVVPVVYwZmMtSmFva09vZ2JicVFCal91UVNsTA?oc=5 Initiall

Join the discussion →

How can I fill the gaps on the Shopify collection page when I hide or exclude products?

The first page is not filled entirely, but it already created other pages after excluding/hidding particular taged products. {% for product in collection.products %} {% if product.tags contains 'hideProd' %}{% continue %}{% endif %} <!-- your product grid item --> {% endfor %} Gaps should fill. For example, if there are 100 products in a collection and the pagination is set to 5 pages (with 20 products per page), but 20 products are excluded or hidden, the pagination should adjust to display only 4 pages.

Join the discussion →

How to use signal with Angular Reactive Forms

I have a template driven form in Angular 17 and I can use signal with my form like this: @Component({ selector: 'app-root', template: ` <input [ngModel]='firstName()' (ngModelChange)="firstName.set($event)"> <input [ngModel]='lastName()' (ngModelChange)="lastName.set($event)"> `, }) export class App { firstName= signal('first name'); lastName= signal('last name'); } Any idea how can I use angular signals with reactive forms?

Join the discussion →

pyTelegramBotAPI: set_message_reaction() - How do I make my Telegram bot react with a specific emoji to any message it recieves?

This is my code: import telebot BOT_TOKEN = '-' bot = telebot.TeleBot(BOT_TOKEN) @bot.message_handler(func=lambda message:True) def thumbs_up(message): bot.set_message_reaction(message.chat.id, message.id, '👍') if __name__ == '__main__': bot.polling() And this is the error I get: payload['reaction'] = json.dumps([r.to_dict() for r in reaction]) ^^^^^^^^^ AttributeError: 'str' object has no attribute 'to_dict' I don't understand how I can use a JSON list like the docs say: https://pytba.readthedocs.io/en/latest/sync_version/index.html#telebot.TeleBot.set_message_reaction https://core.telegram.o

Join the discussion →

Getting error when trying to install Pandas using pip

I am trying to install Pandas. I did: pip install pandas And I tried other versions: pip install pandas=2.2.1 Always the same error: root@thinkpad:/# pip install pandas==2.2.1 Collecting pandas==2.2.1 Downloading pandas-2.2.1.tar.gz (4.4 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.4/4.4 MB 12.6 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... error error: subprocess-exited-with-error × Preparing metadata (pyproject.toml) did not run successfully. │ exit code:

Join the discussion →

Use of deleted function std::unique_ptr<_Tp, _Dp>& std::unique_ptr<_Tp, _Dp>::operator=(const std::unique_ptr<_Tp, _Dp>&)

I am currently trying to set up a very basic Entity Component System. For this, I have defined the following classes: class Component { public: virtual ~Component() {}; // Ensure polymorphic behavior with a virtual destructor }; class TransformComponent : public Component { glm::vec2 position = {0.0f, 0.0f}; float rotation = 0.0f; float scale = 1.0f; }; using identifier = uuids::uuid; class Entity { private: identifier id; bool isActive = true; std::string name = "new entity"; std::vector<std::unique_ptr<Component>> components; public: Entity() : isActive(true), id( UUID::get()), name("NEW") {

Join the discussion →

Downcasting a type with a named lifetime parameter

I have the following code: use std::any::Any; use std::borrow::Cow; // Base trait for downcasting pub trait AsTranslationUnit<'a> { fn as_any(&self) -> &dyn Any; } pub trait TranslationUnit<'a>: AsTranslationUnit<'a> { fn file_stem(&self) -> &Cow<'a, str>; } // Implementation of AsTranslationUnit for all types implementing TranslationUnit impl<'a, T: TranslationUnit<'a> + 'a> AsTranslationUnit<'a> for T { fn as_any(&self) -> &dyn Any { self } } #[derive(Debug, PartialEq, Eq, Clone, Default)] pub struct ModuleInterfaceModel<'a> { pub file_stem: Cow<'a, str>, } impl<'a> TranslationUnit<'a> for M

Join the discussion →

Installing legacy Ruby in new Ubuntu installlation using a Dockerfile (installing Ruby 2.5.3 on Ubuntu 24.04 (Noble Numbat))

I have a separate Ruby project which I need to interact as an endpoint. The problem is that installing with RBEnv and rvm is failing. For RBEnv, it’s because it’s not supported, and for rvm it’s the same problem I am having with my Docker implementation. Error running '__rvm_make -j4', 214.9 please read /usr/local/rvm/log/1719922831_ruby-2.5.3/make.log But I want to use a Dockerfile to manage dependencies and run the project with just Ruby on Rails in the Docker image. This is my Dockerfile: # Use an official Ubuntu base image FROM ubuntu:24.04 # Install dependencies RUN apt update && apt inst

Join the discussion →

Installing legacy Ruby in new Ubuntu using a Dockerfile (installing Ruby 2.5.3 on Ubuntu 24.04 (Noble Numbat))

I have a separate Ruby project which I need to interact as an end point. The problem is that installing with RBEnv and rvm is failing. For RBEnv, it’s because it’s not supported, and for rvm it’s the same problem I am having with my docker. Error running '__rvm_make -j4', 214.9 please read /usr/local/rvm/log/1719922831_ruby-2.5.3/make.log But I want to use a dockerfile to manage dependancies and run the project with just rails in the docker image. This is my Dockerfile: # Use an official Ubuntu base image FROM ubuntu:24.04 # Install dependencies RUN apt update && apt install -y \ curl \ ca-cer

Join the discussion →

Sleep system call very broken on Mac OS X

I'm trying to run a service on my Mac Mini (M1). But it has unexplained random delays from few seconds to 20 minutes many times during the day. It works perfectly on Linux. Sleep appears to be very broken on Mac OS X. The machine doesn't run anything else, only a few development tools are installed, screen and keyboard are not connected. I made a minimal reproduction: #include <iostream> #include <thread> #include <chrono> int main() { for (;;) { std::this_thread::sleep_for(std::chrono::seconds(10)); const auto now = std::chrono::system_clock::now(); std::cout << "Wall clock: " << now << std::

Join the discussion →

Selenium On Newly Installed Ubuntu 24+ For Python 3.12 Will Not Run

For the past week I have been working on trying to get Selenium to function at all on a laptop that I freshly installed Ubuntu onto solely to work on personal projects. I was not finding any good solutions from Google search, most of the results were from 5+ years ago and even the newer examples did not function. I have done basic troubleshooting. On top of that I went through the source code and had it pause and print out information to make sure they were correct. None of this has helped, not even getting the selenium manager executable, the top one from here and putting it into the spot tha

Join the discussion →

Dynamic Overlay with UserId on MuxPlayer Disappears in Fullscreen Mode

I'm using the MuxPlayer component for video on my website and have created an overlay that displays the userId dynamically. The overlay works perfectly in normal mode, but it disappears when the video enters fullscreen mode. Here is the code I'm using: <> <div className="relative overflow-hidden"> <div className="absolute inset-0 bg-black text-white bg-opacity-20 flex justify-center items-center z-40"> {userId} </div> <MuxPlayer title={title} playbackId={playbackId} className={cn(!isReady && "hidden")} onCanPlay={() => setIsReady(true)} theme="minimal" onEnded={onEnd} preload="auto" defaultSho

Join the discussion →

ScrollY issue in Datatable

I am using Datatable to give style to my table in HTML and I had to enable the ScrollY. Although It worked, it has a style problem that I am trying to solve. When you resize the window, for some reason, the header of the table doesn't resize with the table itself. I had some research and I found out when the web page is ready,it creates this tags related to the table: <div class="dataTables_scrollHeadInner" style="box-sizing: content-box; width: 1632px; padding-right: 0px;"> <table class="table table-hover table-striped cell-border table-bord dataTable no-footer" style="width: 1632px; margin-l

Join the discussion →

Is there a Python function to make nonuniform warping?

For example, perspective warping scales the width according to changes that occurred in the height of the image. I want a function that scales only the modified part (width or height), and I want it to be based on four points, so an affine transformation is not appropriate for it. Original image: Perspective: Nonuniform:

Join the discussion →

Is there a Python function to make nonunifrom warping?

For example, perspective warping scales the width according to changes that occurred in the height of the image. I want a function that scales only the modified part (width or height), and I want it to be based on four points, so an affine transformation is not appropriate for it. Original image: Perspective: Nonuniform:

Join the discussion →

Error message "bash: No such file or directory during a grub theme install"

I’m trying to install the BigSur GRUB theme, and I’m following the install guide: git clone https://github.com/Teraskull/bigsur-grub2-theme cd bigsur-grub2-theme ./install.sh And for some reason, when inputting $ ./install.sh, I get bash: ./install.sh: cannot execute: required file not found And I dont really know what to do... (Btw, I’m using NixOs with the grub bootloader and I also have windows 10 installed with a dual boot also heres my nix config file.)

Join the discussion →

Valgrind fatal error at startup in arch linux

I installed valgrind on my arch system through sudo pacman -S valgrind and when attempting to run it, this message appears: ==3821== Memcheck, a memory error detector ==3821== Copyright (C) 2002-2024, and GNU GPL'd, by Julian Seward et al. ==3821== Using Valgrind-3.23.0 and LibVEX; rerun with -h for copyright info ==3821== Command: ls ==3821== valgrind: Fatal error at startup: a function redirection valgrind: which is mandatory for this platform-tool combination valgrind: cannot be set up. Details of the redirection are: valgrind: valgrind: A must-be-redirected function valgrind: whose name ma

Join the discussion →

'videoView' with Kotlin and Android Studio

I have a videoView in my layout and code to play it. It works, but on the left side of the video, I have a black line, and this happened with all the videos who I played. I think is a propriety default from Android Studio, but I don’t what I can do to remove this. My function to play videos: private fun playVideo() { val videoUri = Uri.parse("android.resource://" + requireActivity().packageName + "/" + R.raw.videooooo) Log.d("VideoPlayer", "URI do vídeo: $videoUri") try { videoView.setVideoURI(videoUri) videoView.setOnPreparedListener { mediaPlayer -> mediaPlayer.isLooping = false } videoView.

Join the discussion →

how to make a Speed-meter without a progressbar

I have a proyect to make a speedTest with a speed-meter o tachmeter fuctional in real time,but i can't found a library with explain examples for how to used.... I tried with a progress bar to indicate how the Wi-Fi speed was going up or down. There are 3, one for the download, another for the upload, and the last one is for the ping, although the latter is unnecessary, but the idea is that the bar work in the time that the wifi speed is calculated import tkinter as tk from tkinter import ttk import threading from datetime import datetime import speedtest class ProgressWindow: def __init__(self

Join the discussion →
Older stories