Howdy-howdy! I've recently released a 1.0 version of the project I've been busy with for the past 1.5 years and would like to have another set of eyes to look at what I've done here. HgLab is a self-hosted Mercurial server and code collaboration plaform which targets primarily Microsoft-centric software development companies. Basically, it's an "on-premises BitBucket". Any feedback would be much appreciated: http://hglabhq.com
AntonGogolev
Posts
-
HgLab: Site Review Request -
.NET Database MigrationsHi there! I've just released an Alpha 1 of a new .NET database migration toolkit and hope you'll find it interesting. It's pretty much inspired by Ruby on Rails (namely, ActiveRecord Migrations). Most notable features are: a special DSL for writing migrations
migration "Oxite" revision => 1:
version 20090323103239:
oxite_Language:
LanguageID type => Guid, nullable => false, primary-key => true
LanguageName type => AnsiString, length => 8, nullable => false
LanguageDisplayName type => String, length => 50, nullable => falseindex "" columns => \[LanguageName, \[LanguageDisplayName, desc\]\]
automatic version tracking, automatic generation of "downgrade" migrations and generally a very seamless experience while dealing with the DB. Project is open-source (MIT License) and is available at http://code.google.com/p/octalforty-wizardby/[^]
-
.NET 2.0 featuresSomething like that:
using System; using System.Collections.Generic; namespace ConsoleApplication1 { class Program { public static IEnumerable GetAllDivisibleBy(int denominator, int maximumValue) { for(int value = 1; value < maximumValue; ++value) if(value % denominator == 0) yield return value; } static void Main(string[] args) { foreach(int value in GetAllDivisibleBy(7, 61)) Console.WriteLine(value); } } }
And the output is 7, 14, 21, and so forth. What is really interesting, is how it looks like in the compiled code (fire up Reflector and take a look). Here's an extract:[CompilerGenerated] private sealed class d__0 : IEnumerable, IEnumerable, IEnumerator, IEnumerator, IDisposable { // Methods [DebuggerHidden] public d__0(int <>1__state); private bool MoveNext(); [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator(); [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator(); [DebuggerHidden] void IEnumerator.Reset(); void IDisposable.Dispose(); // Properties int IEnumerator.Current { [DebuggerHidden] get; } object IEnumerator.Current { [DebuggerHidden] get; } // Fields private int <>1__state; private int <>2__current; public int <>3__denominator; public int <>3__maximumValue; public int 5__1; public int denominator; public int maximumValue; }
-
The official results: Welcome To CP Internationallycode-frog wrote:
Codeproject maan apnu swagat che - Добро пожаловатьна
Impressive, I should say :rose: Though the part in Russian (which is the last sentance in a sig) is a bit incorrect. It should read "Добро пожаловать на CodeProject"
-
CVS -
Limits on SQL StatementsSQL Server 2000 has a limit on the batch size, which is 65,536 times the network packet size, which is, by default, 4096 bytes, so what we have is somewhere around 256 Mb. So batch size is not an issue in your case. You may try issuing the same batch from Query Analyzer to see the results.
-
Computer administrator\content advisor -
Honor for Louis Braille!That's CODE :)
-
Honor for Louis Braille!Let asterisk denote raised dots and period denote empty cell. So what we have is:
** *. ** *. ** *. *. .* *. ** .*
.. .* .* .* *. ** .* ** .* .. **
.. *. .. .. *. *. *. .. .. .. *. -
GUId of a COM objectTheoretically, it's unique, as they call it, 'both in time and in space', but it depends on the actual algorithm used to generate UUIDs. However, you can be reasonably confident that these are unique.
-
HOT TO TYPE CAST OJBECT TO VARIANTIf you look more closely at VARIANT constructors (more precisely, at
_variant_t
, you'll notice that one of them acceptsIUnknown*
andbool
arguments. This is exactly what you need:pDoc->AddImage(_variant_t(pIImage, true));
-
Screen Recorder -
Wanted - free version control system [edited]David Stone wrote:
Set up Subversion[^]
In fact, you don't even have to set up Subversion as such -- TSVN works perfectly on its own.
-
[Message Deleted]Or password-protect zips :)
-
User - She ?Vikram A Punathambekar wrote:
The former, generally.
And for no other reasons?
-
User - She ?Hello! Out of curiosity, is there any particular reason why a "user" is referred to as "she" in technical documentation? Political correctness or something else?
-
drawing in CRichEditViewis there any way to draw in CRichEditView? OnDraw() is not called either by framework nor after a call to Invalidate(). any ideas? thanks in advance.
-
Odd CEditHello, guys. Check this out:
void CCtrlsDlg::OnDblclkList(NMHDR* pNMHDR, LRESULT* pResult) { LPNMITEMACTIVATE pIA = (LPNMITEMACTIVATE)pNMHDR; *pResult = 0; if((-1 == (m_nItem = pIA->iItem)) || (0 == (m_nSubitem = pIA->iSubItem))) return; CRect rc; m_ctrlList.GetSubItemRect(pIA->iItem, pIA->iSubItem, LVIR_BOUNDS, rc); if(!m_pEdit) m_pEdit = new CEdit; CString strText = m_ctrlList.GetItemText(m_nItem, m_nSubitem); m_pEdit->Create(WS_CHILD | WS_VISIBLE | WS_BORDER, rc, &m_ctrlList, 12); m_pEdit->ModifyStyleEx(0, WS_EX_CLIENTEDGE, 0); m_pEdit->SetWindowText(strText); m_pEdit->SetSel(0, -1); m_pEdit->SetFocus(); }
This whole thing displays an edit box for CListCtrl's subitems, but as CEdit control is created it has some odd look - it looks like edit control from Windows 3.1 rather anything else. Where's the problem? -
MFC Toolbar button textIs there any way of setting toolbar buttons text NOT TO ALL buttons? I mean, buttons which do have text, should have proper size, and buttons which DO NOT have text should be of standard size (something like 24x23 etc.) All my attempts to set button info via CToolbarCtrl::SetButtonInfo() were doomed to failure :).
-
CDAORecordset::Find() troubleCheck this out: ... str.Format("[ProductID] = '%s' AND [Date] = #%s#", m_pSet->m_strProductID, COleDateTime::GetCurrentTime().Format(_T("%#m/%#d/%Y"))); lI = pShop->GetRecordCount(); if(pShop->FindLast(str) == 0) { pShop->AddNew(); pShop->m_lEntryID = lI; pShop->m_dtDate = COleDateTime::GetCurrentTime(); pShop->m_strProductID = m_pSet->m_strProductID; pShop->m_lQuantity = lQ; pShop->Update(); } else { pShop->Edit(); pShop->m_lQuantity += lQ; pShop->Update(); } ... Here's the problem. I try to find a record which has a given ProductID and which was created today. Although THERE ARE such records, nothing is ever found. MSDN says one has to use US date format (month-day-year) even if using non-engish version of MS Jet (I'm from Russia :)), bun nothing is said about how the actual format string should look like. The database was created in MS Access 2K and uses short date format (something like 19.06.1994 - that's the sample in Access). Error 207: Error 208