dickersonka 104 Veteran Poster

Sure thing. Any other questions, feel free to post to the forums.

dickersonka 104 Veteran Poster

no, that is a negative -1

then it will count

for (int number=10; number > -1; number--)

10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0

if you don't want to include the 0 set

for (int number=10; number > 0; number--)
dickersonka 104 Veteran Poster

it will be this

for (int number=10; number >= 0; number--)

you must say, while number is greater than or equal to 0

i normally also try to avoid >= in for loops and use only >

for (int number=10; number > -1; number--)

also be aware this will execute 11 times, because it includes 0, but then again that may be what you are looking for

dickersonka 104 Veteran Poster

I know you are a beginner, but please post your code in code tags

dickersonka 104 Veteran Poster

Post what you need help with

dickersonka 104 Veteran Poster

Lol agree with ddanbe, like we told you yesterday use
tbSendText.Text

And just to shed some light on what the other guys are saying about the crlf (\r\n), the socket you are connected to needs to know when you are done sending. Since you can send 5 bytes, then later 10 bytes for example, you must tell the connected socket when you are done. The crlf typically is used to say "i am done", then the response is sent back from the connected socket.

ddanbe commented: respect +1
dickersonka 104 Veteran Poster

sorry i misread the original, it is BOTH "degree" (not degrees) and scale

public Degree(float degree, char scale)
{
   this.scale = scale; 
   this.degree = degree;
setDegrees(this.degree); 
  }

the conversion is taking place in the setter, which is always called on each constructor, the getters only need to return the value

dickersonka 104 Veteran Poster

Lol thanks. It was good with the last version of firefox and never tried opera. Thanks for your foresight.

dickersonka 104 Veteran Poster

I'll second ddanbe.

I will always name my textboxes prefixed with tb
example: tbSendText

dickersonka 104 Veteran Poster

the actual constructor signature is fine, the code inside is not

public Degree()
  {
this.scale = 'C';
this.degree = 0;
setDegrees(this.degree);
  }

 public Degree(float degree)
  {
this.scale = 'C';
   this.degree = degree;
setDegrees(this.degree);
  }

 public Degree(char scale)
  {
    this.scale = scale;
this.degree = 0;
setDegrees(this.degree);
  }
dickersonka 104 Veteran Poster

You can't have the multiple returns in your toString.

public String toString()
  {
if(scale == 'F'){
   return "Fahrenheit Temperature: " + fahrenheitTemp;
}
else {
	return "Celsius Temperature: " + celsiusTemp;
}
 }
dickersonka 104 Veteran Poster

I'm assuming sendText is a textbox.

You need to get the text not the textbox

sendText.Text
dickersonka 104 Veteran Poster

You can do it in the registry, not necessarily programmatically like you might want, but here is the link.

http://www.experts-exchange.com/Programming/Languages/CPP/Q_20794497.html

dickersonka 104 Veteran Poster

As long as you are on mysql 5 you can do it that, and pretty sure in 4 as well. Just ensure the zone table is out there with entries.

SELECT COUNT(*) FROM mysql.time_zone_name;

The reason why I would say to do it in the app code is that you always know your datetimes are coming across as utc, and not already timezone formatted. It is one of those things you can go either way on, but from experience I have found it most consistent to let the database simply store and retrieve the data, and reside your formatting (timezone and dst in this instance) in the app code.

dickersonka 104 Veteran Poster

You have two of the same constructors

Change this

public Degree(float degree)
{
 temp = degree;
 scale = 'C';

}
 
public Degree(float degree)
{
 temp = degree;
 scale = 'F';

}

Read what you are assigned

"Four constructors: one for the number of degrees, one for the scale, one for both degrees and the scale, and one default constructor. For each of these constructors, assume zero degrees if no value is specified and Celsius if no scale is given."

Here are the constructors, read your instructions on what to do with them

public Degree(){
}

public Degree(float degree){
}

public Degree(char scale){
}

public Degree(float cDegree, float fDegree, char scale){
}
dickersonka 104 Veteran Poster

I would suggest not to use convert_tz in mysql, do it in your application code.

UTC is not subject to time zones or dst. When you get your utc value to the application code, apply your timezone and your dst at that time.

Not sure what language you are using on code side, here is how to do everything in php
http://whatstheplot.com/blog/2008/03/13/dealing-with-timezones-in-php/

dickersonka 104 Veteran Poster
select * from (select * from table t1 where t1.column=value) as t2
where t2.column=value
dickersonka 104 Veteran Poster

You only need to install workstation components as part of the installation. I don't know what you are meaning the other ones will have problems later, each part of the installation can be completed later by only selecting it with no problems, if thats what you are meaning.

dickersonka 104 Veteran Poster

I would suggest to do this in code rather than the database.

Always store your dates in utc and don't worry about the timezone, then in the code do the conversion necessary.

dickersonka 104 Veteran Poster

I agree, def not as good visio, but for free, definitely can't complain.

dickersonka 104 Veteran Poster

Here's a free one I have used before. Covers a large set of the visio like features.

http://live.gnome.org/Dia

dickersonka 104 Veteran Poster

if you are doing it in code, make the method accept an enum value

if you can do that, agree with lizr and validate what is passed in, might want to add an enum value of unknown to your list and use it if an enum isn't valid for the specified int

dickersonka 104 Veteran Poster

Whenever you backed up the original database make sure to backup stored procedures, views, and users along with it. Then do the restore and they should be there.

dickersonka 104 Veteran Poster

A stored procedure is a set of sql code for the database, not a column.

You can find it in the programmability section for the database.

The security on the stored procedure is separate from allowing the login, find the stored procedure going into programmability -> stored procedures for that database

dickersonka 104 Veteran Poster

First make sure the stored procedure does exist

Second make sure the user specified in the connection has privileges to use it, if not log in as administrator and allow that user to access it

you can log in through sql management studio as that user after you apply your changes and see if its visible then

dickersonka 104 Veteran Poster

Might want to try pinging

System.Net.NetworkInformation.Ping

http://msdn.microsoft.com/en-us/library/system.net.networkinformation.ping(VS.80).aspx

dickersonka 104 Veteran Poster

Here's the code I use without any problem when passing byte arrays back and forth from java to c#

//Assign these some values
byte[] byteImage;
string savePath;

FileStream fileStream = new FileStream(savePath, FileMode.Create);
//attempts to write file to local machine
fileStream.Write(byteImage, 0, byteImage.Length);
fileStream.Close();
dickersonka 104 Veteran Poster

1. Add a do while loop

do{
// your code here

}while(repeat == "y")

2. first part use

int num;
bool isNumber = Int32.TryParse(intput, out num);

if(isNumber)
{
//this means the user input a number
}

the second part

bool isLetter = Char.isLetter(repeat[0]);
dickersonka 104 Veteran Poster

sure you are hitting the same database?

also, is it a long running query? if so, might want up your limits

dickersonka 104 Veteran Poster

you can't have the space after CONCAT_WS and you also need a comma after id

select id , CONCAT_WS(', ', l_name,f_name)
dickersonka 104 Veteran Poster
toadzky commented: Perfect. +2
dickersonka 104 Veteran Poster

VNC is a good solution

You can set it to where you can connect with no password, or with a password, but only from the person doing the logging in. You can then observe the desktop and interact if need be.

www.realvnc.com

Remote desktop will not allow them to be logged in at the same.

dickersonka 104 Veteran Poster

You can use a java editor, there are a couple common ones, eclipse, netbeans.

I suggest eclipse
www.eclipse.org

dickersonka 104 Veteran Poster

you can check the box, it just won't show the message anymore, it won't hurt anything

dickersonka 104 Veteran Poster

its a good thing and a bad thing

looks like your super anti spyware has worked, and it has removed the files

the problem is, they are set to startup still
remove them by going to
start -> run -> msconfig -> startup

remove the previous, or anything that looks suspicious

might want to run a virus scan just to be safe as well

dickersonka 104 Veteran Poster

what distro of linux are you running?

If ubuntu, many packages are available through synaptic

dickersonka 104 Veteran Poster

Assuming you are using apache, here's a guide to setting up a virtual directory in apache

http://forums.htmlcenter.com/servers/2879-creating-virtual-directory-apache.html

I would recommend to set up possibly inside the uploads directory, you just want to be sure that permissions on this images directory aren't able to access your other directories, because you are allowing users to write to them.

dickersonka 104 Veteran Poster

First part.
You are going the right route by storing files on the server and paths in the database. You should create a main image directory and possiblty have your images table have a subpath off of that. I'm sure each row will have an 'owner' or client column, so each client can have its own subfolder for images. Then each client, will have a house id lets say. So you can use something like this
/images/clientid/houseid/imagename.jpg

Second part.
This will work a little different. You will only want to load content, and not necessarily the entire webpage from the database.

If you can be a little more clear from the second part feel free.

dickersonka 104 Veteran Poster

[a-zA-Z]*

dickersonka 104 Veteran Poster

Depending upon the document, you can check for paragraph separator character

0x2029

Otherwise, you might need to check for multiple carriage returns, line feeds, depending upon how your document is saved.

dickersonka 104 Veteran Poster

Well what way do you have it now?

Also be sure to optimize your code as well ie use stringbuffer instead string +, you know the usuals. When you are comparing characters, you might be running into speed and performance issues when you get into the larger documents.

Post the code and lets take a look.

dickersonka 104 Veteran Poster

Create mainmenu as a separate class NON STATIC

from main call this

Mainmenu mainmenu = new Mainmenu(playername);

mainmenu.run();


// in the mainmenu class
private String playerName;
public void mainmenu (String playername) {
this.playerName = playername;
}

public void run(){
while (makerestart <= 200000);
//... continue on with your original mainmenu code
}
dickersonka 104 Veteran Poster

Static is meant to be thought of as that it doesn't apply to a specific instance of the object or class. As java addict's example, you can printMyName at any time without creating an instance.

dickersonka 104 Veteran Poster

you need an actual method named main when starting the application and it does need to be static

It looks like you need to change Opening method to be main

dickersonka 104 Veteran Poster

Lol ok homes, I was just giving an example.

You could possibly tell them their account is inactive, and go through some sort of steps to reactivate and set their active flag back to '1' so their data won't be lost.

There is really no right answer on how long to keep the information. A lot of times I would never delete unless it became an issue of database size or critical information.

Also, assuming you have some sort of houses table with a user_id owning the house. If you physically delete the user row, then you will have to delete house row as well as long as constraints are in place. Therefore I would say its not normally that important to delete the data, but it can be under the right circumstances.

dickersonka 104 Veteran Poster

joins meaning left outer, inner joins

i mean to pull back the active column from the user table

for example lets says a user places orders

table orders
order_id
user_id
order_number

then in the query you can do something like this

select o.order_id, o.order_number, o.user_id from orders o
inner join 
users u
on o.user_id = u.user_id
where u.active = 1

like for example if you let a user to see orders without logging in, you would want to join on the user table to make sure that they are still active before showing the results

dickersonka 104 Veteran Poster

Yes, same sort of update query as normal if you want to delete. This way also allows you to keep your database in tact and not worry about fk constraints on deletes, or a good way to recover data if it was 'deleted' (just set inactive).

Just remember if you are doing any joins on the user table or based upon a used_id to always add the active column to the query as above.

dickersonka 104 Veteran Poster

not necessarily any different from the php side except the queries, more from the mysql side

$query  = "SELECT username, password FROM users where active=1";

mysql table
users
username
password
active

dickersonka 104 Veteran Poster

Add something like an active flag to the user. And in all queries when pulling users add where active_flag = 1 for active users, and the '0' user will not be pulled back. So this allows you to maintain the user still in the db, but not returned from queries to display in the website.

dickersonka 104 Veteran Poster

Do you have the latest services packs and did you apply this hotfix if so?
http://support.microsoft.com/kb/925744