Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
A

AntonGogolev

@AntonGogolev
About
Posts
20
Topics
7
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • HgLab: Site Review Request
    A AntonGogolev

    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

    Running a Business com sysadmin collaboration beta-testing announcement

  • .NET Database Migrations
    A AntonGogolev

    Hi 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 => false

            index "" 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 (Core and Framework)

  • .NET 2.0 features
    A AntonGogolev

    Something 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 Lounge csharp c++ com architecture question

  • The official results: Welcome To CP Internationally
    A AntonGogolev

    code-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"

    The Lounge help

  • CVS
    A AntonGogolev

    My longtime favorite SVN (which can be downloaded here) and a GUI client (over here).

    Web Development java sysadmin collaboration question career

  • Limits on SQL Statements
    A AntonGogolev

    SQL 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.

    Database help c++ database sql-server sysadmin

  • Computer administrator\content advisor
    A AntonGogolev

    It all turned out to be pretty simple :) Hope this or this (or, for that matter, this) will help.

    IT & Infrastructure tutorial

  • Honor for Louis Braille!
    A AntonGogolev

    That's CODE :)

    The Lounge com tutorial question

  • Honor for Louis Braille!
    A AntonGogolev

    Let asterisk denote raised dots and period denote empty cell. So what we have is:

    ** *. ** *. ** *. *. .* *. ** .*
    .. .* .* .* *. ** .* ** .* .. **
    .. *. .. .. *. *. *. .. .. .. *.

    The Lounge com tutorial question

  • GUId of a COM object
    A AntonGogolev

    Theoretically, 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.

    C / C++ / MFC com sysadmin

  • HOT TO TYPE CAST OJBECT TO VARIANT
    A AntonGogolev

    If you look more closely at VARIANT constructors (more precisely, at _variant_t, you'll notice that one of them accepts IUnknown* and bool arguments. This is exactly what you need:

    pDoc->AddImage(_variant_t(pIImage, true));

    C / C++ / MFC help tutorial

  • Screen Recorder
    A AntonGogolev

    Wink

    Hardware & Devices help question

  • Wanted - free version control system [edited]
    A AntonGogolev

    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.

    The Lounge com data-structures collaboration question announcement

  • [Message Deleted]
    A AntonGogolev

    Or password-protect zips :)

    The Lounge

  • User - She ?
    A AntonGogolev

    Vikram A Punathambekar wrote:

    The former, generally.

    And for no other reasons?

    The Lounge question

  • User - She ?
    A AntonGogolev

    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?

    The Lounge question

  • drawing in CRichEditView
    A AntonGogolev

    is 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.

    C / C++ / MFC graphics question

  • Odd CEdit
    A AntonGogolev

    Hello, 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?

    C / C++ / MFC help question

  • MFC Toolbar button text
    A AntonGogolev

    Is 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 :).

    C / C++ / MFC c++ question

  • CDAORecordset::Find() trouble
    A AntonGogolev

    Check 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

    C / C++ / MFC help announcement database
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups