199,112 Archived Topics
Remove Filter ![]() | |
I created the first package inside the directory C:\test\eugene\scjp containing the following source code: [CODE] package com.test.eugene.scjp; public class SuperClass { private String name; public SuperClass(String name) { this.name = name; } protected String getName() { return name; } } [/CODE] Then I created the second package inside the directory … | |
Can anyone provide a quick solution for INSERT the entire excel sheet into a access database. This is a click button event that just opens a excel sheet in a windows form. What I like to see is some example how to INSERT the same excel data into a access … | |
I think I'm semi-close to a solution, but it's just not happening for me. I'm having trouble populating my dynamically allocated multidimensional array with data from a text file. Here's what I have: [CODE]#include <stdio.h> #include <stdlib.h> #define MAXLINELEN 18 FILE *getOpen(); int main() { FILE *inFile; // Declares inFile … | |
I am writing an output stored procedure that i access using c#. I am trying to print the output values from the stored procedure. [code] using (SqlConnection connection = new SqlConnection(connectionstring)) { connection.Open(); SqlCommand emailcmdsql; emailcmdsql = new SqlCommand("returnemail", connection); emailcmdsql.CommandType = CommandType.StoredProcedure; SqlParameter paruser = emailcmdsql.Parameters.Add("@user", SqlDbType.VarChar); paruser.Value = … | |
Hi, I have tried to send email through python code the code is - import smtplib from email.MIMEText import MIMEText #try: s = smtplib.SMTP() s.connect('') # I have given server name of email s.sendmail("","","test") # i have given from user and send user print "Succesfull" s.quit() #except: # print "Error … | |
//help me i dont know what wrong with list function [code] #include <stdio.h> #define MAX 10 struct book{ char title[81]; char author[71]; char category[31]; }; int main() { struct book library[MAX]; int menu(void); struct book add(void); int list(struct book,int); int choice, count = 0; do { choice = menu(); switch( … | |
I want to invisible a imgbutton in repeater when username not admin.So here my code Check username function : [CODE]Protected Sub CheckUS(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.RepeaterItemEventArgs) Dim Check As String = Session("UserName").ToString Dim Img As ImageButton = New ImageButton Img = DirectCast(e.Item.FindControl("DltImg"), ImageButton) If Check = "admin" … | |
Okay I've been working with printf for a while on C and I have been trying to use some of the backslash commands such as: \b = backspace \r = moves the cursor to the beginning of the line For some reason they don't seem to work on xCode. 1. … | |
//when I delete root node from bst the below code is showing segmentation fault,Please tell where should I change the code [CODE] void BinarySearchTree::remove(char* d) { //Locate the element bool found = false; if(isEmpty()) { cout<<" This Tree is empty! "<<endl; return; } tree_node* curr; tree_node* parent; curr = root; … | |
Hi All, I can't understand why I am getting The following error message: check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 1 I've poured through my code and I can't find a solution to the issue. Any suggestions … | |
I have a great download script I have been using from: [url]http://www.zubrag.com/scripts/download.php[/url]. It uses the following headers: [code=php] header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Type: $mtype"); header("Content-Disposition: attachment; filename=\"$asfname\""); header("Content-Transfer-Encoding: binary"); header("Content-Length: " . $fsize); [/code] My goal is to call this php … | |
[CODE]# include <stdio.h> # include <stdlib.h> # include <string.h> # include <conio.h> typedef struct{ int a[99]; }number; const int max = 99; int main () { number array; int j; int count = 0; for ( j= 1; j <=max; j++ ){ count = count +1 ; array.a[j] = count; … | |
I would like to retrieve the value of whats stored in a currenlty selected row in my datagrid and store it in a string. 1. Is this possible? 2. If so how might I go about doing it myDataGrid.Rows.Cell[0].etc.etc doesn't seem to work and it is all I could find … | |
I am working on my first scrolling game. I am pretty new to game programming in general, but have so far successfully made a couple very simple games. (Pong, etc.) I am using Dev-C++ and the Allegro library for this game. It's basically going to be a cat that runs … | |
Can someone please suggest me a psuedo code to extract sub problems from an arithmetic expression: For example, How do I remove (8*2) and (3+2) from a given string (5 + 6(3+2) - 2(8*2) +1) Input string will always start and end with paranthesis and the sub problems must be extracted … | |
Recently I've been looking into BSTRs, and have found how 'touchy' they can be. I saw this in a COM class in the class destructor regarding a m_strBStr member... [CODE] if(m_strBStr) SysFreeString(m_strBStr); [/CODE] When I saw it I thought, "How would the BSTR have a zero assigned to it?", because … | |
Your assignment is to modify the program so that the aimless walker stumbles around in a 2-dimensional grid, such as the streets of Manhattan. Your program should prompt the user to enter the number of rows and columns in the 2-d grid. Again, have the walker start in the middle … | |
I need to write a program that draws the next iteration if a koch snowflake, when a button is clicked. It begins with a equilateral triangle. The program uses an ArrayList, Polygon, and GeneralPath, as I found these imports in the starter code. I think I may also be supposed … | |
Hello i am watching some tutorials on [URL="http://www.3dbuzz.com/vbforum/sv_showvideo.php?v=27"]3d Buzz[/URL] and intro to C++ starts by saying that [CODE] #include <iostream> main () { std::cout << "hello world!" << std::endl ; } [/CODE] should show a CMD like window saying Hello World! On the video they try it and it works … | |
Hi guys having a single problem with some code. The program is statically linked to another which is suppose to take an input from a text file into an array; and then return a pointer to the array to the main program. The text file contains 10 ints one per … | |
[CODE]#include<iostream> using namespace std; class point{ private: double x,y; public: double getX(); double getY(); void set(double c, double d); }; class polygon{ private: string color; public: void setc(string color1){ color = color1; } void print(){ cout<<color; } string getColor(){ return color; } }; class triangle: public polygon{ private: point v1,v2,v3; … | |
I am setting up a program that will read multiple lines of data from an input file. I am able to get it to read the first line (there are 6 lines of data) but I can not get it to loop. Also I am unable to get the floor … | |
i have a problem with using the parallel port to output signal to control devices or to receive data . i know that winxp restrict access to the port, so i downloaded the inpout32.dll and i put it in the system32 folder then i used the inport ,outport functions but … | |
HI there, I have written a simple form that inserts a new record when none exists and updates an existing record when one does. It uses ASP.net and C#. The insert statement works fine, but the update statement does not work at all, though no error is returned. Any help … | |
Hi all, I have a simple mathematical series that I need to expand fully and I am not sure what the most efficient way is of achieving this. I know I can write a for-loop quite simply to do this but I don't know if a solution already exists in … | |
Hey I am pretty new to c++ and algorithmic , so please try explaining me what to do or give me a code for example don't redirect me to a site that already made a library for this because you only wasted your time telling me that. For example i … | |
[code] // This is My Client TCP program in C++ // Program Name client.cpp #include <winsock2.h> #include <iostream.h> #include <windows.h> #include <iomanip> char szServerIPAddr[ 20 ] = "192.168.5.251" ; // IP address of my Server int nServerPort = 5000 ; // The server port that will be used by clients … | |
I'm trying to make a button to open a new form in a Win32 Forms App. Lets say the form I'm opening is called Form2 and the button is called button1. Any help will be greatly appreciated. | |
[code] import javax.swing.JFrame; public class Demographics { public static void main(String[] args) { JFrame frame= new JFrame("Survey"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); frame.getContentPane().add(new DemographicsPanel()); frame.pack(); frame.setVisible(true); } } [/code] [code] import java.awt.*; import javax.swing.*; public class DemographicsPanel extends JPanel { public DemographicsPanel() { this.setLayout (new BorderLayout()); //Panel 1 (North) JPanel panel1 = new JPanel(); … | |
Hi all, I'm busy coding up some classes now and I was wondering if there is any danger in using a variable name twice, if the variable is limited to local scope. For instance, let's say I have the following piece of code: [CODE] class Foo { void function1( double … | |
Hello, I am taking a VB.net class and am having trouble seeing the difference between event driven and object oriented programming. This will not help on any assignments, I have already turned it in, but I do not understand why VB6 is considered event driven and .NET is object oriented. … | |
I want a certain subroutine to run if the user clicks the red close button in the top corner of the form. Is there a subroutine similar to Form_Load() when the form is opened that will do this for me? Thanks in advance | |
Hey guys im having a little problem with this project im working on basically im making a desktop image uploader for this site [url]http://www.noelshack.com/api.php[/url] i have tried hacking around with some example code but cant get anything working i cant even check if the images are uploaded correctly because when … | |
Can anyone help me tweek my code. This program is supposed to get the day number 1 through 365 from the user and display the corresponding month and day. I'm getting so many errors I don't know how to start or really decipher the error in C++. Here is my … | |
Helo all: I have two dataGridViews on a form and id like to be able to extend the multiSelect property across both if them. i.e. Id like to be able to hold down the ctrl key and click in dgv A AND dgv B and for them to hold those … | |
I'm trying to overload the << operator for a class (easy, right? :P) However, I get the linker error: undefined reference to `operator<<(std::ostream&, particle const&)' Which my understanding means the compiler can't find the implementation for operator<<. I'm not sure whats going on here, since I've already implemented the function. … | |
[CODE]//Converter //Thursday 25 2010 7:16pm #include <stdio.h> #include <stdlib.h> int main () { int i; char buffer [33]; printf ("Enter a number: "); scanf ("%d",&i); itoa (i,buffer,10); printf ("decimal: %s\n",buffer); itoa (i,buffer,2); printf ("binary: %s\n",buffer); system("pause"); return 0; }[/CODE] | |
I am trying to send mail with attachment after using browse button. in this process some error shows [CODE]Warning: move_uploaded_file() [function.move-uploaded-file]: open_basedir restriction in effect. File(/tmp/php_upload/phpLc37tw) is not within the allowed path(s): [/CODE] thsese are code for my mail file [CODE]$filename=$_FILES["strresume"]["name"]; $filetype=$_FILES["strresume"]["type"]; $filesize=$_FILES["strresume"]["size"]; $filetemp=$_FILES["strresume"]["tmp_name"]; $fp = fopen($filetemp, "rb"); $file = … | |
Can I get some link or reference how to pass strings between two .exe's through their resources? In C++ of course. | |
Ok, I am trying to to make a double-click action when you click on a cell or row, within a dataGridView. The end goal is to have the single click select the whole row so that when you double-click any cell in the row it will load that row into … | |
I am having no trouble playing a swf file in VB but how can a play a second SWF file AFTER the first has finished? How do I know when the first file is done playing? Tried 'isplaying' method in a while loop but can't get it to work. Thanks … | |
Hi there I am very new in useing jsp but here is my first problem. I registered a bean in the applicationContext.xml with the id myBean. Now I want to call a function like this ${myBean.myFct} but the function does not exist and it should not. In PHP there exists … | |
Hello, I created a dynamic list in Dreamweaver CE4. It pulls info from my database just fine. Prblem is when I click to edit one of the entries the next page (the form page it creates on its own) is blank. I have searched the help files but cant find … | |
hi guys, just wanna ask how could i pass the value of a certain variable coming from one frame into another frame having that the frames are both present in one webpage only?? thanks thanks..^_^ | |
I wrote a query yesterday and it ran fine. Today i inserted a new record and it has broken my query. Can anyone help me figure out why? Query: [CODE] WITH temp_orgChart (KitID, PartID, Quantity, iteration) AS ( SELECT KitID, PartID, Quantity, 0 FROM ItemParts WHERE KitID = 200185 UNION … | |
Hi guys, I'm really new to graphics and im trying to pick it up but struggling with a few points. Can someone provide some code on how i can set where a graphics shape should be created/spawn? eg like (32, 11) 32 pixels on the horizontal axis and 11 pixels … | |
Hello All, I am getting concurrent modification exception while I have only a single main thread running.I am not sure why I am getting this exception.I tried to put final keyword before the iterator in the abpve code snippet and also tried to synchronize access to the lists but nothing … | |
Hello. What I have to do is: Take the first half of the input, and output it backwards. Length of the input is 10 or less. Examples: 123456789 - entered by user; 54321 - result. abcde - entered by user; cba - result. The catch is, that I can only … | |
Hi, I'm trying to set a double-value, but somehow it does not take my statements. This is what I got: [CODE] public double getDouble() { return aDoubleValue; } public double getAnothertDouble() { return aDoubleValue2; } public void myMethod(MagicObject a) /* Some magic */ //Here lies the problem: (FX is a … | |
I want to set the value to <td><div class='urg5'>High</div></td> in JTSL. [CODE]I tried <c:set var="ack" value="<div class='urg5'>High</div>"/> <c:out value="${ack}"/> Page source of the JSP web page is <div class='urg5'>High</div></td> i.e. special characters appear. instead of <div class='urg5'>High</div>[/CODE] |
The End.