instruction
stringlengths
0
30k
It's not open source, but is free (as in beer): [Sql Effects Accord (aka Clarity) Community Edition][1] [1]: http://www.sqleffects.com/Articles/Product/sqlAccordInfo/aboutSqlAccordCommunityEd.html
Where to put your code - Database v/s Application?
|database|
I have been developing web/desktop applications for about 6 years now. During the course of my career, I have come across application that were heavily written in the database using stored procedures whereas a lot of application just had only a few basic stored procedures (to read, insert, edit and delete entity record...
Where to put your code - Database vs. Application?
|database|
In most firewall setups, the TCP connection will be torn down by the firewall if it is idle to conserve resources. The idle timeout is probably not something you can control. Some will tear them down if they are idle and a resource limit is being hit. Most corp environments won't allow any machines to make an outbou...
[PHP Benchmarks][1] [1]: http://www.php.lt/benchmark/phpbench.php
No, due to page splits. You're essentially defining rows that can be 1KB - n MB so your database will have a lot of empty spaces in its pages which is bad for performance.
You should use a value type whenever: - The use of a class isn't necessary (no need for inheritance) - You want to make sure there's no need to initalize the type. - You have a reason to want the type to be allocated in stack space - You want the type to be a complete independent entity on assigment inste...
Plain text files in a filesystem - Very simple to create and edit - Easy for users to manipulate with simple tools (i.e. text editors, grep etc) - Efficient storage of binary documents ---------- XML or JSON files on disk - As above, but with a bit more ability to validate the structure. ----...
Plain text files in a filesystem - Very simple to create and edit - Easy for users to manipulate with simple tools (i.e. text editors, grep etc) - Efficient storage of binary documents ---------- Spreadsheet / CSV file - Very easy model for business users to understand ---------- XML or JS...
Unless your site is expecting an above-normal amount of Linux-based traffic, you're probably going to adversely affect more people if you "sacrifice the user’s ability to adjust his or her reading environment" as opposed to just not caring about the Linux experience. Having said that, if you **do** want a nice Linux...
I'd second @Zizzencs suggestion that you might want something that's not totally (R)DB-centric Somehow, I believe that using plain nvarchar fields to store that tags with some proper caching/indexing might yield faster results. But that's just me. I've implemented tagging systems using 3 tables to represent a Man...
Impersonate will change the Thread context. If you want to change the identity and launch a separate process, you will have to use runas command. The .NET Developer's Guide to Windows Security by Keith Brown is an excellent read which describes all the security scenarios. [Online version][1] is also available. ...
@dagorym: Aw, man. I had been hanging onto this as a good "I'm bored, what can I ponder" puzzle. I came up with my in-place transposition code, but got here to find yours pretty much identical to mine...ah, well. Here it is in Ruby. require 'pp' n = 10 a = [] n.times { a << (1..n).to_a } ...
Programming to an interface means respecting the "contract" created by using that interface. And so if your `IPoweredByMotor` interface has a `start()` method, future classes that implement the interface, be they `MotorizedWheelChair`, `Automobile`, or `SmoothieMaker`, in implementing the methods of that interface, add...
A couple of things we've seen - more about differences between interactive vs services, but might help... One thing we've seen that does not seem relevant is the difference with what is on the user vs system path. Another thing we've seen relates to temporary files - the service we had was creating lots in the w...
`Var` is absolutely needed for Linq: var anonEnumeration = from post in AllPosts() where post.Date > oldDate let author = GetAuthor( post.AuthorId ) select new { PostName = post.Name, post.Date, AuthorName = author.Name }; ...
I think you are referring to the [Assembly Manifest][1]: > Every assembly, whether static or > dynamic, contains a collection of data > that describes how the elements in the > assembly relate to each other. The > assembly manifest contains this > assembly metadata. An assembly > manifest contains all the meta...
Don't worry about VSS corrupting you, worry about VSS corrupting your data. It does not have a good track record in that department. Back up frequently if you do not switch to a different version control system. Backups should be happening daily even with other SCMs, but it's doubly important with VSS.
Looks like SubVersion is the winner here. I'd do yourself a favor and use [VisualSVN Server][1]. It's free and will save you a bunch of installation headaches. [1]: http://www.visualsvn.com/server/
You can use some hacks to **authenticate** only. Try Dim directoryEntry as New DirectoryEntry("LDAP://DomainController:389/dc=domain,dc=suffix", "username", "password") Dim temp as Object = directoryEntry.NativeObject return true Catch return false End Try If the us...
After spending some more time on this I agree with @grapefrukt. Setting wmode to transparent leads to all sorts of strange issues and in my opinion it should be avoided. Instead I've resorted to passing the background color as a parameter. I use the following ActionScript to draw the background. var paramete...
After spending some more time on this I agree with @grapefrukt. Setting wmode to transparent leads to all sorts of strange issues and in my opinion it should be avoided. Instead I've resorted to passing the background color as a parameter. I use the following ActionScript to draw the background. var paramete...
If you only have 2 people, and you mostly work independantly, git is going to give you a lot more flexibility, power, and be far and away the fastest to work with. It is however a pain in the backside to use. Using VSS you're obviously programming for windows - if you're doing Win32 API stuff in C then git will be a...
|deployment|web-application|administration|maintenance|
I am aware of [Capistrano](http://www.capify.org/) but it is a bit too heavyweight for me. Personally I set up two [Mercurial](http://www.selenic.com/mercurial/wiki/) repositories, one on the production server and another on my local dev machine. Regularly, when a new feature is ready, I push changes from repository on...
|deployment|web-applications|administration|maintenance|
C#: What Else Do You Use Besides DataSet
|c#|.net|sql|dataset|
I've found myself increasingly unsatisfied with the DataSet/DataTable/DataRow paradigm in .Net, mostly because it's often a couple of steps more complicated than what I really want to do. In cases where I'm binding to controls, DataSets are fine. But in other cases, there seems to be a fair amount of mental overhead....
|c#|.net|sql|dataset|
Handling XSD Dataset ConstraintExceptions
|xsd|dataset|constraintexception|
Does anyone have any tips for dealing with ConstraintExceptions thrown by XSD datasets? This is the exception with the cryptic message: System.Data.ConstraintException : Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.
|xsd|dataset|constraintexception|
Arbitrary Naming Convention Question About Business Objects
|c#|oop|naming|object|
Ok, do you do Business.Name or Business.BusinessName SubCategory.ID or SubCategory.SubCategoryID What about in your database? Why? I'm torn with both. Would love there to be a "right answer"
|c#|oop|naming|object|
Creating a custom button in Java
|java|button|
Is there a way to make a JButton with your own button graphic not just with an image inside the button? If not is another way to create a custom button in java?
|java|button|
protected override void LoadViewState(object savedState) { // Put your code here before base is called base.LoadViewState(savedState); } Is that what you meant? Or did you mean in what order are the controls processed? I think the answer to that is it quasi-random.
protected override void LoadViewState(object savedState) { // Put your code here before base is called base.LoadViewState(savedState); } Is that what you meant? Or did you mean in what order are the controls processed? I think the answer to that is it quasi-random. Also, why can'...
I've just been shown this: # dig +trace ns stackoverflow.com ; <<>> DiG 9.2.4 <<>> +trace ns stackoverflow.com ;; global options: printcmd . 269431 IN NS B.ROOT-SERVERS.NET. . 269431 IN NS C.ROOT-SERVERS.NET. . ...
Possibly a bit heavy for your immediate needs, but have you seen the [Polar bear][1]*? Well worth a browse in the library to see if it's what you require. *[Information Architecture for the World Wide Web, Second Edition] [1] [1]: http://oreilly.com/catalog/9780596000356/
Plain text files in a filesystem - Very simple to create and edit - Easy for users to manipulate with simple tools (i.e. text editors, grep etc) - Efficient storage of binary documents ---------- XML or JSON files on disk - As above, but with a bit more ability to validate the structure. ----...
Exactly what most other people use them for.. Fast and light data/value access. As well as being ideal for making grouping properties (where it makes sense of course) into an object. For example: * Display/Data value differences, such as String pairs of image names and a path for a control (or whatever). You want...
Value types, specifically, structs and enums, and have proper uses in object-oriented programming. Enums are, as aku said, first class citizens in .NET, which can be used from all sorts of things from Colors to DialogBox options to various types of flags. Structs, as far as my experience goes, are great as Data T...
WPF is part of the .net 3.0 stack. Its microsoft's next generation Graphical User Interface system. All the information you need can be found on [wikipedia][1] and [msdn's wpf site][2] To Get Started programming I guess check out the [essential downloads on windows client][3] [1]: http://en.wikipedia.org/wik...
In your comparison between `IEnumerable<int>` and `IEnumerable<double>` you don't need to worry - if you pass the wrong type your code won't compile anyway. There's no concern about type-safety, as `var` is **not** dynamic. It's just compiler magic and any type unsafe calls you make will get caught. `Var` is abs...
In your comparison between `IEnumerable<int>` and `IEnumerable<double>` you don't need to worry - if you pass the wrong type your code won't compile anyway. There's no concern about type-safety, as `var` is **not** dynamic. It's just compiler magic and any type unsafe calls you make will get caught. `Var` is abs...
Pros & cons between LINQ and traditional collection based approaches
|c#|linq|
Being relatively new to the .net game, I was wondering, has anyone had any experience of the pros / cons between the use of LINQ and what could be considered more traditional methods working with lists / collections? For a specific example of a project I'm working on : a list of unique id / name pairs are being re...
A service may have multiple endpoints within a single host but every endpoint must have a unique combination of address/protocol/contract. For an IIS-hosted service (i.e., an .SVC file), just set the address of the endpoint to a **relative** URI and make sure that your Visual Studio or wsdl.exe generated client specifi...
A service may have multiple endpoints within a single host but every endpoint must have a unique combination of address/binding/contract. For an IIS-hosted service (i.e., an .SVC file), just set the address of the endpoint to a **relative** URI and make sure that your Visual Studio or wsdl.exe generated client specifie...
Possible to perform cross-database queries with postgres?
|sql|postgresql|
I'm going to guess that the answer is no based on the below error message (and [this google result][1]), but is there anyway to perform a cross-database query using postgres? databaseA=# select * from databaseB.public.someTableName; ERROR: cross-database references are not implemented: "databaseB.pub...
Can a service have multiple endpoints?
|wcf|web-services|
We have a service that has some settings that are support only over net.tcp. What's the best way to add another endpoint? Do I need to create an entire new host?
|wcf|web-services|.net|.net3.0|
|.net|web-services|wcf|
You linked to the [check digits][1] project, and using the "encode" function seems like a good solution. It says: > encode may throw an exception if 'bad' data (e.g. non-numeric) is passed to it, while verify only returns true or false. The idea here is that encode normally gets it's data from 'trusted' internal so...
I guess it depends on the technology you select. For web projects in general I've always employed (Web-)MVC for the past two years or so. The advantage being a clear seperation of frontend and backend in order to create a managable code base. But that's as vague as a recommendation could be. :) Aside from using a...
Actually prior to .net 3.5 SP1 there has been a performance issue with the intensive use of value types as mentioned here in [Vance Morrison's blog](http://blogs.msdn.com/vancem/archive/2008/05/12/what-s-coming-in-net-runtime-performance-in-version-v3-5-sp1.aspx). As far as I can see the vast majority of the time yo...
ActiveRecord
|php|database|
Does anyone have any recommendations for implementations of ActiveRecord in PHP? I've been using [CBL ActiveRecord][1], but I was wondering if there were any viable alternatives. [1]: http://31tools.com/cbl_activerecord/
I have used [OpenCV][1] to load video files and process them. It's also handy for many types of video processing including those useful for computer vision. [1]: http://sourceforge.net/projects/opencvlibrary/
For the most part, it's good to emulate the behaviour of the framework. Many elementary data types such as `int`s are value types. If you have types that have similar properties, use value types. For example, when writing a `Complex` data type or a `BigInteger`, value types are the logical solution. The same goes for t...
Try using the [OpenCV](http://opencvlibrary.sourceforge.net/) library. It definitely has the capabilities you require. [This guide](http://www.cs.iit.edu/~agam/cs512/lect-notes/opencv-intro/index.html) has a section about accessing frames from a video file.
This isn't supposed to be reliable - but try ::GetDesktopWindow() as the parent (it returns a HWND). Be warned - if your app crashes, it will bring down the desktop with it. But i'd be interested to see if it works.
|c#|.net|linq|
[ASP.NET] How to access controls in listview's layouttemplate?
|asp.net|listview|
How do I set a property of a user control in listview's layouttemplate from codebehind? <asp:ListView ...> <LayoutTemplate> <myprefix:MyControl id="myControl" ... /> </LayoutTemplate> ... </asp:ListView> I want to do this: myControl.SomeProperty = somevalue;
I love emacs and use it every day. That said, I don't think the cost of learning it will be recouped by productivity gains down the road. If you're programming Java, you need a good IDE. Emacs goes a fair way towards being one, but let's face it, IDEA et al beat it hands down. (emacs probably inspired a lot of th...
Some ways to debug: * Is there any additional information in the Windows events log? * I believe you should be able to listen to some kind of global-exception event like Application_Exception in windows services. I can't remember the exact name but you can atelast dump stack trace from there. * You should be able ...
It's one way to promote loose [coupling][1]. > With low coupling, a change in one module will not require a change in the implementation of another module. A good use of this concept is [Abstract Factory pattern][2]. In the Wikipedia example, GUIFactory interface produces Button interface. The concrete factory m...
getchar(), or cgetc(), depending on the platform
Rsync can exclude files matching certain patters. Even if you can't modify it to make it download files to a temporary directory, maybe it has a convention of naming the files differently during download (for example: `foo.downloading` while downloading for a file named `foo`) and you can use this property to exclude f...
@Matt Sheppard: Say you have a table of customers. Surely you don't want a customer to exist in the table more than once, or lots of confusion will happen throughout your sales and logistics departments (especially if the multiple rows about the customer contain different information). So you have a customer iden...
Ticket Tracking Software w/ Good Email Integration and Decent Navigation?
|bug-tracking|email|ticket-system|
I am looking for a simple system to manage inbound emails from a support mailbox for a group with about 3 support people. I've looked at [OTRS][1] which seems to have the features that we need. Unfortunately, so far the UI still looks like a confusing mess. Are there any good FOSS tools that would meet this need? ...
@[Mark Biek](#40659) Your keyExists closely matches my standard Exists() function. To make the class more useful for COM-exposed collections and checking for numeric indexes, I'd recommend changing sKey and myCollection to not be typed. If the function is going to be used with a collection of objects, 'set' is require...
@[Mark Biek](#40659) Your keyExists closely matches my standard Exists() function. To make the class more useful for COM-exposed collections and checking for numeric indexes, I'd recommend changing sKey and myCollection to not be typed. If the function is going to be used with a collection of objects, 'set' is require...
Use or extend System.ComponentModel.BackgroundWorker: <http://msdn.microsoft.com/en-us/library/system.componentmodel.backgroundworker.aspx> Personally, I find this to be the easiest way to perform asynchronous operations in client apps. (I've used this in WinForms, but not WPF. I'm assuming this will work in WP...
Given the XPath functions that you're calling which I don't remember having the luxury of in my MSXSL work, it looks like you're using an XPath 2-compatible processor. If that's the case, doesn't XPath 2 have a replace(string, pattern, replacement) function that takes a regex as a second parameter? <xsl:...
Given the XPath functions that you're calling which I don't remember having the luxury of in my MSXSL work, it looks like you're using an XPath 2-compatible processor. If that's the case, doesn't XPath 2 have a replace(string, pattern, replacement) function that takes a regex as a second parameter? <xsl:...
If you remove the metadata the framework won't be able to load your code, or figure out which other assemblies it references, or anything like that, so no, that's not a good idea. Obfuscators will make it a lot harder for an 'attacker' to decompile your code, but at the end of the day if someone is motivated and sma...
Learning FORTRAN In the Modern Era
|fortran|
I've recently come to maintain a large amount of scientific calculation-intensive FORTRAN code. I'm having difficulties getting a handle on all of the, say, nuances, of a forty year old language, despite google & two introductory level books. The code is rife with "performance enhancing improvements". Does anyone ha...