EzDevInfo.com

archive interview questions

Top archive frequently asked interview questions

Git : How to get a snapshot of a git repository

I'm looking for the right way to get an archive of a git repository without the .git/ directory in order to send a daily snapshot to testers.


Source: (StackOverflow)

Unpack inner zips in zip with Maven

I can unpack zip file via the maven-dependency plugin, but currently I have the problem that inside that zip file other zip files are include and I need to unpack them as well. How can I do this?


Source: (StackOverflow)

Advertisements

In LINUX determine if a .a library/archive 32-bit or 64-bit?

We distribute in Linux a static lib in both 64-bit and 32-bit versions. When troubleshooting a customer, I would like my diagnostic shell script to quickly eliminate the issue by checking the .a archive file to detetmine whether it is 32 or 64 bit. The methods that occur to me are less than elegant:

  1. extract a .o member and ask the "file" command (e.g., ELF 32-bit etc)

  2. start including a dummy member coded to indicate, e.g. 32bit.o/64bit.o and use "ar -t" to check

I have tried "strings xyz.a | grep 32" but this doesn't work well over versions. Not a heartbreaker problem, but if you know of an elegant solution, I would like to know.

Thanks!


Source: (StackOverflow)

Xcode 4 archive warning to skip copy phase

I have an app for the Mac that I am trying to archive. I have done this in the past with an earlier version of Xcode however when I archive with Xcode 4, I get the following warning:

warning: skipping copy phase strip, binary is code signed: .....

The warning pertains to a helper tool that must be copied during the build phase. How do I resolve this warning?

Any suggestions?


Source: (StackOverflow)

How to combine several C/C++ libraries into one?

I'm tired of adding ten link libraries into my project, or requiring eight of them to use my own. I'd like to take existing libraries like libpng.a, libz.a, libjpeg.a, and combine them into one single .a library. Is that possible? How about combining .lib libraries?


Source: (StackOverflow)

What's the best "file format" for saving complete web pages (images, etc.) in a single archive?

I'm working on a project which stores single images and text files in one place, like a time capsule. Now, most every project can be saved as one file, like DOC, PPT, and ODF. But complete web pages can't -- they're saved as a separate HTML file and data folder. I want to save a web page in a single archive, and while there are several solutions, there's no "standard". Which is the best format for HTML archives?

  • Microsoft has MHTML -- basically a file encoded exactly as a MIME HTML email message. It's already based on an existing standard, and MHTML as its own was proposed as rfc2557. This is a great idea and it's been around forever, except it's been a "proposed standard" since 1999. Plus, implementations other than IE's are just cumbersome. IE and Opera support it; Firefox and Safari with a cumbersome extension.

  • Mozilla has Mozilla Archive Format -- basically a ZIP file with the markup and images, with metadata saved as RDF. It's an awesome idea -- Winamp does this for skins, and ODF and OOXML for their embedded images. I love this, except, 1. Nobody else except Mozilla uses it, 2. The only extension supporting it wasn't updated since Firefox 1.5.

  • Data URIs are becoming more popular. Instead of referencing an external location a la MHTML or MAF, you encode the file straight into the HTML markup as base64. Depending on your view, it's streamlined since the files are right where the markup is. However, support is still somewhat weak. Firefox, Opera, and Safari support it without gaffes; IE, the market leader, only started supporting it at IE8, and even then with limits.

  • Then of course, there's "Save complete webpage" where the HTML markup is saved as "savedpage.html" and the files in a separate "savedpage_files" folder. Afaik, everyone does this. It's well supported. But having to handle two separate elements is not simple and streamlined at all. My project needs to have them in a single archive.

Keeping in mind browser support and ease of editing the page, what do you think's the best way to save web pages in a single archive? What would be best as a "standard"? Or should I just buckle down and deal with the HTML file and separate folder? For the sake of my project, I could support that, but I'd best avoid it.


Source: (StackOverflow)

RAR archives with java [closed]

Is there a good java API for manipulating RAR archive files someone could recommend? Googling did not turn up anything overwhelmingly convincing.


Source: (StackOverflow)

How do you archive an entire website for offline viewing?

We actually have burned static/archived copies of our asp.net websites for customers many times. We have used WebZip until now but we have had endless problems with crashes, downloaded pages not being re-linked correctly, etc.

We basically need an application that crawls and downloads static copies of everything on our asp.net website (pages, images, documents, css, etc) and then processes the downloaded pages so that they can be browsed locally without an internet connection (get rid of absolute urls in links, etc). The more idiot proof the better. This seems like a pretty common and (relatively) simple process but I have tried a few other applications and have been really unimpressed

Does anyone have archive software they would recommend? Does anyone have a really simple process they would share? Thanks in advance, Shane


Source: (StackOverflow)

iOS how to set app icon and launch images

OMG, I just barely figured out the old system, and now they've changed it again.

How do I set the images so that I can archive and validate my app? The screen looks like this now:

enter image description here

So the first one says 29pt, but then it also says 2x. So do I put a 29x29 image or a 58x58 image? And where do I put all of the other ones? (I know that there are more sizes than 29, 40, and 60).

Anyway, what I tried was I dragged a 29x29 png onto the first slot, a 40x40 onto the second, and a 60x60 onto the third and fourth. When I went to Product->Archive, I get

/Users/kendon/Documents/iPhone Apps/Sales Tool/Sales Tool/Images.xcassets: The app icon set named "AppIcon" did not have any applicable content.

Source: (StackOverflow)

Zip folder in C#

What is an example (simple code) of how to zip a folder in C#?


Update:

I do not see namespace ICSharpCode. I downloaded ICSharpCode.SharpZipLib.dll but I do not know where to copy that DLL file. What do I need to do to see this namespace?

And do you have link for that MSDN example for compress folder, because I read all MSDN but I couldn't find anything.


OK, but I need next information.

Where should I copy ICSharpCode.SharpZipLib.dll to see that namespace in Visual Studio?


Source: (StackOverflow)

Google chat server archive (XEP-0136)

I am looking for a way how to retrieve archive of chat messages from google server via using XEP-0136 standard, but I got these results just trying to ask for the feature.

Request:

<iq type="get"><pref xmlns="urn:xmpp:archive"/></iq>

Response:

<iq xmlns="jabber:client" type="error" to="myEmail@gmail.com/9FF72CA7">
    <pref xmlns="urn:xmpp:archive"/>
        <error code="501" type="cancel">
            <feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
        </error>
</iq>

So it looks like google does not implement this feature, but is it true? I don't think so.

The same happened with trying to set invisibility which is definitely supported by Google server.

Request:

<iq type="set" id="invisible1" from="myEmail@gmail.com/00230F07">
    <query xmlns="jabber:iq:privacy">
        <active name="invisible"/>
    </query>
</iq>

Response:

<iq xmlns="jabber:client" type="error" id="invisible1" to="myEmail@gmail.com/00230F07">
    <query xmlns="jabber:iq:privacy">
        <active name="invisible"/>
    </query>
    <error code="501" type="cancel">
        <feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/>
    </error>
</iq>

So probably I am doing something wrong. Any help will be appreciated.


Source: (StackOverflow)

Archive the artifacts in hudson / jenkins

Could someone please explain to me the idea of artifacts in the build process ?

I have the workspace directory where I check out the code to, compile, and run my ant scripts etc. At the end, in my case, I get a jar file thats ready to install. Is that considered to be the artifact ?

Where should I tell my build script to put the jar file ? In the workspace directory ? My jar file gets a unique filename depending on variables like BUILD_ID and such, how can I tell Jenkins which jar file to pick ?

I am a little confused here, would appreciate any explanation or a link to an explanation on the web.

thanks !

EDIT: Okay, so i try to do something like this :

enter image description here

The path does not exist yet in my workspace, because the ant script is suppose to create it, and of course, the .jar and .properties files are not there because they haven't been generated yet. why does it give me an error then ? seems like i'm missing something.

Also, does Jenkins delete the artifacts after each build ? (not the archived artifacts, I know I can tell it to delete those) Otherwise it will clog the hard drive pretty quickly.


Source: (StackOverflow)

How do I extract a tar file in Java?

How do I extract a tar (or tar.gz, or tar.bz2) file in Java?


Source: (StackOverflow)

Tar archiving that takes input from a list of files

I have a file that contain list of files I want to archive with tar. Let's call it mylist.txt

It contains:

file1.txt
file2.txt
...
file10.txt

Is there a way I can issue TAR command that takes mylist.txt as input? Something like

tar -cvf allfiles.tar -[someoption?] mylist.txt

So that it is similar as if I issue this command:

tar -cvf allfiles.tar file1.txt file2.txt file10.txt 

Source: (StackOverflow)

Create a tar.xz in one command

I am trying to create a .tar.xz compressed archive in one command. What is the specific syntax for that?

I have tried tar cf - file | xz file.tar.xz, but that does not work.


Source: (StackOverflow)