Assembly Guy 72 Posting Whiz

You won't need an array. The simplest method to turn an integer into a grade from your table is to use a series of cmp and jg instructions. For example:

cmp score, 90
jg Grade_A
cmp score, 80
jg Grade_B
cmp score, 70
jg Grade_C
cmp score, 60
jg Grade_D
 - - and so on - -

I know you went to arrays for efficiency's sake, but try not to overthink these things. Keep it simple.

You'll need some way of converting the string you're getting from stdin into an integer (IIRC)

Roger_2 commented: please take a look at my code below i would like your information +0
Assembly Guy 72 Posting Whiz

Oh jolly! A riddle! Not only do we get to guide you through fixing the code, but we also get to make wild stabs and guesses at what exactly the code does, and which errors is is producing. My Saturday nights don't get any better than this.

In all seriousness, you're going to have to provide us with a bit more background info. What's this program supposed to do? What's it not doing that it should? I understand that this is an international forum and there may be a language barrier, but please try to explain as best you can.

Assembly Guy 72 Posting Whiz

which code(c or c++ or java) you want tell me first

Well seeing as this is posted in the C++ forum, I'm going to make a wild guess that it's a C++ question ;)

Assembly Guy 72 Posting Whiz

I'm a professional figure skater.

Why else would anyone be here?

Also this has to be put somewhere in here: <div class="derailed">

Assembly Guy 72 Posting Whiz

aw not that kind of programing

If you don't like streams, calling printf("*143#\n"); from within C++ is valid, so long as you include stdio.h

Assembly Guy 72 Posting Whiz

Seeing as this is homework, I'm not giving you the tip outright or step-by-step. Follow above poster's advice, but here's some extra food for thought. The ASCII values for a lower case letter and its capital counterpart have some interesting properties. Look at them in hex or in binary form. You can switch from lowercase to capital with a specific bitwise operation and accompanying bitmask.

Assembly Guy 72 Posting Whiz

I heard that C++ is used for creating games.

That's certainly correct; a lot of game development out there is done in C++. Just keep in mind that it's not the only language you can use to develop games and in a decade or so when you're comfortable with developing games in C++ and get bored, you could try out game dev in other languages :)

Assembly Guy 72 Posting Whiz

You can sort-of dynamically create tuples, for example:

name = "Jim"
last_name = "Beam"

mytuple = (name, last_name)

However, you'd not be able to dynamically change the size of a tuple. That sort of thing's hard-coded.

Assembly Guy 72 Posting Whiz

We don't do your homework for you. Show some effort of your own toward solving the problem before simply demanding code.

Assembly Guy 72 Posting Whiz

they can increase the tax on it.

Thus penalising everyone for a minority's mistakes?

Assembly Guy 72 Posting Whiz

What do you think is going to change inFile's boolean state to quit the loop?

Assembly Guy 72 Posting Whiz

I ain't an expert in grammar either, although I fancy myself a connaisseur.

That is quite possibly the most hilarious way I have heard the words fancy, myself and connaisseur being used. I simply don't see grammar as being a sibling of fine cheeses and wines...

Assembly Guy 72 Posting Whiz

I that a while after I wrote. It's performing the ! operation on i, then the modulo. It'd need brackets for example !(i%3). This puts it to the same length as i%3==0.

Assembly Guy 72 Posting Whiz

set /p is a set command with a 'prompt' flag fed to it, meaning that it will prompt the user for a value to set the variable to. Example (untested):

set /p "myvar=Enter a value: "
echo You said %myvar%

To answer your second question, check out DosTips.

Assembly Guy 72 Posting Whiz

Do you mean that Ubuntu set up a tiny partition and is only using that? Maybe post a summary of sudo cfdisk /dev/your-hdd-or-disk-or-whatever. You can extend and shrink partitions fairly safely using gParted, remembering to run it from a disk which isn't the one you're changing.

Assembly Guy 72 Posting Whiz

While we're on the topic of the buttons, I find them a bit standy-outy. I find them to draw attention away from the post. Maybe if they were more pale? Maybe it's just me.

Assembly Guy 72 Posting Whiz

Are you sure that there is more than one result being returned?

Assembly Guy 72 Posting Whiz

That's a statement, what's your question? What have you done so far?

Assembly Guy 72 Posting Whiz

Search Engines are smarter than to take 3 links to your website on the same thread and count them as backlinks.

Assembly Guy 72 Posting Whiz

On my end, the load time is 0.28 seconds (further from the server, I guess)

AFAIK, (and if you're talking about the thing in the footer), it's how long it took for the page to be generated, before dispatch to the client, so your distace from the server or link speed shouldn't affect it. One time I had a generation time of 14 seconds, but let's not bring that up...

As Mike's pointed out, what's wrong with 2MB of memory being used? It's not like it's the total size of the page which you end up downloading (correct me if I'm wrong on this)

Either way, it sounds like WEB-REPORTER's an 11-year-old, or has other troubles.

Assembly Guy 72 Posting Whiz

Looks fine for me, although I'm running Firefox and Chromium on Linux, not Chrome on Win7

Assembly Guy 72 Posting Whiz

If you work at home, then yes you can.

That would be omitting the fact that a lot of clients are driven away by people who aren't suit-wearing, conforming pricks. But four posts up, happygeek dealed with that issue.

Assembly Guy 72 Posting Whiz

Javascript has nothing to do with Java. This is the Java forum. Also, this stinks of homework.

Assembly Guy 72 Posting Whiz

As someone else on Daniweb has said, he gives a lot, he gets a lot :)

<M/> commented: Yep... who said that? +0
Assembly Guy 72 Posting Whiz

Faster...

This doesn't sound like the words of someone who is well-versed in the ins and outs of different web server software and their points of difference. It sounds like someone who's just reads the TL;DRs

There are more possibilities than the one you mention. Just because you like one solution, doesn't mean it's viable for every other project.

True. Personally, I like lighttpd, but Dani is an informed person who's intelligent enough to make these decisions. Speed is not the only concern in running a website think security, quick fixes of server problems and so on. Besides which, it would be useless if there was a lightning-fast web server which was difficult, uncomfortable or awkward to use. I'm not saying nginx has these qualities - nginx is fine in my opinion, but a large part of how effective a piece of software will be in an environment is how well the users will be able to, well, use it. Imagine this:

"Grandma A learned to knit with bendy rubber knitting needles. Grandma B learned with traditional needles. Grandma A has observed the amazing ability to manupulate patterns and create garnments which would usually take longer on traditional needles. Grandmas A and B produce equally good garnments, just that one does it a bit faster than the other."

While Grandma A's bendy needles may appear superior, you may forget that they may only be superior while in Grandma A's hands. Grandma B may have great trouble …

Assembly Guy 72 Posting Whiz

can we check whole motherboard using AVO meter or another equipments is necessory

It all depends on what part of the motherboard's broken. If you need to look at buses or lines which are switched at high frequency, your little AVO meter won't cut it - it won't be able to detect the fast changes in voltages. A logic analyser might be useful.

best4earn commented: Thanks Assembly Guy +2
Assembly Guy 72 Posting Whiz

It's just funny to me that some clown like you, would take the time out of his day, to write some nonsense like this.

It's just funny to me that some clown like you would take the time out of his day to write a response to that message if you find it so laughable.

Assembly Guy 72 Posting Whiz

Maybe he just wanted to see what deleting your profile actually does.

Assembly Guy 72 Posting Whiz

If 0-<-< really is Michael...

<M/> commented: yep :D +0
Assembly Guy 72 Posting Whiz

No. Python is a scripting language, which means that it requires an external program to interpret the python source code for it to be executed. To be able to execute Python, you require the Python Interpreter to be installed. This interpreter only runs in an existing operating system, such as Windows or Linux. On top of that, Tkinter requires a window manager to be present. On Windows, the window manager is part of the OS.

This renders it impossible to write an OS directly in python.

ddanbe commented: Yes. +14
Assembly Guy 72 Posting Whiz

The header() function is exactly what you need here. To redirect, simply use it like:

header("Location: xyz.php");

To redirect to the example page xyz.php. If you have a fair amount of pages, then you could store their filenames in an array in a file called go.php:

$pages = array(
    'index.php',   // ID 0
    'contact.php', // ID 1
    'about.php'    // ID 2
);

And simply accept an ID through as a GET value, say $_GET['id'], so to pass this ID to the page, it'd just be a simple matter of redirecting the user to whichever page has the ID which matches the ID specified. So go.php might become:

$pages = array(
    'index.php',   // ID 0
    'contact.php', // ID 1
    'about.php'    // ID 2
);
// If no ID specified, default to ID 0
$id = isset($_GET['id']))? $_GET['id'] : 0;

// If the ID is an existing index of $pages, redirect. Else, display error message
if ($id >= 0 AND $id < sizeof($pages))
{
    header("Location: ".$id);
} else {
    echo("Page not found!")
}

Then, for example, you'd simply have to link to go.php?id=0 to go to the homepage. You could of course expand this to use an associative array (dictionary) to give each page a purposeful ID instead of a number. For example:

$pages = array(
    'home'    => 'index.php',   // ID 'home'
    'contact' => 'contact.php', // ID 'contact'
    'about'   => 'about.php'    // ID 'about'
);

So you could link to go.php?id=home for the homepage. However, this means you'd …

Assembly Guy 72 Posting Whiz

Tedmorrow, please leave this thread alone, it's old and it wants to rest in peace.

happygeek commented: ignore him, he's a spammer +12
Assembly Guy 72 Posting Whiz

Nice going on the PHP, in my opinion (and many others'), it's the best language for generating hypertext.

Assembly Guy 72 Posting Whiz

so , if n is not useful then don't declare it.

This is why I believe -Wall (and other compilers' equivalents) shouldn't be optional.

ddanbe commented: Indeed! +14
Assembly Guy 72 Posting Whiz

See http://stackoverflow.com/questions/1699748/what-is-the-difference-between-mov-and-lea#answer-1699778 for information on the difference between a value and effective address.

Assembly Guy 72 Posting Whiz

open(c:/wampserver/tmp/sess_4bkd7oiqmi7298mhikv09447t6, O_RDWR

It's trying to open a session file using a Windows-style filepath... That's odd. It might be a configuration parameter being set inside your PHP code, for example:

ini_set('session.savepath', 'c:/wampserver/tmp/')

You shouldn't need a line like the above, but it sounds like someone/something put that into your code, which means that the live copy will be trying to open a file in a path which doesn't exist, hence your error messages. Without this option, PHP will stick to its configuration file on the web server, which will normally be the system default.

Assembly Guy 72 Posting Whiz

A text editor and a web browser :P

Assembly Guy 72 Posting Whiz

You're forgetting that the compiler can optimise. Who's to say the compiler doesn't change a multiplication into something like #1, and simplify #2 to #1? There are too many variables here to say for sure which is the fastest when it is put into practice.

The only minus is the subtraction.

Do I sense a pun?

rubberman commented: Excellent points AG, especially the one about the pun! +12
Assembly Guy 72 Posting Whiz

I use Wine with a couple of small utilities which were only ever released on Windows. Namely a tone/sound wave generator. Also some PIC programming software and a Z80 assembler.
I do have a Windows XP VM somewhere on this machine just in case, but it's been years since I last used it.

Fair enough houndhen, I find the Linux accounting software like GnuCash lacks core features like inventory management. There are still some pieces of Windows software which won't get drunk enough when you run it on Wine.

Assembly Guy 72 Posting Whiz

The odd capitalisation in my username was initially an acident, but I've embraced it anyway. Just to see what would happen, I tried changing my username to 'Assembly Guy' instead, but I'm being told that the username is already taken. I understand that it's case insensitive so that someone can't call themself 'dani' (all lowercase) and impersonate, but could we maybe change the username changing process such that if you own the username already, you can change the case of it?

As I write this, I'm convincing myself I've written it in a way that makes no sense...

Assembly Guy 72 Posting Whiz

I'll take that to mean 'without any additional downloads or installations.' In that case, you might want to look at http://technet.microsoft.com/en-us/library/cc732046%28v=ws.10%29.aspx

Assembly Guy 72 Posting Whiz

Once the problem is solved, I would suggest including something like:

$res=mysql_query($query);

if(!$res)
{
    // Do something to catch the error - maybe display
    // an error message, send the admin an error report
    // by email or try the query again
}

To provide a more useful error message if this recurs in future.

Assembly Guy 72 Posting Whiz

As a quick example off the top of my head, see Luke Edwards's Website. Mainly watch the menu items when you resize your browser window. As arti18 said, it's got nothing to do with SEO - it only affects how the website is displayed on different screen sizes (think smartphones and tablets).
However, responsive design can be used in parallel with SEO to bring more visitors to your site - with your website looking good on more devices, you have a wider audience.

Assembly Guy 72 Posting Whiz

mysqli_affected_rows() returns the number of rows which were changed as a result of the last query. mysqli_num_rows() returns the number of rows in the array/resource (i.e. the query result) returned by the query.

Even if mysqli_num_rows may work for counting affected rows, it's probably not a good idea to do this, as this functionality may be removed in the future for all we know - the function wasn't necessarily designed for this.

Assembly Guy 72 Posting Whiz

I tried cd /user/lib

Did you try /user/lib or /usr/lib? There's no such thing as /user/lib (note the 'E' in user). Linux likes to shorten the root folders to three-letter names. Please check you were trying usr instead of user

Assembly Guy 72 Posting Whiz

You should be able to just cd /usr/lib ? That, or try cd /lib/. I'm not 100% familiar with Ubuntu, but I've never seen a distro without a /usr/lib directory.

Stuugie commented: Thanks +4
Assembly Guy 72 Posting Whiz

x86 is an architecture that goes way back, all the way back to Intel's 16-bit processors. They named their processors things like 8086, and in later days 80186, 80286, 80386, 80486, 80586, 80686 and so on. Because of this, the 'x' in x86 is just a wildcard.

As far as I am aware, x64 is a lazy way of writing x86-64 (correct me if I'm wrong). x86-64 processors are those which follow the internal architecure of the x86 processors, but are 64 bit. That, or Intel have named their 64-bit processors to end in '64'.

Assembly Guy 72 Posting Whiz

I very much like the new design. Clean and fresh. Nice. I like how my avatar fits nicely into the circular avatar windows better than a lot of people's, for example where the endorsements are shown at the top of a forum ^_^

Assembly Guy 72 Posting Whiz

Hi, excuse me if this already exists, but could we have a means of syntax-highlighting code that is tailored to the forum that it's posted on, and optionally an author-specified language. I.e. on the C forum, the highlighing would be heavily tailored to highlight C code. You get the idea I'm sure.
I've noticed very marginal highlighting over on the Assembly forum which makes code harder to read - especially since certain languages (cough assembly cough) can sometimes be messy in themselves without the syntax highlighting messing things up further.

Cheers

Assembly Guy 72 Posting Whiz

Sounds like a partitioning problem...
I googled your error message and someone said that this solved their problem.