Free web resources everyday
Tag: WebDev
Web development news and tutorials
ReadWriteWeb.com
Web Apps, Web Technology Trends, Social Networking and Social Media
Nifty Corners Cube
Rounded corners the javascript way
Nifty Corners Cube
StackOverflow.com
Random snippets of all sorts of code, mixed with a selection of help and advice.
How to Generate a .bin File Without TouchGFX Images in STM32 Firmware?
3 December 2024 @ 9:37 am
I am working on firmware development using STM32CubeIDE with TouchGFX for an STM32H750Bx MCU. The firmware includes a GUI and a CAN-Bus for external communication.
Currently, the firmware size is around 6 MB, with approximately 5.75 MB being dedicated to graphics (TouchGFX images), which are stored in an external W25Q128 flash memory.
I developed a custom tool to flash new firmware updates, primarily for adding features or fixing bugs. However, this tool is not optimized for handling large files, and flashing the current firmware with the GUI takes about 4 hours, which is impractical.
In the linker file (.ld), I separated the memory regions:
Firmware: Stored in external flash starting at 0x90000000, size 4 MB.
Images: Stored in external flash starting at 0x90400000, size 12 MB.
The images (TouchGFX assets) are rarely changed and are the same across updates. I want to flash only the firmware without reloading the im
"Error with context after widget disposal when calling showModalBottomSheet and showDialog in Flutter"
3 December 2024 @ 9:35 am
I'm experiencing an issue where I'm trying to show file options in a bottom sheet and a confirmation dialog using showModalBottomSheet and showDialog, but I'm getting the following error:
**Navigator operation requested with a context that does not include a Navigator.**
It seems like the context I am using for these operations is no longer valid after the widget has been disposed. I’ve tried the following approaches but the issue persists.
What I’ve tried:
1. Using onLongPress within ListView.builder
I am passing the context from the itemBuilder method of a ListView.builder.
I use this context to show a modal bottom sheet and dialog, but after some operations, I get the error about the context being disposed.
2. Calling showModalBottomSheet:
I’m using showModalBottomSheet to show the file options after a long press on a ListTile:
How can I get new announcement from Binance?
3 December 2024 @ 9:35 am
coders.
I am currently working on a project.
I need to get new announcements from "https://www.binance.com/en/support/announcement/new-cryptocurrency-listing?c=48" as soon as possible.
I want to get new announcements within 1-2 seconds.
The current codebase is implemented with Python Scrapping.
URL = https://www.binance.com/en/support/announcement/new-cryptocurrency-listing?c=48
response = await self.fetch_with_retry(
f"http://api.scrape.do/?token={API_KEY}&url={URL}",
GET_MODE,
headers=HEADERS
)
But it takes 10 seconds.
I have two questions:
Is it possible to get new announcements using API instead of scraping?
How can I reduce the time by using scraping?
I hope hear from you.
JSON data with a list of different loans each with a title summary and requirement object with an array of items name and type property
3 December 2024 @ 9:33 am
I have a json data with a list of different loan types each with a title, summary and requirements object with an array of items, each having a name and type property. requirement object further categorizes the requirements based on different client types that is limited companies, business and individual. Help me create a React component that dynamically maps and displays the loan types.
[
{
"id": 1,
"title": "Logbook Loans",
"summary": "Get fast financing by using your vehicle's logbook as collateral, with flexible repayment options and competitive interest rates.",
"requirements": {
"limited companies": [
{ "name": "copy of id and pin of directors", "type": "file" },
{ "name": "directors passport photo", "type": "file" },
{ "na
Uninstall older version in Inno Setup
3 December 2024 @ 9:33 am
I am building a new version of a program with inno Setup.
I am very new at this so bear with me :)
There is an older version of the program NOT created with Inno Setup.
I want to uninstall this before installing the new version.
I did not build it, and I know there is things that are not in the same places in the registry, and I don´t know all so there must be an uninstall of the old version.
I can find the appid with command "run/shell:appsfolder"
The appid seems to be the same for many apps but with different endings:
{7C5A40EF-A0FB-4BFC-874A-C0F2E0B9FA8E}****.exe
However I can not find it in:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\ or HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\
Can someone please help me define the code to uninstall the old version?
Thanks in advance
I have read much about it, but all refer either to older versions created with I
Android Media3 Exoplayer : How to set different cookie for each HlsMediaSource while call addMediaItem() function?
3 December 2024 @ 9:32 am
Recently I try to migrate standalone Exoplayer SDK to Media3 Exoplayer.
While I implement MediaLibrayService and the callback listener, I can play normal mp3 url through MediaController.setMediaItem().
But my project needs to play each HLS(.m3u8) source with different cookies.
I try to override onAddMediaItems to set cookie with each Media Item and it's not working and kept received Caused by: androidx.media3.datasource.HttpDataSource$InvalidResponseCodeException: Response code: 403.
Below is part of my code. Hope someone can give me some advices to solved this problem.
MediaLibraryService
override fun onAddMediaItems(
mediaSession: MediaSession,
controller: MediaSession.ControllerInfo,
mediaItems: MutableList<MediaItem>,
): ListenableFuture<MutableList<MediaItem>> {
val updatedMediaItems = mediaItems.map {
val cookie = it.requestMetad
How does Koin manage memory for single, factory, and scoped objects?
3 December 2024 @ 9:32 am
I’m using Koin for dependency injection in my Kotlin app and need clarification on how memory is managed for different object definitions like single, factory, and scoped.
Memory Allocation Questions:
How does Koin manage memory for single, factory, and scoped objects?
For single, does Koin retain the object until the app closes? For factory, does it discard the object immediately after use? And for scoped, how does it handle memory when the scope ends?
Garbage Collection:
How does Koin ensure objects are cleaned up by the garbage collector? Can this lead to memory leaks?
Has anyone encountered memory-related issues with Koin? Any strategies to manage memory effectively in large apps?
I can't find any deep document about this topics.
Thanks for any insights or best practices!
Creating a streamlit web app that gets the user email/username from sso log in to the backend
3 December 2024 @ 9:31 am
We aim to develop an Azure Web App using Streamlit with integrated Microsoft authentication. The application will restrict access to specific domain groups, allowing authorized users to log in seamlessly without requiring an external Microsoft authentication link.
What we need to do is to provide access only to certain blob folders for each user, so with his email we can filter what the user will be able to see.
The app has delegated permissions for user email and profile.
We have tried many things but nothing really worked out.
The code that we have till now is:
##credential and connections
credential = DefaultAzureCredential()
KEY_VAULT_NAME = os.environ.get("KEY_VAULT_NAME")
KV_URI = f"https://{KEY_VAULT_NAME}.vault.azure.net"
client = SecretClient(vault_url=KV_URI, credential=credential)
##sso
# Azure AD Config
TENANT_ID=client.get_secret("tenantid")
TENANT_ID=TENANT_ID.value
CLIENT_ID = client.get_secret(
Artifactory microservices did not start with systemd
3 December 2024 @ 9:28 am
We are planning to migrate an Artifactory instance to a new server. I have already carried out a new Artifactory installation and migrated the configuration to the new Artifactory via import/export. The version is still on 7.11.2, as we are only upgrading to the current version after the migration, as recommended.
Artifactory was installed with RPM on Red Hat Enterprise Linux 9.4. We use Postgres 15 as the database.
If we start via the script /opt/jfrog/artifactory/app/bin/artifactory.sh start, Artifactory runs as we expect it to.
If we start artifactory via systemctl start, Tomcat also starts, but some other services cannot start (jfrt,jffe) and therefore artifactory does not run correctly.
All folders and files in the home dir have permissions for the user artifactory.
The service File:
/usr/lib/systemd/system/artifactory.service
[Unit]
Description=Artifactory service
After=network.target
[Service]
Type=f
Tried to develop an UI for Brain MRI image classification
3 December 2024 @ 9:22 am
I am using Google Colab python Notebook to develop the UI for my brain tumor classification demo frontend by importing streamlit, and run a app.py file for the interface. I am going to let the user choose which model that I had trained to classify the brain mri image. Below is my source code:
file = st.file_uploader("", type=["jpg", "png"])
ModelSelection = st.selectbox("Model to choose", ("CNN", "PDCNN", "Hybrid AlexNet-GRU"))
if st.button("Execute"):
labels = ['glioma','meningioma','notumor','pituitary']
if ModelSelection == "CNN" :
model_path = "drive/MyDrive/Degree/FinalYearProject/Saved_model/cnn_model2.keras" #file:\\\C:\ZX_Data\TARUMT_docs\Degree\FYP\Saved_model\
model = tf.keras.models.load_model(model_path)
image = Image.open(file)
st.image(image, use_container_width=True)
# Preprocessing
image = cv2.imread(image,cv2.IMREAD_UNC
960.gs
CSS Grid System layout guide
960.gs
IconPot .com
Totally free icons
Interface.eyecon.ro
Interface elements for jQuery
Interface.eyecon.ro
ThemeForest.net
WordPress Themes, HTML Templates.
kuler.adobe.com
color / colour themes by design
webanalyticssolutionprofiler.com
Web Analytics::Free Resources from Immeria
webanalyticssolutionprofiler.com