Recent Questions - Stack Overflow |
- How to select from joined table
- Virtual dog fence with ImageAI
- Why are nested loops considered as IN-EFFICIENT and BAD DESIGN and in code? What is the better alternative of nested loops?
- Asymptote compiled on Git Bash gives Cygwin Error
- Python 'ascii' codec can't encode character '\u05e5'
- Discarding Value of OUT Parameter of Procedure in Postgresql
- How to prevent dark mode inverting background images?
- RestClient and thread locking
- Heroku Discord Bot Offline
- vhdl advanced counter with load test bench fails
- Cannot render LaTeX in VScode Jupyter Notebook
- Dart Flutter sliderShow textFormField values on each page stay the same
- Model Validation using C# & RestSharp (Selenium project)
- Join Operation - Python
- identify groups with few observations in paneldata models (stata)
- Python "Replace" from central file
- How to access object properties before inizialization in JavaScript/ Typescript?
- SQL statement timing out on large data set
- what is best approach to query based on navigation property with EntityFramework
- How can I check for specific remote address before accepting a TCP connection in Omnet++ with INET?
- Export python output to password protected zip file?
- Running airflow with docker-compose behind nginx proxy (using nginxproxy/nginx-proxy and nginxproxy/acme-companion)
- Pandas: Read csv where all values are quoted and comma is used as decimal separator
- k8s cron job runs multi times
- how can i add a functionality ( with the framework .net ) in shopify?
- I can't figure out what exactly I'm doing wrong when trying to get array elements
- How to viewed bookin.php on cpdeigniter 4
- How to redirect Homepage to another page when user login
- starting a node.js page on localhost - the site can't be reached
- How to check if an element exists in DOM or not in JavaScript
How to select from joined table Posted: 27 Feb 2022 03:20 AM PST I have table with Orders. each order has a list of Products (another table). Each product has Promotion with name. I want to get a list of promotions names from orders not older than 12 months but without repeats. How should my sql look like? |
Virtual dog fence with ImageAI Posted: 27 Feb 2022 03:20 AM PST I'd like to detect when my dog sets foot in the lawn. I have a fixed camera that streams a live video of my backyard, including the lawn. With the help of ImageAi I was able to quickly create code that tracks my dog in the video. I'm wondering how should I detect when the dog actually sets foot in the lawn, as opposed to just roaming about the backyard. At this moment, my naive approach is to create a polygon that traces the contour of the lawn in the video feed, and see if the tracked dog's bounding box is mostly within this lawn polygon. Any advice? |
Posted: 27 Feb 2022 03:20 AM PST So I've written some java code, which converts a phone number (123456789) to corresponding English words (one two three four five six seven eight nine). This java program also identifies the DOUBLE and TRIPLE consecutive occurrences of the numbers. In such a case, the first occurrence will be read as an individual number, followed by a "double" or "triple" occurrence of a number. For example, the number "1 2 222" will be read as "ONE TWO TRIPLE TWO". Here are the problems I believe are worth discussing: Question 1. Why is this considered a bad design, due to these nested loops (especially for production code)? What is the better alternative to nested loops? Question 2. How do we make this code scalable, If we add more functionality to this program? The explanation for Q2: For instance, if there are FOUR consecutive numbers, print 'quadruple'. If FIVE consecutive numbers, print 'quintuple'. If SIX consecutive numbers, print 'sextuplet'. PS: My naive approach, to solve Q2 is: to write another function to print 'quadruple', a separate function to print 'quintuple', another function to print 'sextuplet', and so on. This approach sounds pretty old-fashioned and ineffective though I'm open to your feedback and suggestions which I believe might help me improve. |
Asymptote compiled on Git Bash gives Cygwin Error Posted: 27 Feb 2022 03:19 AM PST I recently installed Asymptote 2.78 and GhostScript 9.55 (as the MikTeX installation on Windows screws them both). I also deleted the old MikTeX packages. I wanted to compile a LaTeX file with asymptote code in it. When I compile it, MikTeX again downloads the old Asymptote (which I then delete) and produces a *.asy file. I have the asymptote exe here: Now here's the funny bit: I have not installed Cygwin on my Windows machine whatsoever. I even searched my computer using the Everything Search engine. There is no other cygwin1.dll. But there are some other cygwins belonging to Git. When I run the stuff from Windows Command Prompt, it works (even when I do not delete the MikTeX asy)! This is when I do |
Python 'ascii' codec can't encode character '\u05e5' Posted: 27 Feb 2022 03:19 AM PST In python I have: where When I run my program on macOS it works fine, I tried another Ubuntu machine and got: Why I understand what the error means I don't understand what '\u05e5' it's talking about and why it works in one machine and not the other... |
Discarding Value of OUT Parameter of Procedure in Postgresql Posted: 27 Feb 2022 03:19 AM PST Is there anyway to ignore the OUT parameter of a procedure? I have a simple example procedure. I always need to o_result out but only sometimes need the error message depending on the situation. When calling the procedure I have to assign o_error to a variable or I get a SQL error (procedure not found). I've tried using NULL as the outbound variable when I call the procedure but that results in a different SQL error. Is there anyway to ignore the o_error parameter when writing the CALL line, without having to assign a variable to it. Not a major issue just trying to remove some varaibles if not needed. |
How to prevent dark mode inverting background images? Posted: 27 Feb 2022 03:19 AM PST I have a background image which gets inverted when a device is in dark-mode. When using it is not preventing the background image from getting inverted. Actually my whole webpage is already in dark colors. Could I force the dark mode to stop at all? If not, how can I prevent the image from getting inverted? |
Posted: 27 Feb 2022 03:19 AM PST Using Delphi 10.4 Using the tool REST Debugger, called an API, And got compoents. Calling the Componets with when i debug the code and in the Execute there is a line which leads to the procedure: and the code locks. I think its a dead lock, however I don't know what is locked. the setup is a Thread in console application. The Documentation of RestClient is lacking. What it is locked? or How to identify the locking procedure? |
Posted: 27 Feb 2022 03:19 AM PST Apparently I have followed every step here and I haven't encountered any issues in the build logs although my bot is offline. Any fix? |
vhdl advanced counter with load test bench fails Posted: 27 Feb 2022 03:19 AM PST I have been given a counter built with mux and flip flop. The counter has enable and load in order to start counting from a specific value and not only from 0.This is counter's image. the code for all the implementation is as follows: mux2to1: d flip flop: counter: testbench that I have write: And here is the image of the wave: wave image |
Cannot render LaTeX in VScode Jupyter Notebook Posted: 27 Feb 2022 03:19 AM PST I have homework in VScode Jupyter Notebook but I get a lot of ParseError in it when displaying the LateX. The error is for example one of the Markdown cells is and the jupyter cannot render it I guess? (I am not very familar with LateX) and will get the following error parse error |
Dart Flutter sliderShow textFormField values on each page stay the same Posted: 27 Feb 2022 03:18 AM PST I have such an application: The application purpose is to query whether the word entered in the textFormField corresponds to the meaning I keep in the list. This is a language app. The above screen is the test part. I give the person a word and ask him to write it in Turkish. But there is a problem here. I am using CarouselSlider for testing. Each slider screen has a textFormField. But every time I change the page, the value in the textFormField from the previous page remains. Example: Slider page 1: Slider page 2: The "Kontrol et" button is querying the correctness of the entered word. I want the textFormField to be reset and empty on every page change. How can I do that? Codes: Thanks in advance for the help. |
Model Validation using C# & RestSharp (Selenium project) Posted: 27 Feb 2022 03:18 AM PST I'm using C# & Restsharp in order to create HTTP calls to one of our API's. I'm struggling with the Response retrieved by the API. I'd like to validate the model structure but didn't find any decent way of doing that on my side (handling the response). For instance, I have a DTO object as the follow: Sometimes, the Response object can include only the FirstName, without having the LastName and PhoneNumber at all and sometimes it might include more properties (Country, PostalCode etc...). I should validate that the What's the best approach of doing that? |
Posted: 27 Feb 2022 03:19 AM PST How to use inner join operation properly in Python? I have two dataframe that I need to combine using join. Here is the source code: Below is the error I am getting when running on to this code: [1]: https://i.stack.imgur.com/NdEY2.png |
identify groups with few observations in paneldata models (stata) Posted: 27 Feb 2022 03:20 AM PST How can I identify groups with few observations in panel-data models? I estimated using xtlogit several random effects models. On average I have 26 obs per group but some groups only record 1 observation. I want to identify them and exclude them from the models... any suggestion how? My panel data is set using: |
Python "Replace" from central file Posted: 27 Feb 2022 03:18 AM PST I am trying to extend the replace function. Instead of doing the replacements on individual lines or individual commands, I would like to use the replacements from a central text file. The text file would have the structure 'papa', 'papi 'dog', 'dogo 'cat', 'kitten etc. Is this possible? I can't find any help Googling. But it could well be that I do not know the right terms or can not formulate. |
How to access object properties before inizialization in JavaScript/ Typescript? Posted: 27 Feb 2022 03:20 AM PST I need to create a "Themes" object, which should contain all the themes with the colors I need for an app. I would like to use some of its variables to change its others. For example, having the "disabled" property set to the text color of the object + some opacity. I tried to achieve this by using this.variableName in template literals strings but I get an error saying I can't access it before initialization. Is there any way to achieve this without having to copy-paste the text each time manually? Code sample: |
SQL statement timing out on large data set Posted: 27 Feb 2022 03:19 AM PST Trying to complete a web process, I'm getting the error Index per table:
|
what is best approach to query based on navigation property with EntityFramework Posted: 27 Feb 2022 03:20 AM PST Consider these two classes: What I want is to get invoices by their last status witch is last However, I really don't think this would be good idea as matter of performance and coding (repeating some expression everywhere ). I know I can write a function which generates an expression based on status and can use that expression in body of would have good performance. I would appreciate any suggestion |
How can I check for specific remote address before accepting a TCP connection in Omnet++ with INET? Posted: 27 Feb 2022 03:19 AM PST I'm currently having a problem with my module which uses TCP in Omnet++ with INET. I have typical client-server scenario where a server is listening for clients. I'm trying to figure out how to have control over which remote IP is actually accepted. Usually, if server is not listening for clients at all, following pattern can be observed: I want to check My module implements interface Is there any way to do this? I'm working with pretty much the newest version of INET. Thanks in advance |
Export python output to password protected zip file? Posted: 27 Feb 2022 03:20 AM PST I'm on the last step of a program that I have been creating. I have to export the output of my python program as a password protected zip file (I have been following these instructions). I was looking to use the pyminizip package to do so, but it will not install on my mac. The following error message appears in my terminal: Having no clue how to even deal with packages, I am a bit confused in terms of how to approach the issue. Is this because I have a mac, and if so, what other approach could I take to export my list as a password protected zip file? |
Posted: 27 Feb 2022 03:18 AM PST I am running airflow 2 with docker-compose (works great) but I cannot make it accessible behind a nginx proxy, using a combo of nginxproxy/nginx-proxy and nginxproxy/acme-companion. Other projects work fine using that combo (meaning, that combo is working fine) but it seems that I need to change some airflow cfgs to make it work. The airflow docker-compose includes the following: Airflow can be reached under the (successfully encrypted) address, but when one opens that url it results in the "Ooops! Something bad has happened." airflow error, more specifically a "sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) no such table: session" error, even though it works fine when not behind the proxy. What am I missing? |
Pandas: Read csv where all values are quoted and comma is used as decimal separator Posted: 27 Feb 2022 03:19 AM PST I am currently trying to import a csv file in pandas that has a less than perfect format, as all the values including numbers are quoted. The format looks like this: Now, I have tried importing this using the following command: So I have basically been trying to tell pandas that the decimal separator is comma, that the field delimiter is semicolon, and that the column "Amount" should be parsed as floats. However, trying to parse the file, I still get the error message: I assume the combination of the quotes and the comma decimal separator somehow is too much for pandas, even though I think I have technically provided it with all the information it needs. The file is an export from a third-party program, so unfortunately I have no influence on the format. Does anyone know how to get pandas to swallow this? Bonus question: If I read this file without providing explicit data types, I don't get any columns of type "string" as I would have expected, but instead "object" is used. Why is that? |
Posted: 27 Feb 2022 03:18 AM PST I've the following cronjob which delete pods in specific namespace. I run the job as-is but it seems that the job doesnt run for each 20 min, it runs every few (2-3) min , what I need is that on each 20 min the job will be start delete the pods in the specific namespace and then terminate , any idea what could be wrong here? Im really not sure why this happen... Maybe the delete of the pod collapse |
how can i add a functionality ( with the framework .net ) in shopify? Posted: 27 Feb 2022 03:18 AM PST I has created eshop in shopify and I want to add a functionality ( with the framework .net ) in shopify but I don't know how.... I searched on the internet but I didn't find anything just I found this link from the ShopifySharp github but I didn't understand how to use it. Who can help me? |
I can't figure out what exactly I'm doing wrong when trying to get array elements Posted: 27 Feb 2022 03:19 AM PST Sorry if there's too much code, I'm just afraid it won't make sense otherwise. So I'm creating a currency converter with JS, React, Mobx and MVVM pattern. The idea is that I'm getting rates from API, and the output is cards with currency name, rate and fluctuation. I'm stuck here. Apparently what I commented out doesn't work because I have many cards and I can't get data for all of them from the first card and I see the error "can't read property of undefined - currencyType) So I tried to get the correct rate for each card from this.model - CurrencyCard, but this didn't work either. So the thing is, I'm creating an array of cards in Store. And in CardViewModel I believe I need to get one rate for a card. Then I pass this data to Card where the output is one card with the correct data. And then I'm creating a CardListViewModel and a CardList to output a list of cards. CARDSTORE So when I try to output one card, it requires that there's a prop card inside the in App.tsx, and creates one card but with the data I pass (like <Card card={new CurrencyCard('blabla', 50)} And when I try to output CardList, nothing happens and I have no errors in terminal or console. I would really appreciate some help because I'm stuck and just very tired already. |
How to viewed bookin.php on cpdeigniter 4 Posted: 27 Feb 2022 03:19 AM PST I'm calling the file called booking.php with Codeigniter 4, but I'm getting an error. Although I add the following lines to Home Controller, the page does not appear, where am I going wrong? I'm calling the booking.php file, but it gives an error. as sitename.com/booking but I can call index.php as above. Again, I can't call a different /urly like /booking /contact etc |
How to redirect Homepage to another page when user login Posted: 27 Feb 2022 03:19 AM PST I have a wordpress that users can register and become a member, and how do I get my homepage https://sample.com redirected to the settings page https://sample.com/setting for example. so when the user login, they cannot access the homepage which is https://sample.com |
starting a node.js page on localhost - the site can't be reached Posted: 27 Feb 2022 03:20 AM PST I'm on Chrome / Windows 7 and trying to make my first node.js steps using this tutorial:
So Going on Firewall is completely off. Any help? |
How to check if an element exists in DOM or not in JavaScript Posted: 27 Feb 2022 03:19 AM PST I removed an element from DOM with this code : How can I check if I want this because if I'll try to remove it from the DOM again, this will cause an error. |
You are subscribed to email updates from Recent Questions - Stack Overflow. To stop receiving these emails, you may unsubscribe now. | Email delivery powered by Google |
Google, 1600 Amphitheatre Parkway, Mountain View, CA 94043, United States |
No comments:
Post a Comment