LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

More simple C and color mixing tests

Posted 06-11-2013 at 12:30 AM by rainbowsally

Today's Feature
  • Here's another pixel (color) mixing toy. The best yet.

Back a couple of blog pages
http://www.linuxquestions.org/questi...lamping-35557/
we were playing with color mixing and data clamping and all kinds of junk including comparing routines to mix colors by a floating point ratio.

This is mixcolors.c - named the same as the other version we were playing with and...
Member
Posted in Uncategorized
Views 407 Comments 0 rainbowsally is offline
Old

Simple C - mix pixel data, integer math (fixed point), data clamping...

Posted 06-06-2013 at 06:15 PM by rainbowsally

Simple C to mix pixel data, integer math (fixed point), data clamping

Today's Features
  • Simple program to add two pixels clamping each byte to 0xFF, but adding all four bytes in parallel for speed. There are no branches in the algorithm.
  • Another simple program to mix two colors defining a gradient using a fraction from 0 to 1. We compare floating point to fixed point math versions.


Surprisingly, the long version compiles about the same code as the short one with...
Member
Posted in Uncategorized
Views 474 Comments 0 rainbowsally is offline
Old

qt4 - sudoku solver and closable toolbar examples

Posted 05-25-2013 at 10:54 AM by rainbowsally
Updated 08-06-2014 at 07:28 AM by rainbowsally
Tags mc2, qt4, simple c

Qt4 examples.

SudokuResolver (qt4, only 180K)

screenshot http://rainbowsally.org/pub/sudoku.png

I got this at http://setup.weeb.ch, I believe. I reworked the make system using mc2 and made a few very minor changes, such as centering the window on showEvent() and addding save/restore to/from files.

There are several interesting features in the code from grid setup to BigList STL templates
and multi core processing code.
...
Member
Posted in Uncategorized
Views 434 Comments 0 rainbowsally is offline
Old

Sockets -- A Chat Server with a non-blocking 'select' (i.e., GUI ready)

Posted 01-27-2013 at 06:47 AM by rainbowsally
Updated 08-06-2014 at 07:29 AM by rainbowsally (fix bad edit)

Sockets -- A Chat Server with a non-blocking 'select' (i.e., GUI ready)

[GUI-ready but no GUI in this version. Terminal only.]

Today's feature is
  • A chat server.
  • Non blocking 'select' (which we need for importing into an lqMiniTerm).
  • A web link to more generic sockets code that I wish I had found earlier.
  • Tarred up example code with makefile for all the code examples at bgnet.

Here's a chat-server you can use to communicate between folks on your computer...
Member
Posted in Uncategorized
Views 676 Comments 0 rainbowsally is offline
Old

Sockets - The lqNetDog mini-lib for socket connections

Posted 01-22-2013 at 06:40 AM by rainbowsally
Updated 01-22-2013 at 10:52 AM by rainbowsally (moved some includes)

[Bad logic level in netdog_request() presumably fixed. -rs]

Sockets - The NetDog mini-lib for socket connections

Today's feature is:
  • NetDog. :-)
  • A simple non-blocking ans (listen) and orig (connect) example.
  • Minor bundling of socket functions to greatly simplify a successful connection.

Complicating this stuff is easy. Simplifying it is the hard part.

The non-blocking setup here simplifies coding for a gui which needs to constantly be...
Member
Posted in Uncategorized
Views 558 Comments 0 rainbowsally is offline

  



All times are GMT -5. The time now is 05:07 AM.

Main Menu
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