I have a text file containing a list of titles that I need to change to title case (words should begin with a capital letter except for most articles, conjunctions, and prepositions). For example, this list of book titles: barbarians at the gate hot, flat, and crowded A DAY LATE AND A DOLLAR SHORT THE HITCHHIKER'S GUIDE TO THE GALAXY should be changed to: Barbarians at the Gate Hot, Flat, and Crowded A Day Late and a Dollar Short The Hitchhiker's Guide to the Galaxy I wrote the foll...
ادامه مطلبSo I've been developing this program for a while now... Its meant to act as an asset manager (and potentially more in the future) for our IT team. I have 2 services which we'll refer to as "Manager" and "IAM" for right now. The "Manager" does all things managerial for all services (currently only the inventory asset manager known as "IAM") such as automatic updates, etc., while the asset manager does its job.Anyways, its been working great for a while now. Recently I implemented an automatic upd...
ادامه مطلبI am implementing a project with angular 5 in front end and springboot in backend. While i'm trying to send a request from client to backend, In the google chrome console the following message is displayed GET http://localhost:4200/customer 404 (Introuvable) And In the tomcat console I'm getting this line avr. 23, 2018 11:26:21 AM org.apache.tomcat.util.http.LegacyCookieProcessor processCookieHeader INFOS: Cookies: Invalid cookie. Value not a token or quoted value Note: further occurrences of Co...
ادامه مطلبHow can I execute code received from dis.dis() python? import dis class A(): def __init__(self): print("hello") dis.dis(A) '''It retus: 3 0 LOAD_GLOBAL 0 (print) 2 LOAD_CONST 1 ('hello') 4 CALL_FUNCTION 1 6 POP_TOP 8 LOAD_CONST 0 (None) 10 RETU_VALUE ''' I want something like this: import dis dis.run(''' 3 0 LOAD_GLOBAL 0 (print) 2 LOAD_CONST 1 ('hello') 4 CALL_FUNCTION 1 6 POP_TOP 8 LOAD_CONST 0 (None) 10 RETU_VALUE ''') i.e. Execute python disassembler.(I can execute .pyc from python ,can i ex...
ادامه مطلبI created an EPLAN API with C#. It uses .NET Framework 4.8.1. The app gets an opened instance of Excel using Marshal.GetActiveObject to then make changes to the data. The code works fine and is able to see the opened instance of Excel. However the API doesn't work for 1 client because it can't see the opened instance of Excel. This means there is some setting on his PC that is causing Marshal.GetActiveObject to fail. What Excel or PC setting do I need to change to get Marshal.GetActiveObject wor...
ادامه مطلبGiven two positive integers d...
ادامه مطلبThis question would an "update" about this kind of topics, like this old question (Is it possible to declare constexpr class in a header and define it in a separate .cpp file?), but now with C++ modules, in the context about functions that are called from multiple files and not only called from the same file. About functions that with a traditional file structure, .h/header and .cpp files, need to be placed entirely in the header file: constexpr functions template functions Now with C++ module...
ادامه مطلبCaot get through my docker container and coect to my local ollama server. Ollama server is up and ruing : http://localhost:11434 retus "Ollama is ruing" When adding n8n credentials for ollama, I get the following : Couldn't coect with these settings ECOREFUSED Here's my n8n credentials config : Base URL : http://host.docker.inteal:11434 API Key : not needed for local install and ruing models (?!) Allowed HTTP Request Domains : All According to what I've found, looks like...
ادامه مطلبI really don't like the standard ``text'' quotations of latex, with the opening mark pointing downwards. I wonder if it's possible to obtain this result (here obtained by gimp editing): using standard latex. Any vertically symmetric quotation pair would also be fine. Moreover, also the UTF8 variants of the quotes are not particularly symmetric, something that I find unaesthetic: documentclass{article} begin{document} ``text'' end{document} I typically use overleaf, or pdflatex. Any ideas?...
ادامه مطلبI have the following union (C# 15+): public union ValueSource(int, Func); As per the docs: An implicit union conversion exists from each case type to the union type So I expect both of the following to work: ValueSource src1 = 42; ValueSource src2 = () => 42; However, the assignment to src2 fails with: CS1660: Caot convert lambda expression to type 'ValueSource' because it is not a delegate type Moreover, if I have this static method: public class IntSource { public stat...
ادامه مطلبI'm trying to lea PCA using R but I'm unsure whether I'm using the results correctly. I have included the code for my attempt at using PCA to analyse the decathlon2 dataset in R with a scree plot, loadings and biplots with brief notes on what they show, and would like to know if these are sound conclusions or if I am misinterpreting the results.Many thanks.library(ggplot2) library(corrr) library(ggbiplot) library(factoextra) library(ggcorrplot) library(corrplot) library(dplyr) library(gt) Dec...
ادامه مطلبI have a Docker container with OrbStack that contains a directory repos with a repository app-main and worktrees like app-feature-a to develop in parallel. Configuration is done in order to prevent modification of the container configuration file in the ruing Docker. project/ ├── .devcontainer/ # outside the mount, on purpose │ └── devcontainer.json └── repos/ ├── app-main/ ├── app-feature-a/ └── app-feature-b/ MWE for devcontainer.json : { "name": "myproject", "image":...
ادامه مطلبWe would like to use Hibeate StatelessSession injected into our Spring Data JPA repositories. Our understanding is this requires HibeateTransactionManager and SharedSessionCreator.createSharedStatelessSession. Our setup is like follows: @Bean public HibeateTransactionManager transactionManager(EntityManagerFactory entityManagerFactory) { var hibeateTransactionManager = new HibeateTransactionManager(entityManagerFactory.unwrap(SessionFactory.class)); retu hiber...
ادامه مطلبI get this error, if I click my script multiple times: Uncaught (in promise) Error: reCAPTCHA has already been rendered in this element. I know, that error is correct, but how can I fix this? I have got a cookie-icon that shows a baer to accept or to reject the recaptcha/form. I hide or show the recaptcha/form onclick, but if the user clicks multiple times the accept button i get this error in console and he can not send the form. Hard to explain here is my code :) Edit: Here is a jsfiddle:...
ادامه مطلبI'm working on a Laravel project and I need to search through 2 models as the same time. I decided to use a union for this query, as I would do it in SQL. One of my models is converted into the other, and then the two queries are unioned. I was expecting to be able to filter as well after that, but any where clause I'm using ends up applying only on the first part of the union, and not the second. Here's the code EntityMember::union( User::select(*convert User into something similar to Entit...
ادامه مطلبI am having trouble compiling a C program that uses a shared library. To reduce the problem as much as possible, I am following a tutorialI have two source files, in the same directoryfoo.c:#include exte void foo(void); void foo(void) { puts("Hello, I am a shared library"); } main.c:#include int main(void) { puts("This is a shared library test..."); foo(); retu 0; } foo.c compiles to a shared library:gcc -c -Wall -Werror -fpic foo.c g...
ادامه مطلبWhen working with keyboard input in a situation like the one shown in the next simplified example: // abc.hpp #pragma once #include // ranges of integer values in the enum could be contiguous or // not, so question is for a general scenario. However if being // a contiguous range of integer values makes things notably // simpler, then certainly it'd be interesting to know about it. enum FileType : int { JSON = 1, YAML = 2, XML = 3 }; constexpr std::array...
ادامه مطلبI'm trying to lea graphics programming. Currently, I'm trying to make my camera look at the world origin at (0, 0, 0), but I can't understand why this operation is inverted for the camera. For example, if I have a camera at (0, 0, -5), it tries to look at (0, 5, 0). Instead of looking at the desired position, the camera looks at the inverted position at (0, -5, 0).Here's the code implementation for the context:...
ادامه مطلبThis is my dataset set.seed(2026) n...
ادامه مطلبIm trying to resurrect my compute instance, but im stuck on ai chat and inability to create service request, i had 4 OCPU + 24GB ram instance, but after change in limits, im stuck with locked instance which i caot even edit to comply with new rules, any chance to get out of this hell of ai chatbot + nonexistent contacts to oracle ? Im even considering riding to local Oracle office in my country to get some help, beacuase i had some things on instance drive. But i doubt it will help. (I missed th...
ادامه مطلب