43,549 Solved Topics

Remove Filter
Member Avatar for
Member Avatar for nathan.pavlovsky

Hellp programmers! I am working on a program that uses two objects of a custom class template List [which is a linked list, with each item pointing to the next] and concatenates them. Initially, I need to input numbers into my main function, so I have two sets of while …

Software Development c++ linked-list
Member Avatar for nathan.pavlovsky
0
4K
Member Avatar for Atomicquasar

In my python class, we are using python 3.4.1 And we are typing in the programs from the book. Well, I've typed it in correctly and the output still doesn't align the decimal points. Can anyone help? It would be greatly appreciated. Here's the program code: # This program displays …

Software Development python
Member Avatar for Gribouillis
0
336
Member Avatar for Benny_1

I'm new in java, so I'm not very good at it yet and my teacher has stumped me. We are supposed to make a bot for a game called snacktime, which is usually user controlled. # About Snacktime: # * There are a maximum of 16 snacks layed out randomly …

Software Development algorithm java
Member Avatar for Benny_1
0
288
Member Avatar for Wandaga1

import java.util.*; import java.io.*; public class stundentGrade { public static void main(String args [])throws IOException{ BufferedReader dataIn = new BufferedReader(new InputStreamReader(System.in)); int a=0, b=0,c=0,d=0,f=0, totalNumber=0; //declaration of initialization stars(); //method to call and print stars System.out.println("Enter a list of Exam scores from 0-100" ); System.out.println("use a negative number if you'r …

Software Development java
Member Avatar for Taywin
0
246
Member Avatar for PM312

to create unique reference i had below code in **vb6** Dim UNKREFBATCH As String UNKREFBATCH = "B" & Format(Date, "MMDD") & Format(Time, "HHMMSS") but the same is not giving correct result in **vb.net** Dim UNKREFBATCH As String UNKREFBATCH = "B" & Format(Date.Now, "MMDD") & Format(DateTime.Now, "HHMMSS") MsgBox(UNKREFBATCH) instead of minutes …

Software Development vb.net
Member Avatar for Reverend Jim
0
208
Member Avatar for Dean_Grobler

Hi there, I'm in the process of creating a utility program that builds a table in a database and inserts the initial data. I'm getting an error stating: java.sql.SQLException: No suitable Driver found for jdbc.odbc.ContactKeeperDB My Code: [CODE] import java.sql.*; import java.io.*; public class MakeDB { public static void main(String …

Software Development java sql
Member Avatar for jwenting
0
243
Member Avatar for tapananand

Consider the following code: #include<stdio.h> #define msizeof(type) ((char*)(&type) - (char*)(&type - 1)) int main() { int x; printf("%u %u\n", msizeof(x), sizeof(x)); return 0; } The Above code when compiled with g++ compiles just fine and works well without any wanrings, while in gcc it gives the following warning: `integer overflow …

Software Development c++
Member Avatar for vijayan121
0
839
Member Avatar for Anthony_7

This script of mine is storing a blank file with no .html or .py extension on my FTP server, I think it has to do with the fact that I have the file already opened in the later code, any help? Essentially this script is going to let me edit …

Software Development python
Member Avatar for Anthony_7
0
242
Member Avatar for aluhnev

#include "stdafx.h" #include<vector> #include<iostream> using namespace std; int main( int argc, char ** argv ) { // from initializer list (C++11) cout << "vector from initializer list (C++11): " << endl; vector<int> vi1 = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 }; cout << "size: " …

Software Development c++ visual-studio
Member Avatar for sepp2k
0
201
Member Avatar for sneekula

I asked that in another thread, but it got lost: [QUOTE]When do you use root.quit() and when do you use root.destroy() to exit a Tkinter program?[/QUOTE] Also, can you intercept an exit when you use the little x in the title bar, just to affirm that you really want to …

Software Development gui python tkinter
Member Avatar for entropicII
0
45K
Member Avatar for Roisin

Hi, I am trying to get ahead of my course work for next term and teaching myself c#. I am trying to write a pig latin translator as an exercise from the book I am using but it has no answers. I believe I need to use the split and …

Software Development
Member Avatar for rubberman
0
2K
Member Avatar for sunnyshahrukh

how can we use write and read functions in files and why we use these function because i have already get put or cin cout available.

Software Development c c# c++
Member Avatar for NathanOliver
0
83
Member Avatar for strRusty_gal

Hi Everyone, Thanks for viewing this thread. How do I do the code similar in Java? The syntax for the code below is C#. public class Child : Parent { public Child(String a, String b) : base(c) { } } I would like to seek for your help on Java. …

Software Development java
Member Avatar for strRusty_gal
0
238
Member Avatar for moaz.amin.37

i want to place a button on upper left corner of JFrame with GridBagLayout.i write this code but it is notwork correctly gbc.gridx=0; gbc.gridx=0; add(b1,gbc); but the button place on center of JFrame why

Software Development java
Member Avatar for JamesCherrill
0
378
Member Avatar for DawnofanewEra

Hello, Can anyone show me how to set width between character in java. I'm looking for something like this. Items NumOfItems Price A 2 $10 B 1 $5 When I use the for loop to make something like the table above it shows something like this. Items NumOf Items Price …

Software Development java
Member Avatar for DawnofanewEra
0
244
Member Avatar for Yahia Farghaly

Hi there, i was trying to make a program (to do)using list class here is the code #include<iostream> using namespace std; #include<list> #include<string> void display(const list<string>& lsy){ list<string>::const_iterator iter = lsy.cbegin(); int i = 0; while (iter != lsy.end()){ cout <<++i<<"- "<< *iter << endl; ++iter; } } void add(list<string>&ls){ …

Software Development c++
Member Avatar for Yahia Farghaly
0
328
Member Avatar for kimlong008

Hello Everyone ! I have build a c file but it use GNU library, I can not build it to exe file. It error because I don't know use MinGW to build. [Download file](https://sites.google.com/site/datazus09/crunch-3.6.zip). I have install MinGW but I don't know how to run it in my visual studio …

Software Development c file-system visual-studio
Member Avatar for kimlong008
0
313
Member Avatar for moaz.amin.37

hello to all i have problem about button events the problem is that if i handle an event of button and show again a window(result of event) that also has buttons then how to handle events of buttons of second window please help me

Software Development java java-swing
Member Avatar for mKorbel
0
168
Member Avatar for MasterHacker110

I was looking around on the web about robotics programming, especially the Lego mindstorm EV3. I was looking at what programming languages this platform supports. I saw that you can program it in Java ME(understandable as Java is everywhere today) and in C#. I thought that C# was a windows …

Software Development c# java robotics
Member Avatar for MasterHacker110
0
621
Member Avatar for furalise

Hello I am having some trouble with something. As I read the contents of a file into an ifstream object I occassionally want to dump all its contents into a stringstream to analyse it. Example below. The problem I am having is that if I use ifstream.rdbuf() to dumpt the …

Software Development c++ ios
Member Avatar for furalise
0
5K
Member Avatar for nhrnjic6

Is it possible to stop the lets say for loop with a function : for(int i = 0;i<15;i++){ cin >> input; obj.add(input); } // and then have some add or some other function that checks if (x == max_size) check(){ if(counter == max_size) stop the foor loop and continue.. }

Software Development c++
Member Avatar for Xecantur
0
145
Member Avatar for Jjajangmyeon

This is driving me nuts. I'm writing a password program that reads from .txt file into an array of char arrays, and then allows the user to write a new password and then appends it to the end of the list. Everything SEEMS to be working except everytime I run …

Software Development c++
Member Avatar for Jjajangmyeon
0
203
Member Avatar for cambalinho

i'm build a completed new code for properties: #include <iostream> #include <functional> using namespace std; template <typename T> class property { private: T PropertyValue; //i think these is ok, but something seems not std::function<T(void)> getf; std::function<void(T)> setf; public: property() { getf=NULL; setf=NULL; }; property(T value) { PropertyValue=value; }; property(std::function<void(void)> GetFunction=NULL,std::function<T(void)> …

Software Development c c# c++
Member Avatar for cambalinho
0
402
Member Avatar for dsimonovski1

Hey. So I have a flowlayoutpanel populated with custom user controls. Now, after each fifth control I want to have a separation label, pushing the following controls in a new row. That works fine, except the distance between the label and the controls in the new row is way longer …

Software Development vb.net
Member Avatar for dsimonovski1
0
257
Member Avatar for Raik.48

Is making font size bigger or smaller possible in C programs? If yes, what should I do? I am a beginner in C and have been using Turbo-C++ for programming. Thanks.

Software Development c
Member Avatar for Abinaya_3
0
575
Member Avatar for thekilon

I have this code. Its not the entire code because its a Blender addon with many lines that are unrelated to sockets so I give here only the part that deals with the sockets which I kept isolated from the rest of the program. def create_thread(): global threadSocket,listening threadSocket = …

Software Development python socket-programming
Member Avatar for thekilon
0
2K
Member Avatar for cambalinho

i put an image on form with WM_PAINT message. but the image is, only, showed after resize(for example) the form. why is that? did i forget any style\extended style?

Software Development c++
Member Avatar for cambalinho
0
298
Member Avatar for nathan.pavlovsky

Hello programmers! I am working on a custom tree class [with the code example being copied from Dietl's C++ How to Program, 9th edition]. It is in my fashion to copy all the code examples in the book when reading it (for muscle memory), but the authors created a custom …

Software Development c++
Member Avatar for nathan.pavlovsky
0
379
Member Avatar for abaddon2031

Im working on a code that loops through a folder break up the file names in it into specific parts and then reads off sertain parts of the broken name and writes it to a csv sile. The files ser formated as follows test_PAQT_B2H.csv, test_PAQT_B4.csv, and test_PINI_B1H.csv. when it jsut …

Software Development python
Member Avatar for abaddon2031
0
362
Member Avatar for Praise92

Hi guys i need your help, i am trying to read an xmlfile which is on the listbox, after reading it i want to bind the data to GridView, i can read directly from the location where i have saved the XMLfiles but now i want to select it from …

Software Development dataset xml
Member Avatar for tinstaafl
0
262
Member Avatar for jnneson

Hello, Please I want to be a good Programmer atleast be able to do something on my own, I will like to know where to start learning from, Which lang. to learn first, what step should I take? Also I will be glad if I can know someone that can …

Software Development
Member Avatar for AleMonteiro
0
160
Member Avatar for Doogledude123

I am getting a NPE on `a`. I have no idea why the array would be null, but heres the relevent code for it. public void setAbility(Ability[] abilities) { for(Ability a : abilities) { sb.append(a.getName()); } pAbility.setText(sb.toString()); } Method called here: Pokemon sPokemon = Pokemon.getPokemon(sender.getValue()); ... pController.setAbility(sPokemon.getAbility()); Passed getAbility(): public …

Software Development java
Member Avatar for Doogledude123
0
298
Member Avatar for Gurleen_Kaur

In my Windows application, I want to create an automation software using C#.NET which works in two steps: 1. Select particular data and copy it from a page of a website. I have done it using web browser control for SelectAll. The data is not HTML data but databound data. …

Software Development c# microsoft microsoft-office
Member Avatar for du_1
0
321
Member Avatar for mcdczzz

If cboSearchType.Text = "Accredited Month" Then If rs.State = 1 Then rs.Close SQL = "SELECT * FROM BusinessInfo WHERE " & " AccreditationDate " & " like '" & cboMonths.Text & "%'" rs.Open SQL, con While rs.EOF = False With grdSearchResults .Redraw = False .Rows = .Rows +1 .Row = …

Software Development visual-basic
Member Avatar for e.pol
0
146
Member Avatar for thegreymatter

Hi recently while trying to solve a core Java algorithm question I got trapped into a problem. Let me explain the puzzle. > There is a series of numbers. where difference between any consecutive > numbers is either a or b. The 1st number of the series is 0. Our …

Software Development algorithm java puzzle
Member Avatar for JeffGrigg
1
1K
Member Avatar for dumicom

hi guys below is my attempted code, how can i plot date and time(x-axis) versus a value (y-axis) import matplotlib.pyplot as plt from datetime import time, datetime x = [] y = [] t = [] fig = plt.figure() rect = fig.patch rect.set_facecolor('#31312e') readFile = open('data.txt', 'r') sepFile = readFile.read().split('\n') …

Software Development python
Member Avatar for dumicom
0
5K
Member Avatar for brittney_2

I need help with my constructor that should call for all the user inputs, for example their first name, and the information gets checked to make sure it's valid. For example the name is all letters, and the identifier is actually 9 digits, etc. I can set the default constructor, …

Software Development java
Member Avatar for brittney_2
0
239
Member Avatar for PM312

i am trying to import data from excel to datagrid view. why instead of actuel data "System.__ComObject" is displayed in datagrid cell. Dim xl As New excel.Application Dim xlsheet As excel.Worksheet Dim xlwbook As excel.Workbook xlwbook = xl.Workbooks.Open("d:\PayableInput\InvoiceUpload.xlsx") xlsheet = xlwbook.Sheets.Item(1) Dim Rowst As Integer = 0 Dim RN As …

Software Development vb.net
Member Avatar for PM312
0
286
Member Avatar for mark103

Hi all I need your help, I'm working on my python script to fetch the list of channels from the sqlite3 database. I'm fetching 7 channels to set each channel in each label control 4010, 4011, 4012, 4013, 4014, 4015 and 4016. When I fetch the list of channels to …

Software Development python
Member Avatar for woooee
0
2K
Member Avatar for nathan.pavlovsky

Hi programmers! I am trying to grasp the concept of friendship. Let's say that we have the following: class List; //forward declaration class ListNode { friend class List; //make List a friend /* rest of code here, blah, blah, blah. */ } Does this mean that ListNode can access Lists's …

Software Development c++
Member Avatar for nathan.pavlovsky
0
214
Member Avatar for jmay1327

I have a EXGrid in a form and want to add button to a cell that either say "Edit" and "Remove", or Have icons for the two. Here is the code I have so far. With grdGrade .BeginUpdate '.DataSource = objCo.DAL.Connection.Execute(sql) .DefaultItemHeight = 21 .TreeColumnIndex = -1 .MarkSearchColumn = False …

Software Development visual-basic
Member Avatar for jmay1327
0
595
Member Avatar for preetchannay

hello to all..., i am working on a project and there i am facing a problem of adding pictures to a label.In my project its like that.. i have a textfield ,a button and a label. When i write the file name in the textfield and then after clicking on …

Software Development image java
Member Avatar for preetchannay
0
142
Member Avatar for Bradoz

Hello below is my code for a program that reads in integers rom keyboard input and creates two polynomials from that input and then does some maths functions on them. I've got the addition working, having trouble with the multiplication though. Any help would be appreciated. thanks import java.util.*; import …

Software Development java linked-list
Member Avatar for JamesCherrill
0
3K
Member Avatar for Jjajangmyeon

I'm writing a program to parse a user entered string. My textbook does not include the .find() function, but I found it in an old C++ book (Ivor Horton's Beginning C++, the Complete Language) is the .find() considered bad, or depricated? It seems to work really well, but I don't …

Software Development c++
Member Avatar for rubberman
0
343
Member Avatar for Slavi

Apparently JavaFX is getting really into the game now as far as I see and I think its time I start getting to know it .. Just read a couple of articles and a few questions came up in my mind: - Do I need to use IDE (eclipse) for …

Software Development gui ide java java-swing
Member Avatar for Doogledude123
0
290
Member Avatar for Gunjan_1

Hey I am a student and i m performing selection sort in this way. Is it proper way or not? if it is not proper, explain it why with reason. #include<stdio.h> #include<conio.h> void selection(int a[],int n) { int i,j,temp; for(i=0;i<n;i++) { for(j=i+1;j<n;j++) { if(a[i]>a[j]) { temp=a[i]; a[i]=a[j]; a[j]=a[i]; } } …

Software Development c
Member Avatar for ITTechnos
0
129
Member Avatar for ben.juarez.773

I'm trying to prefill webforms in iframes using Requests. If that can't be done, does anyone have a script I can use that works with webbrowser? I like that it calls the default web browser in just about any system, which is great for my Android applications. I've tried using …

Member Avatar for ben.juarez.773
0
318
Member Avatar for JonKho

Dear all, Currently I am facing the problem on getting the resources for getting Tkinter and pygame to work together. Sadly, I do not have any leads til now(Which worries me alot!! :( ) so I hope the people here can point me to the correct direction. So basically I …

Software Development python tkinter
Member Avatar for vegaseat
0
3K
Member Avatar for nathan.pavlovsky

Hello! I was creating a custom array class as an exercise in my exploring of class and function templates. Here's my header file: #include <iostream> template <typename el> class Array { friend std::ostream &operator<<(std::ostream&,const Array&); friend std::istream &operator>>(std::istream&,Array&); public: Array(const int& arraySize=0); //set all members of array with size arraySize …

Software Development c++ ui-ux
Member Avatar for mike_2000_17
0
8K
Member Avatar for ndombko1

Hello I need to add a zero in front of a number if it is 3 or less so that it has 4 digits total. I only need this for row 6 or row 5 to be python specifc. I need this to write to the same csv file. AFI12001 …

Software Development python
Member Avatar for Gribouillis
0
126

The End.