Jump to content
xisto Community

Ahsaniqbalkmc

Members
  • Content Count

    800
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Ahsaniqbalkmc

  1. To add to that.... Game creators will also have to think about the linux user-base before putting their efforts into developing linux versions of the games. If they don't think that they would be able to sell enough copies of the linux version (i.e there aren't enough linux gamers) to make profits, they simply won't try it. So in addition to other important factors, the user-base who wants to play games on linux is also important.
  2. I think I was unable to make you understand my problem @yordan. What you have said is absolutely right and and I understand it completely. Let me elaborate my problem a little more.. Suppose the name of the file is digitCalc.c When I run the above program in Linux, I first compile is using the command "gcc -o digitCalc digitCalc.c" and then run it using the command "./digitCalc". I get the following output in the exact order as shown below.... Program: Calculate how many digits in a numberEnter a number with maximum 4 digits:Then I enter the value 23 and press enter.... The total program output (including the above two lines) now become this: Program: Calculate how many digits in a numberEnter a number with maximum 4 digits: 23Digits in number: 2This is exactly how I want the program to behave but when I run the same program in Eclipse, the presentation is changed. Instead of first getting the output of first two printf statements, I get a blank screen in the console. There is nothing there. But when I enter the value 23 in that blank console space and press enter, I get the following output... 23Program: Calculate how many digits in a numberEnter a number with maximum 4 digits: Digits in number: 2 So... I want eclipse to present the program, in its console, in the same way as it is presented by in the linux terminal. There is nothing wrong with the program (because it runs absolutely correctly in the linux terminal). So, in short, my question is how do I make Eclipse present the program in its console in the same manner in which it is presented in the linux terminal....
  3. I ran the program with eclipse c/c++ IDE but unfortunately I had some issues... Please see the topic : http://forums.xisto.com/topic/55347-c-development-with-eclipse-ide-problem-with-scanf/ '>C Development with eclipse -- problem with scanf. and please guide me if you can.....
  4. For past few days, I have been trying to get a bit deeper into C development. Until now, I have been using Linux virtual machine to create and compile C programs. The process was simple and straight forward but one thing I hated was it had repetitions. Every time you write a new program you would have to manually go to the terminal and write commands to compile and run the program... If the program had some error, the repetitions could be as many as 20... So I tried to look for something quicker and more helpful. There is a lot of hype of about eclipse so it was obviously my first choice. I gave it a try and I have to admit that setting it up (which should have been quite simple) wasn't that simple because i didn't have the JDK preinstalled on my system. After installation I had to separately install the C compiler (I used MinGW). Though the process was simple but it would have been much better if the IDE came ready with a compiler... After setting everything up, I created a simple program to test how it worked. Everything was fine until I tested a program mentioned in this topic: http://forums.xisto.com/topic/52733-c-strange-behavior-with-numbers/ '>C -- Strange behavior with numbers. The program looks like: #include <stdio.h>int main(void) {printf("Program: Calculate how many digits in a number\n");int number;printf("Enter a number with maximum 4 digits: ");scanf("%d", &number);int digits;int error = 0;if (number >= 0 && number <=9) {digits = 1;}else if (number >= 10 && number <= 99) {digits = 2;}else if (number >= 100 && number <= 999) {digits = 3;}else if (number >= 1000 && number <= 9999) {digits = 4;}else {error = 1;}if (error == 0) {printf("Digits in number: %d\n", digits);} else {printf("Number has more than 4 digits....\n");}return 0;} The problem is that the program doesn't print anything until I enter a value. After I enter the value the programs runs correctly and displays the correct result. The following is the output of the program: 02Program: Calculate how many digits in a numberEnter a number with maximum 4 digits: Digits in number: 1 When I run the program, there is a blank screen. I enter the value 02 and press enter and then the remaining two lines appear. The result is correct but the presentation is not.. I am assuming that some settings need to be changed to present the program correctly... Any help ???
  5. Seems pretty awesome.... But as I have mentioned in one of my other topics, if there is one single thing that I am dying to have on a linux machine is support for new games...... I hope some day developers would take this into serious consideration and we can have a serious competitor to windows that can be used by everyone.
  6. Wow!... Its quite funny how some simple things can become hard to understand some times. And I have to say that "running on paper" does actually work... at least for simple programs... By the way.... thanks for the corrected version of the program. by running the program and looking deep into it, I found why I wasn't able to correct the program following your guideline. Actually there was a syntax error in the program as shown below... else if (number >= 1000 & number <= 9999) {if (error = 0) { As you can see, there is only one ampersand sine in the top line... This line was in the same form in my original program and I guess it was the culprit... The second line wasn't present in my program. It is your modification that corrects the programs' output (if the syntax error is corrected in it).. So thanks and finally the program now works correctly.... And I have to say that it concludes that 2 and 02 are the same in C no matter if they are used directly or with pointers.... Lol... as I mentioned above... its quite funny actually...
  7. And for people like me who don't have a forcing sword behind their necks, being attractive and entertaining is the most important factor in sticking to work with a new computer language....
  8. Well, if this is the case, then I have to completely agree with @yordan...
  9. When I first tried to make a shift from windows to linux, I tried Ubuntu.... as it had so much praise everywhere on the internet. But unfortunately, I didn't find my way through it so I searched for other distros and linux mint was the one that catched my eye... so I chose it... Though, sadly, I have never been able to say goodbye to windows 7 as my primary OS due to Gaming and my Laziness........... oh... As I have mentioned previously, I tried to run Mint 14 on vmware but it was too laggy to be used... Can you share your hardware specs and vmware settings with me so that I cen get an idea of the requirements to run it smoothly... Thanks again @agyat for helping me out.... I guess I will have to overlook this wallpaper issue for now if I am to continue using lubuntu..... I gave a tried to xubuntu but unfortunately I didn't like the look and feel of it.... Thought it can be changed but I don't think I would stick to it.....
  10. So what you are trying to say is that 02 and 2 are the same for C but it is the manner of input which has the problem. Well, I certainly agree with the first part because after I made the first post, I created a simple program to check whether 2 and 02 are equal or not (when stored in variables as well as directly) and the answer was yes. But because of my very limited knowledge, I can't say anything about the second part. I guess I will have to give more more time studying the language and probably at some time I would be able to understand why they behave differently when entered in this way... Or if the concept is simple, you can throw some light on it @yordan and help me understand it...... (Sorry for responding so late.... I was tremendously caught in my real life) oh!.... I can confirm that the program gives wrong answer when the value entered is 200..... Thought I really don't understand what "run this code on paper" means.... (please throw some light on this @agyat).... First... thanks @agyat for pointing towards the error... But correcting it as per your instruction has created another dilemma.... The program still doesn't display the correct answer... Its a complete mess.....can you please modify the program so that it uses the same approach as I have used but displays accurate results..
  11. Normally I like to post separate responsed to each quoted post, but here I think one will serve both. So though the processors on mobile devices are not nearly as powerful as processors on laptops and desktops, with the current pace of increasing processor power, my opinion is that some people would at least think about not buying a laptop (or a desktop) a few years from now. I mean even with the technology of today, it is completely possible for the high-end android devices to completely replace a laptop for certain people. You can easily connect a bigger display with most smartphones. Plus there are sufficiently able applications for these smartphones for normal activities like internet surfing and text editing. Furthermore, the connectivity options like USB OTG (On The GO) connectivity take the experience one step further towards completeness. So if you have a smartphone like Samsung Galaxy Note II, all you need to do is connect a bluetooth mouse and keyboard, connect a bigger display through hdmi and that's it.... You are ready to do most of the basic tasks that you do on your computer.. But 3 or 4 years from now when presumably the hardware will be much more powerful and the software will be much more stable and vast, an average user can practically think of saying good bye to his laptop......
  12. Yeah, this actually is interesting. And if the process of making sure does consist of checking the output of "net share" in the linux terminal (as mentioned by @yordan), then I am pretty sure that samba is not configured on the linux guest machine. Thanks for the link @yordan. I checked it and it was fairly straight forward. However, I don't know if I am unable to express my problem correctly or the problem is a bit too lame to be understood properly but I am still unable to access the shared folder from my guest machine. I need to know how to access this shared folder from my lubuntu guest machine.
  13. Wow...So mobile is going to actually surpass the normal consumer desktop..... Great...
  14. While following my path to learn C, I have created another simple program (from the scenario given in programming project section of the exercise). What this program does is it takes a number (upto 4 digits) from the user and tells him how many digits the number has. The program looks like this: #include <stdio.h>int main(void) {printf("Program: Calculate how many digits in a number\n");int number;printf("Enter a number with maximum 4 digits: ");scanf("%d", &number);int digits;int error = 0;if (number >= 0 && number <=9) {digits = 1;}else if (number >= 10 && number <= 99) {digits = 2;}else if (number >= 100 && number <= 999) {digits = 3;}else if (number >= 1000 & number <= 9999) {digits = 4;}else {error = 1;}if (error != 0) {printf("Digits in number: %d\n", digits);} else {printf("Number has more than 4 digits....\n");}return 0;}For most of the digits the program behaves as it is expected to behave. However strange results come when a number is preceded by 0. For example if a user enters 02 as the number, instead of telling that the program has 2 digits (or 1 digit which is more expected result), it tells that the number has more than 4 digits. ahsan@ahsan-virtual-machine:~/Documents/chapter5$ ./q1Program: Calculate how many digits in a numberEnter a number with maximum 4 digits: 02Number has more than 4 digits.... Doing some analysis, the main questions becomes that:Isn't 02 greater than 0 in C's preferences? If yes, then why is the program behaving strangely and if not then why is it not made greater than 0 while in the real world it is ??
  15. I guess if you are not bound to learn something (for example you are not a student who has to learn a subject to pass and get his degree), and you are just learning something for fun, that FUN is the most important thing you would seek. For instance I am not bound to learn C. I am doing it just to fulfill my appetite for computers and programming, so the most important thing to keep me investing my time in it would be fun. And fun would be the thing I would seek from the beginning. So in this scenario, the approach with practical work from the beginning would be best as you would start having fun from the beginning.
  16. So in other words, you are trying to say that mint values stability more than new features and in contrast ubuntu goes for new features quickly...Or I should say mint is SonyEricsson and ubuntu is Samsung.... Lol
  17. I am afraid I will have to differ here. If client is what I think it is (a computer through which any random visitor visits a website), I don't think it would have any effect on SEO of your website. It just isn't logical. I mean if my website is hosted on a good server, plus my website's code is clean enough so that ultimately the page loading speed is good, my website should have a good score for this specific SEO signal. And this should be irrespective of the fact that some users (because of their slow internet connections) aren't able to benefit from the fast page loading speed. This is absolutely related to the user (client) and has nothing to do with my website. Any average user with an average internet connection speed should benefit from the fast server + clean code of my website. So in simple terms, this is not a website's fault. In fact, loading time would be increased for every website for visitors with slow internet connections. So in my opinion slow client internet connection doesn't (or SHOULDN'T) affect a website's reputation in terms of SEO. If the above explanation is right than dial-testing on client isn't going to help at all. And from what I know, testing and research related to SEO is a very long time process and not everybody has the time and resources to do it. And this is one of the main reasons why there is so much ambiguity in the field.
  18. But I am not using mint on my vmware currently. It is Lubuntu. And if what you say is right, and if samba is the only way to access the host OS shared files (like if they were connected through cross-over cable), then why am I successfully able to access host shared folders. I simply don't get it. So I tried the "net share" in my Lubuntu terminal and it said "The program 'net' is currently not installed. You can install it by typing: sudo apt-get install samba-common-bin" So I assume that samba is not installed in my Lubunt VM, but I am still able to access host shared folders... Can you provide an explanation..?? And guys... I am still waiting for the answer to the following question...
  19. Yes, it was cinnamon. Mint 14.1 cinnamon.So if mint does come in Xfce / KDE, what exactly would be the difference between this Mint and Ubuntu KDE (Kubuntu) and Ubuntue Xfce (Xubuntu) ?
  20. Well, to my surprise, I didn't have samba setup and still I could access the host machine's shared folders like I am connected with a cross-over cable. I hope somebody explains this to me... And I am also looking for the answer to: How to access the shared folder created by the following method:
  21. Well, I didn't knew that things whose name start with & are pointers. The book I am using stated something like: It is not the right time to explain why & sign is used before the name of the variable but it will be explained latter. Something like this (If I remember it correctly).So what more you have to say about pointers..
  22. I understand the error was false and that the compiler couldn't locate where exactly the error was so the place it mentioned might also be false. The thing I want to know is what place did it mention. To put my question in another way: Can you explain the following lines of code in simple english that a newbie like me can understand. q2.c: In function ‘main’:q2.c:5:10: error: expected ‘;’ before string constantq2.c:5:74: error: expected statement before ‘)’ tokenI am not interested in whether the compiler was able to correctly find the error and correctly mention it. I am just interested in knowing what does it say in the above few lines. If someone can translate the above code into simple english that I can understand, I am assuming that it would prove to be extremely helpful for me. About the manuals: I really hate reading them. Instead I prefer searching online for the exact thing I need to know. But in this case, I think this you can provide me with exactly what I need as our discussion has progressed from the very beginning and you may have some idea of my level of understanding the code... My opinion is a bit different. I think that the concept behind a code and the code itself are tightly inter-related to each other. Elaborating my previous statement, if you have written the code but you don't know the concept behind it, OR, if you know the concepts but you have never written code, you are not in good position to move forward. But at the same time, there are certain concepts that involve many things at a time, some of which are beyond the understanding of a beginner. It is so because the concept itself involves certain other concepts that need to be understood first. For example a C program starts with: # include <stdio.h> As a beginner I just know that this statement is actually a directive that directs the preprocessor to include the standard input/output library into the program. Now there are many things about this statement that I do not understand yet.. For instance what is a library?, what is a standard input/output library?, Why is it necessary for C programs to include this library into the program (while in PHP there was nothing like this)? Why is there .h extension at the end? So I have two options now. I can either go forward and try to answer all my questions that I have about my statement and not proceed further until I have answered them all. Secondly, I can just leave these questions for a later time when I have enough basic knowledge of the language and proceed with learning the basic stuff. I think the second approach is much better because in that way I would proceed in a more systemic manner and gain concepts at their optimal time. You cannot just go on looking to gain all the concepts while not having written a single line of code. This won't help you much. Instead if you start with simple programs (even if you copy them from somewhere) and then see what each line does in the program by making changes to it, deleting it, or adding other lines, you would be heading a much simpler path.. I agree completely. But as I mentioned above, you cannot just go and grab all the concepts before doing any practical work. This would be just a waste of time. Instead you should start with simple concepts and simple practical work (even if you don't understand all that is in the little practical work you have done). At least you would get full understanding of some of it..;...
  23. To add to the above statement, SEO consists of techniques the ultimate goal of which is to raise the position of a website in Search Engine Result Pages. And it isn't exclusive for google In fact it is for all the search engines. For web developers and publishers, SEO means how to get their websites to the top of results for specific searches and for search engines, it means a way of ordering the websites in their database based on certain signals that dictate the quality of a website -- so that higher quality websites are near the top and vice versa... But the overall thing is not as simple as the above description. There are so many signals and factors that search engines take into account that for developers and publishers it is almost impossible to get all of them right. To make matters worse, most of them are kept secret and never disclosed to the public. Search engines say that they don't disclose all of the signals because they fear that people may abuse them to get higher rankings. This might be a reason but in addition, the competition between different search engines also makes it necessary for them to keep their useful information secret.. My personal opinion of the SEO is that it is a bit too much blurry. An low-sized developer like me doesn't know the straight path to success. And thus it is more of a hit and miss kind of thing. I may not totally agree here. Though it does have lot of nonsense variables, but it is not particularly useless if you are not concerned by google business. As I mentioned above, it is not exclusive to google. All search engines come under its radar, though the general scenario is that some search engines put more weight on certain factors. And if you are in someway related to a website the success of which depends on how much visitors you get (almost all websites fall into this category), you need to do well in search engines, because like it or not, most of the useful traffic to most websites come from search engines. Absolutely right. But according to my knowledge, page loading speed has now become a direct factor in SEO for google. In the past it was more related to user experience and not so much to how search engines rate you website but recently it has become an important factor for search engines as well.. And I would say again that I am not an expert in the field so I may be wrong.....
  24. It seems that nowaday I have become so *** that I can't get even simple things to work. After I followed the steps mentioned by @yordan, and assuming that a shared folder is successfully created, I don't know how to access it.During the process of figuring out how to access it, I found that I could access my windows pc in that same way as I would access it through another computer after connecting it with a cross-link ethernet cable. So I simply share a folder on host os through its properties within the host os and it would be available for access in the guest OS. I am assuming that the NAT interface of Vmware is in action here.But I would still like to know how to access the folder created by method mentioned by @yordan..../
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.