Search Results

Search found 3241 results on 130 pages for 'extract'.

Page 24/130 | < Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >

  • How do I extract info from a block of URLs in php?

    - by Jack
    I have a list of urls, which can come in any format. One per line, separated by commas, have random text in between them, etc. the URLs are all from 2 different sites, and have a similar structure For this example, lets say it looks like this Random Text - http://www.domain2.com/variable-value Random Text 2 - http://www.domain1.com/variable-value, http://www.domain1.com/variable-value, http://www.domain1.com/variable-value http://www.domain1.com/variable-value http://www.domain2.com/variable-value http://www.domain1.com/variable-value http://www.domain2.com/variable-value http://www.domain1.com/variable-value I need to extract 2 pieces of information. Check to see if its domain1 or domain2 and the value that follows "variable-" So it should create a multi-dimensional array, which would have 2 items: domain + value. Whats the best way of doing that?

    Read the article

  • Using regex to extract variables from a plain-text form letter?

    - by Yaaqov
    Hi - I'm looking for a good example of using Regular Expressions in PHP to "reverse engineer" a form letter (with a known format, of course) that has been pasted into a multiline textbox and sent to a script for processing. So, for example, let's assume this is the original plain-text input (taken from a USDA press release): WASHINGTON, April 5, 2010 - North American Bison Co-Op, a New Rockford, N.D., establishment is recalling approximately 25,000 pounds of whole beef heads containing tongues that may not have had the tonsils completely removed, which is not compliant with regulations that require the removal of tonsils from cattle of all ages, the U.S. Department of Agriculture's Food Safety and Inspection Service (FSIS) announced today. For clarity, the fields that are variables are highlighted below: [pr_city=]WASHINGTON, [pr_date=]April 5, 2010 - [corp_name=]North American Bison Co-Op, a [corp_city=]New Rockford, [corp_state=]N.D., establishment is recalling approximately [amount=]25,000 pounds of [product=]whole beef heads containing tongues that may not have had the tonsils completely removed, which is not compliant with regulations that require [reason=]the removal of tonsils from cattle of all ages, the U.S. Department of Agriculture's Food Safety and Inspection Service (FSIS) announced today. How could I efficiently extract the contents of the pr_city pr_date corp_name corp_city corp_state amount product reason fields from my example? Any help would be appreciated, thanks.

    Read the article

  • XSLT; parse escaped text to a node-set and extract subelements

    - by Tom W
    Hello SO; I've been fighting with this problem all day and am just about at my wit's end. I have an XML file in which certain portions of data are stored as escaped text but are themselves well-formed XML. I want to convert the whole hierarchy in this text node to a node-set and extract the data therein. No combination of variables and functions I can think of works. The way I'd expect it to work would be: <xsl:variable name="a" select="InnerXML"> <xsl:for-each select="exsl:node-set($a)/*"> 'do something </xsl:for-each> The input element InnerXML contains text of the form <root><element a>text</element a><element b><element c/><element d>text</element d></element b></root> but that doesn't really matter. I just want to navigate the xml like a normal node-set. Where am I going wrong?

    Read the article

  • What do I need in order to extract and combine text files from multiple ZIP files, via command line?

    - by Iszi
    I've got an interesting scripting challenge in front of me. I'm fairly certain there's a way to do it, but I feel like I'm probably lacking some particular tools and/or functional knowledge. There's some fifty-plus ZIP files that each contain, among other things, text files that need to be merged with one another. The structure is something like this: C:\Reports\FirstJob-1.zip |-MyName |-FirstJob |-1 |-[Some other folders] |-TXTReports |-English |-[Some other files] |-Report.txt C:\Reports\FirstJob-2.zip |-MyName |-FirstJob |-1 |-[Some other folders] |-TXTReports |-English |-[Some other files] |-Report.txt C:\Reports\SecondJob-1.zip |-MyName |-SecondJob |-1 |-[Some other folders] |-TXTReports |-English |-[Some other files] |-Report.txt If I had all the Report.txt files in one regular folder, and uniquely named, I could probably just write a FOR statement that targets *.txt and runs something like type filename.txt >> Consolidated.txt on each. However, these all have the same file name and are embedded deep within separate ZIP files. The potentially useful tools I currently have at my disposal are Windows XP Professional SP3, PowerShell, and WinZip. I'd rather not download or install anything else, but I do understand that third-party tools (or additional tools from Microsoft or WinZip) may be necessary. Whatever tools I use should run natively in Windows. I really don't want to have to mess with Cygwin or other emulators on this system. At the very least, I need a tool that will allow me to analyze and manipulate ZIP files from the command line. Also, are there any other particular complications to this that I've not yet thought of?

    Read the article

  • Code refactoring with Visual Studio 2010 Part-1

    - by Jalpesh P. Vadgama
    Visual studio 2010 is a Great IDE(Integrated Development Environment) and we all are using it in day by day for our coding purpose. There are many great features provided by Visual Studio 2010 and Today I am going to show one of great feature called for code refactoring. This feature is one of the most unappreciated features of Visual Studio 2010 as lots of people still not using that and doing stuff manfully. So to explain feature let’s create a simple console application which will print first name and last name like following. And following is code for that. using System; namespace CodeRefractoring { class Program { static void Main(string[] args) { string firstName = "Jalpesh"; string lastName = "Vadgama"; Console.WriteLine(string.Format("FirstName:{0}",firstName)); Console.WriteLine(string.Format("LastName:{0}", lastName)); Console.ReadLine(); } } } So as you can see this is a very basic console application and let’s run it to see output. So now lets explore our first feature called extract method in visual studio you can also do that via refractor menu like following. Just select the code for which you want to extract method and then click refractor menu and then click extract method. Now I am selecting three lines of code and clicking on refactor –> Extract Method just like following. Once you click menu a dialog box will appear like following. As you can I have highlighted two thing first is Method Name where I put Print as Method Name and another one Preview method signature where its smart enough to extract parameter also as We have just selected three lines with  console.writeline.  One you click ok it will extract the method and you code will be like this. using System; namespace CodeRefractoring { class Program { static void Main(string[] args) { string firstName = "Jalpesh"; string lastName = "Vadgama"; Print(firstName, lastName); } private static void Print(string firstName, string lastName) { Console.WriteLine(string.Format("FirstName:{0}", firstName)); Console.WriteLine(string.Format("LastName:{0}", lastName)); Console.ReadLine(); } } } So as you can see in above code its has created a static method called Print and also passed parameter for as firstname and lastname. Isn’t that great!!!. It has also created static print method as I am calling it from static void main.  Hope you liked it.. Stay tuned for more..Till that Happy programming.

    Read the article

  • How to extract a Vorbis stream from a WAVE file?

    - by H.B.
    I would like to move the Vorbis stream into an ogg container but ffmpeg does not seem to recognize the stream. Even though MPlayer gives this output upon playback: Opening audio decoder: [acm] Win32/ACM decoders Loading codec DLL: 'vorbis.acm' Loaded DLL driver vorbis.acm at 10000000 Warning! ACM codec reports srcsize=0 AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000-176400) Selected audio codec: [vorbisacm] afm: acm (OggVorbis ACM) ffmpeg: ffmpeg -i Source.wav -acodec copy Target.ogg Input #0, wav, from 'Source.wav': Duration: 00:02:15.17, bitrate: 128 kb/s Stream #0.0: Audio: qg[0][0] / 0x6771, 44100 Hz, 2 channels, 128 kb/s [ogg @ 00000000003096C0] Unsupported codec id in stream 0 Output #0, ogg, to 'Target.ogg': Metadata: encoder : Lavf53.6.0 Stream #0.0: Audio: qg[0][0] / 0x6771, 44100 Hz, 2 channels, 128 kb/s Stream mapping: Stream #0.0 -> #0.0 Could not write header for output file #0 (incorrect codec parameters ?) Of course this does not necessarily need to be done via ffmpeg, any method that is workable would be fine... I have cut down one of the files to 512KB: sample.wav (Changed two chunk size fields in the wave header to account for this, the embedded stream is cut "without notice")

    Read the article

  • Dealing with AVCHD. Any free software to extract or edit AVCHD video?

    - by Kelsey
    I have a Panasonic HDC-SD5 video carmera which records in HD format to a memory card. It also came with a DVD burner which burns this format to DVD which I need a blu-ray player to view. I can get about 30 min worth of video on 1 DVD. My problem is the software that comes with the camera is not very good at all so I am constantly just using the 'backup' feature in the included burner (connect drive to camera, push backup, and it spits out up to 4 DVDs worth of HD video). Now that I have the video backed up on DVD in the HD format (blu-ray), is there any free software that I can use to edit this video and create other HD DVD's with my own menus, transitions, etc? I was considering buying Pinnacle Studio but I wanted to exaust any free options before biting the bullet. Any suggestions for software I could use or anything else I could do to make dealing with this AVCHD format any easier that I am unaware of? Edit: Sorry forgot to include that I am running Windows Vista 64-bit. Edit: Still haven't found anything that is truely free. Everything has limitations by either time, watermark the video or degrade the quality. Edit: So I still haven't found really anything, so is there some software I can use to convert the video to another format that I then could use to edit the video?

    Read the article

  • How does one extract the Canon ip4600 drivers in inf form?

    - by Trix
    I have a x64 machine which needs "additional drivers" for x86 clients. The problem I have is I cannot get the proper .inf files so I can use them. Canon only provides an .exe file, which when extracted has other .exe files and some dll files. I believe Canon changed their drivers, because I did have them extracted at one point, but sadly did not save them :(. The drivers are available here. Hopefully I am clear in what I am trying to do. Canon provides the .exe file. The .exe file when extracted does not produce any .inf driver files. Thanks!

    Read the article

  • How do I extract all the files in a VHD to a hard disk including permissions?

    - by Middletone
    I'd like to know wha thte best way is to make an exact copy of a vhd image and pu tit onto my hard disk. I've tried xcopy but there seems to be a number of issues rlated to permissions when doing this. Ideally I'd like to copy the bits so that they match exactly on the new drive. I encountered this when trying to restore a vista backup only to discover the idiots work who decided to not let me restore a 400 gig image to a 1 TB drive size. I've sucessfully mounted the drive in Win 7 which is the environment in which I'm trying ot copy these files.

    Read the article

  • Why database partitioning didn't work? Extract from thedailywtf.com

    - by questzen
    Original link. http://thedailywtf.com/Articles/The-Certified-DBA.aspx. Article summary: The DBA suggests an approach involving rigorous partitioning, 10 partitions per disk (3 actual disks and 3 raid). The stats show that the performance is non-optimal. Then the DBA suggests an alternative of 1 partition per disk (with more added disks). This also fails. The sys-admin then sets up a single disk, single partition and saves the day. The size of disks was not mentioned but given today,s typical disk sizes (of the order of 100 GB), the partitions ; would be huge, it surprises me that a single disk with all partitions outperformed. Initially I suspect that the data was segregated and hence faster reads. But how come the performance didn't degrade as time went by with all the inserts and updates happening? Saw this on reddit, but the explanation was by far spindle/platter centered. There was no mention in the article about this. Is there any other reason? I can only guess that the tables were using a incorrect hash distribution causing non-uniform allocation across disks (wrong partitioning); this would increase fetch times. Any thoughts?

    Read the article

  • How to extract 4th line from 300 text files?

    - by Twoopah
    I have about 300 emails (gmail) that go like this: Dear [name] Order ID:123456789 Purchased by: [name I need] (blah blah another 26 lines of crap (total of 30 lines)) What I need help is how to save gmail's mails locally into .txt and how to export 4th line from each text file. I can easily run Replace 'Purchased by: ' to remove that and keep only the names from that line in a list, but other than that I have no clue Any ideas?

    Read the article

  • How does one extract the Canon ip4600 drivers in inf form?

    - by Trix
    I have a x64 machine which needs "additional drivers" for x86 clients. The problem I have is I cannot get the proper .inf files so I can use them. Canon only provides an .exe file, which when extracted has other .exe files and some dll files. I believe Canon changed their drivers, because I did have them extracted at one point, but sadly did not save them :(. The drivers are available here. Hopefully I am clear in what I am trying to do. Canon provides the .exe file. The .exe file when extracted does not produce any .inf driver files. Thanks!

    Read the article

  • How can I extract data from Toshiba Satellite with a dead Windows installation?

    - by msanford
    I've got a Toshiba Satellite (unknown model number but bought early 2010) running Windows Vista which throws a kernel error on boot. We don't have the restore/recovery CD any more to restore the Windows partition. I have managed to boot to a Live CD version of Ubuntu 10.10 and have mounted the internal hard drive (which takes nearly 8 minutes). I suspect that the hard drive is malfunctioning, however, because copy tasks of even 30 megs of data to an attached and mounted USB flash drive takes over an hour, and some files are mysteriously inaccessible (not a permissions issue). When browsing folders, it takes many minutes to populate the folder window even with a single tiny file. During the copy tasks, the hard disk sounds like it tries to sleep several times in rapid succession, then continues accessing, it sounds, at full throughput. I initially tried using scp (from the shell) to copy data but I encountered the same local problems. I don't know the S.M.A.R.T. status of the hard disk, either. Is there a more effective way of going about recovering the data on the internal disk, assuming that I can't use a recovery CD and am too cheap to bring it in (for now, at least)?

    Read the article

  • Compare cells in two different spreadsheets and extract data from one an place it in the other if match found

    - by Fergie
    I need to find a way to compare two spreadsheets and if there is a match on specific cells, pull data from one sheet to another. Say the two spreadsheets contain a value that identifies a piece of equipment: spreadsheet 1 spreadsheet 2 Server Server Serial # 123abc 123abc 123-xx-456 There are of course many, many records/rows in each sheet. I need to look at the first cell in the server column of sheet 1 and then search a range of cells in the sever column of sheet 2 for a match. If there is a match, I need to pull the serial # value from the cell in the matching row an put it into the serial # cell of the matching row in sheet 1 (all of the "serial #" cells in sheet 1 are presently empty.) If that description explaination is too convoluted I can explain by answering any questions you may have. My deadline for this task is Noon tomorrow, 30 Aug 2012. Yes, I got the task today at noon.... I am not an Excel user and just get thrust into it on occassion... Any help would be a huge assist.

    Read the article

  • How can I extract data from a 3rd party application's UI controls?

    - by John MacIntyre
    In 2003 I found a little utility which allowed me to select a control (like a listview) on any application, and it would copy it's contents into the clipboard. For example, you could select the list in Windows Explorer, and all the filenames, sizes, dates, etc. would be copied for you to paste into Notepad. I don't remember the name of it, but I do remember the name was so unrelated that I could never find it when I needed it. So now, years later, I can't find it. Does anybody know of any utilities which might do this? Or possibly even the utility I'm talking about?

    Read the article

  • is it possible to extract certain strings based off a predefined white-space count?

    - by s2xi
    So after several Advil's I think I need help I am trying to make a script that lets the user upload a .txt file, the file will look like this as an example EXT. DUNKIN' DONUTS - DAY Police vehicles remain in the parking lot. The determined female reporter from the courthouse steps, MELINDA FUENTES (32), interviews Comandante Chitt, who holds a napkin to his jaw, like he cut himself shaving. MELINDA < Comandante Chitt, how does it feel to get shot in the face? > COMANDANTE CHITT < Not too different than getting shot in the arm or leg. > MELINDA < Tell us what happened. > COMANDANTE CHITT < I parked my car. (indicates assault vehicle in donut shop) He aimed his weapon at my head. I fired seven shots. He stopped aiming his weapon at my head. > Melinda waits for more, but Chitt turns and walks away into the roped-off crime scene. Melinda is confused for a second, then resumes smiling. MELINDA < And there you have it... A man of few words. > Ok, so based off of this what I want to do is this: The PHP script looks at the file and counts 35 white spaces, since all files will have the same layout and never differ in white spaces I chose this as the best way to go. for every 35 white spaces extract character 36 until the end of line. Then tally up $character++ so in the end the output would look like ----------------------------------- It looks like you have 2 characters in your script Melinda Commandante Chitt ----------------------------------- using PHP to select distinct names, and use the strtolower() to lower case the strings and ucfirst() to make the first letter upper-case thats my project, I'm at the stage where I'm going crazy trying to figure out how to count white-spaces and everything after that white space until the first white-space after the word IS a character name

    Read the article

  • Parsing string based on initial format

    - by Kayla
    I'm trying to parse a set of lines and extract certain parts of the string based on an initial format (reading a configuration file). A little more explanation: the format can contain up to 4 parts to be formatted. This case, %S will skip the part, %a-%c will extract the part and will be treated as a string, %d as int. What I am trying to do now is to come up with some clever way to parse it. So far I came up with the following prototype. However, my pointer arithmetic still needs some work to skip/extract the parts. Ultimately each part will be stored on an array of structs. Such as: struct st_temp { char *parta; char *partb; char *partc; char *partd; }; ... #include <stdio.h> #include <string.h> #define DIM(x) (sizeof(x)/sizeof(*(x))) void process (const char *fmt, const char *line) { char c; const char *src = fmt; while ((c = *src++) != '\0') { if (c == 'S'); // skip part else if (c == 'a'); // extract %a else if (c == 'b'); // extract %b else if (c == 'c'); // extract %c else if (c == 'd'); // extract %d (int) else { printf("Unknown format\n"); exit(1); } } } static const char *input[] = { "bar 200.1 / / (zaz) - \"bon 10\"", "foo 100.1 / / (baz) - \"apt 20\"", }; int main (void) { const char *fmt = "%S %a / / (%b) - \"%c %d\""; size_t i; for(i = 0; i < DIM (input); i++) { process (fmt, input[i]); } return (0); }

    Read the article

  • How to extract comment out of header file using python, perl, or sed?

    - by WilliamKF
    I have a header file like this: /* * APP 180-2 ALG-254/258/772 implementation * Last update: 03/01/2006 * Issue date: 08/22/2004 * * Copyright (C) 2006 Somebody's Name here * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ #ifndef HEADER_H #define HEADER_H /* More comments and C++ code here. */ #endif /* End of file. */ And I wish to extract out the contents of the first C style comment only and drop the " *" at the start of each line to get a file with the following contents: APP 180-2 ALG-254/258/772 implementation Last update: 03/01/2006 Issue date: 08/22/2004 Copyright (C) 2006 Somebody's Name here All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the project nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Please suggest an easy way to do this with Python, Perl, sed, or some other way on Unix. Preferably as a one-liner.

    Read the article

  • how to extract data from excel (apache poi) to put it in mysql table using jsp? [ SOLVED]

    - by Nihad KH
    I want to extract data from excel sheet to insert it into a mysql table using jsp, so far i've done this and its printing data into the outpout(using apache poi),what should i add to this code ? Output : Name Age Adress Mark 35 New york,AA Elise 22 India,bb Charlotte 45 France,cc Readexcel.jsp : <%@page import="java.sql.Statement"%> <%@page import="java.util.ArrayList"%> <%@page import="java.sql.PreparedStatement"%> <%@page import="java.sql.Connection"%> <%@page import="java.util.Date"%> <%@page import="org.apache.poi.ss.usermodel.Cell"%> <%@page import="org.apache.poi.ss.usermodel.Row"%> <%@page import="org.apache.poi.xssf.usermodel.XSSFSheet"%> <%@page import="org.apache.poi.xssf.usermodel.XSSFWorkbook"%> <%@page import="java.io.File"%> <%@page import="org.apache.commons.io.FilenameUtils"%> <%@page import="org.apache.commons.fileupload.FileItem"%> <%@page import="java.util.Iterator"%> <%@page import="java.util.List"%> <%@page import="org.apache.commons.fileupload.servlet.ServletFileUpload"%> <%@page import="org.apache.commons.fileupload.disk.DiskFileItemFactory"%> <%@page import="org.apache.commons.fileupload.FileItemFactory"%> <%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>PRINT DATA FROM EXCEL FILE</title> </head> <body> <% try{ boolean ismultipart=ServletFileUpload.isMultipartContent(request); if(!ismultipart){ }else{ FileItemFactory factory = new DiskFileItemFactory(); ServletFileUpload upload = new ServletFileUpload(factory); List items = null; try{ items = upload.parseRequest(request); }catch(Exception e){ } Iterator itr = items.iterator(); while(itr.hasNext()){ FileItem item = (FileItem)itr.next(); if(item.isFormField()){ }else{ String itemname = item.getName(); if((itemname==null || itemname.equals(""))){ continue; } String filename = FilenameUtils.getName(itemname); File f = checkExist(filename); item.write(f); try{ XSSFWorkbook workbook = new XSSFWorkbook(item.getInputStream()); XSSFSheet sheet = workbook.getSheetAt(0); Iterator<Row> rowIterator = sheet.iterator(); while (rowIterator.hasNext()){ Row row = rowIterator.next(); Iterator<Cell> cellIterator = row.cellIterator(); while (cellIterator.hasNext()) { Cell cell = cellIterator.next(); switch (cell.getCellType()){ case Cell.CELL_TYPE_NUMERIC: out.print(cell.getNumericCellValue() + "t"); break; case Cell.CELL_TYPE_STRING: out.print(cell.getStringCellValue() + "t"); break;} } out.println(""); } }catch (Exception e){ e.printStackTrace(); } } } } }catch(Exception e){ } finally { out.close(); } %> <%! private File checkExist(String fileName){ String saveFile = "D:/upload/"; File f = new File(saveFile+"/"+fileName); if(f.exists()){ StringBuffer sb = new StringBuffer(fileName); sb.insert(sb.lastIndexOf("."),"-"+new Date().getTime()); f = new File(saveFile+"/"+sb.toString()); } return f; } %> </body> </html> I've created a table in my database named EXCELDATA with the header of the excel sheet : ExcelData (Name varchar(50),age int,adress varchar(50)); what should i add to this code to get the data from the excel sheet to the mysql table ??

    Read the article

  • psql : Convert the time to seconds

    - by pavun_cool
    Hi all. I have time value 04:30:25 , I want to convert this to seconds . Is there any dedicated function to do this...? I know that we can extract hours ,minutes, seconds then we can calculate the second . SELECT extract ( hour from t ) * 60*60 + extract ( minutes from t ) * 60 + extract ( seconds from t ) from test ; But I want some other way... Thanks

    Read the article

  • Date arithmetic using integer values

    - by Dave Jarvis
    Problem String concatenation is slowing down a query: date(extract(YEAR FROM m.taken)||'-1-1') d1, date(extract(YEAR FROM m.taken)||'-1-31') d2 This is realized in code as part of a string, which follows (where the p_ variables are integers): date(extract(YEAR FROM m.taken)||''-'||p_month1||'-'||p_day1||''') d1, date(extract(YEAR FROM m.taken)||''-'||p_month2||'-'||p_day2||''') d2 This part of the query runs in 3.2 seconds with the dates, and 1.5 seconds without, leading me to believe there is ample room for improvement. Question What is a better way to create the date (presumably without concatenation)? Many thanks!

    Read the article

  • How to parse the table from webpage where there are many webpage.

    - by Harikrishna
    There are many tables in the one webpage from that I want to extract the data from only one table. I am using Html Agility Pack to parse the html table.There are many tables in one webpage but I want to extract the data from only one table. So I will first find that table for which I want to extract the data which I can do.Now problem is once I find that table,what I should do to extract the data from only that table ?

    Read the article

< Previous Page | 20 21 22 23 24 25 26 27 28 29 30 31  | Next Page >