Posts
 
Reputation
Joined
Last Seen
Ranked #573
Strength to Increase Rep
+5
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
~53.0K People Reached
Favorite Tags

89 Posted Topics

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
873
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
218
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
105
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
262
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
505
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
597
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
755
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
367
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
88
Member Avatar for 0x69
Member Avatar for Rashakil Fol
0
113
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
135
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
88
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
96
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
343
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
154
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
306
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
557
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
130
Member Avatar for Sandeep929

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

Member Avatar for Ancient Dragon
0
78
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
113
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
102
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
261
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
211
Member Avatar for csinquirer
Member Avatar for Nick Evan
0
527
Member Avatar for jus.me.rashmi

You can start here- [url]http://en.wikipedia.org/wiki/Computer_vision[/url] Yes, you will need to track motion, but it's problem you concentrate too early. At first you need to concentrate at object (hand) recognition phase. You could start here- [url]http://www.codeproject.com/KB/audio-video/face_detection.aspx[/url] Also somehow i think for such project perfomance is important thing cause you will operate …

Member Avatar for jus.me.rashmi
0
169
Member Avatar for ranjita.cdt.esg

[QUOTE=ranjita.cdt.esg;1249953]can anyone guide me to good websites with respect to this topic "image deblur without original image" [/QUOTE] Make convolution filter with sharpen kernel. [QUOTE=ranjita.cdt.esg;1249953] Ultimately have to do video denoising. [/QUOTE] Denoising (blur) can be done by convolution filter with median kernel. So if your main target is to …

Member Avatar for 0x69
0
1K
Member Avatar for moroccanplaya

[QUOTE=moroccanplaya;1245276]so why c is no used in the mainstream ?[/QUOTE] "mainstream" alone doesn't mean anything at all and should be used only in context. For example: - Embedded systems programming - C is used by mainstream. - GPU programming - take a look at GLSL shader language, which is based …

Member Avatar for griswolf
0
360
Member Avatar for failip

Make program for prediction of tsunami date+time+impact from GPS and/or other data.

Member Avatar for 0x69
-1
46
Member Avatar for SJP99

[QUOTE=SJP99;1253210]not sure if this is a right place.....but what exactly does it mean if a programming language is portable?[/QUOTE] It means that there exists compilers/intepreters of that language for many different kinds of computers/OS.

Member Avatar for 0x69
0
138
Member Avatar for bachan28

I will suggest 3 ways: [ICODE]Easy[/ICODE] => Python and PyGame (or even Rabbyt - easier library for 2D stuff) [ICODE]Normal[/ICODE] => C# / VB.NET and XNA (xna is very good directx abstraction library) [ICODE]Hard[/ICODE] => C++ and DirectX SDK (hard way, if you want to control everything and are prepared …

Member Avatar for bachan28
0
142
Member Avatar for stanleyz
Member Avatar for Purnima12

If number of permutations is not big - simply try to bruteforce. Otherwise try genetic algorithm - it is good for such sort of optimization problems.

Member Avatar for Purnima12
0
2K
Member Avatar for tskellyfla

Even 64-bit integer is not able to store such big numbers. You will need to store these numbers in array as sequence of digits and write your own addition operation of such big numbers, cause CPU can't add integers bigger than int-64 without loosing precision.

Member Avatar for tesuji
0
106
Member Avatar for Mike bruce geek
Member Avatar for gerard4143

[QUOTE=gerard4143;1240754]Why does the C standard implement this type of behaviour or is it better left unknown?[/QUOTE] Language specification (aka. standard) is NOT the same as language implementation (by compiler or interpreter). [url]http://en.wikipedia.org/wiki/Programming_language_specification[/url] [url]http://en.wikipedia.org/wiki/Programming_language_implementation[/url] So - C standard does not *implement* anything, it just defines standard. And How standard will be …

Member Avatar for gerard4143
0
174
Member Avatar for Fernidad13

[QUOTE=Fernidad13;1225514] What kind of math do they use and how??? Can u guys PLEASE HELP ME?!?!?![/QUOTE] From my understanding there are several essential math fields used in games - a. Geometry b. Linear algebra c. Applied mathematics d. Calculus There may be more, which doesn't come into my mind now. …

Member Avatar for digital29
0
583
Member Avatar for muaazab

I'm not expert, but will try to answer. Make substitution [ICODE]r=(a+b)a*b[/ICODE] (it will be easier to analyze), then you will get such picture below. So basically 'a' transition is used to make 'ar' transition. Hope that helps.

Member Avatar for s_sridhar
0
110
Member Avatar for gmunk

Or you could achieve practically same thing with backtracking algorithm- [url]http://en.wikipedia.org/wiki/Backtracking[/url] Start from (0,0) Choose next legal node (x,y) If sum_until(x,y) > (3,3) -> advance backwards to previous cell, and choose next legal move. Repeat while sum_until(x,y) != (3,3) AND (x,y) is not nearest cell from (3,3).

Member Avatar for gmunk
0
94
Member Avatar for Escape5equence

Several problems here- 1. Change function [ICODE]input()[/ICODE] to [ICODE]raw_input()[/ICODE]. Input() expects valid python code and does evaluation of that code. 2. You are reading user command to variable 'prompt_ghall' and hence such interpreter error: [ICODE] Traceback (most recent call last): [...] File "Mannerbold.py", line 61, in prompt_ghall prompt_ghall() TypeError: 'str' …

Member Avatar for 0x69
0
2K
Member Avatar for dfetter88

Banfa said almost everyhing you should know. But... I would not recommend to use Comparisons Or Moves columns for time complexity analysis. Simply because Comparisons and/or Moves can show different trend than run time column. So because these trends in principle can differ - i would strictly recommend only plot …

Member Avatar for Banfa
0
123
Member Avatar for nergz

Hey you even didn't wrote what game mechanics you should expect. Or do you think that we are some kind of wizards ?

Member Avatar for ctaylo21
0
78
Member Avatar for westsider123

Also this branch is totally wrong- [CODE] /* invalid prime factor */ else { if(d == 2) d = 3; else d += 2; } [/CODE] this code will fail after prime P=7 -> 7+2 = 9, but 9 is not prime number, instead after 7, next prime factor should …

Member Avatar for jephthah
0
425
Member Avatar for ubi_ct83

Your description of problem is too fuzzy. At first try to abstract from details and tell us in general - What are you trying to achieve here ?

Member Avatar for ubi_ct83
0
85
Member Avatar for gear26926

According to [url]http://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Operator_precedence[/url] operations should be executed like this [ICODE]m = ((++i) && (++j)) || (++k);[/ICODE]

Member Avatar for jephthah
0
115

The End.