Sure thing. Any other questions, feel free to post to the forums.
Sure thing. Any other questions, feel free to post to the forums.
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--)
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
I know you are a beginner, but please post your code in code tags
Post what you need help with
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.
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
Lol thanks. It was good with the last version of firefox and never tried opera. Thanks for your foresight.
I'll second ddanbe.
I will always name my textboxes prefixed with tb
example: tbSendText
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);
}
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;
}
}
I'm assuming sendText is a textbox.
You need to get the text not the textbox
sendText.Text
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
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.
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){
}
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/
select * from (select * from table t1 where t1.column=value) as t2
where t2.column=value
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.
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.
I agree, def not as good visio, but for free, definitely can't complain.
Here's a free one I have used before. Covers a large set of the visio like features.
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
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.
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
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
Might want to try pinging
System.Net.NetworkInformation.Ping
http://msdn.microsoft.com/en-us/library/system.net.networkinformation.ping(VS.80).aspx
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();
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]);
sure you are hitting the same database?
also, is it a long running query? if so, might want up your limits
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)
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.
Remote desktop will not allow them to be logged in at the same.
You can use a java editor, there are a couple common ones, eclipse, netbeans.
I suggest eclipse
www.eclipse.org
you can check the box, it just won't show the message anymore, it won't hurt anything
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
what distro of linux are you running?
If ubuntu, many packages are available through synaptic
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.
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.
[a-zA-Z]*
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.
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.
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
}
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.
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
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.
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
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.
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
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.
Do you have the latest services packs and did you apply this hotfix if so?
http://support.microsoft.com/kb/925744