Programming :: Paint Pixels In C / C++ Without Going In To Object Oriented Prog?

Aug 24, 2009

I want to findout how to paint a line in C without using a line function or OOP. I want to control it by pixels.

View 6 Replies


ADVERTISEMENT

Programming :: Groovy Scripting - An Object-oriented Programming Language For The Java Platform ?

Mar 7, 2010

Groovy is an object-oriented programming language for the Java platform. I do not have experience in Java, only perl and shell scripts. Recently I have been asked to maintain a software written in groovy (also to make enhancements). So can I learn groovy without knowing java language. or isit I have to learn java before venturing into groovy.

View 1 Replies View Related

Programming :: Java - Object Oriented - How It Works - Set The Getter And Setter ?

Feb 28, 2011

I have a peace of code the does not work:

View 1 Replies View Related

Programming :: Global Or Server Variables - Array Connection Oriented

May 20, 2011

I have a general question regarding php. Suppose that I want to have an array that stores connection-specific data, that can be anything IP address or something similar. However, whenever I use global or server variables (i.e. GLOBALS or _SERVER) the array created in this way is kind of connection-oriented, so that for each connection there is a separate instance of this array. Maybe it has something to do with the MPM of Apache, but I am not sure. Is it possible to implement an array that stores information about all connections that are at a system? In this way, each connection can chip in and upload it with data? Also, I would rather not use cookie's.

View 3 Replies View Related

Red Hat / Fedora :: Diff Between Service Prog Start & /etc/init.d/prog Start

Apr 3, 2009

The difference between: service httpd start & /etc/init.d/httpd start.

View 3 Replies View Related

Programming :: Object To Represent An Object Of Different Types?

Mar 1, 2010

Only ones I can think of seem overly complex, and I'm sure there is a simple solution I am overlooking. I have a class, it has a member who is an object. This object needs to be able to represent an object of different types.

[code]...

Where "surface" could be several different types, which will be set during execution. Hope this is clear enough. I have tried using templates but am getting "data member cannot be a member template". Either I have incorrect syntax, or am not implementing it right. another solution would have one class containing definitions of all possible shapes, But this would take up extra memory. Other solutions I thought of seem too round-about, and seems there is a simpler solution that I have overlooked.

View 8 Replies View Related

Programming :: Get String Width In Pixels In Xlib?

Aug 3, 2009

I'm trying to get the width of a string in pixels this way:

Display *disp;
int len;
disp = XOpenDisplay(0);
font = XLoadQueryFont(disp, desc );

[code]....

I'm getting negative numbers as the the pixel length, eg -7275

View 3 Replies View Related

Programming :: Plot Individual Pixels In A Window?

Apr 6, 2010

It's been a while since I did any kind of graphics programming, but I would like to start learning how to do graphics stuff in *nix. I started reading the GTK+ 2.0 Tutorial, but a) I've only been able to write a small "Hello World" program, and that tested my patience, and b) I'm not seeing anything which allows you to plot a pixel directly. Back before I migrated to Linux, I used the Windows GDI SetPixel() function for plotting pixels sequentially (this was for a small fractal generator). Mostly what I'm asking is if there's any kind of equivalent function in *nix graphics APIs? GTK+? Would I have to deal with SDL/OpenGL?

View 3 Replies View Related

Programming :: Selecting VGA Planes Causes Existing Pixels To Change Colors?

Oct 28, 2009

using the code

Code:

void setplane(unsigned char mask){
inportb(0x3DA); //Reset the VGA flip/flop
unsigned char c=inportb(0x3C0); /*the VGA does not like you not saving values*/

[code]....

does not work, for example if setplane(1); will change all pixels plotted to blue - not just the newest. and here is how i plot pixels:

Code:

void ppixel(unsigned x, unsigned y, unsigned char color){
setplane(color);
((char far *)0xA0000000L)[(y*(640/8))+(x/8)]=((1<<7)>>(x%8));
}

View 2 Replies View Related

Programming :: Call Socket Prog Code Written In User Space From Kernel Space?

Jul 14, 2009

How to use execv from kernel space to call a user space program writtenfor socket prog.

I tried to write code for socket in kernel but its not working.

Socket code in kernel is also needed.

View 2 Replies View Related

Ubuntu Multimedia :: Error - Object Reference Not Sent To An Instance Of An Object

Mar 6, 2010

I've been using the PPA version of banshee, and I got this error - just wondering if anyone else has it too! I'm able to play a song, but when the song finishes and the next one starts I get this error: Banshee Encountered a Fatal Error Object reference not sent to an instance of an object Error details:

Code:
An unhandled exception was thrown: Object reference not set to an instance of an object
at Hyena.Gui.Theming.GtkTheme.GetCairoTextMidColor (Gtk.Widget) <0x00017>
at Banshee.NotificationArea.NotificationAreaService.get_TextLightColor () <0x0002f>
at Banshee.NotificationArea.NotificationAreaService.MarkupFormat (string,string[]) <0x00043>
at Banshee.NotificationArea.NotificationAreaService.GetByFrom (string,string,string,string) <0x000d7>

[Code]....

View 4 Replies View Related

Programming :: Different Processes Using Same File Object

Sep 29, 2009

I have 2 completely different processes A and B (they do not have any relationship) suppose A opens a file with file descriptor 4 and B opens another file with file descriptor 5

Can process A use the fd 5 (i.e using the file object of processs B) by any means..if suppose i let the fd 4 of process A to point to the file object of process B(fd 5) will it work? is it safe?

View 3 Replies View Related

Programming :: How To View An Object File

Aug 14, 2009

Is there any way may be some tools to view and explore contents of .obj files (in a formatted or unformatted way) or an executable. Can we do it using gcc?

View 1 Replies View Related

Programming :: Python: 'Instancemethod' Object Is Unsubscriptable?

Jan 18, 2011

im having some trouble printing a buffered item in python. My code is as follows:

Code: Class buffer:
def __init__(self, max):
self.data = [0 for i in range(max)]

[code]....

View 2 Replies View Related

Programming :: Cmake - Unable To Add Object To Static Lib

Nov 3, 2010

I'm creating a static lib via cmake,and when I view the .a binary file with less/more/cat I see functions from my time_tools.c, but not my other_api.c The directories structure is:

Code:

CMakeLists.txt
time/CMakeLists.txt
time/time_tools.c
time/time_tools.h

[code]....

View 2 Replies View Related

Programming :: Passing An Object To A Running Thread?

Jan 14, 2011

This is a client server issue where the server creates a new thread for listening to a new client, now when the thread starts execution and during its execution the server needs to pass it an object of some X class, how's that to be done?

View 4 Replies View Related

Programming :: Saving Serializable Object Within It's Own Class

May 12, 2011

I found out how to save an object using Serializable in JAVA, the standard however how can I set up my MainVariableList to have a function/method saveobject so it saves the object within it's own class, the below code compiles, however when I run it reports an error on startup but works, basically what do I use for the red line, how do I tell it what object is passed to the class?

View 1 Replies View Related

Programming :: Code - Blocks - Shared Object - Debugger ?

Jan 18, 2010

I have created an application that has a executable program that loads in a shared object

the shared object loads in another shared object

both of these shared object I have created

For debugging I have been printf'in data to determine what is going on

I now have some odd memory issue, and need a bit more control over debugging...

I have one workspace set up and under my exectuable(will call maintest from now on) I have two items in my link libraries under project build options being soA and soB (so A is the shared object that maintest uses, soB is the SO that soA uses) I also have linker options pthread and ldl

At the beginning of my maintest I do my dlsym and load in each function that I will be using

I always run my program using maintest, because when I have one of the SO as the startup project(turns bold) and try to run it gives me "You must select a host application to run a library"

I tried to set up this host library, i Go to Menu->Project->SetProgramArguments and change the Host Application to the debug version of my maintest

I then hit OK and try to run again but I get the same error: "You must select a host application to run a library"

If I get this part working - which I need help doing, is tehre other steps that need to be taken to debug the so's? or will this make it so when i hit f8 it will run.

View 1 Replies View Related

Programming :: Compile Shared Object Files Using Valac ?

Oct 20, 2010

What flags do you have to pass to valac to compile code into a shared library (file extension .so)?

View 1 Replies View Related

Programming :: How Can An Object File Be Executed Without Startup And Housekeeping

Sep 22, 2009

I came from Windows and I am want to learn how C++ programs are compiled and executed in Linux. I read in "Thinking in C++" that the linker adds (by default) a startup module to the object files that an application should be made of. Now when I use g++, I can create an single object module out of a single source code file then execute it in the terminal like this:

./objectFile.out

How can this object file be executed while it doesn't contain the startup module? In Windows, object files usually get combined into an executable file (somthing.exe) then that executable can be executed, is this not necessary in Linux? does the OS perform required actions before it executes that object file?

View 3 Replies View Related

Programming :: Produce COFF Format Object File Using GCC Or AS?

May 10, 2010

I am trying to have GNU assembler produce object file COFF format? I did not find relevant information from GNU assembler's manual.

View 1 Replies View Related

Programming :: Iterating Through All Listed Keys In An IPC::Cache Object?

Jul 27, 2011

I need to find a way to iterate through all listed keys in an IPC::Cache object. There doesn't seem to be an example of this I can find.

View 1 Replies View Related

Programming :: Pass By Reference A Parameter Without Assigning A New Object?

Dec 28, 2010

How can I pass by reference, a parameter, without assigning a new object? In my first example, var = "changed" creates a new local object. In the second, mylist.append will affect the reference target. How to i achieve the same effect with example 1?

Code:
#!/bin/python
var = "unchanged"
def print_string( var ):

[Code].....

View 2 Replies View Related

General :: Create Landscape Oriented Pdf With Ghostscript?

Dec 13, 2009

im using cups filter 'texttops', to generate postscript file, then I;m using ghostscript to create pdf file. The problem is, that file generated from texttops don't contain landscape orientation instructions. How can I force ghostscript to do that. Here is the command Im using:

gs -sDEVICE=pdfwrite -sOutputFile=<outfile> -dBATCH -dNOPAUSE -f <infile>

I've found on the internet these instructions, but they don't work for me:

gs -dBATCH -dNOPAUSE -sOutputFile=myfile.pdf -sDEVICE=pdfwrite -dAutoRotatePages=/None -c "<< /PageSize [612 792] /Orientation 3 >> setpagedevice" 90 rotate 0 -612 translate -f myfile.eps

[code]....

View 1 Replies View Related

Programming :: Error With Compiling Program 'can Not Be Used When Making Shared Object'

Oct 14, 2010

I've got an error with compiling a program: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC /usr/lib/python2.5/config/libpython2.5.a: could not read symbols: Bad value collect2: ld a retourn 1 code dtat d'excution make[2]: *** [bindings/_yafqt.so] Erreur 1.

View 1 Replies View Related

Programming :: Changing Shared Object File Default Place

Mar 27, 2010

I wanted to know how can I change the default place of shared object files of a program in a system. let me explain it better for you : I have an embedded computer with Linux OS that its file system is read only and I can not add any file to /usr /lib and ..... and I can just mount a SD memory card to it and copy all of my programs to it and run them from there as you understand I have two choices to choose, first make one big binary file for each program that I am doing it now and it is not a suitable solution and the second is finding the way to change default place of shared object file of my program.

View 1 Replies View Related

Programming :: Execute A Function Which Is In A Object File Throgh Libbfd?

Sep 10, 2010

I hava a source file add.c

int add(int a,int b){
return a+b;
}

then i compile it, gcc -c add.c now we get a object file add.o, I want to execute the function add(int a,int b)(the functinon in the object file add.o) how can i use libbfd to execute it?

View 1 Replies View Related

General :: Time Oriented Program In Kernel Space?

Jan 28, 2010

I have written a programme in gcc

#include <time.h>
#include <stdio.h>
int main(void)

[code]...

View 2 Replies View Related

Debian Programming :: How To Find Total Size Of A List Object In Byte

Jan 11, 2013

Assuming there are two list objects a1, a2.

a1 = ['
']
a2 =['hi
']

len() built-in function gives total number of elements in the list object.
len(a1) gives 1. len(a2) gives 1 also.

Code: Select all$ python
Python 2.7.3 (default, SepĀ  9 2012, 17:41:34)
[GCC 4.7.1] on linux2

[Code]......

I thought there exists a built-in function that gives total size of a list object in byte. So using the function produces 1 for a1, 3 for a2. I haven't found such function or module yet.

View 3 Replies View Related

Programming :: Assigning Structure Object's Variable Outside Main() Gives Parse Error

Sep 2, 2010

Kindly take a look at the code below :

Code:
#include <stdio.h>
struct test
{
int i;
int j;

[Code]....

why i am getting this error. I know the error is occuring because i have assigned values to obj.i and obj.j outside main(). But i want to know why do that result in an error. From my part i have created an object 'obj' of stucture 'test' and assigned values to its variables.

View 7 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved