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
C

computer_nerd

@computer_nerd
About
Posts
23
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • there were times when programming was like this ...
    C computer_nerd

    I'm surprised at how long the bike is able to freewheel round in a circle when she's standing on the saddle and not pedalling

    The Lounge com game-dev hardware algorithms regex

  • Multithreaded code is ridiculous
    C computer_nerd

    I don't know what language you're using but if using .NET much of your headache could be alleviated by using their threading library. The Parallel class takes care of the mundane management of threads and tries to abstract it away. It has methods for looping like Parallel.For where it will allocate a thread for each loop according to what is available. The library tries to optimise the best use of threads according to the system it is running on.

    The Lounge design algorithms regex tutorial question

  • Antivirus Recommendation
    C computer_nerd

    Another vote here for bitdefender. I've noticed no resource hogging. It has occasionally flagged up some malware-infected sites and asked me if I want to proceed, otherwise it sits on the system tray without annoying me and keeps itself up to date. Most importantly it gets top reviews for effectiveness. You have to register and maybe re-register each year.

    The Lounge

  • Raspberry Pi
    C computer_nerd

    I bought a Raspberry Pi 2 Model B plus a case and power supply earlier this year. I have the OpenElec operating system installed on it and it's running KODI media player. It's plugged into my router and into the HDMI port on my TV. I haven't tweaked it yet beyond being able to play videos stored on my NAS. At some point I'll install some KODI plugins and use it to play online media. For anyone that likes the idea of a smart TV but is bothered about the privacy implications or doesn't like the software provided on the TV, it's an ideal solution over which you have total control. The Raspberry Pi is small enough that you could hide it behind your wall-mounted TV. You could power it via USB if your TV has a spare port and you could plug in a usb WIFI dongle if you don't have network connectivity nearby. You can do most operations using your TV remote without having to set anything up, though some people like to buy a wireless keyboard for more control.

    The Lounge php com hardware question

  • Neo4j graph database - any experiences?
    C computer_nerd

    I've been looking at Neo4J recently. I'm not quite sure what you want to achieve but if it helps, individual nodes and relationships can have whatever properties you want or none at all (the equivalent of properties in a sql database would be fields that are part of the hard-coded structure of the table and so are fixed even if they are optional). You can group nodes by assigning labels to them eg "Person". Nodes that have the same label don't have to share the same properties and a node can have as many properties as you like within practical limits. Labels help you to search for nodes or relationships that have something in common. I generally like this kind of tagging because you can use tags to group different objects in different ways which is more fluid than trying to impose a structure that isn't supposed to change. If you download the Neo4J community edition, it comes with a built-in web server that enables you to try out queries in your browser and see a visual representation of the graph

    The Lounge question database com data-structures functional

  • Time to merge memory?
    C computer_nerd

    I don't see a case for merging the two types of storage conceptually even if there was a single device that could deliver both optimal speed and capacity. There is still a valid case for a distinction between persistent storage for the stuff you want to keep until otherwise specified and dynamic storage for stuff that's only temporary in nature as a by-product of various algorithms. The type of storage you want can be specified in your code but the actual implementation of it is more of a side issue. In both cases you have to decide when and how you are going to delete the stuff. That decision is affected by performance issues related to the technology but that sort of thing really ought to be specified as part of a security policy. Turning the power off is a crude way to wipe unwanted RAM, but you'd still want to do that even if it wasn't one of the physical characteristics of the device.

    The Lounge performance question

  • Best way to describe a threaded application ? (diagrams)
    C computer_nerd

    I agree. I read martin Fowler's UML distilled a while ago and activity diagrams are suitable for showing multiple threads. You can branch off and join up again. They look like flowcharts. I think that's the closest UML one for what you want

    The Lounge design question

  • Choosing VCS for Single Developer, Small Projects, Two PC's, Two Locations
    C computer_nerd

    I also use TortoiseHG (the GUI program for use with Mercurial if you don't want to use the command line). Mercurial is a nice easy version control system that is good for a single developer because it's easy to set up. I use it separately from VS2010 and don't really see a benefit in integrating them. See my previous post[^] for more

    The Lounge collaboration visual-studio sysadmin algorithms tools

  • Subversion is a mess : A Rant in E Minor
    C computer_nerd

    In the last week I've done some research on Git and Mercurial and downloaded them both. For what it's worth, Linus Torvalds said in his 2007 Google presentation that only 2 source control systems were worthy of anyone's attention, those two being Git and Mercurial. He hates SVN. I've read in a lot of other places that SVN is out of favour these days. For myself, I've not used it, having only used an old version of MS Visual SourceSafe in the past, but I really like the model of distributed version control and have gone for Mercurial. In a distributed system, you typically create a separate repository on your local machine in your project folder so you'll have a separate one for each project. You can make fast commits (check-ins) to your local repository whenever you want and only push your changes to a shared repository or someone else when you are happy that the code is stable enough to share. That takes care of the dilemma about whether to check in stuff that doesn't work properly yet or just do without source control while trying out new ideas in the code. When you create a Mercurial repository, it adds a subfolder called .hg to the folder you choose, which is where it keeps its data. After your initial commit, Mercurial knows which files have since been added, changed or removed and you can easily tell it to ignore files and subfolders eg your build folders. Each time you commit, it takes a complete snapshot of the folder content and its structure so your are free to move folders around and make whatever changes you want. Therefore no need to worry about your local folder structure being different from the one in source control. I chose Mercurial over Git because Git is made up of several different programs that interact and I prefer mercurial's monolithic program. Git's Windows support is decent now but Mercurial has always been Windows-friendly, is easy to use and well documented and that's the one I chose for my needs. You can use TortoiseHg for Windows Explorer integration and to see a chart showing branches etc. However, even the command line is straight forward enough if you don't have that.

    The Lounge collaboration tutorial question announcement learning

  • is Visual C++ obsolete?
    C computer_nerd

    Me too. I developed GUI software for years with Visual C++/MFC. I'm now learning C#/.NET as that has taken over as the preferred way to develop Windows GUI software. The experience of that development environment is more relevant to me than the language and the languages are very similar anyway. I would find a move to another environment like embedded systems more of a shift than moving from C++ to C# and staying in a familiar environment. Plus if you learn .NET you can also use it for web development. Is VC++ obsolete? Rightly or wrongly, C# has usurped it for now

    The Lounge c++ java question career

  • Online backup - convenience vs paranoia
    C computer_nerd

    As mentioned by Mike Deeks, Truecrypt enables you to store stuff as a big encrypted file. When you mount the content of this file locally using your Truecrypt password, a volume appears in Explorer containing your personal files and you just work with them as normal. All changes are actually saved to the big encrypted file in the background rather than directly to the hard drive. So the benefit here is that you can backup the big encrypted file using DropBox and no-one, including Dropbox will know what it contains. You get the automatic secure cloud backups instead of having to set up a manual backup schedule that asks for a separate encryption password. Encrypted Truecrypt files can be as big as you want and Dropbox will only upload the parts of the file that were changed. Simon makes a good point about advances in technology - once you release your data to the cloud, there is the prospect that in future your supposedly secure encryption will be cracked and your files will be readable by someone else.

    The Lounge visual-studio sysadmin security performance question

  • Are PC applications set to die out?
    C computer_nerd

    I think there is a lot of development around mobile apps at the moment because it is new, not necessarily better. The convenience of mobile access has to be weighed against the limitations of those devices. My stockbroker offers an app with which you can look at some charts and trade on the move. Nice idea but the mobile app is crap compared to the advanced charts you can use on the pc, which uses java webstart so it's not tied to a particular pc. There is no way I could do anything substantial on a tiny mobile screen, assuming I can even read it, so I do need a laptop with a decent screen size, mouse and proper keyboard for that and for other things. Local processing power is a bonus as is the ability to keep some stuff local and decide what, if anything, you want to put on the cloud.

    The Lounge com question

  • Calculators
    C computer_nerd

    I have a 30 year old Boots 425 Scientific[^] with an LED screen which was the recommended one to buy when I was at school. I love it and still use it. Much quicker to use than the one on my phone or pc and has sprung keys that stick out

    The Lounge xml question

  • Smart individuals
    C computer_nerd

    Working as a contractor, the interviewers would often wheel out their guru who would show off their intricate knowledge of the subject and ask specific questions from programming books they have read. To my mind they would be better concentrating on the competencies of a developer that would actually be valuable to them instead of reducing it to a competitive showdown. At work, I've seen many examples of code written by people who have added all kinds of unnecessary bells and whistles to further their knowledge or just because they like to play. Some devs try to be clever but don't comment or document adequately or at all to enable others to understand easily what is going on so they can modify the code. Being a smart-ass at interview is less useful than being able to approach the job with a certain amount of discipline, but that aspect of the job is often not covered.

    The Lounge collaboration help question

  • IE6
    C computer_nerd

    Hi Christian Have you tried PNG Behaviour from Erik Arvidsson? http://webfx.eae.net/dhtml/pngbehavior/pngbehavior.html[^] It works for me. Just copy some code to a file called pngbehaviour.htc, reference it in your .css file like this: img {behavior: url("pngbehavior.htc");} then ie6 can display .png images correctly John

    The Lounge com tools help

  • Classic Arcade Games???
    C computer_nerd

    Have a look at mame[^]. This free open source program is an emulator for old games but does not include the games themselves for copyright reasons. The games or "roms" have to be downloaded from elsewhere, although a few games are available for download from the mame site itself where they have been able to get the all-clear from the original creators. A rom is basically a zip file containing the information from the rom chips of the original arcade machines, although some of the data is taken from other media. The idea of the project is to emulate and preserve the games for posterity so for example you could play the original table-top version of pacman where the display is inverted for player 2. A good starting point for finding roms might be www.mameworld.info[^]. As far as I know it's ok for other sites to host the roms as long as they are not hosted alongside mame itself. Checking on the copyright details for each game is left to the user. The mame project has been running for years and is as close to the real thing as you will get

    The Lounge game-dev question

  • fail to get IHTMLElement from IHTMLFormElement
    C computer_nerd

    Thanks for that. I'll try the extended error info to see what it shows me. You're right - it should skip onto the next one if it fails instead of aborting completely. Both of us are using the same web page to test the program, specifically mailzone.onetel.net.uk which is a simple page containing a single form with a text input element and a password input element. It doesn't seem to matter what the page is though as mine always works and his always fails whatever web page I've chosen. It should be possible to get an interface to an IHTMLElement from the IHTMLFormElement according to the MS documentation, but it won't work on his pc.

    COM html com announcement

  • fail to get IHTMLElement from IHTMLFormElement
    C computer_nerd

    Hi I called him tonight and got him to check the IE version. It is version 7, same as mine. I also asked him to disable all add-ons temporarily but got the same problem. If we both have IE7 and add-ons are not the problem, what other difference could there be on his system that means he gets the E_NOINTERFACE and I don't?

    COM html com announcement

  • fail to get IHTMLElement from IHTMLFormElement
    C computer_nerd

    Hello all I am getting the form objects from internet explorer and want to get all the elements from each form. To do this, I get the form collection from the html document object, get an interface to each form element in the collection then try to get an IID_IHTMLElement interface from the IID_IHTMLFormElement interface in order to get all the elements in the form, as recommended by MS. It all works on my machine and all others I've tried, except that on my friend's pc, the QueryInterface call fails with E_NOINTERFACE. I'm not that proficient in COM, so I wonder if there is something I'm doing wrong here so that it only works on some systems. He assures me that he has IE7 installed so not an old cranky version. Code as follows:

    bool ret = true;
    CComPtr<IHTMLElementCollection> spForms;
    long numForms = 0L;
        CComPtr<IDispatch> spDisp;
    
    // get collection of forms within web page 
    HRESULT hr = spDoc->get\_forms(&spForms.p); 
    if (FAILED(hr) || !spForms)
    {
    	ret = false;
    } 
    
    if (ret)
    {
    	// get number of forms in collection
    	HRESULT hr = spForms->get\_length(&numForms);
    	if (FAILED(hr))
    	{
    		ret = false;
    	}
    }
    
    if (ret)
    {
    	// process each form
    	for (int formNumber = 0; ret && (formNumber < numForms); formNumber++)
    	{
    		BSTR bstr;
    		CString formName;
    		CComPtr<IHTMLElementCollection> spElements;
    		CComPtr<IHTMLFormElement> spFormElement;
    		CComPtr<IHTMLElement> spElement;
    		long numElements = 0L;
    
    		// get next form
    		CComVariant vIdx(0, VT\_I4); 
    		HRESULT hr = spForms->item(CComVariant(formNumber), vIdx, &spDisp.p);
    		if (FAILED(hr) || !spDisp)
    		{
    			ret = false;
    		}
    
    		if (ret)
    		{
    			// get form interface
    			HRESULT hr = spDisp->QueryInterface(
    				IID\_IHTMLFormElement, (void\*\*) &spFormElement.p);
    			if (FAILED(hr) || !spFormElement)
    			{
    				ret = false;
    			}
    		}
    
    		if (ret)
    		{
    			// get form name
    			hr = spFormElement->get\_name(&bstr);
    			if (FAILED(hr))
    			{
    				ret = false;
    			}
    		}
    
    		if (ret)
    		{
    			// need to call IHTMLElement::all() instead of IHTMLFormElement::item(),
    			// otherwise will only get the controls and not all the elements in the form,
    			// such as the labels
    			HRESULT hr = spFormElement->QueryInterface(!!!
    				IID\_IHTMLElement, (void\*\*) &spElement.p);
    			if (FAILED(hr) || !spElement)
    			{
    				// FAILS HERE WITH hr == E\_NOINTERFACE!!!
    				ret = false;
    			}
    
    COM html com announcement

  • Licensing, Obfuscation and Copy Protection Tools
    C computer_nerd

    You're right it's all a question of degree and if a vendor says their system is impossible for anyone to crack, it's either dishonest or they don't really know what they're doing. At least Armadillo tell you exactly what their product does and don't sell it as some kind of magic box. Whether there is a real crack for Armadillo I don't know, but I do know it was cracked in the past once for sure and they fixed the problem. Friends passing keys around is unavoidable unless you generate a key that is locked into the user's hardware so the program can't be used on another machine, but that is an admin nightmare and will probably put people off unless they really need your software. If the key contains the name of the person the software was sold to, at least if it appears on a website somewhere it's obvious who put it there. None of it's foolproof but if you provide software that you want people to pay for and it is easy to continue using it without paying, most people will. If it requires a bit more work, most people won't know how to break it. Armadillo can give you a custom build to help prevent generic crack tools from working on your app. So in general I think some decent protection is better than none.

    The Lounge c++ tools 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