Similar problem. Exporting from 2022 to Excel. On the wizard I tell it to export to X:\MyFolder\MyFile.XLS but when I select the datasource qryExportThis it gives a destination of 'qryExportThis'. I have to overwrite the destination with the path and name of the Excel file. On the Edit Settings popup screen it comes up with the Create Destination table option only. It is still assuming that I am exporting to a table. It has forgotten about Excel. Roughly translated: it is broken. I cannot (so far) run the DTSX file I have created. I have to do the export manually each time.
see this link: https://livewire.laravel.com/docs/navigate#dont-rely-on-domcontentloaded
you should use livewire:navigated
instead of DOMContentLoaded
the DOMContentLoaded
only triggered once after page hard refresh. but when you navigate between pages using wire:navigate
, the DOMContentLoaded
is not triggering anymore, instead you can use livewire:navigated
event. it's triggered in both page hard refresh (like DOMContentLoaded
) and after navigating between pages
I got this message when apperently I already had a folder named "venv" in my directory, after removing it it soleved the problem. But also just creating one manualy worked:
rm -rd venv
python3.11 -m virtualenv venv
I am also having same issues. I do not think ChatGoogleGenerativeAI works with tool calling. I think it is hallucinating, hence no content even though it calls the tools
Very dumb mistake in my part
use Livewire\Component;
- use livewire\Attributes\On;
+ use Livewire\Attributes\On;
no errors were being thrown, so I have to figure that out.
you can use the following to copy a map Map map1 = {}; map1.addAll(map2);
You are missing the name
attribute in the <input>
element.
You should add the following line :
<input type="file" id="file" name="file">
In my case, after trying many of the above solutions, I found an import that ended in .R
import android.os.Build.VERSION_CODES.R
Deleting it solved the problem. Somewhat similar to SmokeyTBear's answer above.
In my case: Upgrading room with the latest version "2.6.1" works.
configuration:
def room_version = "2.6.1"
implementation "androidx.room:room-runtime:$room_version"
implementation "androidx.room:room-ktx:$room_version"
kapt "androidx.room:room-compiler:$room_version"
Simple solution: Browse your unsecure site from a Private Window. it will work in any browser.
To truncate one string to a shorter one I had to use:
let truncated_string = original_string.chars().take(16).collect:<String>();
In my case, I had a Capacity Reservation in place (presumably I'd unwittingly clicked on the wrong box when launching it) .... once I changed it to 'None' I was able to change the instance type to anything (and not being locked to t2.micro).
When this question was posted MAMP did not support MySQL 8.
There is support for MySQL 8 now and with Mamp PRO I was able to get things configured properly directly in MAMP.
First MAMP Pro Settings > Server > MySQL tab. I selected the following settings:
Then to open my local DB I go to the MAMP Pro Databases tab, highlight a database, and then click "Open In" and choose my desired DB program.
add data-navigate-once to all your javascript on the page
<script data-navigate-once src="{{ url('/') }}/assets/js/app.js"></script>
For B::foo to override A::foo, it must have the exact same method signature as defined in the Java Language Specification. This means the parameter type must be Building, not Skyscraper. If B::foo uses Skyscraper as the parameter type, it's actually creating a new overloaded method rather than overriding A::foo. When the code calls building.foo(skyscraper), the compile-time type of 'building' is Building, so it looks for foo(Building), and since B::foo(Skyscraper) is a different method signature, it doesn't override A::foo(Building). Therefore, A::foo gets called.
This is different from what you might expect because method overriding requires exact signature matching, while method overloading (which is what happens if you use Skyscraper in B::foo) is resolved at compile-time based on the static types. The runtime type of the object doesn't matter for overloaded methods - only for overridden methods. That's why none of the given options are correct - using any type other than Building in B::foo would result in method overloading rather than overriding, and A::foo would still be called.
AWS ECS, by default, uses the default bridge network when selecting "bridge" for the network settings on an ECS Task Definition. Per Docker Docs, "User-defined bridges provide automatic DNS resolution between containers. Containers on the default bridge network can only access each other by IP addresses, unless you use the --link option, which is considered legacy. On a user-defined bridge network, containers can resolve each other by name or alias."
When defining a network in a dockercompose.yml, specifying "bridge" specifies a user-defined bridge network, which is why DNS Resolution resolved between my local containers.
Unfortunately and from the information I was able to gather, AWS does not currently support for the user-defined bridge networking option. Switching to awsvpc is likely to best move at the moment.
Endpoint URL Format for Cloud Function should be in proper format and also @ somethingsomething already mentioned authentication might be turned on for the function, in which case you'll need to configure that for the push subscription as well (and confirm that the pubsub agent SA has rights to trigger the function) .
I've fixed with :
pip uninstall opencv-python opencv-python-headless
then
pip install opencv-python
did u fix it? i have the same issue
As in the comments, the issue was on cookie management. Moreover, I discovered the problem was on the default user agent in another case. Specifying it would fix the issue.
I solve problem with delete finalizator in manifest in k8s claster directly.
kubectl edit application grafana -n cd
I have created a simple C++ wrapper around these environment variable functions for POSIX aiming for a thread-safety in the first place: safe-env.
Alternatively, try Python 3.12.1
and tensorflow 2.18.0
I know this is an old question but I landed here for the same reason. This is working for me. Note that I only wanted to capture the last line of ffmpeg output to a textbox. I'm using this to convert .ts files to .mp4. It's very quick because it copies to a new file while encoding. Very fast. Takes only a couple of minutes for a 6GB file...
Here's an example in action: https://www.youtube.com/watch?v=45iBOx8eFcs
Cheers everyone
Using process As New Process()
argConvert = "-i " &
"""D:\" & VODFileName & ".ts""" &
" -c:v copy -c:a copy " &
"""D:\" & VODFileName & ".mp4"""
process.StartInfo.FileName = "ffmpeg.exe"
process.StartInfo.Arguments = argConvert
process.StartInfo.UseShellExecute = False
process.StartInfo.RedirectStandardError = True
process.StartInfo.CreateNoWindow = True
process.Start()
Dim reader As StreamReader = process.StandardError
Dim output As String = ""
While Not process.StandardError.EndOfStream
output = process.StandardError.ReadLine()
Label1.Text = output
Application.DoEvents()
End While
Label1.Text = "Done"
Label1.Refresh()
End Using
I missed the docs on Wix's website. This is very simply done using the following code:
<BootstrapperApplication>
<bal:WixInternalUIBootstrapperApplication LogoFile="..\Resources\LogoFile.bmp" />
</BootstrapperApplication>
My issue was that I was using Image.asset instead of Image.file to retrieve user uploaded images. It turns out you have to use the latter for dynamically uploaded images. https://api.flutter.dev/flutter/widgets/Image-class.html
The data_vars attribute of a dataset is a dictionry mapping data variable names to data variables.
for var_name, var in dset.data_vars.items():
print(type(var_name)) # type: str
print(type(var)) # type:xarray.DataArray
I face the same issue and what I do is that I added android:windowSoftInputMode="adjust resize
in the activity section of the AndroidManifest.xml
Use can use record oriented processors like to update the record try update records.to merge the records use merge record try to configure the bin age correlation attributes etc to handle .Then partition record,split record,convert records, validate records are record oriented processors
i use this code working fine:
from moviepy import VideoFileClip
Sync files with gradle doesnt appear even as an option under the file menu. I am using ladybug, with flutter and the latest gradle. The is no way to sync files with gradle. And because you cannot do this, it causes alot of of issues when you are trying to build the apk.
Now if you go to settings, tools, build tools deployment. You can no longer choose a jdk for the gradle either!.
If you go to settings, appearance, toolbar and menus. You can finally see a button option for Sync files with gradle. You can choose where the buttion should appear. Apply changes. And guess what... THE BUTTON DOES NOT APPEAR.
Replace your mm
with minimum_should_match
then recheck it if it works.
I hope it helps!
pkg=your.android.pkg' perm='WRITE_SECURE_SETTINGS' abd shell dumpsys package "$pkg"
The solution seems quite simple: subdomain_matching has to be enabled.
app = Flask(__name__, subdomain_matching=True)
The problem IMO is that in this moment Flask documentation is not so clear about this.
In particular the documentation quotes:
SERVER_NAME "Must be set if subdomain_matching is enabled, to be able to extract the subdomain from the request."
but I couldn't find where it explicitly says that since 3.1.0 setting SERVER_NAME alone doesn't activate sudomain_matching anymore.
I think you code is correct but its needs to get some optimized. Try it
I understand the importance of finding a reliable solution tailored to your needs. With my expertise and dedication, I am confident in providing you with the best possible answer. Just share your email address with me, and I will promptly send you a detailed and professional response in PDF format. Rest assured, I value your time and trust, and I am committed to delivering quality work that meets your expectations.
Query using DbContextOne var apps = contextOne.App.ToList(); // Load all apps
or Query using DbContextTwo or Merge Results in Memory
This error will also occur if you forget your main function
Asleep
#include "xml.h"
XML::Document doc;
doc.load("images/punisher-2.svg");
Awake
#include "xml.h"
XML::Document doc;
int main()
{
doc.load("images/punisher-2.svg");
}
To compare clusters from different years using K-Modes, you can:
I am working on simillar project with you and having exactly the same problem. I found a recently updated notification on spotify. https://developer.spotify.com/blog/2024-11-27-changes-to-the-web-api
Construct a sqlite-specific variant Insert construct. The sqlalchemy.dialects.sqlite.insert() function creates a sqlalchemy.dialects.sqlite.Insert. The Insert construct includes additional methods Insert.on_conflict_do_update(), Insert.on_conflict_do_nothing().
from sqlalchemy.dialects.sqlite import insert
session.execute(insert(Date).values(
[{"date": date_} for date_ in new_dates]).on_conflict_do_nothing())
Try adding a /
before the path to the image. So, /img/giyim/soft-set2.webp
in the db.json
file.
Also, it will be easier & as a general project structure rule, you should store all your assets like fonts and images in 1 folder named assets
.
Snapshots and time travel are not ideal for CCPA/GDPR use cases. copy-on-write would be ideal if it were performant. I am embarking on a similar iceberg journey with CCPA/GDPR and trying to get ahead of the curve on potential bottlenecks. My next step is to evaluate insert overwrite (partition) for my use cases. It will also help me in the long run from an optimization perspective.
I'm a bit late with my reply, but with react-big-calendar v1.15.0 I could get it to work by adding
import 'react-big-calendar/lib/addons/dragAndDrop/styles.css';
See https://github.com/jquense/react-big-calendar/issues/1999
To extract tables (including their structure) from PDF documents effectively, especially when dealing with non-English fonts, I recommend using VeryPDF Online Table Extractor. This tool is designed specifically for table extraction from PDFs and offers several advantages:
You can try it with your PDF to achieve precise results without relying on coordinate-based extraction or complex transformations. This solution will also work reliably for future PDFs with varying layouts.
@tyg : Thank you for your answer. Below code worked for me.
@Database(
entities = [UserEntity::class, ShopDetailsEntity::class],
version = AppConstants.DB_VERSION,
exportSchema = false
)
Was able to solve the issue. Actually was just an indentation issue on my application.yml.
The starttls should be inside the smpt like this:
mail:
smtp:
trust: "*"
auth: true
starttls:
enabled: true
required: true
connectiontimeout: 5000
timeout: 3000
writetimeout: 5000
from itertools import chain
regular_list = ["foo", ["banana", "apple"], "banana", ["peaches", "grapes"]]
flat_list = list(chain.from_iterable((item if isinstance(item, list) else [item]) for item in regular_list))
print(flat_list)
Just an update here, I found the issue in my node_modules. I had to remove my modules and run npm install
, which solved it.
Debug -> Layout Settings -> check variable and console see image below: enter image description here
tensorrt-llm has an unconditional requirement on pywin32 - see https://inspector.pypi.io/project/tensorrt-llm/0.14.0/packages/1f/93/384befbf1b7a1d7e09eef4829e0dfb2dcf07a1b7f21cdfa368dc01605be0/tensorrt_llm-0.14.0.tar.gz/PKG-INFO#line.28
you should report a bug to that project
i get the same errors using solana-program 2.1.0 to .4 and stable solana version fetches v1.42 platform-tools wich doesn't exist ihe download is 404... have to change version so they all fit 2.1.2 is ok fetches v1.43 but gives a build error for
warning: [email protected]: include/ring-core/target.h:64:2: error: "Unknown target CPU"
warning: [email protected]: 64 | #error "Unknown target CPU"
warning: [email protected]: | ^
warning: [email protected]: In file included from crypto/mem.c:58:
warning: [email protected]: In file included from crypto/internal.h:115:
warning: [email protected]: include/ring-core/check.h:27:11: and build fails
mine asks for solana-pubkey feature that is a dependency therfore cannot be used as a feature!!!
myenvjustinlanouette@iMac-de-Justin sns-integration % cargo update
Updating crates.io index
error: failed to select a version for `solana-pubkey`.
... required by package `solana-program v2.1.4`
... which satisfies dependency `solana-program = "^2.1.4"` of package `sns-integration v0.1.0 (/Users/justinlanouette/Metaverse-Developement/anarcrypt.sol/programs/sns-integration)`
versions that meet the requirements `=2.1.4` are: 2.1.4
the package `solana-program` depends on `solana-pubkey`, with features: `solana-sha256-hasher` but `solana-pubkey` does not have these features.
It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.
failed to select a version for solana-pubkey
which could resolve this conflict
myenvj
I found the following piece of code to produce the same array as r in your example.
np.take(entry,indices,axis=0)
It seems that stacking is not necessary with the take function.
Might not even need this information but just wanted to say you're an excellent person for coming back and posting your solution!
The most viable alternative is using the Data Contract. It is also easy to use, a totally transparent and type-agnostic technology with good performance (due to assemblies generated on the fly using System.Reflection.Emit
under the hood. Everything is explained in the documentation.
There's apparently yet another option in Text Editor/General
: "Automatically surround selections when typing quotes or brackets." It works for the C# editor, tested in Visual Studio 2022 17.13 Preview 1.
Can't you just put the headers in a different frame, above the canvas that scrolls? That should keep the table headers in place while you scroll through the contents of the table.
I found the solution. Go to Project > Properties > General then change target platform to Latest.
This should be a quick fix npm install --save-dev @babel/plugin-proposal-private-property-in-object
I have been searching for an answer for a long time. And now, after posting the question I found it.
When returning the error messages as I am doing:
return new ValidationResult(errorMessage);
The error message isn't bound to the field. To bind the error messages to the field the return should instead be:
return new ValidationResult(errorMessage, [validationContext.DisplayName]);
Sequoia 15.1.1, Xcode 16.1. I had Apple Intelligence toggled off in System Settings. After turning it on the Predictive Code Completion Model installed without this error.
Replacing imeOptions
setting EditorInfo.IME_ACTION_DONE
with EditorInfo.IME_ACTION_NONE
fixes the issue.
tu solución me ayudo mucho, dejo el código equivalente en java:
import java.util.ArrayList;
import java.util.List;
public class BoatMovements {
/**
* @return boolean The destination is reachable or not
*/
public static boolean canTravelTo(boolean[][] gameMatrix, int fromRow, int fromColumn,
int toRow, int toColumn) {
// Out of bounds
if (toRow > gameMatrix.length - 1
|| fromRow > gameMatrix.length - 1
|| toColumn > gameMatrix[0].length - 1
|| fromColumn > gameMatrix[0].length - 1) {
return false;
}
// Moving illegally
if (
// ... within the same column, up or down
(fromRow != toRow && Math.abs(toRow - fromRow) > 1)
// ... within the same row, left or once/twice (at most) right
|| (fromColumn != toColumn && ((fromColumn - toColumn) > 1 || (toColumn - fromColumn) > 2
))
) {
return false;
}
if (fromRow == toRow) { // Moving horizontally
List<Integer> toCheck = range(fromColumn, toColumn);
for (int col : toCheck) {
if (!gameMatrix[fromRow][col])
return false; // Path is blocked
}
return true;
} else if (fromColumn == toColumn) { // Moving vertically
List<Integer> toCheck = range(fromRow, toRow);
for (int row : toCheck) {
if (!gameMatrix[row][fromColumn])
return false; // Path is blocked
}
return true;
} else {
// Moving diagonally is not allowed
return false;
}
}
// Implementación de la función range de PHP
private static List<Integer> range(int start, int end) {
List<Integer> result = new ArrayList<>();
if (start <= end) {
for (int i = start; i <= end; i++) {
result.add(i);
}
} else {
for (int i = start; i >= end; i--) {
result.add(i);
}
}
return result;
}
public static void main(String[] args) {
boolean[][] gameMatrix = {
{false, true, true, false, false, false},
{true, true, true, false, false, false},
{true, true, true, true, true, true},
{false, true, true, false, true, true},
{false, true, true, true, false, true},
{false, false, false, false, false, false}
};
System.out.println(canTravelTo(gameMatrix, 3, 2, 2, 2)); // true, Valid move
System.out.println(canTravelTo(gameMatrix, 3, 2, 3, 4)); // false, Can't travel through land
System.out.println(canTravelTo(gameMatrix, 3, 2, 6, 2)); // false, Out of bounds
}
}
Des idées de projet : -IA et Cybersécurité : Détection de menaces avancées avec des modèles de Deep Learning -création d'une plateforme de stockage décentralisé et sécurisé pour les données sensibles -Analyse des vulnérabilités des protocoles IOT -Analyse des vulnérabilités liées aux Framework web populaires
man 2 times
This is generally enough to get a precise overview of each thread user/sys/idle times without much hassle.
Don't rely on the children times in the uts struct, they are only accounted when a child has exited and been waited for.
In your scenario, since you don't have administrator privileges to create custom event log sources and names, you are constrained by what the system already has available for logging. The Write-EventLog cmdlet requires a source to be registered before it can write to a log, and trying to use a source that doesn't exist or isn’t registered will throw the error you encountered.
Unfortunately, without administrative rights, you cannot register new event sources using New-EventLog. However, you can still write to the existing logs if you identify the logs and sources that are already available to the user.
This may happen because you have not added the identifier of the path where this file is located to the include in tsconfig.json. I also encountered this problem, and finally found out about it through a very accidental prompt. And there is no need for the require import method.
Spotify deprecated several API endpoints on November 27th 2024. The get-audio-features
was one of those endpoints.
This in turn affected spotipy as well.
I confirm that adding a blank hatch, as suggested by @HMH1013, works well:
ax2.contourf(da.lon, da.lat, mask, hatches=['', '.'], alpha=0)
That behaviour only started to happen in a recent version of Matplotlib for me.
Try to move the document to %USERPROFILE% (C:\Users\xxx), then run uninstall again.
I tested this case in detail, and experimentally found out the following:
If you marshal out a parameter that.
null
without an explicit Nullable
wrapper that is not supported by the marshalizer (e.g. float
).float*
(a pointer to a memory region that may be empty)Thus, if the marshalizable function writes null
there, then in C# the value of such a variable will be 0
(since out will declare it as 0
when initializing the variable, and null
will simply not be written).
As a result, we will have out float = 0
without any error on the part of dotnet
, so, answering your own question, in this case you can disregard the compliance with the original documentation and use the more convenient variant with out float
instead of out IntPtr
, but keep in mind that in case of an error, in the place where null
should be, there will be 0
.
I hope I was able to explain it in a clear way, and that people who have the same question will understand me.
I would be glad if people who are more knowledgeable in the subject would complement me if I have made a mistake.
Based on the code provided, here's what you can focus on to resolve the events not showing up in production. Since tasks are working correctly but events aren't, and both use similar patterns, the key difference likely lies in how the events data is being handled in the frontend. First, verify that your events API endpoint is being called correctly in production by adding more detailed logging in your events route handler. Then, check that the date handling in your Event model is consistent between environments.
Here's what to implement: Add comprehensive logging in your events route to track the exact data being sent, ensure your frontend is using the correct API URL for events (similar to your tasks implementation), and verify that the date formats are being properly parsed when creating Event objects. You can also add a specific date format validation in your Event schema to ensure consistency across environments. The fact that tasks work while events don't suggests the issue is specific to the event data handling rather than a general API connectivity problem.
setting the --dpi 200 did the trick to solve the issue !!
Facing the same issue did you find any fix.
The {% for %}
block of flask template would iterate over every item in your data
(returned by get_hidden_interests) as is, so it's your task to prepare the correct data. Judging from the meaning of total_items
and total_pages
you might have mistakenly pass the whole database to it, instead of only required page of it. And get_hidden_interests
accepting page
and per_page
feels like it should do the job, so there might be errors there.
Steps for you:
Sort Object Keys Alphabetically (Case-Insensitive): Use Object.keys() to get all keys of an object and sort them with .sort(), using localeCompare for case-insensitive comparison. Apply this recursively for nested objects.
Preserve Original Structure; Make sure arrays remain arrays and objects remain objects. Use a recursive approach to traverse and process each element based on its type (Array.isArray() and typeof).
Remove Duplicate Objects: Serialize objects using JSON.stringify() and use a Set to store and compare them. This will help you remove duplicates while keeping the first occurrence intact.
Remove Empty Properties: Define a helper function to detect "empty" values like null, undefined, empty arrays, or objects. Use this function recursively to clean up unwanted properties from your data.
You can look-up everything to understand it here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Working_with_Objects
When I tried to add an ed25519 key to Jenkins to authenticate with a key, Jenkins would refuse it as an unsupported key format. This is Jenkins 2.487 with a current sshd plugin on Debian bookworm (12.8).
After a long struggle and feedback by several very helpful testers I think that I have found a reliable way to implement a CompanionDeviceService
with startObservingDevicePresence
.
In regard to your question, the behavior differs wildly across different Android versions and I highly recommend to test it on several devices. However, you should in any case start coroutines to handle your communication and (if applicable) show a notifiation to act as a foreground service and only use onDeviceAppeared
as a launcher and onDeviceDisappeared
as a hint on when to clean up.
However, things are complicated, so allow me to use this to share all my findings.
For a few months now I am working on an open source BLE remote control for Sony cameras. I implemented it as a CompanionDeviceService
and rely entirely on startObservingDevicePresence
to start it. At the time of writing this, Android 15 is the most recent OS and I support a minimum of Android 12 (earliest startObservingDevicePresence
). I am running a public beta and am confident about it enough by now to hopefully do a "proper release" in 1-2 weeks.
So, all of the following refers to BLE and you can find the code and user feedback I refer to on github.
I have tested my app on a Pixel 6 with Android 15, a Pixel 3 with stock Android 12 and various LineageOS 20/21 images and on a few other Android 12 devices. I also got some logs from users with Android 14 devices and a Pixel 9 Pro with Android 15.
Across these devices I have found at least 4 different patterns for the onDeviceAppeared/onDeviceDisappeared callbacks:
Android 12:
If the device is already on, onDeviceAppeared
is called immediately after startObservingDevicePresence
, but there is no matching onDeviceDisappeared
when it is turned off for the first time. Turning the device on again, reliably triggers an onDeviceAppeared
and turning it off again triggers onDeviceDisappeared
within a few seconds.
Android 13 and early Android 14:
These generate a single onDeviceAppeared
event when the device is turned on, but it takes at least 2 minutes (sometimes even 3 minutes) until onDeviceDisappeared
is called.
Later Android 14 and Android 15:
At some point, the 2 minute delay was removed and the behavior once again changed fundamentally. Now, onDeviceAppeared
is called twice with two matching onDeviceDisappeared
. As I found in the Android source and got confirmation on the Android issue tracker these correspond to internal calls to onDevicePresenceEvent
with different event types EVENT_BLE_APPEARED
and EVENT_BT_CONNECTED
(and EVENT_BLE_DISAPPEARED
and EVENT_BT_DISCONNECTED
respectively). So, you will get an onDeviceAppeared
when the device is seen in a scan and another onDeviceAppeared
when you connect to it (not sure why that should be of any help). Similarly, the first onDeviceDisappeared
corresponds to a disconnect and you get a second one when the device stops appearing in scans (after a little timeout).
Android 15 / Pixel 9 Pro:
If I had not seen the log of a Pixel 9 Pro I would not have believed it, but one of my users has seen another entirely different behavior. On his device, onDeviceAppeared
is called twice as mentioned above, but then onDeviceDisappeared
follows reliably after 10 seconds while the device is still connected and working. This may be partly a problem with this Bluetooth device (different camera model), but the connection does not drop and hence I don't think the call to onDeviceDisappeared
is warranted. The device remains functional until it is really turned off, when onDeviceDisappeared
is called a second time.
onDeviceAppeared
and onDeviceDisappeared
and map a simple connect/disconnect or service start/stop to it.onDeviceAppeared
and last onDeviceDisappeared
) are relevant. The other ones are much clearer communicated in onConnectionStateChange
of your BluetoothGattCallback
.The best solution seems to be to use the "outer" onDeviceAppeared
and onDeviceDisappeared
events to start/stop a service, but handle actual Bluetooth disconnects and reconnects independently inbetween. I think that this is actually the intended way to use these events: As indicator for when to start or stop the service. In fact, I think that these indicate the time during which you have the priviledged state of a companion service and are very unlikely to be killed. But the very different ways the events occur on different Android version and the barely existant documentation makes it really hard to figure out what you can expect. Even worse, the additional events since late Android 14 mean that you will have to ignore some cases.
So, I ended up literally counting the onDeviceAppeared
events to only react to the first onDeviceAppeared
and the last onDeviceDisappeared
. I initialize my Bluetooth classes and call connectGatt
on the first onDeviceAppeared
. I free resources and terminate the service on the last onDeviceDisappeared
(although, I think that Android would kill it eventually anyway).
Inbetween I let the "autoConnect" parameter of connectGatt
keep the connection alive and observe its state through onConnectionStateChange
of my BluetoothGattCallback
. Especially any online/offline notification for the user is based on this. I actually even remove the notification when the device disconnects, so the users sees my service vanishing immediately (even though on Android 13/14 it actually stays around for a few minutes). So far, this seems to work well enough.
Note that this is not perfect for the Android 12 case where there is no matching onDeviceDisappeared
after the very first connection. If you need that, you might have to handle Android 12 separately, but otherwise this only means that your service will stick around a bit longer afer the first startObservingDevicePresence
and will eventually be cleaned by the system anyway
Also note, that according to the response I got on the Android issue tracker things might become easier with Android 16 when you can directly use onDevicePresenceEvent
instead, but it will be a while until enough users have Android 16 to rely on. So, readers from the future with your fancy flying cars: Is it now nice to write BLE apps for Android or do you have more yearly API changes to worry about as we have seen since Android 4?
Do you have any fix for sqlite? Thank you.
Why not use:
Test-Path (path goes here) -ErrorAction Stop
to generate a trappable exception that you can handle? That way, you don’t have to comb through the error record for the specifics?
android:layout_alignWithParentIfMissing="true"
Yes, you can run Google Colaboratory notebooks from VS Code using the jupyter extension or through the VS Code integration with Google Colab via the Google Colab API. This allows you to edit and run code in Colab from within your local VS Code environment.
The problem is solved by adding the below statement in "gradle.properties" file located in [App_name] > android > gradle.properties The statement that is added,
org.gradle.java.home=C:/Program Files/Java/jdk-17.0.x
The right side of equal sign is the location of JDK. Change the location accordingly. Thanks
Chromes new tab URL is:
chrome://new-tab-page
At least for NextJS 14 I have found some problems using server actions as fetcher, for some reason sometimes it didn't fetch data when changing the server action. Suppose that we have an object DataSource = { getRows: async (params: GetRowsParams) => await serverAction(params.filter, params.sort, params.pagination); }
Now we put it as useSWR(params, dataSource.getRows);
If I have a client component with this hook, and use it in two or more pages with different data source objects, the data could get stale and useSWR won't fetch for the new server action. It could be for several reasons, one of them could be the ID of server actions, suppose that we have two files: users.ts and schedules.ts, if both files have 4 server actions and we make an index.ts file exporting all of these server actions, it will find an error for server actions $$ACTION_1, $$ACTION_2, $$ACTION_3, $$ACTION_4, as NextJS assign these IDs for the server actions of each file, so, if the useSWR sees them in the same way, it won't detect changes on the fetcher and hence won't fetch new data. So I recommend to make the server action a regular function and put it in a route handler, then use the fetch API.
In my case, the problem was coming up because I had two database servers running on the same machine: [1] Postgresql 14
which uses scram-sha-256
and [2] Postgresql 9.6
which uses md6
. So I needed to specify the port number, and it worked!
$psql -U postgres -d dbname -p 5523 -f *path/to/file*
body{background-image:url("Enter your image location");}
Not all websites allow automated access
Hey @MITHU, the reason you are getting ConnectionError is because some websites simply don't allow automated access to prevent from bots. You can check that by using webiste_url/robots.txt Usually they would have something like below:
User-agent: *
Disallow: /
You can try out this working example:
import requests
url = 'https://github.com/'
headers = {
'accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8',
'accept-language': 'en-US,en;q=0.9',
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36'
}
with requests.Session() as session:
session.headers.update(headers)
response = session.get(url)
print("Status Code:", response.status_code)
print("Page Snippet:", response.text[:500])
I search and saw some solution, but they are too simple. My code is from: https://www.gradio.app/guides/creating-a-custom-chatbot-with-blocks , like below:
It is very common to get current session user in bot function, but bot function cannot get Request parameter, I don't know how to get session information in bot function. Their demo only has very simple case, does anyone know how to get request in this case? Thanks!
def add_message(history, message):
for x in message["files"]:
history.append({"role": "user", "content": {"path": x}})
if message["text"] is not None:
history.append({"role": "user", "content": message["text"]})
return history, gr.MultimodalTextbox(value=None, interactive=False)
def bot(history: list):
response = "**That's cool!**"
history.append({"role": "assistant", "content": ""})
for character in response:
history[-1]["content"] += character
time.sleep(0.05)
yield history
with gr.Blocks() as demo:
chatbot = gr.Chatbot(elem_id="chatbot", bubble_full_width=False, type="messages")
chat_input = gr.MultimodalTextbox(
interactive=True,
file_count="multiple",
placeholder="Enter message or upload file...",
show_label=False,
)
chat_msg = chat_input.submit(
add_message, [chatbot, chat_input], [chatbot, chat_input]
)
bot_msg = chat_msg.then(bot, chatbot, chatbot, api_name="bot_response")
bot_msg.then(lambda: gr.MultimodalTextbox(interactive=True), None, [chat_input])
chatbot.like(print_like_dislike, None, None, like_user_message=True)
demo.launch()
Hello my friend long time I want to tell my story and the girls you search this number can't see anything +971504347899 she in my family but my be seeker yousing my number and email and showing in my be group in I can't tel mor you can't check my friend you can see anything 😰 I want to tell she's family but I can't iwant anything because on mor time I'm telling she's mother but not believe me this brother Tel me I'm report to polic fur you my sister Claire I don't no she's give young sister one more time I don't no she's hacking my mobil sumbuy in group any time showing body in cam after download in twwit and Flickr wiki tomuc site one time challenge me in hospital open cam and one boy showing and she's using my mobile address I can't listen to voice in my mobile phone long story but my lungoch I want to speak Arabic. Anything mor time after transfer English
No No Pend Nama NPM Kelas Keterangan 1 I241962 A Farhan Assidqi 10824001 1MA01 S1-Ilmu Komunikasi Pagi Depok 2 T241585 Adiendha Putri Lasyalwa 10824011 1MA01 S1-Ilmu Komunikasi Pagi Depok 3 I242166 Ahmad Fauzan Elvansyah 10824038 1MA01 S1-Ilmu Komunikasi Pagi Depok 4 I246271 Amanda Aprilia 10824086 1MA01 S1-Ilmu Komunikasi Pagi Depok 5 T242537 Annisa Dwi Kasyafani 10824123 1MA01 S1-Ilmu Komunikasi Pagi Depok
Actually, the link you posted in the past received a new answer in Aug 2024. This one: https://stackoverflow.com/a/78876788/9151070
The suggestion is to use --collect-datas=fake_useragent
in the pyinstaller. I was facing the same issue as you and this suggestion fixed it. Example:
pyinstaller --collect-datas=fake_useragent --onefile -w my_project.py
dotnet new classlib -o ApplicationName
Try resetting the app cache. If you are in windows you have to create a environment variable by creating going to windows registers
SSL Certificate Issues:
Check if your SSL certificate is still valid. An expired certificate will trigger this error. If the certificate is installed incorrectly or doesn't match your domain name (e.g., it’s for example.com but your site is www.example.com), you’ll get this error.
If the certificate is self-signed or from an untrusted authority, browsers may block the connection.
I encountered the same issue with the module pyscreeze, I tried to downgrade the Pillow package version from 11.0.0 to 10.4.0 and it worked.
No, they should not be globals.
Here are the globals listed by Node.js https://nodejs.org/api/globals.html
It is not best practice. I would implement this using a placeholder in the video tag.
The implementation of Interaction.GetObject changed.
.NET Framework way to use GetObject with only a Class Specified:
CATIA = GetObject(,"CATIA.APPLICATION")
.NET way to use GetObject with only a Class specified:
CATIA = GetObject("","CATIA.APPLICATION")
I had Python 3.13 and got the same error when tried to install psycopg2-binary. I downgrade Python to 3.12 as per FlyingTeller recommendation and it fixed the error. Please see the answer on how to downgrade Python: https://stackoverflow.com/a/75710481/15400268