Search Results

Search found 12674 results on 507 pages for 'programming competitions'.

Page 125/507 | < Previous Page | 121 122 123 124 125 126 127 128 129 130 131 132  | Next Page >

  • Does anybody have practice in programming PCMEF - architectures?

    - by Erkki
    PCMEF is an architecture style presented in the book Practical Software Engineering by Maciaszek and Liong. The layers are: P: Presentation C: Controller M: Mediator E: Entity F: Foundation. It is some kind of enchancement compared with MVC - architecture. I recommend it to interactice, data and communicating - oriented purposes. I have programmed it using Visual Prolog. Foundation in my applications is the data model (domains) for the application. PCMEF is like a simulated computer: Presentation is the display, Controller the user interface and event handling, Mediator the internal logic and data highway. Entity is the database or external interfaces and F defines the knowledge. This is a really nice small architecture. Does any other have experiance of it?

    Read the article

  • Illegal Instruction When Programming C++ on Linux

    - by remagen
    Heyo, My program, which does exactly the same thing every time it runs (moves a point sprite into the distance) will randomly fail with the text on the terminal 'Illegal Instruction'. My googling has found people encountering this when writing assembly which makes sense because assembly throws those kinds of errors. But why would g++ be generating an illegal instruction like this? It's not like I'm compiling for Windows then running on Linux (which even then, as long as both are on x86 shouldn't AFAIK cause an Illegal Instruction). I'll post the main file below. I can't reliably reproduce the error. Although, if I make random changes (add a space here, change a constant there) that force a recompile I can get a binary which will fail with Illegal Instruction every time it is run, until I try setting a break point, which makes the illegal instruction 'dissapear'. :( #include <stdio.h> #include <stdlib.h> #include <GL/gl.h> #include <GL/glu.h> #include <SDL/SDL.h> #include "Screen.h" //Simple SDL wrapper #include "Textures.h" //Simple OpenGL texture wrapper #include "PointSprites.h" //Simple point sprites wrapper double counter = 0; /* Here goes our drawing code */ int drawGLScene() { /* These are to calculate our fps */ static GLint T0 = 0; static GLint Frames = 0; /* Move Left 1.5 Units And Into The Screen 6.0 */ glLoadIdentity(); glTranslatef(0.0f, 0.0f, -6); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); glEnable(GL_POINT_SPRITE_ARB); glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE); glBegin( GL_POINTS ); /* Drawing Using Triangles */ glVertex3d(0.0,0.0, 0); glVertex3d(1.0,0.0, 0); glVertex3d(1.0,1.0, counter); glVertex3d(0.0,1.0, 0); glEnd( ); /* Finished Drawing The Triangle */ /* Move Right 3 Units */ /* Draw it to the screen */ SDL_GL_SwapBuffers( ); /* Gather our frames per second */ Frames++; { GLint t = SDL_GetTicks(); if (t - T0 >= 50) { GLfloat seconds = (t - T0) / 1000.0; GLfloat fps = Frames / seconds; printf("%d frames in %g seconds = %g FPS\n", Frames, seconds, fps); T0 = t; Frames = 0; counter -= .1; } } return 1; } GLuint objectID; int main( int argc, char **argv ) { Screen screen; screen.init(); screen.resize(800,600); LoadBMP("./dist/Debug/GNU-Linux-x86/particle.bmp"); InitPointSprites(); while(true){drawGLScene();} }

    Read the article

  • Online Game programming in Google App Engine: AI

    - by Hortinstein
    I am currently in the planning stages of a game for google app engine, but cannot wrap my head around how I am going to handle AI. I intend to have persistant NPCs that will move about the map, but short of writing a program that generates the same XML requests I use to control player actions, than run it on another server I am stuck on how to do it. I have looked at the Task Queue feature, but due to long running processes not being an option on the App engine, I am a little stuck. I intend to run multiple server instances with 200+ persistant NPC entities that I will need to update. Most action is slowly roaming around based on player movements/concentrations, and attacking close range players(you can probably guess the type of game im developing)

    Read the article

  • Help with visual programming??

    - by tjk0102
    i'm making a program that i need help with i'm trying to duplicate impero's policy lock screen i need help i'm trying to have my program search to see if a file is there. the concept is if the file exists it will launch it,but i'm having troubles would i use background worker do search for it and if so how would i make it search for it? if you can help that will be great

    Read the article

  • Programming CLI Commands in Program [C / LINUX]

    - by Blackbinary
    I am attempting to make a program in C which presents a GUI and allows the user to select from a list of applications, which to install on the computer. I can manage the gui, but I've never been taught how to actually issue command line commands. I know with bash its just apt-get install firefox for example, but how do I do such a thing with C? i.e. on click, the program runs 'apt-get install The other problem is I'm not familiar with the proper name for this interaction, so it is hard to search. Thanks for the help

    Read the article

  • PHP: Object Oriented Programming -> Operator

    - by oman9589
    So I've been reading through the book PHP Solutions, Dynamic Web Design Made Easy by David Powers. I read through the short section on Object Oriented PHP, and I am having a hard time grasping the idea of the - operator. Can anyone try to give me a solid explanation on the - operator in OOP PHP? Example: $westcost = new DateTimeZone('America/Los_Angeles'); $now->setTimezone($westcoast); Also,a more general example: $someObject->propertyName Thanks

    Read the article

  • Programming Windows Cluster resource DLLs using Delphi

    - by kaeff
    I wonder whether there's a way to program a resource DLL for Windows Clusters in Delphi. I want to write a program that observes cluster state changes. Judging from the MSDN API reference, all relevant functions are located in the ClusAPI.h and ResAPI.h headers, but unfortunately it seems as if they haven't been ported yet and HeaderConv seems to fail on them. Does anyone has experience in doing such a thing?

    Read the article

  • c++ programming for clusters and HPC

    - by Abruzzo Forte e Gentile
    HI All I need to write a scientific application in C++ doing a lot of computations and using a lot of memory. I have part of the job but due to high requirements in terms of resources I was thinking to start moving to OpenMPI. Before doing that I have a simple curiosity: If I understood the principle of OpenMPI is the developer that has the task of splitting the jobs over different nodes calling SEND and RECEIVE based on node available at that time. Do you know if it does exist some library or OS or whatever that has this capability letting my code reamain as it is now? Basically something that connects all computers and let share as one their memory and CPU? I am a bit confused because of the high material available on the topic. Should I look at cloud computing? or Distributed Shared Memory? Can you help me or address me a bit? Thanks

    Read the article

  • how to use session in iphone programming?

    - by jaydp
    Hi Friends, I made an iphone story book application. Suppose any user read story book and at half of the story book he/she close the apps. when he/she want to read again this application at a time ask for continue or start again. This is possible by using session but i don't know how to use session in iphone sdk. So, please help me about this problem. Thanks!

    Read the article

  • c++ programming- Tryin to get a number within an array that is twice the average

    - by max
    i have been assigned to set up an array with points. I am told to get the maximum value, average, nd within this same array, if any point in the array is twice the average, i should cout an "outlier." So far i have gotten the average and maximum numbers in the array. but i am unable to set the programme to cout the outlier. Instead it gives me a multiple of the average. pls help! here is the programme; int main() { const int max = 10; int ary[max]={4, 32, 9, 7, 14, 12, 13, 17, 19, 18}; int i,maxv; double out,sum=0; double av; maxv= ary[0]; for(i=0; i } cout<<"maximum value: "< for(i=0; i sum = sum + ary[i]; av = sum / max; } cout<<"average: "< out = av * 2; if(ary[i]out) { cout<<"outlier: "< return 0; }

    Read the article

  • Network programming on java

    - by maks
    I have written a simple network program on java using sockets. Program has a client and a server. When user types a word on client side, server simply return this word to client. On server side I use Serversocket and bind it to port 4444. Why does not firewall block this connection on my server PC? I ask this question because earlier I wrote this program using corba technology, and firewall on my server PC was blocking the connection to this port; when I disabled the firewall the program worked fine.

    Read the article

  • Interview Programming Questions - In house Exam

    - by David McGraw
    I have a company that would like to bring me in to serve me an hour long exam. No resources other than a pencil and paper. I really couldn't get any sort of feedback on the type of exam (implementation or generic) beside that it would test a few specific areas. Have you done anything like this? What sort of questions did they ask? What's a good way to prepare? I'll probably go in a couple weeks before school starts back up. A time sensitive exam structure is a weak point for me, so what should I absolutely focus down on? If they like the exam, that's when I'll get a face-to-face meeting. An advance thanks goes to everybody who provide their time.

    Read the article

  • Print the first line of a file C programming

    - by Pedro
    void cabclh(){ FILE *fp; char *val, aux; int i=0; char *result, cabeca[60]; fp=fopen("trabalho.txt","r"); if(fp==NULL){ printf("ERROR\n"); return ; } val=(char*)calloc(aux, sizeof(char)); while(fp='\n'){ fgets(cabeca,60,fp); printf("%s\n",cabeca); } fclose(fp); free(fp); } I want to open a file and print the first line. the problem here is in while(fp='\n'), what i'm doing wrong. How can i make a function that recognize the first char from a file... like: FILE *arq; char info[20]; arq=fopen("trabalho.txt","r"); if(fp==NULL){ printf("ERROR\n"); return ; } if(fp[0]='-'){ //check if the first element is a '-' printf("It's info\n"); }

    Read the article

  • iPhone SDK Programming - Working with a variable across 2 views

    - by SD
    I have what I hope is a fairly simple question about using the value from a variable across 2 views. I’m new to the iPhone SDK platform and the Model/View/Controller methodology. I’ve got background in VB.Net, some Php, but mostly SQL, so this is new ground for me. I’m building an app that has 3 views. For simplicity’s sake, I’ll call them View1, View2, View3. On View1 I have an NSString variable that I’ve declared in View1.h, and synthesized in View1.m. I’ll call it String1. View1.m uses a UITextField to ask the user for their name and then sets the value of String1 to that name (i.e. "Bill"). I would now like to use the value of String1 in View2. I'm not doing anything other than displaying the value ("Bill"), in a UILabel object in View2. Can someone tell me what the easiest way to accomplish that is? Many thanks in advance….

    Read the article

  • negative values in integer programming model

    - by Lucia
    I'm new at using the glpk tool, and after writing a model for certain integer problem and running the solver (glpsol) i get negative values in some constraint that shouldn't be negative at all: No.Row name Activity Lower bound Upper bound 8 act[1] 0 -0 9 act[2] -3 -0 10 act[2] -2 -0 That constraint is defined like this: act{j in J}: sum{i in I} d[i,j] <= y[j]*m; where the sets and variables used are like this: param m, integer, 0; param n, integer, 0; set I := 1..m; set J := 1..n; var y{j in J}, binary; As the upper bound is negative, i think the problem may be in the y[j]*m parte, of the right side of the inequality.. perhaps something with the multiplication of binarys? or that the j in that side of the constrait is undefined? i dont know... i would be greatly grateful if someone can help me with this! :) and excuse for my bad english thanks in advance!

    Read the article

  • HTML tags in ojective c programming

    - by user1661826
    Is there any function in Objective-C to print a list of elements as unordered HTML elements. For ex - [@"a--b-c---d" htmlList: @"--"] returns @ "ab-c-d" the "--" is the delimiter to seperate the string of elements. I have used NSSArray to store the input string and function componentsSeperatedByString:@"--" to get the elements. How do I go ahead in adding the HTML tags li and /li between elements and ul and /ul at the end of the entire list? Please help, Im a beginner in objective -C

    Read the article

  • A Question about dereferencing pointer to incomplete type In C programming

    - by user552279
    Hi, can you explain this error for me? Blockquote /////////////////////////////// In my A.h file: struct TreeNode; struct TreeHead; typedef struct TreeNode * Node; typedef struct TreeHead * Head; /////////////////////////////// In my A.c file: struct TreeNode { char* theData; Node Left; Node Right; } ; struct TreeHead{ int counter; char type; Node Root; }; Head Initialisation() { Head treeHead; treeHead = malloc(sizeof (struct TreeHead)); treeHead-Root = malloc(sizeof (struct TreeNode)); return treeHead; } /////////////////////////////// In my Main.c file: Head head; Node tree; int choose =5; head = Initialisation(); (head-Root) = tree; //When compiling, this line has an error: error: dereferencing pointer to incomplete type Blockquote haed-Root will return a Node pointer, tree is also a Node pointer. So why error is dereferencing pointer to "incomplete" type?

    Read the article

  • Logical Programming Problem

    - by user353060
    Hello, I've been trying to solve this problem for quite sometime but I am having trouble with it. Let's say on a trigger, you receive values. First trigger: You get 1 Second trigger: You get 1, 2 Third trigger: You get 1, 2, 3 So, I store 1. For 2nd trigger, I store 2 since 1 already exist. For 3rd trigger, I store 3 since 1,2 already exist so in total I have stored 1,2,3 As you can see, we can easily check for new values, if old != new. Here's come the problem: Fourth trigger: You get 1, 2, 4 For 4th trigger, I store 1, 2 because it exists but how do I check against 3 and remove 3 from store and check if 4 is new? If you are having problems understanding this, feel free to clarify. Thanks!

    Read the article

  • joining programming projects for free

    - by josephj1989
    Hi All Not sure if this is an appropriate question for the forum. I an experienced software developer with over 15 years in design and development of systems -mostly using Oracle software and ERP solutions using Oracle Apps. But due to some personal reasons I had to stay away from work for a period of 5 years.Now I am finding it hard to get back in. I have trained myself thoroughly in microsoft technologies C#,.NET,SQL SERVER,ASP .NET and also certified in these areas.Now I want to gain some practical experience with these technologies.I am very willing to take up some project work for free so that I can gain some experience and also add to my portfolio. Is any of you in a position to give me some voluntary work. I did try to find open source work but none is available. I can do the following very well. Analysis/Design Oracle Database PLSQL/SQL SQL Server TSQL C# .NET and .NET Platform ASP.NET I can also do Web Development HTML,CSS, JAVASCRIPT,JQUERY Unix Shell Scripting Java Swing Development Thanks

    Read the article

  • casting issue with realpath function (c programming)

    - by Ralph
    When I compile the following code: #define _POSIX_C_SOURCE 200112L #define _ISOC99_SOURCE #define __EXTENSIONS__ #include <stdio.h> #include <limits.h> #include <stdlib.h> int main(int argc, char *argv[]) { char *symlinkpath = argv[1]; char actualpath [PATH_MAX]; char *ptr; ptr = realpath(symlinkpath, actualpath); printf("%s\n", ptr); } I get a warning on the line that contains the call to the realpath function, saying: warning: assignment makes pointer from integer without a cast Anybody know what's up? I'm running Ubuntu Linux 9.04

    Read the article

< Previous Page | 121 122 123 124 125 126 127 128 129 130 131 132  | Next Page >