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
F

fordge

@fordge
About
Posts
46
Topics
36
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Problem with assignment using properties... maybe because of IClonable interface
    F fordge

    Consider the following code example class Program { static void Main(string[] args) { StudentInfo stud = new StudentInfo(); stud.Name.FirstName = "zai"; //fails assigns firstname as null stud.name.FirstName = "zai"; //works succesfully } } class NameInfo :ICloneable { private string firstname; public string FirstName { get { return firstname; } set { firstname = value; } } public object Clone() { NameInfo n = new NameInfo(); n.LastName = this.lastname; return n; } } class StudentInfo:ICloneable { public NameInfo name = new NameInfo(); public NameInfo Name { get { if (name != null) return (NameInfo)name.Clone(); else return null; } set { if (value != null) name = (NameInfo)value.Clone(); else name = null; } } public object Clone() { StudentInfo s = new StudentInfo(); s.Name = this.Name; return s; } } the following statement fails when accessing firstname thru Name property stud.Name.FirstName = "zai"; while the one below is ok stud.name.FirstName = "zai"; why?? if I was not using an IClonable interface both of them work....but im not sure its an IClonable issue... is there any rule that says that we souldnt access inner variables through a property of that object?

    C# help tutorial question

  • Using Context Free Grammers
    F fordge

    Suppose I want an application which takes a source file and outputs its data members and functions. Supposed to develop into a kind of class view explorer. Regarding parsing the source file .... should i go for using regular expressions rules for this parsing or should i go for a language representation in context free grammer[CFG] and use the CFG rules for parsing or is there any other possible ideas for source file parsing awaiting advice fordge

    ATL / WTL / STL json

  • Using Context Free Grammers
    F fordge

    Suppose I want an application which takes a source file and outputs its data members and functions. Supposed to develop into a kind of class view explorer. Regarding parsing the source file .... should i go for using regular expressions rules for this parsing or should i go for a language representation in context free grammer[CFG] and use the CFG rules for parsing or is there any other possible ideas for source file parsing awaiting advice fordge

    Article Writing json

  • Using Context Free Grammers
    F fordge

    Suppose I want an application which takes a source file and outputs its data members and functions. Supposed to develop into a kind of class view explorer. Regarding parsing the source file .... should i go for using regular expressions rules for this parsing or should i go for a language representation in context free grammer[CFG] and use the CFG rules for parsing or is there any other possible ideas for source file parsing awaiting advice fordge

    C# json

  • Using Context Free Grammers
    F fordge

    hi Suppose I want an application which takes a source file and outputs its data members and functions. Supposed to develop into a kind of class view explorer. Regarding parsing the source file .... should i go for using regular expressions rules for this parsing or should i go for a language representation in context free grammer[CFG] and use the CFG rules for parsing or is there any other possible ideas for source file parsing awaiting advice fordge

    Collaboration / Beta Testing json

  • Using Context Free Grammers
    F fordge

    hi Suppose I want an application which takes a source file and outputs its data members and functions. Supposed to develop into a kind of class view explorer. Regarding parsing the source file .... should i go for using regular expressions rules for this parsing or should i go for a language representation in context free grammer[CFG] and use the CFG rules for parsing or is there any other possible ideas for source file parsing awaiting advice fordge

    Managed C++/CLI json

  • Using Context Free Grammers
    F fordge

    hi Suppose I want an application which takes a source file and outputs its data members and functions. Supposed to develop into a kind of class view explorer. Regarding parsing the source file .... should i go for using regular expressions rules for this parsing or should i go for a language representation in context free grammer[CFG] and use the CFG rules for parsing or is there any other possible ideas for source file parsing awaiting advice fordge

    C / C++ / MFC json

  • Using Context Free Grammers
    F fordge

    Using Context Free Grammers Suppose I want an application which takes a source file and outputs its data members and functions. Supposed to develop into a kind of class view explorer. Regarding parsing the source file .... should i go for using regular expressions rules for this parsing or should i go for a language representation in context free grammer[CFG] and use the CFG rules for parsing or is there any other possible ideas for source file parsing awaiting advice fordge

    IT & Infrastructure json

  • GetActiveWindow
    F fordge

    Im having a UI with dialogs embedded within other parent dialogs say sub dialogs as tabs of a main dlg I need to do some validation when a current tab is active only so I used CWnd* pWnd = GetActiveWindow(); if(pWnd == this) { //...do something } however the GetActiveWindow returns the parent window handle and not the sub Windows handle as pointed by this how do Isolve this??

    C / C++ / MFC design hardware question

  • using bind2nd function on map
    F fordge

    thankx for that one it worked swell im just into STLs now and most of the adapter tutorials seem to have bind1st operating only on vectors so was just tweaking around with maps n function adaptors i ran into another problem....trying to use the solution above in "transform" suppose i get my data as a space seperated string list say a vector of "one 1" "two 2" "tri 3" "for 4" "fiv 5" and have to parse it into a map<string,string> i tried using the transform function like below

    typedef std::map MyMap;
    typedef std::vector MyVector;
    
    MyMap::value_type ParsetoMap(string str)
    {
    //depending on the blank position
    	string::size_type index = str.find(' ');
    //split into 2 strings
    	MyMap::value_type MyMapPair;
    	MyMapPair.first = str.substr(0, index);                       //key
    	MyMapPair.second = str.substr(index+1, (int)str.length());    //data
    	return MyMapPair;
    }
    void blah2(MyVector & theVec, MyMap const& theMap)
    {
    	transform(theVec.begin(), theVec.end(), theMap.begin(), ptr_fun(ParsetoMap));
    }
    

    but it doesnt work ???

    ATL / WTL / STL question

  • using bind2nd function on map
    F fordge

    in this case it may be geekish yes..but i still find it more readable but there may be more generic adapters where it would be better to use something other than that while loop also most of the bind1st n bind2nd articles deal only with vectors and was finding it hard to reproduce the same on maps and sets anyway here is the solution i got from a fellow coder typedef std::map MyMap; bool KeyEquals(MyMap::value_type value, int DataValue) { return value.second == DataValue; } std::string blah(MyMap const& theMap, int thing) { MyMap::const_iterator it = std::find_if(theMap.begin(), theMap.end(), std::bind2nd(std::ptr_fun(KeyEquals), thing)); return (it==theMap.end())?std::string():it->second; }

    C / C++ / MFC question

  • using bind2nd function on map
    F fordge

    suppose i have a map m; if i need to search for the location using the int data im currently doing map::iterator iter; for(iter=m.begin(); iter !=m.end(); iter++) { if(iter->second == 10) break; } can i replace this with something like this iter = find_if(m.begin(),m.end(),bind2nd(KeyEquals(),10)); in which case what would the KeyEquals function object be like???

    ATL / WTL / STL question

  • using bind2nd function on map
    F fordge

    suppose i have a map m; if i need to search for the location using the int data im currently doing map::iterator iter; for(iter=m.begin(); iter !=m.end(); iter++) { if(iter->second == 10) break; } can i replace this with something like this iter = find_if(m.begin(),m.end(),bind2nd(KeyEquals(),10)); in which case what would the KeyEquals function object be like???

    C / C++ / MFC question

  • multiple key containers??
    F fordge

    say i have a data that i should be able to lookup using EITHER a int key or a string key..i repeat EITHER.. what kind of container should i be using

    ATL / WTL / STL docker question

  • stl multiple key containers?
    F fordge

    say i have a data that i should be able to lookup using EITHER a int key or a string key..i repeat EITHER.. what kind of container should i be using

    C / C++ / MFC c++ docker question

  • icons of task manager??
    F fordge

    the windows task manager application tab shows the application name as wellas the icon associated to that application/process. i was making a listup of the applications that were running [task manager clone] this i did by using the enumWindows API along with checks on the style sof the window handles obtained and it is working however dunno how to display the icon associated with a process. any advice!!

    Visual Basic json tutorial question

  • icons of task manager??
    F fordge

    the windows task manager application tab shows the application name as wellas the icon associated to that application/process. i was making a listup of the applications that were running [task manager clone] this i did by using the enumWindows API along with checks on the style sof the window handles obtained and it is working however dunno how to display the icon associated with a process. any advice!!

    C / C++ / MFC json tutorial question

  • LVN_GETDISPINFO Using SendMessage
    F fordge

    Im trying to get the item details of a CListCtrl m_lst1. Using the foloowing code... only that im not getting any result any suggestions -------------------------//-- char szLabel[256]; NMLVDISPINFO NMLVDispInfo; ZeroMemory(&NMLVDispInfo.item, sizeof(LVITEM)); NMLVDispInfo.hdr.code = LVN_GETDISPINFO; NMLVDispInfo.hdr.hwndFrom = AfxGetMainWnd()->m_hWnd; NMLVDispInfo.hdr.idFrom = AfxGetMainWnd()->GetDlgCtrlID(); NMLVDispInfo.item.iItem = 1; NMLVDispInfo.item.mask = LVIF_DI_SETITEM| LVIF_TEXT; NMLVDispInfo.item.pszText = szLabel; NMLVDispInfo.item.cchTextMax = 255; m_lst1.SendMessage(WM_NOTIFY, (WPARAM)NMLVDispInfo.hdr.hwndFrom, (LPARAM)(LPNMHDR) &NMLVDispInfo); -------------------------//--

    C / C++ / MFC

  • Virus Scanner
    F fordge

    what u r asking me is to keep a list of the proces names that will needed for differnt AV packages the problem with this is that I dont know what package the end user will be using for all i know he maybe using mcAffee or TrendMicro or some other obscure industrial AV solution so i guess maintaining a list of the different processes is out of question ===========================================//== I found out that in Nortons case the "Smart Scan" option has a list of filetype extensions in them so as the NAV agent is started at startup itself when the OS opens any file the AV agent immdeiately scans files if its extension is in the Smart Scan list so that leasd to a conclusion that its not the Office application that calls the AV to start a scan but the AV itself that does this prior to opening the doc ===========================================//== in which case there may not be any generic way to know which is the current AV package installed??? ===========================================//==

    System Admin database windows-admin linux question

  • Virus Scanner
    F fordge

    so if instead of Norton AV suppose another AV is installed say mcAfee or TrendMicro in that case also do the docs get scanned before they r opened? can anyone who has used any other AV package comment on such a feature in which case then indeed it should be a feature of office that calls some generic interface so that the installed AV software is invoked coz else shouldnt my opening a file in notepad also trigger the file to be scanned by Norton AV. can anyone who has used any other AV package comment on such a feature??

    C / C++ / MFC database windows-admin linux question
  • Login

  • Don't have an account? Register

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