instruction stringlengths 0 30k β |
|---|
Adding a random prefix and/or suffix to a value before hashing is called [salting][1]. It is a recommended practice.
The purpose is to prevent someone from knowing whether, for example, UserA has the same password as UserB, because their hashed values are identical. Hence, you add a cryptographically secure random ... |
When you opening modal on a tag and want show tooltip and if you implement tooltip inside tag it will show tooltip nearby tag. like this
[![enter image description here][1]][1]
I will suggest that use div outside a tag and use **"display: inline-block;"**
```html
<div data-toggle="tooltip" title="" data-origi... |
Browser cant send back the cookie when is safari/ios
```
const corsOpt = {
origin: ['mydomain.com', 'http://localhost:5173'],
credentials: true,
};
```
...
```
server.set('trust proxy', 1);
server.use(cors(corsOpt));
```
...
```
server.use(
session({
name: 'myCookie',
secret: proces... |
Cant handle Session's cookie when Safari/iOS |
|ios|express|session|cookies|safari| |
null |
Your custom `HeaderCell` does nothing but creates a `CheckBox` that you will never see or access as UI element. Neither on the `HeaderCell` nor anywhere else on the grid. So, I don't understand how:
> _The checkbox added successfully ..._
You must add a _Control_ to some `Parent.Controls` collection and that `Pa... |
I had the same problem and I used `npx expo-cli upgrade` command inside of the project directory and my problem solved. |
|excel|vba|excel-tables|listobject| |
|nginx|jwt|nginx-reverse-proxy|nginx-config| |
|excel|vba|excel-tables|listobject| |
In my codesnippit I want to make the red box appear over the black box but under the text. The problem is when I add `transform: translateZ(0px);` to the black box, my `z-index: 2;` CSS on my text doesn't work anymore. I was wondering if there was a way for one thing to appear on top of another even if they are being t... |
How can make z-index absolute even if there's transformation modifiers on the element? |
|javascript|html|css|z-index| |
How to set max width / height of image not biggere original size? |
|css|tailwind-css| |
I am trying to share state created with zustand from a mono-repo shell application to an external app outside the mono-repo which is also created using monorepo.
```import { create } from 'zustand';
type Store = {
count: number;
increment: () => void;
};
const sharedStore = create<Store>((set) => ({
... |
Error while sharing the state from mono-repo shell app |
|reactjs|monorepo|webpack-module-federation|nx-monorepo| |
On dropdown click call API with first 10 item and display in the dropdown list. after then if user scroll down of the dropdown list then again call api with other 10 item. also same thing filter if user search any things then start from 1 page. in sort i need to implement infinite scroll of primereact multiselect
... |
|ios|swift|uitableview|uikit| |
null |
I have a simple table view with cells. When I run the app in simulator and checking the hierarchy it is not aligned in single line, instead it is looking as nested.
UI Design as below:
[![enter image description here][1]][1]
Hierarchy looks as below:
[![enter image description here][2]][2]
It looks fine in o... |
|python|seaborn|plot-annotations|grouped-bar-chart| |
A way to do it using bitwise operators:
dataFormat = f'0{len(data)}b'
value = int(data, 2)
result = f'{value ^ (value << 1) & value:{dataFormat}}'
Details:
First we apply a XOR operator with the left shifted value. The goal is to remove all 1's of a sequence except the last.
01000... |
You can remove consecutive duplicates by adding each item to a new list only if it doesn't match the prior item.
Here is an example:
```
# Copied from the examples in the question
a = [
[8, 8, 8, 8, 5, 7],
[8, 5, 5, 5, 7, 8, 7, 7],
[25, 15, 15, 13, 18],
[25, 15, 15, 13, 18, 15]
]
# create a ... |
I am writing a request handler in a telegram bot. I am having difficulty processing the waiting for pressing the inline button, can you tell me if this can be implemented? I have a ticket monitoring start handler, get them in json, then process each ticket in the list.
```
class MonitoringStatus(StatesGroup):
... |
I am building a simple budget tracker, and I'd like to let user to filter by apps name.
Below is my code.
```json
[
{
"status": "on",
"id": "NZMwD83Nxg",
"name": "GTA_UA_UAC_Android_01_DAU",
"dailyBudget": 800,
"apps": [
{
"name": "app 1",
"icon": "https://m... |
Remove Product SKU from order details in WooCommerce email notifications |
This is just an update to @Kolky's link as had to browse through a lot of MSDN Archives to find it.
[Visual Tree of a DataGrid - WPF DataGrid: Dissecting the Visual Layout][1]
P.S.: Low rep couldn't comment on Kolky's answer.
[1]: https://learn.microsoft.com/en-us/archive/blogs/vinsibal/wpf-datagrid-disse... |
Markers are editor specific, not model specific. And changing the model usually removes markers and decorators. You have to re apply your markers after you switched the model. |
I have a single-column layout, where the body element acts as a column and has a distinctive background-color. I want the body element to fill the viewport height (currently using `100vh` for this) so that inner elements can use `height: 100%`, but if the content of body is larger than the viewport, the body should gro... |
I want to create a game for 2 people, where each person has to control a plane by dragging his finger. But I don't see any methods in Compose to detect the second drag.
The onDragStart method is not called for the second drag when I press the screen with two fingers.
My code:
```
@Composable
fun AirRacesCon... |
infinite scroll of primereact multiselect |
|reactjs|infinite-scroll|multi-select|primereact| |
null |
{"OriginalQuestionIds":[8599595],"Voters":[{"Id":2615209,"DisplayName":"Ben Fortune"},{"Id":328193,"DisplayName":"David","BindingReason":{"GoldTagBadge":"javascript"}}]} |
Here is a **_PyMuPDF_** example of a table having external column headers in a number of different header text rotation angles - including multi-line column headers.
Some of the column names are vertical.
[![enter image description here][1]][1]
Here is a PyMuPDF script which finds and extracts the table, identif... |
{"Voters":[{"Id":681865,"DisplayName":"talonmies"},{"Id":1695960,"DisplayName":"Robert Crovella"},{"Id":8877,"DisplayName":"ΓΠ°n"}],"SiteSpecificCloseReasonIds":[13]} |
Whenever using a unit of measure (rem, px, %), its a best practice to continue using that. The reason it's changing is because 50% is based on the screen or the parent container. So if the container shrinks, that unit will as well since it's always 50% of it. So...you might as well make it 100% or in your case:
... |
Uninstall node_modules and restart the your system and run
npm install |
Previous note: No solution on the following post is working for me:
[https://stackoverflow.com/questions/55568697/blank-page-after-running-build-on-create-react-app/63277866#63277866][1]
For my case, App.js main function:
```jsx
function App() {
return (
<div className='App'>
<Routes>
<R... |
shadcn: How to filter by apps name? |
|reactjs|shadcnui|tanstack-table| |
null |
if(sc.hasNext()){
String record = sc.nextLine();
Scanner stringScan = new Scanner(record);}
try this before name = Scan.nextLine(); |
I am using a controller that is accessible as a singleton throughout my application. It is in a .ts file instead of a tsx file, and outside of the react component lifecycle, so I am not depending on any React Hooks.
I have a private property in the controller:
`private abort: ((reason: string | undefined) => voi... |
You were close. Try this:
```
.arrays |= map(objects | select(.name == "foo") .properties = [{type : "foo", url : "bar"}])
```
<sup>[Online demo](https://jqplay.org/s/drrXQv6kXyE)</sup> |
After finishing environment variable and my.ini, i still can't start MySQL on Windows through DBeaver. It just return "System error 5: rejection to visit". While i starting cmd as an Administrator, it returns "System error 2 : file can't be find".I hope i can start MySQL. After finishing environment variable and my.in... |
How to start up of MySQL? |
|mysql| |
null |
I am building a simple budget tracker, and I'd like to let user to filter by apps name.
Below is my code.
```json
[
{
"status": "on",
"id": "NZMwD83Nxg",
"name": "GTA_UA_UAC_Android_01_DAU",
"dailyBudget": 800,
"apps": [
{
"name": "app 1",
"icon": "https://m... |
null |
I just upgraded my shared hosting to a VPS (both on hostinger), the VPS has 2 vCPUs and 8GB Ram (Shared hosting had 2vCPUs and less Ram), always below 5% CPU usage & 25% Ram usage.
However, the VPS is much slower than the shared hosting. It takes at least 2 times longer on the VPS to resolve a single request.
Sh... |
How to configure Nginx for a VPS? |
|docker|nginx|vps|nginx-config|shared-hosting| |
Whenever I try merging the datasets (TIGER/Line California data and CalEnviroscreen 4.0 dataset) the variables for CalEnviroscreen 4.0 show null values instead of the original values. Here is what I have done so far.
```
import esda
import geopandas as gpd
import matplotlib.pyplot as plt
import numpy as np
impo... |
|python|merge|geospatial|spatial| |
Considering this file structure:
```
/
βββ Users
β βββ You
β βββ main_dir
β βββ subdir_1
β β βββ subdir_1-1
β β βββ movie_A.mp4
β βββ subdir_2
. β βββ movie_B.mp4
. βββ subdir_3
. βββ movie_C.mp4
```
After installi... |
|android|kotlin|android-jetpack-compose| |
I have two identical C++ classes that are instantiated from within a lambda which is run in a separate thread.
These classes' objects are used from within another class `X`:
This is how these classes are used:
```c++
class A : public C
{
std::thread thr;
void thrFunction(X &x)
{
while(atomic<b... |
Please check my code from the internet. I am trying to find the X-axis values at 10, 50 and 90 Y-axis values from the chart. But np.intercep() is not working.
I have tried the Y-Intercept and other methods. But couldn't find a solution of my problem.
```
from pandas import DataFrame
import numpy as np
impo... |
See example. Recursive assmebling expression formula from expression_tree table.
```
with -- recursive -- for PostgreSql
cte as(
select expression_id,oid
,concat(
case when lv in('*','+','-') then concat('[',lid,']')
else cast(lv as varchar) end
,ov
,case when rv in('*','+','-') ... |
I have a simple script to upload images using dropzone v5 , but when I use the option "resizeWidth", the images are uploaded but with **rotation** especially the photos taken by mobile phone I guess.
How we can prenvent that ?
Dropzone.autoDiscover = false;
var myDropzone = new Dropzone("div#my... |
Why images are rotated if we resize width using dropzone |
|php|dropzone.js|symfony6| |
You need to enable experimental support for ES modules. Try the following in your `package.json`, instead of simply `jest`:
```
NODE_OPTIONS='--experimental-vm-modules' jest
``` |
null |
{"Voters":[{"Id":2802040,"DisplayName":"Paulie_D"},{"Id":483779,"DisplayName":"Stickers"},{"Id":9267406,"DisplayName":"imhvost"}]} |
I have experience with this field.
I have ever done Shoes virtual try-on project and that was the mobile application project. Of course the back-end was computer vision technique.
For this project I used 3D object key points detection technique. All of shoes models should have 3D key points information and after ... |
I have a task to create an app or extension that changes the order table or customer table like adding a new column into it or highlighting some rows according to data or customers like good customer or bad customer something like this.
Is it possible or not? If anyone has an idea then please let me know
Thanks,
Sa... |
Can I Customise The Order Table At Admin Side Of Partner.Shopify? |
|shopify| |
null |
I took a deep dive into nodejs, npm, and a side trip through yarn to figure this out.
The fundamental issue was that I needed a specific node version and using the globally installed firebase would not support me. I learned that firebase-tools has a specific nodejs version built in so that it can be standalone and ... |
A few things to fix :
(A) You need to change the form tag of your HTML form from
```
<form action="mailto:mymail@gmail.com" method="post" enctype="text/plain">
```
to
```
<form action="process_form.php" method="post">
```
(B) and change this line in PHP from
```
$email_headers = "From: $name <$email>... |
```typescript
import { HttpClient, HttpErrorResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
isDataModel(response: ApiModel): response is DataModel {
return response.Status === 'success';
}
getReminder(reminderId: number): Observable<DataMod... |
I'm student in practicing PintOS Project.
In Programming Project 3(Virtual Memory), I got ploblems about "preprocess in compiling" (C program).
I had tried all attempt that do my best, but I'm absolutely lost at this point on how to fix it.
Finally i come to here, had to ask you about this issue.
**error**
The... |
about "preprocessing" in PintOS compiling(C programming), There are 2-questions for referencing headers and incomplete type error |
|c|compiler-errors|c-preprocessor|virtual-memory|pintos| |
null |
I'm quite new with SQL. I have a querry to construct and fill a table that goes like this :
```
Select
A.ID as Identification,
B.Name as Family_name,
B.Firstname as first_name,
B.Address as adress_1
From A
Left join B on B.ID = A.ID
Union
select
C.ID as Identification,
D.Name as Family_name,
D.Firstn... |
I'm struggling to checkout a remote branch that I know exists, because it shows up with `git ls-remote`:
```bash
$ git ls-remote
242d56fbd8d8af67df3157bd047252f5580e3df8 HEAD
242d56fbd8d8af67df3157bd047252f5580e3df8 refs/heads/master
517af0f6de9a3db846c4bde693a11ccb... |
There are semi-official schema diagrams available from [Moodle's developer documentation](https://moodledev.io/docs/apis/core/dml/database-schema), although I personally don't care for the viewer for the chosen file format (DBDesigner4).
If you want to create your own ERD, [MDL-49795](https://tracker.moodle.org/brow... |
from me the filterMode doesn't work, check this exemple and zoom in:
[test](https://echarts.apache.org/examples/en/editor.html?c=line-marker&code=G4QwTgBAlgxg9gOwEJigEwOYFMIF4IDkaIALiAFxQC2I2A9AA4IYDcARiAM5YBsALABooANSQB5AEoB3AAwBpAOIY4AQTUqAcgGUAqgAsAojozqAwgE11KqqZWW1puAAUsVAK5XTADSQBJAOpeALLqnAAq6gAyBlIG1gxS9upe2hI... |
I was going through the CRACO documentation and it all looks very confusing.
But my basic question was if there is any relevance to the "mode" attribute in craco.config.js OR it is a non-existent property?
module.exports = {
mode: 'production', //'development'
webpack: {}
} |
craco configuration with mode attribute |
|webpack|craco| |
Using r and r2, y_table and y_table2, but think this is what you're after:
```
r <- rast(nrows=3, ncols=3)
values(r) <- 1:9
y_table <- data.frame(id=1:9, y=c(0,0,1,0,1,1,2,2,2))
r2 = r
y_table2 <- data.frame(id=1:9, y=c(0,0,1,0,1,1,2,2,2))
y_table2$y <- as.factor(y_table2$y)
values(r2) = y_table2$y
r2
clas... |
I am making a multiplayer game with Mirror and trying to make player names that float above players. The client and host can both enter their names but the client's name will just be the host's name. I do not want this.
Here's the Name Manager code which is on a prefab.
```
public class PlayerNameInput : NetworkB... |
[I don't think you can pass the environment in the calling workflow the way you do][1], you'll need to convert that to an input as well. Plus, to pass an environment you need to use `environment:` and not `env:`, the latter is for setting a job level environment variable, the former is to link a job to an environment d... |
I want to update two documents by \_id using the update_many function. Is it possible to do this? If so, how should I implement it?
I tried to use AI to implement this, but it didn't work. Here is the code I managed to write:
```
database.update_many(
filter={"_id": {"$inc": ["Shares", "Crypto"]}},
... |
Can I update two documents with different _id using update_many? |
|mongodb|pymongo| |
null |
Usually using a variable is an additional overhead, but in your case Chrome was able to provide the same performance. But if a variable is reused, that could actually boost performance. So the rule could be - don't create unnecessary variables.
Also note that JS engine could optimize code while compiling so in reali... |
I have a scripts that serves as a kill switch for another script. It compares the value of a file "kill.txt" of either a "0" or "1".
```
echo "KILL SWITCH: $(< /path/to/file/kill.txt)"
if [[ $(< /path/to/file/kill.txt) == 1 ]]; then
echo "kill-switch engaged"
else
echo "kill-switch NOT engaged"
fi
```... |
SQL query : creating table with distinc values on selected columns |
If you want to use `async` function in tests, then you should also use `async` in your `it` clause:
```
it('should create', async () => {
expect(component).toBeTruthy();
});
```
or use `done()`
```
it('should create', (done) => {
expect(component).toBeTruthy();
done();
});
```
Hope this... |