Recent Questions - Stack Overflow |
- Is there a workaround for adding too much .h?
- passing values between methods, Python OOP, Method not getting
- How to resolve execution timeout expired issue occuring in a stored procedure
- How to get real p value rather than just 0 in R (
- Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'prompt')
- Generate array from type without infering
- Connect to sftp server using proxy and private key in Python
- Convert tibble form
- How to remove duplicates in a data frame with a different format?
- Compact nested for loop's
- recompiling next.js in container is very slow
- ElasticSearch config lowercase analyser
- Can I make this countdown work in only one function?
- Is the equality relation of pointers after round-trip conversion guaranteed to be transitive?
- How to calculate age from Json Birtdate in JS
- Terraform for loop inside for_each argument
- working of to_string() and stringstream class
- How to get a unit of measurement as a singular noun?
- Given an array of integers, how do I find the sum of its elements with some simple constraints in JavaScript?
- Access value in nested JSON recieved by ActiveCollab REST API using Python
- call dictionary
- IOS Apply a slow motion effect to a video while shooting
- Multi-variate Linear Regression using Gradient Descent
- What is the AWS SDK library for signin in Cognito (from backend without using Amplify)?
- When is it preferable to use rand() vs a generator + a distribution? (e.g. mt19937 + uniform_real_distribution) [closed]
- Csv column unnamed headers being written. How do I stop that, it adds the row number on the left whenever I run the program, offsetting index writing
- How to take user input and store in variable using tkinter?
- Two conflicting long lived process managers
- "No Ad Config." on onAdFailedToLoad() Method While trying to Load Ads
- sum last n days quantity using sql window function
Is there a workaround for adding too much .h? Posted: 14 Sep 2021 08:20 AM PDT I'm currently making a game with "multiple choices" which means a lot of questions. My thoughts first are making each question in a single .h file and then call the content inside the main file. which means, I will have included hundreds of header file. I don't know if this is okay as I'm new to programming. Is there any solution to this? Here is an example on one of my headers. | |||
passing values between methods, Python OOP, Method not getting Posted: 14 Sep 2021 08:20 AM PDT I am learning about classes and methods, trying to modify a simple python code so I can pass an attribute value using a method. I could pass the attribute for the setyear() method. However, I am unable to use it and perform a simple mathematical operation (e.g, age calculation) as in the agecalc() method. Wonder if you can please point out why am I getting 0 instead of 10? | |||
How to resolve execution timeout expired issue occuring in a stored procedure Posted: 14 Sep 2021 08:19 AM PDT Facing timeout expired issue in a code developed. Shared below is the stored procedure where timeout occurs. Purpose of the code : Dates being passed from frontend (using a forloop in Windows application vb.net code) for 10 lakh cases for which date difference needs to be calculated basis the date received. Function code : Is there optimization required in this code to eliminate timeout issue? How can same be done? | |||
How to get real p value rather than just 0 in R ( Posted: 14 Sep 2021 08:19 AM PDT I'm trying to perform Kruskal-Wallis ANOVA test followed by pairwise Dunn's test with Šidák's adjustment for post-hoc analysis. I would like to see real p-value rather than just 0(or 0.0000). Here is my result from R. Kruskal-Wallis chi-squared = 131.7343, df = 2, p-value = 0 List of pairwise comparisons: Z statistic (adjusted p-value)1 - 2 : 8.440001 (0.0000)* 1 - 3 : 11.16992 (0.0000)* 2 - 3 : 0.261792 (0.9912) I really appreciate it if someone let me know how to show real value instead of just 0. | |||
Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'prompt') Posted: 14 Sep 2021 08:19 AM PDT I am trying to use the App Install Prompt with webpack 5 but I get the following error:
| |||
Generate array from type without infering Posted: 14 Sep 2021 08:19 AM PDT I need to generate real JS code based on TS type, so I can prevent doubling code and creating the chaos. Infering the type from array won't work for me, because you can't put array inside interface, because interface isn't runtime. Basically | |||
Connect to sftp server using proxy and private key in Python Posted: 14 Sep 2021 08:19 AM PDT I am trying to connect to sftp server which allows key based authentication and I need to use the proxy over HTTP to connect to the sftp server. I have tried the below code using paramiko I am getting error as below in transport.connect(), Please note that our proxy server only allows to use only HTTP. Can you please help in fixing this issue as we are stuck in proceeding further | |||
Posted: 14 Sep 2021 08:19 AM PDT I have the following table. I want to convert from | |||
How to remove duplicates in a data frame with a different format? Posted: 14 Sep 2021 08:19 AM PDT So, I'm going through a dataset I saw on the internet, and I noticed lots of duplicates but with different formatting. For example, in the name column, some people started typing their name in LN, FN, MI, while some people typed their name in FN, MI, LN format. How can I remove these duplicates? Thank you! Below is an example of a column in the data frame.
| |||
Posted: 14 Sep 2021 08:19 AM PDT the following is Python code. How can the same be done in R? CODE OUTPUT In total there are 72 combinations (3 mean_opc X 6 variance_opc X 4 dist_opc) Thank you | |||
recompiling next.js in container is very slow Posted: 14 Sep 2021 08:19 AM PDT you can download my images recompiling is about 40 seconds | |||
ElasticSearch config lowercase analyser Posted: 14 Sep 2021 08:19 AM PDT I try to create an indexer with a lowercase analyzer, like below: But when I search with kibana, the lowercase doesn't work, it still case sensitive My Query like: | |||
Can I make this countdown work in only one function? Posted: 14 Sep 2021 08:19 AM PDT This code works fine (It is a countdown for a project I'm doing), but i want to do it with only one function. It is possible? | |||
Is the equality relation of pointers after round-trip conversion guaranteed to be transitive? Posted: 14 Sep 2021 08:19 AM PDT This question is similar to "Are all pointers guaranteed to round-trip through void * correctly?" but slightly deeper. Given: then | |||
How to calculate age from Json Birtdate in JS Posted: 14 Sep 2021 08:19 AM PDT {"firstname":"Dummy0","surname":"User0","birthdate":"1997-12-04","email":"dummy.user0@mockup.data","avatar":""} Stuck in a calculating age from Json Birtdate... Can you please help me? | |||
Terraform for loop inside for_each argument Posted: 14 Sep 2021 08:19 AM PDT Can someone please explain what a for loop inside a for_each argument does in Terraform? I am trying to create an AWS SSL certificate. I've seen other code like the below but I don't understand it: The specific line that I don't understand is the one in the route53 record. I get that a for_each argument can be used to create multiple resources from a single block, but I can't find anywhere that explains what this for loop is doing inside of it. If someone could explain that would be great! The person that wrote the code has left so I can't ask them either. | |||
working of to_string() and stringstream class Posted: 14 Sep 2021 08:20 AM PDT this is my code code for the countAndSay problem on leetcode. Now in this code i am using to_string() to convert integer into string but it is not working . When i am trying it on debuggur then the pointer is not moving past the to_string() function .Are there any mistake in my usage of to_string()? then i tried using stringstream class but it was even more unexpected . in this code instead of to_string() but the stringstream object was only working for using first time ( only storing count but not s[j]). Is it related to stringstream class then please explain its working after that I trying using declaring a separate stringstream object for every conversion this approach is giving correct output | |||
How to get a unit of measurement as a singular noun? Posted: 14 Sep 2021 08:20 AM PDT I'm trying to represent running pace in my app - let's say 5min/km. For voice over, I'd love this to be read as five minutes per kilometer. I know I can get kilometers like that: but would it be possible to get the singular form (and take advantage of the already localized units)? | |||
Posted: 14 Sep 2021 08:19 AM PDT To find the sum of array's elements I have tried this approach however the output comes undefined instead of an integer constraints are Any help would be appreciated. | |||
Access value in nested JSON recieved by ActiveCollab REST API using Python Posted: 14 Sep 2021 08:19 AM PDT I got this by REST-API form ActiveCollab: I want to get the value of "value". But I don't get how to access this property. I am using Python for this. I get this Error: TypeError: string indices must be integers | |||
Posted: 14 Sep 2021 08:19 AM PDT I'm stuck with a problem when I'm working with a dictionary in VBA. The reason why I want to work with a dictionary and a do-while loop is because I have variables with different length, that I want to loop through. First I want to give the dic keys and and items. The reason why I skip one col for each loop is because each series has a col with dates and then a col with prices. If it is possible I want to capture the dates that match the prices in the same dictionary. then I want to execute a procedure for all keys in my dic. I want to compute returns in different time series. However, when I call the dic, to the sub Returns() I get an error (Compile error: Variable not defined). I'm new to dictionaries and I probably missed a small detail. Any suggestions? I hope the question is clear. Thank you | |||
IOS Apply a slow motion effect to a video while shooting Posted: 14 Sep 2021 08:19 AM PDT Is it possible to apply slow motion effect while recording video? This means that the recording has not finished yet, the file has not been saved, but the user sees the recording process in slow motion. | |||
Multi-variate Linear Regression using Gradient Descent Posted: 14 Sep 2021 08:19 AM PDT I've been trying to write a code for Linear Regression using Gradient Descent formula: Where I defined my convergence as "do while $||\nabla(f(x))||$<precision", ($||\nabla(f(x))|| is square root of norm of gradient descent) but my code doesn't seems to converge. Norm of gradient descent doesn't seems to go below 11.56. Can anyone please help? If there is any code mistake or logical mistake. | |||
What is the AWS SDK library for signin in Cognito (from backend without using Amplify)? Posted: 14 Sep 2021 08:20 AM PDT I have implemented user signup using @aws-sdk/client-cognito-identity-provider but not able to find the module or API from AWS SDK to implement sign in to cognito | |||
Posted: 14 Sep 2021 08:20 AM PDT After going through the rabbit hole that is learning about rand() and how it's not very good at generating uniform pseudorandom data based on what I've dug into based on this post: Random float number generation. I am stuck trying to figure out which strategy would yield better balance of performance and accuracy when iterated a significant number of times, 128*10^6 for an example of my use case. This link is what led me to make this post, otherwise I would have just used rand(): rand() considered harmful Anyway, my main goal is to understand whether rand() is ever preferable to use over the generator + distribution method. There doesn't seem to be very good info even on cppreference.com or cplusplus.com for performance or time complexity for either of the two strategies. For example, between the following two random number generation strategies is it always preferable to use the 2nd approach?
Here is an example of what my code would be doing: vs. | |||
Posted: 14 Sep 2021 08:19 AM PDT I am trying to replace a certain cell in a csv but for some reason the code keeps adding this to the csv: It should look like this: My code is: In summary, I want to open the CSV file, make a change and save it again without Pandas adding an index and without it modifying empty columns. Why is it doing this? How do I fix it? | |||
How to take user input and store in variable using tkinter? Posted: 14 Sep 2021 08:20 AM PDT This is a college enquiry chatbot, I want to get users name and display in the chat window. On the output window, I want the student's name instead of "Student". I have added only some code that I think is important. If you want full code comment below, I'll edit the question | |||
Two conflicting long lived process managers Posted: 14 Sep 2021 08:19 AM PDT Let assume we got two long lived process managers. Both sagas operates over 10 milion items for example. First saga adds something to each item. Second saga removes it from each item. Given both process managers need few minutes to complete its job if I run them simultaneously I get into troubles. Part of those items would hold the value while rest of them not. The result is close to random actually and depends on command order that affect particular item. I wondered if redispatching "Remove" command in case of failure would solve the problem. I mean if you try remove non existing value you should wait for the first saga to add the value. But while process managers are working someone else may dispatch "Remove" or "Add" command. In such case my approach would fail. How may I solve such problem? :) | |||
"No Ad Config." on onAdFailedToLoad() Method While trying to Load Ads Posted: 14 Sep 2021 08:20 AM PDT I am trying to load interstitial advertisements for my app. Whenever I try to load these ads I get a Error saying "No Ads Config" from Domain "com.google.android.gms.ads". Here is the code: My AndroidManifest.xml onCreate() in main.java When I load my ad in a on function it gives me error "No Ad Config." | |||
sum last n days quantity using sql window function Posted: 14 Sep 2021 08:20 AM PDT I am trying to create following logic in Alteryx and data is coming from Exasol database. Column "Sum_Qty_28_days" should sum up the values of "Qty " column for same article which falls under last 28 days. My sample data looks like: and I want following output: E.g. "Sum_Qty_28_days" value for "article" = 'A' and date = ''2019-10-8" is 8 because it is summing up the "Qty" values associated with dates (coming within previous 28 days) Which are: 2019-09-15 2019-10-05 2019-10-08 for "article" = 'A'. Is this possible using SQL window function? I tried myself with following code: But, it is far from what I need. It is summing up the Qty for dates falling in same month. However, I need to sum of Qty for last 28 days. Thanks in advance. |
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