55 Topics

Member Avatar for
Member Avatar for JohnMcPherson

Hello, I work at the U.S. Department of Labor. I am a maintenance prorgrammer of C code, and the configuration management of this code in the past has been very spotty. When I took over this project, a CM tool was in place I have been doing corret checkins and …

Member Avatar for JohnMcPherson
1
311
Member Avatar for James19142

To begin with, I'm a noob to JavaScript. How do I add functionality to the main loop, or something similar?

Member Avatar for AleMonteiro
0
289
Member Avatar for EarhawkPH

Hi! Newbie on Java. I'm doing this assignment for a cash register program. Our professor just explained what we're gonna do and stuff. Here's what i understood: 1.)Sales report (my code appears on the first diag box) Product ID Product Name Quantity Price 2 Stuff 100 3 Stuff 100 4 …

Member Avatar for stultuske
0
359
Member Avatar for RHNation

def main(): print ('Welcome to the mpg calculator program') print() #get the miles driven using the input function miles_driven = input ("Please enter miles driven: ") miles_driven = float (miles_driven) #get the gallons used using the input function gallons_used = input ("Please enter gallons used: ") galons_used = float (gallons_used) …

Member Avatar for farmwife
0
296
Member Avatar for hamidali
Member Avatar for milkman93

Hey Everyone, I want to instantiate an ArrayList in java. I realize the method to doing this is: ArrayList<String> determiners = new ArrayList <String>(); determiners.add("A"); Where "A" is added to the arraylist once created. However, the problem I'm having is that the .add method doesn't work unless in a main …

Member Avatar for milkman93
0
2K
Member Avatar for buckeyemike

when you write code in the main function if you put functions in the file all you do is nameoffunction(); to call it. now my question is this lets say you have a menu in a class. call it bank. in the main to call that function . ive tried …

Member Avatar for mike_2000_17
0
212
Member Avatar for ms061210

Hello.Please anyone help me with this code. I tried to look in every forum but nothing gives the right answer. Promblem is: **R cannot be resolved to a variable** . Here is my java code: package com.example.twittersearch; import java.util.Arrays; import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; import android.os.Bundle; import android.view.LayoutInflater; import …

Member Avatar for CimmerianX
0
682
Member Avatar for kbondarchuk

public static int f (int []a, int []b,int []c) { final int N=a.length; int j, k=0, g=0, t=0 ; for(int i=0;i<N;i++) { for (j=0;j<N;j++) if (b[j]==a[i]) break; if (j==N) { c[t]=a[i]; if (g==0 || c[t]>k) { k=c[t]; g=1; } t++; } } return k;

Member Avatar for JamesCherrill
0
209
Member Avatar for nathaniscool99

Hello, I have been given a class diagram where a variable called light_years must be a const int and stored in the space class, but later on that value must be used in the main file. Below is the space class class space { private: static const int LIGHT_YEARS; public: …

Member Avatar for deceptikon
0
265
Member Avatar for kedxu

I have two classes: (1) **Class A**, which extends JApplet, implements Runnable + some Listener stuff (2) **Class B**, which has a main method and is not an applet My question is, how do I create **class A** with **class B**'s main method? Is this even possible? What I'm doing …

Member Avatar for kedxu
0
243
Member Avatar for phfilly

Hi! I would just like to know is there a way you can overwrite the main.c file in the kernel folder(dir /usr/src/kernel/main.c) in MINIX 3. I want to change some code in the file(I know the risks involved) but the problem is I can't save it. I've tried logging in …

Member Avatar for phfilly
0
228
Member Avatar for 111100/11000

#include <iostream> #include <string> #include <cmath> using namespace std; //global varibals: char entered_characters[9999]; int direction_of_rotor1; int direction_of_rotor2; char alphabet_of_rotor1[26]; char alphabet_of_rotor2[26]; char rotor1_backward(char Letter); char rotor1_forward(char Letter); char rotor2_backward(char Letter2); char rotor2_forward(char Letter2); char print(char print_char); int main() { cout << "This is enigma machine:" << endl; cout << "*NOTE:This …

Member Avatar for WaltP
0
213
Member Avatar for rahul pareek

When i declare array in c before main method it gives, an error. Declaration is char a[65000]; main() {} and another declaration in other file char a[63000]; main() {} has no error what is the reason.

Member Avatar for rithish
0
212
Member Avatar for gosensgo87

**Hello i am a noob when it comes to java so sorry if its obvious but the code below is giving me a error when i try to compile it, the error is: Exception in thread "main" java.lang.Error: Unresolved compilation problem: at goodcalculator.main(goodcalculator.java:127). Can anyone help me? ** CODE: import …

Member Avatar for JamesCherrill
0
302
Member Avatar for rahul.ch

Two doubts: 1. Placing run() inside main() generates "illegal start of expression error"? So why can't run() be placed inside main()? 2.With the above code I am getting the output as A C D B. Why B comes last is because of join(). But what I'm unable to understand is …

Member Avatar for rahul.ch
-1
224
Member Avatar for Patiodude

I'm very new to C++; can a program be started with anything other than `int main`? And what, exactly, is the purpose of the `main` part, anyway?

Member Avatar for VernonDozier
0
170
Member Avatar for rtellez700

Hello I am running into an error after creating the jar file. I get a message stating that the main class to my program could not be found when in fact there is a main class. If someone could give me a hand and lead me in the right direction …

Member Avatar for NormR1
0
1K
Member Avatar for _Brooksy

** Having trouble running this code as the compiler keeps having issues with the method 'public void mannipulate()', I'm new to java so forgive my ignorance, but I've been trying to rearrange everything in every which way to please this thing and its just not turning out right. I'm sure …

Member Avatar for JamesCherrill
0
305
Member Avatar for Kitt3nkat

I am trying to create a 2d table that asks for user input to create table size, adds all the numbers across each row, and creates the next row by multiplying by the first row. Here's what I have and it's now giving me an "Exception in thread "main" java.lang.NullPointerException" …

Member Avatar for NormR1
0
875
Member Avatar for c.pentasuglia

So i have a jar of a project that i was working on, and i want to use it as a library in another project (resource adapter). I have brought it into the libraries folder, and used an import. I basically want to be able to call that whole project …

Member Avatar for c.pentasuglia
0
292
Member Avatar for helpsie

To make it short and sweet, here it is. Looking to do a simple screenshot on the client-side (and if anyone would be so kind, point me in the direction to create an automated upload of the screen to a server. ++ if you can provide a tip on doing …

Member Avatar for helpsie
0
885
Member Avatar for ThomsonGB

I am trying to parse main(argc, argv[]); and i need to look at individual characters with in the strings pointed to by *argv[]. I though of a string as an array of chars. This builds fine but causes an error in execution. So what is a simple and straight forward …

Member Avatar for ThomsonGB
0
1K
Member Avatar for Ntropy

Hello there java gang. I've written a program which basically checks the dates that i have written for the program in question and then validates it against a set of rules, using arrays to ensure that what a user enters is valid. So for example, you can have 1,(day) 5,(month), …

Member Avatar for JamesCherrill
0
235
Member Avatar for corby
Member Avatar for Narue
0
142
Member Avatar for effBlam

Im having a main function issue. My program is a text analyzer of more than several lines and then input 'END' to stop taking input. It analyzes input text based on the chosen options 1 through 2, relooping for invalid choice. Im having an issue having it properly work in …

Member Avatar for Greeky
0
223
Member Avatar for effBlam

I am making a program that analyzes text from a user After inputting several line and using the keyword "DONE", the program will ask for one of 8 possible options which is the menu() function where the user will enter the number. How would i be able to run my …

Member Avatar for JoshuaBurleson
0
210
Member Avatar for asrockw7

So from what I've been taught, in school and in books, all C programs(I assume C++ too) always have main(). That's very explicitly mentioned. However in my poking around with some relatively large open source projects in hopes of learning something, it isn't as straight forward. What I've encountered was …

Member Avatar for Moschops
0
159
Member Avatar for hackit

i want to make a program that contains two main classes and they call each other. [CODE]class Main1 { public static void main(String arg[]) { for(int i=0;i<5;i++) System.out.println(i); Main2 m1=new Main2(); } } class Main2 { public static void main(String arg[]) { static int j=0; for(int i=0;i<5;i++) System.out.println(i); if(j==3) break; …

Member Avatar for hackit
0
178
Member Avatar for SMITA6076

[B]For the error and my question, skip to the bottom. I just posted all of the code in case it's needed.[/B] [CODE]/*********************************************************************************** * * File: Customer.java * * Author: Austin Smith * * Date: 04/04/2011 * * Description: The Customer class handles all client information * such as name and …

Member Avatar for SMITA6076
0
239

The End.