Since I do not have the reputation to comment yet, I would like to add that (at least) in my case the python code line in the (otherwise excellent) first answer
print("Hard Disk Model: %s" % model)
outputs a bytes object rather than a regular Unicode string; you might want to re-write this (and the following) line as
print(f"Hard Disk Model: {model.decode('utf-8')}")
Second, if called by a non-existant drive, an OSError 22 ("Invalid argument") is thrown when calling fcntl.ioctl. You might want to embed that part of the code in try/except.
Thank you so much for your help. More details are given below:
base.html :
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" th:fragment="layout(content)"
xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head th:fragment="title">
<meta charset="UTF-8">
<title>StokSense</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet"
th:href="@{https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css}" />
<!-- Bootstrap Icons -->
<link rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css" />
<!-- Custom CSS -->
<link rel="stylesheet" th:href="@{/css/custom.css}" />
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
}
body {
display: flex;
flex-direction: column;
}
main {
flex: 1;
}
</style>
</head>
<body
th:with="
currentUser=
${(#authentication != null and #authentication.name != 'anonymousUser')
? @userService.findByEmail(#authentication.name)
: null}
"
th:classappend="${currentUser != null and currentUser.theme=='dark'} ? ' dark-mode' : ''"
>
<!-- NAVBAR -->
<header th:fragment="header">
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container-fluid">
<!-- Logo -->
<a class="navbar-brand" th:href="@{/}">
<i class="bi bi-box-seam me-1"></i> StokSense
</a>
<button class="navbar-toggler" type="button"
data-bs-toggle="collapse"
data-bs-target="#navbarNav"
aria-controls="navbarNav"
aria-expanded="false"
aria-label="Menu">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav me-auto">
<!-- Ürünler -->
<li class="nav-item" sec:authorize="isAuthenticated()">
<a class="nav-link" th:text="#{menu.products}" th:href="@{/products}"></a>
</li>
<!-- Kategoriler -->
<li class="nav-item" sec:authorize="isAuthenticated()">
<a class="nav-link" th:text="#{menu.categories}" th:href="@{/categories}"></a>
</li>
<!-- Satın Alma -->
<li class="nav-item" sec:authorize="isAuthenticated()">
<a class="nav-link" th:text="#{menu.purchases}" th:href="@{/purchases}"></a>
</li>
<!-- Tedarikçiler -->
<li class="nav-item" sec:authorize="isAuthenticated()">
<a class="nav-link" th:text="#{menu.suppliers}" th:href="@{/suppliers}"></a>
</li>
<!-- Müşteriler -->
<li class="nav-item" sec:authorize="isAuthenticated()">
<a class="nav-link" th:text="#{menu.customers}" th:href="@{/customers}"></a>
</li>
<!-- Satış -->
<li class="nav-item" sec:authorize="isAuthenticated()">
<a class="nav-link" th:text="#{menu.sales}" th:href="@{/sales}"></a>
</li>
<!-- Raporlar -->
<li class="nav-item" sec:authorize="isAuthenticated()">
<a class="nav-link" th:text="#{menu.reports}" th:href="@{/reports}"></a>
</li>
<!-- Admin Panel -->
<li class="nav-item" sec:authorize="hasRole('ADMIN')">
<a class="nav-link" th:text="#{menu.adminPanel}" th:href="@{/admin/index}"></a>
</li>
<!-- Forecast -->
<li class="nav-item" sec:authorize="hasRole('ADMIN') or hasRole('PREMIUM')">
<a class="nav-link" th:text="#{menu.forecast}" th:href="@{/premium/forecast}"></a>
</li>
<!-- Kullanıcı Panelim -->
<li class="nav-item" sec:authorize="hasAnyRole('STANDARD','PREMIUM')">
<a class="nav-link" th:text="#{menu.dashboard}" th:href="@{/user/dashboard}"></a>
</li>
<!-- Plan Yükselt -->
<li class="nav-item" sec:authorize="hasRole('STANDARD')">
<a class="nav-link" th:text="#{menu.planUpgrade}" th:href="@{/user/plans}"></a>
</li>
</ul>
<!-- Sağ kısım (Giriş / Profil) -->
<ul class="navbar-nav ms-auto">
<!-- Giriş -->
<li class="nav-item" sec:authorize="!isAuthenticated()">
<a class="nav-link" th:href="@{/login}" th:text="#{menu.login}"></a>
</li>
<!-- Kayıt -->
<li class="nav-item" sec:authorize="!isAuthenticated()">
<a class="nav-link" th:href="@{/register}" th:text="#{menu.register}"></a>
</li>
<!-- Dil Seçimi (icon ekledik) -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle"
href="#"
role="button"
data-bs-toggle="dropdown"
aria-expanded="false">
<i class="bi bi-translate me-1"></i>
Dil Seçenekleri
</a>
<ul class="dropdown-menu dropdown-menu-end">
<li>
<a class="dropdown-item" href="?lang=tr">Türkçe</a>
</li>
<li>
<a class="dropdown-item" href="?lang=en">English</a>
</li>
</ul>
</li>
<!-- Profil Dropdown (giriş yapmış) -->
<li class="nav-item dropdown" sec:authorize="isAuthenticated()">
<a class="nav-link dropdown-toggle" href="#"
role="button" data-bs-toggle="dropdown"
aria-expanded="false"
th:text="#{menu.profile}"></a>
<ul class="dropdown-menu dropdown-menu-end">
<li>
<a class="dropdown-item" th:href="@{/profile}">
<i class="bi bi-gear-wide-connected me-1"></i>
[[#{menu.profile}]]
</a>
</li>
<li>
<form th:action="@{/logout}" method="post" class="m-0">
<button class="dropdown-item" type="submit">
<i class="bi bi-box-arrow-right me-1"></i>
[[#{menu.logout}]]
</button>
</form>
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
</header>
<main>
<div th:replace="${content}"></div>
</main>
<!-- FOOTER -->
<footer class="bg-light text-center text-lg-start mt-5" th:fragment="footer">
<div class="text-center p-3">
[[#{footer.copyright}]]
</div>
</footer>
<!-- Bootstrap JS -->
<script th:src="@{https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js}"></script>
</body>
</html>
4. Order Form Template
order-form.html :
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Ön Sipariş Oluştur - Naaaa</title>
</head>
<body th:replace="~{base :: layout(~{::content})}">
<div th:fragment="content" class="container mt-4">
<h2>Ön Sipariş Oluştur</h2>
<!-- Basit form (Spring MVC) -> method="post" -->
<form th:action="@{/orders/save}"
th:object="${order}"
method="post"
class="needs-validation"
novalidate>
<!-- Sipariş ID (hidden) -->
<input type="hidden" th:field="*{id}" />
<!-- Müşteri Seçimi -->
<div class="mb-3">
<label for="customerSelect" class="form-label">Müşteri Seçiniz</label>
<select id="customerSelect"
th:field="*{customer.id}"
class="form-select"
required>
<option value="" disabled selected>Seçiniz</option>
<option th:each="c : ${customers}"
th:value="${c.id}"
th:text="${c.name}">
</option>
</select>
<div class="invalid-feedback">Lütfen bir müşteri seçiniz.</div>
</div>
<!-- Ürün Seçimi -->
<div class="mb-3">
<label for="productSelect" class="form-label">Ürün Seçiniz</label>
<select id="productSelect"
th:field="*{product.id}"
class="form-select"
required>
<option value="" disabled selected>Seçiniz</option>
<!--
data-price: Her ürünün "price" değerini HTML5 data attribute olarak tutuyoruz.
Seçilen üründe bu attribute'u JS ile okuyup "Net Birim Fiyat" alanına set edeceğiz.
-->
<option th:each="p : ${products}"
th:value="${p.id}"
th:attr="data-price=${p.price}"
th:text="${p.name}">
</option>
</select>
<div class="invalid-feedback">Lütfen bir ürün seçiniz.</div>
</div>
<!-- Net Birim Fiyat -->
<div class="mb-3">
<label for="netUnitPrice" class="form-label">Net Birim Fiyat</label>
<input type="number"
step="0.01"
th:field="*{netUnitPrice}"
class="form-control"
id="netUnitPrice"
placeholder="The price of the selected product will appear automatically"
required />
<div class="invalid-feedback">Net birim fiyat alanı zorunlu.</div>
</div>
<div class="mb-3">
<label for="taxRate" class="form-label">Vergi Oranı</label>
<input type="number"
step="0.01"
th:field="*{taxRate}"
class="form-control"
id="taxRate"
placeholder="0.18 => %18"
required />
<div class="invalid-feedback">Lütfen geçerli bir vergi oranı giriniz.</div>
</div>
<!-- Miktar -->
<div class="mb-3">
<label for="quantity" class="form-label">Miktar (Adet)</label>
<input type="number"
th:field="*{quantity}"
class="form-control"
id="quantity"
value="1"
min="1"
required />
<div class="invalid-feedback">En az 1 adet olmalıdır.</div>
</div>
<button type="submit" class="btn btn-primary">Kaydet</button>
<a th:href="@{/orders/my}" class="btn btn-secondary">İptal</a>
</form>
</div>
<!-- JS (Bootstrap ve script) -->
<script th:src="@{https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js}"></script>
<script>
(function () {
'use strict';
const forms = document.querySelectorAll('.needs-validation');
Array.from(forms).forEach(form => {
form.addEventListener('submit', function (event) {
if (!form.checkValidity()) {
event.preventDefault();
event.stopPropagation();
}
form.classList.add('was-validated');
}, false);
});
})();
document.addEventListener('DOMContentLoaded', function() {
const productSelect = document.getElementById('productSelect');
const netPriceInput = document.getElementById('netUnitPrice');
productSelect.addEventListener('change', function() {
const selectedOption = productSelect.options[productSelect.selectedIndex];
const price = selectedOption.getAttribute('data-price');
if (price) {
netPriceInput.value = price;
}
});
});
</script>
</body>
</html>
5. Behavior Observed
6. Browser / Tools
Maybe you want to see it;
OrderController.java :
package com.stoksense.controller;
import com.stoksense.model.*;
import com.stoksense.service.*;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
import java.util.List;
@Controller
@RequestMapping("/orders")
public class OrderController {
private final OrderService orderService;
private final ProductService productService;
private final CustomerService customerService;
private final UserService userService;
private final SaleService saleService;
public OrderController(OrderService orderService,
ProductService productService,
CustomerService customerService,
UserService userService,
SaleService saleService) {
this.orderService = orderService;
this.productService = productService;
this.customerService = customerService;
this.userService = userService;
this.saleService = saleService;
}
@GetMapping("/my")
public String myOrders(Authentication auth, Model model) {
User user = userService.findByEmail(auth.getName());
if (user == null) {
return "redirect:/login?notAllowed";
}
// Customer
Customer cust = customerService.findByEmail(user.getEmail());
if (cust == null) {
model.addAttribute("orders", List.of());
return "orders/my-orders";
}
// siparişleri al
List<Order> orders = orderService.getOrdersByCustomer(cust);
model.addAttribute("orders", orders);
return "orders/my-orders";
}
@GetMapping("/add")
public String showAddOrderForm(Model model, Authentication auth) {
Order order = new Order();
order.setOrderDate(LocalDateTime.now());
order.setStatus(OrderStatus.PENDING);
// Giriş yapan user => Customer
User user = userService.findByEmail(auth.getName());
if (user != null) {
Customer c = customerService.findByEmail(user.getEmail());
if (c != null) {
order.setCustomer(c);
}
List<Product> userProducts = productService.getAllProductsByEmail(user.getEmail());
model.addAttribute("products", userProducts);
} else {
model.addAttribute("products", List.of());
}
model.addAttribute("customers", customerService.getAllCustomers());
model.addAttribute("order", order);
return "orders/order-form"; // templates/orders/order-form.html
}
@PostMapping("/save")
public String saveOrder(@ModelAttribute("order") Order order,
Authentication auth) {
User user = userService.findByEmail(auth.getName());
if (user == null) {
return "redirect:/login?notAllowed";
}
// Müşteri atanmamışsa
if (order.getCustomer() == null || order.getCustomer().getId() == null) {
Customer c = customerService.findByEmail(user.getEmail());
if (c == null) {
return "redirect:/orders/my?noCustomer";
}
order.setCustomer(c);
}
// Ürün stok kontrol & stok düş
if (order.getProduct() != null && order.getProduct().getId() != null) {
Product p = productService.getProductById(order.getProduct().getId()).orElse(null);
if (p == null) {
return "redirect:/orders/my?productNotFound";
}
if (p.getStockQuantity() < order.getQuantity()) {
return "redirect:/orders/my?insufficientStock";
}
p.setStockQuantity(p.getStockQuantity() - order.getQuantity());
productService.saveProduct(p);
// netUnitPrice boşsa => product.price
if (order.getNetUnitPrice() == null || order.getNetUnitPrice() == 0) {
order.setNetUnitPrice(p.getPrice());
}
}
// totalAmount
double net = (order.getNetUnitPrice() != null) ? order.getNetUnitPrice() : 0;
double tax = (order.getTaxRate() != null) ? order.getTaxRate() : 0;
int qty = (order.getQuantity() != null) ? order.getQuantity() : 1;
double total = (net * qty) * (1 + tax);
order.setTotalAmount(total);
// Durum => PENDING
if (order.getStatus() == null) {
order.setStatus(OrderStatus.PENDING);
}
orderService.save(order);
return "redirect:/orders/my?created";
}
@GetMapping("/complete/{id}")
public String completeOrder(@PathVariable("id") Long id, Authentication auth) {
Order order = orderService.getOrderById(id);
if (order == null) {
return "redirect:/orders/my?notfound";
}
User user = userService.findByEmail(auth.getName());
if (user == null) {
return "redirect:/login?error";
}
Customer cust = customerService.findByEmail(user.getEmail());
if (cust == null || !order.getCustomer().getId().equals(cust.getId())) {
return "redirect:/orders/my?unauthorized";
}
if (order.getStatus() != OrderStatus.CONFIRMED) {
order.setStatus(OrderStatus.CONFIRMED);
orderService.save(order);
// Satışa dönüştür
saleService.createSaleFromOrder(order);
}
return "redirect:/orders/my?completed";
}
}
ProductController.java :
package com.stoksense.controller;
import com.stoksense.model.Product;
import com.stoksense.service.CategoryService;
import com.stoksense.service.ProductService;
import com.stoksense.service.UserService;
import org.springframework.security.core.Authentication;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@Controller
@RequestMapping("/products")
public class ProductController {
private final ProductService productService;
private final UserService userService;
private final CategoryService categoryService;
public ProductController(ProductService productService,
UserService userService,
CategoryService categoryService) {
this.productService = productService;
this.userService = userService;
this.categoryService = categoryService;
}
@GetMapping
public String listProducts(@RequestParam(value = "search", required = false) String search,
Model model,
Authentication authentication) {
// Eskisi gibi ürün liste mantığı
if (authentication == null) {
model.addAttribute("products", List.of());
return "product-list";
}
String email = authentication.getName();
var products = productService.getAllProductsByEmail(email);
if (search != null && !search.trim().isEmpty()) {
String lower = search.trim().toLowerCase();
products = products.stream()
.filter(p -> p.getName() != null &&
p.getName().toLowerCase().contains(lower))
.toList();
model.addAttribute("search", search);
}
long totalUserProducts = productService.countAllProductsByEmail(email);
long totalStock = products.stream().mapToLong(Product::getStockQuantity).sum();
double averagePrice = 0.0;
if (!products.isEmpty()) {
double sumPrices = products.stream()
.mapToDouble(p -> (p.getPrice() != null ? p.getPrice() : 0.0))
.sum();
averagePrice = sumPrices / products.size();
}
model.addAttribute("products", products);
model.addAttribute("totalUserProducts", totalUserProducts);
model.addAttribute("totalStock", totalStock);
model.addAttribute("averagePrice", averagePrice);
return "product-list";
}
/**
* GET /products/add
* Yeni ürün ekleme formu (Kategorileri de modele ekleyelim).
*/
@GetMapping("/add")
public String showAddProductForm(Model model, Authentication authentication) {
model.addAttribute("product", new Product());
// Kullanıcının kategorilerini bul
if (authentication != null) {
var user = userService.findByEmail(authentication.getName());
if (user != null) {
// Tüm kategoriler
var categories = categoryService.getAllCategoriesByEmail(user.getEmail());
model.addAttribute("categories", categories);
} else {
model.addAttribute("categories", List.of());
}
} else {
model.addAttribute("categories", List.of());
}
return "product-form";
}
@PostMapping("/save")
public String saveProduct(@ModelAttribute("product") Product product,
Authentication authentication) {
if (authentication != null) {
var user = userService.findByEmail(authentication.getName());
product.setOwner(user);
}
productService.saveProduct(product);
return "redirect:/products?success";
}
/**
* GET /products/edit/{id}
* Düzenleme formu (Kategori listesi de ekleyelim).
*/
@GetMapping("/edit/{id}")
public String showEditProductForm(@PathVariable("id") Long id,
Model model,
Authentication authentication) {
var opt = productService.getProductById(id);
if (opt.isEmpty()) {
return "redirect:/products?notfound";
}
Product product = opt.get();
model.addAttribute("product", product);
// Kullanıcının kategorilerini bul
if (authentication != null) {
var user = userService.findByEmail(authentication.getName());
if (user != null) {
var categories = categoryService.getAllCategoriesByEmail(user.getEmail());
model.addAttribute("categories", categories);
} else {
model.addAttribute("categories", List.of());
}
} else {
model.addAttribute("categories", List.of());
}
return "product-form";
}
@GetMapping("/delete/{id}")
public String deleteProduct(@PathVariable("id") Long id) {
productService.deleteProduct(id);
return "redirect:/products?deleted";
}
@GetMapping("/bulk-update")
public String showBulkUpdateForm(Model model, Authentication authentication) {
if (authentication == null) {
model.addAttribute("products", List.of());
return "bulk-update";
}
var user = userService.findByEmail(authentication.getName());
var products = productService.getAllProductsByEmail(user.getEmail());
model.addAttribute("products", products);
return "bulk-update";
}
@PostMapping("/bulk-update")
public String processBulkUpdate(@RequestParam("productIds") List<Long> productIds,
@RequestParam("newStock") List<Integer> newStockValues) {
for (int i = 0; i < productIds.size(); i++) {
productService.updateStockQuantity(productIds.get(i), newStockValues.get(i));
}
return "redirect:/products?bulkUpdated";
}
}
Thank you very much in advance for your help, if there is anything else you would like to see, please let me know.
In my case, if you create a nested project with a parent project that has several dependencies installed. Make sure that the dependences are not shared with the child folder (where package.json from the cloud function is used). Internally, your project may not have errors, but when deployed, sharing dependencies will affect cloud functions.

Inside android/gradle.properties, change newArchEnabled=true to newArchEnabled=false
Once try this: if works: well and good. if not turn back the false to true :)
The idea is to pick an image from your phone, convert it to a format MongoDB can store, and upload it. If you're using a different mobile framework or driver (like for Swift or Kotlin)
Set Up Your MongoDB Connection then Pick an Image from the Phone after that Store the Image in MongoDB and then Put It All Together
BSON documents (including all fields) can’t exceed 16MB. If your JPEG/PNG is close to this, test it to ensure the whole document (with metadata) fits. For larger files, you’d need GridFS, but I don't think it is required here although that is more complex.
I don't have enough reputation to comment. As another person said, I also resolved this problem on Thonny/Pico by removing "freq = 40000' from the I2C object statement.
I'm having the same issue but with C#. Should I assume that this isn't a bug, but that it's just not supported yet in the C# extension?
I am facing the same problem. en_US language works fine. My template is in another language, approved by Meta for the test given telephone number. The issue should be for the demo telephone number is tight to the English (en_US) language.
One workaround is dynamically renaming the exported sheet name using Apps Script.
However "{bookname} - " will remain.
../android/settings.gradle
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.3.2" apply false
id "org.jetbrains.kotlin.android" version "1.9.24" apply false
}
I encountered the same problem then I updated my yfinance using the following command pip install --upgrade yfinance to 0.2.54 and it worked
Well, I managed to do what I wanted. Basically it's a pie chart, and when you click on a slice, it is replaced by its children and a transition is triggered to squish the parents and remove them from the pie.
Here is the solution I made, it works well and the code is (too) thoroughly commented.
The client does use javascript. Install the @hapi/nes in your frontend and make sure you import it like this import Nes from "@hapi/nes/lib/client and it will work
there is less experience with FHIR R5 than there is with FHIR R4. With FHIR R4, IHE has a very helpful Implementation Guide for use of AuditEvent - https://profiles.ihe.net/ITI/BALP/index.html
When we tried to update BALP to R5, as an experiment, we found that somethings were not possible anymore, so we put in jira tickets to make R6 better again.
That said, Here is my response to your questions.
The IP address where the user is, can be represented in the .agent that holds the user identity; with the IP address encoded in the .agent.networkString. If you have a hostname, that would be the string. If you don't have a hostname, then the IP address is encoded in numeric "Literal address form using square brackets '[]' as a v4 string (in dotted notation), or v6 string (in colon notation)." Quoted from the AuditEvent.agent.network[x] requirements. You would use networkURL if you know more about the IP address, such as the network protocol (e.g. http) being used.
The country from which the user is connecting from, would tend to be part of the Resource used to describe the user, if it is a characteristic of the user. Such as Patient.address, Practitioner.address, PractitionerRole.location, etc. (Noting that all users regardless of their medical credentials are Practitioners. Practitioner is not limited to clinical users. When the location is more dynamic, then it would go into the .agent.location.
In R4 there is an agent.network.type. We looked at the possibilities and realized that when we move the network.address into a URL format, then the protocol on the URL format would indicate the type of network address. This works really well for servers, but as you point out the client of a web address could be anything. However the historic network.type was about protocol not kind of client. If you need to know this level of detail, I would recommend you record it as another .agent using the Device resource in the .agent.who.
Most of the time in FHIR contained resources are discouraged, but recording AuditEvents tend to be one place where one would use a contained resource WHEN there is not a persisted resource (Practitioner, Location, etc) for that agent. It is better to record facts than lose them due to not having a persisted agent resource defined.
Файл написан кириллицей та же ошибка, надо переименовать в латиницу
macos (in the relevant dir.): ./paclient -verbose
Anyone now if it is possible to get the click callback link on this windows toast notification ?
For some reason the SignalR didn't deserialize the object I was passing from the hub to my Blazor app properly, so my subscription didn't recognize it. I'm not sure why this only happens when I run Blazor in a container, but that's what I found. It could be related to the fact that the object had the JsonPropertyName attribute on all of its properties, but I'm not really sure, but this object was from a third party library, so I don't have any control over it. I ended up using Newtonsoft to manually serialize the object on the hub and then manually deserialize it on Blazor. That way the hub and client are only dealing with a string. This fixed my problem.
I may be late but I tried different approaches but the best I could do is solve it manuelly simply using useState:
const [isSubMenuOpen, setIsSubMenuOpen] = useState(true);
<SubMenu
open={isSubMenuOpen}
onOpenChange={() => setIsSubMenuOpen(true)}
they're using YAML to make your life difficult when you want to add fonts or something like this. sometimes you will waste 15 minutes with the indentation which is counter productive tbh.
Here's a nice description from Microsoft on that topic: https://learn.microsoft.com/en-us/previous-versions/office/troubleshoot/office-developer/set-up-vb-project-using-class
It appears to be a bug in Discord. If you do a interaction.response.send_message in your on_submit function, the window behaves correctly. But if you do an interaction.channel.send instead, you get this error.
boss why had you done this It was like a Ray of light for me and at the end it was like bald man giving's reflection of torch light Which means i am again at the start line
Answering my own question here, you have to use UIFindInteraction
I think your id datatype have an issue use datatype BIGINT UNSIGNED which id you want to make for foreignkey
In playwright.config.ts file, need to provide path of "chrome.exe" from program files. Update the code like below,
projects: [ { name: 'chromium', use: { browserName: 'chromium', launchOptions: { executablePath: 'C:\Program Files\Google\Chrome\Application\chrome.exe' } } } ]
This issue occurs due the by default it was unable to find the chrome.exe file.
You cannot override the route. But you can add a suffix or additional parameters to differentiate.
i.e. /some-page /some-page/{id]
If you change the Culture after a page is rendered, or the app is running with i.e. StreamRendering, you should force a reload of the page. Best way to is to trigger a javascript page reload event, or using Navigation
Sorry, no answer, but I am having a similar problem. I am trying to use adafruit-blinka on a Pi Zero W. Starting from a clean SD card I have installed the Rpi OS and I have done a manual blinky install as documented by Adafruit.
I am using a virtual environment. If I run a python3 "shell" then import board and dir(board) seem to work just fine.
If I create a python script containing "import board" it fails reporting "module board not found".
Any Clues, Cheers
I have the same too, you can try changing the Elastic IP, I reassociated it with a new Elastic IP, and the problem was solved
The redis client will automatically calculate
It's now 2025 and this issue is occurring for me. The Google Chrome process is eating up 11 of 16GB of RAM and 60-80% CPU on my local machine. I am running a very small dataset (700 x 9 dataframe) through a small Dense model (3 layers, 1,380 total parameters). I am creating 522 models, executing 300 epochs each but with early dropout of 2 each model executes for about 30 epochs on average. Each model runs only sequentially through this small model, so it doesn't make sense to me that this many local resources are being used up. Happens whether I clear cache from the browser or not. I am running on a Windows machine with Intel i7 8th gen CPU, with a Nvidia Geforce GTX GPU (the gpu is not being used by Chrome, which makes sense). Screen shot attached. If anyone has any ideas, it would be appreciated.
execute the RUN commands as below,have did it for diffusers lib RUN python3 -m pip install <module_name>
Ex. RUN python3 -m pip install diffusers
it's help me a lot to config angular 19 ssr on Cpanel . Thank you !
import express from 'express';
import fs from 'fs';
import path from 'path';
import { createApp as createAppRo } from './dist/folder/server/ro/server.mjs';
import { createApp as createAppEn } from './dist/folder/server/en/server.mjs';
import { createApp as createAppRu } from './dist/folder/server/ru/server.mjs';
const logFile = fs.createWriteStream(path.join(process.cwd(), 'server.log'), { flags: 'a' });
const originalLog = console.log;
console.log = function() {
logFile.write(new Date().toISOString() + ': ' + Array.from(arguments).join(' ') + '\n');
originalLog.apply(console, arguments);
};
const mainApp = express();
mainApp.use('/en', (req, res, next) => {
console.log('Accessing English route');
createAppEn('en')(req, res, next);
});
mainApp.use('/ru', (req, res, next) => {
console.log('Accessing Russian route');
createAppRu('ru')(req, res, next);
});
mainApp.use('/', (req, res, next) => {
console.log('Accessing root route (RO)');
createAppRo('ro')(req, res, next);
});
const port = process.env.PORT || 3000;
mainApp.listen(port, () => {
console.log(`Node Express server listening on http://localhost:${port}`);
});
export default mainApp;
Do you need to use that specific library? You can achieve similar functionality with built-in modules:
import sys, select
i, _, _ = select.select([sys.stdin], [], [], 5)
print(f"Input: {sys.stdin.readline().strip()}") if i else print("No input given")
This will wait for user input for 5 seconds, but requires you to press the enter key to confirm your input, in which case it will also end the timer early.
I had this happen to me once when I had accidently pressed CTRL+F with the console focused. (Began search)
I had three letters 'orz' in the Filter, so it appeared as if I had no logs, but they were just being filtered.
To the best of my knowledge you're following Mosh's React 18 for Beginners tutorial and he is using v2 of Chakra UI which is different from Chakra UI v3.
I'd recommend that you install Chakra UI v2 to ensure code compatibility :)
<UModal v-model="isOpen" :ui="{ width: 'w-[50%] sm:max-w-none' }">
<!-- modal content -->
</UModal>
So I basically solved it by not having a top bar in the Scaffold component. If anyone stumbles upon this issue, just try to remove your topBar from the Scaffold.
P.S. In the original code, you don't see a topBar because I removed the code that I thought was unnecessary, in this case the top bar and the bottom bar. Who knew that the top bar was the culprit? This is most likely a Compose bug. Anyway, I hope anyone that finds this exact issue will be able to solve it with this workaround.
In Laravel 11, you can chain both prefix() and middleware() methods before defining your route group. Here's how to achieve the same behavior as the previous version's array syntax:
Route::prefix('post')->middleware('auth')->group(function () {
Route::get('all', [Controller::class, 'post']);
Route::get('user', [Controller::class, 'post']);
});
For multiple middleware:
Route::middleware(['auth', 'admin'])
->prefix('admin')
->group(function () {
// Your routes here
});
You can also chain other route group features:
Route::prefix('api')
->middleware('api')
->domain('api.example.com')
->name('api.')
->group(function () {
// Your API routes
});
This fluent interface approach is the recommended way in Laravel 11 for grouping routes with shared configuration. The old array-based syntax has been deprecated in favor of this more readable method chaining syntax.
Go to File > Settings > Editor > Inspection Settings > Inspection Severity > Other Languages and uncheck Proofreading option.
I hope everyone is fine. I also searched on stackoverflow but couldn't find it. Or maybe I didn't call correctly. I cannot send the reordering here to the back-end. I added SS. I would be very happy if you could help. I couldn't find where I made a mistake.
Telegram does not provide an official API for bot analytics. However, you can use third-party services like https://tgbotstats.com, which allows you to track user activity, subscriber count, messages, and other metrics.
I finally found the solution, it was a simple mistake on my part. For Android, it's not enough to just grant location permission to the app; the device's location services must be continuously enabled. As for iOS, you need to add the "Access WiFi Information" capability to your Xcode project under the "Signing & Capabilities" section.
You could replace the for loop by this What this does is it just breaks the inner for loop for the invalid input and not the entire for loop. The while loop only runs for a single element of the list.
This type of problem could have been more easily solved if it were c++ as we could just decrement x by one in else block. Hope this helps!
for x in range(0,len(students)):
while True:
register=input(f"Is {students[x]} present? ")
if register == "yes":
present += 1
break
elif register == "no":
absent += 1
break
else:
print("invalid input")
I handle gamebutton presses in my bar.
https://developer.android.com/about/versions/15/behavior-changes-15#ux The easiest and temporary workaround is to target Android 14.
To resolve this you should add the line:
<PropertyGroup> ... <DbScopedConfigDWCompatibilityLevel>50</DbScopedConfigDWCompatibilityLevel>
in the .sqlproj file
NttCAD is a free and easy-to-use 2D/3D CAD software. This software is written in Java SE and therefore is multi-platform: it works on all operating systems (Microsoft Windows, Mac, Linux...).
It was because of the sign_out link was using get instead of delete
devise_for :users, controllers: { sessions: 'users/sessions' }, sign_out_via: [:delete, :get]
Will fix the isue.
why can't you use while loop to test validate input or not.
students = ["Julio","Jayden","Josh","John","Jamal"]
present = 0
absent = 0
for x in students:
register=input(f"Is {x} present? ")
while register not in ("yes", "no"):
register = input(f"Is {x} present? ")
if register == "yes":
present += 1
elif register == "no":
absent += 1
print(f"{present} people are present")
print(f"{absent} people are absent")
I think the problem related to browser , the browser shows pop-up said (" change your password") or like this at all , try to click on the pop-up ok button using Cypress code and it will works .
Had the same problem, after a clean install with "I2C on" the ic2detection showed my sensor, then a python virtual environment setup and a reboot later, I go this error.
Turns out the raspi-config had "I2C off" in it and after sudo raspi-config and switching it on again, everything worked.
A simple idea would be to have a second vertical table limited to one record, which displays all the fields you want to show. The main drawback is it won't disappear when no record is selected (it will display the top one). For what it's worth, I searched briefly for other options, but only found the same suggestion.
If anyone is trying to use @Rotem's answer for h.265 security camera LAN video and needs low latency, this might help (although it might be better to use Qt6, because apparently ffmpeg has already been incorporated into the multimedia backend):
import cv2
import numpy as np
import subprocess
import json
# Use local RTSP Stream for testing
in_stream = 'rtsp://user:[email protected]:554/live/0/main' + '.h265'
# "ffplay -loglevel error -hide_banner -af \"volume=0.0\" -flags low_delay -vf setpts=0 -tune zerolatency
# -probesize 32 -rtsp_transport tcp rtsp://user:[email protected]:554/live/0/main -left 0 -top 50 -x 400 -y 225"
probe_command = ['ffprobe.exe',
'-loglevel', 'error', # Log level
'-rtsp_transport', 'tcp', # Force TCP (for testing)]
'-select_streams', 'v:0', # Select only video stream 0.
'-show_entries', 'stream=width,height', # Select only width and height entries
'-of', 'json', # Get output in JSON format
in_stream]
# Read video width, height using FFprobe:
p0 = subprocess.Popen(probe_command, stdout=subprocess.PIPE)
probe_str = p0.communicate()[0] # Reading content of p0.stdout (output of FFprobe) as string
p0.wait()
probe_dct = json.loads(probe_str) # Convert string from JSON format to dictonary.
# Get width and height from the dictonary
width = probe_dct['streams'][0]['width']
height = probe_dct['streams'][0]['height']
# if False:
# # Read video width, height and framerate using OpenCV (use it if you don't know the size of the video frames).
# # Use public RTSP Streaming for testing:
# cap = cv2.VideoCapture(in_stream)
# framerate = cap.get(5) #frame rate
# # Get resolution of input video
# width = int(cap.get(cv2.CAP_PROP_FRAME_WIDTH))
# height = int(cap.get(cv2.CAP_PROP_FRAME_HEIGHT))
# # Release VideoCapture - it was used just for getting video resolution
# cap.release()
# else:
# # Set the size here, if video frame size is known
# width = 240
# height = 160
command = ['ffmpeg.exe', # Using absolute path for example (in Linux replacing 'C:/ffmpeg/bin/ffmpeg.exe' with 'ffmpeg' supposes to work).
'-hide_banner', # Hide banner
'-rtsp_transport', 'tcp', # Force TCP (for testing)
'-flags', 'low_delay', # Low delay is needed for real-time video streaming.
'-analyzeduration', '0', # No analysis is needed for real-time video streaming.
#'-fflags', 'nobuffer', # No buffer is needed for real-time video streaming.
#'-max_delay', '30000000', # 30 seconds (sometimes needed because the stream is from the web).
'-i', in_stream, # '-i', 'input.h265',
'-f', 'rawvideo', # Video format is raw video
'-pix_fmt', 'bgr24', # bgr24 pixel format matches OpenCV default pixels format.
'-an', 'pipe:'
] # Drop frames if the consuming process is too slow.
# Open sub-process that gets in_stream as input and uses stdout as an output PIPE.
ffmpeg_process = subprocess.Popen(command, stdout=subprocess.PIPE)
while True:
# Read width*height*3 bytes from stdout (1 frame)
raw_frame = ffmpeg_process.stdout.read(width*height*3)
if len(raw_frame) != (width*height*3):
print('Error reading frame!!!') # Break the loop in case of an error (too few bytes were read).
break
# Convert the bytes read into a NumPy array, and reshape it to video frame dimensions
frame = np.frombuffer(raw_frame, np.uint8).reshape((height, width, 3))
# Show the video frame
cv2.imshow('image', frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
ffmpeg_process.stdout.close() # Closing stdout terminates FFmpeg sub-process.
ffmpeg_process.wait() # Wait for FFmpeg sub-process to finish
cv2.destroyAllWindows()
Always changing...Now it's this:
MobileAds.shared.start(completionHandler: nil)
npm install next@canary --legacy-peer-deps
npm i --force
Use this command for installing canary version of next js , as it will update all the version of your previously used dependency
NOTE : This is not recommended for production !
I jave just found prop-types are no longer validated in React 19.
For other late arrivals like me: you can just do [YourCollection].rawCollection().findOneAndUpdate in this case to access the Mongo Node.js driver's native methods.
Thank you miltone. You're right it's a behaviour I have with Firefox.
I did redirect to route and it works fine (even without the 303 HTTP code).
Now I understand what's happening. Thank you very much.
You can add a Parameter to your REST Source named "filter" at the module level. Make sure it is of the "URL Query String" type, and also make sure that the Use for Row Search switch is enabled.
If a parameter has that switch enabled (and only one parameter in a REST Source can have that enabled), then all APEX components with a "search" functionality will use that parameter for their search.
You can use OpenApi Generator plugins to generate classes based on an OpenApi spec. Then use these generated classes as parameters for your endpoints.
just use variables without {{}} in an assignment
var_a := "hello"
var_b := "world"
var_v1 := var_a+"-"+var_b
var_v2 := 'export exp_a='+var_a+'; echo "${exp_a}-'+var_b+'"'
var_v3 := var_a + var_b
@default:
echo var_a: {{var_a}}
echo var_b: {{var_b}}
echo var_v1: {{var_v1}}
echo var_v3: {{var_v3}}
#echo var_v2: {{var_v2}} #what are you trying to do?
As of Python 3.9, string.removeprefix and string.removesuffix are available.
The following code produces '(word)'.
'((word))'.removeprefix('(').removesuffix(')')
It is unclear whether the OP wants a solution that strips exactly-one or all-but-one parens. This solution accomplishes the former, which is a reasonable interpretation based on their ultimate question.
Is there a way to specify that I only want the first and last one removed?
I just want to point out that using a non-escaped "++" in a regex pattern should no longer raise a "multiple error" in version 3.11, as it now has a specific meaning:
x*+, x++, and x?+ are equivalent to (?>x*), (?>x+), and (?>x?) respectively.
see re documentation
The crash in iOS 12 is solved by setting the Optimization Level from "Optimize for Speed" to "No Optimizaiton"
This doesn't work because this package smart_auth is simply not iOS compatible.
Only the Android platform is indicated on the doc: https://pub.dev/packages/smart_auth
wrote the code again, attached another csv file. The problem with this part of the code is solved, moving on Thanks
Adding to the points made earlier, static_assert is very useful to catch certain error or problems early by doing a compile time check itself. IT makes the code robust and avoids run time issues.
Mostly it is used to ensure the types meet certain criteria or validating any constant expression.
Here I want to point out one more example to show static_assert use with template:
template <typename T>
int someFunction(T obj)
{
static_assert(sizeof(T) == 8, “Only 64 bits parameter supported”);
}
Or
template <typename T>
int otherFunction(T obj)
{
static_assert(std::is_integral<T>::obj, “Only integral types “are supported”);
}
facing same issue! did you find solution for this?
You cannot disable the reload button or the back button in a browser because refreshing a page is equivalent to navigating away and unloading the DOM. As a result, the onbeforeunload event will always be triggered. However, you can prevent the buttons from being used. This requires some effort, and it might not be possible to cover every scenario, but you can give it a try.
See: https://developer.mozilla.org/en-US/docs/Web/API/Window/beforeunload_event
The main use case for this event is to trigger a browser-generated confirmation dialog that asks users to confirm if they really want to leave the page when they try to close or reload it, or navigate somewhere else. This is intended to help prevent loss of unsaved data.
in .net core 6 and above:
GetType().Assembly.GetName().Version.ToString();
or
Assembly.GetEntryAssembly().GetCustomAttribute<AssemblyFileVersionAttribute>().Version
reference to: https://edi.wang/post/2018/9/27/get-app-version-net-core
Modify the configuration in next.config.js or mjs below.
images: {
remotePatterns: [
{
protocol: 'https',
hostname: 'res.cloudinary.com',
pathname: '**',
},
],
},
A few things.
If you want TLS access to Artifactory, the best option is to set up a Nginx server in front of Artifactory (even on the same machine) and have the ssl termination handled by it. Artifactory can generate a nginx config snippet to make this set up very easy. See here: https://jfrog.com/help/r/jfrog-artifactory-documentation/reverse-proxy-settings
Turning on TLS is only if you must have internal TLS communication and is generally not needed.
I want to clarify. You currently have access on 8082 over http? or https? If it is http, then I suspect the access.config.import did not work to enable TLS.
i don't know if this answer will be relevent to you but, i faced the same problem in my code too, hope this might help someone because i was not able to find anything regarding this. my problem was that i was creating the connection in a different directory and trying to get the data from another directory where my main query was written . both this directory had their own mongoose node modules . so due to conflict it was causing this error. so i would recommend to keep all the mongoose related data like connection , queries, models etc in one place that way you wont have to worry about this complications.
The answer was defineSlots
Thanks for all the suggestions. This seems to work well once the attributes are associated: LIST MBR.FILE BY.EXP MBR_NM MBR_UMID MBR_NM MBR_BTH MBR_AGE MBR_SEX MBR_PHONE MBR_GK_BD MBR_GK_ED MCARE_ID PROD_LOB GK_ADJ_CD RPT_PE WHEN ASSOCIATED (GK_CTRCT = "000226827 PCP313" AND GK_ADJ_CD = "" AND PROD_LOB = "MER" AND RPT_PE = "02/01/2025") ID.SUPP BREAK.ON GK_NM HEADER "'LC' Medicare-Risk Roster for 'B' 'LC' PE Date: 02/01/2025"
"With" doesn't seem to work with "Associated" no matter where it's placed in the query. I'm not certain why the 'B' option in the Heading fails to return the Break.On value.
As a last resort, reboot your computer.
No, this feature was enabled in PostgreSQL 17
I have fixed it now... all I needed to do was to reinstall godot-cpp.
I think AccessMode for id field what you were asking
@Schema(accessMode = Schema.AccessMode.READ_ONLY)
You need to allow the needed tags in a custom RTE preset.
Here is how to implement a custom preset:
https://docs.typo3.org/c/typo3/cms-rte-ckeditor/main/en-us/Configuration/Examples.html#how-do-i-create-my-own-preset
And here you can see how to allow the needed html tags in the RTE:
https://docs.typo3.org/c/typo3/cms-rte-ckeditor/main/en-us/Configuration/Examples.html#how-do-i-allow-a-specific-tag
Now, your point about Autoboot and encryption is spot-on. Many embedded devices prioritize convenience and cost over security. Autoboot means the device needs to load the kernel and root filesystem without user interaction—no password prompt, no decryption step. For that to work, the storage typically can’t be fully encrypted, because the bootloader would need a way to access a decryption key automatically. If there’s no secure hardware module (like a TPM or HSM) to store that key—and many cheap embedded systems don’t have one—the key would have to be plaintext somewhere on the device, defeating the purpose. So, yeah, in a lot of cases, the NAND or eMMC is left unencrypted to keep things simple and fast.
That said, some devices could use encryption and still autoboot, but it requires more sophistication. For example, a secure boot chain with a trusted execution environment (TEE) could store keys and decrypt the filesystem transparently. Or the bootloader could pull a key from a fused hardware register (like eFuses or OTP memory) that’s inaccessible after manufacturing. High-end embedded systems—like some automotive ECUs or IoT devices from bigger vendors—might do this. But the average off-the-shelf board or hobbyist-grade hardware? Probably not. It’s too expensive or complex for the use case.
So, what stops an attacker from desoldering and reading the storage? Practically speaking, not much beyond physical effort and know-how. The real barriers are:
If the device isn’t encrypted—and with Autoboot enabled, it probably isn’t—then desoldering gives the attacker everything. The “UART and JTAG disabled = secure” claim is more about reducing low-hanging fruit for casual attackers, not stopping a determined one with physical access. For real security, you’d need encrypted storage, secure boot, and ideally some anti-tamper measures—all of which add cost and complexity most vendors skip unless they’re forced to care.
I think easiest think is to use style attribute.
const [variantColor, setVariantColor] = useState<string | undefined>(""); const colorOptions=["#00FFFF","#FAEBD7","#DC143C"]
{colorOptions?.map((color) => {
return (
<div key={index}
style={{
borderStyle: "solid",
borderColor:
variantColor === color ? ${color} : ${color}50,
}}
>
<div
onClick={() => setVariantColor(color)}
style={{
backgroundColor:
variantColor === color ? ${color} : ${color}50,
}}
/>
);
})
);
})}
Everyone
Option to choose table is good and it work absolutely correct but didn't work correctly when my table header height is too large it just stop printing header from the next page.
I read about this and found the the height of the header to work correctly is about 234 px and above that it will not get printed from the next page this is default behaviour of the browser bit how do I surpass thia I don't want to put and height contrain on my header height
Thank in advance for the solution
As suggested by @Mike M's comment, I had to just add
<size android:width="100dp" android:height="100dp" />
to the drawable to get it working.
Hot off the presses! I realize this question was asked 9 years ago, and finally in January of 2025 searching by metadata is available!
For your Neovim settings.lua: vim.g.netrw_bufsettings = 'noma nomod nu nowrap ro nobl'
If it is searchable pdf file I would suggest using Camelot. If it is not searchable or a scan, I would use Tesseract OCR to extract text from the table. Let me know if it helps or if you need more info regarding either Tesseract or Camelot.
Since I have the same problem I wonder you were able to fix the problem, and if so how :-)
I tried the recommendations, and it's even worse. I had to rewrite the whole thing enter image description here
I found this benchmark on github: https://github.com/porsager/postgres-benchmarks?tab=readme-ov-file
It shows that postgres-js is the fastest postgres driver, but take it with a grain of salt, because its 4 years old.
Follow This: https://learn.microsoft.com/en-us/power-apps/maker/canvas-apps/studio-versions and go back a version.
@LoicTheAztec Sorry, but my client was on a trip and I couldn't test the comments. Can you please send the comment that was deleted?
I did some research and found that the issue was likely due to version conflicts. To resolve it, I uninstalled Angular and reinstalled it globally. Now, everything is working fine.
The issue back again in Spring Boot v3.3.8, Spring v6.1.16, Hibernate ORM core version 6.5.3.Final As a workaround explicitly set a lengh for text column
@Column(name = "name", nullable = false, columnDefinition = "text", length = 2147483647)
private String name;
order_by := case when direction = 'up' then 'asc' else 'desc' end;
Not really a solid solution, but currently just prompt users to verify they’re logged in to X before initiating the OAuth flow. It’s a bug on Twitter’s side that will need to be resolved by them, I guess. Will be happy to here other workarounds on this issue.