archive

How to identify a zip file in java?

亡梦爱人 提交于 2019-12-05 08:41:28
I want to identify my archive whether it is zip or rar . But the problem I get runtime error before I can validate my file. I want to create custom notification: public class ZipValidator { public void validate(Path pathToFile) throws IOException { try { ZipFile zipFile = new ZipFile(pathToFile.toFile()); String zipname = zipFile.getName(); } catch (InvalidZipException e) { throw new InvalidZipException("Not a zip file"); } } } At the moment I have runtime error: java.util.zip.ZipException: error in opening zip file I'd suggest to open a plain InputStream an reading the first few bytes (magic

Problem importing Android project archives into Eclipse

倾然丶 夕夏残阳落幕 提交于 2019-12-05 08:37:40
问题 My apologies if this is a stupid newbie question... I'm using Eclipse (Helios release) and have the Android SDK all configured as per the developer.android.com recommendations. I can create and run new projects without any problem but I can't import archived project code samples (found on the web etc.) using Import > Existing Projects Into Workspace. Importing a zip creates a project but it doesn't create it as an Android project and the console displays the error: "Project has no default

PHP Blog, need to make a good looking archives section

梦想与她 提交于 2019-12-05 07:05:41
问题 So! Basically I have a database with a load of blog posts, these are all sorted by a UNIX timestamp, and what I need is a way to make this code spit out headers when appropriate, so that it will output something like this: 2008 November Title 1 - Date Goes Here Title 2 - Date Goes Here December Title 3 - Date Goes Here 2009 January Title 4 - Date Goes Here etcetera Here's my code so far, it works until the comparison of the year, and I still need to come up with a good way of how to make it

oracle开启归档

廉价感情. 提交于 2019-12-05 06:11:12
版本:12c 单实例 SQL> archive log list Database log mode No Archive Mode Automatic archival Disabled Archive destination /u01/app/oracle/product/12.2.0/db_1/dbs/arch Oldest online log sequence 8 Current log sequence 10 1.关闭数据库并启动到mount SQL> shutdown immediate; Database closed. Database dismounted. ORACLE instance shut down. SQL> startup mount; ORACLE instance started. Total System Global Area 838860800 bytes Fixed Size 8626240 bytes Variable Size 553652160 bytes Database Buffers 272629760 bytes Redo Buffers 3952640 bytes Database mounted. 2.开启归档 SQL> alter database archivelog; Database altered. SQL>

How to read file from ZIP archive to memory without extracting it to file first, by using C# .NET 4.5?

早过忘川 提交于 2019-12-05 03:30:22
.NET Framework 4.5 added support for ZIP files via classes in System.IO.Compression . Let's say I have .ZIP archive that has sample.xml file in the root. I want to read this file directly from archive to memory stream and then deserialize it to a custom .NET object. What is the best way to do this? Adapted from the ZipArchive and XmlSerializer.Deserialize() manual pages. The ZipArchiveEntry class has an Open() method, which returns a stream to the file. string zipPath = @"c:\example\start.zip"; using (ZipArchive archive = ZipFile.OpenRead(zipPath)) { var sample = archive.GetEntry("sample.xml")

Error: Archive for required library cannot be read or is not a valid ZIP file.

谁说我不能喝 提交于 2019-12-05 02:12:22
I am having trouble setting up the build path of my java project. I am currently in a Co-Op IT position so I am somewhat new to all this. My background is mostly in C++ and I am learning java on the fly. I am also somewhat new to Eclipse (Kepler service release 1). I am working on a bug on an existing program and need to get the program to build so I can work on it. When I add all of the external .jar files that I know for a fact are the right ones, I am getting this error on two of them : "Archive for required library: '(location of file)' cannot be read or is not a valid ZIP file" Two of the

Archive option greyed out in xcode 4.5.2

耗尽温柔 提交于 2019-12-05 02:09:58
I have created app using Xcode.It is ready to be uploaded on iTunes connect.. But application loader seems to be too slow to do so.. The other archive method looks good to use but the option is disabled in Xcode 4.5.2 Actions: I tried editing the schemes and selected archive (Release option)and also the destination to my device... I also Built after that I set SKIP INSTALL in target to NO. I followed instruction seeing few posts on this forum as well.. But none seems to be working for me I dnt knw how to get that option avtive agn... My app is on my itouch and working properly..so there is no

What to do if Xcode Archiving Utility shows wrong app for validation?

痴心易碎 提交于 2019-12-05 02:01:08
I have two app projects on my mac. Because I was lazy to configure my project again, I just duplicated the entire project folder of my first app and renamed the project. All files in project are always relative to project itself. So it worked very good. But today I wanted to Build & Archive an update of my first app. It all works with no complaints. But when the Archiving utility of Xcode is done, and I select my archive and click "Validate", Xcode asks for my iTunes connect credentials. Then I enter them, and in the "Please choose your application record and signing identity" dialogue Xcode

Can I release an app without the device?

房东的猫 提交于 2019-12-05 01:46:56
I have created an iPad app and it is ready to go to the app store, but I can't reach the .app file.. I think it is because I have to build through a real iPad device(which I don't have)? So, can I build the app for archiving without an iPad, using like the simulator? /A noob Yes you can build for archive without having a device connected. Step 1: Set the active scheme to 'iOS Device' Step 2: Product > Archive Step 3: Organizer > Archives Note: The screenshots were taken without a connected device. 来源: https://stackoverflow.com/questions/12536056/can-i-release-an-app-without-the-device

How to save html pages as one file?

给你一囗甜甜゛ 提交于 2019-12-04 22:48:17
I want to be able to save / archive HTML pages as one file (without those pesky external folders). I want the resulting file to contain all styles, images, and links (videos and Flash would be nice, too, but not as crucial). I want the resulting file to be searchable, and editable. Microsoft's MHT is one of such tools, but unfortunately, it's not searchable under Linux. MHT is good, but I don't want to be locked under one operating system or one company. What would be a good alternative – or perhaps there's some entirely different solution I wasn't thinking about? Thank you in advance for your