Assembly Guy 72 Posting Whiz

how can I hide this error!?

You really should use mysqli_* or else one day in the future when you upgrade PHP, your code will just stop working, and you'll have PHP complaining that mysql_connect() doesn't exist. When functions are deprecated, it is a sign that you must begin migrating to the alternatives. I highly recommend using mysqli_* as the syntax is pretty much the same as mysql_*.

If you still insist to use mysql_*, then you can tell PHP not to report the use of deprecated functions. Look through /etc/php/php.ini and search for error_reporting. Append & ~E_DEPRECATED to it. For example, my PHP config has:

error_reporting = E_ALL

so I'd end up with

error_reporting = E_ALL & ~E_DEPRECATED

Hope this helps

Assembly Guy 72 Posting Whiz

I don't use MASM, but from what deceptikon said, you'll need a linker as well as MASM.

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

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

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

Assembly Guy 72 Posting Whiz

Which errors are you getting?

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

It's valid HTML5.

Okay, that's good to know. Maybe my memory was stuck in the HTML4 days...

Assembly Guy 72 Posting Whiz

AFAIK, it's not valid HTML, but I'm still in agreement with Mike. It's kinda annoying.

Assembly Guy 72 Posting Whiz

However, writing an OS looks like work to me.

Fun work, in some people's eyes

Assembly Guy 72 Posting Whiz

I can't find a list of ranks in endorsements, but you can always see the members ranked by their post count, reputation and solved Q&As here

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

They must be so dedicated

Assembly Guy 72 Posting Whiz

We have no plans currently to support images in signatures.

Thank god. No offence to iLikePHP, but the last thing I want to see are banners on most people's posts, all the way down a thread.

Assembly Guy 72 Posting Whiz

What's your question? What code do you have so far?

Assembly Guy 72 Posting Whiz

I get this error:

  File "/tmp/asdf.py", line 6
    print "i am in function func1"
                                 ^
SyntaxError: invalid syntax

You should be getting the same error. What's your Python version?

Assembly Guy 72 Posting Whiz

@Schol-R-LEA, You're on OSDev too? I had no idea!

Assembly Guy 72 Posting Whiz

Those comments you mentioned are intended to be put in with HTML, not CSS. I would suggest tracking down why it's not looking the same in IE as other browsers, this would find the root cause, rather than just putting an extra layer of complication into your web pages what with the conditional statements and all.

Assembly Guy 72 Posting Whiz

According to this, it is fully supported in IE9. Could you please post the line of code you're using it in so we can help you better?

Assembly Guy 72 Posting Whiz

Right, I see what you mean, but technically, it wouldn't be an OS, hence my confusion.
It's quite a good task for learning Python and becoming familar with Tkinter, in fact it's how I learned much of the VB5 which I have now forgotten :)

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

I wonder how it would stack up today.

Yeah, a lot of things you thought were awesome just don't have the same feel in the present.

In relation to Sublime Text, I like the look of the colours on the black background, but like others have said, I'd prefer if it stuck to my Gtk theme.

Assembly Guy 72 Posting Whiz

Too bad those aren't for the PC.

Someone's bound to have ported to PC. Surely?

Assembly Guy 72 Posting Whiz

Nice. Does it work? You could probably write a function to print a question, get an answer and say correct or incorrect. You would just have to pass the question and correct answer as pointers.

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

I also opted for MinGW back when I used Windows. It's good if you're going to expand into C++ someday.

Assembly Guy 72 Posting Whiz

Well to make it do another question, you would just use the same process you used to check the first question, except printing a different question. So instead of using msga, you might write another, such as msgb and print that to the screen instead.

Assembly Guy 72 Posting Whiz

You might want to post the solution in case someone else has the same problem - it's up to you :)

Assembly Guy 72 Posting Whiz

What's your question? We can't help you if you don't explain your situation.

Assembly Guy 72 Posting Whiz

The C++ code is giving me the expected result, was it your MIPS assembly which gives the problem?

Assembly Guy 72 Posting Whiz

What's your question?

Assembly Guy 72 Posting Whiz

i686 is the short name for the 80686 processor while i386 is the shorthand name for the 80386 processor. They share the same instruction set and are both part of the IA-32 Family but their architecture varies (as that last link highlights). This means that the i686 software was compiled with i686 processors as its target.
i386 is used to mean 32-bit simply because it was the first of the IA-32 family to impliment protected mode (also referred to as PMode), which (in a nutshell) allows larger amounts of memory to be accessed by kernel code, and also allows easier management of memory. Protected mode allows different pieces of code to operate at different rings which have customised access rights to memory and direct I/O, as well as a cut-down instruction set available to non-kernel code. Thus the i386 was the first 'truely useful' IA-32 processor, some may say, so it became the commonplace way of describing 32-bit processors.

Assembly Guy 72 Posting Whiz

It's impossible to say. I'm an electronics enthusiast and I've diagnosed and repaired many faults in equipment in my life, but it's really hard to say it's one thing. It could be two bad PSUs in a row, it could be a fault on the motherboard, it could be something completely separate. If you can't fix the problem yourself, find a friend who can come over and diagnose the fault for you. That or sell it online - someone might buy it wanting to fix it.

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

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

Nobody is taught to use comments anymore? It is so important to comment your code in Assembly, ESPECIALLY in ancient 16bit code where functions don't have names but numbers!!

Amen

Assembly Guy 72 Posting Whiz

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

Assembly Guy 72 Posting Whiz

Right.. because your above code is an operating system in its own right, and cannot use C calls or Windows/Linux Interrupts. Now you say that you want to use Windows Interrupts... I'm confused. Are you writing an Operating System in its own right, or an application to run under Windows?

Assembly Guy 72 Posting Whiz

1) Add '$'s (or whatever currency symbol) in front of your prices that don't already have them
2) The green text 'Your Food. Your Way.' can be a bit hard to read - maybe add subtle text shadowing or change the parent container's background colour to ease the contrast.
3) As for deals.html, it's saying 'Not populated'. I see you've put a message explaining it, but it's not a good look for a business - perhaps temporarily remove the link on the menu bar to this page until it has content on it
4) You open your <html> tag twice:

<html xmlns="http://www.w3.org/1999/xhtml">
<html>

You should only have one or the other, not both

5) On the delivery page, try not to use centered text for more than single-line things like titles or slogans - it can make the reader's eye not follow the text as easily, because when they reach the end of a line, they cannot locate the beginning of the next line because it can be anywhere instead of being on the left margin. Try left align or justify

Other than that (and what mrvijayakumar has said), it looks nice. If I'm ever in Canada, I'll be sure to drop in and have a feast! :)

Assembly Guy 72 Posting Whiz

Okay, nice code - looks good. But I still don't get why you wanted to know whether low-level ints work under Windows.. What relevance is there?

Assembly Guy 72 Posting Whiz

Is the code intended to run at the Application Level, or as an OS in itself?

Assembly Guy 72 Posting Whiz

There'll be at least the 'DOS' interrupt - int 0x21. Why do you need interrupts on Windows if you're making an OS anyway?

Assembly Guy 72 Posting Whiz

I cannot use cpu interupts on windows, or can I?

Whether or not you can use CPU interrupts under Windows depends on your version of Windows. XP has a 16-bit virtual machine thingy built in to support (most) old DOS and W95 programs, IIRC.

I dont think that my newly created kernel will be able to understand invoke ConsoleA or an of those win32 api calls.

Of course your kernel won't be able to use OS-specific calls; they're part of the OS that isn't loaded when your OS is.

So what are my alternatives?
You could use CPU interrupts, write your own code to handle things that interrupts don't.

Does that answer your question? :)

Assembly Guy 72 Posting Whiz

I get where you're coming from. There is no collision in the sense of two NICs TXing on the same lines at the same time, but there is collision in that if both NICs are TXing and neither is in RX, waiting for data, then neither of the NICs will receive any data, because they weren't in RX mode.

Assembly Guy 72 Posting Whiz

http://en.wikipedia.org/wiki/Ethernet_physical_layer#Twisted-pair_cable should answer a lot of your questions.

As you said, there are two for RX (RX+ and RX-) and two for TX (TX+ and TX-). Blue and brown are unused (PoE takes advantage of these). From memory, though, blue is used for ground in both PoE mode and normal mode.

Assembly Guy 72 Posting Whiz

A div always involves two registers, but these registers depend on the size of your operand:

  • DIV BL divides AX by BL
  • DIV BX divides DX:AX by BX
  • DIV EBX divides EDX:EAX by EBX

As you can see, an 8-bit operand divides AX, a 16-bit operand divides DX:AX and a 32-bit operand divides EDX:EAX. (Please note the the semicolon merely means concatenation, not a segment:offset pair).

So in your case, your operand size is 32 bits wide, so it'll be dividing EDX:EAX by [user_input_2]. Who knows what bogus/rubbish value might be in EDX, so it is good practice to zero-it out:

xor edx, edx

Hope this helps.

Assembly Guy 72 Posting Whiz

The service pack updates don't help. Unavoidable "crap" that you need to install into Windows that does slow it down.

That's quite true. I've got Windows XP with no updates or service packs installed on a VM (just as a testing environment for the occasional Windows program I write), and it runs quite smoothly. I have access to a physical machine with a Windows that's all up-to-date and over the installation's life, it's gotten slower and slower, with more and more memory used after a fresh boot, as updates and service packs were installed.
That's one of the main areas that Microsoft has let itself down. Updates and patches should be to not only fix bugs, but also update the existing software to speed it up.