instruction
stringlengths
0
30k
**Less secure option is not supported anymore by gmail.** So you can use an App Password. - I set my `2-step verification` and then get my `App Password` from **[Here][2]** (as [this answer][1] said). At the end simply ran this code with email address and that app password, then i got email with nodemailer. ``` ...
|docker|cicd|packer|hashicorp-packer|
I hava a SQL like this ```sql select * from sys_region as sr left join (select count(*) as c,parent_code from sys_region * group by parent_code ) as c on c.parent_code = sr.parent_code ``` And I am using quarkus with queryDSL and Blaze persistence How to implement sql query using that.
QueryDSL with blaze persistence left join sub query
|java|quarkus|querydsl|blaze-persistence|
null
You likely want to use the lower level `init` and `step!` interface. Specifically, ``` integrator = init(problem,SOSRA(),reltol=1e-3,abstol=1e-3) step!(integrator) # takes 1 timestep step!(integrator, .4) # steps until t==0.4 ```
`PasswordBox` doesn't have that functionality built in. The original design pre-dates when that option became popular on websites etc. A simple solution is to build a `UserControl` that switches between a plain `TextBox` or `PasswordBox`. **EnhancedPasswordBox.xaml** <UserControl x:Class="SOExamples.Enha...
I registered a domain in Route53. I added a CNAME record and added value as documentdb cluster url with port (example: test.cluster.amazon.com:27017). I am trying to connect to documentdb using Route53 record name but I am unable to connect. Am I missing something or we can't ? ```java protected MongoClient mongoCl...
Can we connect to documentdb cluster through Route53 domain?
|java|amazon-web-services|spring-boot|amazon-route53|aws-route53|
So basically I have a table in Snowflake with a column containing data in JSON format (variant col), and these json contains a lot of of key / value pairs (> 130) Here is the table DDL : create or replace TABLE DEV_ODS_SOFINORD.ODS.CRM_JSON_VARIANT_ALL ( OFFSET_VAL NUMBER(38,0), ORIGINE VARCHA...
Added the code block below to `Theme.kt`. Needed to set `isNavigationBarContrastedEnforced == true` to get nav icons to constrast correctly when using dynamic color schemes. (e.g. ` dynamicDarkColorScheme(context)`) val colorScheme = // logic for setting colorScheme here val dynamicColor = // logic for dete...
Using MudTextField works well once you've added the **name=**"Model.Field" because asp.net core with that can find input tag and bind the fields of Model. <EditForm Model="vm" OnSubmit="Submit" FormName="LoginForm"> <MudTextField @bind-Value="vm!.UserName" name="vm.UserName" Label="User Name" /> </...
To the best of my knowledge, it's not possible. Normally, in POSIX ERE a working regex would be: ```none ^/(?:[^\\/]|\\.)*/(?:[^\\/]|\\.)*/(?:[^\\/]|\\.)*$ ``` ...where `(?:[^\\/]|\\.)` means "either not `\` (escaping) and not `/` (delimiter), or an escaped character". However, Lua patterns don't have `|`...
If your device is running on an Android operating system version earlier than 12, it lacks support for the AVIF image format, thereby restricting the ability to view or interact with AVIF images seamlessly. Here the Documentation of that [https://developer.android.com/about/versions/12/features#avif][1] [1]: ...
In my case I have added this code,jdk 21 is installed in my machine but project using java version 18 in my project so I have set jvmToolChain = 18. and issue is resolved. (if you are using kts then add this in buildSrc gradle file) kotlin { jvmToolchain(18) } hope this will help some if this is the case...
How to logout and delete register users from google spread sheet database using javascript when the user clicks the delete buttton
I am creating filter variables on Grafana 10 from influxdb 2.7.4 with below code. Each variable seperately. import "influxdata/influxdb/schema" schema.tagValues( bucket: "Vbuck", tag: "Service_Name" ) **But i need to create variables depend on other variables.** *For example :* ...
Creating and "Relating" variables with eachother, with tags from influxdb measurement on Grafana 10
I am trying to use the webcam to capture images that I will use to predict the age and gender using neural networks. ``` from IPython.display import display, Javascript, HTML import base64 # HTML template for capturing image from webcam html_template = """ <!DOCTYPE html> <html> <head> <title>Webcam Image ...
Capturing Images using Webcam in Jupyter Notebook
|python|jupyter-notebook|data-science|ipython|webcam|
null
Idea: Parse the array in O(range), and for each start-of-interval, count the number of already ended intervals. Whether or not to include single-point intersections as overlaps is a matter of switching two lines of code, so I added a parameter for this. If range >> n then this is worthless, but if range ~ n log n or...
Access Registed Scoped Services and Transient Services using GetService()
|asp.net|.net-core|dependency-injection|.net-8.0|
null
Alright, so a short POC based on our short chat would be this: #include <iostream> #define STRINGIFY(text) #text #define TO_STRING(text) STRINGIFY(text) #define MY_MACRO(cond, msg) \ do \ { ...
I figured it out on my own. I ended up just looping through all the runs and change the background color (highlight). I also changed all the text to black. var body = pDoc.MainDocumentPart.Document.Body; var pars = body.Elements(); foreach (var para in pars) { foreach (var run in para.El...
My app was running Laravel 10.x and PHP 8.2. I upgraded the app to run on 8.3 and everything went fine. THen, i tried upgrading to Laravel 11.x using the Laravel Shift service. I got an error on my composer running on the PR Laravel Shift created. I checked out the Shift branch and manually ran `composer update` and...
You can do something like this using the [workmanager][1] package when you receive a push notification then you can launch a job which performs your subscription thing : @pragma('vm:entry-point') // Mandatory if the App is obfuscated or using Flutter 3.1+ void callbackDispatcher() { Workmanager().ex...
Fresh maintainer here. To share a signal across or with islands, pass them via `props`. Sharing data with islands in other ways like globals is not supported in Fresh. The reason this doesn't work is that Fresh only runs components on the server by default. When you create an island, we generate a JavaScript bund...
I was experimenting with the exact setup you have described. The following worked for me to be able to capture the packets. [admin@pf:/root]: nc -ul 4944 -v Connection from 0.0.0.0 33232 received! R ��. �����`��TjH�`w�]0�����s%ݘ��y`^N�������H��rv ��:���9r�...
FileNotFoundException: open failed: EACCES (Permission denied)Failed to open for writing:java to filenotfoundException faield:EACCES(permission denied) FileNotFoundException: open failed: EACCES (Permission denied) In emulator (i use genymotion) it works fine, but when I run it on a real device (my phone...
Failed to open for writing:java to filenotfoundException faield:EACCES(permission denied)
|javascript|filenotfoundexception|permission-denied|openfiledialog|file-access|
null
So, I am learning passport.js, everything seems to be working fine until, signing up a user. **NOTE:** I am just playing with json-server now, so no db. app.post('/signup', async (req, res) => { const { email, username, password } = req.body; if (!email || !username || !password) { ...
As of mid 2022 there is also the option to use the build-in "cloud changes" feature. This stores uncommitted changes to the cloud, using your logged in account and allows you to retrieve them on another machine. To use it: 1. Enable the feature on both machines by selecting “Cloud Changes: Turn on Cloud Changes” fr...
{"Voters":[{"Id":11082165,"DisplayName":"Brian61354270"},{"Id":14122,"DisplayName":"Charles Duffy"},{"Id":197758,"DisplayName":"toolic"}],"SiteSpecificCloseReasonIds":[13]}
I use chillerlan qr_code to generate a qrcode in php. $gdImage = (new QRCode ($options)) ->render('https://www.youtube.com/'); I can echo the qrcode on the screen as a qrcode. I can also printit as a string. BUT the following call returns false. $gdImage2 =@imagecreatefromstring($gdImage); How can I cre...
I'm guessing you're running low on heap space, and thus are "hung" in GC hell.
We have integrated leadgen for page using webhook and everything is working great. We are getting leads for all form under that page from facebook. But after running for few days we have observed an issue, it seems our webhook endpoint is not getting all the leads. There is some difference in lead count between lead...
Not getting all leads from Meta/Facebook using webhook for page leadgens
|facebook|facebook-graph-api|facebook-webhooks|
Accessing elements from `state.drinksList` and `state.tempDrinksList` using the same index, which may result in accessing an index that doesn't exist in one of the lists. This can happen if the lengths of the two lists differ or if the indices are not synchronized properly. GridView.builder( physics: ...
You have to just pass an arg in register function like ```tsx const [credentials, setCredentials] = useState({ // .... emailAddress: '', }); const handleChange = (e: any) => { setCredentials({ ...credentials, [e.target.name]: e.target.value, });...
[![pareto distribution](https://i.stack.imgur.com/OgCmg.png)](https://i.stack.imgur.com/OgCmg.png) I am trying to create a pareto distribution prediction function: ```js const paretoDistributionPredictionFor = (population = 2, at = 1) => { let percent = '?' if (population === 2) { percent = at ==...
How to create a pareto distribution prediction function?
|javascript|math|geometry|trigonometry|
Something like this: ```sql SELECT t_stamp , max(CASE WHEN partnum = '50A' AND id = 100 THEN Status END) AS [50A_100] , max(CASE WHEN partnum = '60B' AND id = 125 THEN Status END) AS [60B_125] , max(CASE WHEN partnum = '50A' AND id = 171 THEN Status END) AS [50A_171] , max(CASE WHEN partnum = '70B' AND id = 211...
I have a Laravel application with Blade templates and `script` tags. I try to import a javascript class, but I get the error message: `Uncaught SyntaxError: Cannot use import statement outside a module ` Script class : ``` class DummyClass { constructor() { } testValidate(){ return ...
The AWS amplify documentation provides a [section](https://docs.amplify.aws/nextjs/build-a-backend/server-side-rendering/nextjs/) on integration with NextJS and server side rendering. Specifically, it provides getCurrentUser() and fetchAuthSession() which can be run from the server using a server context. I am wonderin...
Wondering if AWS Amplify sdk for SSR automatically verifies user identities or JWT?
|authentication|security|next.js|jwt|aws-amplify|
null
When I try to activate the WordPress plugin, I get the following error. > Parse error: syntax error, unexpected token "function", expecting ")" > in /home/bcombd/outbox.com.bd/wp-content/plugins/edhub-core/index.php > on line 245 ``` define('TUTOR_BASE_DIR', plugin_dir_path(__FILE__)); define('TUTOR_BASE_UR...
WordPress plugin syntax error: Unexpected token
How to change the background color (Highlight) of text using openxml
Its just the difference between the largest value in the slice and the lowest value in slice, you could think of it like: O(LARGEST_NUM - LOWEST_NUM) cause python only iterates from lowest to largest but you wanna get a positive number since it cant be negative. Or you could just say O( |LOWEST_NUM - LARGEST_NUM| ) wh...
To set a bit atomically in a `std::atomic<int> a` or `std::atomic<unsigned int> a`, use `a.fetch_or(bit)` (also `|=` is overloaded, but that won't let you use an order weaker than seq_cst) To atomically clear a bit in an atomic integer, you can use `a.fetch_and(~bit)` (also `&=`) To atomically flip a bit in an...
I got the answer from https://github.com/orgs/community/discussions/113109. I did not get any email notification because I didn't turn it on (the default setting) [![github notification][1]][1] As I said in the comment I knew I can check my [notifications tab][2] but when I am watching several projects I will g...
|grafana|influxdb|grafana-variable|grafana-templating|flux-influxdb|
Try using the local storage to handle the user data and token by creating a function in the client folder: export default function useUserSession(){ const navigate=useNavigate(); const saveToken=localStorage.getItem('token'); const [userData, setData]=useState({ usernam...
{"Voters":[{"Id":1940850,"DisplayName":"karel"},{"Id":354577,"DisplayName":"Chris"},{"Id":466862,"DisplayName":"Mark Rotteveel"}]}
[SessionStorage][1] is exactly what you need. It behaves the same way as `localStorage`, but is dedicated to the page session. The downside of `sessionStorage` is that if the user will close the tab, he'll loose it. So, depending on your use case you can use: 1. **Local Storage**, but if user has two tabs, one will...
Use JavaScript-Class in Script-Tag
|javascript|laravel-blade|laravel-mix|
Data ``` CREATE TABLE mytable( ID INTEGER NOT NULL ,PartNum VARCHAR(40) NOT NULL ,EnteredOn VARCHAR(40) NOT NULL ,PickedTime VARCHAR(40) ,DeliveredTime VARCHAR(40) ); INSERT INTO mytable(ID,PartNum,EnteredOn,PickedTime,DeliveredTime) VALUES (100,'50A','2024-03-28 08:59:13...
Getting the following error when I try to do: ``` pgloader --with "quote identifiers" "mysql://..." "postgresql://..." ``` I am getting this error: ``` What I am doing here? Database error 42703: column ""invoiceNo"" of relation "Order" does not exist CONTEXT: PL/pgSQL function inline_code_block line 6 ...
PGLOADER: --with "quote identifiers": column ""invoiceNo"" of relation "Order" does not exist
|mysql|database|postgresql|double-quotes|pgloader|
I'm really new to swift and I'm not sure how to make a map. The apple developer support articles aren't really helping. But I want a map that shows your location and an icon (a phone SF Symbol) where your location bubble/ pin is. I tried to use the map(coordinate: region) and that is depricated so it doesn't work wi...
My goal in posting this is to integrate my other post [here](https://stackoverflow.com/q/78236646/6376297), where I was asked to provide a minimal working example, but also to ask for advice regarding the code itself, in case someone can suggest a better/faster/more reliable approach. Hence the separate post (not in t...
Distribute a list of positive numbers into a desired number of sets, aiming to have sums as close as possible between them
|python|optimization|partitioning|linear-programming|pulp|
In order to match one or two digit number, you may use one of the following patterns: 1. `(?<!\d)\d{1,2}(?!\d)` - This expression finds 1 or 2 digits that are not enclosed with any other digit, so it will find a match in `a12b`, `1`, `12`, `a_1_b`, `x_23` strings. See the [regex demo](https://regex101.com/r/Nggn65/1...
I just started building my first application and I can't find any information about it. I have 2 markers and an onMarkerClick() function. I can manually create an else statement for marker2, but when there are 100 markers, it will look bad. I need to create an array LatLng, markerName, markerDescription and markerWo...
I'm working on a TypeScript project in Visual Studio Code and I want Intellisense to search for classes and give me tips not only in my project folder but also in another folder. This is my folder structure: ├───@lib │ └───typescript │ └───src │ └───logger.ts │ └──...
Add path to search classes in intellisense
use the command vcom -2008 filename.vhd this will force Modelsim to use VHDL 2008
I want to use multiple GPUs to do matrix multiplication, like `torch.mm(a, b)`, to reduce memory usage on a single GPU. Here is the code working on a single GPU: ```python import torch a = torch.randn(30000, 30000).cuda(1) b = torch.randn(30000, 30000).cuda(1) c = torch.mm(a, b) # during this process, th...
Unable to save session with passport.js after signing up
|passport.js|
I was experimenting with the exact setup you have described. The following worked for me to be able to capture the packets. [admin@pf:/root]: nc -ul 4944 -v Connection from 0.0.0.0 33232 received! R ��. �����`��TjH�`w�]0�����s%ݘ��y`^N�������H��rv ��:���9r�...
Your solution failed for `console.log(findTheDifference("ab", "cab"))`. The correct way would be to start with the longer string, `t`. Then use your algorithm, and finally return the letter of the value that is `1`. <!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> ...
[Spring 4.2 has CORS support][1], however allowed Origin(s) must be set manually. Which is problematic when combined with authentication, because authentication not supported with `Access-Control-Allow-Origin: *`. How to set this automatically? Very useful for Ionic/Cordova clients. i.e. if client sends `Origin: ...
One should note that using the Vue3 Composition API you have to access the object using props.MyObject. This means you have to define the props using const props = defineProps({ MyObject: {type: Object}...}) logic. You can still access simple values without the "props." prefix, but objects require it for some reason...
I deployed the a 3 node kafka cluster using the following config in docker-compose Kafka cluster: ``` services: kafka1: image: confluentinc/cp-kafka:latest hostname: kafka1 container_name: kafka1 ports: - "9092:9092" environment: CLUSTER_ID: "7bes6xCzSMeUR-RRas3gMQ" ...
Though it's technically still part of HTML, the `<center>` tag was [deprecated in HTML 4.01](https://stackoverflow.com/questions/1798817/why-is-the-center-tag-deprecated-in-html) to emphasize that CSS stylesheets are the new home for all style and formatting parameters. That was back in 1999. These days, you should ...
Given this DataFrame: ``` data = [['Tom', 'run', '2022-01-26', 'run', '2027-01-26'], ['Max', 'stop', '2020-11-16', 'run', '2022-04-26'], ['Bob', 'run', '2021-10-03', 'stop', '2022-01-26'], ['Ben', 'run', '2020-03-11', 'stop', '2013-01-26'], ['Eva', 'stop', '2017-11-16', 'run', '2015-01-26']] df = pd.DataFrame(data, ...
This homework assignment ask me to write the preorder traversal of the tree but I'm confuse on how this would work because it visit node, left subtree, right subtree but it doesn't go to the middle. Would it just skip it or give an error? or do i just ignore the middle one? [![enter image description here][1]][1...
I am new to chromadb. Learning it first time. Just a simple code is here: collection.add( documents=["This is a document", "This is another document"], metadatas=[{"source": "test_source", "page": 1},{"source": "test_source2", "page": 2}, ], ids=["id1", "id2"], include=['dist...
How to do a simple large matrix multiplication on multiple GPUs in PyTorch? I have wrote some simple codes, but works not well
|pytorch|cuda|tensor|distributed|
null
I was also facing this issue, and I wasn't using any async function. I simply uninstalled the app and rebuilt it, and the app started working.
I have a .NET Framework web api and I would like to configure the **web.config** file so the **Serilog** logger to log into **Dynatrace**. My web.config file is like <appSettings> <add key="serilog:minimum-level" value="Information" /> <add key="serilog:using:Dynatrace" value="Serilog.Sinks.D...
Log to Dynatrace using Serilog and web.config .NET Framework API