I'm making a student system with console based java. I'm trying to load a text file's content to an ArrayList and later on search with a student registration number and list down his/her name and program. I'm having a hard time loading the text file contents in an ArrayList so that I can retrieve them later on as objects. I have made a search function that works perfectly on an Arraylist (Since when entering a new record I am putting them in ArrayList and they can be searched until the program is not shut) **This is the approach I am …

Member Avatar
Member Avatar
+0 forum 3

I'm actually astonished at the amount of time i spent trying to fix this and got absolutely nowhere in the end. I have the following app.config file i'm trying to read: [CODE] <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="BattleCity.Configuration" type="BattleCity.Configuration.GameConfiguration, BattleCity"/> </configSections> <BattleCity.Configuration> <environment> <add blockType="Test1"/> <add blockType="Test2"/> </environment> </BattleCity.Configuration> </configuration> [/CODE] And here is the code for it: GameConfiguration.cs [CODE] #region Using Directives using System; using System.Configuration; #endregion namespace BattleCity.Configuration { public class GameConfiguration : ConfigurationSection { #region Public Members /// <summary> /// Retrieves an instance of the <see cref="GameConfiguration"/> with the /// values populated from the App.config …

Member Avatar
Member Avatar
+0 forum 3

Hi all..i have some trouble to insert data into 2 table.. i use asp.net with C# language..this is my table : DOCUMENT id_document name description VERSI Id_versi Id_document url_file size type modifiedon relationship of document and versi is one to many.. this is my code, but i cant store anything.. can u help me to correct my code, please?? [code] protected void Button_Upload_Click(object sender, EventArgs e) { try { DMSDataAccess db = new DMSDataAccess(); DOCUMENT doc = new DOCUMENT(); VERSI versi = new VERSI(); doc.name = TextBox_Form_Judul.Text; doc.description = TextBox_Form_Deskripsi.Text; db.DMSDataContext.DOCUMENTs.InsertOnSubmit(doc); db.DMSDataContext.SubmitChanges(); if (FileUpload1.HasFile) { string strFileName = FileUpload1.FileName.ToString(); string …

Member Avatar
Member Avatar
+0 forum 3

Hello Forum, Why would Flash work in IE 9 but not in IE 11? That is, why would Adobe Flash work with Microsoft Internet Explorer Version 9 and not work with Microsoft Internet Explorer Version 11? I am using a small flash object in the index page of www.gelsana.com. It appears on one computer using IE 9 but not on another computer using IE 11. I first thought it might be an issue with a virus, but I ran a couple of anti-virus programs and I still have the issue on the computer using IE 11. Any advice? What I …

Member Avatar
Member Avatar
+0 forum 4

hello, I am trying to record video by aviwriter class in aforge but the resulting avi file is either 0Kb or the whole video is viewing only one picture using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using AForge.Video; using AForge.Video.DirectShow; using AForge.Video.FFMPEG; using AForge.Video.VFW; using System.IO; namespace WindowsFormsApplication12 { public partial class Form1 : Form { private FilterInfoCollection videocapturedevices; private VideoCaptureDevice finalvideo; public Form1() { InitializeComponent(); } private void pictureBox1_Click(object sender, EventArgs e) { } private void Form1_Load(object sender, EventArgs e) { videocapturedevices = new FilterInfoCollection(FilterCategory.VideoInputDevice); foreach (FilterInfo VideoCaptureDevice in videocapturedevices) …

Member Avatar
Member Avatar
+0 forum 3

heya again guys - sorry for asking for help once again, but i think once i have my head round this, i'll sort myself out pretty well *python noob* :?: the prac is to add an option to change the price of a listed item in a catalog - this ive completed with no probs at all. But we also have to read & write to an external txt file - for whatever reason, i cant get this to work. It keeps wiping out my txt file (obviously im screwing up the write code somewhere????) anyway - the code with …

Member Avatar
Member Avatar
+0 forum 7

Hi All, I have this code in my tableView; - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { YFRFormViewController *formViewController = [[YFRFormViewController alloc] init]; NSArray *campaigns = [[YFRCampaigns currentCampaigns] allCampaigns]; YFRCampaignForm *selectedCampaign = campaigns[indexPath.row]; // Give formViewController a pointer to the item object in row formViewController.campaignForm = selectedCampaign; // Push it onto the top of the navigation controller's stack [self.navigationController pushViewController:formViewController animated:YES]; } In the "campaigns" array are objects from classes that have extended YFRCampaignForm. When I select one I want it to bring up the view data for that object. At the moment it is being put in a YFRCampaignForm. I assume …

Member Avatar
+0 forum 0

i'm taking the image from the user, and displaying it using label. Now i have to use that image for further processing. my code is: from Tkinter import Tk, Frame, BOTH from Tkinter import * import cv2 from collections import * from CBIR import * from experiment import * from scipy.spatial import distance import Tkinter,tkFileDialog from PIL import Image, ImageTk class Example(Frame): def __init__(self, parent): Frame.__init__(self, parent) self.parent = parent self.initUI() def initUI(self): self.parent.title("PISE") self.pack(fill=BOTH, expand=1) def query(): path=tkFileDialog.askopenfilename(filetypes=[("Image File",'.jpg')]) im = Image.open(path) tkimage = ImageTk.PhotoImage(im) myvar=Label(root,image = tkimage) myvar.image = tkimage myvar.pack() myvar.place(x = 850, y = 5) custName.set(path) …

Member Avatar
Member Avatar
+0 forum 2

I've attached below my codes. I'm stumped. The funny thing is, I think I can make this work with a vector instead of the arrayListType class. I cannot figure out how to load the objects into the array. I create an arrayListType object of type extPersonType, call it addressBookType, and make its size 500. So I should have an array that is capable of holding 500 extPersonType objects. I want to load each element of the array with an extPersonType object using the default constructor. I could then iterate through the array a second time to set the first name, …

Member Avatar
Member Avatar
+0 forum 1

Hello everyone I have preloaded the sounds in javascript array and then make audio object and pass the src from the array and this is working perfetly fine on local system but when we upload on server it says HTTP Error 404.3 - Not Found. How i can add Mime Type so the server know that this is audio file. Here is the link i find that have web.config file ( http://www.localwisdom.com/blog/2011/10/iis-7-web-config-change-for-html5-and-css3-mime-types/ ) but the problem is that when i add the mime types in web config file from above URL it will not load the CSS , Images , …

Member Avatar
+0 forum 0

Write a program in Java to create an applet which take radius of a circle as input and find the area of a circle and draw the circle. Java Code: // Java Document import java.applet.Applet; import java.awt.Color; import java.awt.Event; import java.awt.TextField; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.geom.Ellipse2D; class Circle extends Applet { TextField text1; public void init() { text1 = new TextField(8); add(text1); text1.setText(null); } public void paint(Graphics g) { Graphics2D g2 = (Graphics2D) g; g2.drawString("Enter the radius of circle : ", 10, 2); int r; r = Integer.parseInt(text1.getText()); double radius = Math.PI * r * r; g2.setColor(Color.blue); g2.drawString("The area …

Member Avatar
Member Avatar
+0 forum 8

Any sequence of python strings can be disguised to look like a file opened for reading, which can then be passed on the fly to functions expecting such an input file. This code snippet defines the necessary adapter class. The obtained file-like objects store only one string of the sequence at a time (which limits some file operations, seek() doesn't work backwards for example). This code was inspired by the standard library's StringIO module. Please note that when memory or disk access is not an issue, it may be more efficient to write a temporary file than to use this …

Member Avatar
Member Avatar
+2 forum 3

The End.