This can be used with navigation.getParent to refer to this navigator in a child navigator.
Use javascript, `
let message = document.querySelector(".message");
if(message.innerText.length < 75){
message.style.padding = "8px 75px 8px 8px";
}
else{
message.style.padding = "8px 8px 8px 8px"
}
`
you have to use @SpringBootTest annotation in your test class. more infos see here https://spring.io/guides/gs/testing-web
load the dict as a variable "data" then extract the values for the key "values"
iterate over the resulting list to get each dict and getthe value for the key "token"
values = data["values"]
for item in values:
print(item["token"])
which provides:
35013
35025
35012
The error occurs due to mismatched or outdated Firebase dependencies. To fix this issue, run the following command to upgrade all dependencies, including Firebase packages, to their latest major versions:
flutter pub upgrade --major-versions
Error message you are seeing indicates that Jupyter Notebook is unable to write to a specific file due to a "Permission Denied" error. This can happen for a few reasons, such as permission settings on your system or potential conflicts with other processes. Make sure you have appropriate permissions to write to the directory C:\Users\48608\AppData\Roaming\jupyter\runtime
I ran into this problem too with Mapbox (max 25 waypoints).
I was implemented an algorithm which is responsible for pumping waypoints into navigation engine in periodic manner like a moving snake.
It works mostly, but really hard to track and maintain which waypoints are in the "completed" or in the "remaining" set of waypoints. Since my users can deviate from planned road.
@Harald K, Is there any way to configure the listener in OSGI ? we have developed plugins using osgi and are facing the same issue as above.
I'm assuming that "bookmarking" a post is not a problem for you. The underlying question is how to structure so that you can show the bookmarked activities for a user?
Regarding how to "bookmark" a post, same as the recommendation from @Robot-43, you can add it as a reaction to the post.
Regarding how to structure so that you can have a page that lists all the bookmarked posts, here is my suggestion:
You can get all reactions of a userId
and filter it by kind
https://getstream.io/activity-feeds/docs/dotnet-csharp/reactions_introduction/#retrieving-reactions
You can read reactions and filter them based on their user_id or activity_id values. Further filtering can be done with the kind parameter (e.g. retrieve all likes by one user, retrieve all comments for one activity, etc.).
Request an API to get all the reactions filtering by the user's ID, and the "bookmark" reaction kind, now you get a list of activityIds with that reaction.
Next make a request to the batch activity get
API, and send the list of activityIds in the request.
https://getstream.io/activity-feeds/docs/dotnet-csharp/add_many_activities/#batch-get-activities-by-id
You can also find the batch enriched activity get
in the source code probably, even if it's not documented in the website (if enriched activities is what you are using)
And then, you'll have your page :)
in batch activities get
, you can send 100 activityIds at a time.
I know it might be late, but I hope my answer helps someone.
Check if you are using https
instead of http
?
In my case replacing http with https helped solving the error!
I'm also facing this issue. the 'messages' webhook doesn't work at all. this has worked in the past but my app was not active for a few months and now it stopped working. I'm trying to understand if I now need the whatsapp_business_messaging permission for this. It's unclear if this is a Meta bug or a change in policy
try to execute the application with sudo -E applicationName
this command will keep the current environment variables associated with graphics to run a Gui Application in linux desktop
implementation ("net.minecraftforge:mergetool:0.2.3.3") { force = true }has something error implementation fg.deobf("net.minecraftforge:mergetool:0.2.3.3:forge") { force = true } is true
output of pylance - python extension
First I meet an error with pylance can't start because vscode version required 1.91.0 by my only 1.90.0. So I update my vscode version to the latest 1.95.3 and it work as expected.
Please make sure you choose pylance - microsoft as language server
The same problem... And it’s not clear how to solve it. There are no more options in the documentation
I had a similar problem. Ubuntu system, neovim of v0.4 I followed this article to update my neovim
https://medium.com/@leonardormlins/easiest-way-to-update-neovim-on-ubuntu-a283c66d5322
This upgraded my neovim to v0.7 and my init.lua was sourced.
I had the same problem as you, what has helped me is not running the pub upgrade command on the console. I go to the flutter packages official (pub.dev), searched the auth and its related packages and installed them by adding their latest version under dependencies in pub.yaml file.
firebase_auth: ^5.3.3 firebase_core: ^3.8.0 firebase_storage: ^12.3.6 cloud_firestore: ^5.5.0
I hope, this would help at you end.
Simply copy and paste using 'Values and Source Formatting (E) option.'
1 - Check disk space. Most of the time is caused for lower disk space. Clean up logs and free space.
2 - Restart the Mysql server (after cleaning space)
2 - downgrade your php version to 7.4
iam using base image as azul/prime:17 ill get error
configure: error: You should retry --with-os-type=SUBDIR The command '/bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends gnupg dirmngr wget ca-certificates ; ddist() { local f="$1"; shift; local distFile="$1"; shift; local mvnFile="${1:-}"; local success=; local distUrl=; for distUrl in "https://www.apache.org/dyn/closer.cgi?action=download&filename=$distFile" "https://www-us.apache.org/dist/$distFile" "https://www.apache.org/dist/$distFile" "https://archive.apache.org/dist/$distFile" ${mvnFile:+"https://repo1.maven.org/maven2/org/apache/tomcat/tomcat/$mvnFile"} ; do if wget -O "$f" "$distUrl" && [ -s "$f" ]; then success=1; break; fi; done; [ -n "$success" ]; }; ddist 'tomcat.tar.gz' "tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz" "$TOMCAT_VERSION/tomcat-$TOMCAT_VERSION.tar.gz"; echo "$TOMCAT_SHA512 tomcat.tar.gz" | sha512sum --strict --check -; ddist 'tomcat.tar.gz.asc' "tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz.asc" "$TOMCAT_VERSION/tomcat-$TOMCAT_VERSION.tar.gz.asc"; export GNUPGHOME="$(mktemp -d)"; for key in $GPG_KEYS; do gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "$key"; done; gpg --batch --verify tomcat.tar.gz.asc tomcat.tar.gz; tar -xf tomcat.tar.gz --strip-components=1; rm bin/.bat; rm tomcat.tar.gz*; command -v gpgconf && gpgconf --kill all || :; rm -rf "$GNUPGHOME"; mv webapps webapps.dist; mkdir webapps; nativeBuildDir="$(mktemp -d)"; tar -xf bin/tomcat-native.tar.gz -C "$nativeBuildDir" --strip-components=1; apt-get install -y --no-install-recommends dpkg-dev gcc libapr1-dev libssl-dev make ; ( export CATALINA_HOME="$PWD"; cd "$nativeBuildDir/native"; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; aprConfig="$(command -v apr-1-config)"; ./configure --build="$gnuArch" --libdir="$TOMCAT_NATIVE_LIBDIR" --prefix="$CATALINA_HOME" --with-apr="$aprConfig" --with-java-home="$JAVA_HOME" --with-ssl=yes; make -j "$(nproc)"; make install; ); rm -rf "$nativeBuildDir"; rm bin/tomcat-native.tar.gz; apt-mark auto '.' > /dev/null; [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; find "$TOMCAT_NATIVE_LIBDIR" -type f -executable -exec ldd '{}' ';' | awk '/=>/ { print $(NF-1) }' | sort -u | xargs -r dpkg-query --search | cut -d: -f1 | sort -u | xargs -r apt-mark manual ; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; rm -rf /var/lib/apt/lists/; find ./bin/ -name '*.sh' -exec sed -ri 's|^#!/bin/sh$|#!/usr/bin/env bash|' '{}' +; chmod -R +rX .; chmod 777 logs temp work' returned a non-zero code: 1
I've added node-options="--openssl-legacy-provider"
into the .npmrc file, which I got from comment.
Check if the Form is Actually Being Submitted
Add a name attribute to the submit button to make sure it gets submitted, even if the browser requires it.
{{ __('Submit') }}Ensure the Form Method is Correct
Your form uses the correct POST method, but make sure the corresponding controller method (store) is set up to handle POST requests:
Route::post('/sales/store', [SalesController::class, 'store'])->name('sales.store');
Final Check:
add this before calling functions that consists of geocoder to ensure the specific constructor is intialized.
google.maps.importLibrary("geocoding").then(() => {
//Call your function here
}
The solution was to make sure there is a many-to-many relationship between the two.
@Model
class Job: Identifiable {
var id = UUID().uuidString
var name: String
var users: [User] = [] <——- change
init(name: String) {
self.name = name
}
}
Try it like this. It will work
<div style="position: relative; height: 100px; width: 200px; overflow: hidden;">
<img src="x" style="position: absolute; top: 20px; left: 20px; right: 20px; width: calc(100% - 40px);">
</div>
There is a specific service called "Azure NAT Gateway"
All the outbound traffic of the VNet will be redirected to the PIP through the "Azure NAT Gateway".
Read the documentation for the details https://learn.microsoft.com/en-us/azure/nat-gateway/nat-overview
askielboe's answer worked well for me, when I was in a similar situation (2024-11-15), with two modifications:
curl https://github.com/USER/REPOSITORY/pull/1.patch | git am
did not work for me. So I visited https://github.com/USER/REPOSITORY/pull/1.patch and found I was redirected to https://patch-diff.githubusercontent.com/raw/USER/REPOSITORY/pull/1.patch, for whatever reason. curl https://patch-diff.githubusercontent.com/raw/USER/REPOSITORY/pull/1.patch | git am
did work for me. Who knows why, ha ha.As the other answers and comments have said, you can also probably git fetch origin pull/ID/head:BRANCH_NAME
à la https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally, if that's more useful to you somehow.
Thank you for your effort. I have simplified my code and now it has started working. The following solution compiles and builds correctly, but I struggled with it until the last minute. Only after I used
subMenuItems?: NavItemProps["menuItem"][] // instead of subMenuItems?: NavItemProps[]
and wrap into menuItem inside the type definition it start compiling correctly. Do you see any better options on how to write it better or redesign the menuItem data framework?
type NavItemProps = {
menuItem: {
id: number;
title: string;
hideForHamburgerMenu?: boolean;
subMenuItems?: NavItemProps["menuItem"][];
}
}
function NavItem (props: NavItemProps){
const { menuItem } = props;
const { id, title, subMenuItems, hideForHamburgerMenu } = menuItem;
if (hideForHamburgerMenu)
return (<></>)
else
return (
<li key={id}>
<h2>{title}</h2>
{subMenuItems && (
<ul>
{subMenuItems.map((subItem) => (
<NavItem key={subItem.id} menuItem={subItem} />
))}
</ul>
)}
</li>
)
}
export default function MobileAsideMainMenu(){
return(
<>
<nav>
<ul>
{menuItems.map((menuItem) => (
<NavItem key={menuItem.id} menuItem={menuItem} />
))}
</ul>
</nav>
</>
)
}
I’m stuck on the same thing too. After a lot of searching, I found a tutorial by PedroTech on YouTube about creating a CRUD application using React Vite for the frontend and Django for the backend. The integration felt much simpler and easier compared to what "create-react-app" offers. I’m now waiting for his e-commerce tutorial because it will likely cover router concepts on the frontend, similar to the backend, and also deployment.
I was able to find a solution on my own. I compared the Juniper's output in the session_log between netmiko 2.4.1 (which does grab the timestamp on command output after you do 'set cli timestamp') to netmiko 4.4.0 (which was not grabbing the timestamp)
...I found that nemiko 4.4.0 was sending 'set cli complete-on-space off' on initial login. So I made my script do 'set cli complete-on-space' in addition to 'set cli timetamp' , and then netmiko started obtaining the timestamp on command outputs.
I know I'm answering my own question, but hopefully this helps others who might run into this.
Maybe can be useful:
if (open.ShowDialog() == Convert.ToBoolean(DialogResult.OK))
{
...
}
Have you tried this way?
const dir = path.join(process.cwd(), "path_which_you_want");
const content = fs.readFileSync(dir);
Same here On a mobile web browser, the onBlur event does not trigger.
Very good! I loved it, Keep it up!😁
Normally you have only a thin space between a quantity and it's unit so the way to go would be:
3.14\,\text{in}
the \,
sets a 'thin space'.
This is the best way to add new column then migrate a fresh migrate.
php artisan migrate:fresh
Primitive Vs Reference Data Types
Primitive Data : Primitive data types are commonly used data types which includes 7 datatypes in ES6 JavaScript, i.e String, Number, Boolean, Undefined, Null, BigInt and Symbols. Primitive values are stored in Stack for faster access as they are passed by value.
Reference Data Types : Reference data types are advance data types like Functions, Arrays, Objects, Map and Sets. They are stored on heap. Reference data types are passed by reference, not value. This means two variables with same reference object has same reference in memory.
JavaScript Data Types Post: JavaScript Data Types
managed to solve this in the end. For anyone having the same issue, run
find / -name ".condarc" 2>/dev/null
and see how many other .condarc files exist in your machine.
I have two queries
-
Query 1
-
SELECT COUNT(*) AS count FROM `comments` INNER JOIN `replies` ON `comments`.`comment_id` = `replies`.`reply_comm_id` WHERE CONCAT (`comment_message`, `reply_message`) LIKE ('%test%') AND `comments`.`comm_blog_id`=45;
Result
for "query 1"-
Query 2
-
SELECT (SELECT COUNT(*) FROM `comments` WHERE `comment_message` LIKE '%test%' AND `comm_blog_id` = 45) + (SELECT COUNT(*) FROM `replies` WHERE `reply_message` LIKE '%test%' AND `reply_blog_id` = 45) AS total_count;
Result
for "query 2"-
The following are the tables
-
"Comments" table-
"Replies" table-
Both have different results, but I think both "queries" are correct. Can anyone tell me which one I have to use for searching the data/string/tag/word/words (like- "test", or "test comment") from the two "tables"?
Suppose I have a tag
like test
or test comment
and I want to search this same tag
in both the replies
and comments
tables of the comment_message
and reply_message
rows and count
how many times it is coming/used.
Tools to Debug Guest OS in VirtualBox Debugging a Guest OS in VirtualBox can be achieved using several tools and techniques depending on the type of issue you're dealing with. Below are some effective methods:
VirtualBox Debugger VirtualBox includes an integrated debugger that can be enabled using command-line tools. To start the debugger:
Launch VirtualBox from the command line with the --startvm and --dbg flags. Use commands like help or info registers to inspect the VM's state. VirtualBox Log Files VirtualBox creates detailed log files for each virtual machine. You can find these logs in the VM folder under Logs/VBox.log. Analyze these files for errors or warnings.
GDB (GNU Debugger) Integration You can attach GDB to a VirtualBox process to debug more complex issues. Use VirtualBox's remote debugging feature with commands like VBoxManage debugvm.
Serial Ports for Debugging
Enable a virtual serial port in the VM settings and configure it to output to a file or pipe. Use this for kernel debugging or to capture error outputs from the guest OS. Guest OS Tools
Install Guest Additions in your virtual machine. It provides enhanced debugging options and better integration for diagnosing issues. Use built-in OS-specific debugging tools, like dmesg on Linux or Event Viewer on Windows. Third-party Debugging Tools
Tools like Wireshark for network-level debugging. Disk utilities for analyzing virtual disk corruption.
In 2024
MATCH (n:Person) RETURN elementId(n) LIMIT 5
as per https://neo4j.com/docs/cypher-manual/current/functions/scalar/#functions-elementid
The code has two loops:
Outer Loop:
Inner Loop:
So
This continues until i reaches n.
total number of iterations of the inner loop is: 1+2+4+8+⋯+n
This means the inner loop runs 𝑂(𝑛) times in total when you add up all the work across the outer loop.
The runtime of the entire code is 𝑂(𝑛) because the inner loop dominates the total work done.
vercel
is a shorthand for vercel deploy
, and vercel kv create ...
is attempting to run vercel deploy kv create...
. You can check this with vercel kv --help
:
vercel kv --help
Vercel CLI 37.14.0
▲ vercel deploy [project-path] [options]
(...)
Perhaps you want to deploy this example instead?
Is there a link where you saw this command by any chance?
I am following @Craig's comment. I just don't feel it's elegant.
So I basically add this function
Protected Sub updateTypeName()
_TypeName = Me.GetType().Name
End Sub
And then I do
Public Sub New(ByVal ParamArray kwargs As EIP712Type())
MyBase.New("", Nothing) ' Assuming EIP712Type has a constructor like this
updateTypeName()
Dim members As List(Of Tuple(Of String, EIP712Type)) = GetMembers()
values = New Dictionary(Of String, EIP712Type)
So the TypeName is defined as
Public ReadOnly Property TypeName As String
and it's readonly and can only be modified by descendants of EIP712Type and they can only do so by changing the name to the actual name of the class.
If there is a more elegant solution I would like to know.
The issue is VB should already know the type of the class calling new variable. However, unlike in many of other programming language, VB doesn't have a keyword to refer to that class. Me refer to the object. Python usually have self and cls and that has no equivalent in VB.
I maybe missing something.
One possible reason is that the Kafka server reached the maximum heap size limit (-Xmx). Under high load, when the garbage collector runs, it can cause the server to take longer to process requests. In my case, after I increased the maximum memory limit for Kafka, the error was resolved.
I ran into this same issue but I believe I found a simpler solution that doesn't involve deactivating and reactivating constraints.
Instead, call setNeedsLayout()
from the didFinish
navigation delegate method. This triggers another layout pass after the web view has finished loading:
override func viewDidLoad() {
super.viewDidLoad()
mainWebView.navigationDelegate = self
mainWebView.load(URLRequest(url: URL(string: "https://apple.com")!))
}
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
webView.setNeedsLayout()
}
To ensure you're reliably reproducing the issue, you can slow the simulator animation to ensure the web view loads before the view controller finishes animating on screen.
Thank you @Stefan for pointing me in the right direction!
it might be the model you loaded is trained with tensorflow version different from the loading environment. refer https://github.com/tensorflow/tensorflow/issues/66381
All the answers were not working for me, I finally reinstalled the IIS fixed it.
This is a workaround and a retraction of sorts.
So, I have built the lib. now with:
python3 -m pip install My_Lib.py
But, I stopped using hatch as the backend and started to use poetry.
Anyway, hatch was giving me way too many things to look into during my build efforts. So, I switched and now everything builds...
[tool.poetry]
license == "MIT"
name == 'Saber'
version == '0.0.1'
[tool.poetry.dependencies]
dependencies == [
"requirements.txt = *",
python == '3.11.2',
"gar.py",
]
[build-system]
requires = ['poetry-core ^1.0']
build-backend == 'poetry.core.masonry.api'
That is my new pyproject.toml file and it builds but with error still:
sudo
.python3 -m pip install My_Lib.py
works but errors out at permissions...sudo python3 -m pip install My_Lib.py
works but gives the use a virtual environment
instead and still builds...Building libraries is a difficult task to a newcomer like myself.
I am not using the .py file infrastructure to build and call the .toml file any longer because of mass errors. I am using just the .toml file to call the build of this library.
Seth
P.S. If you see where I may be making errors or know of how to build python3 libs, please be my guest and give some type of updates or good resources.
Thanks a lot. I solve the issues.
UNICODE support in Crystal Reports started with version 9. Perhaps you are on an older version.
In this simple example, it would be better to create a single function that accepts a parameter of anytype, and the second parameter would use the builtin function @TypeOf to insure the two parameters are of the same type. I've modified your example below with the changes and updated the unit tests to be more idiomatic for Zig.
const std = @import("std");
fn defaultCompare(lhs: anytype, rhs: @TypeOf(lhs)) i8 {
if (lhs > rhs) {
return 1;
} else if (lhs < rhs) {
return -1;
}
return 0;
}
test "Fn" {
try std.testing.expectEqual(defaultCompare(5, 16), -1);
try std.testing.expectEqual(defaultCompare(6, 1), 1);
try std.testing.expectEqual(defaultCompare(5, 5), 0);
}
Thanks to @narthring the comment. I've learned a lot since the original post.
I've set the overall AFD timeout at 16 seconds, which is the minimum, which at least fails over if an app is spinning up after a restart. Our app takes around 90 seconds to respond properly, so when a recycle happens this will failover at least within 16 seconds.
We're using the HEAD request on a stripped back page to deal with the requests from the health monitor. With the settings as you confirmed above. Thanks for that.
I've managed to hook up devops with some powershell commands to manage blue/green deploys between the two origins, stopping and starting each origin between releases. This has achieve zero downtime with deploys which is a big tick.
I do think there could be a simpler offering, without the full CDN involved, but traffic manager doesn't work for our scenario. A Layer7 load balancer with more control over statuses returned to trigger failover.
Well, thanks to comments of @ekhumoro and @musicamante, I finally got to a working solution, with class and usage example - but boy, was that a doozy:
show_in_file_manager
, however since I use MINGW64 Python3 on Windows 10, os.path.normpath
etc all convert paths to forwards slashes (even if you manually supply a Windows path with backslashes) which breaks show_in_file_manager
- thankfully, there is a workaround here: supply path as_uri()
, and use allow_conversion=False
in show_in_file_manager
So, here is how the example below looks like on my machine:
Here is the code:
# started from https://stackoverflow.com/q/43890097/79194084#79194084
import sys
import os
import platform
from pathlib import Path, PureWindowsPath # python 3.4
from showinfm import show_in_file_manager, valid_file_manager, stock_file_manager # python3 -m pip install show-in-file-manager
from PyQt5.QtCore import * # QFile
from PyQt5.QtGui import *
from PyQt5.QtWidgets import QApplication, QWidget, QVBoxLayout, QTreeView, QListView, QFileDialog, QAction, QMenu, QActionGroup, QPushButton, QLabel, QMainWindow, QDialog, QFileSystemModel
class CustomShowQFileDialog(QFileDialog):
"""
* https://forum.qt.io/topic/158937: "QFileDialog is not really meant to
be overriden. Create your own dialog if you want something special." -
however, there is an example there
* https://www.qtcentre.org/threads/1827-QFileDialog-and-subclassing: "When
you subclass QFileDialog, you are subclassing the Qt QFileDialog, not the
native one. Calling static methods like getOpenFileName() will have no
other effect than showing the native dialog because they are *static*,
they will not operate on your instance.
Therefore, you must use show() or exec() to show your instance of a
filedialog. I recomend exec() - that way, when the dialog has been closed,
functions like selectedFiles(), selectedFilter(), etc. will return the
correct value."
"""
def __init__(self, parent=None, caption="", directory="", filter=""):
super(CustomShowQFileDialog,self).__init__(parent, caption, directory, filter)
#print(f"{valid_file_manager()=} {stock_file_manager()=}") # both are 'explorer.exe' for MINGW64 Python
# disable file multi-selection - ensure only a single item (file/dir)
# selection is possible; see
# https://www.qtcentre.org/threads/18815-Select-multiple-files-from-QFileDialog
self.setFileMode(QFileDialog.ExistingFile)
# must have self.show() first, so .children() are instantiated,
# and .findChild works; but without extern call to parent .show()
# afterwards, this self.show() on its own does not show a dialog window!
#self.show()
# note: QWidget::show() can call QWidget::showFullScreen(), which calls
# ensurePolished() and setVisible(True); it turns out, to have
# .findChild work, it is enough to just run .setVisible(True) - note
# that this also shows the dialog upon instantiation
#self.ensurePolished()
self.setVisible(True)
# fetch the QTreeView/QListView in the QFileDialog
self.myTree = self.findChild(QTreeView, "treeView") # when QFileDialog in Detail View
self.myList = self.findChild(QListView, "listView") # when QFileDialog in List View
# get the actions for the original QFileDialog context menu, so
# we can reconstruct it;
# qt_rename_action and qt_delete_action are setEnabled(False) by default,
# and should be enabled as per file permissions of selection (see
# QFileDialogPrivate::showContextMenu, qtbase/src/widgets/dialogs/qfiledialog.cpp)
# here we just enable them regardless - where app has permissions,
# they will work:
self.rename_act = self.findChild(QAction, "qt_rename_action")
self.rename_act.setEnabled(True)
self.delete_act = self.findChild(QAction, "qt_delete_action")
self.delete_act.setEnabled(True)
self.show_hidden_act = self.findChild(QAction, "qt_show_hidden_action")
self.new_folder_act = self.findChild(QAction, "qt_new_folder_action")
# Define our custom context menu action, and
# connect this action to a slot/handler method
self.show_in_folder_act = QAction( "Show in Folder", self )
self.show_in_folder_act.triggered.connect(self.handle_show_in_folder_act)
# set up context menu policy
self.myTree.setContextMenuPolicy( Qt.CustomContextMenu )
self.myList.setContextMenuPolicy( Qt.CustomContextMenu )
self.myTree.customContextMenuRequested.disconnect() # OK
self.myTree.customContextMenuRequested.connect(self.generate_context_menu)
self.myList.customContextMenuRequested.disconnect() # OK
self.myList.customContextMenuRequested.connect(self.generate_context_menu)
def generate_context_menu(self, location): # https://stackoverflow.com/q/44666427
print("generate_context_menu {}".format(self.sender().objectName())) # "treeView" or "listView"
#
# as in QFileDialogPrivate::showContextMenu;
# note QFileDialogPrivate::model is QFileSystemModel*,
# not accessible in Python - but FilePermissions are
index = self.myList.currentIndex()
index = index.sibling(index.row(), 0)
#ro = (self.model) and (self.model.isReadOnly()) # cannot
perms = index.parent().data(QFileSystemModel.FilePermissions) # no .toInt(), is int already
print(f" {perms=}")
# renameAction->setEnabled(!ro && p & QFile::WriteUser);
# deleteAction->setEnabled(!ro && p & QFile::WriteUser);
self.rename_act.setEnabled(perms & QFile.WriteUser)
self.delete_act.setEnabled(perms & QFile.WriteUser)
#
menu = QMenu()
menu.addAction(self.rename_act)
menu.addAction(self.delete_act)
menu.addSeparator()
menu.addAction(self.show_hidden_act)
menu.addAction(self.new_folder_act)
menu.addSeparator()
menu.addAction(self.show_in_folder_act)
#menu.exec_(event.globalPos()) # https://stackoverflow.com/q/65371143 -> not applicable here
menu.exec_(self.mapToGlobal(location)) # https://stackoverflow.com/q/43820152 -> works
def handle_show_in_folder_act(self):
# as in QFileDialogPrivate::renameCurrent();
# self.myList.currentIndex() works for both Detail View and List View;
# .column() can be > 0 only for Detail view (when right-clicked over
# e.g. file size column)
#print(f"{self.myList.currentIndex().row()=} {self.myList.currentIndex().column()=} ")
index = self.myList.currentIndex()
index = index.sibling(index.row(), 0)
# as in QFileDialogPrivate::deleteCurrent();
# note QFileDialogPrivate::mapToSource is private, and not in Python
#index = self.mapToSource(index.sibling(index.row(), 0))
#print(f"{index.isValid()=} {index=}")
fileName = index.data(QFileSystemModel.FileNameRole) # no .toString(), is str already
filePath = index.data(QFileSystemModel.FilePathRole) # no .toString(), is str already
perms = index.parent().data(QFileSystemModel.FilePermissions) # no .toInt(), is int already
print(f"{fileName=} {filePath=} {perms=}")
# NOTE: in MINGW64 Python3, filePath='C:/test/test.txt' with forward
# slashes - this ends up as folder='/test' in launch_file_explorer of
# showinfm, causing `folder_pidl = shell.SHILCreateFromPath(folder, 0)[0]`
# to end up being None, causing "TypeError: None is not a valid
# ITEMIDLIST in this context" in the desktop.BindToObject call;
# so probably we need to ensure proper Windows line separators before
# calling show_in_file_manager
if "win" in platform.system().lower(): # https://stackoverflow.com/q/1387222
# python pathlib fails to convert these forward slashes to backslashes
# fpath = Path(filePath) # WindowsPath('C:/test/test.txt')
# pwPath = PureWindowsPath(fpath) # PureWindowsPath('C:/test/test.txt'); same with filePath as argument
# apparently, os.path.normpath can do forward slash to backslash? not for me
#filePath = os.path.normpath(filePath)
# well then, have to go manual; unfortunately show_in_file_manager
# calls normpath itself, so we're back at forward slashes, and not
# even allow_conversion=False helps:
#filePath = filePath.replace(r"/", "\\")
# what worked finally for MINGW64 python3 is to:
# pass filePath as URI, and use allow_conversion=False
filePath = Path(filePath).as_uri()
print(f"{filePath=}")
show_in_file_manager(filePath, allow_conversion=False) # verbose=True, debug=True,
#class MainWidget(QWidget):
class MainWindow(QMainWindow):
def __init__(self, parent=None):
#super(MainWidget,self).__init__(parent)
super(MainWindow,self).__init__(parent)
central_widget = QWidget(self) # for MainWindow(QMainWindow)
self.setCentralWidget(central_widget) # for MainWindow(QMainWindow)
#creation of main layout
mainLayout = QVBoxLayout()
self.button = QPushButton("Click for file dialog")
self.button.clicked.connect(self.on_button_click)
mainLayout.addWidget( self.button )
self.label = QLabel("[path]")
mainLayout.addWidget( self.label )
# creation of a widget inside
#self.monWidget = CustomShowQFileDialog()
#mainLayout.addWidget( self.monWidget )
#self.setLayout( mainLayout ) # for MainWidget(QWidget)
central_widget.setLayout( mainLayout ) # for MainWindow(QMainWindow)
def on_button_click(self):
print("on_button_click")
"""
Note: the "tradidional" use with the static .getOpenFileName(...) is
like this:
options = QFileDialog.Options() # https://stackoverflow.com/q/63012420
options |= QFileDialog.DontUseNativeDialog
load_file_path, _ = QFileDialog.getOpenFileName(self, "Open .txt File", filter="Text Files(*.txt)", options=options)
if load_file_path: # user has made a choice
print(f"{load_file_path=}")
However, as per https://www.qtcentre.org/threads/1827-QFileDialog-and-subclassing,
we cannot use that idiom for a custom subclass; instead we must block
with .exec(), which will return an int depending on OK/Cancel button
pressed:
0: Cancel (QDialog::Rejected),
1: Open/file double-click) (QDialog::Accepted)
... and afterwards use .selectedFiles()
"""
# instantiation alone raises dialog for now;
self.myqfd = CustomShowQFileDialog(self, "Open .txt File", filter="Text Files(*.txt)")
retint = self.myqfd.exec_() # exec blocks; however here returns int
print(f"{retint=}")
if retint == QDialog.Accepted:
print(f"{self.myqfd.selectedFiles()}")
firstfile = self.myqfd.selectedFiles()[0]
self.label.setText(firstfile)
app = QApplication(sys.argv)
#window = MainWidget()
window=MainWindow()
window.show()
window.resize(180, 160)
sys.exit(app.exec_())
It was indeed my sticky element that was causing a problem - making my link unclikable. What I did is that I added a zIndex of 0 for all my ParallaxLayers that had a background-element, a zIndex of 10 for the ParallaxLayer where my link is and a zIndex of 0 for the one with the sticky element. Hope that helps :)
You probably have a proxy or ad blocker set up.
package.json
, you need to run npm run predeploy
before npm run deploy
.dist
, not build
. Modify package.json
:
- "deploy": "gh-pages -d build",
+ "deploy": "gh-pages -d dist",
Is the implementation of EventEmitter
under your control? or it is just a mock implementation of external service? If they're under your control I think you can make the emitNextFailureHandler
returns true
when encountering FAIL_OVERFLOW
or FAIL_TERMINATED
so that the EventEmitter
can retry emit.
Simple example:
Sinks.EmitFailureHandler emitNextFailureHandler = (signalType, emitResult) -> {
return Sinks.EmitResult.FAIL_OVERFLOW.equals(emitResult) || Sinks.EmitResult.FAIL_NON_SERIALIZED.equals(emitResult);
};
Also, I'd like to discuss this in another aspect.
I think the repository::remove
is a synchronized method that blocks your thread so that's why the queue is under pressure so hard. This might not be a best practice for reactive programming. A better way to do this might be to make the repository.remove()
return a Mono
or Flux
(in practice you may need to change the dependencies to Reactive
related dependencies), then use .flatMap(repository::remove)
instead of .doOnNext()
Try to install .net 8.0 in your old machine, it might work.
This answer from another question seemed like the best one to me. https://stackoverflow.com/a/70090792/675784
Run git config --global core.protectNTFS false
Then clone
Or if it's already cloned but not checked out, you may set this setting local to this repository only
Run git config core.protectNTFS false Then Run git checkout <branch_name>
Change the file extension from .yml to .yaml
This worked for me hopefully it works for you, When you get this error "The system cannot find the path specified." I know a way to fix this, put the this command "C:" if you want to change your directory example cd C:\Program Files
$fillabel spelling mistake of Model Path. Right Speeling $fillable. Resolve now.
protected $fillable = ['nama_vendor','no_hp','email','alamat'];
Multi-line triple strings
do
Share.share('''
Title: $Title
Email: $value
''');
String class https://api.flutter.dev/flutter/dart-core/String-class.html
the dependency
implementation 'com.hzy:libp7zip:1.7.0'
is now
implementation 'com.github.hzy3774:AndroidUn7zip:1.6.0'
Refer to the author's library:
<v-container class="fill-height">
<v-card class="fill-height d-flex flex-column">
<v-data-table
:items="alarms"
:headers="headers"
class="flex-grow-1"
dense
>
</v-data-table>
</v-card>
</v-container>
Use miniconda, Miniconda allowing you to customize your Python environments with the exact packages you need.
Install Miniconda on Windows https://docs.conda.io/en/latest/miniconda.html
This is a one time process, once you are done with the installation process.
Try this command
conda create -n python=2.7 numpy pandas
conda activate
I opened the generated code in the file I’m working on using the generate button or cmd+I on macOS. Then, I asked for a random query and clicked “View in the chat". It opened a temporary window, which I dragged to my extensions bar. Now it works.
I know this is old but I just finished a project like this. Please be aware that there are at least two types of Vimeo playlist init segments file types(extensions): .m4s and .mp4 . In your case above you also need to download the index_segment and concatenate that as well. If you dont have {pathsig}.mp4&r={hex}&range={#-#} you will probably have segment.m4s?pathsig={hex}&r={hex}&sid={#}&st={video|audio}. The concat process above if the same for both file types.
The most likely causes for the Settings app opening on launch are:
Permissions being requested too early (especially camera, location, Bluetooth, etc.). Background modes being enabled that trigger certain settings requests. Using Firebase or similar services that might inadvertently ask for permissions on launch. Review these areas and try to isolate what’s triggering the Settings screen to prevent the issue from happening during Apple’s review process.
If you're using Git command line or any command line to update your repo on mac or linux machine, you can run the following commands to create the directory:
I think this is a duplicate but just to add a bit more context, you are indeed sending the incorrect digest algorithm var digest = await SHA512.HashDataAsync(stream);
for Signing ES512. RS512 is the appropriate sign algorithm for the SHA512 hashed digest.
I looked into it, and it turns out that I can commit my .whl file to the repository, and then add it to the requirements.txt file. After this I click the Build button
and the .whl file will automatically be installed and used in the pyside project from now on. The .whl file doesn't appear in the file browser for QtCreator, but if I use the terminal, I can add it to the repo. I can't install it using pip in the terminal, because the terminal can't access the venv, that is why I have to use the build button.
std::set::equal_range can return more than 1 element(s)!
For example:
#include <iostream>
#include <set>
using namespace std;
struct TRange
{
int s;
int e;
TRange(int start, int end) { s=start; e=end; }
bool operator<(const TRange &rhs) const { return e<=rhs.s; } // no overlap, == means overlap
};
int main()
{
set<TRange> set1;
TRange e0(10,15), e1(20,25), e2(30,35);
set1.insert(e0);
set1.insert(e1);
set1.insert(e2);
TRange x(12,32);
auto r=set1.equal_range(x);
int k=0;
for (auto it=r.first; it!=r.second; ++it) {
++k;
}
cout<<"Found "<<k<<" result(s) by set's equal_range."<<endl; // 3
getchar();
auto pr=set1.insert(x);
if (pr.second) {
cout<<"insert OK! set1.size()="<<set1.size()<<"."<<endl;
} else {
cout<<"insert Fail! set1.size()="<<set1.size()<<"."<<endl;
}
getchar();
}
I'm also new to Quarkus and have the same curiosity as well. I don't know if the document was updated recently but now there are 2 paragraphs explaining this:
And thanks to our field access rewrite, when your users read person.name they will actually call your getName() accessor, and similarly for field writes and the setter. This allows for proper encapsulation at runtime as all fields calls will be replaced by the corresponding getter/setter calls.
Use public fields. Get rid of dumb getter and setters. Hibernate ORM w/o Panache also doesn’t require you to use getters and setters, but Panache will additionally generate all getters and setters that are missing, and rewrite every access to these fields to use the accessor methods. This way you can still write useful accessors when you need them, which will be used even though your entity users still use field accesses. This implies that from the Hibernate perspective you’re using accessors via getters and setters even while it looks like field accessors.
(You can search for the keyword "rewrite" in that document.)
So I think Quarkus has some kind of engine to rewrite the code at some point (my guess at compile time so that the native image can build the code AOT). And the final result is still using getters and setters like before.
But one thing still bothers me though, does this "rewrite" change all the public
fields to private
? I guess it can't and it won't need to. Because if we write this:
person.name = "Bruce Wayne"
then it would be rewritten to
person.setName("Bruce Wayne")
So public or private, there is no differences anyway, you still use setter and getter at the end.
//Get the SDK version
let version = GADMobileAds.sharedInstance().versionNumber
// Convert version number to string and log the output
let versionString = "Google Mobile Ads SDK Version: (version.majorVersion).(version.minorVersion).(version.patchVersion)" print(versionString)
Do it like that, Its working.
.parent {
position: relative;
background-color:#ddd;
width:200px;
height:100px;
}
#image {
position: absolute;
top:20px;
left:20px;
right: 20px;
}
<div class="parent" >
<img id="image" src="x">
</div>
if installed and started nginx with macport
let versionString = "Google Mobile Ads SDK Version: (version.majorVersion).(version.minorVersion).(version.patchVersion)" print(versionString)
You're definitely not using the GPU; the code doesn't run automatically on the GPU. You need to specify which functions you want to run on the GPU by using the @jit decorator from the Numba library. With the GPU, the code you provided shouldn't take more than 5 minutes to execute (I'm exaggerating). You'll know you're using the GPU because the task manager will show 100% usage.
Retrieving too many row data places a burden on the server.
It may be helpful to control the amount of data fetched at one time in the following way:
a = []
for i in range(Model.objects.filter().count())[::1000]:
a += list(Model.objects.filter()[i:i+1000])
history.replaceState(): This replaces the current history entry with new state data and URL. The user cannot navigate back to the replaced entry, effectively removing it from the user's experience.
I have a very similar situation re necessary client work. Would you be willing to share with me if a legal method was obtained?
Kind regards, James
When you store a date/time in Django, it is always converted to utc+0 time.
This appears to be intentional and may result in conversion from Django's time zone to the utc time set in the settings.
from django.utils import timezone
timezone.now() # utc +0 time
timezone.localtime(timezone.now()) # utc +{timzeon in settings} time
I'm using Replit and it can't find windows.h.... any ideas?
Fields in foreign keys or many-to-many models can be filtered without annotating them.
# MyModel.objects.filter(m2m_or_foreignkey__field=123)
MyModel.objects.filter(foreign_key__value=123)
Complementing the answer, the webview configured as autofill in Blazor can be easily disabled if the MainPage that dictates the blazor route is defined as:
public partial class MainPage : ContentPage
{
public MainPage()
{
Loaded += MainPage_Loaded;
InitializeComponent();
}
private async void MainPage_Loaded(object? sender, EventArgs e)
{
#if WINDOWS
await (blazorWebView.Handler.PlatformView as Microsoft.UI.Xaml.Controls.WebView2).EnsureCoreWebView2Async();
(blazorWebView.Handler.PlatformView as Microsoft.UI.Xaml.Controls.WebView2).CoreWebView2.Settings.IsGeneralAutofillEnabled = false;
#endif
}
}
The CoreWebView2 component starts asynchronously, so it is necessary to use await and the EnsureCoreWebView2Async() method before manipulating its properties.
Other references: Why my coreWebView2 which is object of webView2 is null?
As you correctly identified, this error occurs because the digest algorithm does not match the signature algorithm.
var digest = await SHA512.HashDataAsync(stream); var signRequest = new SignRequest(SignatureAlgorithm.ES512, digest);
I believe Status: 200 (OK) means that the request was successfully received, and processed by the server.
One possibility is the IMAGE_FILE_LARGE_ADDRESS_AWARE flag is cleared.
Sometimes network latency does play a factor, where your build machines are vs the endpoint you are reaching out to send your signing requests.
Cannot show requested dialog.
ADDITIONAL INFORMATION:
Cannot show requested dialog. (SqlMgmt)
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Database 'HopeNewBank' is already open and can only have one user at a time. (Microsoft SQL Server, Error: 924)
For help, click: https://docs.microsoft.com/sql/relational-databases/errors-events/mssqlserver-924-database-engine-error
BUTTONS:
Add to .env (laravel)
SANCTUM_STATEFUL_DOMAINS=http://localhost:3000/
Old thread but I found the ShortCircutOperator() really useful for this
RUNAS ERROR: Unable to run - cmd.exe 1326: Username or Password is incorrect
I encounter with this error after hitting cmd command after I create and give administrive to mentioned user. I tried every possible password. just numbers, just letters, combined them. what needs to do in this situation? Is anyone can help me?
In short, your code is full of Undefined Behavior.
Check [SO]: C function called from Python via ctypes returns incorrect value (@CristiFati's answer) for a common pitfall when working with CTypes (calling functions). That's the cause.
Your error (126) is also triggered by that. Check the @TODO line in my code (below).
I'm posting a corrected variant.
code00.py:
#!/usr/bin/env python
import ctypes as cts
import msvcrt
import sys
from ctypes import wintypes as wts
import win32api as wapi
import win32con as wcon
WH_MOUSE = 7
WH_MOUSE_LL = 14
LRESULT = cts.c_size_t
HOOKProc = cts.WINFUNCTYPE(LRESULT, cts.c_int, wts.WPARAM, wts.LPARAM)
LowLevelMouseProc = HOOKProc
MouseProc = HOOKProc
kernel32 = cts.windll.kernel32
user32 = cts.windll.user32
SetWindowsHookExA = user32.SetWindowsHookExA
SetWindowsHookExA.argtypes = (cts.c_int, HOOKProc, wts.HINSTANCE, wts.DWORD)
SetWindowsHookExA.restype = wts.HHOOK
CallNextHookEx = user32.CallNextHookEx
CallNextHookEx.argtypes = (wts.HHOOK, cts.c_int, wts.WPARAM, wts.LPARAM)
CallNextHookEx.restype = LRESULT
UnhookWindowsHookEx = user32.UnhookWindowsHookEx
UnhookWindowsHookEx.argtypes = (wts.HHOOK,)
UnhookWindowsHookEx = wts.BOOL
GetLastError = kernel32.GetLastError
GetLastError.argtypes = ()
GetLastError.restype = wts.DWORD
GetModuleHandleW = kernel32.GetModuleHandleW
GetModuleHandleW.argtypes = (wts.LPCWSTR,)
GetModuleHandleW.restype = wts.HMODULE # @TODO - cfati: Decomment to run into your error
GetCurrentThreadId = kernel32.GetCurrentThreadId
GetCurrentThreadId.argtypes = ()
GetCurrentThreadId.restype = wts.DWORD
def handle_mouse_event(code, w_param, l_param):
#print("kkt")
if code < 0:
return CallNextHookEx(code, w_param, l_param)
else:
if w_param == wcon.WM_LBUTTONDOWN:
print("LB down")
elif w_param == wcon.WM_LBUTTONUP:
print("LB up")
return CallNextHookEx(code, w_param, l_param)
low_level_mouse_proc = LowLevelMouseProc(handle_mouse_event)
def main(*argv):
k = b"\x00"
while k != b"\x1B":
print("Press a key (ESC to continue) ...")
k = msvcrt.getch()
print("Add hook:")
hinstance = GetModuleHandleW(None)
tid = 0 #GetCurrentThreadId()
print(hinstance, tid)
hook = SetWindowsHookExA(
WH_MOUSE_LL,
low_level_mouse_proc,
hinstance,
tid,
)
print(f"Hook function: {hook}")
if not hook:
print(f"Hook creation failed: {GetLastError()}")
return -1
k = b"\x00"
while k != b"\x1B":
print("Press a key (ESC to continue) ...")
k = msvcrt.getch()
UnhookWindowsHookEx(hook)
if __name__ == "__main__":
print(
"Python {:s} {:03d}bit on {:s}\n".format(
" ".join(elem.strip() for elem in sys.version.split("\n")),
64 if sys.maxsize > 0x100000000 else 32,
sys.platform,
)
)
rc = main(*sys.argv[1:])
print("\nDone.\n")
sys.exit(rc)
Not posting the output, as there's nothing relevant. Note that after setting the hook:
Mouse has a huge lag (system is almost unusable)
I don't see any text printed from the callback
Might be related:
The faster way to solved is to add shared memory to the containers
-v /dev/shm:/dev/shm
I quote
the last releases of Fast-DDS come with SharedMemory transport by default. Using --net=host implies both DDS participants believe they are in the same machine and they try to communicate using SharedMemory instead of UDP
See here for more in full explanation: https://answers.ros.org/question/370595/ros2-foxy-nodes-cant-communicate-through-docker-container-border/
De casualidad se halló solución a esto? Estoy realizando un proyecto escolar donde necesito guardar las fotos en una carpeta dentro de mi proyecto y enviar la ruta a la BD pero no encuentro como hacerlo. Agradecería se me dicen se se halló la solución y cuál fue.
I decided to pull the data instead of sending it.
According to the LinkedIn Docs, you need the r_organization_followers
permission, and not rw_organization_admin
.
Additionally, ensure the user is an administrator for the organization:
Restricted to organizations in which they are authenticated.
ADMINISTRATOR
DIRECT_SPONSORED_CONTENT_POSTER