instruction stringlengths 0 30k β |
|---|
{"Voters":[{"Id":3832970,"DisplayName":"Wiktor StribiΕΌew"},{"Id":22180364,"DisplayName":"Jan"},{"Id":10248678,"DisplayName":"oguz ismail"}],"SiteSpecificCloseReasonIds":[11]} |
Caused by: org.attoparser.ParseException: Exception evaluating SpringEL expression: "#authentication.principal.username + 'λ'" (template: "test/fragments/nav" - line 10, col 57)
<a th:if="${#authentication.isAuthenticated()}" th:text="${#authentication.principal.username + 'λ'}"></a>
<a th:text="${#authent... |
spring security error Caused by: org.attoparser.ParseException: Exception evaluating SpringEL expression: s |
|oauth-2.0| |
null |
I am using `UIToolbar` and `UINavigationBar`, but for this example I will use `navBarAppearance.backgroundColor = UIColor.black.withAlphaComponent(0.4)` for custom transparency and color. Not sure where the issue lies but the `UINavigationBar` doesn't remain true black while there is no list content behind it. As you c... |
SwiftUI custom UINavigationBar color and transparency |
|ios|swift|swiftui| |
I tried to install coco API in my anaconda environment by giving command:
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
But got an error:
Building wheel for (setup.py) ... error
error: subprocess-exited-with-error
Γ python setup.py bdist_wheel did not run success... |
{"OriginalQuestionIds":[14700889],"Voters":[{"Id":5577765,"DisplayName":"Rabbid76","BindingReason":{"GoldTagBadge":"pygame"}}]} |
ERROR 1064 (42000) in main.mysql: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'END' at line 1
I have this code :
```
CREATE PROCEDURE solution()
SELECT name
FROM leaderboard
ORDER BY score DESC
LIMIT 5 OFFSET 3;
END
``... |
For example, given the inventory
```ini
shell> cat hosts
test_01
test_02
test_03
```
and the files */tmp/fstab* (all the same) for testing
```bash
shell> ssh admin@test_01 cat /tmp/fstab
UUID=423d168c-5a90-44f9-94b2-d2da9f0e1e4f / ext4 errors=remount-ro 0 1
UUID=0F15-7883 ... |
I have terraform module where i am creating two resources based on same condition:
```lang-hcl
length(keys(var.service_name)) > 0
```
```lang-hcl
resource "mapping" "qsm"{
for_each = { for key, value in var.service_name : key=> value if length(keys(var.service_name)) > 0 }
region = each.key
service... |
You could also handle the button inside of a form as a submit button. Add a hidden input for the id of the item. Call the form action from submit and call a server action directly. |
Add Sheets From Excel Table (`ListObject`)
------------------------------------------
[![enter image description here][1]][1]
**Usage**
<!-- language: lang-vb -->
Sub AddSheetsFromListObjectTEST()
Dim wb As Workbook: Set wb = ThisWorkbook ' workbook containing this code
Dim ... |
null |
I am using `Next.js 14` and `next-intl` in my project. I am able to chagne between the languages, but the issue is that every time I change language, `next-intl` navigates me to home page.
lets say I'm in profile page (www.mydomain.com/ru/profile), when I switch the language it navigates me to home page (www.mydomai... |
I just swapped the `google-services.json` and `GoogleService-Info.plist` with editor tooling.
1. Create a folder named `FirebaseAppConfigurations` in the same level as the `Assets` folder.
2. Create subfolders for each environment in `FirebaseAppConfigurations`. In this example, my subfolders would be named `com.my... |
How to ask users location everytime the app is opened |
|android|kotlin|location| |
null |
Well, there not really stored procedures in Access. And if you define one in Access (say with a create store procedure DLL command, then if you open up such a query in Access, you see it is a standard select or update query).
So, say we have this query in Access:
PARAMETERS [@ID] Long, [@FirstName] Text ( 255... |
I solved it with this approach. Works fine.
```ts
import { Injectable } from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { PlaygroundEntity } from 'src/entities/playground.entity';
import { Repository } from 'typeorm';
@Injectable()
export class PlaygroundRepository {
cons... |
You can use indexing and for loop range.
MyList = ["test", "test2", "test3", "test4", "test5", "test6", "test7"]
for i in range(len(MyList)):
print(MyList[i]) # output: [test, test2, test3, test4, test5, test6, test7]
if item == "test7":
i = i - 1
#so if you want to previous... |
How can I use env variables in fastlane for creating the template |
When I submit a job to my self hosted agent, the job will run, however at the end of the job the post-job checkout is hanging for like 12 minutes or so before the job completes and I am not sure why.
I have noticed that I get this behavior even when I don't checkout any repo as part of the pipeline. Any thoughts on... |
Post-Job Checkout Hanging in Azure DevOps Pipelines |
I have this code that works. I was wondering how to implement using
np.lib.stride_tricks.as_strided or avoid loops.
import yfinance as yf
import pandas as pd
import numpy as np
# Fetch Apple stock data
apple_data = yf.download('AAPL', start='2024-01-01', end='2024-03-31')
... |
coco API installation error in anaconda prompt |
|tensorflow|object-detection| |
null |
**Code**
define custom function
def get_result(d):
cond = d['num_1'].gt(d['num_2'])
if cond.sum() > 0:
target = d['num_1'].where(cond).bfill().iloc[0]
else:
df1 = df[df['main'].eq(d['main'].iloc[0])]
s1 = df1['num_2'].where(df1['sub'].e... |
{"Voters":[{"Id":62576,"DisplayName":"Ken White"},{"Id":14732669,"DisplayName":"ray"},{"Id":794749,"DisplayName":"gre_gor"}],"SiteSpecificCloseReasonIds":[18]} |
I ran the ff
`$: cat 7-dump.sql | mysql -uroot -p`
To check if all tables are created, I ran
```echo "quit" | HBNB_MYSQL_USER=hbnb_dev HBNB_MYSQL_PWD=hbnb_dev_pwd HBNB_MYSQL_HOST=localhost HBNB_MYSQL_DB=hbnb_dev_db HBNB_TYPE_STORAGE=db ./console.py```
Summary of Error
...
sqlalchemy.exc.OperationalError: (M... |
Incompatibility error in SQLAlchemy. Is there anything I am doing wrong or haven't done? |
|python-3.x|flask|sqlalchemy| |
null |
|java|cpu-architecture|atomic|memory-barriers|compare-and-swap| |
I tried to install coco API in my anaconda environment by giving command:
pip install git+https://github.com/philferriere/cocoapi.git#subdirectory=PythonAPI
But got an error:
Building wheel for (setup.py) ... error
error: subprocess-exited-with-error
Γ python setup.py bdist_wheel did not run success... |
To use a UDP tracker you must do the following:
Connect, Announce.
Scrape is used for getting data on multiple sample hashes.
- I recommend that you use the same UDP socket for all UDP trackers as it would save bandwidth and ports, typical with other programs like Transmission.
- Note that if you fail to send wh... |
Caused by: org.attoparser.ParseException: Exception evaluating SpringEL expression: "#authentication.principal.username + 'λ'" (template: "test/fragments/nav" - line 10, col 57)
<a th:if="${#authentication.isAuthenticated()}" th:text="${#authentication.principal.username + 'λ'}"></a>
<a th:text="${#authentication.... |
It seems that there is a new variant TO_CHAR(boolean) in Oracle 23c. https://docs.oracle.com/en/database/oracle/oracle-database/23/sqlrf/to_char-boolean.html |
For putting `'` before `s` in all **Jeffs** I tested these two following little different regexes and I got different results by PERL as follows :
perl -pe "s/(?<=\bJeff)(?=s)\b/'/g" myfile.txt
What is difference between `(?<=\bJeff)(?=s\b)` and `\b(?<=\Jeff)(?=s)\b` ?
I mean putting \b inside/outside l... |
Explain lookaround in Regex |
|regex|regex-lookarounds| |
{"Voters":[{"Id":1030169,"DisplayName":"jmoerdyk"},{"Id":522444,"DisplayName":"Hovercraft Full Of Eels"},{"Id":546871,"DisplayName":"AdrianHHH"}],"SiteSpecificCloseReasonIds":[13]} |
I am trying to make a Makefile but keep getting the "Makefile:7: *** missing separator. Stop" error & yes i did use tab instead of whitespaces .
My Makefile is below :
```
CC =gcc
CFLAGS = -I.
DEPS= prog3.h
OBJ= prog3.o
%.o: %.c $(DEPS)
$(CC) -c -o $@ $< $(CFLAGS)
bucketsort: $(OBJ)
$(CC) -o ... |
Makefile:7: *** missing separator. Stop (HELP NEEDED) |
|makefile|terminal| |
As the warning states, you can use an `A` element or other elements that rely on the router API under a Route component.
The problem is that you have an `A` component directly under the `Router` component through the `Header` component but it should be wrapped by a `Route` first. So, you need to move those links und... |
How precise and reliable of an answer do you need, and how much work are you willing to invest into finding it?
- If you just want to run a benchmark and avoid it being affected by other processes on your system, you can use [`std::clock`](https://en.cppreference.com/w/cpp/chrono/c/clock), which only counts the CPU ... |
I had the same problem and I found the simplest way to implement the @IvanSanchez solution.
You just need to make React execute the `<div id="leafletmap">` first, before executing javascript.
To do this, you just need to add the javascript code inside the useEffect hook, because useEffect is asynchronous it will ... |
When running a dry run for a recipe I am getting this error:
>[WARNING] Failed to access maven repository https://maven.java.net/content/repositories/releases
javax.net.ssl.SSLHandshakeException: PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed
>
>Caused by: sun.se... |
Rewrite dry run PKIX path validation failed: java.security.cert.CertPathValidatorException: validity check failed |
as far as I know it is impossible to remove these logs, you can filter in your logcat writing this in find search field:
!D/EGL |
I had the same problem on React JS and I found the simplest way to implement the @IvanSanchez solution.
You just need to make React execute the `<div id="leafletmap">` first, before executing javascript.
To do this, you just need to add the javascript code inside the useEffect hook, because useEffect is asynchron... |
As per a documentation for [Task.async_stream/3](https://hexdocs.pm/elixir/Task.html#async_stream/3),
> When streamed, each task will emit `{:ok, value}` upon successful completion [β¦]
That said, `Task.await/1` has nothing to do with this code. The result of a call to `Task.async_stream/3` would be a `Stream`, an... |
Statement 1 counts all the equal courses. E.g. for student A having a `'Math'` course, it counts all the `'Math'` courses because of the condition in the sub-select `c.class = Courses.class`, where `Courses` denotes the current record of the parent select.
Statement 2 counts all the courses because there is no condi... |
Question: The challenge is to create a program that has the following features
An object-oriented model that uses classes and inheritance
A class that implements an interface
A class that overrides an inherited method
An instance of a class that is initialized with data from a file
A method that demonstrates the u... |
Dart OOP programming |
|dart|oop|angular-dart|dart-pub|dart-html| |
null |
Vim also sports a `:terminal` command. Looking at [`:help :terminal`](https://vimhelp.org/terminal.txt.html#%3Aterminal) will reveal the following information:
```none
:[range]ter[minal] [options] [command]
Open a new terminal window.
If [command] is provided run it as a job and connect
the input and ... |
Doing the aggregation in a transform does work. Example using different data:
```
import altair as alt
from vega_datasets import data
source = data.barley()
base = alt.Chart(source).mark_bar().encode(
alt.Column('site:N',
sort=["Waseca", "Morris", "University Farm",
... |
In your project root, go to <root>/.vscode/launch.json, create if needed.
For program args, and vm args, enter like below:
{
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "My Main",
"request": "launch",
"mainClass": "com.... |
{"Voters":[{"Id":-1,"DisplayName":"Community"}]} |
|sql|timestamp|snowflake-cloud-data-platform|compare|equality| |
I have an SVG that I want to be responsive. I haven't set a width and height attribute because I ideally want it to be automatic. However, Safari doesn't render the SVG correctly without them.
```
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 191 6" preserveAspectRatio="xMinYMid meet">
... |
I'm trying to make a responsive SVG, but it isn't showing on Safari |
|html|svg| |
null |
Delete `.next` folder and re run the project. |
I'm trying to implement in c# PACE PIN general Mapping.
At the end of the protocol, we need to calculate tokens by doing this :
**β’ Derive session keys Kenc and Kmac from Hmap**
**β’ Calculate token: TPICC = MAC(Kmac , PKPCD,map), TPCD = MAC(Kmac, PKPICC,map)**
I have already completed the first point, obtain... |
You can do it using the Alias Loader or the PHP function class_alias from a service provider. Something like:
```php
use Illuminate\Foundation\AliasLoader;
public function boot(): void
{
...
$this->bootAliases();
...
}
private function bootAliases(): void
{
... |
null |
Yes, that's possible. The most straightforward approach would be to zip each file individually into its own associated zip archive with one entry. When any file is modified, you replace its associated zip file to keep all of those up to date. Then you can write a simple program to take a set of those single entry zi... |
I'm trying to implement a slider with a tooltip showing current value. The idea is to make something like a HTML + JS **<input class=range>** with a value bubble (https://css-tricks.com/value-bubbles-for-range-inputs/). Both ideas I've come with so far are not ideal.
XAML
```
<Slider
x:Name="slider1"
... |
{"Voters":[{"Id":6461462,"DisplayName":"M--"},{"Id":2756409,"DisplayName":"TylerH"},{"Id":3744182,"DisplayName":"dbc"}]} |
See example. Recursive assembling expression formula from expression_tree table.
```
with -- recursive -- for PostgreSql
cte as(
select expression_id,oid
,concat(
case when lv in('*','+','-') then concat('[',lid,']')
else cast(lv as varchar) end
,ov
,case when rv in('*','+','-') ... |
I want an SQL query to find all my customers that spent more than > $500 in a rolling period of 24 hours based on their IDs numbers in the month of Jan and Feb. Say example: if a customer bought stuff for **$100, $300, $50, $200**, sale date/s resp **2024-02-13 11:23:23,2024-02-13 13:23:23,2024-02-13 20:23:23, 2024-02... |
I found this code: https://github.com/pixegami/langchain-rag-tutorial/blob/main/create_database.py
It takes the document, splits it into chunks, creates vector embeddings for each chunk, and saves those into Chroma Database. However, the source code uses OpenAI key to create embeddings. Since I don't have access to ... |
How to create vector embeddings using SentenceTransformers? |
|python|openaiembeddings| |
I have created a new service account and attached a custom role. This custom role has the `storage.buckets.get` permission. While using the new service account, I am still getting the following error:
```
Permission 'storage.buckets.get' denied on resource (or it may not exist)
```
What could be the reason? I a... |
Permission 'storage.buckets.get' denied on resource (or it may not exist) |
|google-cloud-storage|gcloud| |
I used to work with Google App Engine Standard Environment with Java 8 runtime for several years, after the end of support, early this year (2024), i've successfully migrated to Java 21 runtime. Since Java 21, i've experienced an error message when a process lasts longer than 30 seconds:
> HTTP ERROR 500 java.util.c... |
Jetty 12 idle timeout limited to 30 seconds when upgrading to Java 21 in Google App Engine Standard Environment |
[RemoteTestNG] detected TestNG version 7.9.0
SLF4J: No SLF4J providers were found.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
(node:19484) Warning: To load an ES module, set "type": "module" in the package.json or use the... |
Server connection issue with appium server |
|testng|appium| |
null |
You were close. Try this:
```
.arrays |= map(select(objects | .name == "foo") .properties = [{type : "foo", url : "bar"}])
```
<sup>[Online demo](https://jqplay.org/s/8St1ZjXvRxn)</sup> |
I used onFocus and it works all text boxes just fine.
$('input[type=text]').focus(function(){ $(this).select() }) |
|python|mongodb|flask| |
I found the answer, the way to do it is as follows:
var bool inBuy1 = false
var bool inBuy1x = false
var int bars_since_sell = na
if not na(bars_since_sell)
bars_since_sell := bars_since_sell + 1
if buy_condition1 and na(bars_since_sell) or bars_since_sell >= 10
... |
Im using IntelliJ On Mac OS.
I have been getting java.lang.StackOverflowError upon building the project.
i think this happened after developing the thread part.. but codes are fine, and tried build on Eclipse at Windows, works good..
ive changed the value for "Shared build process VM options" to **-Xss4m**... |
I came here with a slightly different issue.
My issue was that my ec2 instance was supporting HTTPS with a self-signed certificate and CloudFront was not happy with the certificate.
At first glance, it looked like CloudFront is not happy if the origin is running with self-signed certificates. However, all the doc... |
from ursina import *
data_mesh = ("\\project\\data\\mesh\\")
data_texture = ("\\project\\data\\mesh\\texture\\")
class MyGame(Ursina):
def __init__(self):
super().__init__()
MyMesh()
class MyMesh(Entity):
def __init__(self):
supe... |
{"Voters":[{"Id":6461462,"DisplayName":"M--"},{"Id":5468463,"DisplayName":"Vega"},{"Id":522444,"DisplayName":"Hovercraft Full Of Eels"}],"SiteSpecificCloseReasonIds":[16]} |