instruction
stringlengths
0
30k
Should be available to non-U.S. companies, easy to setup, reliable, cheap, customizable, etc. What are your experiences?
As always, Google is your friend: <http://nixbit.com/cat/programming/libraries/c-generic-library/> specifically: <http://nixbit.com/cat/programming/libraries/generic-data-structures-library/>
Flash is certainly the most ubiquitous and portable solution. [98% of browsers][1] have Flash installed. Other alternatives are [Quicktime][2], [Windows Media Player][3], or even [Silverlight][4] (Microsoft's Flash competitor, which can be used to embed several video formats). I would recommend using Flash (and it's FLV video file format) for embedding your video unless you have very specific requirements as far as video quality or DRM. [1]: http://en.wikipedia.org/wiki/Adobe_Flash#Market_share [2]: http://www.apple.com/quicktime/download/ [3]: http://www.microsoft.com/windows/windowsmedia/default.mspx [4]: http://silverlight.net/
Flash is usually the product of choice: Everyone has it, and using the [JW FLV Player][1] makes it relatively easy on your side. As for other Video Formats, there are WMV and QuickTime, but the players are rather "heavy", not everyone might have them and they feel so 1990ish... Real Player... Don't let me even start ranting about that pile of ... The only other alternative of Flash that I would personally consider is Silverlight, which allows streaming WMV Videos. I found the production of WMV much better and easier than FLV because all Windows FLV Encoders I tried are not really good and stable, whereas pretty much every tool can natively output WMV. The problem with Silverlight is that no one has that Browser Plugin (yet?). There is also a player [from JW][2]. [1]: http://www.jeroenwijering.com/?item=JW_FLV_Media_Player [2]: http://www.jeroenwijering.com/?item=JW_WMV_Player
What is a good web-based Grid that accepts Excel clipboard data?
|excel|csv|clipboard|grid|
Any good recommendations for a platform agnostic (i.e. Javascript) grid control/plugin that will accept pasted Excel data and can emit Excel-compliant clipboard data during a Copy? I believe Excel data is formatted as CSV during "normal" clipboard operations.
The explicit cast to double in the first answer isn't necessary - identifying the constant as 5000.0 (or as 5000d) is sufficient.
Binary Data in MYSQL
|database|mysql|
How do I store binary data in mysql?
For a table like this: CREATE TABLE binary_data ( id INT(4) NOT NULL AUTO_INCREMENT PRIMARY KEY, description CHAR(50), bin_data LONGBLOB, filename CHAR(50), filesize CHAR(50), filetype CHAR(50) ); Here is a PHP example: <?php // store.php3 - by Florian Dittmer <dittmer@gmx.net> // Example php script to demonstrate the storing of binary files into // an sql database. More information can be found at http://www.phpbuilder.com/ ?> <html> <head><title>Store binary data into SQL Database</title></head> <body> <?php // code that will be executed if the form has been submitted: if ($submit) { // connect to the database // (you may have to adjust the hostname,username or password) MYSQL_CONNECT("localhost","root","password"); mysql_select_db("binary_data"); $data = addslashes(fread(fopen($form_data, "r"), filesize($form_data))); $result=MYSQL_QUERY("INSERT INTO binary_data (description,bin_data,filename,filesize,filetype) ". "VALUES ('$form_description','$data','$form_data_name','$form_data_size','$form_data_type')"); $id= mysql_insert_id(); print "<p>This file has the following Database ID: <b>$id</b>"; MYSQL_CLOSE(); } else { // else show the form to submit new data: ?> <form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data"> File Description:<br> <input type="text" name="form_description" size="40"> <input type="hidden" name="MAX_FILE_SIZE" value="1000000"> <br>File to upload/store in database:<br> <input type="file" name="form_data" size="40"> <p><input type="submit" name="submit" value="submit"> </form> <?php } ?> </body> </html>
How to use the C socket API in C++
|c++|c|sockets|zos|
I've been having issues getting the C sockets API to work properly in C++. Specifically, although I am including sys/socket.h, I still get compile time errors telling me that AF_INET is not defined. Am I missing something obvious, or could this be related to the fact that I'm doing this coding on z/OS and my problems are much more complicated? ;)
There are no HTTP headers that will report the clients timezone so far although it has been suggested to include it in the HTTP specification. If it was me, I would probably try to fetch the timezone using clientside JavaScript and then submit it to the server using Ajax or something.
I've had no trouble using the BSD sockets API in C++, in GNU/Linux. Here's the sample program I used: #include <sys/socket.h> int main() { return AF_INET; } So my take on this is that z/OS is probably the complicating factor here, however, because I've never used z/OS before, much less programmed in it, I can't say this definitively. :-P
HTML 4.01. There is absolutely **no reason** to use XHTML for anything but experimental or academic problems that you only want to run on the 'obscure' web browsers. XHTML Transitional is completely pointless even to _those_ browsers, so I'm not sure why anyone would aim for that. It's actually pretty alarming that a number of people would recommend that. I'd say aiming for HTML 4.01 is the most predictable, but Teifion is right really, "anything that renders your page will do". in response to [Michael Stum][1]: > XHTML is XML based, so it allows easier parsing and you can also use the XML Components of most IDEs to programatically query and insert stuff. This is certainly not true. A lot of XHTML on the web (if not most) does not conform to XML validity (and it needn't - it's not being sent as XML). Trying to treat this like XML when dealing with it is just going to earn you a lot of headaches. This page on Stack Overflow, for instance, will generate errors with many unforgiving XML tools for having invalid mark-up. [1]: http://stackoverflow.com/questions/3654/html-version-choice#3659
When i worked in a small dev team (small meaning me, another programmer and the boss), it was quite the chaotic mess. However we found that Assigning a "gatekeeper" type of process worked for us. The gatekeeper was the person who had done the most work on the app (in this case, i had 2 projects i developed from the ground up, he had like 4). Basically, whenever he had to work on my projects, he'd notify me that he was doing work, i'd make sure the repository was up-to-date and buildable, then he would pull down, make his changes, then commit. He would inform me that it was done, i would pull down, build and deploy. If there were DB changes we had a DB Change folder with all the scripts that would correct the DB. It's obviously got a lot of holes in it, but the process worked for us, and kept us from building over each other.
Best method for creating a "tree-view preferences dialog" type of interface in C#?
|c#|gui|
I'm writing an application that is basically just a preferences dialog much like the tree-view preferences dialog that Visual Studio itself uses. The function of the application is simply a pass-through for data from a serial device to a file. It performs many, many transformations on the data before writing it to the file, so the GUI for the application is simply all the settings that dictate what those transformations should be. What's the best way to go about designing/coding a tree-view preferences dialog? The way I've been going about it is building the main window with a docked tree control on the left. Then I have been creating container controls that correspond to each node of the tree. When a node is selected, the app brings that node's corresponding container control to the front, moves it to the right position, and maximizes it in the main window. This seems really, really clunky while designing it. It basically means I have tons of container controls beyond the edge of the main window during design time that I have to keep scrolling the main window over to in order to work with them. I don't know if this totally makes sense the way I'm writing this, but maybe this visual for what I'm talking about will make more sense: ![form design][1] Basically I have to work with this huge form, with container controls all over the place, and then do a bunch of run-time reformatting to make it all work. This seems like a *lot* of extra work. Am I doing this in a totally stupid way? Is there some "obvious" easier way of doing this that I'm missing? [1]: http://mboffin.com/stuff/form-design.png
It depends on your application: - for loop, if efficiency is a priority - foreach loop or ForEach method, whichever communicates your intent more clearly
My only suggestion is to programmatically remove the dojoType on the server-side or client-side. It is not possible to keep the dojoType and not have it validate. Unless you create your own type that has you logic in it.
I really like the rewritten Threading API from Java 1.6. Callables are great. They are basically threads with a return value.
How do I generate ASCII codes 2 and 3 in a Bash command line?
|linux|unix|bash|ascii|
If I press ctrl-b that ought to give me ASCII code 2, but ctrl-c is going to be interpreted as a Break. So I figure I've got to redirect a file in. How do I get these characters into a file?
perl -e 'print "\xFF"', where FF is the hex code of the ACSII code you want to print. So for ACSII code 2, it would be \x02.
@James > I'm not even really clear why it needs the additional data, as you wouldn't call delete[] on the array anyway, so I don't entirely see why it needs to know how many items are in it. After giving this some thought, I agree with you. There is no reason why placement new should need to store the number of elements, because there is no placement delete. Since there's no placement delete, there's no reason for placement new to store the number of elements. I also tested this with gcc on my Mac, using a class with a destructor. On my system, placement new was *not* changing the pointer. This makes me wonder if this is a VC++ issue, and whether this might violate the standard (the standard doesn't specifically address this, so far as I can find).
static imports to "enhance" the language, so you can do nice literal things in type safe ways: List<String> ls = List("a", "b", "c"); (can also do with maps, arrays, sets). http://gleichmann.wordpress.com/2008/01/13/building-your-own-literals-in-java-lists-and-arrays/ Taking it further: List<Map<String, String>> data = List(Map( o("name", "michael"), o("sex", "male"))); WHOOPS: SO is eating the complex generics stuff at the start...
static imports to "enhance" the language, so you can do nice literal things in type safe ways: List<String> ls = List("a", "b", "c"); (can also do with maps, arrays, sets). http://gleichmann.wordpress.com/2008/01/13/building-your-own-literals-in-java-lists-and-arrays/ Taking it further: List<Map<String, String>> data = List(Map( o("name", "michael"), o("sex", "male")));
I dunno how he did it but [Tomas Restrepo has a Visual Studio theme that is able to italicize comments and string literals][1]. This one is in Visual Studio 2005, but the theme editing for both versions appear unchange so it might provide you with some clues as to how to do it on your own theme. [1]: http://www.winterdom.com/weblog/2007/11/12/DesertNightsAVS2005ColorScheme.aspx
I dunno how he did it but [Tomas Restrepo has a Visual Studio theme that is able to italicize comments and string literals][1]. This one is in Visual Studio 2005, but the theme editing for both versions appear unchange so it might provide you with some clues as to how to do it on your own theme. **Update:** I didn't notice that he had a link to a Visual Studio 2008 version at the bottom of the post. [1]: http://www.winterdom.com/weblog/2007/11/12/DesertNightsAVS2005ColorScheme.aspx
I second the OWASP info as being a valuable resource. The following may be of interest as well, notably the attack patterns: - [CERT Top 10 Secure Coding Practices][1] - [Common Attack Pattern Enumeration and Classification][2] - [Attack Patterns][3] - [Secure Programming for Linux and Unix][4] - [A Taxonomy of Coding Errors that Affect Security][5] - [Secure Programming with Static Analysis Presentation][6] [1]: https://www.securecoding.cert.org/confluence/display/seccode/Top+10+Secure+Coding+Practices [2]: http://capec.mitre.org/about/documents.html [3]: http://en.wikipedia.org/wiki/Attack_patterns [4]: http://www.dwheeler.com/secure-programs/ [5]: http://www.fortify.com/vulncat/en/vulncat/index.html [6]: http://www.infoq.com/presentations/secure-programming-static-analysis
Does the button need to be black? you could apply the black background to the options instead.
What versions of Visual Studio can be installed concurrently?
|windows|visual-studio|microsoft|
Are there any conflicts with having any combination of Visual Studio 2003, 2005 and/or 2008 installed? I noticed a related question [here][1] but wanted a more general answer. [1]: http://stackoverflow.com/questions/9693/visual-studio-2005-macros-stop-working-when-visual-studio-2008-is-installed
I have all 3 installed and have had no adverse problems...knocking on wood
6, 2000/2001 (I can't remember which is .net 1.0), 2003, 2005, 2008... of course within .NET you may have issues with getting the right solution with the right version. I haven't really seen any conflicts in particular.
How do I create an xml document in python
|python|xml|
It's my first time generating xml with python, and the python documentation, which is generally good, is really lacking for xml creation...here is my sample code: <pre> <code> from xml.dom.minidom import * def make_xml(): doc = Document(); node = doc.createElement('foo') node.innerText = 'bar' doc.appendChild(node) return doc if __name__ == '__main__': make_xml().writexml(sys.stdout) </code> </pre> when I run the above code I get this: <pre> <code> &lt?xml version="1.0" ?&gt &lt;foo/&gt; </code> </pre> I would like to get: <pre> <code> &lt?xml version="1.0" ?&gt &lt;foo&gt;bar&lt;/foo&gt; </code> </pre> I just guessed that there was an innerText property, it gives no compiler error, but does not seem to work...how do I go about creating a text node? Thanks!
It's my first time generating xml with python, and the python documentation, which is generally good, is really lacking for xml creation...here is my sample code: <pre> <code> from xml.dom.minidom import * def make_xml(): doc = Document() node = doc.createElement('foo') node.innerText = 'bar' doc.appendChild(node) return doc if __name__ == '__main__': make_xml().writexml(sys.stdout) </code> </pre> when I run the above code I get this: <pre> <code> &lt?xml version="1.0" ?&gt &lt;foo/&gt; </code> </pre> I would like to get: <pre> <code> &lt?xml version="1.0" ?&gt &lt;foo&gt;bar&lt;/foo&gt; </code> </pre> I just guessed that there was an innerText property, it gives no compiler error, but does not seem to work...how do I go about creating a text node? Thanks!
I am building an open search add-on for Firefox/IE and the image needs to be Base64 Encoded so how can I base 64 encode the favicon I have? I am only familiar with PHP
You can do it in jQuery really simple, but I am not sure JS should be used for such things. The best way is to do it with pure css. 1. Take a look at [faux columns](http://www.alistapart.com/articles/fauxcolumns/) or even [Fluid Faux Columns](http://www.communitymx.com/content/article.cfm?cid=AFC58) 2. Also another technique(doesn't work on the beautiful IE6) is to position:relative the parent container. The child container(the nav list in your case) should be positioned absolute and forced to occupy the whole space with 'top:0; bottom:0;'
Google led me to [this][1] solution (base64_encode). Hope this helps! [1]: http://fr.php.net/base64_encode
There exists no platform-independent way that can be guaranteed to work in all jvm implementations. ManagementFactory.getRuntimeMXBean().getName() looks like the best (closest) solution. It's short, and *probably* works in every implementation in wide use.
As far as I remember there is an xml element for the image data. You can use this [website][1] to encode a file (use the upload field). Then just copy and paste the data to the XML element. You could also use PHP to do this like so: <?php // Use appropriate function for your filetype // - file_get_contents + imagecreatefromstring if needed $im = imagecreatefromgif('filename.gif'); $imdata = base64_encode($im); echo($imdata); imagedestroy($im); ?> Use [Mozilla's guide][2] for help on creating OpenSearch plugins. For example, the icon element is used like this: <Image width="16" height="16">data:image/x-icon;base64,imageData</Image> Where `imageData` is your base64 data. [1]: http://www.motobit.com/util/base64-decoder-encoder.asp [2]: http://developer.mozilla.org/en/Creating_OpenSearch_plugins_for_Firefox
Grid controls compatible with .NET and Mono?
|c#|controls|mono|datagrid|
Do you know any grid control compatible with .NET and Mono? DataGridView seems to be quite buggy on Mono, and GTK# controls depends on GTK+ so you need to install it in windows machines where, usually, it's not present.
What Types of testing are part of your build process?
|testing|tfs|build-automation|
I use TFS 2008. We run unit tests as part of our continuous integration build and integration tests nightly. What other types of testing do you automate and include in your build process? what technologies do you use to do so? I'd thinking about smoke tests, performance tests, load tests but don't know how realistic it is to integrate these with Team Build.
What types of testing do you include in your build process?
I use TFS 2008. We run unit tests as part of our continuous integration build and integration tests nightly. What other types of testing do you automate and include in your build process? what technologies do you use to do so? I'm thinking about smoke tests, performance tests, load tests but don't know how realistic it is to integrate these with Team Build.
Analogy: If you build cars for a living (programming), then its very pertinent to know how the engine works (Win32).
Is there a real benefit of using J#?
|java|j#|
I just saw a [comment of suggesting J#][1], and it made me wonder... is there a real, beneficial use of J# over Java? So, my feeling is that the only reason you would even consider using J# is that management has decreed that the company should jump on the Java bandwagon... and the .NET bandwagon. If you use J#, you are effectively losing the biggest benefit of picking Java... rich cross platform support. Sure there is Mono, but it's not as richly supported or as full featured right? I remember hearing Forms are not fully (perhaps at all) supported. I'm not trying to bash .NET here, I'm just saying, if you are going to go the Microsoft route, why not just use C#? If you are going to go the Java route, why would J# enter the picture? I'm hoping to find some real world cases here, so please especially respond if you've ACTUALLY used J# in a REAL project, and why. [1]: http://stackoverflow.com/questions/5516/what-happened-to-all-of-the-java-developers-how-can-i-get-started-in-net#5522
J# is no longer included in VS2008. Unless you already have J# code, you should probably stay away. From [j# product page:][1] > Since customers have told us that the > existing J# feature set largely meets > their needs and usage of J# is > declining, Microsoft is retiring the > Visual J# product and Java Language > Conversion Assistant tool to better > allocate resources for other customer > requirements. The J# language and JLCA > tool will not be available in future > versions of Visual Studio. To preserve > existing customer investments in J#, > Microsoft will continue to support the > J# and JLCA technology that shipped > with Visual Studio 2005 through to > 2015 as per our product life-cycle > strategy. For more information, see > Expanded Microsoft Support Lifecycle > Policy for Business & Development > Products. [1]: http://msdn.microsoft.com/en-us/vjsharp/default.aspx
Simple answer, YES.
The whole purpose of J# is to ease the transition of Java developers to the .NET environment which didn't work so well (I guessing here) so Microsoft dropped J# from Visual Studio 2008. For your question, "Is there a real benefit of using J#?".. in a nutshell... No..
One of the killers I've found with J# in the past is that there is no built in support for referencing web services. That alone has been enough to deter me from it ever since.
You can use an [OrderedDictionary][1]. > Represents a collection of key/value > pairs that are accessible by the key > or index. [1]: http://msdn.microsoft.com/en-us/library/system.collections.specialized.ordereddictionary.aspx
VirtualBox also has API's for automating their VM's.
What has probably happened is that the object provided when rendering the user control is actually null.
I still use Hungarian Notation when it comes to UI elements, where several UI elements are related to a particular object/value, e.g., lblFirstName for the label object, txtFirstName for the text box. I definitely can't name them both "FirstName" even if *that* is the concern/responsibility of both objects. How do others approach naming UI elements?
Recently Raymond Chen also ran an interesting series of articles on the yield keyword. - http://blogs.msdn.com/oldnewthing/archive/2008/08/12/8849519.aspx (part 1) - http://blogs.msdn.com/oldnewthing/archive/2008/08/13/8854601.aspx (part 2) - http://blogs.msdn.com/oldnewthing/archive/2008/08/14/8862242.aspx (part 3) - http://blogs.msdn.com/oldnewthing/archive/2008/08/15/8868267.aspx (part 4) While it's nominally used for easily implementing an iterator pattern, but can be generalized into a state machine. No point in quoting Raymond, the last part also links to other uses (but the example in Entin's blog is esp good, showing how to write async safe code).
I'm using a slightly modified version of that plugin so I'm not 100% sure that this will be the same for you, but for me the default is to redirect to the root path, or the page you were trying to get to if there is one. (check your lib/authenticated_system.rb to see your default) If you don't have map.root defined in your routes, I believe that would cause the error you're describing -- it wouldn't find root_path at first but if you tried "from" a page in your app it would redirect to that page. Let us know what happens with this one if you would, I'm curious to see what this ends up being in case I run into it in the future. :)
I really like this program, which approximates pi by looking at its own area :-) IOCCC 1998 : <a href="http://www0.us.ioccc.org/1988/westley.c">westley.c</a>
Not sure if this is the same issue? [JBoss DataSource config](http://www.redhat.com/docs/manuals/jboss/jboss-eap-4.2/doc/Server_Configuration_Guide/Connectors_on_JBoss-Configuring_JDBC_DataSources.html) > DataSource wrappers are not usable outside of the server VM
Generally the user that you are using to run the SQL Server service will not have access to your personal user folders, that is why you're getting the error. You either need to change the credentials used for the service, or move the database to another folder, which did the trick in your case.
The problem is your connection string. When using SQLExpress you can set it to run user instances so that each application has its own instance of SQL Server. Just set the option to false on your connections string and the problem should dissappear.
Minimal Vista Virtual PC-image for Visual Studio-development
|virtual-pc|windows-vista|visualstudio|
Using nLite (or any other suggested tool), how small can you get your Windows Vista-image when you remove as many features and services as possible, without braking the environment for Visual Studio? Which services and features are safe to remove? Maybe it's different for different VS-component? ---------- Or does anyone else have a suggestion to get one's Virtual PC-image with Vista very small and still compatible with Visual Studio?
|virtual-pc|windows-vista|
Using nLite (or any other suggested tool), how small can you get your Windows Vista-image when you remove as many features and services as possible, without braking the environment for Visual Studio? Having a couple of 12-18 GB images on the hard-drive doesn't feel too good. Which services and features are safe to remove? Maybe it's different for different VS-component? ---------- Or does anyone else have a suggestion to get one's Virtual PC-image with Vista very small and still compatible with Visual Studio?
Both 3 and 3.5 still use the [Common Language Runtime of .NET Framework 2.0][1]. So no control panel is needed, as you can still use the 2.0 control panel. [1]: http://en.wikipedia.org/wiki/Microsoft_.NET#.NET_Framework_3.0
The .NET Framework versions 3.0 and 3.5 have been built incrementally on the .NET Framework version 2.0. This version can be used to manage code access security policy for the .NET Framework 3.0, 3.5, and later versions as well.
A few cons: - 2 points of failure - Application logic will have to take into account the delay between writing something and then reading it, since it won't be available immediately from the secondary database A strategy I have used is to send key reporting data to a secondary database nightly, de-normalizing it on the way, so that beefy queries can run on that database instead of locking up tables and stealing resources from the OLTP server. I'm not using any formal data warehousing or replication tools, rather I identify problem queries that are Ok without up-to-the-minute data and create data structures on the secondary server specifically for those queries. There are definitely pros to the "replicate everything" approach: - You can run any ad-hoc query on the secondary, since it has all of your data - If your primary server dies, you can re-purpose the secondary quickly to take over
I would honestly recommend using one of the many libraries available for Ajax. I use [prototype][1] myself, while others prefer [jQuery][2]. I like prototype because it's pretty minimal. The [Prototype Ajax tutorial][3] explains it well. It also allows you to handle errors easily. new Ajax.Request('/some_url', { method:'get', onSuccess: function(transport){ var response = transport.responseText || "no response text"; alert("Success! \n\n" + response); }, onFailure: function(){ alert('Something went wrong...') } }); [1]: http://www.prototypejs.org/api [2]: http://jquery.com/ [3]: http://www.prototypejs.org/learn/introduction-to-ajax
You can seal individual methods to prevent them from being overridable: public sealed override void Render() { // Prepare the object for rendering SpecialRender(); // Do some cleanup }
In B, do protected override sealed void Render() { ... }
I didn't know about Enumerable.SequenceEqual method (you learn something every day....), but I was going to suggest using an extension method; something like this: public static bool IsEqual(this List<int> InternalList, List<int> ExternalList) { if (InternalList.Count != ExternalList.Count) { return false; } else { for (int i = 0; i < InternalList.Count; i++) { if (InternalList[i] != ExternalList[i]) return false; } } return true; } Interestingly enough, after taking 2 seconds to read about SequenceEqual, it looks like Microsoft has built the function I described for you.
I'm sure this could be of some great help for you : [deployqt](http://labs.trolltech.com/blogs/2007/08/23/deploying-mac-applications-without-the-hassle/) Hope this helps !
I understand you will serve only static files. In this case, lightweight HTTP servers will give you a higher performance for a given machine. The following are well known: - [Lighttpd][1] - [Thttpd][2] - [Nginx][3] Many more are listed on [Wikipedia][4]. There's a more recent [article][5] on IBM DeveloperWorks. [1]: http://en.wikipedia.org/wiki/Lighttpd [2]: http://en.wikipedia.org/wiki/Thttpd [3]: http://www.nginx.net/ [4]: http://en.wikipedia.org/wiki/Tiny_web_servers [5]: http://www.ibm.com/developerworks/web/library/wa-ltwebserv/
How can I reverse engineer a DirectShow graph?
|video|directx|directshow|mpeg|
I have a DirectShow graph to render MPEG2/4 movies from a network stream. When I assemble the graph by connecting the pins manually it doesn't render. But when I call Render on the GraphBuilder it renders fine. Obviously there is some setup step that I'm not performing on some filter in the graph that GraphBuilder is performing. Is there any way to see debug output from GraphBuilder when it assembles a graph? Is there a way to dump a working graph to see how it was put together? Any other ideas for unraveling the mystery that lives in the DirectShow box? Thanks! -Z
What is the best way to connect and use a sqlite database fron C#
|c#|sqlite|
I've done this before in C++ by including sqlite.h but is there a similarly easy way in C#?
What is the best way to connect and use a sqlite database from C#
You mentioned that you're using NHibernate - are you closing your NHibernate sessions at appropriate points (such as the end of each iteration?) If not, then the size of the object map loaded into memory will be gradually increasing over time, and each session flush will take increasingly more CPU time.
You can declare a "table variable" in SQL Server 2005, like this: declare @foo table ( Id int, Name varchar(100) ); You then refer to it just like a variable: select * from @foo f join bar b on b.Id = f.Id No need to drop it - it goes away when the variable goes out of scope.
The syntax you want is: create table #tablename The # prefix identifies the table as a temporary table.