LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices



Old

My first (real) experimentation with SDL

Posted 04-20-2011 at 11:55 AM by MrCode
Updated 04-20-2011 at 03:00 PM by MrCode (stdlib.h include was unnecessary)

It's been a while since I've done any serious programming (if little demo/learning programs can be considered serious ), but I finally got around to doing some little SDL apps.

The code here is basically for learning purposes; it's not like I'm keeping hold of it with an iron grip…IOW, go ahead and use parts of it (or the whole of it) to learn from/use in your own programs/whatever. It's not like there's much here anyway.

The one whose source I'll...
Member
Views 2502 Comments 1 MrCode is offline
Old

no

Posted 03-14-2011 at 11:52 PM by MrCode
Updated 04-02-2011 at 04:28 PM by MrCode (Major program revision)

Code:
#include <stdio.h>
#include <string.h>
#include <malloc.h>

int main(int argc,char** argv)
{
    char* str = malloc(1);
	
    if(argc >= 2)
    {
        int i;
        for(i = 1; i < argc; i++)
        {
            strcat(str," ");
            strcat(str,argv[i]);
        }
        
        int len = strlen(str);
...
Member
Views 754 Comments 0 MrCode is offline
Old

My first "FOSS hack"

Posted 02-04-2011 at 04:16 AM by MrCode
Updated 02-04-2011 at 04:17 AM by MrCode

I was mildly annoyed at the fact that LTris only lets you choose between 50, 100, 200, and no limit (as many frames as the system can render at a time) as FPS options, so I took the liberty of changing:

Code:
switch ( config.fps ) {
    case 1: fps_delay = 20; break;
    case 2: fps_delay = 10; break;
    case 3: fps_delay = 5; break;
}
to:

Code:
switch ( config.fps ) {
    case 1: fps_delay = 17; break;
...
Member
Views 709 Comments 0 MrCode is offline
Old

My next impression by Linux

Posted 06-23-2010 at 07:10 PM by Web31337 (In The Middle Of Nowhere [edK's blog])
Updated 06-23-2010 at 07:12 PM by Web31337

Few days ago I've been into some C coding and again got impressed by how greatly linux is organised! Dependencies are written the clear way. The "./configure" script is a standard. The "Makefile" is a standard. and so on... they aren't strictly linux-related but I mostly work in Linux environment... I actually refer to UNIX standards I guess. It is so simple to create and redistribute own application using standard utils, making it easily-installable! I love this!
Anyway,...
Member
Views 840 Comments 0 Web31337 is offline
Old

PHP - misleading thoughts

Posted 03-07-2010 at 11:29 AM by Web31337 (In The Middle Of Nowhere [edK's blog])

I've recently used to hear from many guys that PHP is bad and useless language. Well, generally the source of that point of thinking is a bad code written by newbies(or mature noobs).
Yes, I admit PHP has some basic functions missing, some features need to be improved, etc. It's far from ideal language. But it is very easy to learn. The problem here is many beginners starting from PHP without reading documentation properly, without looking for security in their apps, and, as a result we have...
Member
Posted in opensource, etc, security
Views 957 Comments 0 Web31337 is offline

  



All times are GMT -5. The time now is 12:07 PM.

Main Menu
Advertisement

Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration