43,549 Solved Topics
Remove Filter ![]() | |
[CODE]// // Media.h define the class cell // #ifndef MEDIA_H #define MEDIA_H #include<vector> #include<string> using namespace std; class Media { private: // media name string name; // the density vector vector<double> density; // the capacity vector vector<double> cp; // the thermal conductivity vector vector<double> thermalConductivity; // the viscorsity vector vector<double> … Software Development c++ | |
Hi friends, I'm retrieving some information from a input file with 10 columns and I need to get the first 3 columns and set into 3 different variables and the last 7 in the same variable. I was using "ifstream" and ">>" like: [CODE]myfile >> stringA; myfile >> stringB;[/CODE] ... … Software Development c++ | |
Hello. This java app I'm developing on NetBeans 7. When i run the project, line 4 below: [code=java]FileReader input = new FileReader("projects");[/code] is not executed and apparently stops execution. Only when debuggin the file or running step by step are the next lines executed. No execution past line 4, except … Software Development ide java java-netbeans | |
hey, I promise i'm getting there!! so my code now seems to be emptying the structures as they are passed between the functions, any thought on how to fix it? also if anyone knows of any good examples of passing by reference, that could apply to this code that would … Software Development c++ | |
I have tried to get this program to work with no luck. How do you properly use the nested selection structure? (sorry for the lack of braces, I tried getting rid of some for less confusion. Didn't think it would work but thought I might as well try :D). I'm … | |
Hi guys, What does the [B]owner[/B] in [B]show[/B] method do and how does it work. Thanks in advance. [CODE]FORM.Show([Modal], [Owner])[/CODE] Software Development visual-basic | |
Hello, Are we allowed to assign different values to just one variable? For example, gender = [Female, female, fEmale] so if one a user enters any of the specified ones then he/she will be taken to the next step/level. I'm just doing a tute at the moment and coming up … Software Development java | |
Hey guys I basically finished reading Beginning Visual C++ 2010 with Ivor Horton, I skipped the MFC part as I am more interested in the Win API which there's was only one third of a chapter on(not enough) and I was wondering if Programming Windows, Fifth Edition by Charles Petzold … Software Development api c c# c++ windows-api | |
Hi all! After surfing the web I ended up here as I could not find a good answer! I am writing an application with c++ and gtkmm. I want to access the network card and listen on all ports for packages. As far as I have found out it is … Software Development c++ | |
I have been learning PHP MVC pattern and it is pretty cool. have almost finished app and I can see how mess you can make a code without good design. Now can MCV be applied to C++ apps? Where does Plugin manager/Plugins go if that is even possible?In model or … Software Development c++ software-architecture | |
[CODE] if (fileScan.hasNext(posPattern)) { posCB = fileScan.nextInt() + 1; for (int i = posCB; i > 0; i--) { String writeByte = fileScan.next(); BufferedWriter out = new BufferedWriter(new FileWriter("E:\\dataReadable.txt")); out.write(writeByte); out.close(); }//for } [/CODE] Using a for loop, how would I write to the file without clearing the contents, so … Software Development java | |
How can we calculate whether a number is a power of 2 or not in a single statement without using a loop? All the ones that I can think of use loops or don't satisfy the condition. for eg. The use of XOR doesn't work as it gives incorrect input. … Software Development c motherboards-cpu-ram | |
Hi, I was given this class member function that overloads the == operator. I don't understand it. Please could you help me understand it? Here is the class [CODE]class Word { public: // constructor Word(const string& word); // overloads is-equal-to (or equivalence) operator - this is very useful for testing, … Software Development c++ | |
If you put a zero number between the entering numbers, it should stop and calculate the average just of entered numbers. Why it doesn't work? [CODE]static void Main(string[] args) { double num = 0, counter = 0; for (int i = 1; i <= 10; i++) { Console.Write("Enter the number:"); … Software Development | |
[CODE]class Test{ static String str[]; public static void main(String args[]){ System.out.println("args "+args); System.out.println("str "+str); } }[/CODE] [U]Output[/U] args [Ljava.lang.String;@3e25a5 str null My doubt is ... How some object address is printing for args when it has not initialise. In case it has got initilised ,without array size specifiction how its … Software Development java | |
I have a textbox control for which I want to fit twelve double spaced lines of text so that the textbox is optimally filled (as little whitespace at the end as possible). So far the best I have come up with is [code] Dim fh As Integer = txtCategories.Height \ … Software Development vb.net | |
Process p = Runtime.getRuntime().exec("C:\\tc\\bin\\" + prog_name , null); BufferedReader stdError = new BufferedReader(new InputStreamReader(p.getInputStream())); System.out.println("Here is the standard op :\n"); s1=stdError.readLine(); i have this code can anyone tell me how to run c program using java thanks ! Software Development java | |
How to create report in core java | |
Hey everyone, Just curious why my little program doesn't go through the if-statement I specified in it. [code] public static void main (String args[]){ Scanner sc = new Scanner(System.in); System.out.println("Enter a value for girls:"); int GIRLS = sc.nextInt(); System.out.println("Enter a value for boys:"); int BOYS = sc.nextInt(); if (BOYS == … Software Development java | |
hi all I want to ask what wrong with my code. It gives me error : MySqlException unhandled Incorrect datetime value: '08/03/2011 00:00:00' for column 'Date' at row 1 the code is below: private void btnsave_Click(object sender, EventArgs e) { Thread.CurrentThread.CurrentCulture = new CultureInfo("", false); DateTime datedt = Convert.ToDateTime(tbdate.Text); Decimal … Software Development | |
I'm using VS 2010 and I always get multiple error messages: '<<': no operator found which takes a left-hand operand of type 'std::string' (or there is no acceptable conversion). I get that for lines 36 and 52. Then I get "Intellisense: no operator "<<" matches these operands for lines 36 … Software Development c++ file-stream open-source | |
how todesign automatic grading system online using java i want to create one web application which creates online grading system for the students. which displays their grades,marks and ranking ... Software Development java | |
hello all suppose I have fill a datagridview (named it mydgv) ,Can I populate a dataset with the data from the content of mydgv ? if yes how thank you denny Software Development dataset | |
Is there Linux functions equivalent to Windows functions [CODE] mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0); mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0); SetCursorPos(x,y); [/CODE] Specifically Ubuntu, GNOME. I tried to search on google, but did not find anything useful. | |
I have two lists: list1 and list2 listing a set of files. For each file in list1 if a corresponding file exists in list2, I want the script to print the columns of common files. EX: list1............data1 1aw7_AB.fit => 1 2 3 1bjw_AB.fit => 9 4 7 1biq_AB.fit => 8 … Software Development perl | |
Basically, I want to create a countdown timer. Which isn't hard. It's all over the web. BUT I would like to know how and what I would need for, when the timer reaches zero, the code commands a relay to close, allowing voltage to flow to something. Also, presetting the … Software Development c++ | |
Hello, I have this huge problem. I'm supposed to make a LISP interpreter in C++ but I have absolutely no idea what the programm should look like. So far I have a parser, which splits input string into the list of smaller strings (words, brackets). Could anyone give me a … Software Development c++ | |
Hello! Do anyone know optimal solution for [B]roman numerals to 100[/B]? I made a program just for numerals to 10, but I have no idea how to solve it to 100 optimally cuz if statements are not a very good solution. [CODE]static void Main(string[] args) { int number; bool checkValue; … Software Development ![]() | |
Hi. I wrote a calculator that calculates the given expression (eg, 2 +3 +4-3-1), it works only if you type expression and press ctrl-d, what i have to do to display the result after pressing enter Here's the code: [code] #include <stdio.h> int main() { printf("give expression \n"); char expression; … Software Development c | |
I am so stuck, I lost 2 days trying to figure this out and here I am! I have an online cart selling subscriptions and I want to offer customers the ability to subscribe and choose their own payment schedule by paying monthly, quarterly or annually. Further, I want to … Software Development | |
I am following this [URL="http://www.boost.org/doc/libs/1_37_0/libs/serialization/doc/index.html"]example [/URL]to serialize an object with boost. However, I keep getting the same compile error: error C2248: 'boost::scoped_ptr<T>::scoped_ptr' : cannot access private member declared in class 'boost::scoped_ptr<T>' Any idea why? [CODE]// Console2.cpp : Defines the entry point for the console application. #pragma once #include "stdafx.h" #include … | |
Regular Expression (RE) They can be used with string operations. Using this, we specify the rules for the set of possible strings that we want to match (Searching for patterns in another string). Note : its finds FIRST instance of that pattern We can also use REs to modify a … | |
I am using visual basic 6. I need to update my database table which i created for the form. I am using ADobc database. How can i update the database by using the coding? Software Development visual-basic | |
Hi, In my main wpf Window I instantiate a new wpf window at a click of a button, that collects a bunch of data. This data is stored in a class object (see below). Now when I try to pass this class to a backgroundworker I get the well-known “The … Software Development | |
Hello everyone, I have a book called "Java Genesis" and it has some files such as packages, projects and hints to enhance learning. So, I have set up a file structure in Eclipse and it shows that there are errors and warnings. When I tried running a Java Application using … Software Development java | |
Is there a way to read Adobe PDF files with Python? | |
How would I increment Date with a value from a database. Example: Date + Database Field value (random values) (08/01/2011 + 5 = 08/06/2011) Thanks in advance. Software Development vb.net | |
Say I have a list of lists as follows (which I do): [CODE][['Value1', 'Value2', 'Value3'], ['Value1', 'Value2', 'Value3'], ['Value1', 'Value2', 'Value3'], ['Value1', 'Value2', 'Value3']][/CODE] What I want to accomplish is if in any list Value1 & Value2 equal the Value1 & Value2 of any other list, I want to merge … Software Development python | |
Hi friends, I'm having a problem to write a file and read the same file in sequence. The file size is 4 GB. I tried fstream for both and as second option ofstream and ifstream. I'm reading just the first 2 lines of the file. If I read those in … Software Development c++ file-system | |
I have a file pointer which was assigned in main. In the main, I just open a file to write stuff to it. I want to pass the file pointer to several functions so that they can write to the file. In the fucntion declaration I just add: somefunc(FILE *file) … Software Development c file-system | |
Hello! :) i need to make something that change the image inside a picturebox every 1000 milisec for a 6 pictures (for example), so i search about a function that can hold the code for this time and i found Thread.Sleep(1000) (after use the "using.Threading" ofcourse) so i put that … Software Development | |
Hi everyone, I trying to figure out how to execute commands stored in string, let's say i have string called "command" and a textbox, so i want vb to run command that i typed in textbox, e.g. i type in textbox "label1.text = "bla bla"", and then type like "msgbox.show". … Software Development vb.net | |
Hello I've made a program using JCreator. It was working fine and all of a sudden it won't run anymore. I get this message: [CODE] --------------------Configuration: <Default>-------------------- Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: … Software Development client-server java | |
This code compiles but refuses to run. NONE of the cout statements appear, as if the program is in an infinite loop except that its not. [CODE]#include "matrixOpsLibrary.h" #include <iostream> using namespace MattsMatrixSpace; using std::cout; using std::endl; Mat pattern( unsigned K ){ cout<<"5"; Mat alpha; //this becomes our A variable … Software Development c++ | |
Hello people..!!:) I'm a beginner in c++.. I made a program today which worked well when I ran it 2-3 times.. But now when I try to run it,nothing happens... All I see is a black screen which disappears in a second.. What to do..??:?: Please help me asap as … Software Development c++ | |
I want to have the ability to rerun the following from the very beginning, however, I have only been able to get it to rerun from the middle of the program where it asks for sales tax. I've tried moving my do/while tags around to everywhere but nothing seems to … | |
Hello, I need to create a code for formatting a file that I receive from Bloomberg, and has a line break at the end of each line. See below. (I have hundreds of paragraphs like this) [I] Italy’s debt is forecast to rise to 120 percent of gross domestic product … Software Development visual-basic | |
Hey guys I am trying to use Microsoft.VisualStudio.Data.Services namespace in my project, and I look everywhere to find this namespace but no luck. I was wondering if anyone can tell me where I can go to include Microsoft.VisualStudio.Data.Services in my project. Thanks Software Development vb.net visual-studio | |
Hi, I have blank in this type of question. Suppose i have an 100 records in my sql database. i am creating 100 files for each records (100 records) in 10 min. Now I want to create 200 files in same 10 minutes. Means double files in same time. how … Software Development | |
I have created a simple gui using a windows form, which consists of some checkboxes, radiobuttons and textboxes. I also have my logic code which consists of several switch case statement and I want to know how to put my logic code into the gui I have created. Does anyone … Software Development c++ gui visual-studio |
The End.