Recent Questions - Stack Overflow |
- Detect if a game object instantiate inside a trigger
- DistributionWarning: discord.py is installed which is incompatible with nextcord
- how can i store List<object> in sharedpreferences using provider?
- How to import external js library (cdn) to react typescript project?
- Spring Boot, NamedParameterJdbcTemplate query and get generated PID from the postgres database
- How to fix Mongo saving integer as a double value
- Can someone help me with this
- Sending http request from multiple threads using boost::asio. How to handle responses serially
- Variable not being set in class using inheritance
- Count rows that have same value in all columns
- BeautifulSoup tag unwrap failing due to string
- An unhandled exception occurred during the execution of the current web request. Server Error in '/' Application
- How to read a file contained in same module as __main__.py from outside the module?
- Using Scanner to add to empty Object
- How i can fix Wordpress woocommerce error php
- discord.js displaying pinged user banner
- React setState() not update the state
- How to restrict user from entering number in to an input field with type as text?
- C++ using switch-case return value as a condition for if statement
- Div not occupying the rest of the space with Position: Fixed (Not resolved)
- Adding a normal curve on frequency histogram in R
- Android studio got stuck at creating flutter project
- Typescript: Is it possible to ensure the key and an inner value are the same string?
- How to compare struct keys from nested json in Golang
- Invoking API Gateway Endpoint from AWS Amplify gives CORS error
- Angular- Prevent selection of same options from a dropdown
- Is there a way to disallow creating a git branch with a particular name, locally?
- Installing keras in R: WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available
- Separate scripts from .GlobalEnv: Source script that source scripts
- Angular 2 'component' is not a known element
Detect if a game object instantiate inside a trigger Posted: 02 Oct 2021 07:54 AM PDT I create a cube with is trigger to simulate an elevator and there must be 4 players (player can instantiate copies of it pressing space) on this trigger to make it work. How can i do that script? Thanks. |
DistributionWarning: discord.py is installed which is incompatible with nextcord Posted: 02 Oct 2021 07:53 AM PDT how to fix this, when I run my discord bot this appeared in terminal |
how can i store List<object> in sharedpreferences using provider? Posted: 02 Oct 2021 07:53 AM PDT so basically this is my provider, what i want is how can i store the model data coming from provider to a shared preferences, and the how to decode it to show it in bookmark page? here is my model: |
How to import external js library (cdn) to react typescript project? Posted: 02 Oct 2021 07:53 AM PDT I need to import you may also consider Methods I have tried so far! 1. |
Spring Boot, NamedParameterJdbcTemplate query and get generated PID from the postgres database Posted: 02 Oct 2021 07:53 AM PDT I'm using postgres and need to get the process identifier from postgres. Every running query in postgres has it's own PID which we can get via -> pg_stat_activity. SELECT * FROM pg_catalog.pg_stat_activity; This returns pid, which we can use to stop executing queries in database using SELECT pg_terminate_backend(); The application is Spring Boot / Java and I make some huge queries using NamedParameterJdbcTemplate. They can take long time and in some cases I need to terminate executing queries. The question is how can I get the PID from the generated sql query ? |
How to fix Mongo saving integer as a double value Posted: 02 Oct 2021 07:53 AM PDT so im trying to save a userid of a user in discord using mongo and everytime i save it with some other data it saves it as a double type and in a different number from what i have sent and i made sure to give an integer to save but it still saves it different, do anyone know how to fix, the rest are saved correctly only the first value, i couldnot find anything online that can help me it just doesnot save reference image |
Posted: 02 Oct 2021 07:53 AM PDT David Phillips is an American civil engineer and professor at the University of California (Davis, USA). He is best known as The Pudding Guy for accumulating many frequent-flyer miles by taking advantage of a promotion by Healthy Choice in 1999. Phillips was pushing his shopping cart down the frozen-food aisle of his local supermarket when a promotion on a Healthy Choice frozen entree caught his eye. The company was offering frequent-flyer miles to customers who bought its products and submitted the UPCs back to the company. The details of the promotion included a bonus if the UPCs were mailed during the month of May 1999 (the mileage earned would double from 500 miles to 1000 miles for every 10 UPCs submitted). Phillips calculated that the return on a mail-in food promotion outweighed the price of the Healthy Choice frozen entrees, which were selling for $2. A few aisles away Phillips found boxes containing four Healthy Choice soup cans at 70 dollar cents. Because he did not need a freezer to store the soups, he immediately decided to purchase 200 boxes of soup cans. At home he first had some trouble explaining the hoarding behaviour to his wife, but during a subsequent visit to the supermarket they discovered together an aisle display of Healthy Choice Pudding. Normally, the pudding was sold in 4-cup packs, but the display had been intended to introduce the new pudding and the single sample cups — originally 39 cents — were on sale at just 25 cents each! A 25-cent pudding having its own barcode would thus bring 100 miles. Over the next few weeks he purchased a total of 12,000 pudding cups, claiming he was stocking up for Y2K. pudding Phillips and his wife had thus spent $3,140 in total for 800 soup cans and 12,000 pudding cups, but they had a problem. Not only could the family never consume this much soup and pudding, but more important they would not be able to remove the UPCs before the double certificate offer expired. After giving it some thought they enlisted the Salvation Army to help them peel off the UPC codes, in exchange for donating the pudding. He then mailed his submission to Healthy Choice, and to their credit they awarded him 1.25 million frequent-flyer miles — enough for 31 round trips to Europe, 42 to Hawaii, 21 to Australia, or 50 anywhere in the United States. There's no downside. Phillips also got Advantage Gold status for life with American Airlines, which brings a special reservations number, priority boarding, upgrades and bonus miles. And he got an $815 tax write off for donating the soup and the pudding. Input The following four numbers, each on a separate line: total number of items purchased of a certain product (integer) cost per item of the product (float) number of UPCs needed for a frequent-flyer coupon (integer) number of miles earned per frequent-flyer coupon (integer) Output A sentence describing the amount in dollars spent by Phillips to purchase all items of the product and the number of frequent-flyer miles he earned with this purchase. Use the output as given in the examples below as a template to format the sentence. The amount of money spent should be output as a floating point number and the number of frequent-flyer miles received as an integer. Example Input: 200 0.70 12 550 Output: Phillips spent $140.0 for 8800 frequent-flyer miles. Example Input: 12000 0.25 10 1000 Output: Phillips spent $3000.0 for 1200000 frequent-flyer miles. |
Sending http request from multiple threads using boost::asio. How to handle responses serially Posted: 02 Oct 2021 07:53 AM PDT For a client side application, I wish to serialize http post requests using strand, in order to avoid overlapping writes/ responses to/from the server. Serialization is made using boost::asio, by calling the method as a callback from strand.post as shown below. Notice that inside each http session (write request and read it's response, is made in a separated callback. (Notice that within the post, the http is made synchronously. As can be seen from my example, the response reading is also made within the post callback. My question is whether this is actually required if I don't care about the ordering of reading the responses. can I assume that after each http request sent to the server thanks ! |
Variable not being set in class using inheritance Posted: 02 Oct 2021 07:52 AM PDT I have an issue with the class below called ProjectileWeapon. It is based on an abstract class called Weapon, and that class inherits MonoBehaviour. Weapon has two abstract functions called BeginCycle and EndCycle which are implemented in the ProjectileWeapon class. Those functions set a variable called "firing". The problem is, "firing" doesn't ever seem to be set despite the functions being called correctly. I know the functions are called because I can see the prints in the console. Also, when I use that variable in the update function, it doesn't do anything because the variable never changes. The OnGUI function is working and is displaying text on screen, however the "firing" variable is never updated. Am I misunderstanding how to use inheritance? Here's the base class: |
Count rows that have same value in all columns Posted: 02 Oct 2021 07:52 AM PDT If I have a dataframe like this: How can I get the number of rows that have value I know one way, for example if we only take columns But I have to put the name of every column, is there a more fancy approach? Thanks in advance |
BeautifulSoup tag unwrap failing due to string Posted: 02 Oct 2021 07:52 AM PDT I am struggling to unwrap an HTML tag in BeautifulSoup with it giving me the error "AttributeError: 'str' object has no attribute 'next_element'". Any ideas on what is causing this? The code is: |
Posted: 02 Oct 2021 07:51 AM PDT i have been trying very hard to insert data into sql server database c# in asp.net but it keeps on giving me error such as invalid object Tabel even though the tabel name is Tabel and red colour highlightes the cmd.ExecuteNonQuery saying exception was not handled Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Invalid object name 'Tabel'. there might be some other mistakes do let me know i am newbie |
How to read a file contained in same module as __main__.py from outside the module? Posted: 02 Oct 2021 07:53 AM PDT Here is my file tree: Here's When the current working directory is bar/ and I run
the result is to print whatever content is in some_file.txt to console. When I change the current working directory to foo/ and run
I get this: How do I fix this? |
Using Scanner to add to empty Object Posted: 02 Oct 2021 07:51 AM PDT Trying to add user input to an empty object, but am getting Null. I think I set the scanner up properly, but not sure on that also. Not sure how the scanner should be set up to be linked to the empty object. I have setters and getters set up on another Class. Pretty new to all this, so any guidance is a big help. Thanks! |
How i can fix Wordpress woocommerce error php Posted: 02 Oct 2021 07:52 AM PDT Hello i have these problem in qwery monitor : Constant WP_DEBUG already defined How to fix ? |
discord.js displaying pinged user banner Posted: 02 Oct 2021 07:52 AM PDT i wanna make it display the pinged user banner heres my code. it only shows the user thats using the command banner. |
React setState() not update the state Posted: 02 Oct 2021 07:51 AM PDT State function I want push new object if object not in When object exist in |
How to restrict user from entering number in to an input field with type as text? Posted: 02 Oct 2021 07:51 AM PDT How to disable the user from entering a number in to input field . When we use type as number we are restricted from entering text in to the input .The same way how to achieve the vice versa . Someone help i need this to complete my assignment. |
C++ using switch-case return value as a condition for if statement Posted: 02 Oct 2021 07:54 AM PDT May one write something like this in c++: Thanks |
Div not occupying the rest of the space with Position: Fixed (Not resolved) Posted: 02 Oct 2021 07:52 AM PDT I have 2 divs inside a container class. One div is having a fixed width and I want the other div to occupy the rest of the available space. ** It's working properly when I don't have position: fixed in the CSS** When I have a position: fixed in the test class, it's overlapping with the other element and not accounting there is already a div there. Can someone help me solve this? Just Imagine 10 as a right sidebar. So the position of 10 is fixed (position: fixed)and I want the red box to fill the remaining space to the left. |
Adding a normal curve on frequency histogram in R Posted: 02 Oct 2021 07:51 AM PDT I decided to go through my statistics courses, which are taught in SPSS, but do in R, as I would like to learn to do stats there. I am currently doing histograms for two numerical continuous varables The main issues are:
Here is what I wrote: my histogram looks like this: the picture included in the solutions (done in SPSS) looks like this: My first question is why the bars in my histogram look different than the ones in the answer sheet? is there some fundamanetal difference in how SPSS does histograms and how R does it? Secondly, is there a way to add a normal curve to the frequency histogram in ggplot 2? For reference this is how this can be done in SPSS: Frequency histogram with normal curve in SPSS the |
Android studio got stuck at creating flutter project Posted: 02 Oct 2021 07:52 AM PDT After upgrading my flutter, when i try to create a new flutter project it get stuck showing creating flutter project for hours without any change And when i run flutter doctor -v, i have no issues. |
Typescript: Is it possible to ensure the key and an inner value are the same string? Posted: 02 Oct 2021 07:53 AM PDT I have a Record of data that could become large. I'm wondering if is it possible to enforce the key of the Record to be the same as the inner name value?. I've tried setting up People with a generic but it would require me to add all the keys to a union type which I would rather avoid. |
How to compare struct keys from nested json in Golang Posted: 02 Oct 2021 07:52 AM PDT I am new to go , I am trying to compare keys from the json structure as below. Question: Is it possible to check and generate the final config that is if key exist on both struct ignore else add ? Output since there are 2 id present it will first add "nodesData" to "tempData" then compare node 1 data in "tempData" and then "node2" data will be compared to "tempData" here "attributes" and "mem" doesn't exist so add to "tempData" and then add temp node to "nodesData" How to execute this having trouble converting this to code ? Tried marshal and unmarshalling but it overrides data if same key exist in case multiple ids are passed in nodeid Above approach https://play.golang.org/p/yXjf_htKJ3c |
Invoking API Gateway Endpoint from AWS Amplify gives CORS error Posted: 02 Oct 2021 07:53 AM PDT I am attempting to call an API endpoint in API gateway using a HTML website hosted in AWS Amplify. When I make the request: I am consistently getting a CORS error: However, I have gone into the API gateway and enabled CORS. I can see an OPTIONS endpoint has been created and a header mapping has been set: I can see that coming back in the browser too: Yet it will not work and it is blocked at the browser. I have also tried adding
to my requestOptions but that does nothing. I can send requests via Postman as you'd expect but I'm a bit lost as to what to try next. Any ideas? Thanks |
Angular- Prevent selection of same options from a dropdown Posted: 02 Oct 2021 07:53 AM PDT I made this dropdown with a textarea for input in angular material dialog. There I have only three options in the dropdown(so far)-'English','French' and 'Canadian French'. I have already disabled 'English' by default. Now, for the rest of the remaining options, when I click 'Add new Language' button and select an option(french ; say) and add text I am able to disable the selected option so that when the user adds the third language they cannot select it again. It works fine. Like this (This is without hitting the save button) Now the problem starts here. When I select 'French'(say) and hit the save button. And again open the dialog-box. I am again seeing 'French' along with 'Canadian French' in the options for the adding a third language. What do I do to make it inactive and grey-ish like 'English'? This the ts code: I was console-logging at a lot of places and finally manage to draw down to these place where the problem might be happening. In How to solve the issue? The HTML code: This is where the modal is opening: When I Thanks in advance for the help! |
Is there a way to disallow creating a git branch with a particular name, locally? Posted: 02 Oct 2021 07:51 AM PDT I have some projects which use "master" and others which use "main" and I am constantly accidentally checking out one or the other. The big problem is when on a project that uses "main" and also heroku, which uses "master", so Is there a way to configure something locally so that creating this branch will blow up? |
Posted: 02 Oct 2021 07:52 AM PDT I am new to keras and was trying to install keras and tensorflow in R on my computer running Windows 10 using this guide but get the error in the title: I tried installing OpenSSL due to this question and also tried copying dll's as described here, but nothing works. Any suggestions? |
Separate scripts from .GlobalEnv: Source script that source scripts Posted: 02 Oct 2021 07:52 AM PDT This question is similar to Source script to separate environment in R, not the global environment, but with a key twist. Consider a script that sources another script: I want to source the script Question: How can I source a script to a separate environment in R, even if that script itself sources other scripts, and without modifying the other scripts being sourced? Thanks for helping, and let me know if I can clarify anything. EDIT 1: Updated question to be explicit that scripts being source cannot be modified (assume they are not under your control). |
Angular 2 'component' is not a known element Posted: 02 Oct 2021 07:52 AM PDT I'm trying to use a component I created inside the AppModule in other modules. I get the following error though:
My project structure is quite simple: I keep my pages in pages directory, where each page is kept in different module (e.g. customers-module) and each module has multiple components (like customers-list-component, customers-add-component and so on). I want to use my ContactBoxComponent inside those components (so inside customers-add-component for example). As you can see I created the contacts-box component inside the widgets directory so it's basically inside the AppModule. I added the ContactBoxComponent import to app.module.ts and put it in declarations list of AppModule. It didin't work so I googled my problem and added ContactBoxComponent to export list as well. Didn't help. I also tried putting ContactBoxComponent in CustomersAddComponent and then in another one (from different module) but I got an error saying there are multiple declarations. What am I missing? |
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