132,724 Archived Topics

Remove Filter
Member Avatar for
Member Avatar for coiseng

Hi, I'm newbie with C++ and I found an example which I need http://ideone.com/Eikbr4 But I've a question, how do I seperate this piece of code into .h and .cpp.. I tried to do something similar on my own but I'm having struggling with it after multiple try.. I've read …

Software Development algorithm c++
Member Avatar for tinstaafl
0
319
Member Avatar for josephwakiro

STAR WAYS BUSES is a new bus that wants to launch services in city A but to ease its work it needspre-paid tickets.it plans to use zonal pricingsystems as follows; i).ticket price per day between zone 2 and 1 is $2000 ii).ticket price per day betweenzone 3 and 1 is …

Software Development c c# c++
Member Avatar for morad jbilo
0
167
Member Avatar for cppgangster

Hi there, I have a problem in finding where is the mistake in my code.The problem is that I am not getting correct output of printf. As you can see I am derefferencing the pointers pd_f and pd_C in the brackets just before they are multiplied. The problem is removed …

Software Development c++
Member Avatar for mike_2000_17
0
132
Member Avatar for cambalinho

if C++ isn't a real OOPL, what left? with another words i want study(theory\concepts) the real OOPL. can you give me a link with these information?

Software Development c++
Member Avatar for cambalinho
0
390
Member Avatar for skyyadav

How to sort vector<int> v{3,2,7,6,5,8,1,2,3,4,5}; in decreasing order using function object. I did using lambda expression sort(v.begin(),v.end(),[](int a , int b){return a > b;}); But How we do using fn object

Software Development c++
Member Avatar for mike_2000_17
0
276
Member Avatar for kay19

Hello. Just learned about hashmap a week ago. My code can add an Employee's name/id/performance scale based on user input. I allow the user to also remove an employee by allowing user to input name/id to remove. However, when the user prints out sorted last name, the name the user …

Software Development java
Member Avatar for kay19
0
151
Member Avatar for can-mohan

Hi , I am just curious to know that , why i am not able to compile below code if i define access function inside the class. i am able to execute another friend function inside the class. Does it mean class scope is responsible for the execution of other …

Software Development c++
Member Avatar for can-mohan
0
245
Member Avatar for vyalineconstantino

Uhm, so hello! We have this project in our CS course that states that we have to generate our own Bingo Game program, we can use help or we can let a person/people work on it as long as we can understand it. But I chose the latter part of …

Software Development c++
Member Avatar for Moschops
0
2K
Member Avatar for krystosan

if i try to dump from shell like this `python -c 'help("modules")' > ~/Desktop/modules.txt` but if I try to execute from within the python like this `>>os.system("python -c 'help("modules")' > ~/Desktop/modules.txt")` i get error File "<stdin>", line 1 os.system("python -c 'help("modules")' > ~/Desktop/modules.txt") ^ SyntaxError: invalid syntax once i get …

Software Development python
Member Avatar for krystosan
0
204
Member Avatar for skyyadav

int main() { map<string,size_t> count; string word; while(cin >> word) count[word]++; --------(1) for(auto it=count.begin();it!=count.end();++it) cout << it->first << ": "<< it ->second <<endl; I donot understand the code particularly the line (1) Could anyone can explainÉ

Software Development c++
Member Avatar for techofunda
0
214
Member Avatar for PriteshP23

Hello, I have one tar.Z file. I have to run shell script **daily** as it is required to update the database. customer_yyyymmdd_hhmi.tar.Z sales_ yyyymmdd_hhmi.csv (5 MB - 20 MB) purchase_ yyyymmdd_hhmi.xml (650 MB - 950 MB) I have made small part of XML file. There are 4 parts. There is …

Software Development shell-scripting xml
Member Avatar for PriteshP23
0
372
Member Avatar for chdboy

I have this code which saves the value into database from JSpinner SpinnerListModel monthModel = new SpinnerListModel(); String[] monthStrings = {"1Month","3Month","6Month","1Year"}; //get month names monthModel = new SpinnerListModel(monthStrings); JSpinner spinner = new JSpinner(monthModel); statement.setString(28,(String)monthModel.getValue().toString().toUpperCase()); But how to get that value back for Editing? I tried spinner.setText((String)monthModel.getValue(),29); But it says The …

Software Development java
Member Avatar for Seldar
0
519
Member Avatar for dreking6

i recently took up a project on openvpn when i got the source code of an openvpn application written in python by ivanzoid http://code.google.com/p/pyopenvpnman/ but after laying my hands on many things and reshaping the application i couldnt go any further because of some errors detected 1.writing to a config …

0
151
Member Avatar for dreking6

i am working on a project but this parts seems to stall me i want to be able to write to a text file to change just two lines of d file say line 1 and 3 using wxwidgets i will appreciate helps nd suggestions thanks

Software Development python
Member Avatar for dreking6
0
621
Member Avatar for divva

i have to develop a code for coversion of video files from raw format to mp4 in linux os using cpp.... i also have to save the resulting mp4 format... friends can anyone plz help me do this i ll be very thankful to you

Software Development c++
Member Avatar for divva
0
220
Member Avatar for AODfan

Hi all, I am having an issue with getting my Jbuttons and JComboBox alignment properly in the JPanel. I have tried changing the coordinates of the GridLayout around to try to satisfy, but they are working properly. I am trying to get my radio buttons to the far right and …

Software Development java java-swing
Member Avatar for chdboy
0
631
Member Avatar for andrewriebel

Hello, all. The following is a problem I'm currently working on. I can't get it to run like the problem asks. Any help would be greatly appreciated.

Software Development java
Member Avatar for JamesCherrill
0
158
Member Avatar for chdboy

When I click on Button which fetch records from the database it works fine public void fetchrecords() throws SQLException { Statement stmt = null; String query = "select * from Employer where Fileno=1"; try { stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE,ResultSet.CONCUR_UPDATABLE); rs = stmt.executeQuery(query); while (rs.next()) { firstNameTextField.setText(rs.getString(2)); lastNameTextField.setText(rs.getString(3)); addressTextField.setText(rs.getString(4)); //and more records. …

Software Development java java-swing microsoft-access
Member Avatar for chdboy
0
202
Member Avatar for gayzlein

hi all i want a program that allow me to import excel data into access database using vb.net knowing that the excel data contains duplicates and blanks.my table looks like this: Reference quantity unit_cost turnover once the data is imported, I want to perform calculations to calculate the cumulated turnover …

Software Development vb.net
Member Avatar for gayzlein
0
2K
Member Avatar for Jamblaster

I am having a problem getting this code to work in deleting records from a database. The path to the database is correct and I have another couple of event handlers that work fine using this same datbase so I know that the path to the Db is good. Any …

Software Development dataset vb.net
Member Avatar for Jamblaster
0
179
Member Avatar for Phenol

I am a Python (2.75) neophyte and need to reformat a large data file. A sample is below: P1 01 01 1991 100.00 P1 01 01 1992 111.30 P1 01 01 1993 97.58 I1 01 01 1991 0.0 I1 01 01 1992 20.0 I1 01 01 1993 32.4 I need …

Software Development python
Member Avatar for rlvaugh
0
159
Member Avatar for YumnaZia

I dont understand why the image isnt appearing! please help.. import javax.swing.*; import java.awt.*; //import java.awt.event.*; public class level2 extends JFrame{ Container con= getContentPane(); ImageIcon bg= new ImageIcon("D:\\Raptor\\background3.jpg"); JLabel back= new JLabel(bg); level2(){ setDefaultCloseOperation(EXIT_ON_CLOSE); setLayout(null); setSize(1300,700); back.setBounds(0,0,500,500); con.add(back); setVisible(true); } public static void main(String[] args) { new level2(); } }

Software Development image java java-swing
Member Avatar for Seldar
0
102
Member Avatar for can-mohan

Guys, I need to write thread safe singleton class for my assignment. below is the code snippet for factory method in singleton class, I will appreciate if anyone is having suggestion for the same. *MySingleton * MySingleton::GetInstance() { if (m_pOnlyOneInstance == NULL) { pthread_mutex_lock(&mutex); m_pOnlyOneInstance = new MySingleton(); pthread_mutex_unlock(&mutex); } …

Software Development c++ web-design
Member Avatar for mike_2000_17
0
4K
Member Avatar for wakz_1

I have created a linked list and I wish for the user to enter a Station and then the output is the number stored for that station. LinkedList myList = new LinkedList(); myList.addFirst("London", 5); myList.addNode("Manchester ", 10); myList.addNode("Liverpool", 20); myList .addNode("Birmingham", 50); This is the input for the user to …

Software Development java linked-list
Member Avatar for rubberman
0
1K
Member Avatar for krystosan

why this works `> varhelp = __import__("sys")` and this doesn't`> varhelp = __import__("sys.path")` the second one throws: Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named path then how to achieve the second one?

Software Development python
Member Avatar for woooee
0
188
Member Avatar for Mehr Hassan

Hi, I have written a C program in Turbo C to load BITMAP image and now i am trying to send it over serial port. Kindly Help me how to send that image data which i already loaded in memory over serial port using OUTPORTB or BIOSCOM ? [CODE]#include <stdio.h> …

Software Development c data-structure image
Member Avatar for rubberman
0
1K
Member Avatar for AlWreikat

I want to write a C code that reads billions of integers from a text file. Each integer is of length 10 digits (e.g. -2311872000). then I build a linked list to store these integers.how could I do that ?

Software Development c c# c++ linked-list unix
Member Avatar for rubberman
0
535
Member Avatar for haresh.sankarraj

Hi members, This is a program i wanted to implement semaphore between parent and child processes which are trying to access a shared variable called counter ... i dont know why it is not getting incremented during the child process !! someone help please !! #include <stdio.h> #include <sys/types.h> #include …

Software Development c multithreading
Member Avatar for rubberman
0
2K
Member Avatar for fashxfreak

A, B, C, and D are two-dimensional arrays , all of the same size ,and all of type double . I need code fragment that computes D = A + B + C, where each element of D is the sum of the corresponding elements of A, B and C. Also two …

Software Development c c# c++
Member Avatar for rubberman
0
122
Member Avatar for renagadejesus

My teacher is asking this of me, and I am just not following how to do this. All distance learning and not a lot of assistance. any help would be amazing. "For this assignment, you will create a program that records information for a book sale. You will use parallel …

Software Development c++
Member Avatar for Moschops
0
269
Member Avatar for Zahin

Hi everyone, Today i have a question about how can i write one code for all shapes like, 1234 2341 3421 4231 or 55555 55555 45555 34555 23455 12345 Thanks alot.

Software Development c++
Member Avatar for Learner010
0
87
Member Avatar for surya.putra.94849

can someone show me how to make an animation in turbo pascal? i'm a new and i'm stuck in making my first game. especially in the animation of the game.

Software Development gaming pascal
Member Avatar for surya.putra.94849
0
518
Member Avatar for krystosan

I am trying to load the help on each method into a QTextEdit in PyQt4 how can I have this variable hold help on a method, example: `data = os.system('python -c "import sys; help(sys.path)"')` but data value contains `0`

Software Development operating-system python
Member Avatar for krystosan
0
371
Member Avatar for ryanpalma0794
Member Avatar for talat.zaitoun

def matrix(mat, num): for i in mat: for j in i: print(j * num) So I'm trying to make a code that multiplies a matrix by a number, my code above is not working and i think the reason is the for statements could be wrong, so what i tried …

Software Development python
Member Avatar for Schol-R-LEA
0
166
Member Avatar for ticomatik

I am a newbie to C++ . i am trying to , i think, answer this question and i am lost many hours wasted. I think I've broken the problem done correctly. (NOTE WE CANT USE VECTORS OR STRUCTURE (still newbie) ONLY = CLASS< FUNCTIONS ARRAYS) 1)i need to design …

Software Development c++ data-structure
Member Avatar for kal_crazy
0
727
Member Avatar for ARC.1

Write a Java program which adds all numbers that are multiples of either 7 or 9 up to 600. Ensure that numbers like 63 are added only once in the sum. Thanks for help

Software Development java
Member Avatar for Seldar
0
145
Member Avatar for sweetdame22

My assignment is to create a program that asks the user what they want to do: 1-add a member, 2-delete a member, 3-see the arraylist of members, or 4- exit. I have the menu popping up, but I can't get it to go back to the menu after I execute …

Software Development java
Member Avatar for Seldar
0
209
Member Avatar for cambalinho

is there any function(API or something) for get 1ms of precision? i have 1 timer, but i only get 10ms of max.

Software Development api c++
Member Avatar for cambalinho
0
419
Member Avatar for skandh

how to display 256 color bmp files in trubo c++ 3.0??? i ve already displayed a 16 color bitmap in turbo c++... i came across this code but it doesnt work...pls tell me whts the error... [code] #include<iostream.h> #include<graphics.h> #include<fstream.h> #include<conio.h> struct A{ char type[2]; /* Magic identifier */ unsigned …

Software Development c++ ios
Member Avatar for jay.vivarekar
0
2K
Member Avatar for Vasthor

The combine function been bug since yesterday. Been trying everything back then, define in the source file, remove some code to prevent overlapping definition, etc... I don't know what I should do, can anyone help on this? #ifndef SALES_DATA #define SALES_DATA #include <iostream> struct Sales_data { // new members: operations …

Software Development c++
Member Avatar for Schol-R-LEA
0
129
Member Avatar for Daneil

Dim MoveRight As Boolean Dim MoveRight As Boolean Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick PictureBox1.Image = Image.FromFile("C:\Users\Adrian\Documents\but\Butterfly1.gif") Timer2.Enabled = True Timer1.Enabled = False End Sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage End Sub Private Sub …

Software Development vb.net
Member Avatar for EMMAGERALD
0
178
Member Avatar for robert.knighton.79

I'm trying to take input keypress event and move the text it would have typed into a textbox to a different textbox instead. textBox1 has a length limit of 1 so I dont actually have to prevent text going into the box because the textbox is already full I just …

Software Development vb.net
Member Avatar for robert.knighton.79
0
3K
Member Avatar for praom2104

Hello, I am trying to execute a jar file with higher version of jdk. But it fails & the worst part is I am not getting any error message. Jar file compiled verison: jdk 1.5 Executed version: jdk 1.7 I assume the jar file is downward compatible. thoughts pls? Thanks! …

Software Development java
Member Avatar for praom2104
0
279
Member Avatar for Violet_82

Hi all, I wonder if you can help me with this. I am looking at a fairly long (well at least for me) java program, about 700 lines. Basically it's a very very basic simulation of an ATM that can run on a computer. Now, in all the classes I …

Software Development java
Member Avatar for Violet_82
0
167
Member Avatar for wendas

Totally a newbie question.. Sorry. My co-worker & myself are seeing that C# is the prefered language over VB. We would like to change, but right now it is only to make sure we are more marketable as our company is going down the tubes. We cannot go to our …

Software Development c c# c++
Member Avatar for Momerath
0
276
Member Avatar for razree

Hi guys, I'm stucked at (as it seems to me) a very strange problem. I have a listview on my form to which a list of users is populated from mssql db. In the same table but different column I have user_id. I have a textbox and a textbox_keydown control …

Software Development listview mssql vb.net
Member Avatar for razree
0
1K
Member Avatar for suryawanshi

## in these unv file how to read block i.e from -1 to -1 ##

Software Development c#
Member Avatar for ddanbe
0
2K
Member Avatar for rithish

i want to get text from console screen for example System.out.println("hello"); i want to get that "hello" and store it in string how to do that?????

Software Development java
Member Avatar for stultuske
0
179
Member Avatar for Lakshiya

Hi all. I need your help. Iam using vb.net 2010 and sql server 2008. I have problem when retrieve multiple rows from database to datagridview. All rows have the same identification number(patient registration number).I have problem in loop to show the all rows in datagridview. Pleaase anyone knows that help …

Software Development vb.net
Member Avatar for ccccc
0
1K

The End.