199,114 Archived Topics
Remove Filter ![]() | |
1. [code] #include<stdio.h> int main() { int function(int); int t=function(1); printf("\tt=%d",t); t=function(2); printf("\tt=%d",t); t=function(3); printf("\tt=%d",t); return 0; } int function (int a) { int t; t = a<<2 + a; return t; } [/code] the output is t=8 t=32 t=96 i am not able to figure out why this is … | |
Hello I have just started learning programming & this problem is really stumping me. I have to do a syracuse sequence (explained below) & I know my code below is very wrong, (it needs to use for statements in there) but can you give me any advice on what to … | |
I have a clarification, with my project I added a dataset ,is having dataset [xsd] file name- DataSet1 and datatable table name -datatable1, also it's having the fields "id,item" with my form I have coding Dim ds As New DataSet1 Dim t As DataTable = ds.Tables.Add("datatable2") t.Columns.Add("id", Type.GetType("System.Int32")) t.Columns.Add("Item", Type.GetType("System.String")) … | |
Hi, I have a site which lists the basic information of CDs and allows the user to click a link to see detailed information regarding each CD. I've been doing that for a long time by just putting the detailed information in a DIV and using a script to toggle … | |
Hi everyone, I am working on one application in which i am using many checkboxes for many records like we use in our mail . Like in our inbox mail folder if we want to delete more than one mail , after checking that mail in checkbox , we click … | |
Hello, I've written couple of overloaded operators in my file containing Set declarations. I want to use these operators within the declaration file. However it seems it isn't used. Instead it uses the standard operators. e.g. i have two overloaded operators say <= and == [code=cpp] bool Set::operator<=(const Set& b) … | |
Please help me in newsletter sending , this my code the problem is the mail is send to single person is going correctly ,if the same mail send to more number of persons getting wrong mail is going but the data display only in first mail ,the other mails getting … | |
Hello and first sorry for my very bad english. i have little knowledge about c and c++ but im trying to learn win32 programming with c++. its little hard and im very new at that. im trying to do very very simple thing: i have an main window, 1 button, … ![]() | |
Hi I am using eclipse.I got error.I am using g++ complier. *.o : file not recognized: File format not recognized collect2: ld returned 1 exit status Please any one help me..[B][/B] | |
Does anyone know how I can display a list of (let's say) 5 members that have visited my profile page recently? Shouldn't be too hard, should it? Let's try to find a solution, since I believe more users might be interested in such a feature. Thanks guys, navi | |
Hello, I am trying to store a single MYSQL result into a 2 dimensional array, for example I would like to end up with something like this: array[0][0] = result[0] , array[0][1] = result[1] , array[0][2] = result[2] ..... Here is my code: [code] $tempCat = array(); for ($i=0;$i<$numcat;$i++) { … | |
Hello everyone, please i need your help very urgently. I am working on a data management application and am using the data control and the standard report system. The following is an example of data collected. Name Age Birthday ( Day/Month) , Gender Samuel 23 2/5 Male John 22 3/5 … | |
hi guys, i have a pocket pc application where i scan some barcodes, i want to stop scanning when i open a new form. do you have any ideas how to stop it? | |
Please can someone help me out on an issue that I ma having with delphi. Aim is to read an INI file then take certain values only and display them under listbox or memo. Lets say for an example my ini files looks like this [setup] Device = Sector= [set] … | |
i was wondering if it would be possible to use a timer in pascal. like for instance you have 10 seconds to answer a question. iv been thinking and i cant figure out how to do it. does anyone know how? | |
hi guys,, i've this homework that i have to submit tomorrow.. and unluckily I didn't know how to do it.. it says : Write a program that outputs "Al Eid Song" words.. "The five days of Al Eid" Use a [B]switch statement [/B]to display the following output for the 5 … | |
I wrote a program which will send a message to multiple clients(i.e, broadcasting) that are connected to a server.Once when the client receives a message from the server ,the client should read a file in the server and display it in the client.The client which responds (i.e, client wants all … | |
my program won't even run so i must have missed something drastically but i don't see it.... anyway, Create a class called Factor that has a public method called calculateFactor. The method has two two arguments of type integer and checks whether the smaller of the two integers is a … | |
Hey i want to ask that,suppose in HTML table cell...I insert Hyperlink....Is that possible to write the code for that hyperlink...Cz if the iamges are static,HTML table is better option than Gridview,I thk so???? | |
Hi all, I am calculating DOG of two images using the following fragment shader. But I am not getting expected result. I have googled a lot but am not able to figure out my mistake here. uniform sampler2D blurImage; uniform sampler2D moreBlurImage; void main() { float blurGray = texture2D(blurImage,gl_TexCoord[0].xy).r; float … | |
All questions involve this portion of a program: [CODE] if (y>x and y<z)or(y<x and y>z): print("You have entered Condition 1") elif not(x!=y and y!=z): print ("You have entered Condition 2") else: print ("You have entered Condition 3")[/CODE] 1. If x = 10 and y = 10, what is the value … | |
Write a program that reads in an array of type int. Provide facility to either read this array from the key board or from a file, at the user's option. If the user chooses file input, the program should request a file name. You may assume that there are fewer … | |
hi, I am using sql server 2000, but the following error will be occured on open a connection. Pls give solution for this error An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that … | |
Im having a problem with the while loop in my code, if I change what X2 is being compared to to anything other than 0 it doesnt hit the while loop, I am hoping its just some weird mistake. Thanks in advance for any help. [CODE] X2 = 0.5; while … | |
[CODE]public abstract class CircleShape { public double radius; public CircleShape(){} public CircleShape(double radius) { this.radius=radius; } public void setradius(double radius){ this.radius=radius; } public String toString() { return "radius"+ radius; } abstract String getDisplayText(); } [/CODE] [CODE]public class circle extends CircleShape{ private double area; public double area() { return radius*radius*3.14; } … | |
I am going to make OS. And I need help with GUI...how to make an GUI ?...I am not on Windows so CreateWindowEx() doesn't exist. | |
Hi All, I am just learning Java and there is a concept that I cannot grasp. I am writing a simple exercise program that works with stacks. I have a sum method for two different types - Integer and Double. They both have the same logic, so it seems redundant … | |
Hello all, I'm trying to make a simple text box with SDL, I have loosely based it off of [URL="http://lazyfoo.net/SDL_tutorials/lesson23/index.php"]The Lazy Foo Tutorial on sting input[/URL], but this code doesn't seem to work... [CODE]if(event.type==SDL_MOUSEBUTTONDOWN){ if(isIn(event.button.x,event.button.y)){ hasFocus=true; } else { hasFocus=false; } } if(event.type==SDL_KEYDOWN){ if(hasFocus){ if(event.key.keysym.sym!=SDLK_BACKSPACE){ str+=(char)(event.key.keysym.unicode); } else { if(str.length()!=0){ … | |
I am designing a system which will broadcast a message to all the nodes in a cluster.And the receiving node should send a feed back to the broadcasting node.When i get a single feedback from any of the receiving node, the broadcasting node should stop receiving the feedback.With that feedback … | |
![]() | Hello all, This is my first post but i have lurked around the forums for a while (sans account) my problem is thusly: I have written a program to take information from a data file, copying values to a vector, allow the user to add/delete and print form this vector … ![]() |
please i was wondering if anyone could help me with my code, i feel its kinda too long and a good program should be as brief as possible... please would be very grateful. appreciated, cheers.. [CODE=cplusplus]int _tmain(int argc, _TCHAR* argv[]) { string Username; string Password; int terminator = 0, terminate … | |
Hi, all I am trying to write the function to get rid of my punctuations. My code: [CODE] //_word_list is the vector<string> type void TextUtil::isnotpuct() const { for(size_t i=0; i<_word_list.size(); i++) { size_t len = _word_list[i].length() + 1; for(size_t j=0; j< len;j++) { if(ispunct(_word_list[i][j])) { _word_list[i] = ""; } j++; … | |
I am having some trouble getting this code to work and I dont know what I missing, any help is greatly appreciated. I have a simple 9 question survey using asp.net, I am using an asp:formview with InsertItemTemplate. In the form I have a radiobuttonlist with yes no values, I … | |
Write a program that reads in an array of type int. Provide facility to either read this array from keyboard or from a file, at the user’s option. The output for the file input option should be stored in a file while the output for the keyboard input option should … | |
Greetings people. I've just recently discovered PHP, and have just created my first dynamic PHP-document, which fills a table with data from my SQL db. It works quite well, but what I'd like is to have hyperlinks in one of the three columns (header), pointing towards whatever adress posted from … | |
Hello, I am attempting to create a program that accomplishes the following: *I am to develop a heap, that is tree-based(not array) *The heap should be ascending *Include the method toss() -This method will randomly toss a node into the heap and will not maintain the proper heap conditions *Include … | |
Hi i am sorry to bother you with such a simple issue. Currently I am familar with using datagrids and displaying data from my tables that way. However i want to be able to display things like for intance products are on amazon/ebay. For example my database contains products name, … | |
![]() | this relates to _nestors problem but im trying to expand it on my own i have this code: [code=python] logfile = open("logfile.txt", "r").readlines() KEYWORDS = ['test', 'text'] counterline = [] counter = 0 for line in logfile: for word in line.split(): counter+=1 if word in KEYWORDS: counterline.append(counter) print word print … |
Is there any way to mix visual c++ with normal c++? like can i enable mixed code? i want to get rid of this error: 1>tab.h(32) : error C4368: cannot define 'p' as a member of managed 'Monitor4vc::tab': mixed types are not supported | |
Hi, I want my my input, just numberic allowed. if user key in alphabet, error message will show up. How can i do that?! Please help! Thanks | |
[code=html] <html> <head> <script type="text/javascript"> function validateFloat() { var o = document.frmInput.txtInput; switch (isFloat(o.value)) { case true: alert(o.value + " is an float") break; case false: alert(o.value + " is not an float") } } </script> </head> <body> <form name="frmInput"> Enter something: <input name="txtInput" size="4"> <input type="button" value="Validate" onclick="validateFloat()"></input> </form> … | |
Aelphaeis here with another little problem. In the Code below I attempted to make a generic function which read a line up to a newline character and then returned the string. The program reads as follows [CODE] #include <stdlib.h> #include <stdio.h> #include <strings.h> int getstring(char *string,int max); int main(int argc,char … | |
I have been give the salary and hra of manager,supervisors and workers. Now i want to take the name,address,ph no ,designation from user . then take that name address and ph no along with the default calculated salry,hra from first form to be displayed on second form. So that a … | |
Hi, i wondered if any1 knew how to create a simple bar or pie chart in asp.net. I would like to show how much space users have used e.g. 25/100mb represented graphically and showing percentages Thanks for help | |
I am designing a page containing a gridview that takes the data from a dataSource the data are evaluation questions (20 questions) and the answers are degree of five represented by radiobuttons I added the radio buttons to the gridview as template item [B]Like this :[/B] <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" … | |
Hello, This is my first time using forum to ask around for some assistance. I will make it briefly. [code] void main() { char *StringPtr; //pointer of char char String[26]; //array of chars strcpy(String, "abcdefghijklmnopqrstuvxyz"); if((StringPtr = new char[26]) == NULL) cerr << "\n\a allocation failed" << endl; else cout … | |
hi. I have a jlist on a frame. I want to add items dynamically in the list. So, I am using DefaultListModel..Here's my code: [CODE]public class AdminFrame extends javax.swing.JFrame { private Statement S; private ResultSet R; DefaultListModel model = new DefaultListModel(); JList Employee_list = new JList(model); /** Creates new form … | |
Hi, I would like to set variables from session variables. Like this: [CODE=php] $fname=$_SESSION['fname']; $lname=$_SESSION['lname']; $email=$_SESSION['email']; $month=$_SESSION['month']; $day=$_SESSION['day']; $year=$_SESSION['year']; $city=$_SESSION['city']; $state=$_SESSION['state']; $uname=$_SESSION['uname']; $pass=$_SESSION['pass']; $encpass=$_SESSION['encpass'];[/CODE] I think this is triggering the following error: Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised … | |
hello all this is my first topic here actually i am taking this semester a programming language concepts course i have problems with some subjects that i can't understand hope to get some benefit form u :) so one of them are converting from BNF to EBNF thnx in advance | |
i have a file path shown below i intend to display file only; C:\Users\densman\Documents\ImageUploader\[B][COLOR="red"]Chickens1.jpg[/COLOR][/B] is there a way to display [B][COLOR="red"]chickens1.jpg[/COLOR][/B instead of all the path?? Thanks |
The End.