- Upvotes Received
- 7
- Posts with Upvotes
- 7
- Upvoting Members
- 6
- Downvotes Received
- 0
- Posts with Downvotes
- 0
- Downvoting Members
- 0
11 Posted Topics
Re: > but it keeps telling me that my declaration array is not correct because it needs to have a constant value That's a C restriction. Chances are your C++ compiler follows C standards for some reason. You can always do it the "classic" C way by using <stdlib.h> (in C++ … | |
Re: That's a basic excercise in using enums. https://en.cppreference.com/w/cpp/language/enum | |
Re: Image quality is one, but image alignment is another - if the text is not aligned horizontally, you will get much worse results than otherwise. The presence of additional graphical elements can also cause issues. Text complexity is irrelevant, but you may find that some OCR modules will have an … | |
Re: $sql = "SELECT * from keywords WHERE kw1 = ? OR kw2 = ? OR kw3 = ? OR kw4 = ? order by kw1_point desc LIMIT 100"; You're using OR between the clauses. Also, that schema design is... yikes. Why exactly do you need each keyword to have a … | |
Re: If in doubt, output the variables as the program runs. Here's a modified version of your program with the data set you wanted to run: import numpy as np from scipy.stats import norm def mann_kendall_test(data, alpha=0.05): """ Perform the Mann-Kendall test to detect trends and change points in a time … | |
Re: The quick and dirty solution of subtracting 48 (or 0x30 if we're talking hexadecimal) will work. However, for multi-character values, **if** your sequence of characters is null-terminated (as it should be), the better way is to use sscanf from the <cstdio> library. | |
Re: If what you want to actually do is, as you mentioned in one of the comments, remove consecutive whitespaces, all you need to do is keep track if the last character you copied to the output was a whitespace and check if the current character is also a whitespace, then … | |
Re: The input may be described as an array, but you'll actually solve the assignment by treating it as a graph. Each index `i` has a 1-length route to `i+1` and `i-1`, as well as a 1-length route to any `j` located ahead of itself that has the same value. Create … | |
Re: Nice that you've found a solution, but following a ready-made solution won't exactly be a teaching moment. Back in the day, converting infix to postfix was part of an assignment I got in one of my programming classes. What I did was read the Wikipedia description of the shunting-yard algorithm … | |
Re: You already have save and load functionality, although what you've done with select_game() and load_game() feels unnecessarily messy. I can see a couple obvious bugs First: #define Height 6 #define Width 7 int board[Height][Width]; char gamestr[41]; `board` will be 6*7 = 42 bytes, `gamestr` is one byte too small to … | |
Re: Your addition of double quotes turned what should have been the name of an object into a string constant... [code]music = new Microsoft.DirectX.AudioVideoPlayback.Audio(Location); music.Play();[/code] |
The End.