im trying to make my own Serialization library but I have some problems with the following. I have a package wich I serialize to a t_stream and then I need to serialize the t_stream to a char * again. This is the complete code: typedef struct{ int16_t port; int16_t priority; char * ip; char * code; }__attribute__((__packed__)) t_file_package; typedef struct { int8_t packageType; int32_t length; char *data; }__attribute__((__packed__)) t_stream; // t_stream * package_file_serializer(t_file_package *self) { char *data = malloc( strlen(self->ip) + 1 + sizeof(int16_t) + sizeof(int16_t) + strlen(self->code) + 1); t_stream *stream = malloc(sizeof(t_stream)); int32_t offset = 0 , tmp_size …

Member Avatar
Member Avatar
+0 forum 1

Hi i have a lot of ANSI encoded files in the same folder with different extensions and i want to convert all this files into utf-8 encoded files so how can i do this in c# [I][B]Thank you [/B][/I]

Member Avatar
Member Avatar
+0 forum 1

Hello, I am creating a card game and need some advice/pointers or code snipets if possible on sprite movement in the sence I need to create an action of a card been drawn from the deck. Basicly I need to make the sprite(card) move from the deck posion(x,y) to the players hand position(x,y) or from hand/deck to the waste pile, the game will consist of 4 players so the cards will be going in all directions and I can not fiqure out a formula that will make the cards move quick and smothly to their correct possitions and I cant …

Member Avatar
Member Avatar
+0 forum 5

Hi, help please! I have a struct containing an array of pointers to structs containing Binary Search Trees with nodes containing structs. ... <*sigh*> I hate C soo much... put work wants it to be in C. I can set the struct of BST's just fine, and keep it around, and I can set the innermost struct values. My problem is keeping those innermost values once I'm outside the function that puts them there. [CODE] void function(Struct struct, int i, int k) { Array array; array = InitArray(); array->key = k; struct->array[i] = &array; } void otherFunction(Struct struct, int i, …

Member Avatar
Member Avatar
+0 forum 1

Dear All, I have a text file containing these lines: [QUOTE]12345 12 123 1234 123456 1234567890 123456789032453 1234567890724832445 12345.123456 12345.123 12.12 12[/QUOTE] And I want to read them from c:\numbers.txt and store them into an array and then do some calculations, then save the results in another file(c:\results.txt). I have wrote the following program for [B]just reading lines of a file and store into an array[/B]: [CODE]#include <stdio.h> #include <stdlib.h> /* required for atoi */ int main(void) { int i=0; double numbers[]={0}; char line[20]; /* declare a char array */ FILE *file; /* declare a FILE pointer */ file = …

Member Avatar
Member Avatar
+1 forum 11

Printing a convenient [url=http://en.wikipedia.org/wiki/ANSI_escape_sequence]ansi escape sequence[/url] clears the terminal (if you're running python from a terminal). Similar techniques could be used to print in colors.

Member Avatar
Member Avatar
+0 forum 3

Maybe it’s all part of a kinder, gentler Microsoft; or maybe it’s something else. In the latest example of Redmond’s increase in openness, the “Evil Empire” in an [URL=http://www.microsoft.com/presspass/press/2007/may07/05-16ANSIVotePR.mspx] announcement[/URL] last week said it backs the addition of the Open Document Format to the American National Standards Institute (ANSI) standards list and will add native compatibility for ODF and Adobe’s Portable Document Format (PDF). The changes will come in a service pack for the Office suite sometime in the first half of 2009. Microsoft also has joined the Organization for the Advancement of Structured Information Standards (OASIS)—the group maintaining ODF—and …

Member Avatar
+0 forum 0

Microsoft has been pushed (Massachusetts state government) to make a document format that would be completley compliant with other word processors such as OpenOffice. This will be their Open document format. Now you might be saying well I can open my word documents in openoffice already or I can just use a rich text format why do I need this open document? Well this is because word documents save information that you dont see in the document and then other people can view it if you send it to them this is especially useful when looking over agreements, contracts, or …

Member Avatar
Member Avatar
+0 forum 2

There’s no denying that Microsoft has both audacity and folly in equal measure, and never was this more clearly exemplified than in the news that it is launching an ‘industry leading compression quality’ image format. Revealed in some detail at the Windows Hardware Engineering Conference ([URL="http://www.microsoft.com/whdc/winhec/"]WinHEC[/URL]) 2006 in Seattle, a picture containing more detail than a JPEG at 24:1 compression was proudly on show under the headline of ‘better picture, smaller file’. The Windows Media Photo format, as it’s being called, features multiple color formats for display and print, fixed or floating point high dynamic range image encoding, and extremely …

Member Avatar
Member Avatar
+0 forum 5

The End.