instruction stringlengths 0 30k ⌀ |
|---|
|spring-boot|apache-kafka|junit|embedded-kafka| |
When I try to fetch from a query on a single table I get an associated array where Key is a name of column. But when I try to `JOIN` another table's columns on a query I get an array which only contains a key 'row' and a string value which looks like
`(value1,value2,value3,...,valueN)`, without column names.
How do... |
Your first understanding is right with:
heroes = HEROES
Now:
heroes : Hero [ ];
Here `Hero` represents a class which holds certain properties. By this line, you are telling the TypeScript compiler that the `heroes` variable will hold a list of objects having type of `Hero` (custom or user defined t... |
You have no read access to /mnt/media_rw.
All files access has no effect on it. |
Pass column name to lpSolve obj from drop down.
OptTotal total is a column name for optimisation, I would like a drop down box to select which column to optimise against but can not figure it out.
obj <- rv$products$OptTotal
I would like something like the below
obj <- rv$products$get(Input$ColumnNa... |
Pass column name to lpSolve obj from drop down |
|r|shiny|lpsolve| |
```
node:9720) [DEP0170] DeprecationWarning: The URL http://proxy.example.com:port is invalid. Future versions of Node.js will throw an error.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:5040) [DEP0170] DeprecationWarning: The URL http://proxy.example.com:port is invalid. Future ... |
NPM packages installation error - it's not only about vite it's same problem during installing any packages |
I would like to mutate a column in a df (1), based off a data in df (2) in relation to the data that exist in both df (1) and (2). Like join function.
So I have this dataframe (df):
```
df <- structure(list(orientasi = c("gay", "gay", "gay", "gay", "gay",
"gay", "gay", "gay", "gay", "gay", "gay", "gay", "gay... |
If exist a way to migrate project developed in Android Studio to MAUI?
I would like that all activities, resources and android code will be placed into MAUI project structure. |
|php|html|wordpress|woocommerce|dokan| |
null |
Color pulse broken on linear gradient. How to fix "@keyframe" to pulse background of a button? |
By default, Pillow will place the ***top-left*** corner of your text at the coordinates you specify with `ImageDraw.text()`. But you seem to want the text placed so that its horizontal middle and vertical middle are placed at the location you specify. So, you need to set the horizontal and vertical anchor to *"middle"*... |
It means that you need to pass the pointer `a` defined in `main` to the function `fn` by reference. In C passing by reference means passing an object indirectly through a pointer to it. Thus dereferencing the passed pointer the function will have a direct access to the object pointed to by the pointer and can change it... |
I need some brainstorming on this issue. So the problem is I have a list of urls and they are all news articles. I need to scrape the published date of the news articles. The problem is that only a few of them articles have a date written in date tag in html and most of them has date written in different tags. Now I am... |
I'm trying to convert a date field to a format that represents the number of days since 1999. I want to convert 03-25-2024 to 45376 like the General cells format in MS Excel. I've tried converting the date to an int, get error message, converting/casting date to vchar and then converting to int.
Here are some samples ... |
Convert SQL Table date field to numeric value for days since 1999 like Excel |
|sql| |
For anyone else getting this API error code and unresolved by correcting/verifying permissions issues, note that header values are case-sensitive: a lowercase `bearer <token>` will produce error 250002 from UPS, whereas `Bearer <token>` should succeed if all else is good to go. |
|pine-script|pine-script-v5| |
> The [`ValueFromPipelineByPropertyName`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_functions_advanced_parameters?view=powershell-7.4#valuefrompipelinebypropertyname-argument) argument indicates that the parameter accepts input from a property of a pipeline object. The ob... |
I was able to get it to work:
indicator('GT Pivot Lines', shorttitle='GT Pivots Lines', overlay=true)
lenH = input.int(title='Length High', defval=50, minval=1)
lenL = input.int(title='Length Low', defval=50, minval=1)
fun(src, len, isHigh, _style, _yloc, _color) =>
p = nz(src... |
ta,pivothigh and ta.pivotlow will plot labels on pivot points, but I would rather draw hlines on the pivot prices. I tried modifying the standard script thus:
```
//@version=5
indicator("Pivot Lines", max_lines_count=500, overlay=true)
leftBars = input.int(50)
rightBars=input.int(50)
ph=float(na)
pl=float(n... |
I see this message in log file of windows
`mks-vmdb vmdb requested a screenshot svga mkssecreenshotmgr taking a screenshot `
Anyone have explanation for this log
And i need to know if could this related to any suspicious activity
Thanks for the explanation |
mkssecreenshotmgr taking a screenshot |
|windows|operating-system|vmware| |
null |
Look below.
**Problem :-**
```javascript
<Link to={`/product/${product._id}`}> {/* here we are using link in place of a & to in place of href */}
```
Given links point to `/product/${product._id}`. But in django you don't have urls that start with `/product`. You only have urls star... |
When managing sessions using spring-session-data-redis, I think the session ID is returned in a cookie named SESSION.
(FYI:https://spring.pleiades.io/spring-session/reference/guides/boot-redis.html)
I would like to perform some processing using the session ID returned by a cookie, but I don't know how to obtain t... |
Finally, I've found a solution to this problem without utilizing the redirect and refreshListenable properties of GoRouter.
The concept involves creating a custom redirection component. Essentially, authStateChanges are globbally listened, and upon any change in AuthenticationState, we navigate to our redirection co... |
In EF terms it seems like it could just be:
var d = db.Users
.OrderByDescending(u => u.Xp)
.AsEnumerable()
.Select((u, i) => new { Rank=i+1, User = u })
.ToDictionary(at => at.Rank);
You list all your users out of the DB in order of XP, and you use the overload of `Select((user,ind... |
Using a same-named element (such as your `name` example) as a child of two ***different*** parent elements such as `person` and `car` is natural and fully supported by XML and its related standards:
- DTD supports it:
```
<!DOCTYPE people_list [
<!ELEMENT person (name, age)>
<!ELEMENT car (... |
While using Gemini API, we need to take care of SAFETY Settings. These settings are used to avoid dagenrous/inappropriate being delivered. You can add these like below
from google.generativeai.types import HarmCategory, HarmBlockThreshold
model = genai.GenerativeModel(model_name='gemini-pro-vision')
... |
I have stuck with a pretty simple problem - I can't communicate with process' stdout.
The process is a simple stopwatch, so I'd be able to start it, stop and get current time.
The code of stopwatch is:
```python
import argparse
import time
def main() -> None:
parser = argparse.ArgumentParser()
par... |
Here's a better and more general way to handle this. In addition, it won't strip out "#" that are in the middle of a string, as yours would. This relies on the fact that a ### header must be followed by a space.
```
function render(md){
let code = "";
let mdLines = md.split('\n');
for(let i = 0; ... |
**I fixed it**
I realized CMake was breaking it. I uninstalled it and it fixed it. WEIRD? |
I accessed functions.php file in wordpress folder and commented out the last section of my code which is to return JSON response. After saving the file, I accessed the file on Wordpress and managed to continue editing it!!!! |
I have a login which works through Firebase, I am implementing the logic so that the email is verified after creating the account[enter image description here](https://i.stack.imgur.com/1qGPD. jpg)mail arrives successfully [enter image description here](https://i.stack.imgur.com/4Tmke.jpg) and is verified successfully.... |
As noted in the comments, an `awk` solution is simple.
For example:
```
awk '!index($0,q) || ++c>n' n=3 q=please "$filename"
```
---
It is not very convenient to try to count with `sed`, although it is possible. Parameterising arguments is also complicated.
Ignoring both those issues, here is a sed scrip... |
You want to modify `n` value itself, not the data pointed by it.
So
* `fn` prototype should be `void fn(char ** n)`
* the assignment should be `*n = b` or better ` n* = strddup (...);`
* the call sholud be `fn(&a);` |
**update 2024**, remove any style you have in the `thead` tag and give those style to the tr inside `thead` to make the code below work:
.table-responsive thead > tr {
display: table-row; /* Revert to default display value */
position: sticky; /* Fix the position of the table header */
top:... |
|php|wordpress|woocommerce|custom-wordpress-pages|dokan| |
Although I am experienced developer, I am very new to mobile app. I am wondering if it is possible to create application which will communicate between devices from Family Link group.
In principle my requirement is to create application integrated between mine and kids devices. However I would like to avoid classic ... |
Is there a way to use Family Link group in my own application? |
|mobile|client-server| |
|php|wordpress|woocommerce|custom-wordpress-pages|dokan| |
I would use a simple loop:
```
out = (np.array([mapping[l] for l in
map(tuple, input_array.reshape(-1, 2))])
.reshape(input_array.shape[:-1])
)
```
Or, if you expect many duplicated values, you could reduce the mapping step to the unique values, although the bottleneck being `np.u... |
[enter image description here](https://i.stack.imgur.com/MkbCI.png)
I'm beginning C. I tried to print "helloworld" but it has error
I used visual studio code(Mac). installed C/C++,Code runner
I just follow the C lecture, but occurred error.
anyone know solution this error?
error message = ld: Undefined ... |
i like to get the parameters of running java process running inside pod
when bash ssh inside the container i cant do
bash-4.4$ ps
bash: ps: command not found
also looping thorw all proc's give me to much proceess ids with no hint regarding the java process
im doing it using this :
for di in ... |
How to get java running parameters from spring boot running inside container in pod where no ps exist |
|java|docker|kubernetes|process|pods| |
I have to work with the learning history of a Keras model. This is a basic task, but I've measured the performance of the Python built-in min() function, the numpy.min() function, and the numpy ndarray.min() function for list and ndarray. The performance of the built-in Python min() function is nothing compared to that... |
I want to break the ternary operator into separate lines like this:
```
first < second
? return 1
: return 2
```
But the SwiftLint configurations always tries to add extra indentation like this:
```
first < second
? return 1
: return 2
```
I want to stop this default behaviour and tried the follow... |
I'm able to run the query without running into any issues. Test code I ran in BigQuery below. Perhaps there aren't any Processing_Method equal to 'Natural/Dry.' You can try a wildcard search and use NORMALIZE_AND_CASEFOLD(Processing_Method) like in example 2.
WITH
a AS (
SELECT
'Natural/Dr... |
To bypass the error message, I've accessed functions.php file in wordpress folder and commented out the last section of my code which is to return JSON response.
After saving the file, I accessed the file on Wordpress and managed to continue editing it!!!! |
If you use NPOI in C#, you can write code like below:
var imageRun = paragraph.CreateRun();
using (FileStream picData = new FileStream(imagePath, FileMode.Open, FileAccess.Read))
{
imageRun.AddPicture(picData, (int)NPOI.XWPF.UserModel.PictureType.PNG, imag... |
how to migrate native android studio project to MAUI? |
|maui| |
I'm using **Auto** mode in Blazor Web App. I tried to use `Authentication` and `Authorization` in the server project. But I cannot use authorization in the client project. I want to add `<AuthorizeView>` tag in some components exist in the client project. This tag is unknown in the client project. How can I use `<Autho... |
Shows server is started at port 5500 but do not pop up the web browser.
I tried every possible way to fix the problem but none helps out even gone through so many videos and tried but none worked.
|
Live server extension in VS Code works in background but do not pop the web browser |
|visual-studio-code| |
Application migrated from Spring 5 to String 6 and JDK 1.8 to 17.
We are getting the following exception while starting the application in Azure.
`2024-03-31T10:33:10 PID[6060] Error Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.security.web.Secur... |
Issue while deploying Java Spring 6 application in Azure app service |
|java|spring|azure|appservice| |
null |
I'm trying to connect to a nodejs socket.io server with c# using [this Client-CSharp](https://github.com/doghappy/socket.io-client-csharp) solution.
And it connects when im using only "http"-protocol and NOT use `hostname`-argument in listen method.
I use an SSL certificate and I get a 404 error for http requests (... |
Socket.io nodejs server .NET connection |
|node.js|.net|websocket|socket.io| |
null |
How can i code in openpyxl for draggin formula filled down, similarly copy and paste values?
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
You've used `struct Square` where you should have used `struct square` in the `Box` definition. Corrected:
```c
typedef struct box {
struct square** squares; /* array of Squares */
// ^
int numbers;
int possible[9];
int solvable;
struct box* next; // box, not Box
} Box;
```
Anot... |
Creating custom history back and forwards buttons using a React hook |
|reactjs|react-hooks|react-router-dom|browser-history|html5-history| |
{"OriginalQuestionIds":[72241230],"Voters":[{"Id":882003,"DisplayName":"john"},{"Id":12002570,"DisplayName":"user12002570","BindingReason":{"GoldTagBadge":"c++"}}]} |
|byobu| |
As of pg8000 1.31.0, by default an [SSL connection will be attempted][1] using lenient settings, so it should work in the same way as psycopg.
[1]: https://github.com/tlocke/pg8000#connect-to-postgresql-over-ssl |
I've tried everything, it seems to me. But it always gives me error "Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured."
These are my pom.xml and application.properties files.
```
...
<properties>
<project.build.sourceEncoding>UTF-8</pro... |
Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. I'm using Postgresql |
|spring|spring-boot| |
null |
I think this is what you are looking for :
https://fractalideas.com/blog/making-react-and-django-play-well-together-hybrid-app-model/
It uses whitenoise and collectstatic
The idea here is that you can build your React app, and once built, HTML is served as template by Django, and Whitenoise is used for the sta... |
{"OriginalQuestionIds":[23667086],"Voters":[{"Id":16540390,"DisplayName":"jabaa"},{"Id":-1,"DisplayName":"Community","BindingReason":{"DuplicateApprovedByAsker":""}}]} |
Creating a module for this purpose is inevitable and not a strenuous task at all. All u need is a `package.json` with an `exports` field to limit which submodules can be loaded from within the package. From the [official Node.js docs](https://nodejs.org/api/packages.html#exports):
> The "exports" field allows defini... |
{"Voters":[{"Id":23917386,"DisplayName":"Казаков Денис"}],"DeleteType":1} |
Disabling `mitm_http2` within `seleniumwire_options` as recommended by the seleniumwire author for similar issues:
seleniumwire_options = {
'mitm_http2': False,
}
Did not work for me in this case.
Disabling HTTP2 in my chromedriver instance is the workaround I settled for:
chrome_opt... |
I'm trying to retrieve a parameter value from a config a file.
(Get-Content C:\<ConfigFolder>\basic.conf | ConvertFrom-StringData)."FileLocation"
The value of the "FileLocation" is "C:\temp".
And, value printed on screen is;
"C: emp"
Looks like "\t" is parsed as a Tab.
Is there a way avoid... |
How avoid \t being converted to Tab in Powershell |
|powershell| |
The spring boot plugin generates a unique structure by default: See [the Spring docs](https://docs.spring.io/spring-boot/docs/current/reference/html/executable-jar.html) for more details.
You will need
```xml
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-loader</artifac... |
Here's a better and more general way to handle this. In addition, it won't strip out "#" that are in the middle of a string, as yours would. This relies on the fact that a ### header must be followed by a space.
```
function render(md){
let code = "";
let mdLines = md.split('\n');
for(let i = 0; ... |
I have this app script code that first deletes any existing graphs then I want it to put the x-axis as xRange and the series as yValues (To find my ranges, I used some other functions but they work correctly and get my wanted ranges) (I want the graph on the Graph spreadsheet)
```
function createLineGraph(){
var s... |
You can extract only the text through HTMl React Parser install it , and then import to the file . Later defining
<JoditEditor
ref = {editor}
value = {content}
config={config}
onBlur={newContent => setContent(newContent)}
onChange={newContent => {}}
/>
... |
I have a small C++ program that writes a PWM period value to the following file on the BeagleBone Black:
/sys/class/pwm/pwmchip5/pwm0/period
The first time the program runs the file write succeeds. The file is opened with the O_WRONLY and O_NONBLOCK flags. The program closes the file descriptor before exiting... |
Linux file write succeeds 1st time errors on 2nd try |
You cannot have each class have "a field that is type of other class"; that would be a recursive definition. The compiler would not be able to make sense out of it, and it does not even make logical sense: it would result in an infinitely large data structure. The logical impossibility can be illustrated by the ["Print... |
How to prevent ternary operator indentation in swiftlint? |
|conditional-operator|swiftlint| |