I need help with changing the font of output in Jupyter Notebook. Sometime ago VSCode was updated and I saw the output font was changed from Consolas to Segoe UI. How can I revert this back?
Im trying to fetch Distinct records, SQL query looks as follows select DISTINCT id from Table A where UserId = 'XXXX'; Currently, I have implemented this using spring data jpa @Query @Query(value = "select DISTINCT id from Table A where UserId = :userId") Can this be achived through spring data jpa query method ?
So I am using .NET Maui and came across the following problem. I want to use .FromArgb but in Maui. Originally I was using System.Drawing.Color, but using Maui. Graphics.Color gives a different result: //Color (example color) int KeyColor = -16777088; //system.Drawing way: var forgroundColor = System.Drawing.Color.FromArgb(KeyColor); //Output: "{Name=ff000080, ARGB=(255, 0, 0, 128)}" //Maui.Graphics way (I have to use ToString cuz FromArgb needs an string): var forgroundColorMaui = Microsoft.Maui.Graphics.Color.FromArgb(KeyColor.ToString()); //Output: Red=0, Green=0, Blue=0, Alpha=1 So I want
What I'm trying to achieve I would like to create an IIS reverse proxy with hostname http://innerhub.domain.example/ and I would like to configure it to split the traffic as follows: http://innerhub.domain.example/owncloud goes to http://192.168.0.192:8080/ as my owncloud service is hosting on that ip:port. http://innerhub.domain.example/keyclkauth goes to http://192.168.0.192:8180/ as my keycloak service is hosting on that ip:port Why I'm doing this As owncloud documentation describes Owncloud's openID connect needs a reverse proxy so your IAPs can access the configuration under .well-known.
I tried to implement the exponential backoff for my function using the reference code in Implementing a retry routine However in my case I do not want my function to fail or throw an error after the set number of retries. I would want to catch the error and log it and continue with the rest of the code. Tried multiple things but did not work for me. If someone could assist that would be great. Below is the the sample code. Also please make comments if I'm not handling the other custom exception correctly. import random, time from functools import wraps class ThrottledException(Exception): pass
I am trying to automate file upload on chrome with this VBA: Dim Customer_rates As String Dim WshShell As Object Customer_rates = "D:\FX Exch. Rates\2022-Feb-24 1707\MP_customer_exchange_rates_sample.xlsx" Set WshShell = CreateObject("WScript.Shell") WshShell.Run "cmd.exe/c echo" & Customer_rates & "| clip", vbNormal, True WshShell.SendKeys "^{v}" Application.Wait DateAdd("S", 2, Now) WshShell.SendKeys "{ENTER}" I get this error: method run object iwshshell3 failed
I am trying to leverage a percentage column [percent] to filter the output of the column [throughput]. The DAX query for my measure returns: A table of multiple values was supplied where a single value was expected. The query looks like: Measure = CALCULATE(FIRSTNONBLANKVALUE('table'[throughput],FILTER(ALL('table'[percent]),'table'[percent] > 0.94 && 'table'[percent] < 0.96))) What am I missing?
I am using apache JMETER with 32gb ram heap size of HEAP:="-Xms1g -Xmx28g -XX:MaxMetaspaceSize=256m" And running the script like this- test.jmx -Jthreads=75000 -Jramp=120 -Jloop=15 -Jconstant_throughput=75000 getting error in meter logs- Uncaught Exception java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached in thread Thread[StandardJMeterEngine,5,main]. See log file for details. [13.374s][warning][os,thread] Failed to start thread - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached. Please
Sorry in advance as this is probably a very easy question to answer, I am pretty new to prometheus and grafana and I am trying to figure out where this metric in prometheus is coming from "container_cpu_usage_seconds_total". I have found online that all metrics starting with "node_" come from the node exporter pod. So I am just wondering if this metric is coming prometheus itself or is this also coming from the node exporter as we currently have no annotations set on our pods but are getting these metrics inside grafana. Thanks in advance!
I am working on a vba file and everything is working properly. However, ive run the codes again and noticed the message box does not appear in the center. How can i make the message box appear in the center of excel again?
I looked at multiple tutorials on how to derive n-grams (here I will stick to bigrams) and included them in the analysis in NLP. Do we need to include all the possible combinations of bigrams as features because not all the bigrams would be meaningful? For example, if we have a sentence such as "I like this movie because it was fun and scary" and consider bigrams as well, these include (after pre-processing): bigrams=["like movie","movie fun", "fun scary"] I am not sure this might be a good approach, but what I can think of now is to include some frequent bigrams only as features. Or are there
I was trying to get the latest jconn4.jar for the sybase drivers in my java project, but I cannot find the latest version of it. Here are the links where I did find it but they are older versions: https://osdn.net/projects/sfnet_id2d/downloads/jdbc%20drivers/jconn4.jar/ https://mvnrepository.com/artifact/jdbc.sybase/jconnect Also, the official link from older threads and articles that suggests this link which doesn't work because now its redirected to SAP portal http://www.sybase.com/products/allproductsa-z/softwaredeveloperkit/jconnect From some of the discussions from threads, it says that n
I would like to delete the previous history entry in Vue-Router, is that even possible?? The solution must work in Vue-Router 4.x, and ideally in 3.x as well. The scenario that I'm implementing here is that a user does: pageA -> pageA:edit -> pageB When hitting "back" at pageB, I want to go to pageA (regular, non-edit) instead. I know that I could instead of a push to history of the page A:edit page, simply do a replace. However, it feels more natural that when hitting back in the A:edit page, you are returned to the regular non-edit page (there already is a check for changes in the beforeUpda
I have a Discord bot and there is a problem with the command named privacy policy in this bot, I asked a lot of people and they said they don't know. Node.js version: 16.13.2 Discord.js version: 13.6.0 MAİN client.commands = new Collection(); const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js')); const eventFiles = fs.readdirSync('./events').filter(file => file.endsWith('.js')); for (const file of commandFiles) { const command = require(`./commands/${file}`); client.commands.set(command.name, command); } COMMAND module.exports = { name: 'gizlilik', description:
Some times I need the document the important decisions in choosing approach or documenting current issue or bugges of framework or app or even future updates to code or new goals! This all things are just private and just for developer, I was using *.txt file for that then I update it to *.md file. But using *.md file is not all what I wanted, for example for having big title we should use # before title, but the sign of # is visible when I want read it and it is kind of annoying. Like this: I have to say i am not looking to make documentation for functions or structs or other things. I just w
I am just curious how fgets() reads input in C. As per syntax, the second argument is maximum characters to be read (n-1). This is some code where I am trying to copy contents of one file to another: void myCopy(char* src, char* dest) { FILE *fp_src; FILE *fp_dest; fp_src=fopen(src, "r"); fp_dest=fopen(dest,"w"); char buff[2]; while(fgets(buff,2,fp_src)) { fputs(buff,fp_dest); } return; } Here max characters to be read = 2-1=1, How does this copies every line of source to destination perfectly? Shouldn't it skip to next line after reading first character itself?
Historical background In discussions about European medieval archery, there is a lot of emphasis on the english longbow, and the physique and training required to field an archer of that caliber. The stereotypical English longbowman must have the strength to draw a 150lb bow, have trained from adolescence as an archer, and even have their very skeleton deformed over time by their dedication to the weapon. Asian communities have their own stereotypes. Because of historical examples and depictions of fat samurai or generals, there is a narrative that if you want to pull a strong bow you must be
I've been using a Telegram Bot to send notifications for a group, and for users. I already know I can get the Chat ID by receiving a message from the user on my bot, using getUpdates. I also know I can get the Group ID using the same method. But what I really need is the following. There are three users in my group. My bot. Me. Another user that didn't send any messages to my bot, so it does not appear on getUpdates. Is it possible to get the ID of this third user? I am the group owner, and also added my bot as Admin. The third user is a normal user.
I'm trying to implement the redis caching in my API for the first time it is a simple fastapi application which is using openweather api to query some weather information and my intention is to cache each json response in the redis server. I'hve made it to work with single key city but with this approach validating query parameters not working with the error handling I put in the place. caching.py import sys from datetime import timedelta import json import redis from services.openweather_service import get_report def redis_connect() -> redis.client.Redis: try: client = redis.Redis( host="loca
this error happens to me when I want to do the npm install and it is canceled in the middle of the process, It should be noted that this did not happen before. I already applied many of the suggestions I saw, for example: disable the anti virus, run as administrator, among others. version node :10.13.0 and 10.16.0 (nvm) version angular :8.0.0 error console PowerShell my dependencies project "dependencies": { "@agm/core": "^1.0.0-beta.5", "@angular-material-components/datetime-picker": "^2.0.3", "@angular-material-components/moment-adapter": "^2.0.1", "@angular/animations": "^8.0.0", "@angular/
I used gather_facts to get the OS details of each instance that I'm dealing with. For Amazon Linux OS, it just says Amazon 2 or Amazon 2018. Use case: I'm dynamically constructing the file name for a task. The file name is nothing but the name of the OS. When I see the contents of /etc/os-release, it says Amazon Linux only but Ansible facts returns: "ansible_facts": { "discovered_interpreter_python": "/usr/bin/python2.7", "distribution": "Amazon", "distribution_file_parsed": true, "distribution_file_path": "/etc/os-release", "distribution_file_variety": "Amazon", "distribution_major_version":
In excel sheet i want to compare the 2 columns. The column names like file_1 and file_2. by using these 2 cols want to create the another col like 'diff' by using excel formula [countifs]. In case , if file_1 and file_2 column records matched it should be 0 (Zero) in diff column otherwise it should be 1. But, i am not as excepted result. Could please help anyone. here is my inputs : file_1 file_2 G G A B C F E H A C H E Output Dataframe : file_1 file_2 diff G G 0 A B 1 C F 1 E H 0 A C 0 H E 0 Sample code : df = pd.read_excel('file1.xlsx') df1 = df[df['file_1'].isin(df['file_2'])] df['diff'] =
I am new to using docker and nginx together so i apologize in advance for my simple question which I am unable to get an answer to despite going through many resources on youtube. I created an ubuntu server and ran the following command sudo apt install nginx Now I have a very simple flask application docker image(publicly available on docker hub and not developed by me) and I want to configure my nginx to work as a reverse proxy to my container running the said image. My code for the reverse proxy in nginx configuration is as follows: server{ listen 80; location / { proxy_pass "http://192.168
I was writing an article on the swapcase function of Python's str class and couldn't think of any real-world use case of this function? What's a real-world use case of Python's swapcase function? Has anyone ever used swapcase function in a real-world project?
I am getting these errors during ES logging using fluentd. I'm using fluentd logging on k8s for application logging, we are handling 100M (around 400 tps) and getting this issue. I'm using M6g.2xlarge(8 core and 32 RAM) AWS instances 3 master and 20 data nodes. Under 200 tps everything is working fine after 200 getting these issue. There is a lag in Kibana and data loss on ES. ES version: 7.15.0 fluentd version: 1.12.4 My logging flow: Fluentd > ES > Kibana Error Log: 2022-02-04 00:37:53 +0530 [warn]: #0 failed to flush the buffer. retry_time=3 next_retry_seconds=2022-02-04 00:37:56 +0530 chun
I have a simple import in python code (import matplotlib.pyplot as plt), but I keep getting this error, any idea how to solve it? (Using it on VS Code, on an Apple M1 pro chip). Traceback (most recent call last): File "/Users/mk/Desktop/courses spring 22/EECE 433/assignment 1/code/code.py", line 4, in <module> import matplotlib.pyplot as plt File "/Users/mk/Library/Python/3.8/lib/python/site-packages/matplotlib/__init__.py", line 109, in <module> from . import _api, _version, cbook, docstring, rcsetup File "/Users/mk/Library/Python/3.8/lib/python/site-packages/matplotlib/rcsetup.py", line 27,
I am having a heck of a time getting Cloud Run to work correctly. I am creating a new service from the GCP console with a Cloud Build trigger to my Github repo. Under the security tab, I am setting the service account to one of my service accounts which has the following permissions: Cloud Build Service Account Cloud Run Admin Cloud Run Service Agent Cloud Scheduler Service Agent Service Account User When I create the service, it always ends with the following error: Step #2 - "Deploy": ERROR: (gcloud.run.services.update) PERMISSION_DENIED: Permission 'run.services.get' denied on resource 'nam