- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 3
- Posts with Upvotes
- 3
- Upvoting Members
- 2
- Downvotes Received
- 4
- Posts with Downvotes
- 3
- Downvoting Members
- 2
40 Posted Topics
I am looking for a new laptop.My budget is around 700 $.I require the laptop for programming mainly.I would like to have i5 processor with 4gb + ram. I would like to save as much money as possible without compromising on these requirements and quality .I don't care for looks … | |
I am planning to buy a new laptop within a budget of 700 $. I am going to use it for mainly programming purposes so I don't really care for graphic card etc. I am looking for the following features:- i5 processor 200 GB + HD 4GB + RAM I … | |
<?php mysql_pconnect("localhost","root",""); mysql_select_db("AppDevelopMenu") or die( '1'); $sql1=mysql_query("select Question from questions where QId ='1'"); if(!$sql1) echo '2'; else{ $question=mysql_fetch_assoc($sql1) ; $outputq[]=$question; $sql=mysql_query("select OptionId,OptionContent from options where QId ='1'"); if(!$sql) { echo '3'; } else { while($row=mysql_fetch_assoc($sql)) $outputq[]=$row; print(json_encode($outputq)); } } mysql_close(); ?> i have to modify this code to read json … ![]() | |
I am trying to implement a program to solve 20 + equations . what algo should i use | |
I am designing my own algorithm to check if 2 codes are similar or identical? How do pre-exsting softwares do this? What logic do they use? Are there different levels of testing for this? please give detailed answers | |
I am designing my own algorithm to check if 2 codes are similar or identical? How do pre-exsting softwares do this? What logic do they use? Are there different levels of testing for this? please give detailed answers **CLOSED DUE TO DOUBLE POST, SEE** http://www.daniweb.com/software-development/cpp/threads/420816/how-to-check-2-codes-are-similar-or-identical | |
I am working on a project with my friend where we have to update existing version of a game which uses SDL 1.2 to use SDL 2.0 header files and functions. I would like to know what is the standard procedure we follow while updating already existing source code to … | |
Question statement Now we represent a natural number N by the maximum numbers that are less than or equal to N in Fibonacci sequence: N = b1*A1 + b2*A2 + … Hence N can be represented as: bnbn-1…b1. For eg, 1 = 1f, 2 = 10f, etc. On writing all … | |
I am making a program to store all the powers of 2(1,2,4,8...) till 2 ^50000. Although I am getting the answer,I am not getting my answer in the required time limit. Any suggestions? How should I store the numbers? Here is my stupid code as of now [CODE] #include<stdio.h> #include<math.h> … | |
I am trying to implement a program for finding the remainder on division of 2 numbers n2/n1 such that n1 is of the order of 2^32(having a few digits) and n2 is the order of 2^65536(having about 20000 digits) So far I have stored them in an array digit by … | |
[CODE]There is a single ring road that runs over the circumference of this circle and connects all the boarding points. There are also N - 1 different shuttle agencies available in Bhiwani. For every different boarding points A and B there is exactly one shuttle that connects these points and … | |
x*y = a + b*lcm(x,y) + c*gcd(x,y) I have to solve this eqaution.How to make a solution for it. here a,b,c<=10^6 Any suggestions | |
[CODE] #include <iostream> #include<stdio.h> #include<string.h> using namespace std; int main() { // cout << "Hello world!" << endl; int t,i,j,a,flag; char str[1000001]; cin>>t; while(t--) { a=1; scanf("%s",str); for(i=0;i<=strlen(str);i++) {flag=0; if(!isdigit(str[i])) {flag=0; for(j=i-1;isdigit(str[j]);j--) { if(str[j]!='0') { flag++; a*=str[j]-'0'; //cout<<"flag"<<flag<<" "<<a<<"A"<<endl; break; } } if(flag==0) { a=0;break; } } while(a>9) { if((a%10)!=0) … | |
Given an array A of length N, my task is to find the element which repeats in A maximum number of times as well as the corresponding count. In case of ties,I choose the smaller element first. Input First line of input contains an integer T, denoting the number of … | |
I am implementing a program where I want to store only certain part of the input string. for eg if the input string is 0123456789 I want to discard 4 AND 7 and store 01235689 Please my program requires an input string of 10000 characters so running time is very … | |
I am about to place my order for the Dell Inspiron 14-R.[CODE] Processor 2nd generation Intel® Core™ i5-2450M processor 2.50 GHz with Turbo Boost up to 3.10 GHz Operating System Genuine Windows® 7 Home Basic SP1 64bit (English) Display 14.0" HD WLED True-Life Display (1366x768) with LCD Bezel Memory3 4GB4 … | |
I am planning to purchase a laptop.I am basically want to use it for programming so I don't want a fancy graphic card or any other such extra feature. I live in India where a laptop that sells for 700 $ in US is sold for 1000 $.I want to … | |
Is this Toshiba Qosmio T851/D8CR laptop good? I am planning to purchase a laptop.I am basically want to use it for programming so I don't want a fancy graphic card or any other such extra feature. I live in India where a laptop that sells for 700 $ in US … | |
[CODE] #include<stdlib.h> #include<conio.h> #include<stdio.h> #include<iostream.h> struct pro { int no; int btime; int atime; int stime; int etime; int wtime; int ttime; int rtime; }proc[100],junk; void sort(int n) { pro temp; for(int i=0;i<n;i++) for(int j=0;j<n;j++) { if(proc[j].atime>proc[j+1].atime) { temp=proc[j]; proc[j]=proc[j+1]; proc[j+1]=temp; } } } pro min(int n,int & t) { … | |
I am a beginner to computer graphics and I have to add animations to the image of my national flag which look like this. I have designed the flag alright.But I don't know what kinds of animations are possible and how. Could someone please guide me how to add animations … | |
I am a beginner to computer graphics and I have to add animations to the image of my national flag which look like [URL="http://4.bp.blogspot.com/_R_714JbVSys/SbJm90IMkpI/AAAAAAAAAEo/IQQ_YyvV2_M/s320/indian+national+flag.jpg"]this[/URL]. I have designed the flag alright.But I don't know what kinds of animations are possible and how. Could someone please guide me how to add animations … | |
Re: yes I am getting a similar problem with my code too. if i give coordinate line1(1,1,400,400) It gives a straight line but if I give line1(400,400,1,1) It gives a bent line like yours. Why is it happening could any one explain? | |
[CODE]<?php require('class.phpmailer.php'); $mail=new PHPMailer(); $mail->isSMTP(); $mail->SMTPDebug=1; $mail->SMTPAuth=true; $mail->Port=465; $mail->Host="ssl//smtp.gmail.com"; $mail->Host = "ssl://smtp.gmail.com"; $i=0; if(isset($_POST['submit'])) { $mail->Username=check($_POST['UserName'],"user id required"); if(filter_var($_POST['UserName'],FILTER_VALIDATE_EMAIL)==false) { show_error("Invalid email address"); } $mail->Username=$_POST['UserName']; $mail->Password=check($_POST['pass'],"password required"); $con=check($_POST['conpass'],"confirm password required"); if($con!=$mail->Password) show_error("Passwords do not match"); $mail->FromName=check($_POST['name']); $_POST['rec']=check($_POST['rec'],"recipient required"); if(filter_var($_POST['rec'],FILTER_VALIDATE_EMAIL)==false) { show_error("Invalid email address"); } $_POST['recn']=check($_POST['recn']); $mail->AddAddress($_POST['rec'],$_POST['recn']); $mail->Subject=$_POST['sub']; $mail->Body =$_POST['body'];$i=0; if … | |
[CODE] <?php require('class.phpmailer.php'); $mail=new PHPMailer(); $mail->isSMTP(); $mail->SMTPDebug=1; $mail->SMTPAuth=true; $mail->Port=465; $mail->Host="ssl//smtp.gmail.com"; $mail->Host = "ssl://smtp.gmail.com"; if(isset($_GET['submit'])) { $mail->Username=check($_GET['UserName'],"user id required"); if(filter_var($_GET['UserName'],FILTER_VALIDATE_EMAIL)==false) { show_error("Invalid email address"); } $mail->Username=$_GET['UserName']; $mail->Password=check($_GET['pass'],"password required"); $con=check($_GET['conpass'],"confirm password required"); if($con!=$mail->Password) show_error("Passwords do not match"); $mail->FromName=check($_GET['name']); $_GET['rec']=check($_GET['rec'],"recipient required"); if(filter_var($_GET['rec'],FILTER_VALIDATE_EMAIL)==false) { show_error("Invalid email address"); } $_GET['recn']=check($_GET['recn']); $mail->AddAddress($_GET['rec'],$_GET['recn']); $mail->Subject=$_GET['sub']; $mail->Body =$_GET['body']; if … ![]() | |
[CODE][ {"source": "app/assistants/stage-assistant.js"}, { "scenes": "first" , "source": "app/assistants/first-assistant.js" } ][/CODE] [20111217-21:54:46.317499] info: =========> Calling palmInitFramework506, /usr/palm/frameworks/mojo/mojo.js:142 [20111217-21:54:46.638557] info: Requested submission : 506 [20111217-21:54:46.640486] info: Current locale is en_us [20111217-21:54:46.892087] info: sending event 'mojo-event-activate' targeting element 'undefined#<no id>' [20111217-21:54:46.893487] info: sending event 'mojo-window-activate' targeting element 'undefined#<no id>' [20111217-21:54:46.936206] error: Uncaught … | |
I am completely new to PHP. I would like to know which are the good online resources where I can learn PHP. What are the basic things in PHP one needs to know? | |
[CODE] <?php //email(to,subject,message,headers,parameters) $to="swissknife@gmail.com>"; $subject="Hi"; $message="Hello my friend"; $from="swissknife007@gmail.com"; $headers="from:".$from; mail($to,$subject,$message,$headers); echo" mail sent"; ?>[/CODE] This is a very simple php script to send an email. However ,it is not working for me and I am getting the error. [CODE] Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" … | |
I have been trying to send email for 2 days. using php I have tried different methods but to no avail . I am sure I am making some small mistake. Please can someone give step by step procedure of sending mail using Xampp? | |
[CODE]<?php $time1=time(); $time2=$time1+5; echo $time2-time()."Current time<br>"; setcookie("user","Abhi",$time2); // ECHO "<html> // <body> // <form action='cookie2.php' method='get'> // <input type='Submit'> sybmit // </form> // </body> // </html> // "; ?> <?php while(isset($_COOKIE["user"])) { echo "hi ".$_COOKIE["user"]; echo time()."Current time if<br>"; } if(!isset($_COOKIE["user"])) { echo "hello"; echo time()."Current time else<br>"; } ?>[/CODE] … ![]() | |
HTML FILE IS: [CODE] <html> <body bgcolor="yellow" text="red" > <form method="get" action="cookie6.php"> <p>Which car you want to buy?<P> <TABLE border=2> <TR><TD><input type="checkbox" value ="15" name="text[]"><TD>Ferrari<TD bgcolor="blue" width="15px"> 15million</td></TR> <TR><TD><input type="checkbox" value ="35" name="text[]"><TD>Mercedes<TD bgcolor="red"width="15px"> 35million</td></TR> <TR><TD><input type="checkbox" value ="50" name="text[]"><TD>Bugatti<TD bgcolor="yellow"width="15px">50million</td></TR> </TABLE> <input type="hidden" value="1" name="check" > <p> <input type="submit" … | |
[CODE] <?php echo date("Y/m/d") . "<br />"; echo date("Y.m.d") . "<br />"; echo date("Y:->m:->d")."<br>"; echo("hello") ."<br/>"; $app5=5; echo($app5); $baby="going"; echo("$baby i love to "); //echo ($baby$app5); if($app5==5) echo "dance"."<br>"; echo strlen("dance"); echo strpos("dance","h"); switch($ab=1) { case 1: echo 1; case 2: echo 2; default : echo "default"; } $a = … | |
Can please someone give and explain the algorithm and logic of checking if a given tree is a complete binary tree. Fields available for a node are left and right child and info. Thanks. | |
[CODE]void quick(int a[],int m,int n) { int k,key,i,j; if(m < n) { k=(m+n)/2; swap(a[m],a[k]); key=a[m]; i=m+1; j=n; while(i<=j) { while((i<=n)&&(a[i]<=key)) i++; while((j>=m)&&(a[i]>key)) j--; if(i<j) swap(a[i],a[j]); } swap(a[m],a[j]); quick(a,m,j-1); quick(a,j+1,n); } }[/CODE] I am getting a segmentation problem in swap(a[m].a[k]); Please explain. | |
[CODE]#include<stdio.h> #include<conio.h> struct bnode{ struct bnode *child[5]; int count; int value[5]; }; typedef struct bnode node; node * root=NULL; void insert(int val); int put(int,node*,int *,node**); void fillnode(int ,node *,node*,int); int search(int,node *,int *); void insert(int val) { int i,flag; node * c,*n; flag=put(val,root,&i,&c); if(flag) { n=(node*)malloc(sizeof(node)); n->count=1;//setting count 1 n->value[1]=i;//setting … | |
What are the settings I require so I can debug line -by line? Or else ,I can identify lines of code where run time errors are occuring.. I want to view exact line number of error in this code/[CODE]#include<stdio.h> #include<conio.h> #include<string.h> struct node {struct node * left,*right; int freq; char … | |
Can anyone give me starting ideas about creating B-Tree? For example,how to define a node structure in a B-tree? | |
[CODE]#define max 50 struct code{int bits[max];int start;};typedef struct code code; struct node{int freq;int father;int isleft;};typedef struct node node; void insert(int,int); int del(int); main() { code cd,code1[max]; node node1[max*2-1]; int i,k,n,p,p1,p2,root,rootnodes; char symb,alph[max]; for(i=0;i<max;i++) alph[i]=' '; rootnodes=0; scanf("%d",&n); for(i=0;i<n;i++) { scanf("%s""%d",&symb,&node1[i].freq); insert(rootnodes,i); alph[i]=symb; } for(p=n;p<2*n-1;n++) { p1=del(rootnodes); p2=del(rootnodes); node1[p1].father=p; node1[p1].isleft=1; node1[p2].father=p; … | |
[CODE] #include<stdio.h> #include<conio.h> #include<stdlib.h> struct node {struct node * left; struct node * right; int info; }; typedef struct node node; node * root=NULL,*loc,*par,*save,*child; int item; void pre(node *); void in(node *); void post(node *); void find() { node * ptr; loc=root; par=NULL; if(root==NULL) { loc=NULL; par=NULL; return; } if(root->info==item) … | |
[CODE]#include<stdio.h> #include<conio.h> ins(int tree[15],int n,int item) {int ptr,par=0; printf("\nitem here is%d \t\n",item); n=n+1; ptr=n; while(ptr>1) {par=ptr/2; if(item<=tree[par]) {tree[ptr]=item;return;} tree[ptr]=tree[par]; ptr=par; } tree[1]=item; return; } del(int tree[15] ,int n,int item) {int last,right,left,ptr=0; item=tree[1]; last=tree[n]; ptr=1;left=2;right=3; while(right<=n) { if(last>=tree[ptr]) { tree[ptr]=last; return; } if(tree[right]<=tree[left]) { tree[ptr]=tree[left];ptr=left;} else{tree[ptr]=tree[right];ptr=right;} left=2*ptr;right=left+1; } if(left==n&&last<tree[left]) {ptr=left; } … | |
[CODE] #include<stdio.h> #include<conio.h> void hello() { printf("\nHELLO\n"); } int main() { hello(); hello(); hello(); hello(); getch(); return 0; } [/CODE] If I run this code on a compiler,how many processes and how many threads will be running on the compiler and which ones? Does a duplicate function call consist another … |
The End.