679 Posted Topics
Re: Basic algebra will get you pretty far with most types of software... but not as much with games. If you really have no interest in learning more math, expect to rely heavily on third-party libraries that take care of the details for you, especially when it comes to graphics. | |
Re: Definitely keep the lexer/parser concept; it makes things much easier to deal with. You'll see lost of people online recommending that you write a [recursive descent parser](http://en.wikipedia.org/wiki/Recursive_descent_parser) or use a [parser generator](http://en.wikipedia.org/wiki/Compiler-compiler), both of which are fine if you want to learn about them. My preferred approach to parsing algebraic … | |
Re: Your client doesn't need a system that has a particular design; your client needs a system that solves some problem of theirs. Your role as a software engineer is to determine the design, which may be layered if you think it's appropriate. So... if you think you need those three … | |
Re: What does "not coming out" mean? What gets shown for `averagegrade`? averagegrade = (exam1 + exam2+ exam3 + final) / 4; All of `exam1`, `exam2`, `exam3`, `final`, and `4` are integer values... so the compiler does integer division. For floating point arithmetic, at least one of the operands needs to … | |
Re: You've got a clue right here: > where n is Dataset.begin() + 2 [Vectors](http://www.cplusplus.com/reference/vector/vector/) get you [random access](http://www.cplusplus.com/reference/iterator/RandomAccessIterator/) iterators, so you can also subtract. So start at `Dataset.begin() + 2`, increment your iterator while it's not equal to `Dataset.end()` as usual, and just refer to the iterators `(it - 1)` … | |
Re: > I assume that I shouldn't have to RE-LEARN WCF for each version of Visual Studio. I agree... it shouldn't be that different. And it hasn't been, in my experience. > What it seems is that the code for VS 2005 would not work in VS 2008. I'm wondering why? … | |
Re: Since you're already using C++ strings, consider using [string::compare](http://www.cplusplus.com/reference/string/string/compare/) instead of strcmp. | |
Re: > use power fuction > now use this A little overcomplicated; twice as many divisions. Your original loop is a more traditional way to get digits, I think. > partition a number into its figures recursively A good illustration of recursion and how it uses the call stack, but I … | |
Re: The command object doesn't know what connection to use. You should use [the MySqlCommand constructor that takes a MySqlConnection parameter](http://dev.mysql.com/doc/refman/5.0/es/connector-net-examples-mysqlcommand.html#connector-net-examples-mysqlcommand-ctor3). | |
Re: Can you post the error messages and the relevant code? | |
Re: If you're looking for a short bit of code that will replace all of the "Figure *n*" text with matching links, [Regex.Replace](http://msdn.microsoft.com/en-us/library/xwewhkd1.aspx) is your friend. Do you have much experience with regular exressions? | |
Re: You can't use parameters for column names like that. If you really want something that can adapt to different columns, you'll need to format it yourself beforehand. Something like this: String.Format("UPDATE DailyBudget SET {0} = @amount ...", "Foods"); Of course, be aware that this is [dynamic SQL](http://www.sommarskog.se/dynamic_sql.html). | |
Re: That Cartesian product looks suspicious... you shouldn't have to group results for a query like this. I'd left join on your subqueries instead. | |
Re: As far as I know, the .NET Framework library gives you [OpenFileDialog](http://msdn.microsoft.com/en-us/library/system.windows.forms.openfiledialog.aspx) for files and [FolderBrowserDialog](http://msdn.microsoft.com/en-us/library/system.windows.forms.folderbrowserdialog.aspx) for folders, and that's all you get. For non-.NET applications (like WinRAR), I don't know if there's a standard Win32 combination dialog like you're looking for or if it's a custom dialog. | |
Re: Some questions: Do you mean [this g2](http://sourceforge.net/projects/g2/)? What does "properly installed" mean to you? Do you want to compile it yourself, or just have the library available to use? What operating system are you using? | |
Re: > I can successfuly insert data but when I close the app the data is not save What code do you have that you think will save data for you? Is this a WinForms application? If so, you might want to look at the [FormClosing event](http://msdn.microsoft.com/en-us/library/system.windows.forms.form.formclosing.aspx). | |
Re: The first thing I'd do is set a breakpoint at the first line you posted, and step through the code as it runs. Have you tried this? It should give us a better idea of what's actually happening. | |
Re: This is also problematic from performance and maintenance perspectives. In a real-world database, you don't want to have special tables per user. Instead, consider a separate `Users` table that your user data table refers to. Your query ends up looking more like this: SELECT [Code] FROM [UserData] ud WHERE ud.UserID … | |
Re: I'm not 100% sure, but I have a theory. Are you pressing ENTER to finish entering the price? It seems like `nextDouble` isn't consuming an ENTER-press, so the following call to `nextLine` sees it, and assumes you entered nothing for the category. Try using `nextLine` to get the price and … | |
Re: You might want a [CASE statement](http://technet.microsoft.com/en-us/library/ms181765.aspx). ![]() | |
Re: Are you talking about 3D models? Do you know about [NURBS](http://en.wikipedia.org/wiki/Non-uniform_rational_B-spline)? | |
Re: Please elaborate on "prompts me an error"--I presume this was an unhandled exception... post the type of exception and the actual text of the message. | |
![]() | Re: Please elaborate on "can't access the filepath"--are you getting an exception? What does the error message say? |
Re: What is the error message in the `InvalidCastException`? It looks like the problem is you're not deserializing to your serializable object; `formatter` doesn't know how to make a list. I think you'll have to deserialize to your `Server` class directly, and create the list yourself. | |
Re: SQL Server Compact Edition is a file-based database; just copy it. More reading at [Maintaining Databases (SQL Server Compact)](http://msdn.microsoft.com/en-us/library/ms172411.aspx). | |
Re: You're only importing com.atlassian.jira.user.util.UserManager and com.atlassian.jira.user.util.UserUtil... where do you expect the compiler to find User? [com.atlassian.jira.user.ApplicationUser](https://docs.atlassian.com/jira/latest/com/atlassian/jira/user/ApplicationUser.html) is in a nearby namespace, and there is an actual User class at [com.atlassian.jira.pageobjects.global.User](https://docs.atlassian.com/jira/latest/com/atlassian/jira/pageobjects/global/User.html); is either of those what you're looking for? | |
| |
Re: Are you looking for [this kind of algorithm](http://www.cs.uic.edu/~jbell/CourseNotes/ComputerGraphics/PolygonFilling.html)? | |
Re: To answer your question, we need to know: 1. What is the table definition for `Users`? 2. What values are in `UserNameTextBox.Text` and `PasswordTextBox.Text`? It would also help (you just as much as us) to look at the final SQL query string in `cmd.CommandText`. | |
Re: > I have Not Studied about Pooling in ADO.NET and So I don't Know about the Concept of Pooling Then maybe you should [do some research](https://www.google.com/search?q=ado.net+connection+pool). | |
Re: I'm not sure what "create a system" is supposed to mean. It could be just about anything... do you have a more specific description of what you're supposed to do? | |
Re: If you're not using any wireless connections, you can do a simple physical demonstration: "Nothing is connected to anything outside the room." Even more (somewhat over-) simplified explanation: it's a mini-Internet that only you guys are on. Good luck `:]` | |
Re: Are you stuck with this technology choice? Because from your description, this project has outgrown Excel as a useful backing data store. I'd consider a database-oriented solution like MySQL (which [does incorporate regular expressions](http://dev.mysql.com/doc/refman/5.7/en/regexp.html)). | |
Re: > error C2065: 'StreamReader' : undeclared identifier Add this: using namespace System::IO; > error C2065: 'inData' : undeclared identifier > error C2227: left of '->EndOfStream' must point to class/struct/union/generic type These happen because of the `StreamReader` problem. The following isn't in your list, but it'll come up: > error C2039: … | |
Re: I'm not up on my Android details, but I'll give this advice: Pick a graphics subsystem that's the simplest and easiest for you at first, and write your card game so that the actual operation of the game is decoupled from the graphics. Separating them is a good practice in … | |
Re: Off the top of my head: * Use HTTPS, if you can. * Authenticate without actually sending the password, as in a [challenge/response](http://en.wikipedia.org/wiki/Challenge%E2%80%93response_authentication). This isn't completely safe (*e.g.* it's still vulnerable to man-in-the-middle attacks), but it's much better than sending a cleartext password. | |
Re: This line looks odd: for (float rate=.5; .5<=.10;rate+=.1) Specifically, this part: .5<=.10 This will always be false, so the body of the loop never executes. You probably meant something like this: for (float rate = 0.5; rate <= 1.0; rate += 0.1) | |
Re: Extra right round bracket here: "[ClassifiedUnitValuePerm] DOUBLE), " & _ | |
Re: If I understand you correctly, this should be workable in a single query. Before we get into details, how familiar are you with [MySQL `JOIN` syntax](http://dev.mysql.com/doc/refman/5.7/en/join.html)? ...and table aliases in particular? | |
Re: Depends... if you just need to draw it rotated using GDI+, you can use [Graphics.RotateTransform](http://msdn.microsoft.com/en-us/library/system.drawing.graphics.rotatetransform.aspx) and draw using the original, unrotated coordinates. Otherwise, I think you're stuck [doing it yourself](https://en.wikipedia.org/wiki/Rotation_(mathematics)). | |
| |
Re: It works for me, too (mingw32-gcc 4.7.1). What compiler versions do you have on your machine and the school one? | |
Re: Perhaps something like this will work for you: DECLARE @enddate DATETIME SET @enddate = GETDATE() -- or whatever end date you're interested in SELECT ... WHERE a.IPI_Ref_Date BETWEEN DATEADD(YEAR, -1, @enddate) AND @enddate | |
Re: [`String.IndexOf`](http://msdn.microsoft.com/en-us/library/5xkyx09y.aspx) in the .NET Framework is essentialy the same thing as Java's `String.indexOf`, allowing for platform differences. | |
Re: Wikipedia has [a list of methods for generating normally-distributed ](http://en.wikipedia.org/wiki/Normal_distribution#Generating_values_from_normal_distribution)values. Note that the methods described correspond to a standard normal distribution, but the linked article gives a simple transformation from a standard normal to one with the desired mean and standard deviation. For the standard normal, [inverse transform sampling](http://en.wikipedia.org/wiki/Inverse_transform_sampling) won't … | |
Re: What database server are you connecting to? It's likely that [connectionstrings.com](http://www.connectionstrings.com/) has a sample connection string for it. | |
Re: The code looks okay. [`OleDbConnection`](http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbconnection(v=vs.100).aspx) lives in `System.Data.dll`; does your project reference this assembly? | |
Re: You'll want to start with a library like those provided by [FFmpeg](http://www.ffmpeg.org/about.html) to decode the video file. | |
Re: Well, what's in cell F2? | |
Re: > When you compare a range such do you use && or do you use the or statement to compare them? If you want to check whether a value is *inside* a range, use `&&`: `(x >= 1) && (x <= 10)`. If you're checking whether it's *outside* a range, … |
The End.