hericles 289 Master Poster Featured Poster

I use Comodo firewall and anti-virus. Its free and seems to do a good job. The latest version starting showing small ads intermittantly (to upgrade to pro, not ads for other products) which is a bit annoying.
I'm not sure how you'd install it with no internet access though...

hericles 289 Master Poster Featured Poster

$query is not a string, it is a mysql_query so your concatenation isn't working as you would think.
Build your string and then create your query.

$select = "SELECT M.msg_id, M.uploads, M.message, M.description, M.type, M.text, M.views_count, U.username, C.name as country_name FROM users AS U INNER JOIN messages AS M ON U.uid = M.uid_fk INNER JOIN head_networks AS H ON M.network_id=H.network_id LEFT JOIN countries AS C ON M.country_id=C.country_id WHERE M.type='A' ";
$Order = " ORDER BY M.message ASC";
$query = mysql_query($select . $Order);
hericles 289 Master Poster Featured Poster

Are you sure rm actually has rows? You're not checking for that and then trying to access the element at position 1. If there is no element at position 1 you would see this error.

hericles 289 Master Poster Featured Poster

What anit virus are you running? I'd do a scan with whatever you have installed AND also ue a decent online tool like Panda to do secondary check.
Its possible you have something running that is just waiting for that internet connection.
You could also turn off all of the non-essential start up programs and services and slowly work through turning them back on while connected to the internet. You may find the one that causes the crash.

hericles 289 Master Poster Featured Poster

Wow, I had plenty of issues moving a 2005 project to 2008. I don't even want to think about what would need to be done to go from 2005 to 2013.
I'm not sure about this, haven't looked into or done it myself, but maybe the piggy back approach might work - convert 2008 if you can then to 2010 or 2012.

hericles 289 Master Poster Featured Poster

DisplayMember and valueMember aren't properties of the DropDownList.
You simply can't use them as they aren't relevant to that control.

hericles 289 Master Poster Featured Poster

The world bank data file says 0.51 hectares per person for the US so times that by 10 million and convert to km2

hericles 289 Master Poster Featured Poster

Check network discovery is on in the Control Panel - Network and sharing screen. Or possibly your firewall could be blocking it if you have it set for super security mode.

hericles 289 Master Poster Featured Poster

Without knowing more about the queries users will be placing against the database it is hard to be sure but making sure all inputting transactions are wrapped in transactions should stop most conflicts.
Any solution that involves locking the required columns or tables during queries should mean max(id) always returns the correct url.

hericles 289 Master Poster Featured Poster

I'm a little unclear of what you need exactly but you canhave a button point to any code you want. Just make sure the code you want to run is in a function by itself and inside the button click code call the function you need.
So if you have functions removeTop() and sendMail(), your button_click would just call both of them.

hericles 289 Master Poster Featured Poster

Yeah, I tried a range of standard start pages (index & default) with a host of extensions but got 403 for all of them. It looks like you have no start page defined. Try browsing to page URL you know exists and see if it displays.

hericles 289 Master Poster Featured Poster

Are any of the columns used in that insert statement integers, double, floats, etc? If yes, you would need to parse the matching input from text to whatever the column type is.

hericles 289 Master Poster Featured Poster

Is there any particular part you are stuck with?
Posting up what you have done already makes it far more likely someone will help you. Requests to do your homework for you don't get much of a response.

If you haven't started, break it down into what it is asking of you:
sort 4 digits highest to lowest
sort the same 4 digits lowest to highest
subtract lowest from highest
check result
input new number or stop

If you handle each part as a separate problem you'll probably find you step through it pretty quickly.

ddanbe commented: well said! +15
hericles 289 Master Poster Featured Poster

Is there a question that goes along with this code?

hericles 289 Master Poster Featured Poster

That syntax doesn't look right. At the very least there should be () around the string and, if memory serves, sqlsrv_query takes more parameters than that... but I could be wrong (too lazy to look up the docs)

hericles 289 Master Poster Featured Poster

You can stand comic sans...?
If we're doing this, can I put in a vote for Calibri, always liked it :)

hericles 289 Master Poster Featured Poster

Um, there is absolutely nothing here to guide us. How do you expect us to help?

hericles 289 Master Poster Featured Poster

As I mentioned in your other post, use the exception object to determine the ACTUAL reason for the error (located by looking at ex.Message).
It will, normally quite clearly, point you to the exact problem.
Alternatively, step through your code in debug mode and see which line of code causes the crash.

hericles 289 Master Poster Featured Poster

I've just gone over your code properly and it could use a couple of pointers.
1) You're putting user input directly into you sql query. Bad idea, use parameters instead.
2) You check for whether the user name and password have been entered AFTER trying to get a result from the database

Neither of those things would cause the code to crash though.

hericles 289 Master Poster Featured Poster

Well, getting the actual error message would be a fantastic place to start.
Change this:

catch ex As Exception
MessageBox.Show("Please exit system and login again.", "Login Error", MessageBoxButtons.OK)
End Try

To

catch ex As Exception
MessageBox.Show(ex.Message, "Login Error", MessageBoxButtons.OK)
End Try

This will give you the real reason for entring tha catch block and we might be able to figure it out.

hericles 289 Master Poster Featured Poster

It's starting to look like something else is the problem. Not sure how much more help I can be...

hericles 289 Master Poster Featured Poster

You mean wish to apply WHERE gender != 'M' right? So males are not included in the query?
select section_no,max(age) as 'Maximum Age' from table1 WHERE gender != 'M' group by section_no

hericles 289 Master Poster Featured Poster

How about having 2 price columns in the one table then? Replicating all that data to hold a different price in another table isn't a particularly good idea.

hericles 289 Master Poster Featured Poster

Not really although you could set it to 1200 to match the execution time or -1 (its default value). I think the max_execution_time shows in phpinfo().
Can you output that and check the value you see there matches what you have the ini file?

hericles 289 Master Poster Featured Poster

OK, catch the actual exception, ex.Message, and see what that says.
Naturally, "please exit system..." is the error message you supplied.

hericles 289 Master Poster Featured Poster

max_input_time can override max_execution_time but this was supposed to have been fixed in 5.3.1. What PHP version are you using?

hericles 289 Master Poster Featured Poster

The use of @media queries in the html head would be a strong indicator and quick to check. Look for css files with names that suggest different sizes e.g. mobile.css
<link href="mobile.css" type="text/css" media="screen and (max-device-width: 480px)" rel="stylesheet"/>
CSS links like the one above only run if the media criteria is true so if you see something like this then you have a responsive design.

Or there are some online tools, like this one

hericles 289 Master Poster Featured Poster

The way you have your query you will end up with two columns, a.price and b.price, per row so your second requirement of having table 2 values first then table 1 doesn't really fit.
Do you have two tables containing the same items but just a different price in each one?

hericles 289 Master Poster Featured Poster

Out of curiosity, have you had any luck with this? I'd be interested to know what affected the mouse on another computer when you ran your program.

As Ketsuekiame asked, what runtime errors are you getting?

hericles 289 Master Poster Featured Poster

OK, as a test, can you alter the html property in the css file so the background image isn't a part of it, change the colour instead. That way we'll know if the image is the issue or the html selector itself.
Of course, strip the color from the body selector too...

hericles 289 Master Poster Featured Poster

Can you count the size of the $row to make sure it equals the number of columns? At least then you'd know if the database is returning a complete result set.
I'd loop through the row item as a test as well, echoing for each element, just to be sure of what it contains.

hericles 289 Master Poster Featured Poster

I think you might have ended up on a email blacklist. Trying to locate which black list you are now on can be difficult. It will effect everyone using the same domain part of the email address (everything after the @) so other people in the company will have the same problem.
You can either find the blacklist and try to get taken off it (there are online tools for that) or wait for the trust level of email address to rise again. That may take some time.
Has your company engaged in any email campaigns later (even legit ones)? Thats how I got pegged a couple of months back.

hericles 289 Master Poster Featured Poster

I doubt your image dir is inside your styles directory in that case.
Change to
background: url(../images/ralnabg.jpg) no-repeat center center fixed;

You need the ../ to revert out of the styles folder and locate the images folder.

hericles 289 Master Poster Featured Poster

SELECT * FROM articles WHERE id='$id'
would have returned all columns in the articles table. Are the columns you mention part of that table or another one? Or could they be empty strings?

hericles 289 Master Poster Featured Poster

OK, I would use a client side script to do the search and highlight because a postback to the server is unnecessary. You already have the data on the screen in front of you and highlighting text is a view based operation.
So, using something like jquery is perfect. You would need the input box to accept the user's search term and, on the button click, run the script.
If you don't know jquery there are plenty of tutorials online and it is a very good tool to learn - you can have a lot of fun with it.
Once you've played with jquery a bit and learnt the basics the link I provided has all the information you need to incorporate it.
But, if you try and have trouble, post up how far you get and we'll help you out.

hericles 289 Master Poster Featured Poster

Welcome and congrats on the MSc offer :)
Glasgow is going to be a little bit wetter than Iraq me thinks. Is that why the umbrella in your profile pic?

hericles 289 Master Poster Featured Poster

[Nope]Forever, you seem to be getting an awful lot of page votes for your posts. I see you got 6 up votes for saying thank you in one thread, and not this one either, (seeing as you got 6 votes for the comment above as well).

Even more interesting, a lot of the votes (if not all) come from two new users from Wellington. Which is where you're from... Are you spamming the system?

hericles 289 Master Poster Featured Poster

Amost. If you use AS to rename (alias) a table you then use that alias in the rest of the statement.
There is no point using AS s if you then use songs.name in the SELECT statement. So, if you remove the two AS statements (as s, as sa) it should work.

hericles 289 Master Poster Featured Poster

Are you getting any errors when you run it and, if so, what are they?

hericles 289 Master Poster Featured Poster

There is a very cool jQuery plugin that will do that for you.

Click Here

That will allow you to use client side scripting to get the user input and find the searched term in the page.

hericles 289 Master Poster Featured Poster

Assignment time again...
Very few of us want to do your homework for you. Seeing as this is a class you are taking you must have covered at least some java programming before this assignment was dropped on you. Thats how classes work.
We will help if you have attempted the question and are actually stuck. You can prove that by posting up some code.

But for now, assuming this is a command line app (which they always seem to be), learn how to structure a java class and receive input from the command line. Thats step one (and shouldn't take more than half an hour on Google).

hericles 289 Master Poster Featured Poster

You would have to look at caching the result set so it was available when the print button was clicked. Or you could get one result each time and when the button is clicked call a query to get the next one. The data would need some unique identifier for this to work so you know which was the next result you wanted.
Or you could use jQuery to hide all of the elements and show the one you were up to. To do that you'd give each section a unique class attribute (e.g. its position in the array), hide all of them, and on a button click display the next section - although this may not work well depending on what and how the print function works.

hericles 289 Master Poster Featured Poster

I'm not sure I understand. Do you want to get the next record when the user requests it (from a button or link for example)?
The WHILE loop is doing exactly what it should, loopoing through the result ser until no rows are left.
How do you want the script to work?

hericles 289 Master Poster Featured Poster

Typing 'C# interview questions' into google gives a lot of good responses.

hericles 289 Master Poster Featured Poster

You just call the functions you need to run on page load. The jQuery construct $(document).ready() fires when the page has finished loading so you only need to place calls to javascript functions that need to run straight away.
You can place more functions there, particularly if you want to add in events for buttons clicks, text changed, etc.
If you have a standard javascript function (say onclick) that goes in the normal location - js dir or another file, however you would normally structure your projects.

hericles 289 Master Poster Featured Poster
select s.name, sa.artist from songs as s join songartist as sa on s.id = sa.sid where s.id = 10

That will return a row (containg song name and artist) for every song artist that is linked to song id 10

hericles 289 Master Poster Featured Poster

The background property is a shortcut to combine all background commands into one, as opposed to having a background-color and a background-image.
So you are setting a background-color and then using the background: to say you don't want a color.
try:
background: #3d3d3d url(../images/first_section_bg.jpg) no-repeat center center;

hericles 289 Master Poster Featured Poster

May be obvious but need to ask: is your CSS file in the same directory?

hericles 289 Master Poster Featured Poster

Remove the var key word from line 5. You don't want to to be specifying a new version of X, just reset the existing x variable.

hericles 289 Master Poster Featured Poster

The end result would be exactly the same with either of these languages(although I would prefer the look of win forms but that is jst personal choice). They are both more than capable of doing the job. Pick the language you want to get better at and have a go.