Assembly Guy 72 Posting Whiz

Honestly, Deepak_31? You think they're still after an answer eight years later, when the question has already been marked as solved? Please refrain from resurrecting such threads in future…

Assembly Guy 72 Posting Whiz

I'm not getting the infinite loop locally. What input were you using when the infinite loop happened? Also, my initial comment was wrong, we should be using jge. It's also considered bad practice to not have your last condition a simple fallthrough too.

Assembly Guy 72 Posting Whiz

There are a number of faults that a program can encounter at runtime, and segfault is a very specific one. I'm not going to give you the answer straight out since this sounds like it could be a homework question, but if you read up on the basics of what causes a segfault, you should be able to spot where you're going wrong. Check out this extract from Wikipedia

Segmentation faults have various causes, and are a common problem in programs written in the C programming language, where they arise primarily due to errors in use of pointers for virtual memory addressing, particularly illegal access.

Illegal access is the key term here. You can only access memory you've allocated in your program.

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

Your problem's around these lines

cmp op1, 0p2
je same
jne different

The second operand '0p2' should be 'op2' (zero versus o). Also, for the sake of efficiency, you could/should write the jump for inequality as a fallthrough. The fallthrough will also erase any undefined behaviour around that point. We can't be sure if the JE instruction messes with the zero flag or not.

Assembly Guy 72 Posting Whiz

It's not the IDE that compiles your source code, it's a program called an assembler. The IDE just provides a flashy GUI front-end to integrate it all, but for assembler it's really not needed. You write your code up in a text file, much like in an IDE, then instead of asking the IDE to run the assembler for you, you just run it directly yourself. Check out NASM, a good free assembler.

Assembly Guy 72 Posting Whiz

So I think I'd just block every port.

If that's the case, why not just physically disconenct it from all networks?

Assembly Guy 72 Posting Whiz

That is the source code. [...]

No, no, it's a precompiled package, judging by the filename; it's got 'i686' in there somewhere.

Assembly Guy 72 Posting Whiz

.ProxyPass isn't working.Why is that?

It's not configured/installed right. That's the best answer anyone can give with the information you've given.

Assembly Guy 72 Posting Whiz

If following Gribouillis's doesn't solve the problem:

If you can get to any terminal of any sort (chrooting's awesome for moments like these) then run ls -l /bin/bash to see if that's a symlink and what it's pointing to.

Assembly Guy 72 Posting Whiz

Jean_3, did you read the post just above yours?

First off, please do not post new requests into old threads like this. This thread was originally posted more than half a decade ago; some of the details are now out of data (though fortunately the jist of it hasn't changed), and if nothing else it is problematic if you are adding new questions to solved threads. Please create new threads of your own in the future.

Assembly Guy 72 Posting Whiz

What compiler are you using, and how are you running it?

For what it's worth, I'll put my money on Turbo C; that typeless main whispers it.

Also works as expected here using GCC 4.8.2 20140206 (prerelease).

Assembly Guy 72 Posting Whiz

The Mages Guild is committed to rooting out Necromancy and all who practice it :-)

Assembly Guy 72 Posting Whiz

Yeah I'm going through this with my tishiba laptop. Yesterday I got frustrated & formatted C the drive. I'm thinking about installing Linux OS.

I'm sorry, I don't even... what?

Assembly Guy 72 Posting Whiz

hi , please convert this block code to intel syntax ( nasm)

Nah, I don't really feel like it.

Assembly Guy 72 Posting Whiz

See this link

All the best.

Assembly Guy 72 Posting Whiz

Also, remember that you cannot run 64-bit virtual machines on a 32-bit CPU

Not directly, no, but bear in mind I've been running TempleOS on my 32 bit machine using qemu-system-x86_64.

Assembly Guy 72 Posting Whiz

you're probably looking at CSS - possibly JS too if you need to control vertical heights.

As diafol highlighted, this isn't a PHP question. However, you've already posted here and gotten some answers so I'll continue.

Could you elaborate on your problem. Do you mean vertically centre items or display images down the page or what?

Assembly Guy 72 Posting Whiz

Do you know what their DNS server addresses are? If not, go to the admin web page of your router and look there

Correct me if I'm wrong but can't we just point him to Google's 8.8.8.8 and 8.8.4.4 for DNS? Makes life easier :P

Another question on top of rubberman's: what does the ip route command inside your VM return?

Assembly Guy 72 Posting Whiz

Because of rdesktop!

Sorry, what? Is it just me or is that not even a reason?

Assembly Guy 72 Posting Whiz

Hi talma, you're new around here. What you've just done is reply to a 4-year-old thread which was solved, with a completely new question of your own. This is known amongst the internet community as hijacking and/or necromancy, and it's frowned upon because it makes things a bit convoluted and disorganised. Please start your own topic in the Assmbly Forum to get help in solving your assembly question.

Assembly Guy 72 Posting Whiz

For starters, please try and remember that silicon and silicone are two ver, very, very different things. Silicon is what we use in semiconductors, silicone is not :)

1: Yes.
2: Yes, more or less.
3: Machine code is what is put onto the data lines by RAM/ROM. So as a whole, yes the CPU does understand machine code. Microcode is generated internally inside the CPU, so as I said, as a whole, the CPU does understand machine code, due to the fact that the machine code is translated into microcode by the CPU itself.

4: It'd likely boil down to a piece of hardawre known as a PLA. If you're not into electronics, I'll try and explain it simply. It's basically something you can program to do certain actions really fast in only hardware, without the use of any software (eg stored in ROM etc) in the end product.
PLAs can be programmed using flowcharts or various programming langauges.

5: More often than not, in a PLA.

I'm no renowned expert in this field, I don't design CPUs, so have a read through this Wikipedia article for more detailed info.

Assembly Guy 72 Posting Whiz

I have transparency in my buckyball avatar. I've noticed that on the community member badge, this seems to cause some issues. Is it Fred I see in the background through the transparency? I'm not using the badge anyway, but I just thought I'd let you know.

Assembly Guy 72 Posting Whiz

which will require your user password (not the root password)

That depends on /etc/sudoers. Sudo can be configured to require the root password rather than the user password. However you are correct in assuming the default is the user's password.

Assembly Guy 72 Posting Whiz

Awesome, glad to have participated in helping. If you feel the problem's fully resolved, please mark this thread as solved by clicking the little 'Mark Question Solved' button under the reply box :)

Assembly Guy 72 Posting Whiz

INSERT rather than INSER

Assembly Guy 72 Posting Whiz

I agree with using server-side redirection. When 301 and 302s are used, I see it as telling the user you know what page they want, but you're getting them to do the work and waste time mucking around to move to another URL, rather than just taking it within your stride and silently feeding them the appropriate content.

I see it as a waste of time. Yes, it's only a fraction of a second, but it adds up. Logging into and out of my Google Account takes a considerable amount of time while I wait for a handful of redirections to exeute.

I will, however, acknowledge that the preservation of post data across 301s is sometimes useful, but I can't come up with a situation off the top of my head where you couldn't simply copy $_POST across to $_SESSION and redirect.

I don't see Dani's as a situation requiring preservation of post data though (nothing personal, prove me wrong and so on). Since the data would've already been posted without being encrypted, you might as well get on with processing the login and returning a 301 redirect if appropriate.

Assembly Guy 72 Posting Whiz

You have to first declare it as an external function using something like extern function_name_here (the exact syntax will vary from assembler to assembler). Then, you need to instruct your linker to link against libcurl.dylib. What assembler/toolchain are you using?

Assembly Guy 72 Posting Whiz

Two main methods:

  • Plug into an existing utility (wget or curl for example)
  • Link against an existing library with the level of abstraction you need
Assembly Guy 72 Posting Whiz

We don't do your homework for you, and this sounds like a homework assignment. What code have you got so far? Where are you stuck?

Assembly Guy 72 Posting Whiz

I've got a function for doing that sitting on my PC, but to save me digging it up and to help you through the problem, could you show us the pseudo routine and/or assembly code for your integer to string conversion?

Smiley faces are either 0x1 or 0x2, 0x1 being a more 'hollow' face which allows the background colour through. It suggests something's certainly going wrong with your code :)

Assembly Guy 72 Posting Whiz

Mods, since no one has responded, can you take this post down?

Look on the bright side, someone might come up with a solution and it may solve someone else's problem many, many years into the future....

Assembly Guy 72 Posting Whiz

You can install DirectX with wine program.

That's correct, and I was fully aware of it, hence I said there's no direct support for it :)

Assembly Guy 72 Posting Whiz

Should I get ubuntu on my mac?

I've never been so unfortunate as to own a Mac, but I'm sure it's possible. Should you? If you want to, go for it.

Is it good for programming?

As good as any other distribution of linux.

Does DirectX support linux?

As Greg_z highlighted, Linux has no direct support for DirectX.

Whatever you do, remember that there are other distributions (read 'twists' or 'flavours') of linux, and if you do try Ubuntu, don't judge linux as a whole on your Ubuntu experience :)

Good luck, linux has its perks and flaws just like any other OS, so don't expect a million percent.

Assembly Guy 72 Posting Whiz

I'm afraid you're going to have to ask a few more specific questions. It's difficult for someone to help you if they don't know what exactly you need help with.

Assembly Guy 72 Posting Whiz

You sure can ask, but AFAIK you probably won't get a good answer unless you provide more detail and context.

Assembly Guy 72 Posting Whiz

Good for you :L What's your question?

Assembly Guy 72 Posting Whiz

It really depends on what granularity you're looking for. More precise timing becomes more and more difficult, as you mentioned, for various reasons.

Anyone going to be cheeky and submit a snippet which uses the PIT? Wait, no it wouldn't be portable - it'd be doomed for use on DOS systems and the like ;)

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

Finally, call std::random_shuffle() to mix them all up.

Ahh trust you to resort to C++ ;)

Assembly Guy 72 Posting Whiz

Additional to what Ancient Dragon has mentioned, you can flick through the source code for a pseudo-random password generator that I wrote a while ago. While it doesn't generate passwords with at least 2 numbers, 2 upper/2 lower case latters and 1 symbol, it may be a useful starting point.

Assembly Guy 72 Posting Whiz

There's a flaw in your second loop. You're printing the right amount of spaces, but you're only printing one *, hence you don't end up with this:

>      *
>     **
>    ***
>   ****
>  *****

To achieve the above, you need to introduce a counter much like you did in your first loop so that after you've printed the spaces, you print 1 * for the first line of the above pattern, 2 for the next and so on.

It's a bit difficult for me to put into words clearly, but I hope it's helped somewhat.

Assembly Guy 72 Posting Whiz

Well then cut_str() hasn't been defined, and you therefore cannot use it. Look at Cereal's first reply to this thread, he's covered the method you need.

Assembly Guy 72 Posting Whiz

Are you using a PHP framework like CodeIgniter or anything similar?

Assembly Guy 72 Posting Whiz

Please post all of the code in the PHP file :)