instruction
stringlengths
0
30k
Symfony: Doctrine EntityManager persist() fails on new entity with relationships
# New to `ggplot2` 3.5.0 There's a new option to do this for you in latest `ggplot2` releases: ``` r library(ggplot2) data_frame <- data.frame(value = c(rnorm(2000, mean = 100, sd = 20), rnorm(2000, mean = 1000, sd = 500)), level = c(rep(1,2000), rep(2, 2000)), ...
{"Voters":[{"Id":17562044,"DisplayName":"Sunderam Dubey"},{"Id":790300,"DisplayName":"Dmitry Polomoshnov"},{"Id":598857,"DisplayName":"Nils Munch"}]}
I am currently working on a Spring Boot project with Thymeleaf. Using the following form should send the data to a REST endpoint: ```html <form th:action="@{/post/create}" method="post" th:object="${postDto}" accept-charset="UTF-8"> <div class="mb-3"> <label for="title" class="form-label">Titel</la...
def generate_sequence(sequence1, sequence2, sequence3): new_sequence = [] # Генерираме втората поредица for i in range(len(sequence1)): if i == 0: new_sequence.append(sequence1[i]) else: new_sequence.append(sequence1[i] + sequence2[i - 1]) # Генерираме...
I'm sorry for misleading. Markers are rendering perfectly fine when switching the model, but there is a bug in my code when I created the model. I had to specify `monaco.Uri.parse('inmemory://test_script')` instead of a `'inmemory://test_script'` string: ``` let model = monaco.editor.createModel( 'some text...
[Bun.js][1] has a [useful native API to read periodical user input][2]: ```js const prompt = "Type something: "; process.stdout.write(prompt); for await (const line of console) { console.log(`You typed: ${line}`); process.stdout.write(prompt); } ``` Is there a way to read user inputs, outside a loop? ...
Bun.js: Read a single line user input
|javascript|stdin|readline|bun|
For more details on this procedure. ### How to rename a local branch in Git - To rename the current branch, make sure you’ve checked out and are using the branch you want to rename. `git checkout oldbranch` And then `git branch -m newbranch ` - If you want to, you can rename a branch when ...
Using Maven to feed minikube on a VM
|docker|maven|kubernetes|ssh|virtual-machine|
Use of locale with CustomEmbedded block in CD CMS App. I have the EmbeddedAssetBlock stuff working, but it only gets the default locale for the embedded item. All the rest of the content is translated properly, but the returned embedded entry is always the en version… why!? I don’t see a way of even specifying the l...
Contentful PHP SDK : How to retrieving localized embedded content in Content Renderer
|php|embedded|contentful|
null
We're encountering difficulties displaying images fetched from a Java Spring backend in a React frontend. Despite successfully retrieving the image data from the backend, we're unable to render it in the <img> tag on the frontend. here is what my back send: ```java @PostMapping("/getProduct/{type}") @Resp...
SecurityFilterChain apiFilterChain(HttpSecurity http) throws Exception { log.debug("Bearer SecurityConfig initialized."); http.csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests(requests -> requests .requestMatchers(AUTH_WHITELIST).permitAll() ...
|python|google-api|speech-recognition|speech-to-text|
I have a TeX project. I want to ignore some file extensions which I have added in the .gitignore file, but they are still shown as untracked files in ```git status```. How to make git not track these files? A figure is added showing the VS code workspace along with the staged area ```git ls-files``` and output of ```gi...
.gitignore not ignoring files correctly
|git|visual-studio-code|gitignore|tex|
With my quarto extension [mathjax3eqno](https://github.com/ute/mathjax3eqno), you can use mathjax capabilities also within html, but unfortunately not for books, because these would require keeping track of labelled equations across several rendered files. It is not working for word format, either. If you want to us...
I made a chrome extension using a react chrome extension boilerplate ([link](https://github.com/lxieyang/chrome-extension-boilerplate-react)) Now I want to show my popup based on the current tab url. How can I query the current tab and can I do it in a hook way? This is a function to get current tab, But I don't ...
You can not write anything to DOM when there is no DOM. Just like you can not put a sofa in your livingroom when there is no house yet. That means you have to check with ``this.isConnected`` if the element is attached to the DOM, in the ``set record`` method. Its an instance of a JavaScript class/object; You c...
I have a React frontend application configured with a proxy in the package.json file pointing to my Flask backend running on http://localhost:2371. However, when making requests to fetch data from the backend using fetch("/members"), the frontend seems to be fetching data from localhost:5173 (the address on which the r...
Frontend fetching data from unexpected localhost address despite proxy configuration
|reactjs|json|typescript|flask|connection|
If you get only noise in frontend in audio when its recorded, then go to microphone settings and set from default-microphone(high)[number 1 usually] to microphone(high)[number 4 usually]. this will remove the noise and you will get clear voice(frontend).
I am currently working on a Spring Boot project with Thymeleaf. Using the following form should send the data to a REST endpoint: ```html <form th:action="@{/post/create}" method="post" th:object="${postDto}" accept-charset="UTF-8"> <div class="mb-3"> <label for="title" class="form-label">Titel</la...
ta.stochRsi returns: ([float, float]) A tuple of the slow %K and the %D moving average values. For example: [k, d] = ta.stochRsi(14,5,14,5,close)
Sending an image (png) from my back (Java spring) to the front (react) and printing it
|javascript|java|reactjs|node.js|blob|
null
use nodemon and compile project add this to "scripts" on package.json "build:dev": "ng build --configuration development && node dist/{{YOUR_PROJECT}}/server/server.mjs", "dev": "nodemon --watch server.ts --watch src/ -e ts,html,scss --exec \"npm run build:dev\"",
{"OriginalQuestionIds":[71751431],"Voters":[{"Id":45375,"DisplayName":"mklement0","BindingReason":{"GoldTagBadge":"powershell"}}]}
The issue in your webapi_source function is that you are trying to use the await keyword without marking the function as async. async function webapi_source({ menus }) { endpoints = await collector.retrieve_endpoints(env); }
I tried the 'fa-meh-blank' Remove. When I clicked it worked. And when I clicked again, my icon disappeared completely. I managed to find the solution. I think I expressed myself badly. I wanted to alternate the icons with each click. The following javascript works perfectly. My new JavaScript: icone...
The same issue is discussed [at kubernetes GitHub issues page][1] and the user "alahijani" made a bash script that exports all yaml and writes them to single files and folders. Since this question ranks well on Google and since I found that solution very good, I represent it here. *Bash script exporting yaml to s...
An alternative is EasyML (http://github.com/cordisvictor/easyml-lib/). Supports Java 8, 11, 17+. Faster than XStream. XStream is also being maintained on GitHub.
null
Use of locale with CustomEmbedded block in CD CMS App. I have the EmbeddedAssetBlock stuff working, but it only gets the default locale for the embedded item. All the rest of the content is translated properly, but the returned embedded entry is always the en version… why!? I don’t see a way of even specifying the l...
i created a script in python with libraries such as pyautogui,pytesseract then, i've converted the script into an .exe file using auto py to exe and everything ran fine on my PC, the problem is when i sent the file to my friends they experienced an error that said pytesseract.pytesseract.TesseractNotFoundError Here...
pytesseract.pytesseract.TesseractNotFoundError
|python|python-tesseract|
null
I think there is a much simpler way to do what you want. You only need the & "and" operator. Basically, if you want the 5 most significant bits, all you have to do is add them up. 128+64+32+16+8 = 248 or the 3 least significant bits would be 4+2+1=7. Then use the and operator ( & ) with your variable and the tot...
In OWL or its rule extension SWRL, the only rules you can model are the ones that say "if I know X (where X is set of formula in OWL) then I can deduce Y (with Y a formula in OWL). What you seem to be asking is if we can say "if I *don't* know X, then I can deduce that Y". But in fact, your question is a little vagu...
I'm trying to use ArrayList in Kotlin. Here is the code: ```kotlin var list:List<PlcStoragePiece> = ArrayList() list.addFirst(head) // head is a PlcStoragePiece return list ``` BTW this is Java's ArrayList: ```kotlin import kotlin.collections.ArrayList ``` but I get compile warnings! > w: DevStora...
queryPurchasesAsync returns a list of user Purchases. But it doesn't tell me actually which base plan was purchased or even which offer. It only has the top-level product ID. I have multiple base plans with multiple offers within a single product (I assumed that's how they want us to structure our subscriptions to ut...
How to get base plan id or offer id from Purchases
|android|subscription|billing|
### To rename your current branch to a new branch name: git branch -m <new_name> This will set the new name for the current branch you are working with. ### To re-name another branch: git branch -m <old_name> <new_name> Here you have to provide the old branch name and the new branch name.
You are in luck! I have recently pushed an update to the package that allows adding risk tables to the plot. All you need to do is to install the developmental version from github (`install_github("RobinDenz1/adjustedCurves")`) and you will be able to do it simply by using: ```R plot(adjsurv, custom_colors=c("red",...
{"Voters":[{"Id":10008173,"DisplayName":"David Maze"},{"Id":17562044,"DisplayName":"Sunderam Dubey"},{"Id":466862,"DisplayName":"Mark Rotteveel"}],"SiteSpecificCloseReasonIds":[18]}
Looks to me like a simple `map` operation with `String.join()`. Optional<String[]> given = Optional.ofNullable(new String[]{"a", "b"}); var joinedString = given.map(s -> String.join("", s)); System.out.println(joinedString.get()); // prints "ab"
Here's the `docker-compose.yml` file: ``` version: "3" services: db_cassandra: container_name: db_cassandra image: custom.cassandra.image/builder-cassandra volumes: - "./common/cassandra:/lua/cassandra_setup:rw" environment: WORKSPACE: "/tmp" SERVICES_ROOT_DIR: "/service...
I have a program that is able to expose itself as a self hosted WCF service. It does this when it's started as a process with certain parameters. In the past I've passed in a port for it to host on but I want to change that so it finds an available port and then returns that to the caller. (It also sets up a Session...
Compression is usually better handled by a CDN such as CloudFront That being said, to answer your question (at least partially), assuming you are using `output: "export"` in your nextjs 13+ config, and you want to generate the compressed assets (e.g. gzipped .js and .css files) at build time, you can use [Compressio...
I am trying to clean a very large .csv file with pandas. The .csv has a column that contains text including characters like ',' or '/'. Therefore when I read the file, I specify `escapechar='\\'` and I observe that the file is successfully read and has the correct shape. After cleaning, I re-write the file in another ...
React hook that returns current tab in a chrome extension popup
|reactjs|react-hooks|google-chrome-extension|
null
### TL;DR: To fix your problems I suspect that you should, at least as a start: 1. Choose only one version for the Kotlin plugins you are using, 2. Remove the Kotlin JVM plugin, and 3. Apply the Kotlin serialization plugin in your Android subproject. ### Some more background To say more: - The plugins...
# Problem Seems that you are using a not suitable Pinecone object. # Solution If you are looking for a .from_text method, import Pinecone from `langchain` ```python from langchain.vectorstores import Pinecone as PC docs_chunks = [t.page_content for t in text_chunks] pinecone_index = PC.from_texts( ...
following the guide [Deploy a .NET Windows Desktop app with ClickOnce][guide] for Visual Studio, I have created a ClickOnce installer named setup.exe. Is it possible to add an extra step to the installer where the user, via checkbox or other means, would be asked to check or uncheck the option to allow the installed a...
i found the code/library and all i needed on BasselItech https://www.youtube.com/watch?v=zzs2xnyCczo i tried modifying the code with using .Hide() and visible set to false but there is always the Form that appears and i would just like to have it run in the background with a notifyicon Thank you all here is my...
I'm encountering slow performance when executing a simple SELECT query **(SELECT * FROM SampleData)** on a SQL Server database hosted on my local machine. The table contains around 1 million records. Despite the relatively straightforward query, it takes approximately 20 seconds to retrieve the results. However, the re...
Simple Select query is taking more than expected time to execute
|sql|sql-server|performance|
I am new to Azure DevOps and I am trying to link deployment status of my releases to work items. I have tried going to classic release pipelines -> options -> integrations -> Report Deployment status to boards and have mapped the environments. [![enter image description here][1]][1] But I want to link these deplo...
Integrate Deployment status to Work Items in TFS
|azure-devops|tfs|azure-pipelines|cicd|
I am developing a company-identifier using Spark-SQL and basically what I do is: ## Data sides of the join: - Let's consider a data frame filled with `company_name_1` that I want to match an `ID_number` (1). - On the other side I have a **"master"** data base containing thousands of `company_name_2` with an `I...
I think one of the simplest responses is to just create a random graph and then sequentially connect node n to node n+1. This produces a random connected graph. G = nx.dense_gnm_random_graph(15, 5) prev_node = None for node in nx.nodes(G): if prev_node != None: # we need to compare with ...
I am developing a game in Unity that plays human speech through speakers and also performs speech recognition. This will cause the sound played by the speakers to be recognized by the speech recognition, which will lead to inaccurate speech recognition results or even the inability to recognize the correct speech. I...
How to Avoid Speech Recognition from Recognizing Speaker Playback in Unity
|unity-game-engine|speech-recognition|speech-to-text|aec|echo-cancellation|
null
|php|amazon-web-services|amazon-s3|curl|cloud-object-storage|
null
Upgrading to torch-2.1.2 will resolve that error.
By default, Pillow will place the ***top-left*** corner of your text at the coordinates you specify with `ImageDraw.text()`. But you seem to want the text placed so that its horizontal middle and vertical middle are placed at the location you specify. So, you need to set the horizontal and vertical anchor to *"middle"*...
I am trying to look in 6 columns for a name that lines up with today's date. Example: Column A has each day of the year Column E through J can have a persons name in it. Essentially (generic format) If( countif( date match , name match in one of the columns ) > 0, "PTO", "" ) What I made work, is us...
Multiple column COUNTIFS function in an array
|arrays|match|multiple-columns|
null
{"Voters":[{"Id":9245853,"DisplayName":"BigBen"}]}
Your original question indicates that you want to use pandas' `read_sql_query()` to retrieve the results into a DataFrame. In that case, use `params=` and pass the parameter values as a dict: ```python book_id = 653 sql = text("""\ SET NOCOUNT ON; EXEC dbo.LibraryBookData @BookId = :bookId; """) df = pd.read_s...
Thanks to Ňɏssa and hallibut in the comments. I thought there was a fundamental problem with using sender, but the issue was that Windows needed the full path for the TextBox's object type and I was overthinking the problem. Here's the corrected code that worked: ``` private void periodFix(object sender) { /...
I have a form that I would like to use for creating a new record and modify it. When I run it to create a new record validation works fine: @if(Model == null){ <input type="text" id="txt_hostname" name="txt_hostname" class="form-control" value="PC-Name1-test"> ...
Do you know ways for getting partial coincidence joins?
A small change in the source code can also help you out: ``` diff --git a/seaborn/relational.py b/seaborn/relational.py index ff0701c7..f4ab8cd9 100644 --- a/seaborn/relational.py +++ b/seaborn/relational.py @@ -273,7 +265,7 @@ class _LinePlotter(_RelationalPlotter): # Loop over the semantic subset...
I am working on theory of computer science problems but cannot get these to work: > a. Give an NFA recognizing the language (01 ∪ 001 ∪ 010)<sup>\*</sup> > > b. Convert this NFA to an equivalent DFA. Give only the portion of the DFA that is reachable from the start state. > > ![1.49 Theory](https://i.stack.imgu...
From what I understand, Shadcn's form components are just an abstraction of react-hook-form. If you want to access the state, for example, you can use ``` const form = useForm<z.infer<typeof formSchema>>({ resolver: zodResolver(formSchema), defaultValues: { prompt: "", },...
{"Voters":[{"Id":6574038,"DisplayName":"jay.sf"},{"Id":9214357,"DisplayName":"Zephyr"},{"Id":2530121,"DisplayName":"L Tyrone"}]}
Note that variables come in 2 flavors - primitives and objects. Primitives exists in a scope, you can't reference them outside its own and child scopes (they are copied by value). So in your example you just don't care since you use a primitive only. If you remove event listeners or remove the elements from DOM, the...
{"Voters":[{"Id":1121249,"DisplayName":"rkosegi"},{"Id":878532,"DisplayName":"Klaus"},{"Id":9214357,"DisplayName":"Zephyr"}],"SiteSpecificCloseReasonIds":[]}
I want to be able to have multiple lines of text in one marquee, is this possible and if so how are you able to do this? I tried placing spaces between the items but they either just came out almost next to each other. Any Ideas would be grateful.
How to set multiple lines of text into a HTML Marquee?