Is there any documentation about internal structure of Git index file? From various book I know it's binary and it contains SHAs of staged files, I know about Git 'plumbing' commands helping to reveal index content...
But how about read index by myself using C#, for example?
I know that there several implementations of this feature, so it's possible to study the code:
In Git itself;
In libgit2 written on C;
In GitSharp ported to C# from Java.
And all these options a bit complex, because need to hack around other's code. I would prefer to develop from scratch using data format explanation. If it's possible of cause.
Would appreciate your help very much!
Take a look at Documentation/technical/index-format.txt in the git.git repository:
http://git.kernel.org/?p=git/git.git;a=blob;f=Documentation/technical/index-format.txt;hb=HEAD
Related
Hello I am wanting to translate resource files into a new language. I have looked into this however it doesn't seem to work any more. I was wondering if there is a new way.
I have also found this which seems overkill as you have to pay for it. I have maybe 10 files to translate, and 100 items on each file. Is there a good way to do this pragmatically?
You need an actual bi-lingual human for this.
Machine translation is mostly understandable, but people will know what you did and ridicule you for it unless you're going between closely related languages or languages where Google has a lot of training data.
Google Translate does work. You just need to use their API. and provide credentials
edit
I have maybe 10 files to translate, and 100 items on each file.
If you really only have 10 files to translate, and only need to do it once, and don't mind a machine translation, you can copy and paste them into https://translate.google.com/
You can find sample code for using the Translation API C# library and the steps to set up all prerequisites, including passing your credentials to the library in this quickstart. For additional options, you may refer to the library’s reference.
Is there a (preferably free) .NET library for file compare and that returns enumerable collections off added, changed and deleted lines?
Basically everything beyond compare does but in .NET and returns collections you can interact with.
What you're looking for is a Diff generation library.
I would take a look at DiffPlex.
You'll have to read the files into memory yourself, but it wouldn't be hard to build a wrapper class around DiffPlex so that you can easily use files from that point on...
I've tried looking at DiffPlex, but find that there are a lack of code examples when it comes to Windows forms. I've tried to use the side-by-side but having serious difficulty implementing it. I've even tried contacting author but to no avail. The only sample code example I can find was using the InlineDiffBuilder class from DiffPlex.
It talks about a side-by-side example but only gives you an image. It would be really great if there were more tutorials and examples for this awesome code.
I heard about there being a cs file on the internet from a couple different sources that has all of the syntax in C# in a single file, which would be really good for a crash course to get ready for a job I have. Unfortunately no one could point me to the exact file, has anyone heard or seen anything like this?
Is this the one you're looking for?
http://blogs.msdn.com/b/kirillosenkov/archive/2010/05/11/updated-c-all-in-one-file.aspx
I've found this one useful:
http://www.harding.edu/fmccown/vbnet_csharp_comparison.html
There is updated AllInOne.cs document in official ANTLR grammars repository (with C# 5 & 6 support). Also you can find document with AllInOne in Roslyn.
I need to implement a file based multi-way B-Tree Class for c#. There is similar functionality available for C++ and C but I want to use it in C#. It also need to be available as source code as I wish to use with some alternative .NET implementations like MonoTouch.
If anyone knows of a non file based Multiway b-Tree then this could adapted faily easily to be file based. You make each Multiway page/array of nodes a record/sector in the file. And save them when they change.
Anyone?
From what I've seen the B-Tree isn't widely implemented in C#, but I could be wrong.
However a quick search, turned up this implementation and the comments look positive.
I scrounged up some stuff of CodePlex:
B+ Tree Class
SharpClaw DB Server In C# <- You may need to hunt for it, but there is one implemented in this project.
Create a C# wrapper that calls the C/C++ code?
This appears to be what you are looking for: The WB B-Tree Database for SCM, Java, C#, and C
C5 - http://www.itu.dk/research/c5/
Does anyone know of a "similar words or keywords" algorithm available in open source or via an API? I am looking for something sort of like a thesaurus but smarter.
So for example:
intel
returns:
processor,
i7 core chip,
quad core chip,
.. etc
Any ideas or even something to point me in the right direction in C#?
Edit:
I would love to hear your thoughts, but why cant we just use the Google Adwords API to generate keywords relevant to those entered?
Why not send a search query out to Google and parse what it returns?
Also, check out Google Sets.
There is no algorithm for such a thing. You are going to have to acquire data for a Thesaurus, and load it into a data structure then it is a simple dictionary lookup (you can use the C# Dictionary class for that). Maybe you can look at Wordnet, or Moby Thesaurus as a source for data. Other options are using a Thesaurus server and getting the information online as needed.
You will need a large database containing this information. The rest is simple - look up the input and see what releated words are stored.
The hard part is generating the database. Doing it manually might take years if you want to cover a large number of words and topics.
Generating it is surly non-trivial. Maybe you could try to download web pages and analyze words frequently appearing together, but I assume this will still take months to build, tune, and finally gather good quality data. Maybe extracting links from Wikipedia might be a good source of information because of its semi-structure.
I've made the open office thesaurus functions available for .NET in the NHunspell project. You can use the OO Thesaurus files.
Here is the NHunspell Project