instruction
stringlengths
0
30k
null
I can't say for sure, but I would expect it would be some kind of JIT optimization. At a guess: while the JIT [does have logic][1] to do bounds check elision, but it could be it doesn't work if you refer to the field twice, rather than a local variable. The function [`ThrowForEmptyStack`][2] is known to be non-re...
In my Angular project, my unit tests fail with the following error: > TypeError: Cannot read properties of undefined (reading > 'reRenderOnLangChange') > at shouldListenToLangChanges (node_modules/@ngneat/transloco/fesm2022/ngneat-transloco.mjs:385:33) > at TranslocoPipe.transform (node...
|excel|vba|
null
Unable to set database URL dynamically in Sails.js
If you are OK with using `Invoke-WebRequest`, just use it like so (assuming you did not `Remove-item alias:curl`): curl -Uri http://<some-address>:<some-port>/ -Method POST -Body @{param1='my param';param2='420'} You can also (as suggested [here][1]) do the following: $postParams = @{param1='my param';...
1. `char c[2]` is needed hold a string with one character with the terminating `'\0'`. You could also use `char c[1]` or just `char c` and read a single non-space character with ` %c` (space prefix is significant). When you print the character you then need to use the `%c` (instead of `%s`) conversion specifier...
While creating a html email template, I got a problem with making a large background text beneath the content using tables. for example : ``` <table> <td>bg-text-bottom-layered </td> <td>top-layer-content. </td> </table> ``` Is it possible to make a top-layer-content without using z-index? It really hel...
Can we achieve z-index like functionality without using z-index for html email template?
|css|html-table|html-email|email-templates|html4|
null
I debug the code using `{{ dd($order->id) }}`, I got 100238 order id value. But when I type <form action="{{ route('admin.pos.update_order', ['id' => $order->id]) }}" method="post"> then its not working. Then I write this `{{ route('admin.pos.update_order', ['id' => 100238]) }}` its works great. I cannot ...
I'm looking for guidance on how to efficiently handle a large number of API calls using Delphi 10.4 along with the OmniThreadLibrary. Specifically, I need to make approximately 3,000 API calls to a server. To optimize performance, I'd like to limit the number of concurrent threads to 5. Once one thread finishes proc...
Efficiently Handling Large Number of API Calls with Delphi 10.4 and OmniThreadLibrary
|multithreading|rest|delphi|threadpool|omnithreadlibrary|
null
I am new in R and I'm trying to run a code written by Feng et al., (2019). They already provide the code in their paper, and I prepared all the text files that are needed for it, but for some reason the code keeps running on the results the authors provide (the example data). I can't figure it out and I would appreciat...
How to run a computational solution for ELISA long-term projects in r using new data files?
|r|
I'm using an intermediate certificate to sign the client certificates, while trying to enable client certificate validation on server side using python 3.10 with following code ``` ssl_context = ssl.create_default_context(purpose=ssl.Purpose.CLIENT_AUTH) ssl_context.load_cert_chain(certfile=settings.CERTS_TLS_...
<!-- language-all: js --> *You may try:* =let( data,A3:C5, task,"test", weekinfo,2, countif(choosecols(data,weekinfo),task)) ***OR*** *with a slight modification to your formula* =LET( SA,A3:A5, SB,B3:B5, SC,C3:C5, task,"test", we...
I'm currently working on integrating [Firebase Cloud Messaging (FCM)][1] for push notifications in my web application. I have a question regarding the behavior of clicks on web-push notifications and how to define this behavior and gather information and analytics. My question is some what similar to these question...
How should I open links on web-push notification click - service worker or"click_action"?
|firebase|browser|push-notification|firebase-cloud-messaging|service-worker|
> Regex Match a pattern that only contains one set of numerals, and not more I would start by writing a _grammar_ for the "forgiving parser" you are coding. It is not clear from your examples, for instance, whether `<2112` is acceptable. Must the brackets be paired? Ditto for quotes, etc. Assuming that brackets ...
{"Voters":[{"Id":10871073,"DisplayName":"Adrian Mole"},{"Id":722804,"DisplayName":"Terry Jan Reedy"},{"Id":466862,"DisplayName":"Mark Rotteveel"}]}
I suggest you to use django built-in auth system. You import like below. ```python from django.contrib.auth import authenticate, login ``` And then you use it as below. ```python user = authenticate(request, username=student_id, password=password) ``` Which are built in methods. This `authenticate` fun...
TL;DR **Get definitions straight.** --- **To know whether a case violates 3NF you have to look at the criteria used in some definition.** Your question is rather like asking, I know an even number is one that is divisible by 2 or one whose decimal representation ends in 0, 2, 4, 6 or 8, but what if it's three ...
TypeError: Cannot read properties of undefined (reading 'reRenderOnLangChange')
|angular|typescript|angular-test|transloco|
I fixed the problem by importing the `TranslocoTestingModule` to my tests' setup. More info about this module here: https://jsverse.github.io/transloco/docs/unit-testing
I have a mongoDb with my data stored (currently as application/json) and I want my frontend to be able to have a search bar where they start searching for a name, e.g type "Tho" when you want to filter on name "Thomas", and by typing "Tho" you should get all entries containing "Tho" in their name. I'm using DaprClie...
Contains filter in Dapr's QueryStateAsync
|c#|.net|mongodb|mongodb-.net-driver|dapr|
I have the following code written in ECharts and you can replace it in the link: https://echarts.apache.org/examples/en/editor.html?c=pie-rich-text&lang=ts ```ts import * as echarts from 'echarts'; type EChartsOption = echarts.EChartsOption; var chartDom = document.getElementById('main')!; var myChart = echa...
Problem generating pie charts in Vue (ECharts)
|typescript|vue.js|pie-chart|echarts|
null
I want to obtain the token addresses of new tokens released on Solana that are compatible for swapping on Raydium. I've explored various API providers, but unfortunately, none of them offer this specific data. I experimented with Helius using the mainnet.helius-rpc.com endpoint, and I believe I'm headed in the ri...
|mysql|best-first-search|
I am building Docker images of a web app locally on my Mac and then running them via Docker Compose on a remote server that's running Ubuntu AMD64. I get an error that the platform isn't compatible, and I'm curious what's the best practice in real production environments to tackle this issue. Do I support 2 image ty...
|php|wordpress|
null
I am trying to create a Static Web App in Azure Portal and deploy React code written in Visual Studio Code from github. The instructions I am following are here: [Quickstart: Building your first static site with Azure Static Web Apps][1] Steps: 1. Create Static Web App -> my-react-project [![enter image...
I simply need to calculate a new field date in select in eloquent... but it does not seems to work although if I copy the mysql query in phpmyadmin it works. SQLSTATE[42S22]: Column not found: 1054 Unknown column 'IF(date_start<'2024-03-10','2024-03-10',date_start)' in 'field list' select ...
Laravel eloquent select not accepting if function
|mysql|laravel-5|select|eloquent|
I was working on my spreadsheet to keep track of my goals. I stuck on some strange problem I can't find any fix for that, not so advanced in google sheets yet :( I made test sheet just to show problem in isolation. https://docs.google.com/spreadsheets/d/19xUOeLoXTPH3heVFMssya5sh8ZeOaIlIBpHnypaDx-A/edit?usp=sharing ...
Ok so I've been working on this project where I am trying to detect an anomaly and relate it to some certain phenomenon. I know that pandas have builtin functions i.e. pd.rolling(window= frequency).statistics_of_my_choice() but for some reasons I am not getting the desired results. I have calculated rolling mean, r.med...
|sap-commerce-cloud|cdc|gigya|sap-cloud-identity-services|
In my vs code in c++ when I declare a pointer and then print the size of the pointer, its reporting 4 bytes instead of 8 even though my system and compiler both are 64 bit.
Parent-Child vs `Range.IndentLevel` - [![enter image description here][1]][1] **The Calling Procedure (Example)** <!-- language: lang-vb --> Sub RunParentChild() Dim ws As Worksheet: Set ws = ThisWorkbook.Sheets("Target") Dim rg As Range: Set rg = ws.Range("A1", ws.Cell...
Get new tokens on Solana (realtime)
|solana|solana-web3js|solana-cli|solana-program-library|
I have a `FloatingActionButton` that changes its icon to a pause icon when clicked. How can I toggle the icon back to the play icon when the button is clicked again? **Code:** Row( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ ...
im trying to parse a XML with contains a value with big numbers, but is returning me : \~only examples\~ ``` 2.9999903656804e+43 ``` but the expected is: ``` 2999999656804999999550999008999491999425661 ``` my actual config is: ```ts const parser = new XMLParser({ ignoreAttributes: false, ...
fast-xml-parser dealing with large numbers
|javascript|node.js|fast-xml-parser|
null
Make sure to call setDisplayHomeAsUpEnabled(true) and setSupportActionBar(toolbar) inside onCreate() @Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case android.R.id.home: onBackPressed(); return true; } ...
The following are the steps I use to deploy SQL server using DevOps pipeline via DACPAC file for your reference. 1. Create a SQL Server DB project (SSTD) in VS and import my DB into the project. You can make changes to the DB in the project. Right click on the project -> Import ->Database [![enter image descr...
I am using jsPDF to make an export functionality but the scripts required for that are not enqueuing. The following is the function in which the handling of scripts is done: ``` public function admin_scripts( $page ) { wp_enqueue_script( 'my-plugin-pro', plugins_url( 'assets/js/my-plugin-pro.js', dirname( __FIL...
|php|laravel|laravel-5|
null
I am about to try to create simple 2D game using Lua. I have watched couple of videos and tuts and checked also syntax but I am confused of multiple developes using different approach in OOP. Some uses Metatables, some consider it too much complex and create object using like functions that return table. And I ...
Using metatables in Lua or functions for OOP
|oop|lua|2d|
One possible explanation for this behavior is that the file gets created at the end of the run. The current directory of the process may at that point be a place you don't expect (or even a directory where the file can't be created). The quickest way to see if this is your problem is to leave out the `-o output.file`. ...
Your code is using a single thread executor task which submits another task to same single thread executor, and then awaits that sub-task to exit. It is the same as this example which would print "ONE" and "THREE", and never print "TWO", "cf" or "FOUR": ExecutorService executor = Executors.newSingleThreadExecuto...
I am building a website with 4 pages. The homepage has 4 scripts injected, 3 of which are a one-time code execution, but the last one is a looping event of a 1.5 seconds interval. When the route changes to another page, the looping script stays in memory and keeps executing, printing in the console that it can't ...
I'm (unfortunately) suspecting that what I'd like to do is impossible, so I'm very open to best-practice workarounds. In short, I've got a setup like the following: ```rust pub struct OffsetMod<'a> { kind: OffsetKind, composition: ChemicalComposition<'a>, } ``` Most of the time, that struct should ind...
You need to provide a User-Agent HTTP header. For example: import requests import json url = "https://www.tablebuilder.singstat.gov.sg/api/table/resourceid" params = { "isTestApi": "true", "keyword": "manufacturing", "searchoption": "all" } headers = {...
In case performance matters and you do not want to reinvent the wheel (and don't want to deal with pitfalls and issues as "*what if there are duplicate keys in either list?*"). The [`Join-Object`](https://www.powershellgallery.com/packages/Join) cmdlet (see also [In Powershell, what's the best way to join two tables...
Hello awesome developers! As you can see, I'd like to ensure my application starts when the phone boots up. Everything else is functioning correctly; I receive toasts and background processes are working. However, my application fails to run. What could be the issue, and how can I fix it? Thank you. ``` class BootC...
> Please make sure that the backend API sets the file name in the response header. Usually, the file name is included in content-disposition header. - And if you are using CORS make sure that you are exposing your header. I found it thanks to [this][1] answer and also [this][2] that CORS policy don't allow Angul...
i want to validate the message on toast message, I already used accessiblity id but still facing issue : element ("~toast message") still not displayed after 10000ms accessibility id that gived from dev : toast message
how to verify toast message on ios using appium
|toast|webdriver-io|appium-ios|
A common method of creating private methods (of sorts) in JavaScript is this: Class = function (arg0, arg1) { var private_member = 0; var privateMethod = function () { return private_member; }; } The above example could also have been done with a function declarati...
Is there a way to unload a script from memory in NextJS?
|javascript|next.js|frontend|javascript-framework|
null
|php|woocommerce|
null
|r|ggplot2|label|facet-wrap|
null
I am working on a Java application where I need to execute a batch of SQL queries using JDBC's PreparedStatement. I have encountered an issue where the PreparedStatement seems to clear the batch every time it is initialized with a new query. Here is the relevant portion of my code: ```java @Transactional public int[...
How to automatically launch an app when an Android phone boots up for Kotlion
|java|android|kotlin|android-jetpack-compose|android-jetpack|
null
After you have applied your index you need to call MyClientDataSet.First to go to start of records to be sure you are looping them all. At the time you apply your index the current record is re-sorted and is no longer the first in the dataset so you are starting the loop from halfway and missing all records above it
I have trouble on using PEAR on local file while trying to export data to Excel file. This is the stack trace : <br /> <b>Notice</b>: tempnam(): file created in the system's temporary directory in <b>/Applications/XAMPP/xamppfiles/htdocs/\_test/vendor/pear/ole/OLE/PPS/File.php</b> on line <b>105</b><br /> <br /> <b>...
PEAR SPREADSHEET EXCEL issue on writing local file
|php|export-to-excel|pear|
null
Try to find missing curly braces {} or unclosed comments /*...*/ or misplaced code in your code.
Current API const { stageid, subjectid, boardid, scholarshipid, childid } = req.params; edcontentmaster .aggregate([ { $match: { stageid: stageid, subjectid: subjectid, boardid: boardid, // scholarshipid: scholarshipid, }, }, ...
Preventing PreparedStatement from Clearing Batch in Java JDBC
|java|jdbc|prepared-statement|batch-processing|