I'm working on making an ASCII based game, and everywhere I look people are saying to use Console.Write() from MSDN, which is dandy and all if you're using Windows, but I'm not.
And thus, I'm trying to write a function, or group of functions in C that can alternate between two screen buffers, and write them to the screen, similar to wha...
How to insert repeated message in google protocol buffer _pb2.py file
...
hello,
i am reading in a binary file via the usual c++/STL/iostream syntax.
i am copying the whole content into an dynamically allocated char array and this works fine so far.
but since i want to serve parts of the content as lines to another part of the program,
i think it would be better/easier to stick to streams because i don't wan...
Hello everyone!
Background story:
There are these Source and Result interfaces for XML.
These are adapters between different XML technologies in Java.
Instances of these classes represent DOM, SAX, JAXB, XML streams, XML events
(and even more?).
The question:
So, is there something comparable for plain old strings? Some generalizatio...
I am able to successfully call a function with ctypes in Python. I now have a buffer that is filled with Structures of data I want to extract. What is the best strategy for this? Anything else I should post?
Function:
class list():
def __init__(self):
#[...]
def getdirentries(self, path):
self.load_c()
...
I was wondering whether anyone has already implemented a circular buffer in JavaScript? How would you do that without having pointers?
...
Is this possible?
I want to place intel assembly code into a char buffer, and then execute that code from within a C program
If I placed the assembly code into a buffer, could I cast it into a function pointer and call that?
I am using GCC and linux
...
Hi
I've implemented file uploading using WCF's streaming. Everything works as expected, however i faced one issue: i'm allocating 4kb buffer to read from incoming stream, but WCF reads only 255 bytes. Here is my upload function:
public UploadResponse UploadFile(FileDto fileDto)
{
using (var inStream = fileDto.FileStream)
...
I am trying to create a data buffer, more specifically, an image buffer, which will be shared among multiple modules. Those modules only reads from the buffer and don't communicate with each other at all. My difficulty is:
1.Large data size:
larger than 10M per image, that means copying those data around for different threads is not...
So.. I have a buffer with MP3 data (If I would save this buffer and call it buffer.mp3 it would play, but in this situation I should not save it to file system). I have to play it, but I can not, what shall I do?
I tried the next code to play that buffrer(ByteArray\Stream) (I get MP3 data from server the method of getting data works ...
I'm building a zipper application, but it has a declaration that I want to separate it in another file (compress-file.m), but only when I separate the files I got an error when compiling with a variable, see it:
[ubuntu@eeepc:~/Desktop] make
This is gnustep-make 2.0.2. Type 'make print-gnustep-make-help' for help.
Making all for app Lea...
I have a library that does I/O. There are a couple of external knobs for tuning the sizes of the memory buffers used internally. When I ran some tests I found that the sizes of the buffers can affect performance significantly.
But the optimum size seems to depend on a bunch of things - the available memory on the PC, the the size of t...
I need to store items of varying length in a circular queue in a flash chip. Each item will have its encapsulation so I can figure out how big it is and where the next item begins. When there are enough items in the buffer, it will wrap to the beginning.
What is a good way to store a circular queue in a flash chip?
There is a possibi...
I know this is a long shot, but I was wondering if Python had a way to manipulate the screen buffer. Specifically, I want to be able to gray-out my desktop and highlight my windows when I press a key combination. Is this in the realm of possibility?
...
I'm using this code to read a file into a buffer. The file is full of structs of evaluacion type (including some char and int variables).
Now I have the whole file in a buffer, how can I find the values of one variable in the buffer now?
For example buf.notamedia < 4. There are supposed to be many of them inside the file.
#include <unis...
I checked this question, but it's not what I'm looking for.
I'm trying to figure out how to cap a log file's size (say, 10MB), and as soon as it's hit, either:
start writing to the beginning, rather than appending, or
keep appending, but delete the contents from the beginning as I do so
Don't really care about language - as long as...
I'm new to Python (I have been programming in Java for multiple years now though), and I am working on a simple socket-based networking application (just for fun). The idea is that my code connects to a remote TCP end-point and then listens for any data being pushed from the server to the client, and perform some parsing on this.
The da...
Is there a historical reason or something ? I've seen quite a few times something like char foo[256]; or #define BUF_SIZE 1024. Even I do mostly only use 2^n sized buffers, mostly because I think it looks more elegant and that way I don't have to think of a specific number. But I'm not quite sure if that's the reason most people use them...
hello,
So i have a setup where two imacs, imac_1 and imac_2, are connected through firewire. imac_1 sends some debugging information to imac_2 and on imac_2 i have a program in c++ that captures debugging information.(see illustration below)
Now the problem is that if i write the debugging info to the GUI (created using QT) directly i...
Hello, I am writing a software that grabs a password using std::cin
However unlikely, i am trying to avoid the possibility that the password get paged to the disk from memory so I want to modify the buffer of std::cin to overwrite the password as soon as I'm done with it.
right now i have this:
std::cin.clear();
std::stringstream ss;...