instruction
stringlengths
0
30k
βŒ€
Looks like something has changed in Docker since the services.build.yml was created, as the docker file ref in settings.build.xml isn't being honoured so rod_licensing_base and rod_licensing_builder weren't being created. Directly building the two images by doing `docker build -t rod_licensing/builder - < Dockerfile.b...
Primitive values such as strings and ints can't easily be registered in the container, because their meaning is ambiguous. The the following would not really work: ``` c# // Would not really work services.AddSingleton("SomeStringValue"); services.AddSingleton(typeof(IMyService<>), typeof(MyService<>)); ``` Bu...
If you are in India and using Jio then use VPN. After trying that if you get an error something like ``` WARNING: Failed to write executable - trying to use .deleteme logic ERROR: Could not install packages due to an OSError: ``` then use --user flag pip install "package name" --user
I want to make the SPARQL query to the Wikidata Query Service using query via URL-encoded POST (method 2) rather than GET (method 1) since GET queries have a limited length and some queries may be long if a lot of VALUES data are sent. Based on my past experience using query via POST directly (method 3), it has problem...
Why doesn't a SPARQL POST query to the Wikidata SPARQL endpoint work with the Python urllib3 library when the corresponding requests query does?
|post|python-requests|sparql|urllib3|wikidata-query-service|
null
If you could simplify and share the problem you are attempting to solve with the implementation shared, you would most likely have a better and easier solution. For what it seems like, the following should do what you are looking for (barring the `merging`) Function<Pair<String, String>, Integer> lengthOfKey ...
an easier way to do this is by installing the superset_client package with this command `pip install superset-api-client` and then change this script based on your needs <pre> from superset_api_client import Superset import requests # Superset API configuration superset_url = 'http://yo...
FlutterCarousel( options: CarouselOptions( physics: const NeverScrollableScrollPhysics(), controller: _carouselController, onPageChanged: (index, reason) { currentView = index + 1; //setState is called to...
I hate to say it, but ChatGPT for the win. Fixed my error.
In my case, I initialize and use these (complex and expensive) object in file1, import them in file2 and use. It doesn't waste time create multiple obj in multiple functions accross two files, and works for me. ``` # utils.py from fancy_module import Fancy_class expensive_obj = Fancy_class() def func1(): expe...
How efficiently share complex and expensive objects between python files
|python|performance|object|initialization|python-lru-cache|
|transformer-model|large-language-model|
I need to figure out how to insert additional elemnents in the JSON being returned by SQL Server. ``` Create Table dbo.Project (Id int IDENTITY(1,1), [Description] NVARCHAR(100), [Note] NVARCHAR(100)) Insert Into Project ([Description],[Note]) VALUES('Daphne','Ocala county - Barn') Insert Into Project ([Desc...
How do I insert an additional element in the JSON output from SQL Server?
I'm learning to write microservices in Go and I have created an API endpoint using Gin. My use case is that this endpoint receives an AWS role and then assumes it to access some AWS resource. I found out that Gin handles each incoming reqeust in a different go routine and my concern is if this role assumption would wo...
**Nuget Package** https://www.nuget.org/packages/Askmethat.Aspnet.JsonLocalizer/ **Solution** After some investigations, I finally find an example in Asp/Localization GitHub. I provide here for people that want to use a flat JSON without breaking default culture provider. **Data :** **The flat JSON:**...
I have the following lua function that creates, connects, and sends information on a udp socket. ```lua local udp = ngx.socket.udp local function write_to_socket(conf, bytes) local sock = udp() sock:settimeout(conf.timeout) sock:setpeername(conf.socket_host, conf.socket_port) sock:send(bytes) sock:c...
How to change buffer size for lua socket?
|unix|lua|udp|unix-socket|datagram|
null
For SQLAlchemy==2.0.25 from sqlalchemy import create_engine from sqlalchemy.engine import URL url = URL.create(drivername=drivername, username=youruser, password=yourpass, host=yourhost, ...
I have a NodeJS/Express/MongoDB application that allows users into add blog posts using TinyMCE rich text editor. The blog text is stored in a variable called blogPost, with the formatted text displayed on the 'show blog' page. On the website homepage, I am trying to return a substring of the first blog post (e.g. f...
TinyMCE Return Plain Text from Stored Database Value
|node.js|mongodb|express|tinymce|ejs|
I installed and configured the SQL Server Reporting Service 2022 on a Windows Server 2022. However, upon accessing the report server portal (native mode configured) the same admin account used to install the Reporting Service is denied access to the Report Server configurations page where I can add users and set permis...
|json|sql-server|
Text file: ``` { "term": "ditech process solutions", "country": "IN", "action": "get_search_companies", } ``` Code to read file: ``` import json input_file_path = "input.txt" with open(input_file_path) as json_data: params = json.load(json_data) ``` Documentation: - https://d...
|c++|c++11|lambda|
I am trying to split the data and rearrange the data in a CSV file. My data looks something like this ```none 1:100011159-T-G,CDD3-597,GG 1:10002775-GA,CDD3-597,GG 1:100122796-C-T,CDD3-597,TT 1:100152282-CAAA-T,CDD3-597,CC 1:100011159-T-G,CDD3-598,GG 1:100152282-CAAA-T,CDD3-598,CC ``` and I want a table t...
function new_date(){ var ss = SpreadsheetApp.getActive(); var rg = ss.getRange("A2:A10"); var vs = rg.getDisplayValues(); Logger.log(JSON.stringify(vs)); } DATA: ||A| |:---:|:---| |1|COL1| |2|1/1/2024| |3|1/2/2024| |4|1/3/2024| |5|1/4/2024| |6|1/5/2024| |7|1/6/2024| |...
null
``` insert into `WorkerClone` select * from `Worker`; ```
I have set a higher zorder value for the bar plot compared to gridlines. But the gridlines are still visible over the bars. I have also tried for 'ax.set_axisbelow(True)' which is not working. Can anyone explain me how to solve the issue ? ``` from windrose import WindroseAxes import pandas as pd import matplot...
'zorder' is not working properly in a windrose diagram
|pandas|dataframe|matplotlib|z-order|windrose|
null
If you know that the column exists, you could proceed similarly to pandas: ``` df = pl.DataFrame({'ABC': [1,2,3], 'DEF': [4,5,6], 'XYZ': [7,8,9], 'GHI': [10,11,12]}) out = df[:, :df.columns.index('XYZ')+1] # or out = df[:, :df.find_idx_by_name('XYZ')+1] ``` Or, shorter (and more efficient)...
I am using PyTorch's LSTM api, but have a bit of an issue. I'm using an LSTM for a dummy AI model. The task of the model is to return 1 if the previous number is less than the current one. So for an array like `[0.7, 0.3, 0.9, 0.99]`, the expected outputs are `[1.0, 0.0, 1.0, 1.0]`. The first output should be `1.0` ...
I'm trying to use the auto-focus feature of Android phones to detect object distances using the LENS_FOCUS_DISTANCE parameter, but I'm facing accuracy issues. - My device: Samsung S22 - LENS_FOCUS_DISTANCE_CALIBRATION parameter: APPROXIMATE - Autofocus Mode: CONTROL_AF_MODE_CONTINOUS_PICTURE I have a few quest...
Understanding LENS_FOCUS_DISTANCE Accuracy and Calculation for Distance Measurement on Samsung S22
|android|android-camera|android-camera2|autofocus|
null
|java|spring-boot|jvm|instrumentation|javaagents|
Ok I'll just post more info here, in case anyone else ends up here: * The model needs loading form disk to GPU. This takes CPU and time * You need enough GPU VRAM. * On a bigger GPU take away the `load_in_8bit` so you can use all the memory and compute.
Create an Azure AD application and grant User.Read API permission: ![enter image description here](https://i.imgur.com/TqDzcx6.png) Generate the auth-code by using below endpoint and sign-in with the user account: ```json https://login.microsoftonline.com/TenantID/oauth2/v2.0/authorize? &client_id=ClientID &r...
null
null
You can use `$setWindowFields` to get the previous and next document for each entry. Afterwards, you can decide whether a document should be included in the result by checking whether any of the dates is in your range: db.collection.aggregate([ { "$setWindowFields": { "partitionBy": n...
I have a data table that looks like this: | ID | ParticipaΓ§Γ£o | | Pessoa | | 01 | Comunicante | | Lucas | | 01 | Vitima | | Lucas | | 02 | Comunicante | | Rafa | | 02 | Vitima | | Vitor | I want to look like this: | ID | Comunicante| | VΓ­tima| | 01 | Lucas | | Lucas | | 02 ...
How to merge duplicate rows when with same ID with diferrente data
|merge|duplicates|openrefine|
null
I have a question that seems simple, but after I start thinking about it, it seems to be a little complicated... The well-known Pycaret package only uses Pandas... but with the growing popularity of Polars, I'm starting to think about opening a pull-request to support Polars... the question is how this should be don...
how to support polars in pycaret?
|python|pandas|dataframe|python-polars|pycaret|
I'm using ElasticCloud (also known as Elasticsearch Service) on Google Cloud [[1]](https://www.elastic.co/jp/partners/google-cloud) as a search engine. In my architecture, an application server is deployed on Google Cloud Run, and it communicates to Elasticsearch deployed by ElasticCloud. Currently, I'm utilizin...
How do I ship the metrics of Elasticsearch (CPU utilization, cluster health, and others) on ElasticCloud to Google Cloud Monitoring?
|elasticsearch|google-cloud-platform|google-cloud-monitoring|elastic-cloud|
I have this function in amcharts4 that creates a series for each year of data, is there a way to put a combo so that only 3 series can be put on the graph but in each combo say which years to show? I have more than 10 years of data and I don't want to put it all on the graph I use php and javascript. I get data from a...
amcharts create only 3 series from combo data
|javascript|php|mysql|amcharts|
In our system, we have around 16 microservices that communicate seamlessly using events through a message broker. These microservices use gRPC as their endpoint communication protocol, with an orchestrator facilitating data consensus as needed. Additionally, we have an API gateway responsible for mapping HTTP requests ...
SwiftData, Redundant ModelContainer Instances Causing Data Constraint Loss?
|swiftui|swift-data|
So I tried stretching the image but it didnt work. Not sure if thats what Im meant to do and I cant find anything online that would help. public Image Background = new() { Source = new BitmapImage(new Uri("chessbackground2.jpg", UriKind.Relative)), Stretch =.Fill, StretchDirection = StretchdDirection...
``` I have the following code, the RepositoryException will be handled by a global ExceptionHandle. ``` ``` public Category update(Category entity) { try { em = emf.createEntityManager(); em.getTransaction().begin(); Category category = em.find(Category.class, entity.getId()); ...
is it bad practice to throw a custom exception that will not be caught by the try catch block?
|java|hibernate|exception|jpa|
null
IMO You need to GitHub Actions which does CI for you project. In this CI I am considering Code checks, security checks, lint checks etc and packing it into zip ( for artifact creation) which moves this zip into s3 into AWS for audits. Once it is checked into S3 you can use Codepipeline for CD. ( CodeBui...
null
I've set up a GitLab CI configuration intended to trigger pipelines only on the develop and main branches when the commit message starts with "deploy" and the event is a push. Despite this, the pipeline is unexpectedly executing on push events to any branch, including ones not specified in the configuration, such as fe...
Communication with "Async" Service in Complex System Architecture
|c#|.net|c#-4.0|microservices|message-queue|
null
I have a set of buttons in a class, and I'm trying to run a function so a piece of HTML will change based on what button was pressed. How would I use if/else statement to change the outcome based on the id of the button? ``` document.querySelector(".pizza").addEventListener('click', function(){ if (do...
My buttons are in a class, how do I use if statement based on id?
|javascript|html|if-statement|
null
In .NET 5/.NET 6 we typically get our services from the ServiceProvider directly. But in some cases this is not possible and we need to create a service factory. We inject the service factory into our services and then, within the service, the service factory creates instances on demand. A public example would be `H...
> I wrote below bash Shell script to check whether the input value is a character string or a number (using Mathematical function): > #!/bin/bash > uniq_value=$1 > if `$(echo "$uniq_value / $uniq_value" | bc)` ; then > echo "Given value is number" > else > echo "Given value is string" > fi > The execution res...
if i understand the question correctly, you can try this way const YourComponent = () => { const [memberData, setMemberData] = useState([ { created_at: 'NA', email: 'test@test.com', firstname: 'molly', lastname: 'jones', groups: [ ...
I wish to hide the tooltip that is shown for xAxis title but still be able to show the same for when the user hovers over the axis labels and datapoints. This is my xAxes config for reference: [ { "id": "c1", "type": "CategoryAxis", "title": { "...
Has anyone been able to install https://github.com/HariSekhon/Nagios-Plugins on ARM-based machines? I am looking to install them on Ubuntu 22.04 LTS running on aarch64 architecture.
Compile or install HariSekhon/Nagios-Plugins on ARM
|arm|nagios|
Here's something from https://stackoverflow.com/a/14515846/10348047 to a question which linked here as a duplicate. I found this very useful for an LFS-related issue where none of `git reset --hard` or `git clean -df` or `git restore --staged .` resolved things. ## create a stand-alone, tagged, empty commit ...
I have found the answer ``` public void AddProduct() { formModel.Items.Add(new FormProduct() { Id = AvailableProducts.FirstOrDefault().Id, Product = AvailableProducts.FirstOrDefault(), Quantity = 1, }); // Notify EditContext of the change FormEditContext.Notify...
Using this code snippet I create a viewpoint for the current view.: ``` internal static Document doc = Autodesk.Navisworks.Api.Application.ActiveDocument; internal static void CreateViewpoint() { Viewpoint curentVievpoint = doc.CurrentViewpoint.Value; SavedViewpoint new...
Show last Viewpoint in Autodesk Navisworks
|autodesk-navisworks|
null
To answer your final question; yes, if your agent doing the deployment is in another vNet, that vNet has to be peered to **finish** the deployment. (Or the agent needs to be able to connect to that network.) You are probably running into the following scenario: 1. Terraform creates the resources 2. Terraform creat...
I just compile with -static /c/mingw64/bin/g++.exe -static -g -o tmp.exe tmp.cpp
You can use below case statement: SELECT product, CASE WHEN quantity_min = 1 THEN 1 ELSE quantity_min * 100 - 99 END AS quantity_min, CASE WHEN quantity_min = 1 THEN 99 ELSE quantity_min * 100 - 1 END AS quantity_max, price99 AS price FROM your_table ...
|python|django|pandas|dataframe|data-processing|