Where did you get this captcha image from?
Is it the DNS cache of your hosting provider or the DNS service that you are using? If you are sure that your records in the DNS it could be that just need some time to let the DNS to propagate. How long are you waiting for for it to take place?
I have problems starting up the 2nd magic function for TensorBoard!
It seems to not exist on my environment for some reason!
Is there any alternative?
I am facing the same issue , did you find any solution
try:
GET https://api.linkedin.com/v2/userinfo Authorization: Bearer
bonjour, est ce que tu as trouvé une solution car j'ai trouvé le même problème avec aucun message dans le log? Merciii
I am facing the same issue. Did you find a solution?
Any chance you figured out the solution to this problem ?
I have a similar error message and my app will eventually produce a long error message about the cpu usage and the app will show and message saying "app is no longer responding". It then provides a "close app" or "wait" button option.
The app continues to work however.
i have a similar request, but the dropdown based on a dataverse Table (LookUp). Have you found a solution?
same issues. have you resolved it? thanks.
Try to set in bconsole file ( ex : /etc/bacula/bconsole.conf) the IP address of your server.
Restart the services of fd daemons.
Best regards, Moustapha Kourouma
You already asked about this and got some replies. Did you read them?
emphasized text Money is just money
https://medium.com/@rampukar/laravel-modules-nwidart-install-and-configuration-9e577218555c
Follow this steps it will work you have to enable "wikimedia/composer-merge-plugin" to true
did you get any solution for this? I am facing same issue
same issue, have you resolved it? Thanks.
oh! I need a too! please help me!
It seems that the issue might be related to a JSON file. Could you please provide a screenshot of the error and the relevant logs? This will help us assist you more effectively.
Did you find a solution? because i'm having the same problem.
I think you should set JDK location for JDK which matches your system's version.
Maybe this question will help you: How to set Java SDK path in AndroidStudio?
I'm using zerolog
in a Go application and trying to log errors. However, when I call .Err()
on the logger, the error
field doesn’t show up in the console output. Everything else logs correctly except the error itself.
Here’s how I set up the logger:
var (
once sync.Once
log zerolog.Logger
)
func Get() zerolog.Logger {
once.Do(func() {
zerolog.ErrorStackMarshaler = pkgerrors.MarshalStack
zerolog.TimeFieldFormat = time.RFC3339Nano
var output io.Writer = zerolog.ConsoleWriter{
Out: os.Stdout,
TimeFormat: time.RFC3339,
FieldsExclude: []string{
"user_agent",
"git_revision",
"go_version",
},
}
var gitRevision string
buildInfo, ok := debug.ReadBuildInfo()
if ok {
for _, v := range buildInfo.Settings {
if v.Key == "vcs.revision" {
gitRevision = v.Value
break
}
}
}
logLevel := int(zerolog.InfoLevel)
log = zerolog.New(output).
Level(zerolog.Level(logLevel)).
With().
Stack().
Caller().
Timestamp().
Str("git_revision", gitRevision).
Str("go_version", buildInfo.GoVersion).
Logger()
zerolog.DefaultContextLogger = &log
})
return log
}
Then, in a route handler, I use the logger like this:
l = logger.Get()
reqIDRaw := middleware.GetReqID(r.Context())
l.Warn().
Str("requestID", reqIDRaw).
Str("method", r.Method).
Str("url", r.URL.Path).
Err(errors.Wrap(err, "bad request")).
Msg("bad request")
2025-02-24T10:02:35+03:00 WRN internal/services/response/error_response.go:43 > bad request method=POST requestID=Kengos-MacBook-Pro.local/0hS9QB33oG-000001 url=/v1/auth/register
The error
field is completely missing from the output, even though I passed it with .Err()
.
I’ve tried adding FormatFieldName
to the ConsoleWriter
, but it still doesn’t show:
FormatFieldName: func(field string) string {
if field == "error" {
return field
}
return field
},
I also tried using FormatFieldValue
, but no luck.
I’d like the log output to include the error, like this:
error=bad request: some detailed error message
What am I missing? How do I make zerolog
actually show the error field in console output?
Did you find your answer ?????
im getting the same problem, could you let me know how you overcame this issue please
do self content center may be it work
I found this on the Pythonanywhere forums: https://www.pythonanywhere.com/forums/topic/13776/#id_post_105423
This should resolve the issue
Can you please share meta-tag
< meta http-equiv="Content-Security-Policy" content="script-src 'self' http://localhost:3000; object-src 'none';">
Add If anything missed for your local dev.
So have you fixed it? Going through same problem.
As you can see in the documentation: GitHub Repo, Service Bus emulator isn't compatible with the community owned open source Service Bus Explorer...
I have the same problem as you. There is the possibility of using our own SQL server (and not using the default SQL Edge version, which will be deprecated in September 2025). I'm looking into the possibility of performing SQL queries directly in order to retrieve messages, but I haven't succeeded yet...
It doesn't work for me. The "Format on save" is already disabled in the first place
for those who tried all the solutions above but no luck, try to change the ownership of the installation folder to your account, it should work. I guess this permission things block some features in sql installation.
bro i am facing same problem can you help me
Can you please share the full implementation of the createBook function with the latest data so that I can analyze the error and provide you with a solution?
nvidia-smi Failed to initialize NVML: GPU access blocked by the operating system I had all cuda and drivers installed . dmesg show a red tip: PCI: Fatal: No config space access function found Is it the problem?
please help double check that you're signed in to a tenant that has sideloading enabled. Once 'Custom App Upload' is enabled, it may take some time before this setting take effects. Let me know if you have any questions.
Click for more information. dastyarkomak https://B2n.ir/e50160
I have the same issue did you could solve it?
I am new to the concept of two wheeled vehicles, so I started with a Kawasaki H2.....
Starting with your client, how do you know your kill()s are working?
If the mysterious check_arguments
() returned garbage, how would you know?
Does the mysterious init_signal
() actually work? How do you know?
Also, in your server, how do you know your kill()s are working?
Those are implementation basics; and you need to cross them out.
Next is, are you working on a flawed concept?
You are relying on signal queuing maintaining time order, which is an assumption worth examination. I think it is fair game for signals to be prioritized by identity; so if there are 4 queued signals for SIGUSR1 and 5 for SIGUSR2, the order you might observe them could be: 1,1,1,1,2,2,2,2,2 or 1,2,1,2,1,2,1,2,2 or 1,1,2,2,1,1,2,2,2
Even if you work out the strategy used by your particular implementation (linux a.b.c.d) might change it on a whim.
The H2 is a notoriously difficult bike to ride; yet was quite popular.
Asynchronous communication is notoriously difficult. Understanding why is an important exercise.
"Check this answer. It solves the problem when adding a watch app:"
I reviewed the docs (https://learn.microsoft.com/en-us/aspnet/core/blazor/components/render-modes?view=aspnetcore-9.0#apply-a-render-mode-to-the-entire-app) and apparently had to add @rendermode="InteractiveServer"
to the Routes
and HeadOutlet
elements in App.razor
. I'm not entirely sure why this fixed it since my .razor was already using @rendermode InteractiveServer
locally. Perhaps the rendermode needed to be set globally like that to support MudBlazor's components too? Not sure.
for me the link below is working npx --yes @react-native-community/cli@next init --version "latest"
ref
https://microsoft.github.io/react-native-windows/docs/getting-started
I followed @5ton3's approach of removing .gcloudignore from and adding the virtual env dir. to .gcloudignore. It also worked strangely enough.
no troll why does my brick look like this?
from ursina import *
from ursina.prefabs.first_person_controller import FirstPersonController
app = Ursina()
player = FirstPersonController()
ground = Entity(model='plane', texture='grass', scale=20, collider='box')
house = Entity(model='cube', texture='brick', scale=2, collider='box')
app.run()
I have same issue in chorma only. I reslove this issued by Reactime26.1 extension use in react when i make it disabled its sloved the error i hope some one help
Did you get any answer for this problem. Even i have a similar issue where i want to know which test case is covering a particular scenario , which is essentially a bug.
I want to Add Camera preview to my project ,but not in Xcode I want to do it on Swift play ground, can anyone guide me thru it ?
Having the same problem, did you ever get this resolved?
Please can you give me the link where to find the Growatt API documentation
Please don’t react to these offer.
Exactly same issue, any solutions to this?
they removed the dl link, 2025 week 8
I'm getting the error the question author says, but I'm not getting the error in the logs pointed here: https://code.visualstudio.com/docs/editor/settings-sync#_troubleshooting-keychain-issues. I followed your approach, but I have gnome-keyring running, I installed sudo apt install libsecret-1-0 libsecret-1-dev
, and "security.workspace.trust.enabled"
was already true. But I'm still getting the same error when trying to login to GitHub.
don’t react to these offer please.
did you solve the problem? i m facing the same issue when googling from digital ocean droplet. got 403. On terminal works
Comment saisir un dropdown au clavier sur smartphone? Cordialement
If you wants to load llama model locally , you can check out this article where proper steps are mentioned.
اسم رب الأسرة رباعغ عدلي علي احمد بشارة ،تاريخ الميلاد17/11/1994 شمال دارفور الفاشر السكن/الحي النخيل الرقم الوطني 19209321512،الهاتف +24990524507 عدد أفراد الأسرة 2،زوجةحاملة نعم،عدداطفال أقل من6اشهر لايوجد،عدداطفال أقل من 5اشهر لايوجد ،رقم بنكك2798117 , إسم صاحب رقم الحساب عدلي علي احمد بشارة ،رقم وطني صاحب الحساب 19209321512
Any update on this? I am facing the same issue. Happens only for certain regions (numbers with certain country code - in my case Libyan numbers) and works as expected for numbers with other country codes.
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.
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.
Файл написан кириллицей та же ошибка, надо переименовать в латиницу
Anyone now if it is possible to get the click callback link on this windows toast notification ?
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
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 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.
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.
I jave just found prop-types are no longer validated in React 19.
The crash in iOS 12 is solved by setting the Optimization Level from "Optimize for Speed" to "No Optimizaiton"
facing same issue! did you find solution for this?
The answer was defineSlots
As a last resort, reboot your computer.
I have fixed it now... all I needed to do was to reinstall godot-cpp.
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
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
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?
It might be bugged in an update process by Microsoft, creating a new environment pointing to the newest version allows me coding again:
I'm also getting the same error. Can anyone help me with this issue to resolve?
The "pkceCodeVerifier value could not be parsed" issue occurs when a user accepts an invitation. However, for normal sign-in or sign-up, it works fine.
I have created a regular app in Auth0 and also set all the required URLs.
Below is the code for the NextAuth configuration file and provider configuration for Auth0:
const authConfig = {
debug: true, // Enabled because we are in development
providers: [
Auth0Provider({
clientId: process.env.AUTH0_CLIENT_ID,
clientSecret: process.env.AUTH0_CLIENT_SECRET,
issuer: process.env.AUTH0_ISSUER,
authorization: {
params: {
prompt: "login",
},
},
}),
],
adapter: DrizzleAdapter(db, {
usersTable: users,
accountsTable: accounts,
sessionsTable: sessions,
verificationTokensTable: verificationTokens,
}),
callbacks: {
async signIn({ user, account, profile }: ISigninAuth0) {
const updates: IUpdateUser = {};
if (profile?.email_verified && !user?.emailVerified) {
updates.emailVerified = new Date();
}
if (Object.keys(updates).length > 0) {
await updateUserByEmail(user.email!, updates);
}
return true;
},
session: async ({ session, user }) => {
const userData = await getUser(user.id);
if (!userData) {
throw new Error("User data not found");
}
return {
...session,
user: {
id: user.id,
...{
name: userData.name,
email: userData.email,
emailVerified: userData.emailVerified,
}
},
};
},
},
trustHost: true,
} satisfies NextAuthConfig;
const { auth: uncachedAuth, handlers, signIn, signOut } = NextAuth(authConfig);
const auth = cache(uncachedAuth);
export { auth, handlers, signIn, signOut };
Organization admin invites user to join the organization by using Auth0 management API.
POST /api/v2/organizations/{id}/invitations
Body: {
"inviter": {
"name": "string"
},
"invitee": {
"email": "[email protected]"
},
"client_id": "string",
"user_metadata": {},
"ttl_sec": 0,
"roles": [
"string"
],
"send_invitation_email": true
}
The user receives an email with a link to join the organization. The user clicks on the link (which looks like https://example.com/api/authorize?invitation={invitation_id}&organization={organization_id}) and is redirected to our website.
There, we extract the invitation_id and organization_id from the query params and generate a new invitation link with the following code:
const baseUrl = `https://myauth0domain.com/authorize`;
const url = new URL(baseUrl);
url.searchParams.append("response_type", "code");
url.searchParams.append("client_id", clientId);
url.searchParams.append("redirect_uri", redirectUri);
url.searchParams.append("invitation", invitation);
url.searchParams.append("organization", organizationId);
url.searchParams.append("scope", "openid profile email");
const finalUrl = url.toString();
return NextResponse.redirect(new URL(finalUrl as string, baseURL));
The user is then redirected to the Auth0 login page, and after successful login, the user is redirected back to our website with the code in the query params. However, I get the error "pkceCodeVerifier can not be parsed," and the user is not logged in. I have checked the logs in Auth0, and all logs are fine. I'm using the regular Auth0 application, and the pkceCodeVerifier flow is handled by Auth0 itself in regular application.
I have also passed the code challenge, code challenge method, and state in the URL but am still getting the same error. Below is the code for the same:
Ref to create code verifier and code challenge: https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow-with-pkce/add-login-using-the-authorization-code-flow-with-pkce#create-code-verifier
// code verifier
function base64URLEncode(str: any) {
return str.toString('base64')
.replace(/\+/g, '-')
.replace(/\//g, '_')
.replace(/=/g, '');
}
const verifier = base64URLEncode(crypto.randomBytes(32));
// code challenge
function sha256(buffer) {
return crypto.createHash('sha256').update(buffer).digest();
}
const challenge = base64URLEncode(sha256(verifier));
url.searchParams.append('code_challenge', challenge);
url.searchParams.append('code_challenge_method', 'S256');
url.searchParams.append('state', state);
I have also tried to set the cookie options in the NextAuth configuration file but am still getting the same error. Below is the code for the same:
cookies: {
pkceCodeVerifier: {
name: "authjs.pkce.code_verifier",
options: {
httpOnly: true,
sameSite: "none",
path: "/",
secure: true, // Set to true in production
},
},
},
I have also added the code verifier in the cookies below is the code
const baseUrl = `https://myauth0domain.com/authorize`;
const url = new URL(baseUrl);
url.searchParams.append("response_type", "code");
url.searchParams.append("client_id", clientId);
url.searchParams.append("redirect_uri", redirectUri);
url.searchParams.append("invitation", invitation);
url.searchParams.append("organization", organizationId);
url.searchParams.append("scope", "openid profile email");
const finalUrl = url.toString();
const response = NextResponse.redirect(new URL(finalUrl as string, baseURL));
const cookieOptions = {
httpOnly: true,
secure: false,
maxAge: 900, // 15 minutes
path: '/',
};
response.headers.set(
'Set-Cookie',
serialize('authjs.pkce.code_verifier', verifier, cookieOptions)
);
return response
Simple signUp/signIn Works fine but when I try to log in with the invitation link then i get the error.
in later version there is a thing called sync project that should resolve it enter image description here
Did you figure out a solution for this? If yes can you please share it here? thanks
Somebody has been tested this on a repeatable field?
Thank you very much. I found that error was because I needed to have the compatible version between React/Chakra. I finilly used the 18.2.2 version React and 2.8.0 Chakra version.
How can I have all the programmed code together?
simply you can visit - https://base64pdf.com and you can convert your base64 to pdf and pdf to base64 data uri here you can also decode encode pdf files. base64pdf
Please explain your question? Are you trying to change default.xml and use yaml or anything else.
This is currently not possible as default.xml and other xml files are for keeping the configurations.
But if you want to change json or yaml input in request body to any other form like xml that is possible with an use JavaScript, transformers like xml transformer etc. for this.
You can respond to this thread with explanation. Feel free to contact.
This issue has been fixed in Flutter 3.29.0, which was released to the stable channel. https://github.com/flutter/flutter/issues/160442#issuecomment-2627839218
I'm also getting the same error. Can anyone help me with this issue?
The "pkceCodeVerifier value could not be parsed" issue occurs when a user accepts an invitation. However, for normal sign-in or sign-up, it works fine.
I have created a regular app in Auth0 and also set all the required URLs as referenced in the screenshot below.
I have also set the type of users in the Auth0 application.
Below is the code for the NextAuth configuration file and provider configuration for Auth0:
const authConfig = {
debug: true, // Enabled because we are in development
providers: [
Auth0Provider({
clientId: process.env.AUTH0_CLIENT_ID,
clientSecret: process.env.AUTH0_CLIENT_SECRET,
issuer: process.env.AUTH0_ISSUER,
authorization: {
params: {
prompt: "login",
},
},
}),
],
adapter: DrizzleAdapter(db, {
usersTable: users,
accountsTable: accounts,
sessionsTable: sessions,
verificationTokensTable: verificationTokens,
}),
callbacks: {
async signIn({ user, account, profile }: ISigninAuth0) {
const updates: IUpdateUser = {};
if (profile?.email_verified && !user?.emailVerified) {
updates.emailVerified = new Date();
}
if (Object.keys(updates).length > 0) {
await updateUserByEmail(user.email!, updates);
}
return true;
},
session: async ({ session, user }) => {
const userData = await getUser(user.id);
if (!userData) {
throw new Error("User data not found");
}
return {
...session,
user: {
id: user.id,
...{
name: userData.name,
email: userData.email,
emailVerified: userData.emailVerified,
}
},
};
},
},
trustHost: true,
} satisfies NextAuthConfig;
const { auth: uncachedAuth, handlers, signIn, signOut } = NextAuth(authConfig);
const auth = cache(uncachedAuth);
export { auth, handlers, signIn, signOut };
Organization admin invites user to join the organization by using Auth0 management API.
POST /api/v2/organizations/{id}/invitations
Body: {
"inviter": {
"name": "string"
},
"invitee": {
"email": "[email protected]"
},
"client_id": "string",
"user_metadata": {},
"ttl_sec": 0,
"roles": [
"string"
],
"send_invitation_email": true
}
The user receives an email with a link to join the organization. The user clicks on the link (which looks like https://example.com/api/authorize?invitation={invitation_id}&organization={organization_id}) and is redirected to our website.
There, we extract the invitation_id and organization_id from the query params and generate a new invitation link with the following code:
const baseUrl = `https://myauth0domain.com/authorize`;
const url = new URL(baseUrl);
url.searchParams.append("response_type", "code");
url.searchParams.append("client_id", clientId);
url.searchParams.append("redirect_uri", redirectUri);
url.searchParams.append("invitation", invitation);
url.searchParams.append("organization", organizationId);
url.searchParams.append("scope", "openid profile email");
const finalUrl = url.toString();
return NextResponse.redirect(new URL(finalUrl as string, baseURL));
The user is then redirected to the Auth0 login page, and after successful login, the user is redirected back to our website with the code in the query params. However, I get the error "pkceCodeVerifier can not be parsed," and the user is not logged in. I have checked the logs in Auth0, and all logs are fine. I'm using the regular Auth0 application, and the pkceCodeVerifier flow is handled by Auth0 itself in regular application.
I have also passed the code challenge, code challenge method, and state in the URL but am still getting the same error. Below is the code for the same:
Ref to create code verifier and code challenge: https://auth0.com/docs/get-started/authentication-and-authorization-flow/authorization-code-flow-with-pkce/add-login-using-the-authorization-code-flow-with-pkce#create-code-verifier
// code verifier
function base64URLEncode(str: any) {
return str.toString('base64')
.replace(/\+/g, '-')
.replace(/\//g, '_')
.replace(/=/g, '');
}
const verifier = base64URLEncode(crypto.randomBytes(32));
// code challenge
function sha256(buffer) {
return crypto.createHash('sha256').update(buffer).digest();
}
const challenge = base64URLEncode(sha256(verifier));
url.searchParams.append('code_challenge', challenge);
url.searchParams.append('code_challenge_method', 'S256');
url.searchParams.append('state', state);
I have also tried to set the cookie options in the NextAuth configuration file but am still getting the same error. Below is the code for the same:
cookies: {
pkceCodeVerifier: {
name: "authjs.pkce.code_verifier",
options: {
httpOnly: true,
sameSite: "none",
path: "/",
secure: true, // Set to true in production
},
},
},
I have also added the code verifier in the cookies below is the code
const baseUrl = `https://myauth0domain.com/authorize`;
const url = new URL(baseUrl);
url.searchParams.append("response_type", "code");
url.searchParams.append("client_id", clientId);
url.searchParams.append("redirect_uri", redirectUri);
url.searchParams.append("invitation", invitation);
url.searchParams.append("organization", organizationId);
url.searchParams.append("scope", "openid profile email");
const finalUrl = url.toString();
const response = NextResponse.redirect(new URL(finalUrl as string, baseURL));
const cookieOptions = {
httpOnly: true,
secure: false,
maxAge: 900, // 15 minutes
path: '/',
};
response.headers.set(
'Set-Cookie',
serialize('authjs.pkce.code_verifier', verifier, cookieOptions)
);
return response
SignUp/SignIn flow Screenshot:
Invitation Screenshot:
Simple signUp/signIn Works fine but when I try to log in with the invitation link then i get the error.
It looks like it's not possible to edit the main.go file location so I am going to try change the docker file
RUN CGO_ENABLED=0 GOOS=linux go build -o main ./cmd/myapp/
I still get the same error
=> [builder 5/6] COPY . .
2.3s => ERROR [builder 6/6] RUN CGO_ENABLED=0 GOOS=linux go build -o main ./cmd/myapp/
13.7s
[builder 6/6] RUN CGO_ENABLED=0 GOOS=linux go build -o main ./cmd/myapp/: #13 13.28 stat /app/cmd/myapp: directory not found
I don't understand at all I. Andrea wisnesneski ur saying Ed wins what did ed win??e told me no one told me situation if it's about inherent then I would of did whatever needed to be done or if it had anything to do with child I would of done anything that needed to be done but because I wasn't informed of anything how is it far Ed wins???
Did you find anything related to this?? I am facing the exact same issue and was hoping for some help as I have been researching for days about this.
Why does everyone put "x" after the "Lamda" part of the formula?
LAMBDA(x; SUM(x)
What goes in leu of the x's?
Thx,
dgDG
I have same issue. Need to pass context in {children} and my context is also in CamelCase but no luck still undefined,
return (
<GoogleOAuthProvider clientId={clientID}>
<ProfileContext.Provider value={Profile}>
<html lang="en">
<body className={`${Font.variable}`}>
<Navbar />
{children}
<Footer />
<ProgressBar />
<button className={`scrollToTopButton ${isVisible ? "visible" : ""}`} onClick={scrollToTop}>
<FontAwesomeIcon icon={faAngleUp} style={{ width: "22px", height: "32px" }} />
</button>
</body>
</html>
</ProfileContext.Provider>
</GoogleOAuthProvider>
)
}
"use client"
// import Form from "next/form "
import { useState, useEffect, useContext } from "react"
import Button from "../Components/Button"
import ProfileContext from "../layout"
export default function Contact() {
const [name, setName] = useState()
const [email, setEmail] = useState()
const [message, setMessage] = useState()
const [mobile, setMobile] = useState()
const [service, setService] = useState()
const [isSubmitted, setiSSubmitted] = useState(false)
const [isLoading, setIsLoading] = useState(false)
const value = useContext(ProfileContext)
async function HandleSubmit(e) {
setIsLoading(true)
e.preventDefault()
let body = {
cred: process.env.NEXT_PUBLIC_CRED,
email: email,
mobile: mobile,
when: new Date().toLocaleDateString(),
message: message,
name: name,
service: service,
}
let res = await fetch("/api/contact", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify(body),
}).then(function (response) {
console.info(response)
setIsLoading(false)
setiSSubmitted(true)
})
}
console.log(value)
Importing context in another component gives undefined. I don't need to switch to app router, any other solution you guys found ?
I got it :) I just had to remove the fixed width and ONLY have a max-width and min-width
how do I set home-brew thing I know nothing about terminal and what is ~/.bashrc or ~/.zshrc help pls
Error 4003: Media Codec VideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.64001F, 1284070, null, [1280, 720, 25.0, ColorInfo (Unset color space, Unset color range, Unset color transfer, false, 8bit Luma, 8bit Chroma)], [-1, -1]), format_supported=YES???
can you please provide the solution for attachment of pkcs7 signature for multiple signature appearances so,that the same signature appearance appears on all pages in a customized location.