instruction
stringlengths
0
30k
Im creating my own version of a `MarkDown` render. My goal is to read a string or file line by line then return the `MD` rendered as `HTML`. The problem im facing is my return and line by line functionaility is not-returning what I want and I dont know why. Ive tried debugging but everything seemed fine. Ive also trie...
|python|openpyxl|
null
I am trying to replicate a paper, but I am having trouble with unstable training. More precisely, rerunning the code yields wildly different results. However, I think that there are 4 main patterns. The model and the training are as shown below (full code at https://www.kaggle.com/code/adelphene/dagmm): ```python...
I had the same issue and finally figured it out. you should not use the init method, instead pass the fields directly to you custom retriever. `class QuestionRetriever(BaseRetriever): vectorestore:VectorStore docstore:Docstore def _get_relevant_documents(self, query, run_manager...
I'm encountering an issue with implementing dark mode styles in my web application. I've followed the recommended approach of using Tailwind CSS's built-in dark mode support by adding the 'dark' class to the HTML tree, but for some reason, the dark mode styles are not being applied. Specifically, I'm trying to get ...
TailwindCSS DarkMode styles not applied to elements when toggling 'dark' class to HTML tree
|javascript|reactjs|tailwind-css|vite|tailwind-ui|
null
``` public void run() { try { BufferedReader inFromClient = new BufferedReader(new InputStreamReader(clientSocket.getInputStream())); DataOutputStream outForClient = new DataOutputStream(clientSocket.getOutputStream()); String request = inFromClient.r...
Property #<propertyname> from class <class> is not implemented
|typescript|
I'm using `JanusGraph-1.0.0` with `Cassandra-4.1.3`. By using `JanusGraphManagement`, I am able to set edge TTL. However, I cannot update the edge TTL later. I cannot find specific API to update edge TTL. So I used [`mgmt.setTTL()`][1] method to set and update TTL. Below is the code, JanusGraphManagem...
How to add "backtick" (`) with a Turkish keyboard as developers use it especially in JS?
I'm studying about postfix increment operator in JAVA, and curious about why the result is 6 when coding like this. ``` int b = 3; b += b++; System.out.println(b); ``` I think that due to the += operator, 3 is added to 'b', making it 6, and then due to the ++ operator, 1 is added to 6, resulting in ...
Postfix increment operator in JAVA
|java|postfix-operator|
null
> I already made a helper method to that in one of my projects you can use it static DateTime getDateOfWeekday(String shortDayName) { final Map<String, int> dayNumbers = { 'Sunday': 7, 'Monday': 1, 'Tuesday': 2, 'Wednesday': 3, 'Thursday': 4, 'Friday': 5, ...
JavaScript For, functions and mixed return
|javascript|html|markdown|renderer|
null
I can't set the bvoders , shadows of fonts, and the position fixing. I tried css tab in Style panel but it doesn't work. I can't set the bvoders , shadows of fonts, and the position fixing. I tried css tab in Style panel but it doesn't work. I can't set the bvoders , shadows of fonts, and the position fixing. ...
set some custom csss styles in Leadpages
|css|border|
null
At the time of writing, it is still possible to buy a downloadable copy of LocoLink for Windows on eBay. This is a 16-bit PC application that can convert LocoScript documents to a variety of 1990s formats such as RTF, Word 5.0/6.0 or WordPerfect 6.0. (In your query, you use the word 'Data'. If you are using this to ...
``` class Dummy { public string $foo = 'initialized'; public string $bar; // uninitialized } $normalizer = new ObjectNormalizer(); $result = $normalizer->normalize( new Dummy(), 'json', [AbstractObjectNormalizer::SKIP_UNINITIALIZED_VALUES => false] ); // throws Symfony\Component\Prope...
I have a numpy array that contains both sub-arrays and an **integer**: ``` mixed_array = np.array([np.array([1, 2]), np.array([1, 2]), 0]) ``` I want to mask the array so that I am left with only the sub-arrays and not the **integer**. ``` mixed_array = np.array([np.array([1, 2]), np.array([1, 2])) ``` I am...
I have a numpy array that contains both sub-arrays and an **integer**: ``` mixed_array = np.array([np.array([1, 2]), np.array([1, 2]), 0]) ``` I want to mask the array so that I am left with only the sub-arrays and not the **integer**. ``` mixed_array = np.array([np.array([1, 2]), np.array([1, 2])) ``` I am...
Cant read the whole response from the HttpURLConnection I want to achieve that for My Proxy Server?
|java|proxy|inputstream|httpurlconnection|http-proxy|
> is there any way of triggering a linker error if a pointer finally evaluates to NULL? Assuming that you mean: is there a way to make a program fail to build (at compile or link time) if the program might at _execution time_ try to dereference a `NULL` pointer, the answer is no. Detecting whether a program may d...
{"Voters":[{"Id":9072753,"DisplayName":"KamilCuk"},{"Id":1362568,"DisplayName":"Mike Kinghan"},{"Id":50617,"DisplayName":"Employed Russian"}]}
ChromaDB does have similarity search. The default is L2, but [you can change it as documented here][1]. collection = client.create_collection( name="collection_name", metadata={"hnsw:space": "cosine"} # l2 is the default ) [1]: https://www.trychroma.com/usage-guide
We are in process of upgrading Spring boot 2.7 to 3.2 As part of this upgrade, I upgraded java 8 to java 18 and some other necessary updates too. I updated jaxb schema to jakarta ee and version 3.0. I changed namespace from java.sun.com to jakarta.ee Similar changes are made in global-bindings.xml, jaxb-bindin...
abstract class Resource( var id: Long = 0, var location: String = "" ) data class Book( var isbn: String ) : Resource() to fill out: Book( isbn = "ISBN" ).apply{ id = 1 location = "Test" }
No worries, I got the solution.. from pyspark.sql.window import Window from pyspark.sql.functions import row_number spark = SparkSession.builder.getOrCreate() inputData = [(100, "ABC", 2000), (100, "XYZ", 1000), (100, "CDE", 750), (200, "GYT", 1500), (200, "JHU", 1200...
Microsoft has changed its XSD which now states that there may be **multiple** font settings and **multiple** size settings in one run property. That's why `XMLBeans` now generates code for `List`s and/or `Array`s of those elements in `CTRPr`: `CTRPr.getRFontsList` now vs. `CTRPr.getRFonts` in past, `CTRPr.getSzList` n...
Subset or filter your data by the year you want to plot via `subset` or `dplyr::filter` or ... or use facetting if you want plot both years in one plot. Using some random example data try this: ``` r library(usmap) library(ggplot2) library(dplyr, warn = FALSE) # example data set.seed(42) df <- usmapdata::...
null
I was doing some work with deque which my friend taught me 1 day ago ( the same friend who had me do the int wihtout inting problem). But anyways, i noticed deque seemed to be incredibly fast so I wrote some code comparing deque finding the median by removing 1 by 1 to a standard list removing 1 by 1. In the test, dequ...
Why is deque so quick?
|python|
null
I'm pretty sure that this is a problem with the SBCL repl itself, and possibly a problem with the way that you are introducing strings into your code. As far as the repl is concerned, the SBCL repl is not really actively developed; most lispers are probably using Slime or something similar for repl development. This...
I am trying to make an application that teaches English words, sentences and phrases. Can you help me how to design the database of this application? Notes: -I use c# and mssql --Win Forms-- I can't upload them all here, so I'll leave the link https://drive.google.com/drive/u/1/folders/158X_TwNhbrCc6d_zldutBd8D0-V...
you need to do just 1 change that is, in the inner loop, start y from x+1, `for (int y=x+1; y<=n; y++)` and all set
I have rewritten your `is_prime` and `largest_prime_under` functions. #!/bin/bash is_prime() { local n="$1" if (( n==2 )) || (( n==3 )); then return 0 # 0 is 'true' in Unix sh convention.. fi if (( n<1 )) || (( n % 2==0 )) || (...
It's because your fetcher caught and "handled" the error, and then is simply returning it. The loader sees this as just a normal return value. Re-throw the error so the loader can "catch and handle" it. ```typescript export const fetcher = async (url: string, method: string) => { try { const response = a...
You are checking the type of passed argument `A` in this case which you passed into your class as a list. If you check the type of your instance variable, `self.A` in this case, it will result to `<class 'numpy.ndarray'>`
{"Voters":[{"Id":207421,"DisplayName":"user207421"},{"Id":6752050,"DisplayName":"273K"},{"Id":349130,"DisplayName":"Dr. Snoopy"}]}
I have the object reference overloaded to return a value, for example: class MyClass : public MyClassInterface { public: virtual ~MyClass() override; operator const int&() const override { return m_value; } private: int m_value{}; }; to get t...
The ID-s are the correct 18 number ones from discord, the intents and bot rights are set properly, yet both fetches come back with None. ``` import discord from discord.ext import commands intents = discord.Intents.default() intents.members = True bot = commands.Bot(command_prefix='!', intents=intents) @bo...
Why aren't my member variables filled when I use discord.utils.get()?
|python|discord|discord.py|
null
C++ skips line when promting for user to enter name of person being added to a string array
|c++|debugging|
null
When you click on the product link, it's directing you to /product/api/product/2 instead of /api/product/2. This could be due to the way you've configured your Django URLs or how you're handling routing in your React application. Double-check your Django URL patterns to ensure that /api/product/str:pk/ is correctly...
This is my react native code for a button, which shows a list of all pdfs and on select, I want to open the pdf withing the app. I am using Document Picker, react-native-pdf. I have been trying so many options but either get an actiond_document_viewer error or this storage permissions issue ``` const App = ()...
how should I make database relationships
|sql-server|database|
null
I know that YouTube Music exists, and songs in YouTube Music are just YouTube videos, so I used the videos.list() function in the YouTube API, and I can't find the ISRC, an identifier for a specfic recording, anywhere in the results. I have searched the API documentation, and can't find anything regarding this. Sinc...
I want to create a Vite app for a custom frontend framework named OWL. https://www.npmjs.com/package/@odoo/owl However, this framework is not available in the options that we get while creating the Vite app. It has only popular libraries/frameworks like Vue, React, etc. How to create a Vite app with this cu...
for the recursive query that you were going for in the question - I think the trick is to think inside-out, start with the leafs and traverse to the parents, concat the values on the way up and land at the top with the whole expression, eg: with leafs as ( select *, s = value from expression_tree t where not exi...
I have the input table below. I want to create a column called **Desired** where, for each row (as if iterating through each row), the **Desired** value is the sum of **Measurement**s (excluding the Measurement value in the row being evaluated) where **Lower** <= (the Lower value in the row being evaluated) and **Upper...
|java|groovy|properties-file|
Does a transaction occur in this case? ``` @RestController @RequestMapping("/api/v1/student/z") @RequiredArgsConstructor public class someServiceController { @Autowired public OtherSomeService othService; @GetMapping public ResponseEntity<?> someServiceControllers() { othService.Z(); ...
Does a transaction occur in this case?
|java|spring-transactions|
null
Garry Tan posted a JavaScript solution on [his blog](http://axonflux.com/handy-rgb-to-hsl-and-rgb-to-hsv-color-model-c) (which he attributes to a now defunct mjijackson.com, [but is archived here][1] and [the original author has a gist][2] - thanks to user2441511). The code is re-posted below (updated for post-ES5 ...
When I clicked on publish in vs 2022, it gives a dialog to choose specifications of my release when I click on show all settings the ef migrations gives this error. > Entity Framework Migrations > X dotnet tool install dotnet-ef > The tool package could not be restored. Tool 'dotnet-ef' failed to install. This fai...
null
Permission Denied while viewing a PDF file in a react-native app
|reactjs|react-native|react-native-pdf|
null
I'm currently using `Elysia@1.0.0`, and as far as I could tell (even from previous versions), you could use: ```typescript app.listen({ key: Bun.file(join(import.meta.dir, "./key.pem")), cert: Bun.file(join(import.meta.dir, "./cert.pem")), port: 3000, }); ```
I'm trying to build a podman compose file that uses nfs volumes for my containers. I can mount the volume in the container just find if I invoke it on the command line with "podman run -v", but if I put it in the file as below and run podman-compose, I guet the "name or service not known" error. ``` webui: ima...
Getting "Name or service not known" error when using podman-compose
|podman|podman-compose|
null
You have to wait till you get back the response from the external API. ``` export const handler = async (event) => { const data = await getReverseDictionary(); const response = { statusCode: 200, body: JSON.stringify(data) }; return response; }; ```
{"OriginalQuestionIds":[907806],"Voters":[{"Id":2943403,"DisplayName":"mickmackusa","BindingReason":{"GoldTagBadge":"php"}}]}
Hello StackOverflow community, I'm encountering issues while attempting to generate PDFs using Playwright within a Docker container for my AdonisJS application. Despite successful local development, I faced challenges with Dockerizing the project and encountered issues with TailwindCSS styles not rendering correctly...
I have a folder like this: ``` draft/ model/ a.py package/ b.py ``` I want to import a function inside a.py into b.py by this code `from ..model import a`. But I got an error like this: `ImportError: attempted relative import with no known parent package` I try the first answe...
ImportError: attempted relative import beyond top-level package
|python|importerror|relative-import|
null
I am consuming the Brawl Stars API, and to access it, a key tied to the IP address is required. So far, so good when I ran my application locally. However, when I deploy it, I don't have access to that IP to put in the key. I've been trying to solve this for a few months now, tried literally everything, and after weeks...
For a registered input, I failed to update it using my own custom hook. In my sample codes as shown below, the result2 didn't set to "bar" when the button was clicked, although r2 was updated correctly. import { useForm } from "react-hook-form"; import { useBar } from "./useBar"; function App() {...
I'm using Java not Kotlin and I have this code player = new SimpleExoPlayer.Builder(this).build(); spv.setPlayer(player); MediaItem mediaItem = MediaItem.fromUri(uri); player.setMediaItem(mediaItem); player.prepare(); player.setPlayWhenReady(true); player.addListener(new Player.Listener() { @Overri...
null
I have the input table below. I want to create a column called **Desired** where, for each row (as if iterating through each row), the **Desired** value is the sum of **Measurement**s (excluding the Measurement value in the row being evaluated) where **Lower** <= (the Lower value in the row being evaluated) and **Upper...
I want to implement Spring Cloud Kubernetes. I created this test project: https://github.com/rcbandit111/mockup/tree/master configuration: spring: application: name: mockup cloud: kubernetes: discovery-server-url: "http://spring-cloud-kubernetes-discoveryserver" ...
DiscoveryServerUrlInvalidException: spring.cloud.kubernetes.discovery-server-url must be specified and a valid URL