I have been told it is good to overload the stream extraction operator to load data from a file. Would I simple use this in my class: friend ifstream &operator>>( ifstream &input, Class &C ) { input >> C.variable1 >> C.variable2 >> C.variable3; return input; } What are the advantages of overloading the stream extraction operator to read data from a file? Also I am confused what to do in main. At the moment to read in the data I have for example: ifstream fin; fin.open("filename.txt"); if(fin.good()) { object1 = new Class[10]; for (int i=0; i<10; i++) { fin >> …

Member Avatar
Member Avatar
+0 forum 7

hi master programmers ! I am new to programming and i have an assignment im working on, it seems simple but i just cant get it ! i was wondering if anyone could help ! it would be greatly appreciated ! here is the question : =================================== "The sample input is a file of the following format: ID , Last, First, Lecture, Tutorial,** A1**, A2, A3, A4, A5 10034567, Smith, Winston, L01, T03, **6**, 5.5, 8, 10, 8.5 10045678, Lee, Bruce, L02, T05, **4.5**, 6.5, 7, 7, 8.5 00305678, Obama, Jack, L01, T05,** 10**, 10, 9, 9.5, 10 00567890, Brown, …

Member Avatar
Member Avatar
+0 forum 6

hello guys my code is not giving me any errors but wont execute the task it just loops can, anyone help me debug it. its a code for extracting book information from a chinese website. thanks in advance. using System; using System.Collections.Generic; using System.Collections.Concurrent; using System.Text; using System.Text.RegularExpressions; using System.IO; using System.Net; using System.Threading.Tasks; namespace BookInfoCrawler1 { class ChinaPubCrawler : DeepCrawler { public ChinaPubCrawler(String keyword) : base(keyword) { } public override void update() { String url = "http://search.china-pub.com/s/?key1=" + _keyword + "&type=&pz=1&t=2"; String pageContent = getPageContent(url); if (getBookCount(pageContent) > 0) { getPageCount(pageContent); DateTime dt1 = DateTime.Now; if(true) { // use …

Member Avatar
Member Avatar
+0 forum 1

hello i am tryna extract information from a chinese website but i dont know which keyword to use to extract certain information. the html code snippet is shown below .this is a result from running a query on c++ books i want to get the following information book title C++反汇编与逆向分析技术揭秘(《程序员》杂志“2011年度十大最具技术影响力图书”,好评如潮) author 钱林松;赵海 旭(著) 机械工业出版社 book price ¥51.75 the link for this website is [Link Anchor Text](http://search.china-pub.com/s/?key1=c%2b%2b&type=&pz=1&t=2) i just need a method to retrieve the three <li> <ins>3.</ins> <pre><a target="_blank" href="http://product.china-pub.com/198624"><img border="0" title="C++反汇编与逆向分析技术揭秘(《程序员》杂志“2011年度十大最具技术影响力图书”,好评如潮)" height="110" width="79" src="http://images.china-pub.com/ebook195001-200000/198624/cover.jpg" mysrc='/ebook195001-200000/198624' n='-1' onerror='jp.oe(this);' border='0' onload='jp.w(this);'/></a></pre> <div> <h2> <a target="_blank" href="http://product.china-pub.com/198624"> <b>c++</b>反汇编与逆向分析技术揭秘(《程序员》杂志“2011年度十大最具技术影响力图书”,好评如潮) </a> <a target="_blank" href="http://www.china-pub.com/temporary/faq/2007FAQ/wenti_gouwu.asp#gouwuxd_04" …

Member Avatar
Member Avatar
+0 forum 1

hey, im doing a project on processing images and i'd like to extract the features of an image stored in databse.How can i do that? anyone help..,please..

Member Avatar
Member Avatar
+0 forum 13

My project scope is on android forensic. 1. After extracting all the information from an android phone, the information is saved to an excel file. Currently, I'm trying to transfer all the data saved in the excel file to MySQL database in Java. 2. After which, implement a feature that sorts all the data extracted in a time-based(earliest to latest timing)order, like a timeline. And I'm unsure how to go about implementing this. Thanks Current platform used:Eclipse/SQL

Member Avatar
Member Avatar
+0 forum 3

79 0009!017009!0479%0009!0479 0009!0469%0009!0469 0009!0459%0009!0459'009 0009!0459%0009!0449 0009!0449%0009!0449 0009!0439%0009!0439 0009!0429%0009!0429'009 0009!0429%0009!0419 0009!0419%0009!0409 000'009!0399 0009!0389%0009!0389'009 0009!0379%0009!0369 0009!0349%0009!0349 0009!0339%0009!0339 0009!0339%0009!0329'009 0009!0329%0009!0329 0009!032 In this data, I'm supposed to extract the number 47, 46 , 45 , 44 and so on. Im supposed to avoid the rest. The numbers always follow this flow - 9!0 no 9% for example: 9!0 42 9% Which language should I go about to solve this and which function might help me? Thank you :)

Member Avatar
Member Avatar
+0 forum 3

Hi guys, How do i extract a sequences from a fasta file by taking the start and end position from a gene predicted file: here the example the file with the orf statistics is my predicted file and for example the start position for the first orf is 65 and the end is 213. and the fasta file i'm going to search those position is the other one my predicted file looks like this >Seq1 [organism=S.burgodofry... orf00001 65 213 +1 2.93 orf00002 799 2328 +1 7.09 orf00003 2331 3437 +3 6.09 orf00004 3457 4044 +1 6.15 >Seq2 [organism=S.burgodofry... orf00001 55 …

Member Avatar
+0 forum 0

Hi All, I'm sorta stuck on this one. Hopefully some of you folks can help me out... My question in a nutshell: Is there a way to have PHP extract all of the files from an archive without preserving the directory structure? Extra Info: A site I'm working on allows users to upload pictures. I've just added support for Zip files, so that PHP extracts the images from the Zip, moves them to the appropriate directory, and catalogs them in the MySQL database. To do this, the names of the files are put into an array. The problem is that …

Member Avatar
Member Avatar
+0 forum 2

Hello all I'm working on a project for next year, and I've decided to be a little ambitious. One of the features I would like to have is the ability for my project to analyse an area of the earth (from Google Earth or a good atlas) and determine the nature of the vegetation in the area. However I've never done any image processing, so I would appreciate it if somebody could point me in the right direction. I would specifically like to know any of the following: 1) What features would I be looking for? 2) What extraction algorithms …

Member Avatar
Member Avatar
+0 forum 2

Hi all Im experiencing problems whereby my codes can only read one file instead of all files in my directory. Does anyone know anything regarding this? Below are my codes: [CODE]import java.io.*; import java.util.*; public class extractionn { public static void main( String[] args ) { File dir = new File("D:\\project1\\MP Project\\Database\\Extracted\\binding protein\\1APB.pdb.txt"); //set file String path = dir.getAbsolutePath(); //get file path int lala = path.lastIndexOf("\\"); //get index of '' String howPath = path.substring(0,lala+1); //extract directory name File usePath = new File(howPath); //assign directory for reading file String[] fileDir = usePath.list(); //store file in dit to array if(fileDir == null) …

Member Avatar
Member Avatar
+0 forum 9

Hi, I have a problem with my codes now. I've actually extracted the column of information that I need from a text file. However, now I need to convert the output of the file to something that I specify, but I don't know how to do it. It is actually changing the amino acid three-letter abbreviation to one-letter abbreviation. Here are my codes: [CODE]import java.io.*; import java.util.*; public class ExtractAA { public static StringBuffer buffer; public static BufferedReader input; public static void main(String[] args) { int j=0, h=0, i=0; String[] counter3 = new String [10000]; String[] counter4 = new String …

Member Avatar
Member Avatar
+0 forum 1

Hi there! this an excerpt from an extracted pdb file my team has done in the format of a text file. ATOM 1 N ASN A 2 [B]18.668 27.299 52.379[/B] 1.00 41.19 N ATOM 2 CA ASN A 2 [B]19.400 26.674 53.492[/B] 1.00 40.18 C ATOM 3 C ASN A 2 [B]19.710 27.737 54.550[/B] 1.00 37.56 C ATOM 4 O ASN A 2 [B]19.123 27.737 55.640[/B] 1.00 38.90 O ATOM 5 N LEU A 3 [B]20.637 28.606 54.184[/B] 1.00 34.40 N those in bold are the coordinates we need to extract and in the form of (x,y,z) down a long …

Member Avatar
Member Avatar
+0 forum 27

I have a text file in this format: AUGC U[B]1212[/B] A[B]2121[/B] G[B]3434[/B] C[B]4343[/B] I need to extract the number that I need depending on which variables (letters) I'm comparing. For example, I need the value for A and U, so the value I need to look up for or extract is 1. For C and C, I will need to extract 3, and so on and so forth. I need a program that can look up this table automatically and extract what I need. May I know how do I do that?

Member Avatar
Member Avatar
+0 forum 2

Hi there, I am currently doing a bioinformatics project on dynamic programming. I need to read a text file, and extract the information in it and use the information in it for my dynamic programming java codes(both java codes must be together). May I know how to extract the information? I think I need to read the file and extract it by rows and columns.

Member Avatar
Member Avatar
+0 forum 6
Code Snippet Mass Unzipper

My friend gave me 10,000+ ROM's for Sega, SNES, NES, and GBA. They where all individually zipped. I go fed up trying to unzip them one by one, and decided to write a script to do it for me. It unzipped about 5,000 in under a minute. Python's zipfile module is nice, but it sometimes wont open some zip files. It throws an error saying something like "Corrupt Zip File", but seems to unzip fine with 7Zip. I use 7Zip for all my compression needs now a days, but this script was a learning experience, so I though I would …

Member Avatar
Member Avatar
+0 forum 2

The End.