instruction stringlengths 0 30k ⌀ |
|---|
I've used a WordPress blog and a Screwturn Wiki (at two separate jobs) to store private, company-specific KB info, but I'm looking for something that was created to be a knowledge base. Specifically, I'd like to see:
- Free/low cost
- Simple method for users to subscribe to KB (or just sections) to get updates... |
[Cerberus](http://www.cerberusweb.com/) - it's more a full featured Help Desk/Issue Tracking system but it has a nice KB solution built in. It can be free but they do have a low cost pay version that is also very good. |
Split String in SQL |
|sql| |
Using SQL Server 2005, how do I split a string so I can access item x.
For example, take the string "Hello John Smith". How can I split the string by a space and access item 1 which should return "John"? |
The OBJECT_ID function returns the internal object id for the given object name and type. 'tempdb..#t1' refers to the table #t1 in the tempdb database. 'U' is for user-defined table.
<pre>
IF OBJECT_ID('tempdb..#t1', 'U') IS NOT NULL
DROP TABLE #t1
CREATE TABLE #t1(
id INT IDENTITY(1,1),
msg VARCHAR(25... |
If Object_Id('TempDB..#TempTable') Is Not Null
Begin
Drop Table #TempTable
End |
You may find this CodeProject [solution][1] helpful.
[1]: http://www.codeproject.com/KB/database/SQL_UDF_to_Parse_a_String.aspx |
I think Drupal is a very possible choice. It has a lot of built-in support for book-type information capturing.
And there is a rich collection of user generated modules which you can use to enhance the features.
I think it has almost all the features you ask for out of the box. <http://drupal.org/features> |
Use subversion, it's easy to setup, easy to use, and has plenty of tools. Any future revision system will have an import from SVN feature, so it isn't like you can't change down the road if your needs grow. |
Go for SVN. If you have never used source control before, it won't matter to you one way or the other.
Also, there is not a large amount of learning involved in using a Source Control system. If you learn one, you can easily switch over to another at a later date.
SVN is a great tool, and it should take care of m... |
I've written a database generation script in sql, and want to execute it in my Adobe air application:
Create Table tRole (
roleID integer Primary Key
,roleName varchar(40)
);
Create Table tFile (
fileID integer Primary Key
,fileName varchar(50)
,fileDescription varchar(500)
,th... |
|apache-flex|actionscript-3|air| |
I don't understand why you would want to do this. It sounds almost like cargo cult coding.
Converting a CSV file to XML doesn't add any value. Your program is already reading the CSV file, so arguing that you need XML doesn't work.
On the other hand, reading the CSV file, doing _something_ with the values, and th... |
This is one of the "hard problems" surrounding development. As far as I know there are no perfect solutions.
If you only need to store the database structure and not the data you can export the database as SQL queries. (in Enterprise Manager: Right click on database -> Generate SQL script. I recommend setting the "... |
Hey, I'm still stuck in that camp too. The third party application we have to support is FINALLY going to 2K5, so we're almost out of the wood. But I feel your pain 8^D
That said, from everything I heard from our DBA, the key is to convert the database to 8.0 format first, and then go to 2005. I believe they used th... |
The first document to read and digest is [the Mem management guide][1], understand this before moving on. [This][2] is a great guide to objective-c too. Infact the developer site at Apple is very good - but you would probably want to read the Hillegas book first.
In regards to Xcode vs Visual Studio - they are diffe... |
Programming Glossary |
|language-agnostic|glossary|terms| |
As I browse through the site, I find a lot of terms that many developers just starting out (and even some advanced developers) may be unfamiliar with.
It would be great if people could post here with a term and definition that might be unknown to beginners or those from different programming backgrounds.
Some no... |
Looking for a specific FireFox extension / program for Form posting |
|javascript|html|hacking| |
I am looking for either a FireFox extension, or a similar program, that allows you to craft GET and POST requests. The user would put in a form action, and as many form key/value pairs as desired. It would also send any cookie information (or send the current cookies from any domain the user chooses.) The Web Developer... |
- [http://en.wikipedia.org/wiki/Boxing_(Computer_science)#Boxing][1]
- [http://en.wikipedia.org/wiki/Tuples][2]
- [http://en.wikipedia.org/wiki/Orthogonal#Computer_science][3]
- [http://en.wikipedia.org/wiki/Domain_driven_design][4]
- [http://en.wikipedia.org/wiki/Test_driven_development][5]
Someone ma... |
Google Analytics Access with C# |
I have tried both methods with a large commercial application.
**The better method: The trunk should be always stable.**
Here are some guidelines and benefits of this method:
- Code each task (or related set of tasks) in its own branch, then you will have the flexibility of when you would like to merge thes... |
NOTE: This isn't really an answer, just an attempt to clarify what might actually be causing the performance problem(s).
90,000 records is really a fairly small data set and the query is relatively simple with just two join. Do you have indexes on CustomerAddress.CustomerId and CustomerAccount.CustomerId? That seems... |
Prototyping hybrid Python code |
|python|fortran|prototyping|swig|ctypes| |
I have been mulling over writing a peak fitting library for a while. I know Python fairly well and plan on implementing everything in Python to begin with but envisage that I may have to re-implement some core routines in a compiled language eventually.
Python is pretty liberal in allowing functions, functors, objec... |
|python|prototyping|swig|ctypes|fortran| |
I have been mulling over writing a peak fitting library for a while. I know Python fairly well and plan on implementing everything in Python to begin with but envisage that I may have to re-implement some core routines in a compiled language eventually.
IIRC, one of Python's original remits was as a prototyping lang... |
I've read somewhere the human eye can't distinguish between less than 4 values apart. so This is something to keep in mind. The following algorithm does not compensate for this.
I'm not sure this is exactly what you want, but this is one way to randomly generate non-repeating color values:
(beware, inconsistent p... |
You can try turning CheckConstraints off on the DataSet (it's in its properties), or altering the properties of that relationship, and change the key to a simple reference - up to you. |
You may already be doing this, but I would think the easiest way to do this would be to do:
<VirtualHost IP:IP>
Stuff,
More Stuff,
ErrorLog /path/where/you/want/it.log
</VirtualHost>
If there is no leading "/" it is assumed to be relative.
[Apache Error Log Page][1]
[1]:... |
I don't know the ASP.NET side of the problem but .NET has a pretty powerful class: [System.Globalization.CultureInfo][1]. You can use the following code to parse a string containing a double value:
double d = double.Parse("100.20", CultureInfo.CurrentCulture);
// -- OR --
double d = double.Parse("100.... |
You can't please everyone. If I enter ten as 10.000, and someone enters ten thousand as 10.000, you cannot handle that without some knowledge of the culture of the input. Detect the culture somehow (browser, system setting - what is the use case? ASP? Internal app, or open to the world?), or provide an example of t... |
Another function, not my me but found on the web and a bit refined:
public static int GetAge(DateTime birthDate)
{
DateTime n = DateTime.Now; // To avoid a race condition around midnight
int age = DateTime.Now.Year - birthDate.Year;
if (n.Month < birthDate.Month || (n.Mo... |
|c#|api|google|analytics| |
I know that there is no official API for Google Analytics but maybe someone has figured out a way to access Google Analytics Reports with C#?
Thank you in advance! |
Cocoa is huge. The hardest part of learning how to write apps on Mac is learning Cocoa. By the way. You do not need to know ObjC (though it helps tons). You can write Cocoa apps with Python or Ruby (right in the IDE).
I agree VS is a better IDE then Xcode. But if you throw in Interface Builder and all the other tool... |
>I believe that once the .NET Framework has been installed, extra information is passed to a web server as part of a web request signifying that the framework is available.
On IE, yes. It sends the .NET Framework version as part of the UA string, e.g.:
Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; .NET C... |
You will be wanting [Xerces2][1]. A tutorial for this, [here][2] (req. signup).
Also, blatently copied from [here][3]:
import org.apache.xerces.parsers.DOMParser;
import java.io.File;
import org.w3c.dom.Document;
public class SchemaTest
{
public static void main (String args[]) ... |
Are you looking for a tool or a library?
As far as libraries goes, pretty much the de-facto standard is [Xerces2][1] which has both [C++][2] and [Java][3] versions.
Be fore warned though, it is a heavy weight solution. But then again, validating XML against XSD files is a rather heavy weight problem.
As for a ... |
Ultimately, it will not hurt any users if you target the Client Profile. This is because the client profile is a subset of the .net framework v3.5 sp1, and if v3.5 sp1 is already installed you don't need to install anything.
The assemblies in the client profile are the same binaries as the full framework, so unless... |
|python|swig|prototyping|ctypes|fortran| |
|python|swig|fortran|prototyping|ctypes| |
|python|prototyping|fortran|swig|ctypes| |
I have been mulling over writing a peak fitting library for a while. I know Python fairly well and plan on implementing everything in Python to begin with but envisage that I may have to re-implement some core routines in a compiled language eventually.
IIRC, one of Python's original remits was as a prototyping lang... |
I have been mulling over writing a peak fitting library for a while. I know Python fairly well and plan on implementing everything in Python to begin with but envisage that I may have to re-implement some core routines in a compiled language eventually.
IIRC, one of Python's original remits was as a prototyping lang... |
I have been mulling over writing a peak fitting library for a while. I know Python fairly well and plan on implementing everything in Python to begin with but envisage that I may have to re-implement some core routines in a compiled language eventually.
IIRC, one of Python's original remits was as a prototyping lang... |
Another function, not my me but found on the web and a bit refined:
public static int GetAge(DateTime birthDate)
{
DateTime n = DateTime.Now; // To avoid a race condition around midnight
int age = DateTime.Now.Year - birthDate.Year;
if (n.Month < birthDate.Month || (n.Mo... |
CSV File to XML |
|csv|xml|java|| |
Is there an existing application or library in Java which will allow me to take CSV data and create an XML file? The XML tags would be provided through maybe the first row containing column headings. |
|java|xml|csv| |
From what I've seen, there are a few registry keys that set the default mail client. One of them being:
System Key: [HKEY_CLASSES_ROOT\mailto\shell\open\command]
Value Name: (Default)
Data Type: REG_SZ (String Value)
Value Data: Mail program command-line
I'm not familar with Delphi 7, but I'm sure there are s... |
The default behaviour is for error_log() to output to the Apache error log. If this isn't happening check your php.ini settings for the error_log directive - leave it unset to use the Apache log file for the current vhost. |
The functionality you're looking for is traditionally called an UPSERT. Atleast knowing what it's called might help you find what you're looking for.
I don't think SQL Server 2005 has any great ways of doing this. 2008 introduces the MERGE statement that can be used to accomplish this as shown in: <http://www.databa... |
What the upsert/merge is doing is something to the effect of...
IF EXISTS (SELECT * FROM [Table] WHERE Id = X)
UPDATE [Table] SET...
ELSE
INSERT INTO [Table]
So hopefully the combination of those articles and this pseudo code can get things moving. |
SQLite and XSD |
|.net|database|sqlite| |
Does anybody know if there is a way to create a SQLite database based on an XSD DataSet? In the past I've just used a basic SQLite manager, but want to fuse things a bit more with my .NET development if possible. |
Off the top of my head...
$artist = array("the roots","michael jackson","billy idol","more","and more","and_YET_MORE");
$count = array(5,3,9,1,1,3);
$highest = max($count);
for (int $x = 0; x < count($artist); $x++)
{
$normalized = $count[$x] / $highest;
$heading = ceil($nor... |
Well, it appears YAML is gone out the window then. I want something both human writable _and_ readable. Plus, this C# implementation...I have no idea _if_ it's working or not, the documentation consists of a few one line code examples. It barfs on their own YAML files, and is an old student project. The only other C# Y... |
Well, it appears YAML is gone out the window then. I want something both human writable _and_ readable. Plus, this C# implementation...I have no idea _if_ it's working or not, the documentation consists of a few one line code examples. It barfs on their own YAML files, and is an old student project. The only other C# Y... |
Well, defines are used often for compile time constants and macros. This can make your code a bit faster as there are really no function calls, the output values of the macros are determined at compile time. The #if's are very useful. The most simple example that I can think of is checking for a debug build to add i... |
> One of the things you have to remember was that the GoF book was written in the early 90s, when the prevalent OSes did not have extensive graphic libraries. Even Windows was not yet an OS at that time.
IIRC GoF was released in 1994. Even in 1994 Windows 95 Beta was available (and running on my 486DX33) and Windows... |
You may want to check out the [Tamper Data][1] extension which allows you to easily intercept and manipulate the request parameters among other features.
[1]: https://addons.mozilla.org/en-US/firefox/addon/966 |
If you started out on an 8 bit machine, don't forget your roots:
[The Retrobits Podcast][1]
[1]: http://retrobits.libsyn.org/ |
Is the .NET Client Profile worth targetting? |
|.net|client-profile| |
I've recently been looking into targeting the .NET Client Profile for a WPF application I am building. However, I was frustrated to notice that the Client Profile is only valid for the following OS configurations:
- Windows XP SP2+
- Windows Server 2003
In addition, the client profile is **not** valid for x... |
@[John Richardson][1] / @[Jonathan Holland][2]
My includes are setup correctly, no problems there. I've also tried the NCB rebuild several times but it never fixes it 100%.
I have a feeling it may be to do with forward declarations of classes. e.g. to reduce the complexity of includes in header files we normally ... |
Any good resources or advice for working with languages with different orientations? |
|internationalization| |
We have an enterprise web application where every bit of text in the system is localised to the user's browser's culture setting.
So far we have only supported English, American (similar but mis-spelt ;-) and French (for the Canadian Gov't - app in English or French depending on user preference). During development ... |
|internationalization|multilingual| |
Any good resources or advice for working with languages with different orientations? (such as Japanese or Chinese) |
We have an enterprise web application where every bit of text in the system is localised to the user's browser's culture setting.
So far we have only supported English, American (similar but mis-spelt ;-) and French (for the Canadian Gov't - app in English or French depending on user preference). During development ... |
You can set the IIS6 to handle all requests, but the key to handle files without extensions is to tell the IIS not to look for the file.
[http://weblogs.asp.net/scottgu/archive/2007/03/04/tip-trick-integrating-asp-net-security-with-classic-asp-and-non-asp-net-urls.aspx][1]
[1]: http://weblogs.asp.net/scottgu/... |
I will second both of the above suggestions and add that file locking on a flat file log may cause issues when there are a lot of users. |
I use SQLylog to copy the structure, and I ALWAYS, let me repeat ALWAYS make a backup first. |
If you're using `configure` to build wxWidgets you just need to add `--with-opengl` to your command line. |
Sorry, read your last comment wrong. Yes, hash_map is not in STL, map is. But unordered_map and hash_map are the same from what I've been reading.
map -> log (n) insertion, retrieval, iteration is efficient (and ordered by key comparison)
hash_map/unordered_map -> constant time insertion and retrieval, iteration ... |
I'm assuming that the part the doesn't work is `{{ user.item }}`. Django will be trying a dictionary lookup, but using the string "item" and not the value of the `item` loop variable.
I think you will need to do some preprocessing of the data in your view before you render it in your template. |
I'm assuming that the part the doesn't work is `{{ user.item }}`.
Django will be trying a dictionary lookup, but using the string `"item"` and not the value of the `item` loop variable. Django did the same thing when it resolved `{{ user.name }}` to the `name` attribute of the `user` object, rather than looking fo... |
Ditto Stopwatch, it is way better.
Regarding performance measuring you should also check whether your "// Some Execution Process" is a very short process.
Also bear in mind that the first run of your "// Some Execution Process" might be way slower than subsequent runs.
I typically test a method by running it 1... |
How large an area are these coordinates spread out over? What latitude are they at? How much accuracy do you require? If they're fairly close together, you can probably ignore the fact that the earth is round and just treat this as a Cartesian plane rather than messing about with spherical geometry and great circle ... |
Why does Vista complain about a dead process when I use Cygwin ssh and how do I get it to shut up? |
|cygwin|ssh|windows-vista| |
I've worked with the following formula (pseudocode) with some success:
now <- number of minutes since the work day started
delay <- number of minutes in the delay
day <- length of a work day in minutes
x <- (now + delay) / day {integer division}
y <- (now + delay) % day {modulo remainde... |
You could use modules to the same effect I believe, although its not "the singleton pattern" you can have global state that way (which is what a singleton is ! Naughty global state !). |
If you really want to keep the comment in your page you could use this instead of an HTML comment:
<div style="display:none">command --option value --option2 value2 --option3 </div>
Or even
<div class="comment">command --option value --option2 value2 --option3 </div>
and specify:
.comment {d... |
I too have always heard having an auto-incrementing int is good for performance even if you don't actually use it. |
The primary key serves three purposes:
- indicates that the column(s) should be unique
- indicates that the column(s) should be non-null
- document the intent that this is the unique identifier of the row
The first two can be specified in lots of ways, as you have already done.
The third reason is good:
-... |
Do you want something that has a server side component or entirely client driven? The best ones I have seen are all flash, alas. I have done little tricks with JS and GWT before, but there is only sophisticated I will get before I go hunting for a library to do it for me. |
I would do the form post in your code behind using HttpWebRequest class. Here is a good helper class to get your started:
<http://geekswithblogs.net/rakker/archive/2006/04/21/76044.aspx>
From there, you can just do a Response.Redirect, or perhaps you need to vary your action based on the outcome of the post (if t... |
Why can't I have abstract static methods in c#? |
|c#| |