instruction
stringlengths
0
30k
It's a litle fussy, but in v0.13+ you could layer an unfilled boxplot over a filled boxplot: ```python tips = sns.load_dataset("tips") spec = dict(data=tips, x="day", y="total_bill", hue="sex", gap=.1) sns.boxplot(**spec, linewidth=0, showfliers=False, boxprops=dict(alpha=.5)) sns.boxplot(**spec, fill=False, leg...
Windows has not a built in X-server so, if you want to go with X11-forwarding, you must install one on your Windows machine (`VcXsrv` or `Xming` are both good choices). Putty can be avoided using the windows 10 built in `SSH` client. Just check if it is enabled in windows features and follow [@Aamir Sultan's reply][1]...
In your `appsettings.json` : ``` "Logging": { "LogLevel": { "Default": "Information", "Microsoft": "Information", "Microsoft.Hosting.Lifetime": "Information" } }, ``` If you have multiple `appsettings.json` based on your environment, be sure to select your environment properly and edit that ...
Python: How to create a regular expression to partition a string that terminates in either ": 45" or ",", without the ": "
|python|search|python-re|group|
null
The absolute difference will always lie in the range [0,12). Subtracting 6 from this and taking the absolute value maps to the range [0,6]9 but "reversed" so subtract all from 6 to get ``` float dist(float a, float b){ return 6-abs(abs(a-b)-6) } ```
I can't recall exactly how response.json() works but I have a feeling it 'runs' its input as regular JavaScript, which means if the MIME type returned by the server isn't application/javascript then it might not recognise it as runnable code. (Perhaps!) First, try dumping/inspecting the data you get back from the se...
Here is an object to get the "mounted" SD cards for Android 10. Card one is the sim card and card two is the micro SD card. When you use Environment.getExternalStorageDirectory() it gives you the sim card in slot one which is read-only so you can't write to that. package com.example.audioplayer; imp...
{"Voters":[{"Id":71141,"DisplayName":"Etienne de Martel"},{"Id":2055998,"DisplayName":"PM 77-1"},{"Id":14853083,"DisplayName":"Tangentially Perpendicular"}],"SiteSpecificCloseReasonIds":[19]}
The strings are of the form: ``` Item 5. Some text: 48 Item 5E. Some text, ``` The result of the search should produce 4 groups as follows. ``` Group(1) = "#" Group(2) = "5" or "5E" Group(3) = "Some text" Group(4) = "48" or "," ``` I have tried: ``` (a) r"(.*)Group (.*)\.(.+)(?::(.+))|(,)...
I have a problem using Staudenmeir's BelongsToThrough package. This is what I have in my Laravel 11 project: Database: ``` * ----------------------- * | users | * ----------------------- * | + id | | + address_id | * ----------------------- * * --------------...
Single core embedded system Priority based scheduling Thread 2(T2) - High priority Thread 1(T1) - Low priority Single producer(T2) and single consumer (T1) **Requirement:** 1. Data flow from T2 to T1 through shared circular buffer. Data flow possible in one direction i.e. T2 to T1. 2. Betwee...
Styles didn't apply to Django Project when uploaded to Render
|javascript|html|css|python-3.x|django|
I managed to solve my question. I was trying to adapt on old macro and mis-understanding the loop function. I have removed the following from the above code: ' Set targetRange as the last cell in column C with a value. Set targetRange = pasteSheet.Cells(pasteSheet.Rows.Count, 3).End(xlUp).Offset(1, 0) ...
|javascript|csv|observablehq|
I'm using the firestore emulator and exists isn't preventing calls when the document exists. ``` match /usernames/{username} { allow update: if false; allow create: if isUsernameAvailable(request.resource.data.username); function isUsernameAvailable(rawName) { let name = rawName....
|google-cloud-firestore|firebase-security|
null
**What is a fast way of checking which event has been triggered in scipy.solve_ivp()?** For context, I am simulating a double pendulum. I want to check if either the first rod or the second rod has been flipped. I have created two event functions for each, but once the event is triggered, is there any way I can retri...
Checking Event in solve_ivp
The CRON instruction to use is the following `0 */3 * * *` in conjunction with using an appropriate `start_date` and `end_date`. ```python DAG( dag_id="my_dag_name", start_date=datetime.datetime(2024, 2, 15, 12, 0), end_date=datetime.datetime(2024, 2, 17, 12, 0), schedule='0 */3 * * *', cat...
Created a cloud function to Enabling real-time email and chat notifications for webex notifications from google support document and function is failing. ``` Error Message in Test Function Error: function terminated. Recommended action: inspect logs for termination reason. Additional troubleshooting documentation ...
I have a gallery with images and when scroll horizontally, multiple images are scrolled instead of one. Below is part of my code: public View getView(int position, View convertView, ViewGroup parent) { View view = convertView; if (convertView == null) { view = inflater.inflate(resourceid, null); ...
Android gallery horizontal scrolling
I'm using the following code to enable dark mode support. However, the main window already exists at that point (I'm doing that from within a plugin dll), so the menu popups don't switch to the dark theme automatically - some trigger is still missing. If I switch from fullscreen to a regular window, the menu dropdow...
Suppose I have colmap camera poses, is it possible and how to obtain a new view of input image `I` (planar object) from a different viewpoint/camera pose using those poses? Colmap camera poses has following data: ``` extr = cam_extrinsics[key] intr = cam_intrinsics[extr.camera_id] height = int...
I think you need to use AND instead of OR: SELECT ld.status, ld.lead_name FROM DATAWAREHOUSE.SFDC_STAGING.SFDC_LEAD AS ld WHERE ld.status <> 'Open' AND ld.lead_name NOT LIKE '%test%' AND ld.lead_name NOT LIKE '%t3st%' AND ld.lead_name NOT L...
pip install sklearn Collecting sklearn Using cached sklearn-0.0.post12.tar.gz (2.6 kB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error × python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [15 lines of output] The 'sklearn' PyPI package is depr...
Changing the theme of a #32768 (menu) window class at runtime
|winapi|themes|win32gui|
Here my solution without imports: ```generate n = sequence (replicate n [1..n])```
If the url is always the same and you only need to change the warehouse id, you can get the id in the following way. This is without intercepting any errors and only shows the basic mechanism. Sub getDataWarehouseId() Const url As String = "https://www.screener.in/company/KRISHANA/" Dim d...
I am facing a problem on selecting a correct classifier for my data-mining task. I am labeling webpages using statistical method and label them using a 1-4 scale, 1 being the poorest while 4 being the best. Previously, I used SVM to train the system since I was using a binary (1,0) label then. But now since I swi...
How to choose the right machine-learning classifer
I want to iterate a chunk of code across columns in a dataframe, to create a results matrix. I am getting stuck with how to iteratively create new objects and matrices using/named after values in a certain column (Site) in my dataframe, to then pass through to the following lines of code. The code I am wanting to ...
How to solve problem with pip installation?
|installation|scikit-learn|pip|
null
I have overlapping text from my script: import matplotlib.pyplot as plt from adjustText import adjust_text x = [12,471,336,1300] y = [2,5,4,11] z = [0.1,0.2,0.3,0.4] im = plt.scatter(x, y, c = z, cmap = "gist_rainbow", alpha = 0.5) plt.colorbar(im) texts = [] texts.append(...
as long as you control the initialization of `ServiceConfigurationService` by yourself, you can use any tool to perform the injection. But if you want to use nestjs's DI container, you must do that through nestjs providers as the docs shown here: https://docs.nestjs.com/providers
For me it was, to clearly declare, that I use typescript not only generally but also within Svelte: ```json { "env": { "browser": true, "node": true, "es2021": true }, "globals": { ... }, "extends": [ "standard", "plugin:svelte/recommended", "plugin:@typescript-esli...
|scipy|simulation|numerical-methods|
In my case, it was detected by adb but not fastboot, and it was solved just disconnecting the cable and reconnecting it again, so the phone is properly detected. That is, although it was detected by adb (`adb devices`), when i instructed it to reboot in fastboot (`adb reboot bootloader`), it did not recognize the d...
It turns out that the problem is caused by a feature in **Windows Security** called **Mandatory ASLR** (Thanks to [dariush-mazlumi](https://stackoverflow.com/users/8956917/dariush-mazlumi)). Here are some ways to solve the problem: - **Option 1** (I used this one): turn off **Mandatory ALSR** by going to **Window...
Has anyone got example code to add relationships to Erwin model using Erwin API. E.g. adding a new key_group. Adding entities and attributes is pretty straightforward, struggling with figuring out how to add relationships. I have written code to read key group properties and check if relationship exists, unsure abo...
Erwin API question adding relationships to model
|api|relationship|erwin|
null
The document title in the bottom right of that second screenshot is shown in italics, which means that the document does not actually exist. The ID is just shown in the Firestore console because you have subcollections with data under it. And since the document doesn't actually exist, calling `exist` on that path co...
null
I have understood and solved the notebook available on Coursera for the Deep Learning Specialization (Sequence Models course) by Andrew Ng. In the notebook, he provides a detailed walkthrough for building a wake word detection model. However, at the end, **he loads a pre-trained model trained on the word "activate."**...
run all cells. this should work. else why not try : df['Column']
I have an HTML/CSS/JS website where I'm embedding facebook posts, and adding some text (with various info and action buttons) to the top of each post. I'm adding the text that goes above each post dynamically in Javascript, so that the embedded post (iframe) is in a separate container than the text that goes above it. ...
I want to write a function that returns several configuration settings from a settings store. Settings can be of several types, some have parameters, some hold strings, some hold arrays like so: ```typescript type StringSetting = 'outputPath' | 'fileName' type StringSettingWithParam = 'emailAddress' | 'homeDirectory...
I was following @john-rocky on [tensorflow-object-detection-api](https://rockyshikoku.medium.com/how-to-use-tensorflow-object-detection-api-with-the-colab-sample-notebooks-477707fadf1b) This tutorial solves the problem of training images with ONE bbox in images [640,640,3] with RF Zoo. I have tried to mount it with...
You can pass a function (instead of a react element) as children of `LoginButton` ``` export default function Home() { return ( <main> <LoginButton> {disabled => ( <Button variant="secondary" size="lg" className="mt-8" ...
I'm new to server-side development, but I know a lot of things from front-end development My problem: 1\. From the client side (React.js application), a JSON string is sent (POST request) to a C++ server: ``` const handleFetchData = async () => { try { dispatch(setRepoUrl(inputUrl)) const...
C++(or Visual Studio) saving the file will not preserve the original file contents
|c++|json|visual-studio|
null
I also got struck in the same issue but I had no mistake in exporting file and remaining all codes were fine as well. The only problem with my code was I had imported the model as below: const { User } = require('./Database/Models/UserModel'); Since I had **only one model exported** from the file UserModel...
This is node expressjs code and it is configured to allow dynamic origin. const whitelist = ["http://localhost:8080"]; const corsOptions = { origin: function (origin, callback) { console.log(origin); if (whitelist.indexOf(origin) !== -1) { console.log(whitelist.indexOf...
CORS Err - Same origin is undefined in browser
|node.js|express|cors|
i've been trying to fix the error in code cs0103, where the 'faceRect' does not exist in the current context, however when checking my code i dont know where i'm wrong, i'm new in both dlibdotnet and emgu.cv here's the 3 functions working together FrameGrabber: ``` void FrameGrabber(object sender, EventArgs...
CS0103 dlibdotnet and emu.cv facerect not in context
|c#|.net|emgucv|dlib|
null
When i click add to cart on my django ecommerce website the items are not added to cart and on the console a error message (VM40:1 Uncaught (in promise) Syntax Error: Unexpected token '<', "<!DOCTYPE "... is not valid JSON) and (POST http://127.0.0.1:8000/update_item/ 404 (Not Found)) i tried adding a csrf token on ...
i am experiencing a 404 error in the console on my django project
|javascript|django-models|django-views|django-forms|django-templates|
null
Check the **Trackpad** settings on the Mac: ![Screenshot](https://i.stack.imgur.com/yyaWP.png) With the settings shown here, a `LongPressGesture` works for me when I hold using three fingers. It also works to "force click" the trackpad with one finger and then hold. I haven't tried it wuth Flutter though.
Here is the structure of my project: poker/analyse_hand_river/analyse_hand_on_river.py poker/flop_turn_river.py Inside analyse_hand_on_river.py I have the following import: from flop_turn_river_cards import TheRiver This used to work, but I think since I had issues with my Conda envi...
My import is not recognised suddenly, getting Unresolved reference when importing?
|python|import|
For this problem, I would like to model out this constraint in cplex.But I get an error saying Operator not available for dvar float+[][Periods] == dvar float+. Is there a way to model this? Here are some of my codes: ``` Data: Products = {P1 P2 P3}; NbOperations = 10; NbPeriods = 3; LeadTime = [1,1,3,5,0,0,3,0,0...
Here is the structure of my project: poker/analyse_hand_river/analyse_hand_on_river.py poker/flop_turn_river.py Inside `analyse_hand_on_river.py` I have the following import: from flop_turn_river_cards import TheRiver This used to work, but I think since I had issues with my Conda en...
Property in Pina store returns null after setting the value
I have a database with two columns, one is a date and the other is a string formatted as JSON as follows: ``` '{ "k1": 1, "k2": 2, "k3": 3 }' ``` I am trying to get a table to use in Looker Studio, where for each date I have as many rows as there are keys in the corresponding JSON. For example if the above example ...
Looker studio failed to fetch data from underlying dataset even though query works fine in BigQuery, suspecting it's because JavaScript function
|sql|json|regex|google-bigquery|looker-studio|
i run a code in c++ in debug version step by step (F11) using visual studio2010 linked with cplex 12.4, so i obtained this error and message at the line where i declare IloEnv env ; it don't work , and i don't know why , ididn't find all these reperatory in my own pc so can someone help me to how fix it [![enter imag...
IloEnv env ; don't work in the dbug and it can access to it
|c++|visual-studio-2010|cplex|opl|rational-team-concert|
Suppose I have colmap camera poses, is it possible and how to obtain a new view of input image `I` (planar object) from a different viewpoint/camera pose using those poses? Colmap camera poses has following data: ``` extr = cam_extrinsics[key] intr = cam_intrinsics[extr.camera_id] heig...
I have Azure Notifications Hubs set up on iOS device and it is receiving messages from the Test Send page in Azure Notification Hubs, but I cannot seem to get an Azure Function Timer to send notifications using the backend adapted code examples for [specific devices][1] and [specific users][2]. I keep getting this e...
I host multiple PHP (WordPress) sites on a Windows 2019 Server with IIS 10. I have PHP 7.4 and PHP 8.2 installed on this server. I have one site which works fine when running with PHP 8.2 and FastCGI. I have another site, which is supposed to be configured exactly the same way, which is running fine when confi...
IIS PHP FastCGI 500 error when running with PHP 8.2 instead of PHP 7.4
|php|wordpress|fastcgi|http-status-code-500|windows-server-2019|
{"Voters":[{"Id":573032,"DisplayName":"Roman C"},{"Id":455417,"DisplayName":"mdrg"},{"Id":3890632,"DisplayName":"khelwood"}]}
I am trying to push a commit to a github branch. I forked the branch from the parent project. But everytime I do I am facing this error. fatal: bad boolean config value 'https://github.com/Enan511/Internship-2024-Tech-Team-2.git' for 'push.autosetupremote'
GIt push shows bad boolean config value error
|github|git-push|
I'm afraid I can't find a CSS/HTML only solution that would fit any shape. So this snippet takes a simplistic approach - keeps moving the text down until the space below and above can be made equal with padding. This ensures that any adjustment in height of the text element due to wrapping around the shape are ta...
This happens because you are not authenticated for that API route. first install [WP REST API][1] plugin in wordpress then you must use JWT token for example in PHP you can use `firebase/php-jwt` ```bash composer require firebase/php-jwt ``` Code example: ```php <?php require_once 'vendor/autoload.php'...
As an alternative to my answer, I was just wondering how exactly are you using the storage class variables? Instead of 4 `boolean` variables wouldn't it be easier to just declare one `string` variable and add a condition in order to accept only valid values? For example, assuming that valid values are `sc1`, `sc2...
You are encountering an error while opening the file. This is most likely due to an encoding issue. Try this: obj = json.load(open("Streaming_History_Audio_2016-2018_1.json", encoding="utf8"))