instruction stringlengths 0 30k ⌀ |
|---|
|c#|vb.net| |
The intent of using the key is not so much to validate the users as to restrict access to users of the app instead of using any WebBrowser. This is sort of an intranet behavior over the public internet.
This is a poor man's DRM. The losses due to people extracting the key are not that important. I think the risk of ... |
Hudson (the best). [Hudson Website][1]
[1]: https://hudson.dev.java.net/ |
There isn't one. If you really wanted to use the VB InputBox in C# you can. Just add reference to Microsoft.VisualBasic.dll and you'll find it there.
But I would suggest to *not* use it. It is ugly and outdated IMO. |
CruiseControl works reasonably well once you get it configured.
http://cruisecontrol.sourceforge.net/ |
Perhaps <a href="http://resources.businessobjects.com/support/communitycs/TechnicalPapers/pecodes.pdf?recDnlReq=Record&dnlPath=pecodes.pdf">This</a>? (PDF Link - beware)
Found here: (Google cache, as the page appears dead):
http://209.85.173.104/search?q=cache:fyB21Ywrj-MJ:support.businessobjects.com/communityCS/Te... |
C++ should be perfectly capable to cope with method A in almost all situations. I always use it, and I never had a problem.
Method B is, in my opinion, a case of violation of OnceAndOnlyOnce. And, now you need to go figure out whether you're dealing with const reference to write the code that compiles first time.
... |
C doesn't guarantee the order of evaluation of parameters in a function call, so with this you might get the results "1 1" also.
It's safer to write foo(test + 1, test) and then do ++test in the next line. Anyway, the compiler should optimize it if possible. |
C doesn't guarantee the order of evaluation of parameters in a function call, so with this you might get the results "0 1" or "0 0". The order can change from compiler to compiler, and the same compiler could choose different orders based on optimization parameters.
It's safer to write foo(test, test + 1) and then d... |
Search your local system's bash man page for ^INVOCATION for information on which file is going to be read at startup.
man bash
/^INVOCATION
Also in the FILES section,
~/.bash_profile
The personal initialization file, executed for login shells
~/.bashrc
Th... |
Actually the difference between a script ( or a scripting language) and an application is that a script don't require it to be compiled into machine language.. You run the source of the script with an interpreter.. A application compiles the source into machine code so that you can run it as a stand alone application. |
Its not clear if your on a *nix or not.
http://lftp.yar.ru/ is my favorite exploration tool for this.
it can do almost everything bash can do, albeit remotely.
example:
<pre>
$ lftp mirror.3fl.net.au
lftp mirror.3fl.net.au:~> ls
drwxr-xr-x 14 root root 4096 No... |
Sadly this was written for unix/linux users :/
Personally, I would install CYGWIN just to get linux binaries of LFTP/RSYNC to work on windows, as there appears not to be anything that competes with it.
----------
If you get CYGWIN/Linux:
http://lftp.yar.ru/ is my favorite exploration tool for this.
... |
Is it possible to get notifications using [SQL Server Reporting Services][1]? Say for example I have a report that I want by mail if has for example suddenly shows more than 10 rows or if a specific value drop below 100 000. Do I need to tie Notification Services into it and how do I do that?
Please provide as much ... |
Best way of getting notifications in SQL Server Reporting Services using Notification Services |
|sql-server|reporting-services|notificationservices| |
The best thing I can recommend is an awesome cross platform project called 'BuildBot'.
BuildBot can automatically cause a build to occur on every platform you support, every time you check a new revision into your source control system. Have it build on OSX, Linux (ubuntu), Linux (debian), Linux (Redhat), Vista, Win... |
The above method works good.
Another method (I am assuming web here) is to create your page. Add controls to the page. Then while in design mode go to: Tools>Generate Local Resource. A resource file will automagically appear in the solution with all the controls in the page mapped in the resource file.
To create... |
I would recommend converting what you have into something like this:
public class MyClass()
{
private IHelper _helper;
public MyClass()
{
//Default constructor normal code would use.
this._helper = new Helper();
}
public MyClass(IHel... |
Do I need a Mac to to make a Java application bundle? |
|java|macos|deployment| |
I want to create a Java application bundle for Mac without using Mac.
According to [Java Deployment Options for Mac OS X][1], I can do this by using Xcode, Jar Bundler, or from the command line. Once the files and folders are set up, all I need for the command line method is to call /Developer/Tools/SetFile. Is ther... |
You could also base your work on [ogre][1] they provide the abstraction themselves and they have really nice tools. Since this is a projects that's been around for over 6 years I think. The base library is not really for beginners since you need to know a bit about software design, but I found a lot of people that have... |
Look at the routing table? Generally, unless you're routing between the networks in windows (which is possible, but unusual for a client computer these days) the interface that holds the default route is going to have the Internet connection.
Your question didn't detail why or what you're doing this with so I can't ... |
Look at the routing table? Generally, unless you're routing between the networks in windows (which is possible, but unusual for a client computer these days) the interface that holds the default route is going to have the Internet connection.
Your question didn't detail why or what you're doing this with so I can't ... |
Look at the routing table? Generally, unless you're routing between the networks in windows (which is possible, but unusual for a client computer these days) the interface that holds the default route is going to have the Internet connection.
Your question didn't detail why or what you're doing this with so I can't ... |
@Brian Ensink: I don't find code formatted like that easier to read.
int var1 = 1 //Comment
int longerVar = 2 //Comment
int anotherVar = 4 //Command
versus
int var2 = 1 //Comment
int longerVar = 2 //Comment
int anotherVar = 4 //Comment
I find the first lines easier to read... |
I'd probably knock together something using attributes, then a conversion class to convert suitably attributed structures to the bitfield primitives. Something like...
using System;
namespace BitfieldTest
{
[global::System.AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
s... |
Can you check the permissions for your Network Service account? Specifically make sure they have the "Act as part of the OS" permission. If I'm reading the error message correctly, it looks like the NT AUTHORITY\NETWORK SERVICE account failed to execute as a logged on user. It doesn't look like it ever got to the que... |
I would think if you do a find then insert, the extra cost would be when you don't find the key and performing the insert after. It's sort of like looking through books in alphabetical order and not finding the book, then looking through the books again to see where to insert it. It boils down to how you will be handli... |
The script ~/.bash_profile is run on login. |
Also, look for a pre-built LDAP parser. |
If the setting is specified in Apache using php_admin_value it can't be changed in .htaccess or in runtime.
See: [http://docs.php.net/configuration.changes](http://docs.php.net/configuration.changes) |
![alt text][1]
[1]: http://www.userfriendly.org/cartoons/archives/08jun/uf011627.gif |
Hudson is great and free:
http://hudson.dev.java.net/
Bamboo is great but costs $$
http://www.atlassian.com/software/bamboo/ |
I would prefer the first. It looks better in code when two things that essentially do the same thing look the same. Also, it is rare for you to have a non-const object but want to call the const method, so that isn't much of a consern (and in the worst case, you'd only need a const_cast<>). |
Place it in your [bash profile][1]:
~/.bash_profile
[1]: http://www.linuxfromscratch.org/blfs/view/stable/postlfs/profile.html |
To answer my own question with the really simple line I was missing in my confiuration:
Options FollowSymLinks MultiViews
I was missing the MultiViews option. It's there in the Ubuntu default web server configuration, so don't be like me and drop it off.
Also I wrote a quick Rake task to compress all the ... |
Add a reference to Microsoft.VisualBasic, InputBox is in the Microsoft.VisualBasic.Interaction namespace:
string input = Microsoft.VisualBasic.Interaction.InputBox("Prompt", "Title", "Default", 0, 0);
|
Personally, I prefer the first method, because it makes for a more consistent interface. Also, to me getAsConst() sounds just about as silly as getAsInt().
On a different note, you really should think twice before returning a non-const reference or a non-const pointer to a data member of your class. This is an i... |
IMHO the best python xml library is [lxml][1], which wraps libxml2.
Xpath does seem the way to go here, so I'd write this as something like:
from lxml import etree
def getValues(xml, category):
return [x.attrib['value'] for x in
xml.findall('/parent[@name="%s"]/*' % category)... |
.NET: How do I find the Desktop path when Folder Redirection is on? |
|.net| |
I have been using **Environment.GetFolderPath(Environment.SpecialFolder.Desktop)** to get the path to the user's desktop for ages now, but since we changed our setup here at work so we use Folder Redirection to map our users' Desktop and My Documents folders to the server, it no-longer works. It still points to the De... |
It's true that some of the talks out there are very rudimentary, unfortunately some times the bulk of your crowd may need that. I consider myself a novice in a lot of fields, but I've attend talks that I thought were beneath me and still people were asking very basic questions. Perhaps it would be worth having a bi-m... |
Sorry to follow up with a question, but does prefixing interfaces with "I" qualify as hungarian notation? If that is the case, then yes, a lot of people are using it in the real world. If not, ignore this. |
if your animation is simple, change colors over time, move from x to y in 3 seconds. Javascript is fine. If you want all kinds of wizbang buttons and coordinated rotation of the screen, straight up js + dhtml will be clunky at best. Silverlight vs Flash are you questions at that point. Interestingly enough, you program... |
Java has a [LinkedList][1] implementation, that you might wanna check out. You can download the JDK and it's sources at [java.sun.com][2].
[1]: http://java.sun.com/j2se/1.5.0/docs/api/java/util/LinkedList.html
[2]: http://java.sun.com/javase/downloads/index.jsp |
Check out a JS animation framework like Bernard Sumption's [Animator.js][1]. It's pretty light-weight and has some excellent examples.
Personally, I wouldn't be animating things in JS. Flash FTW.
[1]: http://berniecode.com/writing/animator.html |
Avoid flash, its a horrible requirement, uncrawlable by Google, unsopported by a bunch of browsers and systems (eg iPhone) and most importantly: it forces you to reinvent web standards (e.g. scroll bars and whatnot), Javascript on the other hand is easier to maintain and code for in the noscript case.
try [scriptacu... |
Doesn't met all all points you specified but i'll mention it because i think is a good piece of software [http://www.yetanotherforum.net/][1]
[1]: http://www.yetanotherforum.net/ |
Since you are using CI I assume you have already set up a build process properly. What we are doing is that we are using windows boxes as dev machines and CI is running on Solaris. This assures that the code compiles well on multiple platforms. The code is in Java and we don't use any native libraries so it is quite gu... |
Either use your own arbitrary resource type like GIF:
LOGO_GIF GIF logo.gif
then use
rc := tResourceStream.Create(hInstance,'LOGO_GIF','GIF');
or simply use
rc := tResourceStream.Create(hInstance,'LOGO_GIF', RT_RCDATA);
|
Recent JDKs (sadly not JREs) include tools like jstack which does such things. JVMs from version 5 include JMX extensions to get thread dumps, memory statistics, and much more. All java applications, including web start applications, have this functionality available.
You would either need to have the JDK installe... |
Yes, you will have to loop. Alternatively since your tags looks so much like HTML ones you could replace `[b]` for `<b>` and `[/b]` for `</b>` separately. (.){1,}? is the same as (.*?) - that is, any symbols, least possible sequence length. |
Yes, you will have to loop. Alternatively since your tags looks so much like HTML ones you could replace `[b]` for `<b>` and `[/b]` for `</b>` separately. (.){1,}? is the same as (.*?) - that is, any symbols, least possible sequence length.
Updated: Thanks to MrP, (.){1,}? is (.)+?, my bad. |
The best thing is the efficiency with which you can edit code (which is done a lot in programming). The commands such as
- cw to change a word
- dw to delete a word
- ct, to change all text until the next comma
- ci( to change the contents of the parentheses you're currently in
- xp to correct spellin... |
Mocking method results |
|c#|mocking|rhino-mocks| |
I'm trying to find a way to fake the result of a method called from within another method.
I have a "LoadData" method which calls a separate helper to get some data and then it will transform it (I'm interested in testing the transformed result).
So I have code like this:
public class MyClass(){
pub... |
Sadly this was written for unix/linux users :/
Personally, I would install CYGWIN just to get linux binaries of LFTP/RSYNC to work on windows, as there appears not to be anything that competes with it.
As @zadok.myopenid.com
mentioned rsync, this appears to be a windows build for it using CYGWIN ( if you manag... |
Does having many unused beans in a Spring Bean Context waste significant resources? |
|java|spring| |
My model layer is being used by a handful of different projects and I'd like to use a single XML Spring Configuration file for the model regardless of which project is using it.
My question is: Since not all beans are used in all projects am I wasting resources to any significant amount if there not being instantiat... |
I recommend taking a look at [CPAU][1].
> Command line tool for starting process
> in alternate security context.
> Basically this is a runas replacement.
> Also allows you to create job files
> and encode the id, password, and
> command line in a file so it can be
> used by normal users.
You can use it l... |
Use the static method System.Web.UI.ScriptManager.AddStartupScript()
The script will run on all full and partial postbacks. |
[Steve Yegge](http://steve-yegge.blogspot.com/2008/04/settling-osx-focus-follows-mouse-debate.html) wrote an essay about this a while back, where he tried and failed to write a suitable extension. I've since tried to find focus-follows-mouse applications for OS X and failed also. |
Hmm, problems related to the people? Are you referring to usability problems?
Also, if you are doing a beta,it means you already did everything you know (in my opinion). One of the goals of a beta is to show you what you didn't knew, besides unexpected code problems, etc. |
You must remember that DirectX is a collection of technologies - Input, Audio and Graphics. However to most people DX is synonymous with the renderer.
In my opinion D3D (or DirectGraphics) has not really been that hard since DX8. I have not tried DX9 or DX10.
Bernard is right - try to abstract as much as possible... |
@liammclennan
> Which will return IEnumerable. ... Linq-to-sql is an ORM. It does not affect the way that you design an N-tiered application. You use it the same way you would use any other ORM.
Then I guess I am still confused. Yes, Linq-to-Sql is an ORM; but as far as I can tell I am still littering my front e... |
Do you version "derived" files? |
|version-control| |
Using online interfaces to a version control system is a nice way to have a published location for the most recent versions of code. For example, I have a LaTeX package here (which is released to CTAN whenever changes are verified to actually work):
<http://github.com/wspr/pstool/tree/master>
The package itself... |
My preferred python xml library is [lxml][1] , which wraps libxml2.
Xpath does seem the way to go here, so I'd write this as something like:
from lxml import etree
def getValues(xml, category):
return [x.attrib['value'] for x in
xml.findall('/parent[@name="%s"]/*' % category)... |
My preferred python xml library is [lxml][1] , which wraps libxml2.
Xpath does seem the way to go here, so I'd write this as something like:
from lxml import etree
def getValues(xml, category):
return [x.attrib['value'] for x in
xml.findall('/parent[@name="%s"]/*' % category)... |
At [Terracotta][1] we use AOP and bytecode instrumentation pretty extensively to integrate with and instrument third-party software. For example, our [Spring intergration][2] is accomplished in large part by using [aspectwerkz][3]. In a nutshell, we need to intercept calls to Spring beans and bean factories at variou... |
JetBrains TeamCity Pro. http://www.jetbrains.com/teamcity/index.html
The Professional Edition does not require any license key. TeamCity starts running automatically with the Professional Edition Server if no license key is entered in the program. A single Professional Edition Server installation grants the rights ... |
If you are concerned about efficiency, you may want to check out [hash\_map<>][1].
Typically map<> is implemented as a binary tree. Depending on your needs, a hash\_map may be more efficient.
[1]: http://www.sgi.com/tech/stl/hash_map.html |
If you are on OSX, then it's ~/.profile |
Peter Zaitsev posted a [nice article][1] about using the slow query log. One thing he notes is important is to also consider how often a certain query is used. Reports run once a day are not important to be fast. But something that is run very often might be a problem even if it takes half a second. And you cant detect... |
The first allows changes to the variable type (whether it is `const` or not) without further modification of the code. Of course, this means that there is no notification to the developer that this might have changed from the intended path. So it's really whether you value being able to quickly refactor, or having the ... |
|c#|rhino-mocks|mocking| |
I'm trying to find a way to fake the result of a method called from within another method.
I have a "LoadData" method which calls a separate helper to get some data and then it will transform it (I'm interested in testing the transformed result).
So I have code like this:
public class MyClass(){
pub... |
There are several articles on the Internet about developing elevated processes in Vista, but essentially elevation requests involve decorating .NET assemblies and WIN32 executables with elevation status in the application manifest file (may be embedded or side-by-side).
There is an excellent blog post about your que... |
How do I get a list of the active ip-addresses, mac-addresses and netbios names on the LAN? |
|windows|networking|powershell|system-administration|wsh| |
The subjects says it almost all. I'd like to get netbios name, ip and mac addresses for every host on the LAN, preferably not having to walk to every single PC and take note of the stuff myself.
Any idea of to do that with WSH/Powershell/whatever? |
VIsual studio is by far the best IDE but you can also take a look at [Code::Blocks][1]
[1]: http://www.codeblocks.org/ |
open "Active Directory Users and Computers" MMC snap in
expand "computers" section from treeview (left side)
check if the computer is registered in your domain.
Also, you have to login with a domain account on that computer, otherwise that authentication box will be shown. |
How does a program ask for administrator privileges? |
|privileges|vb.net| |
I am working on a small application in VB.NET. The program needs administrator privilege for doing some tasks. Is there a way to ask for administrator privileges during the execution if the program?
What is the general way of changing the user account under which the application is running? |
|windows|vb.net|privileges| |
I wouldn't go down the ntofications services route - it is pretty much a deprecated feature of SQL Server and even if it is around in future it will stagnate. So don't build a dependency on it. |
SharePoint Event when Permissions of ListItems have been changed ? |
Using online interfaces to a version control system is a nice way to have a published location for the most recent versions of code. For example, I have a LaTeX package here (which is released to CTAN whenever changes are verified to actually work):
<http://github.com/wspr/pstool/tree/master>
The package itself... |
In some cases we do, but it's more of a sysadmin type of use case, where the generated files (say, DNS zone files built from a script) have intrinsic interest in their own right, and the revision control is more linear audit trail than branching-and-tagging source control. |
Technically, there is no "connected to the Internet". The real question is, which interface is routeable to a desired address. Right now, you're querying for the "default route" - the one that applies if no specific route to destination exists. But, you're ignoring any specific routes.
Fortunately, for 99.9% of home... |
Take a look here: [Third Party Add-ons][1]
You *may* have to extract the jar using a zip application. Hopefully inside you'll find a collection of XML files.
[1]: http://www.jetbrains.net/confluence/display/RUBYDEV/Third-party+add-ons |
You can do it for Terminal.app by issuing the following command at the command line:
`defaults write com.apple.Terminal FocusFollowsMouse -string YES`
For X11 apps you can do this:
`defaults write com.apple.x11 wm_ffm true`
Apparently there's a program called CodeTek Virtual Desktop that'll emulate it syste... |