instruction stringlengths 0 30k ⌀ |
|---|
null |
Dont know about `knex`, but for [node-postgres](https://www.npmjs.com/package/pg), you can cast the results of `array_agg` to an array type, i.e. `::int[]` and it will return an array instead of a string:
```psql
SELECT
array_agg(name)::int[],
foo_id
FROM bar
GROUP BY foo_id;
``` |
What I want to do is add 3 icons to the right of a text area. The text area will be a list of text areas so each row will have the combination of text area -> icons
I have the textarea and icon on the right but I need them to look like the photo
<ng-template #item let-item let-index="index">
<nz-row... |
How can I add a list of icons to the right of a text area |
|html|twitter-bootstrap| |
{"Voters":[{"Id":466862,"DisplayName":"Mark Rotteveel"},{"Id":153430,"DisplayName":"Jim Lewis"},{"Id":642706,"DisplayName":"Basil Bourque"}]} |
VS Code just release this feature https://code.visualstudio.com/updates/v1_87#_command-duration-tracked
I use https://ohmyz.sh/ with the https://github.com/romkatv/powerlevel10k theme and it give you the duration of every command you run over x seconds, where X is set in
~/.p10k.zsh
by
POWERLEVEL9K_COMMAND_EXE... |
Trying to configure hello world visual c++ Cmake project. I would like to build binary on Linux system. I'm interested in both WSL and and linux machine connected via ssh.
I have defined SSH connection in `Connection Manager`:
[![enter image description here][1]][1]
But still don't see this connection i... |
Configure target system |
|c++|visual-studio|visual-c++| |
I'm working on my thesis about Ethereum and I want to extract some historical data on a daily basis from 2016 to now (on an hourly basis could be perfect but I can do with daily).
The data I need are :
- Daily transaction on the Ethereum blockchain
- Daily market capitalization (or supply because I already have ... |
|python|ethereum|blockchain| |
Outlook has an email encryption function. Emails with this feature turned on will not be able to be screenshotted. When the recipient takes a screenshot of this email, the screenshot result is a black screen.
I searched for ways to take screenshots on Windows, and the [bitBlt](https://learn.microsoft.com/en-us/windo... |
How does outlook disable screenshot |
|java|c++|outlook|operating-system| |
null |
```
var j = schedule.scheduleJob(unique_name, timeNow, async function () {
session10.startTransaction();
try{
await readmodel.findOneAndUpdate({}, {
$set: {
readonlyMode: true,
yearEndClosure: true
}
... |
I will use this CSS:
``` css
ul {
list-style-image: url('yourlisticon.gif');
}
``` |
null |
I found that I can do this without using a pyspark function to parse the JSON:
```py
import json
json = '["a","b","c"]'
jsonlist = json.loads(json)
df= spark.createDataFrame([x for x in zip(*[iter(jsonlist )])], ['item'])
display(df)
```
|
Git hook for git worktree doesn't run "git submodule update --init --recursive" properly |
|git|null|git-submodules|githooks|git-worktree| |
null |
{"OriginalQuestionIds":[34320488],"Voters":[{"Id":1491895,"DisplayName":"Barmar","BindingReason":{"GoldTagBadge":"javascript"}}]} |
I was running a scaling code in python for a weight matrix in Ubuntu but this OS had a crash so I run this code in windows now. The problem is that it pops this warning 16: RuntimeWarning: invalid value encountered in cast
quantized_data = ((data - min_value) / quantization_step).astype(int)
This was not happening... |
RuntimeWarning: invalid value encountered in cast quantized_data = ((data - min_value) / quantization_step).astype(int) |
|python|linux|windows|quantize| |
null |
null |
null |
null |
null |
null |
For me, I tried deleting the bin and obj folders, restarting VS, restarting my PC but to no avail. However, running
dotnet restore
fixed the issue |
I need to **match non-adjacent keywords** in a large collection of texts (several thousands). If matched, a label is assigned, else a label "unkown" is assigned.
To provide an example, I would like to find the keywords *sales representative* and *dealt* in the below text snippet and assign it the category *keyword ... |
{"Voters":[{"Id":1168588,"DisplayName":"PaulProgrammer"},{"Id":6752050,"DisplayName":"273K"},{"Id":3379653,"DisplayName":"qwerty_so"}]} |
I am struggling with an android button to start/stop a function, it seems a recurrent topic in the forum, but I couldn't find a suitable solution/explanation after trying to use the handler.postDelayed(), handler.removeCallbacksAndMessages() and executorService() functions.
There's a "start/stop" button which can:
... |
I have an array which is
```
[
'A. Wound Location and Measurements',
'B. Wound Bed',
'C. Surrounding Tissue',
'D. Drainage',
'Haroon Question Group Without Show PCP',
'Haroon Question Group With Show PCP',
'A. Wound Location and Measurements',
'B. Wound Bed',
'C. Surrounding Tissue',
'D.... |
Start by adding units to the variables in your model. Then make sure it passes the units test.
Now select an appropriate time step (there is guidance on how to select this in the Vensim help system).
Once you have a suitable time step, if you reduce it, results should stay very similar. If they change, it indicat... |
So I had forgotten to mention exactly how I am dong the logging
An example of a log in my application looked as follows
logger.info({key1, key2})
This would result with any special characters being printed out as the literal character represenataion, rather than an actual tab or newline.
I found if I format... |
Inspecting the code of `vegan::rrarefy` reveals that it is taking an independent (by row) sample from a multivariate hypergeometric distribution. The `rmvhyper` implementation from `extraDistr` is much faster (possibly multiple orders of magnitude, depending on the value of `min_sample`).
Performing the samples in p... |
I'm quite new with SQL. I have a querry to construct and fill a table that goes like this :
```
SELECT
A.ID as Identification,
B.Name as Family_name,
B.Firstname as first_name,
B.Address as adress_1
FROM A
LEFT JOIN B ON B.ID = A.ID
UNION
SELECT
C.ID as Identification,
D.Name as... |
SQL query : creating table with distinct values on selected columns |
im trying make page transition,should have 2 animations, one on enter and one on leave, the thing is that on enter it works perfectly fine, but it doesnt on leave! why? here is my code:)
import React from "react";
import { Routes, Route } from "react-router-dom";
import Layout from "./layouts/Layout";
... |
Im getting this primary key constraint error
```
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.dao.DataIntegrityViolationException: could not execute statement [Unique index or primary key violation: "PUBLIC.CONSTRAINT_INDEX_3... |
Unique index or primary key violation Spring JPA |
|java|spring|spring-boot|hibernate|jpa| |
null |
I have a question about this example from the book: The C++ Programming Language (Bjarne Stroustrup):
```
#include <iostream>
struct Nil {};
template <typename T0 = Nil, typename T1 = Nil, typename T2 = Nil, typename T3 = Nil>
struct Tuple : public Tuple <T1, T2, T3>
{
T0 x;
using Base = Tuple<... |
The C++ Programming Language - Bjarne Stroustrup. Tuple example |
|c++| |
I have a file `index.ts` which exports a few classes, as follows:
```typescript
// [...]
export {
UsalonData,
TalonData,
UsageData,
GateSaclayData,
EcsData,
EffacementData,
SplineData,
RegressionData,
CompdivData,
ClusteringData,
ClassificationData
};
```
... |
```
batch = BatchHttpRequest()
requests = []
for language, caption in caption_files.items():
request = youtube.captions().insert(
part='snippet',
body={
'snippet': {
'videoId': video_id,
'language': caption.get("cod... |
How can I insert multiple language caption files into YouTube videos using batch processing mode |
|python-3.x|youtube-api|youtube-data-api| |
null |
Whenever I try to run my code, it shows this on my output
/bin/sh: python: command not found
What should I do?
I tried to change the interpreter by installing python but it is still not working.
Even my IDlE is having a problem starting (sub-process didn't make a connection or startup failure)
I'm wondering ... |
Problem with running my python code in VSCode |
|python|visual-studio-code| |
null |
I am reaching out to inquire about the feasibility of integrating user status information from Microsoft Teams into our SharePoint Framework (SPFx) solution.
As we strive to enhance collaboration and communication within our organization, we believe that having real-time visibility into users' availability statuses (s... |
Inquiry Regarding Feasibility of Fetching User Status from Teams for SPFx Integration |
|reactjs|microsoft-graph-api|microsoft-teams|sharepoint-online|spfx| |
null |
I need the steps in order to increase timeout in websphere console when we are consuming the WSS3 service ?
Yes but doesn't work please could you provide the steps for me in order to understand this steps
Any Assistance will be better
thank you |
how to increase timeout in websphere console when we are consuming the WSS3 service? |
|websphere|wss-3.0| |
Leave animation doesnt work in React project with Framer Motion |
|reactjs|framer-motion| |
I implemented my own custom router which routes request coming into my server.
const routesHandler = ({ router }: RouterDep): Router => {
// Authorization middleware
router.use(DeserializeUser);
// Admin routes
router.use('/admin/', adminRouter);
return router;
};
... |
I have collection with below documents:
_id : "123"
name : "rahul"
age : 40
experience: "10"
_id : "124"
name : "manish"
age : 42
experience: "12"
I want to find the sum of all the ages and also experience:
I am using below query:
... |
I need to batch delete from a table filtering from another related table. there can be millions of rows so I use .Take() in a loop - so as not to fill transaction log. I'm getting SqlException: The column 'InvoiceId' was specified multiple times for 't1'.
```cs
var x = ctx.Invoices.Where(p => p.InvoiceDate <= new... |
Just inferring from the sample data. Join t1 to t2 on id, for each t2.ins_dt on or earlier than t1.ins_dt.
Fiddle: https://dbfiddle.uk/It5hFkbh
select t1.id,
t1.base_id,
t2.cv
from t1
inner
join t2
on t1.id = t2.id
and t1.ins_dt >= t2.ins_dt
o... |
New to D3 and from what I've found on the internet a lot of the questions/examples are rather outdated so I'm having trouble coming up with a solution.
Ultimately I'd like to have a network graph composed on nodes and linkages that are automatically optimally spaced. There are two "starting" nodes which need to be ... |
Trouble setting fixed nodes in force graph: Fixing nodes break links (D3) |
|javascript|typescript|d3.js| |
You could add a `selectedItem` state that is either `null` to hide the dialogs, or a specific `item` to display *that* item's dialog. The `handleClose` would reset the `selectedItem` back to `null`.
Example:
```jsx
export default function MasonryImageList({ data }) {
const [selectedImg, setSelectedImg] = Reac... |
I am trying to find software that will allow me to design a printable document. However, this printable document must be filled dynamically in a C# application.
Some things to note, this process should happen entirely in the background without user intervention. Once they submit on a website, the backing service wi... |
Design and Fill printable documents in C# .NET |
|c#|.net|document|third-party-libraries| |
null |
I have written this function to get all [transferable](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Transferable_objects) elements of an Object — and to get them *without* duplicates, so the list can actually be used with `postMessage()`.
It includes a check against a pseudo-[Abstract Base ... |
Custom PHPStan rul lto allow calling class method only from specific class |
|php|reflection|phpstan| |
I'm experiencing intermittent issues with FastAPI when uploading relatively large files (around 3.6MB). Unlike consistent failures or successes, these uploads occasionally hang indefinitely before the request even reaches the endpoint code for processing. This inconsistency occurs without any changes to the code or the... |
Intermittent Hangs on Large File Uploads in FastAPI Before Reaching Endpoint |
|python|fastapi| |
null |
I am building a memory game and i have some code that works if i click the image it shows the name of the image in the console.
I tried to research it but can't find any answer.
How do i select image name value for my ImageURL variable?
This is what i have now in my code:
<!-- begin snippet: js hide: false co... |
I have a .Net 6 webapi. It is not using asynch. It was supposed to be a learning project, so I kept it simple, but now it's in production (woo). Because of this, I cant' just rewrite the whole thing to use asynch.
In the Log4net stuff we have a SMTP appender that sends an email whenever an error is logged.
If sen... |
WebAPi, best way to pause before resending email |
|multithreading|smtp|asp.net-core-webapi|webapi|thread-sleep| |
|javascript|asp.net-core| |
my SQL Management Studio is crashing every time I am running a query.
I am getting following logs:
```
<entry>
<record>816</record>
<time>2024/03/29 15:31:44.769</time>
<type>Error</type>
<source>VisualStudio</source>
<description>Loading UI library</description>
<guid>{67909B06-91E... |
SQL Management Studio crashes on running query |
|sql|ssms| |
There is a RecyclerView `suggestList` and on clicking any `itemView` of it, we get adapterposition() which has passed through a function to get values from ArrayList used for `suggestList adapter`. Now, I have created a function `StockPrice()` in `MainActivity` which is also called when itemView is clicked, and In arra... |
How to check if object is Transferable? |
|javascript|abstract-class|postmessage|transferable| |
You can add a media attribution to preload:
```html
<link rel="preload" href="small_cat.jpg" as="image" media="(max-width: 400px)">
```
This is [well supported in browsers](https://caniuse.com/mdn-html_elements_link_media). |