I find application - compare two txt files and result is only changes line or line exists in one file. Exists?
Related
I have a text file seperated by several lines. Its sort of like an XML file, just custom made.
It looks something like this:
<Time1>
-Schedule: 8:00 PM
-What: Doctor
<Time2>
etc...
Can someone show me an example of how I would parse this file? What I wanted to do is the following:
I have five time locations Time1, time2, etc... They each have the category -Shedule and -What. I want to sort through all the Times. In each time I want to extract the info that appears AFTER -schedule and AFTER -what (EG: 8:00PM, Doctor) and insert it into the registry. The registry would be formed like:
HKLM Schedulertime\ With sub directories of Time1, time2, etc... In each time there would be a string (I guess) of Shedule and of What. And the script would insert the values into each time in the registry.
Can someone write a script showing me how its done? Thanks in advance.
Does anybody know about way to merge two MP4 video files directly in the phone? i've tried cat in Terminal emulator, it joined the files, but than the playbackl stops after the first file contained in the result, quite logically.
Anybody has some other way?
I know that mencoder can join two clips, but I can't find android binary for it.
Hello,
Have you found how it can be done?
Regards,
Ruslan
i thinkg you will remove head from 2nd-file before merge
Wouldn't it require the removal of the MP4 headers though?
I tryied it:
1. Create new file.mp4
2. Copy first.mp4 into file.mp4 (A read full bytes from file and write it)
3. Repeat point 2 fot second.mp4
Yes, it is stupid.. But this file will be played by Windows Media Player(I tested it).
So, How can I undestand what kind of bytes is header of second.mp4?
Does mp4 contains special separator?
I am afraid, that it simply stops playing the final product at "the right time", marked by header in the beginning of the file (=first clip). I think that to merge them without reencoding, we would have to "clip" the second header & redo the first one, to match the total length.
May be do you know some Android plugins(I mean .jar files e.g. ) witch can merge mp4 files or 3gp..?
I know, that mencoder can join two MP4 files quite easily. But I can't find any version working on Android.
If anyone found out a solution please share it here
no, nobody did I believe. To merge two MP4s you need to modify at least the header, probably even more. What we need is ffmpeg, which can be run in the terminal.
When I search in the wp7 forum I see few thread about file association in wp7 but I just remark that it's not so difficult to do using the excellent wp7 root tools SDK:
Code:
string Me = "1ff297cf-853f-4c7c-b9ca-1d255cb4c387".ToUpper(); //our Application's AppId
string Format = ".xml";
//set the defaut file association for .xml to FileAssoc instead of xmlfile
Registry.SetValue(RegistryHyve.ClassesRoot, Format, "Default", "FileAssoc");
//create the corresponding registry key
try { Registry.DeleteKey(RegistryHyve.ClassesRoot, "FileAssoc"); }
catch { }
Registry.CreateKey(RegistryHyve.ClassesRoot, "FileAssoc");
//create the key BrowseInPlace (I don't know why, I just do it, it takes one line)
Registry.SetValue(RegistryHyve.ClassesRoot, "FileAssoc", "BrowseInPlace", 0x0);
//and the app that must open .xml file (our app)
Registry.CreateKey(RegistryHyve.ClassesRoot, "FileAssoc\\shell\\open\\command");
Registry.SetValue(RegistryHyve.ClassesRoot, "FileAssoc\\shell\\open\\command", "Default", "app://" + Me + "/_default?type=FileAssoc&file=%s");
But if each application try to play with those settings it wil be the mess in the phone that's why I suggest that someone create an app that manage file associations for the user to choose what application he want use for a given file type and to support more file type (like .epub or .rar).
moreover the application that create File association must use native code but it's not necessarily the case for the application that read the file it would allow developers to publish this app on the marketplace (by adding an other source like skydrive or url) and the application that create File association would just be a big plus for Interop-unlocked phones.
Here is an app that display xml file in a textbox it's just an exemple of how it works:
fbe.am/8ld ==> xap
fbe.am/8le ==> source
What do you think ?
I actually knocked up an app very similar to this a little while ago, I didn't get around to finishing it but it was fully capable of searching the registry and compiling a list of known file extensions. As well as searching the installation directories of app's for certain .xml which contained the file extension that the app wanted to be associated with.
It was all written as a managed app, and I don't know if someone would want to look at it, but if there is some interest I can put it up.
If this is in the wrong section please delete/move. This seems the best fit to me. At any rate, Ive been using http://developer.android.com/training/basics/firstapp/building-ui.html to learn how to build an apk, but I havent found anything that shows how to import your own images and such. Id like to import my own background as apposed to the one provided by default. Any help is greatly appreicated!
Try this,
In the layout tag in the xml file, add this
android:background="@drawable/image">
and put the image.jpg or any other format in the drawable folder.
returns the error
[2012-08-26 23:46:09 - V.I.C.T.O.R.Y. TOOLS] /home/sniper_5/workspace/V.I.C.T.O.R.Y. TOOLS/res/layout/activity_victorytool.xml:1: error: Error: No resource found that matches the given name (at 'background' with value '@drawable-xhdpi/Background1').
a great tool to find differences in files and folders when tinkering or tweaking those roms.
http://sourcegear.com/diffmerge/downloads.php
Summary
DiffMerge is an application to visually compare and merge files and folders on Windows, Mac OS X, and Linux.
Diff: Graphically shows the changes between two files. Includes intra-line highlighting and full support for editing.
Merge: Graphically shows the changes between 3 files. Allows automatic merging (when safe to do so) and full control over editing the resulting file.
Folder Diff: Performs a side-by-side comparison of 2 folders, showing which files are only present in one file or the other, as well as file pairs which are identical, equivalent or different.
Windows Explorer/Shell Integration: Right-click on any two files or folders in Windows Explorer to diff them immediately.
Configurable: Rulesets and options provide for customized appearance and behavior.
International: DiffMerge is a UNICODE-based application and can import files in a wide range of character encodings.
Cross-platform: Identical feature set on Windows, Mac OS X, and Linux.