instruction
stringlengths
0
30k
JSON Parsing Error in Java Spring Function
null
There is a difference in SwiftUI between a `View` instance being created and that counting as the view "appearing". Creation of the tree of view structs happens all the time, and then SwiftUI's diffing mechanism compares the new tree with the current tree to decide what has appeared or disappeared and what just needs a...
Xampp not connecting to DBForge what to do? [xampp] (https://i.stack.imgur.com/xycb6.png) [dbforge] (https://i.stack.imgur.com/aCrDu.png) I clicked on xampp mysql start and opened dbforge then i clicked to new connection in dbforge but the user and root did not popped up only that window what i attached h...
Before committing a record to the database, I want to do a sanity check on a certain field. More precisely, it is an ArrayField and I want to remove any NaN/None values and replace them by zero. However, there are many ways to create said record. A user might `MyObject().save()`, or `MyObject.objects.create()`, or `...
Strange behavior with FileReader()
|jquery|filereader|
null
I have this problem, y really don´t understand how can i fix it. Please i need help with this. The label's for attribute doesn't match any element id. This might prevent the browser from correctly autofilling the form and accessibility tools from working correctly. To fix this issue, make sure the label's for attr...
Incorrect use of <label for=FORM_ELEMENT>
|html|
null
{"Voters":[{"Id":537064,"DisplayName":"Null Pointers etc."}]}
I'm creating a [DTD][1] for an xml document. I have an [Enumerated attribute][2] for an xml element. My question is: Can the attribute **Type** have spaces? eg: <!ELEMENT Link (#PCDATA)> <!ATTLIST Link Type (Amendment|Reference|Superseded|Modified| Corrigendum|Corresponds|Endorsement|Equiva...
There Some doubts about used RDBMS. I will offer a solution without using regexp. ``` select id,words ,string_agg(w,'-' order by rn) newWords from( select * ,row_number()over(partition by id order by (select null)) rn ,count(*)over(partition by id order by (select null)) cnt from(sele...
I have successfully implemented SMS based MFA on a Laravel project following the guide here: [https://www.nicesnippets.com/blog/laravel-10-two-factor-authentication-with-sms-example](https://www.nicesnippets.com/blog/laravel-10-two-factor-authentication-with-sms-example) and AWS for SMS messaging. This works really we...
I have a dataset from flights. The airplane communicates with a ground station and through GPS I have the distance between the current airplane location and the ground station location, alongside with the respective longitude, latitude and altitude. What I need to do now is convert the long, lat, alt position data int...
I have developed a scientific application to measure the area of shapes drawn on a scanned paper using canvg (version 3. something). The application works mostly fine (in Chrome), but gets really slow after a lot of small areas are selected. var s = canvg('canvas', inp_xmls, {ignoreMouse: true, ignoreAnimation: ...
I have one View that allows the user to select exercises from a list (NewRoutine), assign them to a day of the week, and then save them. Then I have another view that displays the exercises that the user selected, organized by day of the week (YourRoutines). However, in testing when I select multiple exercises and assi...
ModuleNotFoundError on .ipynb
|python|pandas|jupyter-notebook|modulenotfounderror|
null
{"Voters":[{"Id":354577,"DisplayName":"Chris"},{"Id":522444,"DisplayName":"Hovercraft Full Of Eels"},{"Id":546871,"DisplayName":"AdrianHHH"}],"SiteSpecificCloseReasonIds":[18]}
|python|pip|pycharm|
In such cases `for` loops can be much faster. > for (s in seq_along(my_list)) { + x <- my_list[[s]] + if ('col3' %in% names(x)) { + x$col3[is.na(x$col3) & x$col1 %in% c('v2', 'v3')] <- 'VAL' + my_list[[s]] <- x + } + } > my_list [[1]] col1 col2 co...
Django: changing contents on a field on every save-like action
|django|
If I understand correctly, you have a bunch of pins in your data source, the map only displays what's in view, and you want to list only the pins in view. Unfortunately, this is a bit more complicated than I'd like due to the map supporting rotating and pitching (a bounding box won't property represent the map viewa...
SwiftUI View not displaying data properly
|arrays|swift|database|view|foreach|
Using GNU awk for arrays of arrays and length(array): $ cat ./tst.sh #!/usr/bin/env bash arr=(test,meta my,amazon test,amazon this,meta test,google my,google hello,microsoft) printf '%s\n' "${arr[@]}" | awk -F',' ' { vals_locs[$1][$2] } END { for ( v...
How to create data file path if not exists in postgres server using userchangelog.xml file changeset id i tried following ways but getting many errors. can any one suggest how can we create data file path from the application if it doesn't exist at the location while creating database using changesets ` DO ...
postgresql create data file path from application using userchangelog.xml file a
|java|postgresql|liquibase-sql|
null
One of the methods of my Entity class had a subclass type constraint with more than one target class, e.g. `protected virtual SomeMethod<T>(T arg): where T: Foo, Bar`. Not the comma-separated list after the `:`. NHibernate chokes on that, because of this code in the proxy generation code (GenerateMethodSignature()...
Removing ```jaxws-rt``` dependency resolved the issue.
null
The apk needs to be zipaligned with parameter '4' for this specific purpose. If an external apk is used, then zipalign must be done manually or else the .so file inside the apk will refuse to load because of the wrong alignment. Even though you might think that the gradle build of your app already did a zipalign, that ...
OS: vxWorks<br> I'm using `select()` system call to enforce timeout on serial port read functionality.<br> I am working on an IMU with data rate of 1000 Hz (IMU sends data every 1 ms).<br> The baud rate is 921600.<br> Every packet transfer is 36 bytes long. I calculate data transmission of 388-400 us per data trans...
I am creating a secured back-end for a new app with Keycloak and NestJS. I imported my realm with clients and user in it and I am trying to get the token and access protected data through Insomnia. Trying to reach endpoint ```{{ _.baseUrl }}/protocol/openid-connect/auth``` with a ```POST``` request passing data thro...
HTTP request to keycloak with insommia
|oauth-2.0|keycloak|insomnia|
|sql|ms-access|
I have the exact same issue as the person who asked this question: https://stackoverflow.com/questions/74039512/fatal-unable-to-access-https-gitlab-xxxx-send-failure-connection-was-rese. They got it working again by disabling their antivirus. When I attempt to execute `git push -u origin main` or `git fetch`, I enco...
I need to color a table column background using Bootstrap. It was working before as follows: ```html <html> <head> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" integrity="sha256-PI8n5gCcz9cQqQXm3PEtDuPG8qx9oFsFctPg0S5zb8g=" crossorigin="anonymous"> </head...
I don't know when this was added, but it is present in Safari on El Capitan (Safari 9.0). It works the same as in Chrome (right click in the console window and select "Keep Log on Navigation"). **Update:** As per [Daniel Compton's answer](https://stackoverflow.com/a/46508266/792525), in Safari 11+ this is now under...
I am working in a CMS (Modern Campus) that is XML-based. XSLT is still a thing i'm attempting to learn on the fly, so I am not well-versed in this area yet. Our CMS is building a blog feed (which we use for news) using the following code: <items> <!--Internal News Articles--> <xsl:for-each select="$...
|python|opencv|mss|
null
It's basically a one-liner with the modern APIs (iOS 14+) ``` let limit = 10 //... TextField("", text: $text) .onChange(of: text) { text in self.text = String(text.prefix(limit)) } ```
Yes, vanilla SwaggerUI supports PKCE! I run SwaggerUI with PKCE in docker with the following command: docker run --rm -p 80:8080 \ -v ~/Desktop/SWAGGER_UI:/foo \ -e SWAGGER_JSON=/foo/my-service-openapi.yml \ -e OAUTH_CLIENT_ID=my-service-client-id \ -e OAUTH_SCOPES="openid offline" \ ...
There is no way that EF Core is bypassing your triggers. There must be a bug in the trigger logic. Your trigger as it stands may or may not be correct, but it uses a huge amount of Bad Stuff: * Cursors, instead of a joined update. * You would need to join `inserted` and `deleted` using a full-join, although in thi...
null
I'm trying to show/hide more info about names on click, but don't know how to make it work of a single click. I'm creating a div with JS like so: const newDiv = document.createElement("div"); newDiv.className = "game-info"; newDiv.innerHTML = ` <p onclick="toggler()";>${game.Name}</p> <div...
How can I remove one of the clicks from hide/show?
|javascript|jquery|onclick|
null
I ran into the same issue and have found a workaround. In my viewmodel I have an ObservableCollection Projects which is displayed using a CollectionView on my ContentPage. Then I have the following method: public async Task ReloadProjects() { var temp = Projects.ToList(); Projects.Clea...
here is the link to my gist https://gist.github.com/tomleejumah/d11d1996bce8957c140c90e7856e01eb I do have a bug in fetching whereby it doesnt fetch Im requesting help in debugging
How to work with youtube dl android library
|android|rx-java|youtube-dl|
{"OriginalQuestionIds":[7395542],"Voters":[{"Id":523612,"DisplayName":"Karl Knechtel","BindingReason":{"GoldTagBadge":"python"}}]}
It is the `@abstractmethod` decorator that is causing you problems. It's because use of this decorator implies that a method must be overridden, which conflicts with the use of protocols as a mechanism for type checking rather than behavioral enforcement. The point of protocol is to define an interface that other class...
Sorting items after building an XML feed?
|xml|xslt|
While this is *legal* in that you can write it and it will execute correctly, it seems very ugly to me; a simple `if`...`else` would appear to be able to express the intent while actually being clearer. I would even go as far as to say that I would expect that to normally be true. ```tcl # Just the bit inside the s...
I'm making a quick draft for a project I'm doing and I can't seem to get winsound module to work. Well the module would load no yellow error line, and won't tell me that it doesn't exist. It even does the rest of the lines opening up the browser. But the audio doesn't play, --------------------------------------------...
Winsound not working isn't working at all
|python|audio|
null
Encountering issue regarding 'pip install bytetrack' on my pycharm project
I am working with a school project where I need to obtain the analyst price targets estimates of certain stocks from the Yahoo Finance Website (this is mandatory). When I tried to use it by beatiful soup I couldn't scrape it (I believe JS is adjusting the page as it laods), so I turned to selenium to obtain such da...
|excel|vba|solidworks|
I want to generate apk in vs code by command `flutter build apk` but after execute it in vs code terminal, returns this error : > No Android SDK found. Try setting the ANDROID_HOME environment variable. [![enter image description here][1]][1] So i defined `ANDROID_HOME` in environment variable : [![enter im...
I have logic app that needs to read messages from teams which I want to provision via terraform on portal I can login to teams with my user and connection works. I am not sure how to setup api-connection teams and how to pass my user for login inside Iac? any idea this is my team api-connection? ``` resource "...
logiapp teams api connection terraform user sign in
|terraform|microsoft-teams|azure-logic-apps|
I think this could be best achieved by: select my_column, row_number() over (order by my_column) as No from my_table
Log retation setting for ECS
{"Voters":[{"Id":1744164,"DisplayName":"Sir Rufo"},{"Id":1136211,"DisplayName":"Clemens"},{"Id":426185,"DisplayName":"Andy"}],"SiteSpecificCloseReasonIds":[13]}
A minute ago, I wrote a function without return of finding max value in C++, ```cpp #include <iostream> #include <algorithm> using namespace std; int myItem(int x, int y, int z) { int a = std::max(x, y); int b = std::max(a, z); // return b; } int main() { cout << myItem(2, 5, 16); } ...
Why it returns max anyway?
|c++|return|
null
Since I was not so versed at awk, I tried python for the job. Interestingly I need much more code than in awk. But it delivers the requested output and is readable. Though it still can be improved in style and campactness. Btw it seems you don't need the keyword "pac". public AResponse retrieveA(ARequest req){ ...
Dialogflow Webhook response format (Dialogflow messenger)
import pandas as pd import numbers data = {'value':[100, 150, 200, 250], 'coupon':[3,'-',4,5], 'income':[3,'-',8,'-']} df = pd.DataFrame(data) def filler(value, coupon, income): if not isinstance(income, numbers.Number) and isinstance(coupon, numbers.Number): in...
Here are three improvements for your post: 1) The logic for your states looks 'pulled out' or extracted from the original state machine process and put into separate processes. I put it back for you so that you no longer have separate processes, which eliminates the possibility of multiple drivers which was pointe...
I am unable to create a build with this command: `docker build -t feedback-node .` Although docker was working fine previously. I have also tried almost all the available suggestions but found nothing that could resolve it. [![This is the snapshot of it ](https://i.stack.imgur.com/igImj.png)](https://i.stack.imgur....
I am working on a Flutter web project with firebase authentication. When I select "All exceptions" in the breakpoints tab in visual studio code I get this exception: > FirebaseError: Firebase: No Firebase App '[DEFAULT]' has been created - call initializeApp() first (app/no-app). I have looked all over the place...
|flutter|firebase|dart|
null
I have a neo4j graph: (person)-[like]-(fruit). I want to find person of person of person recursively using [like] and (fruit). For example, (John)-[like]->(Apple)<-[like]-(Sam)->[like]-(Banana)<-[like]-(Jack)-[like]->(Grape)<-[like]-(Lisa)... How can I query this relationship using the neo4j?
If I understand your logic correctly, this is easily done using `ave`. > transform(asd1, id=ave(a, x, FUN=\(x) c(x[-1], NA))) x a b id 1 g 1 5 3 2 g 3 6 5 3 g 5 7 NA 4 h 1 8 7 5 h 7 9 8 6 h 8 5 NA > transform(asd2, id=ave(a, x, FUN=\(x) c(x[-1], NA))) x a ...
I'm not sure where to start with this one. I have a list of obsolete items with a new item_code listed somewhere in the description column. Item codes are always between 8 & 12 characters so all other numbers in the description should be ignored. import pandas as pd df1 = pd.DataFrame({'Item_Code': ['00...
Python 3 Data Frame string manipulation to extract numbers between 8 to 12 characters
|python|python-3.x|
I use https://webgpu.github.io/webgpu-samples/ I wanna integrate simple texture to the https://webgpu.github.io/webgpu-samples/?sample=shadowMapping example. loadTex (this.texture0) ```js async loadTex0(texturesPaths, device) { return new Promise(async (resolve) => { const response = await ...
I have 4 LEDs which represent left, right, open and down. I also have a Joystick. My goal is it to light up one LED and move the joystick to this direction. I am almost finished, but I am now realising, that my code only checks the Joystick position when the LED is set On (really short timeframe). How can I let my ...