Tag Info

Hot answers tagged

14

No, the OS and CPU will decide what to run and when. in the simple example you have shown, to the exclusion of other tasks, yes those would most likely run in parallel on separate cores, but there is rarely a guarantee that that will be the case. You can use the thread affinity to attempt to take some control over the allocation of a core to a given ...


14

You cannot guarantee in .Net that two Threads run on two separate cores. In fact, you also cannot guarantee that one Thread will run on only one core(!). This is because managed threads are not the same as OS threads - a single managed Thread may use multiple OS threads to support it. In C#, you only ever deal directly with managed Threads (at least, ...


11

Download and install the latest .NET Framework. For example, you can use the installer for the .NET Framework 4.5 installer. Open a command prompt and change into the installation directory of the .NET Framework. For example: cd \Windows\Microsoft.NET\Framework\v4* Use MSBuild.exe to compile your solution. For example: msbuild ...


11

I believe it stems from home users that may have a "family PC". Kids don't want "Family Tree Maker" and parents don't want "Spongebob Squarepants - the Video Game" on their respective start menus.


10

Word does not natively support syntax highlighting, or other code formatting. As such, it is best to create the highlighting etc in a different program (visual studio, eclipse, notepad++, or this website which can do 14 languages and requires no install). When pasting the text however, doing it directly in the word document itself can lead to headaches like ...


10

Technically, there is no way to prevent something that has already happened, unless you have a time machine. Your question stated that you believe your program has been compromised (past perfect tense) -- this is an action which has already occurred. Preventing an action which has already occurred would involve time travel, because there is no other way that ...


9

Well, I think the answer depends on how the application you're installing has been developed. Does it correctly place all user-created data into appropriate folders under a user's profile, or is it designed to run universally (and store user-created data in a common folder structure such as all users)? Does it rely on registry keys in a user's profile ...


9

"Just for me" should mean that the application installs into a user directory and only creates shortcuts for the current user. This could be useful e.g. when the user does not have admin rights (and therefore can't write into %PROGRAMFILES%, HKEY_LOCAL_MACHINE, and other interesting places). If you force "install for everybody", you may be limiting the ...


9

Using Scheduled Tasks To open Scheduled Tasks -> click Start -> click All Programs -> point to Accessories -> point to System Tools -> click Scheduled Tasks. To schedule a new task: 1. Double-click Add Scheduled Task to start the Scheduled Task Wizard, and then click Next in the first dialog box. 2. The next dialog box displays a list of ...


8

If the machines are this grossly under-powered then I'd make the argument to your superiors that the problems lie in the companies IT provision to staff. I'd say any development time spent on this would be ill-spent.


8

\b means "word boundary" outside of character classes (also called character sets) and "backspace" inside character classes. Here it means a word boundary: \bhello\b Here it means a backspace [\b] See this Microsoft reference: Character Escapes in Regular Expressions. PERL regex has the same definition for \b.


7

Write the program as a Windows service, instead of an application.


7

I would go for ClickOnce. Basically you right click on your project in visual studio and choose publish. You get a simple web-based installer, a start menu shortcut on your clients and an autoupdate feature.


6

Maybe a bit naive, but still... format & reinstal Windows :-)


5

Visual Studio is orientated around projects, so you'd need to add your cs file to a new (empty) project, before you can compile it through Visual Studio.


5

It will likely depend on your audience - and in particular, how many of your users are users of mobile internet. I've found that my IP address on 3G networks changes very often, even though my home IP address doesn't. You should also take into account users who will access your site (I'm assuming you're creating a web site; you've given us no context) from ...


5

Ultimately the answer is: there is no such system. Since the user—owner and administrator—of the computer has full control they can fake anything (with sufficient effort) up to and including any attempts by your software to call home for verification. Remember they can always modify your software (including eliminating checks against such modification) as ...


5

Launching a process when the shutdown was initiated is a bad idea. At this stage the most likely outcome is to get back the error 1115 ERROR_SHUTDOWN_IN_PROGRESS. A much better way is to install a service and register the service to receive shutdown notifications via RegisterServiceCtrlHandlerEx, see shutting down: Service applications receive shutdown ...


5

You can't make it toggle without going into either a macro or other VS extension. However, I always setup VS to comment with Ctrl + / and uncomment to Ctrl + Shift + / You can customize the keyboard shortcuts by going int the "Tools" menu and selecting "Options". Then select "Keyboard" from the "Environment" branch. From there you can bind the ...


5

Here is another solution in the link below: (Creating a Console App in Visual Studio Express 2012 for Web) http://possiblythemostboringblogever.blogspot.com.au/2012/08/creating-console-app-in-visual-studio.html The main point is like: I've installed and am using Visual Studio Express 2012 for Web as my primary IDE for C#. There isn't a template for a ...


5

It might be different in your version, but it should be in the same place:


4

Windows Remote Shell is what you want; http://technet.microsoft.com/en-us/library/dd163506.aspx Once setup, you can go WinRS -r:MYSERVER "cmd.exe" which will run cmd.exe on the remote machine and bring you a remoted console session locally. Alternatively, you could just run any other command directly on the box instead. Actually, if you are need to use ...


4

Issues like this is why we use OSs, it provides a layer of abstraction so you do not need to concern yourself at the application level about things like how the memory is stored on the hardware level. The layers are similar to this (for HDD drives), Each layer shows next to it who is responsible for that layer. File (File system) | ...


4

Like Bob commented: you need desktop version: http://www.microsoft.com/visualstudio/eng/downloads#d-2012-express Here are listed all versions. For some reason, Windows 8 means tiles for microsoft. You can create desktop applications, which work on the "metro" environment on a normal PC, with that "... for windows 8" version.


4

DHCP does not support this. Either your camera will need to support running a DHCP client, or your software will need to ask the user for the static ip that should get assigned to the camera. They may need to reach out to their network admin to find out the proper address.


4

I like to use Notepad++. In NP++, choose the right syntax, right click on the selected code, choose "plugin commands", click "copy text with syntax highlighting". Paste it in Word and you have very good looking code. Source: Best way to show code snippets in word? [closed]


4

You can download an icon plugin for photoshop to save your image as .ICO icon file.



Only top voted, non community-wiki answers of a minimum length are eligible