instruction
stringlengths
0
30k
You may use it like this with a following lookahead: ```sh \bmsg=(?<logger>.+?)(?=\h+logger=) ``` [RegEx Demo][1] [1]: https://regex101.com/r/2e6zVd/1 **RegEx Details:** - `\bmsg`: Match word `msg` - `=`: Match `=` - `(?<logger>.+?)`: Capture group `logger` that match 1+ of any character (lazy ma...
{"Voters":[{"Id":266304,"DisplayName":"Alex Poole"},{"Id":205233,"DisplayName":"Filburt"},{"Id":13376511,"DisplayName":"Michael M."}],"SiteSpecificCloseReasonIds":[18]}
I'm currently working on a project to learn Inertja + Vue + Tailwind to add to my Laravel stack. I'm currently stuck on processing the response from my calls to the backend via axios. I want to create a page with a graph where people can select filters to make the graph change. Selecting a filter from the dropdown/sele...
Inertia/Vue: keep getting props undefined error
|laravel|vue.js|vuejs3|inertiajs|
The query looks like this: ``` month.ty LIKE '%2024%' ``` I am trying to make it **get year without having to change it when year ends**. Like get current year. I have tryied with plus special character: ``` month.ty LIKE '%' + YEAR(current_timestamp) + '%' ``` This way it pops an error what ever I put insid...
Can '%VALUE%' be written so it gets current year automaticlly
|sql|mysql|xampp|wildcard|sql-like|
Add below code to serve static files ``` app.use(express.static(__dirname + '/public')); ``` create a folder named public in your root folder and add your styles files inside public folder.and change your linking css code as below. ``` <link href="/css/style.css" rel="stylesheet" type="text/css"> ``` So fol...
Столкнулся со следующей проблемой, буду ОЧЕНЬ признателен ща помощь. Постоянно отклоняют документы, которые могли бы подтвердить мой адрес, и я уже не знаю, что мне отправить из всего списка перечисленных документов у меня уже не осталось вариантов. Люди, которые смогли зарегистрировать и подтвердить аккаунт разработч...
Как подтвердить свой адрес в Google Play Console в Беларуси?
|google-play|google-play-services|google-play-console|
null
|xcode|crashlytics|
so Im attempting to use overpass to find the state and postal code based upon long and lat coordinates. I know if I run the following, I can find at least the state name in what is reported. But I have no idea how to just search for the specific tag I want and only have that be returned. ``` [out:json]; ...
Query Overpass turbo by lat/lon to find specific tags
|gps|openstreetmap|overpass-api|
null
Suppose I have an array of patterns: ``` set pat(0) "foo" set pat(1) "bar" ... set loc(foo) "123" set loc(bar) "456" ... expect { -re "it's a $pat(0) in location (X)" { set $substr $expect_out(1, string) if { [string compare $loc($pat(0)) $substr] != 0 } { $loc($pat(0)) = $substr ...
How can I compress repetitive expect matches with a loop?
|expect|
The short and simple answer is that `await` allows the members of your thread pool to work on other tasks while they're waiting for something else to complete. Think of the thread pool like your employees. Suppose one is given a task, but during the course of that task they find that they need to wait for someone el...
Problem with locomotivescroll nextjs typescript working
|reactjs|next.js|react-hooks|scroll|locomotive-scroll|
null
It is better to use new calculator but i see surprising monthly cost. [![enter image description here][1]][1] Compare to legacy one with same input: [![enter image description here][2]][2] Refering to the calculation tutorial from the [doc here][3]. The legacy one is more accurate. Which calculator versio...
Why New Google Cloud Pricing Calculator has huge costs different from Legacy One?
|google-cloud-platform|google-cloud-functions|
I'm moving a project of mine into Slim Microframework, by using PHP-DI containerization. I need to POST some JSON data to http://localhost/api/base (XAMPP) and get a confirmation (at least at the beginning). This is my index.php: <?php use Psr\Http\Message\ResponseInterface as Response; use Psr...
Slim routing in PHP-DI container
|php|post|routes|slim|php-di|
I suggest you this refactoring: 1) Store all fields in a single array where each row represents a "subform" 2) The index *$i* is no more needed, we will use the array index 3) Add a row:key to each "subform", the array index is a good option since we will remove the rows using *unset()* so the indexes will not ...
I wrote the following two examples to test the concurrency of Zig and Erlang. ``` % Erlang -module(spwntest). disp()-> _ = 234. main(_) -> F = fun(_) -> spawn(fun() -> disp() end) end, lists:foreach(F,lists:seq(1,2000000)), io:format("done"). %% Result: All Erlang processes complete their work i...
Zig Concurrency Vs Erlang Concurrency, is Zig less efficient than Erlang?
|concurrency|erlang|zig|
null
`-F` and `--onefile` are the same thing. Also, it should be `--hidden-import` not `--hiddenimport` Do like this: pyinstaller --onefile --hidden-import=numpy --hidden-import=os --hidden-import=matplotlib.pyplot --collect-submodules=numpy --collect-submodules=matplotlib.pyplot BOX_PLOT_interactive.py
I need to find a permutation vector such that a 250x250 matrix reaches a maximal cost (sum of the elements in the superior triangle). Consider the cost function as a black box for my question. My neighborhood strategies are: - exchange 2 elements of the permutation vector - make an insertion of an element of the ...
I'm using WSO2 6.1.0 and the browser find a valid certificate in my Carbon url https://localhost:9443/carbon/admin/login.jsp When I change the name of localhost, according this url https://medium.com/@igunawardana/how-to-change-hostname-in-wso2-is-with-self-signed-certificate-ea547605e015, my browsers ( Chrome and...
WSO2 change localhost - ERR_CERT_AUTHORITY_INVALID
Angular component's interface ( @Output / @Input ) how do you expose methods? Or certain type of events?
*your text* let getWeatherInfo = async ()=>{ let response =await fetch(`${API_KEY}?q=${city}&appid=${API_KEY}`); try { let jsonResponse = await response.json(); console.log(jsonResponse); } catch (error) { // Handle the error here. Network errors, for example, w...
SyntaxError: Unexpected token '<', "<!doctype "... is not valid JSON. how to solve this error
|reactjs|
null
I need to determine if the current time falls between two 'H:i' times in a specific timezone. Here is the code I have written: ```php // The actual time in Brisbane is 1:10 am on Thursday, 28 March 2024 (GMT+10) $storeStartTime = Carbon::createFromFormat('H:i', $seller->start_time)->shiftTimezone("Australia/Brisb...
How can i compare time using Carbon PHP in a timezone
You can set an [avoidOptionals][1] object in your codegen config to prevent nested Maybe wrappers from appearing in the output code you can also [modify the value of the Maybe<T> type][1] from `T | null` (default) to whatever you'd like it to be; `T | null | undefined`, maybe. [1]: https://the-guild.dev/graph...
null
I relied on row locking in mysql to prevent simultaneous running of one php script when working on one userid. I used following UPDATE users SET rowlock = 1 WHERE id = ? AND rowlock = 0 and then in php if($stmt->affected_rows == 0) Ideally, if one instance of php script updates the rowlock to 1 then the...
I am facing problem with implementing WandB for tracking my RL training algorithm. I am using Keras for writing my training code. However, I do not use the model.fit function. I am instead using @tf.function to perform updates on the Q-network and the Policy-network (I am using DDPG learning algorithm). How can I initi...
Using Weights and Biases with Keras without model.fit
|machine-learning|wandb|
null
I installed [micromamba][1] as Alexey [suggested][2]. 1) Installation in PowerShell: ``` Invoke-Expression ((Invoke-WebRequest -Uri https://micro.mamba.pm/install.ps1).Content) ``` 2) set `MAMBA_ROOT_PREFIX` to `c:\micromamba` ``` micromamba -r c:\micromamba ``` and was able finally to g...
I have a ListView template, and one column is a button. I need the selected item when I click on this button. How can I do this?
If every file size of yours is less than 5000 rows, then you can try below pipeline design. Here, it requires two pipelines which are parent and child pipelines. ``` (Parent pipeline) - Get meta data 1 - child items - calculate your pipeline run interval timings and give the last modified- It selects only the files ...
There are a couple of things to consider when using `composer init`. The first question (`<vendor><name>`) defines quite a lot and defaults to whaterver user is logged on (?) and what folder she is working in. Ofcourse this can be changed but it needs some thinking ahead. Therfore take this step by step. ## Setting ...
There are a few problems in this code. 1) If You are making an ajax request to action method in controller , if it is returning the view you'll get html code in ajax response. Hence in your case, you need to send Json with redirect URL 2) Also after sending redirectUrl in your json, it will throw 404 cause in succe...
The marked answer here didn't work for me. It didn't work for special characters like ^ and | . So I've written a table generator that you can get a table based on the given code page. Its C# .net core 8. I hope this will help someone. using System.Text; int codePage = 37; //ibm-37 - change the code ...
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) { ...
|node.js|passport.js|
I ended up just replacing the variable in js before the container started. Straight forward, No code changes. `Dockerfile` ``` FROM nginx:alpine COPY dist/ /usr/share/nginx/html COPY docker-entry.sh /entry.sh RUN chmod +x /entry.sh EXPOSE 80 ENTRYPOINT ["/entry.sh"] CMD ["nginx", "-g", "daemon off;"] ```...
You can also use my project which is similar to ``php-fpm`` and Apache's ``mod_fcgid`` in many aspects, but works with everything that supports FastCGI startup protocol (including ``CGI::Fast``): https://github.com/vdudouyt/std-fpm
{"Voters":[{"Id":9473764,"DisplayName":"Nick"},{"Id":7508700,"DisplayName":"David Buck"},{"Id":546871,"DisplayName":"AdrianHHH"}],"SiteSpecificCloseReasonIds":[16]}
Java 17 makes this task easier, because it provides the `java.util.HexFormat` class: ```clojure (import (java.util UUID HexFormat)) (def uuid "5231b533ba17478798a3f2df37de2aD7") (UUID. (HexFormat/fromHexDigitsToLong uuid 0 16) (HexFormat/fromHexDigitsToLong uuid 16 32)) => #uuid "5231b533-ba17-4787-98a...
I am trying to mount iso file with python on Windows 10. Here is the code: ``` import ctypes from ctypes import wintypes ByteArray8 = wintypes.BYTE * 8 src = r'F:\Backup\ubuntu.iso' class GUID(ctypes.Structure): _fields_ = [ ("Data1", ctypes.c_long), ("Data2", ctypes.c_short), ...
null
global nodeM nodeM=None def inorderTraversal(self, root: 'TreeNode', tval:int) -> 'TreeNode': #if(nodeM): #print("sdf", type(nodeM)) #node=None if root: self.inorderTraversal(root.left,tval) print(root.val) if(...
I can't get the specific node of BST using recursion . i.e. every stack it erase
It's hard for me to understand exactly what you're saying. But you want to display all the products related to that category when user selects one of the two categories Electronics or Clothes. To do this, first add another field to the `ProductsCollection` like this ProductsCollection :[ {'id':'1', 'title':...
{"Voters":[{"Id":1255289,"DisplayName":"miken32"},{"Id":633440,"DisplayName":"Karl Hill"},{"Id":13376511,"DisplayName":"Michael M."}]}
I'm not aware of whether Packer can do this, but solving your underlying issue, it is possible to modify the image after it has been created. Two tools I know of for this are [crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane) (from Google) and [regctl](https://github.com/regclient/regclient/) (...
my_vect.size() is not a variable, but a function. It looks like this: size_type size() const _NOEXCEPT { // return length of sequence return (this->_Mylast - this->_Myfirst); } So here is the solution: start your program with the debugger. Break before the vector size changes. Add a **New Data Breakpoin...
You could simply replace [`with_columns()`](https://docs.pola.rs/py-polars/html/reference/dataframe/api/polars.DataFrame.with_columns.html) with [`select()`](https://docs.pola.rs/py-polars/html/reference/dataframe/api/polars.DataFrame.select.html): ```python df = pl.DataFrame( {"A (%)": [1, 2, 3], "B": [4, 5, ...
I try to compile an Angular JS app with Cordova to get an apk. I use this command : ***cordova build android*** I get this ERROR message : (...) ***"Element provider#android.support.v4.content.FileProvider at AndroidManifest.xml:15:9-17:20 duplicated with element declared at AndroidManifest.xml:12:9-14:20"*** ...
I have a data frame with a column of the date: [![enter image description here](https://i.stack.imgur.com/3ejSV.png)](https://i.stack.imgur.com/3ejSV.png) I would like to partition the DF into 3 DF based on time: 1. 00:00-12:00. 2. 12:00-18:00. 3. 18:00:00:00. How can it be achieved without a loop? I c...
Partition a data frame by time window
|python|pandas|dataframe|datetime|optimization|
null
I just set up firebase in my angular project. I have a problem while trying to use a firestore function. I have this service: ``` import { Injectable } from '@angular/core'; import { Firestore } from '@angular/fire/firestore'; import { doc, getDoc, } from 'firebase/firestore'; @Injectable({ provided...
Two Update statements on a row are running simultaneously with no locking in MYSQL
|mysql|concurrency|locking|
I'm trying to create an app using [TMDB](https://www.themoviedb.org/) using NextJS an Typescript. I have a movies.ts file with this code: ``` export async function getTrendMovies() { const url = 'https://api.themoviedb.org/3/trending/movie/day?language=en-US'; const options = { method: 'GET'...
Argument of type 'void' is not assignable to parameter of type 'SetStateAction<{}>'
|reactjs|typescript|next.js|
null
I am getting heaps of these errors at run time in my application, and I have been going through suggested solutions online and coming up short. Nothing seems to be working. So, the errors: e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' t...
after asking BlackBox AI the following: > I'm using Flutter to create a desktop app that has 2 TextField widgets > A and B, sometimes the widgets could have long text that disappears > beyond their limits, in that case, the beginning of the text is not > visible, I want the text inside the widgets to be visible f...
``` import os import json import requests import pandas as pd from tqdm.notebook import tqdm streamings = dict( amazon='amp', disney='dnp', darkmatter='dkm', rakuten_viki='vik', hbo='hbm', netflix='nfx', hulu='hlu', paramount='pmp', funimation='fmn', crunchyro...
I am getting 'NoneType object is not subscriptable' error in web scraping method
|python|api|web-scraping|jupyter-notebook|jupyter|
null
I have a tflite model in unity that takes input image and predicts its output. However, when I exported it as apk, the model is not working as I am not getting the predicted class in output screen. Does anyone know how to run it actually. Do I need to have any android foreground services or do I need to add any extra s...
I have some simple age classification code in which I try to use ternary operator. It worked, but VS Code shows a yellow line underneath the code saying that "expression ... is assigned to nothing". How do I get rid of it? ``` age = int(input("Input your age: ")) print("Teen") if age >= 15 else print("Kids") # he...
Why did I get a warning "expression is assigned to nothing" in ternary?
|python|conditional-operator|
When I am creating a new file in neovim (without closing the neovim instance), I am unable to import the variables from those files (import the new file as a module) in other files of my project unless I restart my neovim. What could be wrong with the noevim LSP configuration? I have basic LSP configured as follows: ...
Pyright Language Server with Neovim not loading new files
|neovim|nvim-lspconfig|