889 Posted Topics

Member Avatar for Klaurac

You will need a reference to the UserId in your VideoRental class, then when you assign the VideoRental to the User you update the VideoRental object's UserId to match. Here's how I would do it: [code] class User { public GUID Id { get; set; } private VideoRental m_rental; public …

Member Avatar for Klaurac
0
102
Member Avatar for reemhatim

Hi reemhatim and welcome to DaniWeb :) There are some pretty strict rules at DaniWeb - we aren't allowed to just do it for you. Have a try yourself and feel free to post questions on specific problems you are having with your algorithm or code and we will try …

Member Avatar for reemhatim
0
148
Member Avatar for NewOrder

Each node (Unit in your code) in a linked list knows what node follows it, that is the node knows it's "next" node. The lines of this code that you have indicated traverse the list from the start (head) node until we get to the end of the list (when …

Member Avatar for adams161
0
135
Member Avatar for Rhuntsman21

Instead of: [code] object.ReferenceEquals(ctrControl.GetType(), typeof(TextBox)) [/code] and the like, you can just do: [code] ctrControl.GetType() == typeof(TextBox) [/code] Also, where you call your function recursively, I would probably make that inside an else-if rather than a second if-statement. Like so: [code] if (object.ReferenceEquals(ctrControl.GetType(), typeof(TextBox))) { ((TextBox)ctrControl).Text = string.Empty; } else …

Member Avatar for Rhuntsman21
0
145
Member Avatar for PomonaGrange

Your syntax is not quite right in the SQL statement. You don't need so many quote marks. This will work for you I believe: [code=php] $sql = "SELECT DISTINCT Town FROM $Table_Name"; [/code] Then you actually need to run the query. What I normally do is use the PDO library …

Member Avatar for noufal68
0
120
Member Avatar for nssltd

The default application for handling the http protocol is stored in the following registry key: HKEY_CLASSES_ROOT\http\shell\open\command You may also need to set the application for other protocols, such as https, perhaps doing some exploration using regedit.exe might provide some answers. To write to the registry key(s) you will need to …

Member Avatar for Momerath
0
79
Member Avatar for Triztian

Personally I think the best implementation is to use the Singleton design pattern and not the global keyword in this instance. So your code for MYSQLDB class would be: [code] class MYSQLDB { private static instance = null; // private constructor and clone methods private __construct() { // initialise any …

Member Avatar for Stefano Mtangoo
0
297
Member Avatar for flamer_x86

Hi flamer_x86 and welcome to DaniWeb :) PHP can be run via IIS or Apache, however the IIS configuration can be very tricky (IMHO). If you are using Windows OS (I assume you are since you talk of IIS), I would suggest installing xampp which includes an Apache install, MySQL, …

Member Avatar for flamer_x86
0
64
Member Avatar for zachattack05

Interfaces are extremely useful, and there are many examples why. Taking your example one step further, you can then have another class that does this: [code] public class Copier { private ICopy copy; public Copier(ICopy copy) { this.copy = copy; } public void MakeCopy() { copy.CopyMethod(); } } [/code] Now …

Member Avatar for embooglement
0
168
Member Avatar for michael.ngobeni

Could you write a small class that extends PdfContentByte and write a new method with the parameters that you want to pass that simply calls the original setCMYKColorFillF method followed by the showTextAligned method? Then you can call that new method as you need.

Member Avatar for masijade
0
291
Member Avatar for nssltd

First things first, you can set the version of your application in your Publish properties of the project. Then when you load your program you need to find the executable file (may or may not be in the default install location), then use the File or FileInfo class to check …

Member Avatar for nssltd
0
85
Member Avatar for julzk

It would be easier if you could combine your ss_datestart and ss_timestart columns into one DATETIME column (and similar for end date and time), but you could do something like this in php: [code=php] // all timestamps are in seconds, so define the number of seconds in one hour define("SECONDS_PER_HOUR", …

Member Avatar for kswsk
0
7K
Member Avatar for JOSheaIV

Not sure if there is an easier way, but you can use [icode]Convert.ToInt32(string)[/icode] method to convert your string to an integer. [URL="http://msdn.microsoft.com/en-us/library/sf1aw27b.aspx"]Here[/URL] is a link to the MSDN docs on this method which should provide some insight.

Member Avatar for Geekitygeek
0
3K
Member Avatar for BLY

The property setting line of [icode]_dateID = value[/icode] is correct, but you never actually set it in your LoadData function, and you should carefully check your Save function too, because sometimes you use [icode]_dateID[/icode] and sometimes you use [icode]dateID[/icode], which is the parameter to the function and not [icode]this.dateID[/icode] which …

Member Avatar for BLY
0
115
Member Avatar for shobhit25

Hi shobhit25 and Welcome to DaniWeb :) What do you mean by a rich text box? I would like to help you out, please give me a little more information on what you are after.

Member Avatar for arundurai
0
220
Member Avatar for maria99

Really all you need is a text editor of some kind. You could try an IDE such as Eclipse PDT as this offers features such as code completion and syntax error highlighting, but you can develop in PHP using any text editor and there are many free ones out there. …

Member Avatar for jaikanth123
0
157
Member Avatar for bjeffries

Instead of: [code] else { echo "Invalid image type. Please Try again"; } [/code] Try this for more information on why the image is being rejected: [code] else { echo "Type: " . $visitorimage["type"] . "<br />"; echo "Size: " . ($visitorimage["size"] / 1024) . " Kb<br />"; echo "Invalid …

Member Avatar for bjeffries
0
185
Member Avatar for aishaahmad

Hi there aishaahmad and welcome to Daniweb, Sorry but we aren't allowed to just do your homework for you. Do you know what is meant by O(N) and why that loop is O(N)? Do you understand what the term time complexity means? Also, you have two loops that don't increment …

Member Avatar for AuburnMathTutor
0
279
Member Avatar for gajapathi10

You will need a solid understanding of assembler code and compiler construction theory.

Member Avatar for AuburnMathTutor
0
116
Member Avatar for ChocoCrisp

A simple Google search provides these links: [url]http://www.iopus.com/imacros/tutorials/foxpro.htm[/url] [url]http://social.msdn.microsoft.com/Forums/en/visualfoxprogeneral/thread/aa103203-e32b-4448-8f72-a505cd969d93[/url] as well as many others.

Member Avatar for darkagn
0
55
Member Avatar for techgirl87

I think you may be better off asking the course coordinator straight off rather than us, but in my opinion that course syllabus doesn't make a great deal of mention for why those courses are pre-requisites. I assume that you will be expected to write java code in your lab …

Member Avatar for darkagn
0
258
Member Avatar for intes77

Your problem is with this line: [code] for(x=0;x<sample.length();x++) [/code] If you enter something that is less than 52 characters (because sample.length() = 52 in your code), then when you do the enter.charAt for something past the end of what has been entered, you will receive an error. You need to …

Member Avatar for intes77
0
6K
Member Avatar for Uma_fb

Hi Uma_fb and welcome to DaniWeb :) I have never tried to do this with a .doc file, but I'm guessing it is the same as opening/modifying a text file. Let me point you to the PHP Manual, [url]http://au.php.net/[/url] that has lots of great documentation on the php language including …

Member Avatar for prasadk123
0
1K
Member Avatar for Chosen13

Another way of doing this might be to load all usernames into an array, then "implode" the array using a comma separator. [CODE] $users = array(); while($user = mysql_fetch_array($result)) $users[] = $user; // ensure that there is something in the array if (is_array($users) && count($users) > 0) echo implode(",", $users); …

Member Avatar for rajarajan2017
0
118
Member Avatar for brookstone

Hi brookstone and welcome to DaniWeb :) You can simply add your where statement after the on statement. So something like this is ok: [code=mssql] SELECT * FROM A LEFT JOIN B ON A.ID=B.FK_ID_A WHERE A.STATUS = 'ACTIVE' AND B.FLAG = 'Y' -- you can also add an ORDER BY …

Member Avatar for kplcjl
0
137
Member Avatar for bmbvm5
Re: Help

Hi bmbvm5 and welcome to DaniWeb, Unfortunately we are not allowed to just do the work for you, we need to see some effort and then we can give pointers. What have you done so far? What problems are you having? Just giving us your assignment specification isn't enough sorry.

Member Avatar for bitthu
0
194
Member Avatar for muralibobby2015

If you google "javascript alert" you will find many examples of how to create a javascript alert box. Your algorithm should follow these steps: 1. Get the entered email address from the form. 2. Validate the email address has a valid format. 3. Use SQL statement to see if the …

Member Avatar for rajarajan2017
0
820
Member Avatar for bibiki

Your code looks ok to me, except I think you need to override the paintComponent method in the Tooopi class with the code you have in the tupi method? I can't see where the tupi method is being called at the moment...

Member Avatar for quuba
0
198
Member Avatar for PonAngel

Hi PonAngel and welcome to DaniWeb :) What problems are you facing? That's a lot of code to go through without any hints as to what's wrong...

Member Avatar for PonAngel
0
94
Member Avatar for muralibobby2015

Inside your php opening and closing tags you need to [icode]echo[/icode] the [icode]$_SERVER['HTTP_HOST'][/icode] or whatever, you can't just write it the way that you have. Also, you shouldn't use short tags for opening and closing php, use [icode]<?php ?>[/icode] instead.

Member Avatar for muralibobby2015
0
768
Member Avatar for hidash_in

I'm sorry hidash_in but this is the second time you've posted this question and I'm still not sure what you are trying to do. Do you mean that you want a program written in java that opens another application (like word) and then quit the original java program? If that's …

Member Avatar for masijade
0
236
Member Avatar for dawn.visp

The answer to your question should always be "Whatever language is best suited to the task at hand." Try not to limit yourself to a single preferred language, instead try to understand that each language has pros and cons and thus are better suited to perform certain tasks than others.

Member Avatar for Johnsmith1
0
96
Member Avatar for ctyler

[QUOTE]The question is what is the best way to trach the ads. Should there be a seperate months table?[/QUOTE] One approach might be to have an ads_months table that links each advertisement to the month(s) it was run. This would require three columns, ads_months_id (numeric PK), ad_id (numeric FK), month_run …

Member Avatar for darkagn
0
120
Member Avatar for hsncvs
Member Avatar for n_joan

So is your setup like this: [code=java] String variableName = "aVariable"; int aVariable = 670; [/code] And you want to access aVariable through variableName? If that's the case, why do you need variableName?

Member Avatar for n_joan
0
114
Member Avatar for andii_sfx

[QUOTE=andii_sfx;502648]what core subjucts would i need to be good at to find this subject not to challenging i.e maths, science etc.[/QUOTE] Certainly maths knowledge is an advantage (particularly algebra) and physics can be helpful (although I never studied physics after year 10 at school). There are actually a few philosophy …

Member Avatar for DemarioBolden
0
176
Member Avatar for KSUliz

Not sure, but I think you need a third parameter in your call to insertString. The Java API says that insertString takes an int, a String and an AttributeSet parameter, so I would check that first.

Member Avatar for moutanna
0
175
Member Avatar for lumbeelock

Hi lumbeelock and welcome to DaniWeb :) Your error message has been chopped, but the error relates to when you have tried to create a new Employee, the parameters you have passed in don't match the order of the available constructors. Double check your call to [icode]new Employee(...)[/icode] to see …

Member Avatar for moutanna
0
286
Member Avatar for why1991

Your problem is with your 1/4 and 3/4. In Java, both of these evaluate to 0, not 0.25 and 0.75 as you might be expecting. Division of integers in Java (and many other programming languages) always evaluates to an integer, and the decimal part is simply dropped. So the line: …

Member Avatar for darkagn
0
117
Member Avatar for annietabio

Hi annietabio and welcome to DaniWeb :) [code] int i, j=0; [/code] All you have done here is tell the compiler that you have an int called i, you haven't given it a value. When you say i<=m, the compiler doesn't know whether this is true, because i could be …

Member Avatar for annietabio
0
154
Member Avatar for mayanktalwar

[code] if($value==(change here at kashmere gate ) || $value==(change here at rajiv chowk ) || $value==(change here at yamuna bank ) ) [/code] Is that your exact code? If it is, what does "change here at kashmere gate" mean? If it is supposed to be a string, enclose it in …

Member Avatar for mayanktalwar
0
100
Member Avatar for billmudry

Hi billmundry and welcome to DaniWeb :) Here's a MySQL solution to your problem: [URL="http://forums.mysql.com/read.php?10,257906,258154#msg-258154"]http://forums.mysql.com/read.php?10,257906,258154#msg-258154[/URL] Hope this helps you out.

Member Avatar for darkagn
0
116
Member Avatar for jackieoh

Hi jackieoh and welcome to DaniWeb :) Not sure exactly what your question means, but if you want to output "%" character to the console you do this: [code] System.out.print("%"); [/code] If that's not what your question meant, please let us know what you are trying to do.

Member Avatar for BestJewSinceJC
0
107
Member Avatar for rpgwebsolutions
Member Avatar for SKANK!!!!!

The FIND_IN_SET function is used to search a list of strings for a specific string. I don't think you need to do this. Your query should look something like this I think: [code=php] $tag = $_GET[tag]; // NEED TO PERFORM SOME DATA CHECKS HERE... $search = mysql_query("SELECT * FROM threads …

Member Avatar for drjohn
0
175
Member Avatar for darrylpatterson

There are other options too, Ruby on Rails is hugely popular for example. BTW if you ask such a question ("Do you like PHP or ASP better?") in a PHP forum, you are likely to get a fairly biased answer :P

Member Avatar for digital29
0
142
Member Avatar for chie12024

Please use code tags. What line is the error reported on? I suspect the error has to do with the fact that you name your member variable numEggs but then refer to it as numOfEggs in the rest of your code.

Member Avatar for viswaratha
0
229
Member Avatar for rpgwebsolutions

Actually the syntax would be along the lines of: [code] select * from users where phoneno is null [/code]

Member Avatar for darkagn
-3
82
Member Avatar for rpgwebsolutions

Use the parent keyword like so: [code] class parentClass { // magic call to constructor -> __construct function __construct() { //... } } class childClass extends parentClass { function __construct() { parent::__construct(); // ... } } [/code] OR [code] class parentClass { function parentClass() { //... } } class childClass …

Member Avatar for darkagn
-1
60
Member Avatar for Benjip

I would do one query with two joins rather than the three queries you currently have. This allows you to sort on any column from any of the three tables as needed. Something like this would work: [code=sql] -- select all appropriate columns from the three tables select p.id, p.product_id, …

Member Avatar for darkagn
0
259

The End.