instruction
stringlengths
0
30k
βŒ€
{"Voters":[{"Id":7758804,"DisplayName":"Trenton McKinney"},{"Id":2530121,"DisplayName":"L Tyrone"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}],"SiteSpecificCloseReasonIds":[16]}
It could be that the rows of the joined table are much more than expected. It could be that table2 is much larger than table1 and therefore a right join could be more efficent. First we obtain the final row size of the joined table. ~~~SQL WITH table1 as (SELECT 'a'||x as field1 from unnest(generate_array(1,1000)...
I know that benchmarking in OPA shows memory usage as B/op. I want to see how much memory it takes up on actual memory when the file size of data.json is large + how much memory it consumes when calculating if the file is large, how can I check it? Does B/op include all the usage I want? `opa bench --data policy.rego ...
How can I check OPA memory usage with big file size?
|benchmarking|opa|
null
{"Voters":[{"Id":7758804,"DisplayName":"Trenton McKinney"},{"Id":2530121,"DisplayName":"L Tyrone"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}],"SiteSpecificCloseReasonIds":[16]}
I have a data and time vector that I want to round down to the nearest 20-minute period. It works fine when I use the *floor_date* from the package **lubridate** on parts of the vector, but when I apply it on the whole vector, I only get the dates (without the time) back. Can anyone explain why this happens, and advice...
{"Voters":[{"Id":11107541,"DisplayName":"starball"},{"Id":2530121,"DisplayName":"L Tyrone"},{"Id":17562044,"DisplayName":"Sunderam Dubey"}]}
I am running a jenkins pipeline however it is unable to get the connect to github repo Below is the error message > Failed to connect to repository : Command "/usr/bin/git ls-remote -h -- git@git.assembla.com:untold-universe.backend.git HEAD" returned status code 128: stdout: stderr: fatal: cannot exec '/tmp/je...
there is WVDConnections table in Log Analytics with such data: | DateTime | User | Session status | | -------- | ----- | -------------- | | 09:20:39 | user3 | Completed | | 09:05:41 | user3 | Connected | | 09:05:07 | user3 | Started | | 06:51:58 | user1 | Completed | | 06:46:22 | user2...
Please double check if Postman is not adding a token. Go to Auth tab, and make sure it says "No Auth". Also, do you have a controller for root("/")? If not, try to create one. Most likely, these two steps will resolve your problem. @RestController public class HomeController { @GetMapping ...
If your data is a matrix, then we can use `lower.tri` and `upper.tri`. ```r m <- matrix(c(1,2,NA,3), nr=2) m # [,1] [,2] # [1,] 1 NA # [2,] 2 3 m[upper.tri(m)] <- m[lower.tri(m)] m # [,1] [,2] # [1,] 1 2 # [2,] 2 3 ```
null
{"Voters":[{"Id":328193,"DisplayName":"David"},{"Id":476,"DisplayName":"deceze"}],"SiteSpecificCloseReasonIds":[16]}
I have a similar situation as [this guy](https://stackoverflow.com/questions/11939551/how-to-use-model-ienumerable-and-model-in-the-same-page-list-create-m). I also wish to put a `@model IEnumerable<>` inside the parent which is a normal @model. I did the whole thing with the view model combining the two. But now I...
You have to iterat the boxes and select all your expected features. import pandas as pd import requests from bs4 import BeautifulSoup url = "https://www.rotowire.com/baseball/daily-lineups.php" soup = BeautifulSoup(requests.get(url).content, "html.parser") data_pitichi...
{"Voters":[{"Id":286934,"DisplayName":"Progman"},{"Id":2395282,"DisplayName":"vimuth"},{"Id":16217248,"DisplayName":"CPlus"}],"SiteSpecificCloseReasonIds":[18]}
**uninstall the existing fitz module/package** pip uninstall fitz **Install pymupdf module** pip install pymupdf source: [Unable to use fitz with python 3.8][1] [1]: https://github.com/pymupdf/PyMuPDF/issues/523
I'm using a sharded set where my table is described like this This is my \_all_all table: ```sql ENGINE = Distributed('level2_cluster', 'datas', 'data_animals_0_60_all', rand()) ``` This is my \_all table: ```sql ENGINE = Distributed('level3_cluster', 'datas', 'data_animals_0_60', rand()) ``` This is m...
I'm trying to write a program calculates based on keyboard input like a b c, a is number 1, b is number2 and c is operator but it's doesn't allow me to assign b when I use string, it doesn't show c when I use char can someone explain how this work please and how can I input multiple data types I'm new to C and i tried ...
Why am I getting MethodErrors when using continuous callback in Julia ODE solver?
|callback|julia|ode|numerical-integration|
null
I'm referencing `just` commands in custom `pre-commit` hooks. For some reason, `just` is interpreting *staged files* as *recipes*, which leads to trim trailing whitespace.................................................Passed fix end of files.........................................................Passed ...
Actually you can use pnpm built in functionality to install dependency with peers. [Related question](https://stackoverflow.com/questions/72468635/pnpm-peer-dependencies-auto-install) Execute this in your project directory. ```sh pnpm config set auto-install-peers true --location project ``` It will creat...
I'm currently working on a CSS layout where I have a **fixed parent div** containing another div. I want the inner div to be **fixed relative to the body**, not its parent. Code (Tailwind): ``` <div class="h-screen bg-red-100"> <div class="fixed left-1/2 top-1/2 h-80 w-80 -translate-x-1/2 -translate-y-1/2 bg-re...
``` ALTER PROCEDURE [dbo].[identify] AS BEGIN SET NOCOUNT ON; MERGE INTO [dbo].[warehouse] AS dim USING [dbo].[staging] AS stg ON dim.[first_name] = stg.first_name WHEN MATCHED THEN UPDATE SET [first_name] = stg.first_name, last_name = stg.last_name, ...
Anaconda is not simple. If you are looking for a simple way to switch between Python versions or environments, maybe look at `pyenv`. On Windows, there is also the `py` wrapper which lets you select which of one or more installed Python versions to use. Any nontrivial software installation requires you to underst...
How to make npx run the js cli script in windows?
|javascript|node.js|npm|npx|
You can change your path creator class to use the created_at date if the Media model has already been saved. I've written an example of the approach, it may need tweaks to work in your environment of course: ``` <?php namespace App\Services\MediaLibrary; use \Spatie\MediaLibrary\MediaCollections\Models\Med...
GROUP BY with multiple nested queries T-SQL
|sql|t-sql|group-by|azure-synapse-analytics|
I've been wanting to give tensorflow a shot for designing a chatbot. However, guides i've seen feel like they were all using an older version of Tensorflow because the one i'm using is the most recent one (2.16.1), which leads to some imports not being available in this version. Badically, i'm using [this place as a...
Problems with using the most recent version if Tensorflow
|python|python-3.x|tensorflow|tensorflow2.0|chatbot|
{"Voters":[{"Id":446594,"DisplayName":"DarkBee"},{"Id":3306020,"DisplayName":"Magnas"},{"Id":3115822,"DisplayName":"Borja"}]}
I have a GET request of an API that displays 100 items per page. After reading those 100 items the script calls the API for the next page and so on. However, the link for the following page expires after a while and the script stops midway. Is there a way to make the link available for more time? Or would an async. c...
{"Voters":[{"Id":5246885,"DisplayName":"Alex Mamo"},{"Id":1940850,"DisplayName":"karel"},{"Id":3115822,"DisplayName":"Borja"}],"SiteSpecificCloseReasonIds":[18]}
I have a Dockerfile created FROM nexus...aspnet:6.0 AS base RUN docker builder prune WORKDIR /app OPEN 80 OPEN 443 FROM nexus...sdk:6.0 AS build WORKDIR /src COPY [".", "."] COPY NugetPackages NugetPackages COPY Nuget.Config N...
How do I locally specify the path for nuget in my dockerfile?
|.net|dockerfile|nuget|
I have changed multer to multer-s3. Changing in controllers for that. I will store "location" instead of "filename". But I am getting typescript error. I am using Localstack for now. Here is my code: **multer.s3.middleware.ts** import validateFileForBucket from '@/common/validateFileForBucket'; imp...
how to input multiple data types in c
|c|string|char|
null
In Hive, the TRIM() function should work for trimming leading and trailing spaces. However, if you're encountering issues with the TRIM() function, you can alternatively use REGEXP_REPLACE() to remove any leading or trailing spaces. Here's how you can modify the query using REGEXP_REPLACE(): SELECT CAST...
For those of you that run [Z shell][1] with [iTerm2][2], add this to your `~/.zshrc` file: ```shell alias code="/Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code" ``` [1]: https://en.wikipedia.org/wiki/Z_shell [2]: https://en.wikipedia.org/wiki/ITerm2
null
from turtle import * import colorsys speed(0) bgcolor("black") h = 0 for i in range(16): for j in range(18) c =colorsys.hsv_to_rgb(h, 0.9, 1) color(c) h += 0.005 rt(90) circle(150-j*6,90) lt(90) circle(150-j*6,90) rt(180) circ...
If you don't need every tick then comment the line setting the unit for the minor ticks (the `set_minor_formatter` one) since that's what's causing them to show up. Without data, it looks bad, but if you truly have data that spans a large range (which would necessitate a logarithmic scale), then it will look more norma...
Currently our Gitlab runner package is installed in amazon Linux 2 and Ubuntu 22.04 servers (done manually), now regularly we need to update these packages to latest versions. Instead of manually performing these, we would like to perform these through Ansible, so we can run the playbook which can execute in multiple ...
Upgrade Gitlab-runner package in amazon Linux 2 and Ubuntu 22.04 through Ansible
|ansible|gitlab-ci|gitlab-ci-runner|
If you have two separate apps with different package IDs (app IDs) and both are properly configured in the `assetlinks.json` file, theoretically, both apps should be able to handle the same app link. However, if only one app is consistently opened when the app link is clicked, maybe due to: Priority of Intent Filter...
I am writing a rust toy parser, and I want to handle UTF-8 char in my string input. I knew that I need to use `chars` method to get UTF-8 iterator to correctly get a UTF-8 char, but I want to slice string using UTF-8 index. Is there any method I can use ? I looked into SWC, but I couldn't understand how it handles UTF-...
How to slice a string as utf8 in rust
Let's guess I have class on server like ``` class MyData { String statusA; String statusB; String statusC; ... Something field20; boolean canDoX() { return statusA.equals('z') && statusB.equals('y') } } ``` It is mapping from DB entity. Now for optimization was created new class ``` ...
Clean architecture and optimization: how to organize for classes with same logic
|java|database|server|clean-architecture|
I have a field that I'm trying to extract it's value. I'm trying to make this method generic as the field could contain a Double or a Color as it's value. I can get the type of the field easily enough, but I get an error whenever I try to call `GetValue` on the field saying *"Too many arguments to Public Overloads ...
Jenkins Exec Format Error while cloning repo
|git|jenkins|
You are redirected to the `/home/users` route on click on the link because you are using a [named route](https://router.vuejs.org/guide/essentials/named-routes.html) which correctly matches the user route. When reloading the page, the router checks from top to bottom the first route that matches the pattern. Which i...
I am trying to understand how to write a device driver for the sensor MT9M021 by onsemi. I checked some of the sources [here][1] and [here][2]. I understand based on these drivers that the device is treated as a I2C device connected to the I2C bus and much of the initialization is done in the probe callback for i2c_...
Linux support for parallel Pixel data Image sensor
|linux-kernel|linux-device-driver|
You can replace all `<p>` by `\n` before input in textarea and replace all `\n` by `<p>` before save to database.
Accompanist allows to ask for one permission at once is it possible to ask for these two location permission at once? ``` <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> ``` That's my code ```kot...
null
I think drizzle previously required you to define all your tables upfront in a `schema` object but now it doesn't seem like you need to. The [getting started docs][1] don't reference it. I just removed the second argument to `drizzle` all-together and I'm still getting type-safety in my queries. I do not use the [relat...
I have an InnoDB table which looks like this right now: [![MySQL Table Header][1]][1] [![Table Size][2]][2] [1]: https://i.stack.imgur.com/uoxAe.png [2]: https://i.stack.imgur.com/bl0GH.png The table is around 126GB big, but I have read that InnoDB's default can hold up to 64 TB of data. Is th...
If there is another form you have created inside the form tag, you should make sure that it is outside, because unaware update operations can break the process.
I am following the instructions from the [official documentation][1] on how to install llama-cpp with GPU support in Apple silicon Mac. Here is my Dockerfile: ``` FROM python:3.11-slim WORKDIR /code RUN pip uninstall llama-cpp-python -y ENV CMAKE_ARGS="-DLLAMA_METAL=on" FORCE_CMAKE=1 RUN pip install ...
llama-cpp-python with metal acceleration on Apple silicon failing
|python|docker|macos|cmake|llama-cpp-python|
I'm making an Android application using Kotlin. It contains App Theme color list so the user can select one color from it, and then I save this color in Shared Preferences. I've done with all Shared Preferences and XML values stuff, and I've succeeded to change the theme smoothly in the settings activity, and when I...
Change app theme programmatically Android Studio using Kotlin
|android|kotlin|android-theme|
null
Using the windeployqt tool, all dependent files necessary for running the program are placed alongside the executable file. I want to merge these dependent files, which have the .dll extension, with the executable file having the .exe extension. This means that for distributing and running the program, I only want to h...
Combining Dependent DLL Files with Executable using windeployq
Property 'location' does not exist on type 'File'
|node.js|typescript|amazon-s3|multer|multer-s3|
I am right now converting a couple of Websocket-Handlers from WebsocketConsumer to AsyncWebsocketConsumer. There is one line that causes problems. The Sync version was: self.mydatacache['workernr'] = school.objects.get(id=myschool).tf_worker.id My first try for an async version was this: self.mydatacache...
{"Voters":[{"Id":787480,"DisplayName":"Sneftel"},{"Id":418066,"DisplayName":"Biffen"},{"Id":3115822,"DisplayName":"Borja"}],"SiteSpecificCloseReasonIds":[19]}
From what I understand, the primary method to accomplish this is by using the z-index. Could you share the reasons why z-index isn't working in your case? Also, don't forget to organize your table data by using table rows (< tr >). Are you looking to have a background image behind your table? If so, I suggest enclos...
I am trying to make excel recognize UTF-8 file and exporting file with UTF-8-BOM file with code ``` BufferedWriter bufferedWriter = new BufferedWriter( new OutputStreamWriter(new FileOutputStream(pathToFile.toString()), StandardCharsets.UTF_8)); bufferedWriter.write('\ufeff'); bufferedWriter.write(cont...
UTF-8 issue with excel
|java|excel|spring|file|utf-8|
null
I have a Github repository where I made an initial commit, but never made any commits afterwards. I made a bunch of changes, added a bunch of files, and then made a new branch. From that branch, I deleted a few files and realized that I deleted a file that I didn't mean to - I tried pressing ctrl z a couple times to un...
|swift|macos|appkit|
The fact is that the bootstrap itself works and is actively used. Sending the code, would be times for any help! <ul class="top-header-contact-info secondary-menu"> <li class="nav-item dropdown-toggle"> <a href="novosti">News</a> <ul class="dropdown-menu"> <li ...
What could be the cause of the Bootstrap menu not working?
|javascript|bootstrap-5|
I'm setting up IBM RAD 9 on a new Windows machine. When I start the server (WAS V9.0 Traditional) the console is flooded with errors related to the KC file change monitor and it keeps on restarting every second or so, so I'm not even able to jump to a different view, such as Server view. It keeps on going until I stop ...
KC file change monitor keeps restarting during WAS 9 startup in RAD 9
|ibm-rad|