instruction
stringlengths
0
30k
|python|autohotkey|
null
Error Required Param value not set Code: SELECT id_vst, CASE WHEN id_sys = 155 THEN CAST('Visible' AS varchar(80)) ELSE CAST(' ' AS varchar(80)) END AS result FROM DOC_ACC_CNT
|sql|fastreport|
I'm working on a project in C/C++ buildable with cmake... During build process I've to build configurations (headers and sources) based on some configuration file written in json format. I reached the prefixed result adopting a script file in javascript and in the cmake I placed this command: ``` add_custom_targe...
CMAKE running Javascript utility
|javascript|json|cmake|
Im developping a web app using reactjs and nextjs. When i run it in dev mode, my ram is used up 100%. Im having a 12gb ram and almost 6gb is used up by node js runtime. My colleague has a 24gb ram and when he run it, node js uses almost 15gb ram. When a modification is done to the code, the node js runtime uses up 100%...
While comparing, convert var1 to string: var1 = int(input("enter a number:")) num = str(var1)[::-1] if str(var1) == num: print("its a palindrome") else: print("its not a palindrome")
SQL Data entry - finding sequence to enter info
|sql|sql-server|sql-server-2008|
null
Compare elements according to 1St coordinates if 1st coordinates are equal, sort based on 2nd coordinates. Arrays.sort(contest,(a,b)->{ if(a[0]==b[0]){ return Integer.compare(a[1],b[1]); } return Integer.compare(a[0],b[0]); }); This works for me.
I have to get the data from the Choice field using the lookup column. I followed the following tutorial to resolve the issue. The hint is simple create a new Calculated Column and copy the data from the original choice column to the newly created column. Now you can get the newly created column instead of the choic...
I'm currently working on a Kotlin project to automate the upkeep of emergency location data. As part of that project I need to compare two collections of Json objects to determine what data needs to be added/updated/deleted. Collection A is the collection of existing data. Collection B is the incoming data from the job...
Reading bytes from a stream does not guarantee that it will read _all_ the bytes you request. try `readNBytes()` instead. (or you can use `readAllBytes()` as mentioned by @DavidConrad).
I have an API in C#, and with Vue.js I am trying to upload an image by accessing the API. I tried with fetch and axios, nothing changes, and I tried with headers in application/json, application/octet-stream and 'multipart/form-data. I receive a 500 error. ``` async uploadImage() { try { const formData ...
|c++|vector|floating-point|operator-overloading|
null
* Formula that could work in table please. I have some values 1,2 in a range of 7 columns. I want to arrange the values in the order they appear. I want for example I have a1= 0, b1=1, c1=2, d1=1, e1=0, f1=0, g1=1, I want i1=1, j1=2, k1=1, l1=1, m1=0, n1=0, o1=0. You can see and the image with some examples. Thank you...
{"OriginalQuestionIds":[66289122],"Voters":[{"Id":8690857,"DisplayName":"Drew Reese","BindingReason":{"GoldTagBadge":"reactjs"}}]}
|reactjs|
My team and I are building an application for our company and we need to use Java Money (JSR-354) and its Reference Implementation to represent monetary values. We are trying to build this application as per the guidelines of DDD. To that end, we wanted to understand if it is acceptable to use value objects such as `ja...
Is usage of value objects from third-party libraries in domain entities acceptable as per Domain-Driven Design?
|java|oop|design-patterns|domain-driven-design|java-money|
null
I've written the following code to compare the theoretical alpha = 0.05 with the empirical one from the buit-in t.test in Rstudio: ``` set.seed(1) N <- 1000 n <- 20 k <- 500 poblacion <- rnorm(N, 10, 10) #Sample mu.pob <- mean(poblacion) sd.pob <- sd(poblacion) p <- vector(length=k) for (i in 1:k) { mu...
null
null
null
{"Voters":[{"Id":635608,"DisplayName":"Mat"},{"Id":9473764,"DisplayName":"Nick"},{"Id":4122889,"DisplayName":"sommmen"}]}
Linux user can set the `DOTNET_ROOT` environment variable to point to their .NET SDK installation directory: **1. Choose an Editing Method:** There are two main ways to set environment variables in Linux: * **Editing Shell Profile:** This method makes the change persistent across terminal sessions. It involves...
class GCNModel(nn.Module): def __init__(self, in_channels, hidden_dim, out_channels, edge_dim): # 5, 64, 6, 3 super(GCNModel, self).__init__() self.conv1 = Edge_GCNConv(in_channels=in_channels, out_channels=hidden_dim, edge_dim=edge_dim) self.conv2 = Edge_GCNConv(in_channels=hidden_dim,...
Expected input batch_size (24) to match target batch_size (18)
|python|
null
``` $ cat inputfile| while read i ;do echo ${#i}; done 12550 12972 13035 ... snip 0 $ for i in {1..21} ; do sed -n "$i"p inputfile |wc -c ; done 13226 13680 13759 ... snip 1 ``` The input file contains 21 JSON objects concatenated together. Trying to feed each to jq errors on the first while it works wi...
Difference in printing the Nth line with sed vs while ... read?
|bash|
I debug the code using `{{ dd($order->id) }}`, I got 100238 order id value. But when I type <form action="{{ route('admin.pos.update_order', ['id' => $order->id]) }}" method="post"> then its not working. Then I write this `{{ route('admin.pos.update_order', ['id' => 100238]) }}` its works great. I cannot ...
Duplicate slugs in categories
Move the filtering to a subquery: ~~~sql SELECT tblDailyData.TradeableDate, tblDailyData.TradeableCode FROM tblDailyData WHERE (tblDailyData.TradeableCode = "MSFT") OR (tblDailyData.TradeableCode IS NULL AND tblDailyData.TradeableDate IS NULL); ~~~ Save it ...
Error when I try to post an image to the API
|javascript|c#|vue.js|
I am using Terraform to create an ECS cluster with an EC2 instance. My goal is to have a single task running on only one EC2 instance. I am managing both the capacity provider and auto-scaling for this cluster. Initially, the deployment of a task to an EC2 instance runs smoothly. However, when I try to deploy a new ...
I am currently trying to create a cluster of 2 VMs with Ubuntu and an arbitrator node. The cluster is running in such a way that Node 1 and 2 synchronize the databases. When I restart Node 2, it immediately rejoins the cluster, and the same applies to the arbitrator. However, when Node 1 (the node with the cluster crea...
As stated in the comments, I don't know whether there's an option to make things work exactly the way you want them, but you can use a directory structure like this to separate code from other data: ``` \ (Project root) -- Awesomeproject.sln -- \build -- \documentation -- Specification.doc -- Readme.txt ...
null
Assuming you have your flights table created (... "So we have a flights table. ...") with a BOOLEAN last column... If you have your csv data imported into database table or you can have it as a dataset like: ~~~sql /* FID A_DATE ORIGINAL_AIRPORT AIRLINE_NAME AIRCRAFT_TYPE IS_HEAVY --- ---------- -----------...
cucumber.api.cli.Main run WARNING: You are using deprecated Main class. Please use io.cucumber.core.cli.Main 0 Scenarios 0 Steps 0m0.014s I'm not getting snippets for my steps. Exception in thread "main" io.cucumber.core.exception.CompositeCucumbe ...
I want to use a subclass of Paint with an additional attribute "dashed". As a minimal example, I just added the following lines to the standard flutter-create code: ``` class MyPaint extends Paint { bool dashed; MyPaint() : dashed = false, super(); } ``` Everything works fine if I use `flu...
First of all, let me explain the problem. The following happens when I make categories with similar names: - https://www.example.com/cars/ford/parts<br> - https://www.example.com/cars/toyota/parts1 Why is this the case? The parents are different so why would WordPress at a 1 to the second parts category? **I...
You should specify the table: var languages []Language err := db**.Table("TableOfLanguages")**.Find(&languages).Error
Unable to launch WebDriverAgent. Original error: xcodebuild failed with code 65. This usually indicates an issue with the local Xcode setup or WebDriverAgent project configuration or the driver-to-platform version mismatch Whenever i start session in appium inspector, can someone help?, where i was try to inspect ...
Unable to launch WebDriverAgent
|automation|
null
Because the variable types are not the same: var1 = int(input("enter a number:")) num = str(var1)[::-1] var2 = int(num) if var1 == var2: print("its a palindrome") else: print("its not a palindrome") you need convert to integer type, or: var1 = input("enter a numb...
Looks like you missed the return statement. try { const response = await fetch(url, options); const data = await response.json(); console.log(data); return data; } catch (err) { console.error('error:' + err); } https://stackblitz.com/edit/stackblit...
> the returned .pmml file does only include the data dictionary without the specifications of the setted high/low values etc. The domain specification gets stored in two places inside the PMML document. First, the decision whether some input value is valid or invalid, gets encoded into the `/PMML/DataDictionary/D...
You need to delete the lock file in home/(user).config/JetBrains/(application name/version/ Do this and it should start up fine.
I have encountered interesting case during practicing writing Python algorithms on Leetcode. The task: "You are given two integer arrays nums1 and nums2, sorted in non-decreasing order, and two integers m and n, representing the number of elements in nums1 and nums2 respectively." The result should be stored inside th...
Merging sorted arrays with defined length in Python (good practices)
|python|arrays|array-merge|
null
``` package com.example.movieflix.ui.adapters; import static com.google.android.material.internal.ContextUtils.getActivity; import android.content.Context; import android.content.Intent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button...
null
``` package com.example.movieflix.ui.adapters; import static com.google.android.material.internal.ContextUtils.getActivity; import android.content.Context; import android.content.Intent; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.Button...
I have some custom post types and I've made some custom WordPress user roles and want them to be able to create and update WordPress block patterns. What capabilities do I need to add to make creating patterns available to the user? As an administrator the option is available, as a user with only permissions to t...
What capabilities does a WordPress User need to create and user patterns?
|wordpress|design-patterns|
null
i have the following classes public class GetTestByIdQuery : ICqrsQuery<JustTestDto> { public Guid JustTestId { get; set; } public GetTestByIdQuery(Guid justTestId) { JustTestId = justTestId; } } and public class ListTestsQuery : ICqrsQuery<List...
Dynamic Dependency Injection at The Run Time
|.net|.net-core|dependency-injection|dynamic-programming|
The issue is simple: you're confusing the `datasets` library with PyTorch's `Dataset` class. Your import statement should target PyTorch's dataset-handling facilities, not another library. Ensure you're using `from torch.utils.data import Dataset` to get the correct base class for your custom dataset.
|android|push-notification|
A possible solution is to use the <code>writeData</code> method to write formulas rowwise instead of the <code>writeFormula</code> method: ``` # define formulas as row matrix f <- matrix(data = f, ncol = length(f), byrow = TRUE) # convert formula matrix to formula data.frame f <- as.data.frame(f, stringsAsFact...
If you call your back-end directly, like any 3rd party rest API, then you wouldn't be asking about the NextJS/amplify deployment, so I'll assume you're calling your back-end from within `/pages/api`. When you do that yourAmplify deploys your /api code as Lambda@Edge. (Note: It may be deployed to a different region. ...
I am trying to create a notification to my email or teams emails but wanted to try it out with myself first on Azure. However not sure where I am going wrong and I hope someone can point me in the correct direction. I want to create an email notification that if any Work Item Type gets assigned to myself and the...
Azure Devops Notification - Subscription query
|azure|azure-devops|notifications|subscription|
In order to calculate the average of kilometers traveled in a year by a car, you should just divide the km traveled by the age of the car. Example, given: - current year: 2024 - year of registration: 1920 - total km traveled (ODO): 7 km the average of km traveled in a year is calculated by: 7 km / (20...
I tried to launch chrome browser on ecplise. I already added all JAR file which is required for the selenium webdriver. I add maven dependencies executed successfully. But when I tried the code of launching chrome browser it gives me different types of error everytime I click on run. I tried on diffrent different websi...
i get an error in the imports and in the chrome-driver and web-driver
|java|eclipse|maven|selenium-webdriver|testing|
null
null
Try setting the `na.last` argument of `rank` to `NA`: ``` > rank(temp_df$stat1) [1] 5 3 2 10 11 7 8 9 4 12 1 6 ``` whereas: ``` > rank(temp_df$stat1, na.last = NA) [1] 5 3 2 7 8 9 4 1 6 ```
The CRM365 forms provide the `OnSave` event to be able to perform business validations. If one of the validations fails, we can use the `executionContext.getEventArgs().preventDefault()` to stop the record creation. It is all good vor validating the fields of the current form, however, there are situations when the ...
|javascript|rest|validation|dynamics-crm-365|
delete .next folder and start server npm run dev
Instead of providing a set of keys, I would just parse the input data to recognise the "key: value" pattern. Note that you could get ambiguity. For instance, if an input line were: ``` TEST: A B C: OK ``` Then, this could be interpreted as: { "TEST": "A", "B C": "OK" } or as...
I am studying about JetPack Compose and learning the official example: OwlApp(https://material.io/design/material-studies/owl.html). I can't understand the followed code: In MainActivity file: ``` class MainActivity : ComponentActivity() { override fun onCreate(savedInstanceState: Bundle?) { super....
How to understand OwlApp { finish() } , while the defination of function OwlApp is fun OwlApp(finishActivity: () -> Unit) {}?
|android-jetpack-compose|
null
You can check the chart status by referring to load, redraw, or render events. API reference: https://api.highcharts.com/highcharts/chart.events.load Demo: https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/chart/events-render/ chart: { events: { ...
You should specify the table where your list of languages are in: <p>var languages []Language <p>err := db<b>.Table("TableOfLanguages")</b>.Find(&languages).Error
My question is with traversing. In my problem the sequence of the traversal is not following as it should. I am using the general logic for the inorder, preorderand the postorder traversal but it is giving in the wrong sequence. My problem is my code is not traversing like my expected output. The expected output sho...