Hey guys. So I'm currently building an app and I'm having a bit of trouble. So I have an Excel file and it reads it and opens it fine(I imported microsoft.office.interops.excel but what I want to know is how to loop through column A and pick out the rows that are equal to "USA Hawaii". And then out of those rows I want it to pick out the rows in column B that say "7". And then out of those rows I want it to pick out the row that says "58". I was going to use and If statement …

Member Avatar
Member Avatar
+0 forum 2

I have a file with ints like this. 1 2 3 4 5 6 How to read first int from file? How to read second int from file? How to skip first line and but rest in 2d array? This is what I have so far. I am not sure how to read 2nd int from file and to put rest in 2d array. Scanner f = new Scanner(new File(fName)); //read first number int num1 = f.nextInt(); //skip first line and put rest in 2d array while(f.hasNextInt()){ a[i++] = f.nextInt(); }

Member Avatar
Member Avatar
+0 forum 2

Part 3 of the taste of Swift explores class objects in Apple's Swift language. A class allows you to group methods (class functions) together that belong together. Class Person groups some information of people working in an office. Class Pay inherits class Person and adds pay information. Class File groups file read and write methods. By convention class names start with a capital letter. Once a class is written it can be inherited by another class which eliminates a lot of extra code writing. Part 4 will talk about a related object, the structure. Swift has elevated the structure to …

Member Avatar
Member Avatar
+1 forum 5

I have recently been writing some code that asks the user questions about german. br = new BufferedReader(new FileReader("C:\\Users\\Patrick\\Desktop\\Java Workspace\\germanTool\\src\\germanTool\\lesson1.txt")); String[] engList = null; String[] deuList = null; int i = 0; while (br.readLine() != null){ lineCount++; line = br.readLine(); engList[i] = line.split("\t")[0]; deuList[i] = line.split("\t")[1]; } Using this code I have been trying to read a file. On each line of the file there is a translation of an english word into german seperated by a tab. I want to write all of the english words into one array and all of the german ones into another array with …

Member Avatar
Member Avatar
+0 forum 9

Hey there, I'm having trouble getting my program to read every instruction to then execute it, as well as displaying everything correctly. Right now my program displays mainly garbage and for now I simply want it to be able to successfully run a simple addition program, so any advice or hints, or even any links to send me for info would be great. Here's my program so far: [CODE]#include <iostream> #include <iomanip> #include <fstream> #include <string> #include <cstdlib> using namespace std; const int READ = 10; const int WRITE = 11; const int LOAD = 20; const int STORE = …

Member Avatar
Member Avatar
+1 forum 4

hi all i've been strugling with this error. could someone help me. below is the code stremail = "some@email" For Each store In outlookapp.Session.Stores strchecking = store.DisplayName outlookfolder = store.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox) For Each objfolder In outlookfolder.Folders For Each obj As Object In objfolder If TypeOf (obj) Is Outlook.MailItem Then MsgBox(obj.Subject) End If Next Next Next the error says : "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." and it appears in this line `outlookfolder = store.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)`

Member Avatar
Member Avatar
+0 forum 10

I want to write a program that do this: It should receive the URL (Wikipedia 's URL) from input and download that web page And read the content of that page and save it into a file please help me Thanks

Member Avatar
Member Avatar
+0 forum 2

Hello everyone I have this XML file that has all the information for payroll, but we have a system where the employee goes and sees his payment for the week, so what i've been trying to get my head around this problem is that we need to extract some information from the xml file I've been on this for a few days now and i cant solve it this are the fields that i only need: -NumEmpleado -selloSAT -selloCFD -noCertificadoSAT -UUID -FechaTimbrado Any help would be really appreaciate it, also i added the schemas on which that file is created. …

Member Avatar
Member Avatar
+0 forum 9

I'm trying to store the contents of a file containing names of herbs and spices (items) in a 2D array called PantryContents. Then I'm trying to add an item to that array. It seems like only one item is being stored at a time, but the output is correct but when I check the content of PantryContents, only one item shows up (like it's not 2D). This will be split into functions eventually.. (that's why the format is a little funky), I just needed to make it work all together first. Any ideas? This is what's in the file "Pantry.txt": …

Member Avatar
Member Avatar
+0 forum 2

Hey everyone. I'm new here just looking for some guidance / pointers. I'm working on a program to figure out what kinda data is contained with in unknown file types which belong to a game I'm modding. There are a few programs that all ready extract data from the main archiv files but it out puts files that are labeled with unknown extensions so I'm trying to figure out what these files Are... so is there any simple way to do this? Maybe certain headers i can look for?

Member Avatar
Member Avatar
+0 forum 1

Hello , I have to write a code that read a file in python and convert each chaaravter to 1, or 0 and send these digets to a a selonoid to make a strike or not to make ( brille printing ) is that possible ???? please need your help no time left :( :(

Member Avatar
Member Avatar
+0 forum 12

I'm supposed to just read a file and display certain information. I wrote the file in notepad and have it in the correct folder for my project, but when it opens (it DOES open), it doesn't display anything. Ideas? #include <iostream> #include <fstream> using std::cout; using std::cin; using std::ifstream; int ReadData ( int ssn[], int wage[], int hours[], char status[] ); int main () { int ssn[11]; int wage[11]; int hours[11]; char status[11]; ReadData ( ssn, wage, hours, status ); return 0; } int ReadData ( int ssn[], int wage[], int hours[], char status[] ) { int num_records = 0; …

Member Avatar
Member Avatar
+0 forum 4

Hello I want to change the permissions of a file but this error is output : "can not change permissions to ... read-only filesystem". How can change the permissions to my file ?

Member Avatar
Member Avatar
+0 forum 1

Line 49 is giving me a C2679 error and I'm not sure how to fix it. Help? #include <iostream> #include <fstream> using std::cout; using std::cin; using std::ifstream; using std::ofstream; const int MAX_SSN = 12; const int MAX_WAGE = 6; const int MAX_HOURS = 3; const char STATUS = 1; int ReadData ( int ssn[] [MAX_SSN], int wage[] [MAX_WAGE], int hours[] [MAX_HOURS], char status[] [STATUS] ); int main () { int ssn[11][MAX_SSN]; int wage[11][MAX_WAGE]; int hours[11][MAX_HOURS]; char status[11][STATUS]; return 0; } int ReadData ( int ssn[] [MAX_SSN], int wage[] [MAX_WAGE], int hours[] [MAX_HOURS], char status[] [STATUS] ) { int num_records = …

Member Avatar
Member Avatar
+0 forum 1

Hi, I have created a parameter table, added 1 column to it and populated that column with 1 value as shown here: CREATE TABLE tbl_param( maxcount NUMBER); INSERT INTO tbl_param VALUES (5); My problem is I want to create a loop from 1 to 5, but instead of just using 5 as my terminator I would like to read in the value from my table tbl_param with the value being 5 (from maxcount record). I have tried the following: FOR i in 1..maxcount LOOP i := i +1; DBMS_OUTPUT.PUT_LINE('Count is: ' || i); EXIT WHEN i > 5; END LOOP; …

Member Avatar
+0 forum 0

hy guys please help me .. i have 16gb micro sdcard in my indriod cell phone. when i am formatting the card it shows an error "sd card read only cannot format " . what should i do to uncheck readonly property.

Member Avatar
Member Avatar
+0 forum 5

Hi All, I have come across Read and write method from InputStream and outputstream but im finding it hard to understand the logic behind it. Below is a simple example which reads a jar file from input stream and writes it to output stream. Please explain the logic on how this reading and writing happens . ** Please assume other parameters in below code are defined/intialised properly ** InputStream is = ctx.getResourceAsStream("/bookcode.jar"); int read = 0; byte[] bytes = new byte[1024]; OutputStream os = response.getOutputStream(); while((read = is.read(bytes) != -1) { os.write(bytes,0,read); } os.flush(); os.close(); } ** what will happen …

Member Avatar
Member Avatar
+0 forum 3

Use visual basic 2008 Form1 with a text box (ScanArtikelBarcode.txt )on it barcode scanner I use now this code to read a barcode Private Sub ScanArtikelBarcode_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles ScanArtikelBarcode.KeyDown ' This way I collected the scanned barcode and process it against my table and the cursor is always in the cleared textbox ready for the next scan. Dim UniekArtNummer As Integer If Len(Trim(ScanArtikelBarcode.Text)) = 10 Then If e.KeyValue = Keys.Enter Or e.KeyCode = Keys.Return Then 'search for barcode number MysSQL database table But my problem is, after 5 scan's and reading barcode the program …

Member Avatar
Member Avatar
+0 forum 1

hello everybody......... for example i want to read a 2014.html or 2014.php file like shown below. http://example.com/myfiles/2014/-dir-/2014.html. i don't want to show full path. how it is possible anybody please help me. Big up for reply.........

Member Avatar
Member Avatar
+0 forum 8

Hi, I need to create a page where an admin can upload an excel worksheet in the .xlsx file format, this is then read and writen onto another php page. I'm new to PHP so I am confused by the code, I can find help on .xls but not accepting .xlsx. Thanks for any help.

Member Avatar
Member Avatar
+0 forum 1

Hello, I have csv filename with date. Everyday i have same csv file with respective date. I need to read filename (*everyday date changes in filename*) and do operation. For example, I have file "**cells_20140106_165532.csv**". I did like this to read it in general: $filename = "cells_".date('Ymd_hmi').".csv"; $file_contents = file_get_contents($filename); $importcsvsql = ""; `//error: cells_20140114_110109.csv` It is taking current date instead of filename's date. It is generating empty file "*cells_20140114_110109.csv*" Thanks in advanced.

Member Avatar
Member Avatar
+0 forum 8

yesterday my pc or tv won't start due to low voltage power problem.. after fixing it..my pc start and this error occurred "disk read error occured. press alt ctrl del to restart.". i have tried almost everything : (1)from window instl. disk cmds like chkdsk fixmbr fixboot but says invalid disk drive or disk drive not found.. (2)cables cmos etc.. (3)bios defaults... but no solution.... i know this prob occurs only after low voltage power problem...so what could be the solution???

Member Avatar
Member Avatar
+0 forum 2

Hello everyone! I'm fairly new to C++ and I have hit a serious road block....I cannot for the life of me get my program to fill a structure from a file and print the array correctly. I don't know what to do :( It prints a series of numbers because for some reason it's not taking the data from the text file. Here's the data I'm using: Goofy dog 8 Minnie mouse 22 Daisy duck 18 Mickey mouse 25 Pluto dog 10 Donald duck 21 Here's my code so far: (there's some additional values that will be used later in …

Member Avatar
Member Avatar
+0 forum 2

Dear Team, I am writing a Swing application for my project which gets the user information and saves it in a database and then displays in a JTable. I thought like, instead of manually updating the data from our client website, why not read the data from the site and update required field in my database and then show in JTable. our client website contains fileds like ticket no, date, description ...etc . I want to read the data from those fields. FYI i am writing code in Java SE. Please advise, is there any methods available for doing this. …

Member Avatar
Member Avatar
+0 forum 3

Hey guys, I need assistance with my program need to write a program that writes a series of random numbers to a file. Each random number should be in the range of 1 through 100. The application should let the user specify how many random numbers the file will hold. Once that program is done, need to write a program that reads from a file named ‘random.txt’ using a for loop with in file_object clause, display the numbers, and then display the following data: the sum total of the random numbers picked and the number of random numbers read from …

Member Avatar
Member Avatar
+0 forum 2

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 PHP Script which is working but i need to change each time file like PART1.xml, PART2.xml etc. **Things to do:** *1) Extract tar.Z file and Read CSV and XML file. 2) Read whole XML file automatically.* I hope i am clear. Thanks in advanced for your time and input.

Member Avatar
Member Avatar
+0 forum 2

for the past few days i have been unable to make my optical drive read discs or do anything other than cause the computer to freeze. i have tried the drive with multiple different sata cables and in another computer, the drive works fine on the other computer but is unresponsive in my own. i dont use the drive very often so i am unsure as to when it stopped funtioning on my current build but at the moment the install of windows is a clean one, that was installed using it. typically what happens when i try to use …

Member Avatar
Member Avatar
+0 forum 3

I have the following code: #include <iostream> #include <conio.h> using namespace std; long filesize(FILE *stream); int main(void) { FILE *stream; char c; int i=0,n; long lSize; stream = fopen("tanc.TXT", "r"); fseek (stream , 0 , SEEK_END); lSize = ftell (stream); rewind (stream); cout<<"Dati numarul de caractere:"; cin>>n; while(!feof(stream) && i<lSize) { fseek(stream,i,0); for (int j=i; j<i+n; j++) { c=getc(stream); printf("%c",c); } i+=n; cout<<"#"; } fclose(stream); getch(); } It works well for the following example: File content(single line): bread horse meat salt Output for k=2: br#ea#d #ho#rs#e #me#at# s#al#t # but if i have File content(multiple lines): bread horse meat salt …

Member Avatar
Member Avatar
+0 forum 4

Hello, I'm a starter in Python and I need help. I'm trying to ask the user to input as much text as he/she likes until he/she types EOF (end of file) on a separate line. Once he/she does, the program should end. I started on my code and below is what I have so far. I'm using the 'for' loop in my code, is that correct? #Set textInput to 0? textInput = 0 #Use the 'for' loop to keep looping. for i in textInput: #Prompt for user text input. Is this in the right spot? textInput = input() #If the …

Member Avatar
Member Avatar
+0 forum 1

I have a bit of a baffling problem! I'm writing a tag matcher in XML and whenever I run the below procedure, I get a garbage value after the name of every tag **except for the first one**. When I add the array text to the parameters list, the garbage value goes away (I had it there during initial debugging) even though it isn't actually referenced at any point in the procedure. Another thing, is that while reading a tag, it doesn't seem to want to recognize spaces. For example, <img src="img.png"/> reads as imgsrc="imgpng" instead of img, but only …

Member Avatar
Member Avatar
+0 forum 1

The End.