Hey guys this is my first time using this site. Im having trouble creating a grading scale that averages out grades. Whenever I enter the grades in from the console I get some odd answers that make no sense. Can someone give me some pointers in the right direction? public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter Final Exam average"); int Fexam = input.nextInt(); System.out.println("Enter Midterm average"); int Midterm = input.nextInt(); System.out.println("Enter Quiz average"); int Quiz = input.nextInt(); System.out.println("Enter Homework Average"); int HW = input.nextInt(); System.out.println("Class Average"); int CA = input.nextInt(); double Final = (Fexam / …

Member Avatar
Member Avatar
+0 forum 2

Hello, I would like to develop a sprite editor. Therefore I have programmed a software like paint. As you can see on the picture, on the right, there is a canvas with a grid on it. I use a GridBagLayout to manage every widgets inside my window. The canvas is represented by a JLabel which is inside a JLayeredPane. I have set the size of the JPanel with setPreferredSize. It works well with my screen resolution because there is enough space to display the canvas. However on smaller screen, it doesn't show up. Any idea on how to adapt the …

Member Avatar
Member Avatar
+0 forum 1

i have 3 table i inner join with 3 table and add function but now getting error please help me how to solve the the problem please help me ERROR :Msg 8120, Level 16, State 1, Line 1 Column 'TBL_pur_inv.invno' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause. TABLE 1: TBL_pur_inv as pr (purinvid,slno,pdcgst,cgstamt,pdsgst,sgstamt,pdigst,igstamt,TaxableAmt totaltaxamt) TABLE 2: tbl_party_ldg AS p (partyID,prtynm,prtgst,prtpan) TABLE 3: TBL_pur_invdet AS prd (purinvid,purinvdt,invno,invdt,partyIDpur,invamt) What I have tried: select p.prtgst,p.prtynm,pr.invno,pr.invamt,PR.purinvdt,prd.pdcgst,sum(prd.totaltaxamt)As Rate,sum(prd.TaxableAmt)As Taxable_Amount from TBL_pur_inv as pr INNER JOIN tbl_party_ldg AS p ON pr.partyIDpur = …

Member Avatar
Member Avatar
+0 forum 2

I feel hard to understand how the LayoutManager work even the GUI is quite simple. I trying to make the button place below the Tel No JTextField, but it placed beside Address JTextField , not below TelNo JTextField. package gui; import java.awt.BorderLayout; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import javax.swing.Box; import javax.swing.BoxLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.SpringLayout; import javax.swing.SwingUtilities; public class OrderPage extends JPanel { public static void main(String[] args) { OrderPage order = new OrderPage(); order.createAndShowGUI(); JFrame frame = new JFrame(); frame = new JFrame(); frame.setTitle("Details"); frame.getContentPane().add(order); frame.pack(); frame.setLocationRelativeTo(null); frame.setVisible(true); } public …

Member Avatar
Member Avatar
+0 forum 7

How to the excel data please help me In the original excel sheet data show column wise. But now I want to same change to data showing structure and re arrange the data structure. I can't upload the excel sheet that for i attached the IMG please help me https://ibb.co/jdzC4m I mean my original data is column "A" to "K" and row 1 is heading row 2 to 5 is data I want set data as per column "B" to "F" and row 7 is heading and row 8 to 22 is data I want do it using formula I …

Member Avatar
Member Avatar
+0 forum 3

Hi guys, I just got into a little problem.I just deployed an application with backend db access.It works fine on major OSs being used like win7 and XP. But some functionality related to the database doesn't work properly when deployed on win8. I used a code to delete temp table if it exists.This feature completely works on the other OSs.But i don't know why the code is not working on the later OS. Any thought to solve the problem? Public Sub DroptempProject() On Error GoTo ErrorHandler Dim str As String str = "DROP TABLE ptempTable" ExecSQL(str) 'Exit Sub ErrorHandler: If …

Member Avatar
Member Avatar
+0 forum 5

Hi, I have the following XML file (it is a TCX file) <?xml version="1.0"?> <TrainingCenterDatabase xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.garmin.com/xmlschemas/TrainingCenterDatabase/v2"> <Activities> <Activity Sport="Biking"> <Id>..</Id> <Lap StartTime=".."> <TotalTimeSeconds>..</TotalTimeSeconds> <DistanceMeters>..</DistanceMeters> <MaximumSpeed>..</MaximumSpeed> <Calories>..</Calories> <Intensity>Active</Intensity> <Cadence>75</Cadence> <TriggerMethod>Manual</TriggerMethod> <Track> <Trackpoint> <Time>2017-12-16T12:43:10Z</Time> <DistanceMeters>0</DistanceMeters> <Cadence>1</Cadence> <Extensions> <TPX xmlns="http://www.garmin.com/xmlschemas/ActivityExtension/v2"> <Speed>0</Speed> <Watts>1</Watts> <Slope>-1.49</Slope> </TPX> </Extensions> </Trackpoint> . . . . I want to add the following to each <Trackpoint> tag: <AltitudeMeters>..</AltitudeMeters> <Position> <LatitudeDegrees>..</LatitudeDegrees> <LongitudeDegrees>..</LongitudeDegrees> </Position> Using the attached xsl sheet. When I run the file with PHP only the identity template is being invoked and not the second template. I think it may be due to namespace but have no idea …

Member Avatar
Member Avatar
+0 forum 1

Inside of a class template having parameter `typename T` the compiler generates an error concerning 2 functions. `T` does not seem to be recongnized as the template class parameter it was declared as. template <class Return, class ...Args> void executeOnAll(Return (T::*function) (Args &&...), Args &&...args) { for(T &s : *this) (s.*function) (std::forward<Args>(args)...); } template <class Return, class ...Args> void executeOnAll(Return (T::*function) (Args &&...) const, Args &&...args) const { for(const T &s : *this) (s.*function) (std::forward<Args>(args)...); } As my array class has many other member functions, this error is specific to the 2 above. Error Output: c:\appprojects\js3d\source\jscommon\msvc\../jarray.h(244) : error C2825: 'T': …

Member Avatar
Member Avatar
+0 forum 2

[CODE] #include <stdio.h> #include <stdlib.h> typedef struct filedata { char data[100]; }data_t; data_t * fname=NULL; //IS AN ARRAY OF the structure filedata REQUIRED HERE void quit() { printf("\nPress enter to exit"); fflush(stdin); getchar(); } int main() { char ch; fname=(data_t *)malloc(sizeof(data_t)); FILE *fptr=NULL; atexit(quit); printf("Please enter the file name to read : "); fflush(stdin); scanf("%s",fname->data); fptr=fopen(fname->data,"rb"); if(fptr == NULL) { perror("Could not open the file "); return; } printf("\n+++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n"); printf("Contents of the file %s are : ",fname->data); [B] while(fread(&fname, sizeof(data_t), 1,fptr) == 1) { // what do I put here? }[/B] fclose(fptr); return 0; } [/CODE] I want to read …

Member Avatar
Member Avatar
+0 forum 11

What are Similarities and differences, written in concise form? Thanks!

Member Avatar
Member Avatar
+0 forum 9

Hi, I got a project to load a pdf into a picturebox in vb6. How do I handle that? Is there anyone who sell that .ocx? is there anyway to do it? Thanks

Member Avatar
Member Avatar
+0 forum 12

hi. i have a really basic question (really new to python). how do i read an entire binary file? from https://www.devdungeon.com/content/working-binary-data-python , `data = binary_file.read()` is to read the whole file at once. so i have a .dng file to test, which is 16.2mb, and i did: with open("portrait1.dng", "rb") as binary_file: #Read the whole file at once data = binary_file.read() #Return the hexadecimal representation of the binary data, byte instance hexa = binascii.hexlify(data) with open("readprotrait1.raw", "wb") as write_file: write_file.write(hexa) im using a hex editor to see if the data from .dng gets copied to the .raw file but only …

Member Avatar
Member Avatar
+0 forum 2

The End.