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 - Ability to do page versioning/audit changes - Limit access to certain pages for certain users - Very simple method of posting/editing articles - Very simple method of adding images to articles - Excellent (fast, accurate) searching abilities - Ability to rate and comment on articles I liked using the Wordpress blog because it allowed me to use [Live Writer][1] to add/edit articles and images, but it didn't have page versioning (that I could see). I like using Screwturn wiki because of it's ability to track article versions, and I like it's clean look, but some non-technical people balk at the input and editing. [1]: http://get.live.com/
[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(255) ) </pre>
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 most of your needs. And since it's been around, it has a fair sharer of GUI tools (TortoiseSVN, for example). Go for SVN.
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) ,thumbnailID integer ,fileFormatID integer ,categoryID integer ,isFavorite boolean ,dateAdded date ,globalAccessCount integer ,lastAccessTime date ,downloadComplete boolean ,isNew boolean ,isSpotlight boolean ,duration varchar(30) ); Create Table tCategory ( categoryID integer Primary Key ,categoryName varchar(50) ,parent_categoryID integer ); ... I execute this in Air using the following methods: public static function RunSqlFromFile(fileName:String):void { var file:File = File.applicationDirectory.resolvePath(fileName); var stream:FileStream = new FileStream(); stream.open(file, FileMode.READ) var strSql:String = stream.readUTFBytes(stream.bytesAvailable); NonQuery(strSql); } public static function NonQuery(strSQL:String):void { var sqlConnection:SQLConnection = new SQLConnection(); sqlConnection.open(File.applicationStorageDirectory.resolvePath(DBPATH); var sqlStatement:SQLStatement = new SQLStatement(); sqlStatement.text = strSQL; sqlStatement.sqlConnection = sqlConnection; try { sqlStatement.execute(); } catch (error:SQLError) { Alert.show(error.toString()); } } No errors are generated, however only tRole exists. It seems that it only looks at the first query (up to the semicolon- if I remove it, the query fails). Is there anyway to call multiple queries in one statement?
|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 then serializing to XML does make sense (well, as much as using XML can make sense... ;)) but you would supposedly already have a means of serializing to XML.
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 "create one file per object" on the options tab) You can then commit these text files to svn and make use of svn's diff and logging functions. I have this tied together with a Batch script that takes a couple parameters and sets up the database. I also added some additional queries that enter default data like user types and the admin user. (If you want more info on this, post something and I can put the script somewhere accessible) If you need to keep all of the data as well, I recommend keeping a back up of the database and using Redgate (http://www.red-gate.com/) products to do the comparisons. They don't come cheap, but they are worth every penny.
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 the built in migration/upgrade tools for this. There are some big steps between 6.5 and 8.0 that are better solved there than going from 6.5 to 2005 directly. Your BIGGEST pain, if you didn't know already, is that DTS is gone in favor of SSIS. There is a shell type module that will run your existing DTS packages, but you're going to want to manually recreate them all in SSIS. Ease of this will depend on the complexity of the packages themselves, but I've done a few at work so far and they've been pretty smooth.
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 different. I wouldn't say one is better than the other - Windows developers come over from VS and expect it to be the same. This is just an arrogant attitude and please don't fall into this crowd. Having used VS since the AppStudio days and Xcode for a year or so now, both have strengths and weaknesses. Xcode is something that out of the box (and especially when coming from VS) doesn't seem that good, but once you start using and understanding it - it becomes very powerful. Also, there are a lot more tools included with Xcode et al, such as Instruments and Shark that you simply can't get with VS, unless you open your wallet, and even then IMHO aren't as good. Anyway, good luck. I still enjoy C#, but Objective-C/Cocoa somehow makes programming fun again once you get into it... [1]: http://developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/MemoryMgmt.html [2]: http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Introduction/chapter_1_section_1.html
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 not-so-common terms I've seen are 'auto boxing', 'tuples', 'orthogonal code', 'domain driven design', 'test driven development', etc. Code snippets would also be helpful where applicable..
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 add-on is almost what I'm looking for; It let's you quickly see the form keys, but it doesn't let you change them or add new ones (which leads to a lot of painful JavaScript in the address bar...)
- [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 may have beat us to it ;) [1]: http://en.wikipedia.org/wiki/Boxing_(Computer_science)#Boxing [2]: http://en.wikipedia.org/wiki/Tuples [3]: http://en.wikipedia.org/wiki/Orthogonal#Computer_science [4]: http://en.wikipedia.org/wiki/Domain_driven_design [5]: http://en.wikipedia.org/wiki/Test_driven_development
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 these tasks and perform a release. - QA should be done on each branch before it is merged to the trunk. - By doing QA on each individual branch, you will know exactly what caused the bug easier. - This solution scales to any number of developers. - This method works since branching is an almost instant operation in SVN. - Tag each release that you perform. - You can develop features that you don't plan to release for a while and decide exactly when to merge them. - For all work you do, you can have the benefit of committing your code. If you work out of the trunk only, you will probably keep your code uncommitted a lot, and hence unprotected and without automatic history. If you try to do the opposite and do all your development in the trunk you'll be plagged by: - Constant build problems for daily builds - Productivity loss when a a developer commits a problem for all other people on the project - Longer release cycles, because you need to finally get a stable version - Less stable releases You simply will not have the flexibility that you need if you try to keep a branch stable and the trunk as the development sandbox. The reason is that you can't pick and chose from the trunk what you want to put in that stable release. It would already be all mixed in together in the trunk.
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 more likely to be causing performance issues than the where condition LIKE predicates. Are you typically searching to find a match on all of those columns at the same time?
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, objects to be passed to functions and methods, whereas I suspect the same is not true of say C or Fortran. What should I know about designing functions/classes which I envisage will have to interface into the compiled language? And how much of these potential problems are dealt with by libraries such as cTypes and [SWIG][1]? [1]: http://www.swig.org/
|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 language, however Python is pretty liberal in allowing functions, functors, objects to be passed to functions and methods, whereas I suspect the same is not true of say C or Fortran. What should I know about designing functions/classes which I envisage will have to interface into the compiled language? And how much of these potential problems are dealt with by libraries such as cTypes and [SWIG][1]? [1]: http://www.swig.org/
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 pseudo-code ahead) //colors entered as 0-255 [R, G, B] colors = []; //holds final colors to be used rand = new Random(); //assumes n is less than 16,777,216 randomGen(int n){ while (len(colors) < n){ //generate a random number between 0,255 for each color newRed = rand.next(256); newGreen = rand.next(256); newBlue = rand.next(256); temp = [newRed, newGreen, newBlue]; //only adds new colors to the array if temp not in colors { colors.append(temp); } } } One way you could optimize this for better visibility would be to compare the distance between each new color and all the colors in the array: for item in color{ itemSq = (item[0]^2 + item[1]^2 + item[2]^2])^(.5); tempSq = (temp[0]^2 + temp[1]^2 + temp[2]^2])^(.5); dist = itemSq - tempSq; dist = abs(dist); } //NUMBER can be your chosen distance apart. if dist < NUMBER and temp not in colors { colors.append(temp); } But this approach would significantly slow down your algorithm. Another way would be to scrap the randomness and systematically go through every 4 values and add a color to an array in the above example.
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]: http://httpd.apache.org/docs/1.3/mod/core.html#errorlog
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.20", CultureInfo.CurrentUICulture); If ASP.NET somehow (i.e. using HTTP Request headers) passes current user's CultureInfo to either CultureInfo.CurrentCulture or CultureInfo.CurrentUICulture, these will work fine. [1]: http://msdn.microsoft.com/en-us/library/system.globalization.cultureinfo.aspx
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 the expected formatting, and use the most lenient parser you can. Probably something like: double d = Double.Parse("5,000.00", NumberStyles.Any, CultureInfo.InvariantCulture);
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.Month == birthDate.Month && n.Day < birthDate.Day)) age--; return age; }
|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 tools, I'm not so sure. Mac development is not about 1 giant IDE for everything. But VS is "kinder" on the developer then Xcode is. Also if you want to do cross platform apps look at [RealBasic][1]. A fine tool (Basic though. But it runs on Linux too.) You'd be surprised how many Mac apps are written with RB. [1]: http://www.realsoftware.com/products/realbasic/
>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 CLR 2.0.50727).
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[]) { File docFile = new File("memory.xml"); try { DOMParser parser = new DOMParser(); parser.setFeature("http://xml.org/sax/features/validation", true); parser.setProperty( "http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation", "memory.xsd"); ErrorChecker errors = new ErrorChecker(); parser.setErrorHandler(errors); parser.parse("memory.xml"); } catch (Exception e) { System.out.print("Problem parsing the file."); } } } [1]: http://xerces.apache.org/xerces2-j/ [2]: http://www.ibm.com/developerworks/edu/x-dw-xvalid-i.html [3]: http://forums.sun.com/thread.jspa?messageID=3411478
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 tool to do this for you, [XMLFox][4] seems to be a decent freeware solution, but not having used it personally I can't say for sure. [1]: http://xerces.apache.org [2]: http://xerces.apache.org/xerces-c/ [3]: http://xerces.apache.org/xerces2-j/ [4]: http://www.xmlfox.com/xml_editor.htm
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 you're loading assemblies dynamically, then you shouldn't need to do any additional testing. My thinking is that unless you must use assemblies which are NOT in the client profile, then you should target it. As for the OS requirements, WPF won't run on pre-XP sp2, so if you need to run on other OSes, then you'll have to use WinForms anyways. EDIT: > On IE, yes. It sends the .NET Framework version as part of the UA string, e.g.: Actually so does FF3+3.5sp1: > Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1 (.NET CLR 3.5.30729)
|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 language, however Python is pretty liberal in allowing functions, functors, objects to be passed to functions and methods, whereas I suspect the same is not true of say C or Fortran. What should I know about designing functions/classes which I envisage will have to interface into the compiled language? And how much of these potential problems are dealt with by libraries such as cTypes, bgen, [SWIG][1] or [Python SIP][2]? [1]: http://www.swig.org/ [2]: http://www.riverbankcomputing.co.uk/software/sip/intro
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 language, however Python is pretty liberal in allowing functions, functors, objects to be passed to functions and methods, whereas I suspect the same is not true of say C or Fortran. What should I know about designing functions/classes which I envisage will have to interface into the compiled language? And how much of these potential problems are dealt with by libraries such as cTypes, bgen, [SWIG][1], [Boost.Python][2] or [Python SIP][3]? For this particular use case, (a fitting library) I imagine allowing users to define mathematical functions (Guassian, Lorentzian etc.) as Python functions which can then to be passed an interpreted by the compiled code fitting library. Passing and returning arrays is also essential. [1]: http://www.swig.org/ [2]: http://www.boost.org/doc/libs/1_35_0/libs/python/doc/index.html [3]: http://www.riverbankcomputing.co.uk/software/sip/intro
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 language, however Python is pretty liberal in allowing functions, functors, objects to be passed to functions and methods, whereas I suspect the same is not true of say C or Fortran. What should I know about designing functions/classes which I envisage will have to interface into the compiled language? And how much of these potential problems are dealt with by libraries such as cTypes, bgen, [SWIG][1], [Boost.Python][2], [Cython][3] or [Python SIP][4]? For this particular use case, (a fitting library) I imagine allowing users to define mathematical functions (Guassian, Lorentzian etc.) as Python functions which can then to be passed an interpreted by the compiled code fitting library. Passing and returning arrays is also essential. [1]: http://www.swig.org/ [2]: http://www.boost.org/doc/libs/1_35_0/libs/python/doc/index.html [3]: http://cython.org/ [4]: http://www.riverbankcomputing.co.uk/software/sip/intro
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.Month == birthDate.Month && n.Day < birthDate.Day)) age--; return age; } Just two things that come into my mind: What about people from countries that do not use the gregorian calendar? DateTime.Now is in the server-specific culture i think. I have absolutely 0 knowledge about actually working with Asian calendars and I do not know if there is an easy way to convert dates between calendars, but just in case you're wondering about those chinese guys from the year 4660 :-)
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 some registry editing libraries in there that you could use to modify this value. Some places list more than this key, others just this key, so you may need to test a little bit to find the proper one(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.databasejournal.com/features/mssql/article.php/3739131> or <http://blogs.conchango.com/davidportas/archive/2007/11/14/SQL-Server-2008-MERGE.aspx> Merge was available in the beta of 2005, but they removed it out in the final release.
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($normalized * 6); // 6 heading types echo "<h".$heading.">".$artist[$x]."</h".$heading.">"; }
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# YAML parser I've found uses the MS-PL which I'm not really comfortable using. I might just end up rolling my own format. Best practices be damned, all I want to do is associate a string with a value.
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# YAML parser I've found uses the MS-PL which I'm not really comfortable using. I might just end up rolling my own format. Best practices be damned, all I want to do is associate a key with a value.
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 in some extra logging or messaging, maybe even some debugging functions. You can also check different environment variables this way. Others with more C/C++ experience can add more I am sure.
> 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 3.x had been around since roughly 1990.
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 x64 or ia64 editions; and will also not install if *any previous version of the .NET Framework has been installed*. I'm wondering if the effort in adding the extra OS configurations to the testing matrix is worth the effort. Is there any metrics available that state the percentage of users that could possibly benefit from the client profile? 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. Granted, I would imagine that Windows XP SP2 users without the .NET Framework installed would be a large amount of people. It would then be a question of whether my application targeted those individuals specifically. Has anyone else determined if it is worth the extra effort to target these specific users?
@[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 do something like: class MyPredeclared; class SomeOtherClass { private: MyPredeclared* m_pPointer; } I wonder if that screws it up? Any other ideas? It definitely gets worse the larger your project gets. [1]: http://stackoverflow.com/questions/39474/how-to-get-intellisense-to-reliably-work-in-visual-studio-2008#39518 [2]: http://stackoverflow.com/questions/39474/how-to-get-intellisense-to-reliably-work-in-visual-studio-2008#39526
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 we also had some European languages in mind like Dutch and German that tend to concatenate words into very long ones. We're currently investigating support for eastern languages: Chinese, Japanese, and so on. I understand that these use phonetic input converted to written characters. How does that work on the web? Do the same events fire while inputs and textareas are being edited (we're quite Ajax heavy). What conventions do users of these top-down languages expect online? With RTL languages like Arabic do users expect the entire interface to be mirrored? For instance should things like OK/Cancel buttons be swapped and on the left?
|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 we also had some European languages in mind like Dutch and German that tend to concatenate words into very long ones. We're currently investigating support for eastern languages: Chinese, Japanese, and so on. I understand that these use phonetic input converted to written characters. How does that work on the web? Do the same events fire while inputs and textareas are being edited (we're quite Ajax heavy). What conventions do users of these top-down languages expect online? What effect does their dual-input (phonetic typing + conversion) have on web controls? With RTL languages like Arabic do users expect the entire interface to be mirrored? For instance should things like OK/Cancel buttons be swapped and on the left?
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/archive/2007/03/04/tip-trick-integrating-asp-net-security-with-classic-asp-and-non-asp-net-urls.aspx
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 time is not guarantee to be efficient Neither of these will work for you by themselves, since the map orders things based on the key content, and not the insertion sequence (unless your key contains info about the insertion sequence in it). You'll have to do either what you described (list + hash_map), or create a key type that has the insertion sequence number plus an appropriate comparison function.
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 for a variable called `name`. I think you will need to do some preprocessing of the data in your view before you render it in your template.
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 1000 times or 1000000 times in a loop and I get much more accurate data than running it once.
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 distances. Of course, as you get further from the equator, degrees of longitute get smaller compared to degrees of latitude, so some sort of scaling factor may be appropriate. Start with a fairly simple distance formula and a brute force search and see how long that's going to take and if the results are accurate enough before you get fancy.
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 remainder} return startoftoday + x {in days} + y {in minutes}
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 {display:none;} in your stylesheet.
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: - for humans, so they can easily see your intent - for the computer, so a program that might compare or otherwise process your table can query the database for the table's primary key. A primary key doesn't have to be an auto-incrementing number field, so I would say that it's a good idea to specify your guid column as the primary key.
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 there was an error, display it to the user or whatever). I think you already had the answer in your question to be honest - sounds like you think it is a post OR redirect when in reality you can do them both from your code behind.
Why can't I have abstract static methods in c#?
|c#|