Posts
 
Reputation
Joined
Last Seen
Ranked #571
Strength to Increase Rep
+4
Strength to Decrease Rep
-1
72% Quality Score
Upvotes Received
18
Posts with Upvotes
17
Upvoting Members
10
Downvotes Received
6
Posts with Downvotes
6
Downvoting Members
5
6 Commented Posts
~52.3K People Reached
Favorite Tags
Member Avatar for shubhamgore

[QUOTE=shubhamgore;1231564] why should we have to avoid goto, i have used it here becoz i have learn it yesterday from complete reference (c) [fundamental book for c language], and there was a note, saying that whenever we want to shift control of program over any part of the code, [U]we …

Member Avatar for markanderson4
-6
869
Member Avatar for naz1234

Yes, you can simplify this code - I would suggest to dismiss branching statements in "decode" procedure and make use of static array of LED patterns. Something like: #include <stdio.h> #include <stdlib.h> #include <string.h> #define MAKE_PATTERN(b1, b2, b3, b4, b5) ((b1 << 4) | (b2<<3) | (b3<<2) | (b4<<1) | …

Member Avatar for 0x69
0
217
Member Avatar for Medusa Tomsin

As unofficial rule - all C/C++ macros are written in all caps. Underscores simply helps to improve readability if constant consists from several words. It's possible to name a variable with underscores, but it's uncommon. So if you see all caps symbol with underscores in it - you can be …

Member Avatar for 0x69
0
102
Member Avatar for andrisetia

[QUOTE=akki30;1285547]how this function is used. i m so confused n not getting the proper result[/QUOTE] Fibonacci number is calculated in pretty straightfoward way: [IMG]http://upload.wikimedia.org/math/0/c/e/0cebc512d9a3ac497eda6f10203f792e.png[/IMG] No additional comments needed...

Member Avatar for deceptikon
0
258
Member Avatar for mohan_198505

[QUOTE=mohan_198505;787487]4.Login name and password are hardcoded in the program and not strored in any file.[/QUOTE] I find this self-contradictory. "Hardcoded" means that password WILL BE stored in program file as embedded string resource. So for added security i suggest to hardcode not plain password, but instead MD5 hash of password. …

Member Avatar for dij_0983
0
502
Member Avatar for Findlebot

Or... use backtracking algorithm => [url]http://en.wikipedia.org/wiki/Backtracking[/url] Main idea- Save each crossroad decision you take in the tuple form [ICODE](COL, ROW, DIRECTION)[/ICODE]. Such as after N iteratiions you will get list something like: [ICODE][(1,2,UP),(4,5,DOWN),(6,8,LEFT),(10,14,RIGHT),...][/ICODE]. Fill this list until you get into blind alley OR no NEW crossroads are reachable. If so …

Member Avatar for 0x69
0
3K
Member Avatar for pretu

[QUOTE=pretu;380468]HI All How can we generate a sine wave without using the sin() function. Thanks pretu[/QUOTE] You can try Taylor series also.

Member Avatar for jayeshkamble143
0
588
Member Avatar for fallopiano

[QUOTE=fallopiano;1464979]Hey everyone, as the title suggests I'm trying to find a function or some code that'll execute a string of code in Lua. [/QUOTE] [URL="http://www.lua.org/manual/5.1/manual.html#pdf-loadstring"]LoadString()[/URL]

Member Avatar for 0x69
0
703
Member Avatar for spring10

In your [ICODE]while(1)[/ICODE] loop put alarm condition check, if it passes - write something to alarm port. Here is some code for PIC16F84A. [url]http://www.micro-examples.com/public/microex-navig/doc/084-alarm-clock[/url] It's mikroBasic, not C code, but I think you will get the idea.

Member Avatar for MudasirAli
0
362
Member Avatar for ritesh2190

Also i want to say that this question is related to compiler design. So i would suggest to learn compiler design/programming in general, before advancing to concrete problem.

Member Avatar for Anuradha Mandal
-1
4K
Member Avatar for lucy1234

You can always try random walk algorithm: [QUOTE] While (PUZZLE_NOT_SOLVED) { tiles = 4 tiles around hole; tile = RANDOM_TILE_FROM(tiles); MOVE_TILE(tile); } [/QUOTE] This algorithm is very inefficient and not ensures that solution will be found. And it is just pseudocode. But hey, you are supposed to do homeworks yourself. …

Member Avatar for Adak
-5
2K
Member Avatar for sujisubha

[QUOTE=gauthamnaggg;473435]Hello all, I need to write a code that compress and uncompresses thegiven file in c.Well i know there are many algorithms available ,one of the famous algorithms is Huffman's algorithm.But how do i implement the algorithm ?.I googled a lot but couldn't able to find ?.Is there any simple …

Member Avatar for monstercameron
-2
86
Member Avatar for 0x69
Member Avatar for Rashakil Fol
0
112
Member Avatar for Levo

[ICODE]write_data(...)[/ICODE] is callback function which will be called every time each new data portion arrives from internet. So basically you should measure download speed and remaining time in your function write_data(): 1. save current time in local variable time1 2. then download speed will be [ICODE]written/(time1-time2)[/ICODE] 3. save current time …

Member Avatar for 0x69
0
2K
Member Avatar for fuggles

Since you didn't write a language in which you want to program - for the beginner i would recommend either [URL="http://love2d.org/"]Lua + Love2D[/URL] OR [URL="http://www.pyglet.org/"]Python + PyGlet[/URL] Happy coding!

Member Avatar for PixelExchange
0
132
Member Avatar for ganesh_IT

And a bit shorter version ;) [CODE=C]((a>b&&a>c)?a:((b>c)?b:c))[/CODE]

Member Avatar for 0x69
0
85
Member Avatar for anu john

[QUOTE=anu john;416424]Ye. it will be a kit with ethernet chip n rj45 connections.therefor the tcp/ip protocols needed will be taken care of.. nw i need to program my controller using c language in a way that i can access my sql server 2005 on a remote machine...Also im trying to …

Member Avatar for 0x69
0
1K
Member Avatar for pato wlmc

[QUOTE=pato wlmc;1260648]Well, right now i'm using linux, but i've heard that windows is really best for programing videogames ( on c++ ) well, wich O.S. do you think is the best? P.D. Sorry for the bad english jeje :$[/QUOTE] When it comes to game development definitely answer is Windows. Simply …

Member Avatar for Excizted
0
181
Member Avatar for gisek

I don't think that SQL server (or any other database server) is suited for multiplayer purposes. Usually game devs for multiplayer mode writes it's own server and client. So I would recommend to you to write TCP/UDP server and client by using System.NET library. Check this out- [url]http://www.codeproject.com/KB/IP/socketsincsharp.aspx[/url]

Member Avatar for 0x69
0
94
Member Avatar for mennaya

From the problem description is not clear - Do you want just move 3D model in space or animate different pose ? Ok, I make assumption that you want to animate pose, because you mention different body parts. How to do that just google keywords "mesh deformation" and/or "skinning GPU". …

Member Avatar for 0x69
0
307
Member Avatar for AkashL

Indeed CUDA is only for nVidia cards. I suggest better using OpenCL. Also if these calculations is only for computing image transformations- you can try Pixel Shader.

Member Avatar for 0x69
0
153
Member Avatar for sourabhtripathi

[QUOTE=sourabhtripathi;1216213] now can i achieve increment in both value and pointer in one line ?[/QUOTE] It's pretty straightforward - [CODE] // increments pointer and then value ++(*(++p)); // increments value and then pointer ++(*(p++)); [/CODE]

Member Avatar for jaaz....
0
304
Member Avatar for moni94

A VERY interesting question ! Thanks for asking such thing :) Both methods are polyalphabetic ciphers. There are some algorithms for polyalphabetic ciphers which computes key size from ciphertext. Once key size is known, ciphertext can be splitted into columns which are vulnerable to simple [URL="http://en.wikipedia.org/wiki/Frequency_analysis"]frequency analysis[/URL]. So answer is …

Member Avatar for TrustyTony
0
549
Member Avatar for arkoenig

Wiki is our friend: [url]http://en.wikipedia.org/wiki/Maximum_subarray_problem[/url] Kadane's algorithm performs in O(n) for 1D array.

Member Avatar for 0x69
0
127
Member Avatar for Sandeep929

[url]http://www.computeruser.com/articles/xp-professional-vs.-2000-professional.html[/url]

Member Avatar for Ancient Dragon
0
76
Member Avatar for jeevsmyd

[CODE=C] #include <stdlib.h> // on windows clear screen with system("cls"); // on unix/linux clear screen system("clear"); [/CODE]

Member Avatar for Adak
0
112
Member Avatar for shirmaster

I made some fixes, here corrected version: [CODE=C] #include<stdio.h> #include <stdlib.h> void getOption(); void getData(int *num1, int *num2); void calc(int option, int num1, int num2); float add(int num1, int num2); float sub(int num1, int num2); float mul(int num1, int num2); float divm(int num1, int num2); void printResult(float result); void clrscr() …

Member Avatar for shirmaster
0
101
Member Avatar for monstercameron

[QUOTE=AuburnMathTutor;1257975] I pointed out that we started with a language that was much farther from natural languages, i.e. machine language, and have since developed languages that are more similar in structure to English. [/QUOTE] Seems you are over-fitting your observations of programming language evolution of C-like languages. Take a look …

Member Avatar for 0x69
0
257
Member Avatar for GameGuy

[QUOTE=GameGuy;1212348] How long, if I have no experience, until I am making 3D FPS'? [/QUOTE] My advice - don't start with FPS project. It's the problem which faces beginners of game programming. If you want to learn 3D game programming - at first choose very basic 3D project - such …

Member Avatar for 0x69
0
209
Member Avatar for csinquirer
Member Avatar for Nick Evan
0
525