- Strength to Increase Rep
- +13
- Strength to Decrease Rep
- -3
- Upvotes Received
- 128
- Posts with Upvotes
- 113
- Upvoting Members
- 85
- Downvotes Received
- 9
- Posts with Downvotes
- 9
- Downvoting Members
- 9
Delphi and C# Programmer
- Interests
- Programming, Animation, Sport, Travel, Music, TV, Movies, Gaming
889 Posted Topics
Re: Much love and respect to all my friends on DaniWeb. :) | |
Re: Syndicate which was released earlier this year in the US was banned here in Australia as it failed to receive an MA15+ rating (we are yet to have an R18+ here, although it just passed Parliament today and is heading for the Senate for the final debate, but I digress...) … | |
Re: The problem with your method is that the size of your array doesn't change. I would do this in your remove method: 1. create an array of size (original array size -1) 2. go through the original array one at a time. 3. If the index doesn't equal the index … | |
Re: Hi there primbech and welcome to Daniweb, What specific difficulties are you having with your pst editor? Maybe post some of your code and we will try to help. :) | |
Re: I'm afraid I'm no C++ guru, but I can probably compare C# and Java: Some similarities: - both have system garbage collection (C++ does not - you have to allocate and deallocate memory for objects). - both have strict compiler conditions which are checked such as array indexes, initialisation of … | |
Re: [code=java] for (int i=0; i<n; i++) [/code] [code=java] int i=0; (while i<n) [/code] These two pieces of code are equivalent loops. But the while loop needs n steps to execute because the initialisation of i occurs [I]outside[/I] the loop. The for loop requires n steps [I]+1 to instantiate i[/I] inside … | |
Re: When you say it's not working, do you get an error message? | |
Re: The easiest way to do this is to extend JPanel and override the paintComponent method. When you override the paintComponent method, you should do the following: [code=java] public void paintComponent( Graphics g ) { super.paintComponent( g ); Graphics2D g2d = (Graphics2D) g; // use g2d.drawImage methods to paint your background … | |
Re: AleMonteiro is correct, it should be `CommandType.Text`. You need to modify your `CommandStr` variable to be valid SQL. Something like `string CommandStr = "SELECT F_Get_Desc(@PDesc)";` and then you reference the parameter as `@PDesc` like so: OracleParameter pDesc = new OracleParameter("@PDesc", OracleDbType.Varchar2,128); | |
Re: Once you have read the file into memory, you should be able to write each line out to the console. If you search for the `Console.WriteLine` function in your favourite search engine you will find plenty of examples. Good luck! | |
Re: I believe that IS the test. Just go through each of those 20 items and score yourself a 0,1 or 2 as the dude has said. BTW I scored a 4 which I don't believe makes me saintly, just not psychopathic. | |
Re: ExecuteScalar always returns a single value, so you should use it on any query that is expected to return a single record, single field result set. It's represented as object because its unknown what the correct data type should be but should be converted to whatever data type you expect. … | |
Re: I haven't used telerik specifically before but I wanted to mention that there is absolutely nothing wrong with using a third party to solve outstanding problems with a project. Sometimes it is just more cost-effective (not just in dollar value) to purchase another company's tools rather than trying to solve … | |
Re: Looks like your professor has given you a fairly good start on what needs to happen inside that for-loop. Did you have a question that you needed help with? | |
Re: I'm not sure what you mean by the first question, but I can answer the second. An abstract function is one that defines a method signature without its body so that it can be overridden in any extending implementing class. I'm not sure which programming language you are using but … | |
Re: Certainly being able to parse file input into something meaningful is always useful. To make it even more generic, why not use a Stream input instead? That way you can handle any input type (including files, via FileStream) so long as the format is what you expect. | |
Re: In C# a bool method always returns a boolean value. In other languages such as PHP this is not necessarily the case, but since this question was in regards to C# I will answer as such. I think your question is about personal preference so there isn't really a right … | |
Re: Hi theausum, Two things: Firstly, please use code tags when posting code. It really does make it a lot easier to read. Secondly, did you have a question? | |
![]() | Re: I would suggest moving the required method to a third dll if possible and referencing that dll from both of your existing projects. ![]() |
Re: Either set them to public or pass them in via the constructor. A third option is to have get public but set private. The syntax for this option is as follows: public char suit { get; private set; } public char value { get; private set; } public Card(char aSuit, … | |
Re: Hi nish123, You will need to use two function calls for this, strtotime and date. First you use strtotime to convert your string to a unix timestamp, like so: [code=php] $time = strtotime( $date ); [/code] Then you use this timestamp to calculate a date in whatever format you want. … | |
Re: Without seeing your code it's a bit difficult, but there are some general rules you will need to be aware of when running in a multi-threaded environment. For example, you will need to exert caution when sharing data between threads. Is the callback to your button click waiting for a … | |
Re: Are you able to run in the IDE debugger and see which line throws the AV error? | |
Re: I don't think you want to close the session in login.php using the call to session_close_write. Also, your session setting is commented out, you will need to set each $_SESSION variable before calling cms.php. Just a side note on your SQL, you should consider looking into parameterised queries. Your code … | |
Re: Use the SelectionStart and SelectionLength properties to select a particular part of the text and then apply formatting to it. Example: richtextbox1.SelectionStart = 30; richtextbox1.SelectionLength = 10; richtextbox1.SelectionAlignment = HorizontalAlignment.Left; will align the substring starting at index 30 of length 10 to the left. I'm not sure how multiple alignments … | |
Re: Hi Ahmed_51 and welcome to DaniWeb So, p is principle, r is rate (in percentage) and n is number of years of the loan. I'm not sure I follow your calculation, but I would think it would be something like (principle x rate x number of years) / (number of … | |
Re: Your SP has 4 parameters - @Call_LogID, @StarDate, @EndDate and @Log_code and none of them have default values specified but you are only setting 2 in your C# code - @StarDate and @EndDate. You will need to also pass @Call_LogID and @Log_code to the SP if you want to execute … | |
Re: Depends on the type of database engine being used, but if you mean MSSQL then there are a lot of tutorials and sample code on the subject. For example, [this one](http://www.codeproject.com/Articles/4416/Beginners-guide-to-accessing-SQL-Server-through-C) describes the process in detail. Otherwise, try google search for "C# SQL Database". | |
Re: Not sure if you can actually track that mouse event but you could handle the FormClosing event instead. | |
Re: Some real life examples of stack and queue: Imagine a person washing dirty plates in a restaurant kitchen. As the waiters clear the tables and bring in the dishes, they stack the plates on top of each other, while the person washing the dishes removes the plates from the top … | |
Re: [URL="http://www.tometasoftware.com/MySQL-5-vs-Microsoft-SQL-Server-2005.asp"]This comparison[/URL] is a little out of date now, but it does give a good overview of the differences between MySQL(5.0) and MSSQL(2005). | |
Re: [Here](http://www.dreamincode.net/forums/topic/209177-not-able-fetch-the-image-from-mysql-database-and-to-display-it/) is a good approach for displaying an image from a MySQL database using PHP. | |
Re: You can use `ISNULL` or `COALESCE` to get the first non-null parameter as the result. The `ISNULL` function takes only two parameters and returns the first non-null as the result, or null if both are null. `COALESCE` takes a list of parameters and returns the first non-null result, or null … | |
Re: Hi zaidiSEO and welcome to Daniweb :) It really depends on what you need to accomplish. C# can be used for a console application, a web application, a windows service, a winforms application, a mobile application, ... the possibilities are almost endless. I'm not sure that one is more important … | |
Re: Because Shto method is marked as static, you don't need to create a new KlasaDB instance. You do however need an instance of Klasa to pass to the call since it takes it as a parameter. Something like this: [Test] public void Test_Shto() { // set some test data up … | |
Re: I think `$id3` holds the ID of the user that is logged in. It's `$id2` that holds the value of the friend ID which is what you are trying to echo to the screen at that point. I think line 44 in your sample code should be: echo "<a href='index.php?id=profile&u=".$id2."'>".$rows['friend']."</a>"; | |
Re: If you debug your code, what is the value of j in the line that reads `sqlCmd.CommandText = "select cBrandName from brandName where iBno = " + j;`? When stepping through your code, also check that the line `cbBName.Items.Add(dr["cBrandName"]);` is actually being called (ie does your SQL query actually return … | |
Re: Check out [this article](http://www.sommarskog.se/arrays-in-sql.html) for a description of several different solutions to your problem. | |
Re: Hi Akeem Amure and welcome to Daniweb :) A couple of things before we start - please don't shout (by using all capitals) and there is no need to ask for help as soon as possible as we always try to get back to you when we can. Also, please … | |
Re: There are a number of different ways to do this. [Here](http://stackoverflow.com/questions/577071/how-do-i-get-the-mac-address-of-a-network-card-using-delphi) is one example, and [here](http://www.swissdelphicenter.ch/torry/showcode.php?id=651) is an alternative solution. | |
Re: You will have a file called Program.cs. This is the execution entry point of your application - or more specifically, the static method called Main in this file is. In this method, one of the last lines of the Main method reads something like: Application.Run(Form1); Change Form1 (or whatever form … | |
Re: [URL="http://www.davisor.com/publishor/"]Davisor Publisher[/URL] is a Java API that can convert from a DOC, PPT or PDF to PDF, XHTML, PNG, JPEG, TXT or XML formats. I haven't actually used it before but it seems to be a good one. | |
Re: The only time I have had trouble with firefox and $_SESSION has been because it stores the value across multiple tabs (whereas IE doesn't) so I haven't seen your problem before. Can you please post your code for when you store the variable and when you try to access it … | |
Re: I'm not sure that you can develop C# applications on an IOS operating system. The .NET Framework is a Microsoft technology, so C# is not cross-platform like Java or PHP. If you only have access to a Mac, my suggestion would be to install a virtual machine running a Windows … | |
Re: You can suppress the value in Crystal so that it doesn't show up, but then include it in the totals. That's probably easier than trying to mess with your SQL so that you can get the desired data pulled into the report. | |
Re: The problem is that you were attempting to access a member variable from a static context (ie the Main method). You need to either use variables local to your static method or move the initialisation of the threads to the constructor and instantiate your class as an object first. | |
Re: To stop it from happening in the future, consider adding a primary key to the table. By definition a PK is not nullable and will help identify the records when they are inserted. For more information on primary keys see this [W3Schools](http://www.w3schools.com/sql/sql_primarykey.asp) page on the subject. |
The End.