- Strength to Increase Rep
- +4
- Strength to Decrease Rep
- -1
- Upvotes Received
- 1
- Posts with Upvotes
- 1
- Upvoting Members
- 1
- Downvotes Received
- 5
- Posts with Downvotes
- 3
- Downvoting Members
- 5
study, understand and forget... this is in while(1) loop...
- Interests
- photography, reading books, writing articles
- PC Specs
- C, C++, python, SQL, HTML, XML, data structures
Re:
I usually listen to music while I'm browsing here, what are you listening to right now? EL-P - Fantastic Damage |
|
Re:
I'm attempting to create a number square when it's using a parameter. Whatever the user enters in the parameter it will display something like this (using 4 as an example): 4567 3456 2345 1234 I've come up this so far: [CODE]def numberedSquare(n): for a in range(n, 0, -1): print(a, end="\n") … |
|
Re:
Hello I am very confused with how negative numbers are represented in binary form. They say it is done in 2s complement form. Now won't this 2s complement of a negative number clash with an actual +ve number having the same binary representation? And negation of a +ve number..... We … |
|
Re:
Hello everyone. Today I decided to write a little Caesar cipher script in Python. After tweaking the code and testing it, I shot up my browser and had a look at other snippets on the web. I was shocked at what I saw. All of the Python solutions I went … |
|
I was trying to find a solution for checking the symmetry of a tree. I would like to get some comments on the approach.. I am trying to do it by modifying the inorder traversal thing.. The pseudo code is: [CODE] // since the structure should be similar string in1,in2; … |
|
Re:
i am using python idle in windows7 to run my program. whenever i try to run the program i get an syntax error as unexpected indent. the code i am trying to run is as follows: [CODE]def print_lol(movies): for each in movies: if isinstance(each,list): print_lol(each) else: print(each)[/CODE] |
|
I was looking around the time module. The time.sleep(no_of_seconds) sleeps the program for no_of_seconds seconds. I don't think this is busy wait. It must be scheduling the process at a later time. Just curious of how this is working.! :) |
|
Re:
Hello... I'm learning C with "The C Programming Language" book, and I'm stuck at exercise 1-10 which asks to: "Write a program to copy its input to its output, replacing each tab by \t, each backspace by \b, and each backslash by \\. This makes tabs and backspaces visible in … |
|
Even after looking at a lot of books, I am not able to understand the problem in the following code: [CODE] //1.c static int y=23; void abc(int a){ printf("%d\n",a); } [/CODE] [CODE] //2.c #include<stdio.h> #include "1.c" int main(){ abc(12); printf("\n"); printf("%d\n",y); return 0; } [/CODE] I can understand that the … |
|
I was looking at a question: Q. Given n numbers of which all numbers are repeated (at least once) other than one. We have to find that number. Numbers range is to 10^9, thus using count sort would do no good.! Adding the numbers one by one to a dictionary … |
|
I just wanted to learn to create facebook applications using python.I am new to web development of any sorts, so everything seems to be weird right now. Here is what i acquired by google searching pages: This is the facebook developers page: [url]http://developers.facebook.com/opensource/[/url] Only one link to python.. [url]https://github.com/facebook/python-sdk[/url] The … |
|
Re:
Hi guys, i just written a simple program which requires some date verification. However im facing some trouble with the input Problem 1: if the input has more than 8 chars, garbage characters gets printed Problem 2: if input contains invalid values(like negative), error gets printed Problem 3: if input … |
|
I was trying to code the assembly line sheduling problem using the dynamic programming approach. I have coded the program but i am facing problem with the 2-dimensional arrays I am using. For testing purpose, I wanted to initialize the array, but I was not able to get it. Moreover, … |
|
Re:
After i key in 20 different value of float, what command should i use so that i can determine the largest and smallest value from these numbers ? |
|
Re:
[code=c++] #include <cmath> #include <iostream> using namespace std; void F2(int, int, int, int&, int&, int&); int main ( void ) { int X=1, Y=2, Z=3, A=4, B=5, C=6, A1=7, A2=8, A3=9; F2(X, Y, Z, A, B, C); cout << "X=" << X << "Y=" << Y <<endl; cout << "Z=" … |
|
The last time I was making a program, I wanted to input from user a boolean answer (to save space ;)) An input of 0/1 works good (0-false) and (1-true), but if the user inputs the boolean values as "true" and "false", it comes out to be an error. So, … |
|
Re:
I'm working on a program in C++ that is supposed to output som data from a couple of classes. I thought I'd let the user choose what to output (what function) through a switch in main. This is basicly how the main looks now. (Just a general overview of the … |
|
Re:
I'm having trouble getting a recursion template reduceArray() function to divided elements in an array. I have +,-, and * working fine, but division is not working for me. The function should take the given elements and divide as follows ((((4/2)/7)/1)/9) Here's my code...any tips? [CODE]#include<iostream> using namespace std; template<typename … |
|
Re:
hi friends, check this program beneath....... \\program to fin integere part and fractional part of given real number... #include<iostream.h> #include<conio.h> void intfrac(int,float&,float&); void main() { float number,intpart,fracpart; cout<<"enter any real number:"; cin>>number; intfrac(number,intpart,fracpart); cout<<"integer part is:"<<intpart; cout<<"\nfraction part is:"<<fracpart; getch(); } void intfrac(float n,float& intp,float& fracp) { fracp=n%1; intp=n-fracp; } … |
|
Can someone please direct me to the code for the class <int> in python. I know that it must have written in C, but I could not understand, where to ask this query. Though I tried to figure it out myself, but could not even understand, which folder to attack … |
|
Re:
7. The parity of a binary number is defined as: The parity of a binary number depends on the number of 1 bits in the number parity is "even" if there are an even no of 1s in the number and "odd" otherwise: e.g. parity of 0011001100110011 is even. Draw … |
|
Re:
hi everyone, I am doing my under-graduation in computer science,i am having difficulty in dealing with data structures course,mainly in theoretical part,can anyone please help me in suggesting me a good textbook and book with problems/questions that could help better understanding plz... |
|
Re:
Hi, I was recently asked this question in an interview and I was wondering if any of you could help me find a better solution to this problem. The question goes like this: There is a function foo which takes two arguments: an array "a" of type int and another … |
|
Re:
Hi everyone! I'm a newbie here. I have a problem: I need to create the address book in python that include name, phone number, email, address, etc...The information in the address book can able to delete or change. I will give more information later! Can you help me? I need … |
|
This may be quite a late introduction, but better late then never. I am having great fun at this forum. See me at C, C++ and python forums... got to learn a lot.. |
|
Re:
I have to add inputs just in case i have up to nine lines that i need to add feet values too. but im curious if i only have 5 lines to input is there a way to bypass the other inputs cause if i in put zero it has … |
|
I have just started writing C code in dev-c++. The programs are running fine, but each C program shows me the following warning: [QUOTE] [Warning] command line option "-fno-access-control" is valid for C++/ObjC++ but not for C[/QUOTE] The test program I used was: [CODE] #include<stdio.h> int main(){ system("pause"); return 0; … |
|
I was having some confusions about string and NULLs. So, I read this [URL="http://www.daniweb.com/forums/thread77987.html"]thread[/URL] on this very forum. But, I could not understand somethings... Firstly, Is NULL an integer value 0, or something else? Secondly, [CODE]if(strlen(str)==0)[/CODE] this shows that the string is null or it shows that the first character … |
|
I want to sort a list of dictionaries using the inbuilt sort() function for lists. The problem is I am not able to understand, how to give the function a key.. Example: [CODE] a={'name':1,'data':200} b={'name':2,'data':400} c=[a,b] [/CODE] Now, I want to sort the list c with the key being a['name']. … |
|
I want to print a float number with it's digits extending to 20000 digits after the decimal i.e. if the number is 10/3, it should print 3.333333333333333333333333333...20000 or more times. So, how do I print something like that? Also, do tell the solution for C and C++ as well... The … |