instruction stringlengths 0 30k ⌀ |
|---|
PROGRAM 4: Rolling Table
Using the ROL and ROR instructions, write a program to produce a rolling table. This table should be built from a single int8 value provided by the user and print 3 rows from the starting value, each offset by one from the starting value. In each individual row, the entered number should be R... |
I have imported 1000 sample rows from various tables in a SQL server (lets call it SQLSever1).
I have imported the rows into the second SQL Server(SQLServer2).
When I execute the following query on SQLServer2 I get no results, however when I execute the same query on SQLServer1 I get the expected results.
This... |
I agree with @Gabe that there is a column that is missing `unique: true`
in nestJs entity but I was able to detect which column raising the issue by adding a console log in `node_modules/typeorm/driver/mysql/MysqlQueryRunner.js` in the beginning of `changeColumn` function like
```
console.log(`changeColumn pa... |
I am plotting some lines with Seaborn:
```python
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
fig, ax = plt.subplots()
for label, df in dfs.items():
sns.lineplot(
data=df,
x="Time step",
y="Loss",
errorbar="sd",
label=label,... |
how to use ldap authentication with permission taken from db without needing password in UserDetails |
|spring|spring-boot|spring-security| |
ultralytics_crop_objects is a list with like 20 numpy.ndarray, which are representing pictures (59, 381, 3) e.g.:[ultralytics_crop_objects[5]](https://i.stack.imgur.com/x6QvJ.png).
I started passing a single picture out of the list to recognize.
pipeline.recognize([ultralytics_crop_objects[5]])
--> ji85... |
With JS, it's a known problem that `\b` does not work well with strings containing special chars (JS engine believes chars like `ç` are word bondaries).
So I have this code:
"aaa aabb cc ccc abba".replace(/\b((.)\2+)\b|(.)\3+/g,"$1$3");
It correctly returns `aaa ab cc ccc aba`. However, if the input string... |
In the `getJob` function, you can use the [`map`][q] RxJS operator to change the observable value as:
```ts
import { map } from 'rxjs';
getJob(id: string) {
const { apiUrl } = environment;
return this.http.get<Record<string, Job>>(`${apiUrl}/jobs.json?orderBy="job_id"&equalTo="${id}"`)
.pipe(map((resp... |
Return empty object when $arrayToObject missing keys upon Mongo aggregation |
|mongodb|aggregation| |
I have a package in SSIS which in a first step executes these two queries:
truncate table mytable;
insert into mytable
select * from myview
Then, a second step read data from view that takes data from mytable in join with other tables, and writes all the data into a csv file.
The job has ne... |
you must add text.ads in web.config file on server to can Authorization your web site from google ads my friends .
Example :
<add input="{REQUEST_URI}" pattern="(/ads.txt)" negate="true" /> |
I have been using Azure containers for my project . I'm using different containers for backend app and frontnend. i have created a sidekiq process enclosed in radis cahce server on azure. as i trigger a task to run sidekiq process , sidekiq container is not processing jobs/task |
```
{
"type": "SERVER",
"errorCode": "SEC_DENY",
"message": "Permission denied because of missing FFOCUS in the user attributes"
},
{
"type": "SERVER",
"errorCode": "SEC_DENY",
"message": "Permission denied because of missing ORGFQD in the user attributes"
}
```
when I call the Revalidate It... |
Isssue with Revalidate Itinerary Rest Api |
|asp.net|rest|sabre|server-error| |
null |
Check configuration whether SSL is enabled or not. If SSL is not enabled then use http in the url instead of https. |
I have a list of form [[[key1,value1],[key2,value2],...,500],...,n] - aka L2 orderbook data with 500 levels.
I want to translate this list into a dataframe, containing columns key_1,...,key_500 and value_1,...,value_500. - A dataframe that has a price + volume column for each level (e.g. level_1_volume, level_2_volume... |
How can i redirect pull request from main branch to another branch |
|git|github|version-control|open-source|pull| |
Here are all product attributes listing:
$product_attributes = get_post_meta( $post->ID, '_product_attributes' );
foreach ( $product_attributes as $group_attributes ) {
foreach ( $group_attributes as $attributes ) {
echo $attributes['name'].'=>'.$attributes['value'];
}
} |
Why docker-compose volume binding didn't work during the build? Should I always COPY necessary for build files? |
You passed a pointer to host memory to `process_bytes`. The WASM module instance gets its entirely separate block of memory, so when it tries to access that pointer, it's a pointer to nowhere. You'll have to copy the byte array to the instance's memory.
Sorry, this is only a sketch of how to do that:
1. You'll som... |
I am trying to add Lottie animation in my view from URL. I am able to load from local asset folder. But When I try to load from URL it is not showing.
This is my code:
String cacheKey ="LOTTIE_CACHE_KEY";
mLottieDrawable = new LottieDrawable();
mLottieDrawable.enableMergePath... |
When using `redirect` in a server component you should move it to the `finally` block. Here is how:
```typescript
export default async function Page() {
let redirectPath: string | null = null
try {
//Rest of the code
redirectPath = `/dashboard`
} catch (error) {
//Rest of... |
How are negative errorbar bounds transformed, when log axis scaling is applied before constructing a Seaborn lineplot? |
|matplotlib|seaborn| |
null |
Bom dia pessoal, feliz Páscoa!! Estou fazendo um curso de JavaScript com o Gustavo Guanabara e estou tento problemas no resultado da function em um exercício. Alguém por favor poderia me ajudar a achar o erro? obs: Minha primeira vez aqui na plataforma.
```
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta ch... |
function JavaScript retornando NaN |
|javascript|html| |
null |
{"OriginalQuestionIds":[69367997],"Voters":[{"Id":209103,"DisplayName":"Frank van Puffelen","BindingReason":{"GoldTagBadge":"firebase"}}]} |
I'm currently trying to figure out what the six passcode integers are for this function. Every other example I've looked at, on this site and others, has used a "je" instruction for the first comparison, which allows us to deduce what the first integer input should be, however, the "bomb" that I'm working on seems to b... |
I need to add specific header for all browser interactions during the test run. When I test my application locally I am using "modheader" extension and it solves the problem.
I am using SDK 11. And super easy setup in terms of dependencies:
pom.xml
```xml
<dependencies>
<dependency>
<groupId>org... |
I'm trying to use Android Native Module on Flutter web(by WASM), and create Android module and imported on flutter app.
It works on Android app but not on browser.
`android/app/src/main/kotlin/com/example/flutter_application_1/MainActivity.kt`
```
package com.example.flutter_application_1
import kotlin.r... |
Is the flutter wasm support native module import? |
|android|flutter|webassembly| |
PROGRAM 4: Rolling Table
Using the ROL and ROR instructions, write a program to produce a rolling table. This table should be built from a single int8 value provided by the user and print 3 rows from the starting value, each offset by one from the starting value. In each individual row, the entered number should be R... |
I couldn't figure out why function does not work for a second time in Kivy |
|python|kivy|widget|kivy-language| |
null |
### Summary
There is a difference between `any` in type parameter and `any` in regular function parameter. Your case is the former one for generics. So you need to instantiate `T` first when assigning the concrete variables to it.
Ref. https://stackoverflow.com/questions/71628061/difference-between-any-interface-as... |
{"Voters":[{"Id":2395282,"DisplayName":"vimuth"},{"Id":11182,"DisplayName":"Lex Li"},{"Id":354577,"DisplayName":"Chris"}]} |
You can simulate a pipe function as follows *:
```cpp
=LET(
PIPE,LAMBDA(Functions,Initial,
LET(plusOne,LAMBDA(n,n+1),
multTwo,LAMBDA(n,n*2),
fxNames,{"plusOne";"multTwo"},
CHOOSER_,LAMBDA(name,CHOOSE(XMATCH(name,fxNames),plusOne,multTwo)),
R... |
I'm having the below shell script which works fine(generates file with timestamp) when I execute it from linux. But generate file touch command is not working when I execute it from jenkins pipeline.
echo "Generating file"
touch "genfile_$(date +"%Y_%m_%d_%I_%M_%p")"
echo "end of file..."
Pipeline script
----... |
Shellscript touch command not working in jenkins pipeline |
null |
*("if I were to do several thousand lines arrays")*
The data structure for this is a [Trie][1] (Prefix Tree): A tree-like data structure used to store a dynamic set of strings where each node represents a single character.
* Time Efficiency: Search, Insertion & Deletion: With a time-complexity of **O(m)** where... |
I have a table in which I want to show the names of columns which contain unique values and aren't null. In other words I want to display the candidate keys from the table. Note that while creating the table, the UNIQUE or NOT NULL constraint may or may not have been provided for the required columns.
My thought pr... |
How to display the column names which have only unique non-null values in MySQL table? |
|mysql| |
{"Voters":[{"Id":37231,"DisplayName":"jdigital"},{"Id":7635569,"DisplayName":"JGH"},{"Id":9214357,"DisplayName":"Zephyr"}],"SiteSpecificCloseReasonIds":[18]} |
There is no such thing as a "normal shell". You have "interactive shells" and "non-interactive shells", which differ, among other things, by what `*rc` file they source at startup and by *whether aliases are expanded or not*. And there are other types, even.
By default Vim uses a *non-interactive shell* for `:!` and... |
This is more a hint than a question:
The goal is to parse a command line **AND** create a useful *usage* message
code:
for arg ; do
case "${1:-}" in
--edit) # edit file
cd "$(dirname $0)" && exec $0;;
--noN) # do NOT create 'NHI1/../tags'
le... |
In my development I have a tag system that closely matches the one SO has. And it also allows non-Latin characters.
* User can enter new tag and it is saved to the DB.
* Existing tags are shown to the user when they type tag prefix. Fetch API is used for this.
I'm using Razor pages. At what point and how should ... |
When sanitize/encode while implementing tags system like on SO |
|security|encoding|fetch-api|razor-pages|sanitization| |
I've set up a basic player.
It works when I place only one instance of it in a scene. I need two instances due to local multiplayer.
However, once I place two instances of it in a scene, it just moves out of my vision.
By observing where it's positioned using a basic print function, it starts moving in random dire... |
I am building a restaurant recommender system, and I think the model is not loaded correctly. So everytime the reomm. system giving the output "Restaurant not found. Please enter a valid restaurant name." on entering the restaurant name.
Anyone can help into this.
Highly appreciated
Trying to get an output , but t... |
Issue in loading model in recommender system using streamlit |
|nltk|streamlit|recommendation-engine| |
null |
I have many functions which share the same structure and base signature:
```python
async def get_stuff_from_external_api(*, client: Client | None, id: int) -> Ressource:
if not client:
client = make_client()
return Ressource(await client.get(id))
```
To DRY my code I extracted this logic into... |
I need to improve general heap sort using C# multithreading.
I don't have clear idea about implementation of improvements.
One of the suggestions which I got is to separate array for N part and heapsort each part in specific thread.
And after merge each part of array.
In this case I think it will not be so ... |
I used data binding to connect the UI, but when I rebuild the project, I get this error:
```
error: cannot find symbol
View root = inflater.inflate(R.layout.toolbar, parent, false);
^
symbol: variable toolbar
location: class layout
```
ToolbarBinding.java... |
error: cannot find symbol View root = inflater.inflate(R.layout.toolbar, parent, false); |
|android|xml|android-layout|android-databinding| |
null |
use this code, tested its working
OutlinedTextField(
value ="hello",
keyboardOptions = KeyboardOptions(imeAction = ImeAction.Next),
onValueChange = {"ssss"},
placeholder = { Text("Username") },
leadingIcon = {
Image(painter = ... |
|cicd| |
null |
_Microsoft documentation:_
> [Range.Collapse method (Word)](https://learn.microsoft.com/en-us/office/vba/api/word.range.collapse?WT.mc_id=M365-MVP-33461&f1url=%3FappId%3DDev11IDEF1%26l%3Den-US%26k%3Dk(vbawd10.chm157155429)%3Bk(TargetFrameworkMoniker-Office.Version%3Dv16)%26rd%3Dtrue)
> [Selection.TypeText met... |
I am in desperate need of help with an issue that i'm facing while updating my system with the "yum update" command. My server is CentOS 7 converted to CloudLinux 7. I've been trying to find a solution for days, but no success as of now. Due to this error, I am unable to install "alt-php" versions too. I don't have the... |
Facing fatal errors while running "yum update" command on CentOS 7/Cloudlinux 7 |
|linux|server|linux-kernel|centos|yum| |
null |
So my issue is a bit weird, and I'm hoping I can get some help with it.
In the game I'm porting, it uses a boolean array to determine whether a tile is illuminated.
In the original source code, the game would apply a dithered pattern over areas that aren't illuminated/are out of the player's view:
[Old light sys... |
null |
{"Voters":[{"Id":3776858,"DisplayName":"Cyrus"},{"Id":213269,"DisplayName":"Jonas"},{"Id":10971581,"DisplayName":"jhnc"}],"SiteSpecificCloseReasonIds":[18]} |
I have a requirement for Android app development using Pega DX APIs. I have gone through the Pega documentation, but I'm not entirely sure about the feasibility of implementing it in Android using the Pega DX APIs. I am using XML layout for the design, not Jetpack Compose. When I searched the Pega website, I found samp... |
Implementation of Pega DX API in Android |
|android|kotlin|pega|fiware-pegasus| |
null |
I'm working on a Unity project where I need to draw on each face of a cube independently. However, when I draw on one face, the changes are reflected on all six faces of the cube simultaneously.
I've implemented a drawing functionality using a Drawer script. This script manages drawing points between the mouse click... |
{"Voters":[{"Id":472495,"DisplayName":"halfer"},{"Id":839601,"DisplayName":"gnat"},{"Id":794749,"DisplayName":"gre_gor"}],"SiteSpecificCloseReasonIds":[13]} |
Godot 4 CharacterBody2D movement goes haywire on multiple instances |
|godot|gdscript|godot4| |
The following code is using Selenium library. The problem is the trace command never gets printed given that it should be printed n times until the element becomes visible.
```cs
WebDriverWait wait = new WebDriverWait(new SystemClock(), driver, TimeSpan.FromSeconds(10), TimeSpan.FromMilliseconds(500));
driver.Naviga... |
I'm building a Node.js chatbot using the @google/generative-ai library. I'm encountering an error when handling the chat history between the user and the model.
Here's a breakdown of the problem:
- First Query Success: The initial user query works fine, likely because the history sent to the model is empty.
- Se... |
Node.js Chatbot Error: GoogleGenerativeAIError - Content should have 'parts' property with an array of Parts |
|node.js|api|artificial-intelligence|chatbot|google-generativeai| |
I try to scrape some data from the site https://bloks.io/live
The first problem is that I have no way to access the refreshing data in that table. My idea is to check if the first column changes. If it does I have to check, which account and so on...
So I need to read constantly the first column but it doesn't work.
... |
In a Google spreadsheet I pull some numbers from Google Analytics via Apps script and the Analytics API.
One of the numbers is the bounce rate, which is returned in the format 42.380071394743425. I want to display this with two digits after the decimal point (and I need to add a percentage sign). I would like to do ... |
I am getting into async operations in Python and would like to use it properly, yet I found a few ways to retrieve data from multiple coroutines and am not sure which one to use.
The idea is as follows: for multiple records in a form of input-output objects, get the input, asynchronously run the API queries, gather ... |
If you know that it will be separate by two empty lines, you can just load the file as a string and split them before you pass them to a csv reader.
Sample file:
```
col_1,col2_,col_3
1,2,3
c1,c2,c3,c4,c5
1,2,3,4,5
```
Code:
```
import pandas as pd
from io import StringIO
with open('file.csv... |
you must add text.ads in web.config file on server to can Authorization your web site from google ads my friends .
Example :
<add input="{REQUEST_URI}" pattern="(/ads.txt)" negate="true" /> |
I asked a similar question before, when I didnt know what was the problem of my code. Just as I was recommended I will give it in a better format.
This is an example of what happens to my code.
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
typedef struct
{
int ... |