instruction
stringlengths
0
30k
I'm trying to develop a school schedule generator in JavaScript for a high school with various subjects, teachers, and classes. The goal is to create a balanced and efficient schedule that minimizes conflicts while considering teacher preferences and availability. **Constraints:** If I wanted to distribute the lect...
I'm trying to write a gsheet appscript that replaces an image in google slide. Ultimately, i want to iterate through the spreadsheet and for each row create a new slide with the image of the row in the spreadsheet. Currently, I can't get it to work once. My code is below: ```javascript function updatePresentat...
AppScript to replace image in google slides
|javascript|google-sheets|google-apps-script|
I was able to figure out what was going on here. Essentially traffic was being routed to a private subnet that was mapping traffic to an NAT gateway instead of an Internet gateway. Because there were two instances running, only sometimes would the requests be sent to an instance attached to the troubled subnet. To ...
|excel|vba|charts|
|excel|vba|ms-word|
I know `serialVersionUID` is used serialization and deserialization. I read https://stackoverflow.com/questions/285793/what-is-a-serialversionuid-and-why-should-i-use-it So if we are using distributed cache like hazelcast or coherence or redis we need serialVersionUID. Example entity or VO classes needs that. My que...
I use a very similar setup: Windows 11, VS Code, Conda environments. This does not appear as an issue for me. However, when I open the terminal, a pop up message appears in the bottom right corner: [![enter image description here][1]][1] [1]: https://i.stack.imgur.com/lMqcb.png The "Learn more" link point...
|excel|vba|ms-word|
I create two services in an ASP.NET Core Web API. One service is for Identity and generates a JWT token. The second service gets the JWT token from Identity. These two services are connected using http. This is the code from the second service which gets the JWT token from the Identity service ``` builder.Servi...
HTTP 401 unauthorized ASP.NET Core Web API microservices
Why cant I use a space when creating this table?
|sqlite|
null
I've isolated this as much as I can ... And indeed the copyright info is rotated correctly, reading up and down along the left edge. *However*, when I hover over the parent `<div>` instead of rotating 90º degrees, so that ireading left-to-right along the bottom edge, it rotates 180º so that it is facing the opp...
CSS Rotation isn't rotating the way I think it should
|css|
For SpringBoot 2.x set spring.servlet.multipart.enabled=false.
Your original code: ```py ((x == a and y == b) or (x == b and y == a)) ``` is already the optimal solution for most cases. It's readable and easy to understand, and doesn't involve allocating tuples or sets, or performing sorting. These approaches are arguably less clear since they introduce an operation layer ...
I want the pass the dynamic values in `params` from input.txt file? **input.txt file:-**<br/> term=ditech process solutions,country=IN,action=get_search_companies **For this code:-** import requests from bs4 import BeautifulSoup def read_params(file_path): params = {} ...
How to route traffic between overlapping subnets on GCP
|google-cloud-platform|routes|google-compute-engine|vpc|
Create dtype string (not object) column from single string value without having to cast it
<!-- begin snippet: js hide: false console: true babel: false --> <!-- language: lang-js --> function hideLoadingAnimation() { console.log("Yükleme animasyonu gizleniyor, ana içerik gösteriliyor"); var loadingAnimation = document.getElementById("loading-animation"); var mainContent = ...
|javascript|html|css|frontend|backend|
I am having trouble with a line of my code. I am trying to run st_union from the "sf" package on two sf objects, a shapefile that has been transformed into an sf object (EPSG:4326) and occurrence data that is also a sf object. I want my two sf objects to union as 1 sf object with the the number of occurrences ("summari...
St_union function taking a long time to run (R)
|r|performance|runtime|r-package|
null
[ignor the bar][1]I have been experimenting with SVG recently and to be more specific on creating a 12-part wheel.I came across a code snippet in a previous post that fit my needs but consists of 6 parts and i need 12 segments.My problem is that i can not understand the proccess of the division. Below is the sni...
I have a project which uses Simple-git to clone the repo in my local folder but due to read-only file system in Mac it is not able to make a new directory Would Like to know if there's a way to grant +rw access to a particular directory... tried `chmod +rw src` but it ain't working code I ran : `await sim...
how to make read only file/directory in Mac writable
|node.js|macos|macos-sonoma|simple-git|
null
I still don't know how to do it updating the height as it changes. But I think one workaround would be to: 1. Apply `position: "fixed"` and `height: "100vh"` to the sidebar. 1. Create a context to hold and update the collapsing and width of the sidebar. 1. Use the context updates to update the `marginLeft` of the ...
Try changing your scopes to an array as per the 'docs': [https://github.com/AzureAD/microsoft-identity-web/blob/master/docs/blog-posts/downstreamwebapi-to-downstreamapi.md][1] [1]: https://Try%20changing%20your%20scopes%20to%20an%20array%20as%20per%20the%20'docs':%20%20%20https://github.com/AzureAD/microsof...
I'm trying to execute `md5sum` command in my program using `pipe`, `fork` and `dup`. I found some code that runs successfully but I don't understand a couple of lines of code. Code: ```c int main() { int infp, outfp; char buf[128]; if (popen2("md5sum", &infp, &outfp) <= 0) { printf("Unable t...
|microservices|asp.net-core-webapi|
I am using Firestore to fetch data based on a filter that utilizes the 'array-contains-any' operator. Here is the code I am using to fetch the data - ``` const fV = this.getFV(this.selectedButton); return qnaCollectionRef .where('qS', 'array-contains-any' , fV) .onSnapshot((querySnapshot) => { ``` here is t...
I'm student in practicing PintOS Project. In Programming Project 3(Virtual Memory), I got ploblems about "preprocess in compiling" (C program). I had tried all attempt that do my best, but I'm absolutely lost at this point on how to fix it. Finally i come to here, had to ask you about this issue. **error** T...
As mentioned in the comments, it's not advisable to keep dates in a text format. Instead, always use a date or timestamp type. String concatenation can be done using `CONCAT()` not `+` as follows : WHERE month.ty LIKE CONCAT('%', YEAR(current_timestamp), '%')
The problem is that when you put HTML into innerHTML the system adds closing tags. You can see this by using your browser devtools inspect facility. Hence you are ending up with more than one table. A simple way of preventing this automatic closure is to make a string of all the HTML and then copy the string i...
Out of the box from prometheus, process_cpu_seconds_total means # HELP process_cpu_seconds_total Total user and system CPU time spent in seconds. In your example, it is giving you the CPU usage for the instance="localhost:9090", job="prometheus". The value: 50.61 @1711710744.158 52.02 @17...
Error whiling read japanese char name file.without japanese char, file can be read "" import matplotlib.pyplot as plt import cv2 image_path = r"FAX注文0004.tif" image = cv2.imread(image_path) plt.imshow(image) plt.axis('off') plt.show() """ Note: while rename file...
"FAX注文0004.tif" does not read from opencv but "FAX0004.tif" can be readbale
|python|opencv|
A list of data frames: my_list <- list(structure(list(id = c("xxxyz", "xxxyz", "zzuio"), country = c("USA", "USA", "Canada")), class = "data.frame", row.names ...
Try using the following: =LET( lr,MATCH(2,1/(Master!L:L<>"")), fRng,Master!B3:INDEX(Master!B:M,lr,{1,11,12}), criteriaRng1,Master!L3:INDEX(Master!L:L,lr), criteriaRng2,Master!M3:INDEX(Master!M:M,lr), FILTER(fRng,(criteriaRng1=Metrics!A1)*(criteriaRng2="Negotiatin...
I need to write a function that sorts this array based on dialog_node key and previous_sibling keys. The previous_sibling of the next object matches the dialog_node value of the previous object in the array. ``` function orderDialogNodes(nodes) { // Create a mapping of dialog_node to its corresponding inde...
How to sort Javascript array of objects based on mapped keys between objects
|javascript|arrays|sorting|
null
|android|android-studio|
Here's what my settings.json looks like inside .vscode folder. { "files.associations": { "**/templates{/**,*}.html": "django-html", }, "emmet.includeLanguages": { "django-html": "html" } } This will make vscode interpret that whenever it encounters a "template" f...
I have a LET & FILTER function used to use a drop down (green cell) and then it populates a report underneath based on data in sheet("Master") You can see it's bringing in all the ("Master") sheet columns B:M in order and I don't need columns C:K ![enter image description here][1] How can I change `fRng,Ma...
Need clarification of popen2() in C
|c|pipe|fork|popen|dup2|
null
I am having a dict `statistics` in my `view.py` and give it as param in my `context` to my `index.html`. There I want to use it in my html like `{{ statistics.key1 }}`. But I also want to use it in `js`. When using `json.dumps` like this in my `view.py`: "statistics": json.dumps(statistics, cls=DjangoJSONEnco...
use dict from python in django html template and also in js
|python|django|django-views|django-templates|
``` <!DOCTYPE html> <html> <head> <title>Page Title</title> <!--<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css">--> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgH...
Bootstrap modal not showing at the desired position on a web page when the screen size is smaller
|html|jquery|css|bootstrap-5|
null
After conducting several tests by hosting my project on a Windows IIS, where a reverse proxy was configured to redirect server requests to the container, and performing massive requests using a testing tool, `app.k6.io`, the tests didn't go beyond 20 requests. The container would freeze, throwing a timeout error, causi...
I have a json like [ { "url": "https://drive.google.com/file/d/1tO-qVknlH0PLK9CblQsyd568ZiptdKff/view?usp=share_link", "title": "&#8211; Flexibility" }, { "url": "https://drive.google.com/open?id=11_sR8X13lmPcvlT3POfMW3044f3wZdra", "title": "&#8211; Prono...
Solved the problem "app -> _layout.tsx" ``` import '../i18n.config'; ``` I added it to the root directory -> i18n.config.ts ``` import i18n from "i18next"; import { initReactI18next } from "react-i18next"; import { getLocales } from 'expo-localization'; import en from "./language/en.json"; import tr fr...
I want to see my GUI interface immediately and initialize the application on an asynchronous thread. For this aim I am using `QFuture`. My code: ``` // main.cpp int main(int argc, char *argv[]) { // create config and credentials QApplication app(argc, argv); LoginForm loginForm(config, credent...
Why is QFuture not working asynchronously?
In UWP app, when you define a string resource in your resource file, the `Name` property of this string can be either "Name" or "Name.Property". In xaml code, we use `Uid` attribute to associate controls to resource, but when we use resource in xaml code, we must add the specified property to the resource's name, in...
Remove duplicated rows within and between data frames stored in a list
|r|list|duplicates|lapply|
I get the following errors when republishing the image I took with ros2 run ffmpeg.; `ros2 run image_transport republish ffmpeg in/ffmpeg:=image_raw/ffmpeg raw out:=image_raw/uncompressed --ros-args -p "ffmpeg_image_transport.map.hevc_rkmpp:=hevc"` `terminate called after throwing an instance of 'image_transport:...
I get an error when republishing the image I shot with ros2 run ffmpeg
|ffmpeg|decode|ros2|
null
I'm trying to build binutils-2.7 and gcc with Cygwin while following https://wiki.osdev.org/GCC_Cross-Compiler. Everytime I run: ../binutils-2.7/configure --target=i386-elf --prefix="/home/jacki" --with-sysroot --disable-nls --disable-werror I get this error: Config.guess failed to determine the host t...
"Config.guess failed to determine the host type" when trying build binutils-2.7 with Cygwin
|gcc|build|cygwin|osdev|binutils|
I need the bot to understand that they left a reaction in the post and display in the console what type of reaction they gave, for example, heart, like, dislike, and I need this to work through the telebot library in python, please help, I don’t understand at all how this can be done. I tried to read data from a mes...
|python|python-3.x|bots|telegram-bot|telebot|
try this ``` import * as spine from "@esotericsoftware/spine-phaser" plugins: { scene: [ { key: "spine.SpinePlugin", plugin: spine.SpinePlugin, mapping: "spine" } ] } ```
after changing the port number issue got resolved
The error message ``` Message [akka.cluster.ddata.Replicator$Internal$DeltaPropagation] wrapped in [akka.actor.ActorSelectionMessage] from Actor[akka://my-app/system/clusterReceptionist/replicator#-189849616] to Actor[akka://my-app@10.180.102.333:2550/] was dropped. Discarding oversized payload sent to Some(A...
akka.cluster.ddata.Replicator$Internal$DeltaPropagation message from clusterReceptionist replicator is dropped because it exceeds the size limit
|akka|reactive-programming|actor|sharding|distributed-system|
null
I just encountered this really strange phenomenon that I am putting a TextField at the bottom of my screen, everything is wrapped in a scaffold and when the textfield is clicked the whole content is being pushed up (note: I used a SingleChildScrollView for this). But now using a controller to make use of all the fun...
Flutter: TextField controller prevents content from being pushed up
|flutter|user-interface|textfield|
Thank you so much it worked for me: in windows 11: go to Settings > Network & Internet > WI-FI > Hardware Properties > More Adapter Options > Click Edit. Look for IP4, click Properties > Make it "Use The Following DNS Server Address" Preferred DNS Server : 8.8.8.8 Alternative DNS Server : 8.8.4.4 that wor...
{"OriginalQuestionIds":[20461165],"Voters":[{"Id":16343464,"DisplayName":"mozway","BindingReason":{"GoldTagBadge":"pandas"}}]}
"root element" is not really a thing here. The browser will see the component deeply embedded in the layout and page. You can make your own root: ```html <div class="root"> <div class="foo"> <div>Hello</div> <div>World</div> </div> <span class="foo2"> Second root eleme...
This only list key which are enabled credential = AzureCliCredential() secret_client = SecretClient(vault_url=f"https://{keyvault}.vault.azure.net", credential=credential) return secret_client.list_properties_of_secrets()
in my case, i have to Click on my Target->Build Settings-> search for "Other Linker Flags" and added "-fprofile-instr-generate".
Is there a way to create a column from a single string value that is inherently and by default already a string column and not an object column? An object column uses too much memory, and I don't want to spend any time casting an object column back to a string column. ```python df = pd.DataFrame(dict(a=range(10...
We have a large number of databases running on a SQL Database Server in Azure. We're trying to automate some basic functions, in this case, setting the LTR policy on all new databases, so there's no chance of one slipping through the cracks and not getting set. Is there anyway to automatically assign LTR policies? ...
How to automatically assign Long Term Retention (LTR) policy to new databases