input
stringlengths
51
42.3k
output
stringlengths
18
55k
SharePoint - Determine the Site Definition used to create a Site Template (.STP) <p>A SharePoint site template is basically a saved version the differences between a Site Definition and the current state of a site. I've read that Site Templates can only be applied to sites that use the same Site Definition that was us...
<p>STP files are just ZIP-compressed files. If you rename the extension to *.ZIP you can extract the contents and examine the XML files that will contain the info you are looking for.</p> <p>I don't have a STP file around so I can't tell you exactly what file to look for but I've done that before and is not that hard ...
Good c++ lib for threading <p>I prefer a lib solely based on pthreads. What is a good c++ lib to for threading?</p>
<p>How about <a href="http://www.boost.org/doc/libs/1%5F38%5F0/doc/html/thread.html" rel="nofollow">boost threads</a>?</p> <blockquote> <p>Boost.Thread enables the use of multiple threads of execution with shared data in portable C++ code. It provides classes and functions for managing the threads themselves...
With Apache httpd, how do I configure no caching for a given UserAgent? <p>I have Apache HTTPD configured to add a cache header to requests for most static content:</p> <pre><code>ExpiresActive On ExpiresDefault "access plus 1 year" # Force JNLP and BSH files to expire immediately so updates are checked for # and see...
<p>Your <code>ExpiresByType</code> directive looks like a good idea... if that's not enough, then try using <code>BrowserMatch</code>:</p> <pre><code>BrowserMatch JNLP ua_is_jnlp </code></pre> <p>This sets the environment variable <code>ua_is_jnlp</code> to some value for any request whose user agent header contains ...
How can I get the current network interface throughput statistics on Linux/UNIX? <p>Tools such as MRTG provide network throughput / bandwidth graphs for the current network utilisation on specific interfaces, such as eth0. How can I return that information at the command line on Linux/UNIX?</p> <p>Preferably this woul...
<p><code>iftop does for network usage what top(1) does for CPU usage</code> -- <a href="http://www.ex-parrot.com/~pdw/iftop/">http://www.ex-parrot.com/~pdw/iftop/</a></p> <p>I don't know how "standard" iftop is, but I was able to install it with <code>yum install iftop</code> on Fedora.</p>
Testing document uploads in Development server using json files <p>I just built a small application(using Django) which will accept any jobseeker resumes. So any jobseeker uploads his/her resume in the form provided. How do I test this using testcases. I am used to writing fixtures for my initial data using json files....
<p>you can try <a href="http://www.djangosnippets.org/snippets/1300/" rel="nofollow">django fake file uploads</a></p>
How can I pass along the Page Number in a HyperLinkField in a GridView? <p>I have gridview that I am using paging on. I want to pass along the current page in a asp:Hyperlink so I can send them back to the current page when they are done viewing the details of a record. Is this possible? If it is how can I do this?</...
<p>One way to do it is converting it to a template column, that way you can use normal databind syntaxt to get to it (&lt;%#)</p>
AS3 How to remove previous loaders <p>In Flash CS4, I'm creating a photo gallery. My goal is to load different thumbnails from a number of images. I have managed that when one clicks an image, a number of thumbnails are being displayed, but when one clicks another image, the new thumbnails are placed on top of the old ...
<p>This is where an Array is your friend. You could do this without an array by merely using a while loop to remove every last child from the sprite or movieclip that you added the thumbs to. The reason we use arrays is so that we can reuse the thumbs, instead of reloading them we merely remove them from the display ...
How to show "busy" dialog (spinning wheel) on Smart Phone <p>Can't find how it is called nor how to pop it up.</p> <p>My CF application is talking over the web with a web service. Want to show my user some "busy activity" dialog.</p> <p>Any suggestions how to show the default one from WinMo?</p>
<p>The following should work...</p> <pre><code>using System.Windows.Forms; ... Cursor.Current = Cursors.WaitCursor; </code></pre>
How do I simulate a slow internet connection (Edge/3g) on a mac. Is there a Firefox plugin? <p><strong>Exact Duplicate</strong>: <a href="http://stackoverflow.com/questions/473465/firefox-plugin-to-simulate-slow-internet-connection">http://stackoverflow.com/questions/473465/firefox-plugin-to-simulate-slow-internet-conn...
<p>On a Mac or BSD, use:</p> <pre><code>sudo ipfw pipe 1 config bw 350kbit/s plr 0.05 delay 500ms sudo ipfw add pipe 1 dst-port http </code></pre> <p>And to reset to your initial settings:</p> <pre><code>sudo ipfw flush </code></pre>
Problems with using nsIURIContentListener in Firefox Extension <p>I am developing a small extension that has to redirect certain URLs to another Site. It's working fine, except for one situation: if open the Link with "Context-Menu -> Open in new Tab", the current page is redirectet to my page and a second tab opens wi...
<p>Okay, I did some research. The Hook was a wrong aproach. I changed the code now. Look into the git to find out more...</p>
What's the best way to monitor an InputStream? <p>I'm reading a file in via apache.commons.FtpClient.</p> <p>This works fine 99.9% of the time but sometimes it just dies in the read() method...</p> <pre><code>InputStream inStream = ftp.retrieveFileStream(path + file.getName()); String fileAsString = ""; if(inStream ...
<p>If your code hangs it means your FTP server has not sent the entire file. You can use a Timer, but I believe FtpClient allows you to set a timeout.</p> <p>BTW: the way you read the file is <em>very</em> inefficient. If your file is larger than a few K it will use increasing amounts of CPU.</p> <p>You are creatin...
CSS: Simulating flexible width (without min-width)- <p>I have a DIV container of 100% width holding x divs. The last child DIV floats right, the rest float left. All child DIV's remain in a line so long as they fit in the bar (all oriented left, except for the last div which sits by itself on the right). If the window ...
<p>I hate to say it (or rather the anti-table crowd will hate it) but you know what does this pretty easily?</p> <p>That's right: tables.</p> <pre><code>&lt;style type="text/css"&gt; #topbar { width: 100%; } #topbar div { white-space: nowrap; overflow: hidden; } #topright div { text-align: right; } &lt;/style&gt; &lt...
Button BackgroundImage Property <p>I am trying to write an application on Windows Mobile but I am experiencing a problem.</p> <p>I want to draw a picture of arrows on the button but I do not know how to do this. </p> <p>How can I accomplish this?</p>
<p>You need to draw a custom control. See this <a href="http://msdn.microsoft.com/en-us/library/ms229655.aspx" rel="nofollow">link</a> for an example. You can draw the icon using Graphics.DrawImage function.</p>
How to determine a windows executables DLL dependencies programatically? <p>How to determine what DLL's a binary depends on using programmatic methods? </p> <p>To be clear, I am not trying to determine the DLL dependencies of the running exec, but of any arbitrary exec (that may be missing a required DLL). I'm looki...
<p>Take a look at the <a href="http://msdn.microsoft.com/en-us/library/ms680209%28VS.85%29.aspx"><code>IMAGE_LOAD_FUNCTION</code></a> API. It will return a pointer to a <a href="http://msdn.microsoft.com/en-us/library/ms680349%28VS.85%29.aspx"><code>LOADED_IMAGE</code></a> structure, which you can use to access the var...
Change font of cell in DataGrid on Windows Mobile <p>I'm using VS 2005 to create a Windows Mobile program in C#. I need to display data in a grid. The only grid control I could find for Windows Mobile is DataGrid, so I placed one on my form. I now need to change the width of some columns and the font &amp; color of ...
<p>I am not sure you can change the font for individual columns or cells. The grid has a property that lets you set the font and size. To set the width of columns, I use this method (it adds a table style to the grid):</p> <pre><code>private void SetColumnWidth(int columnID, int width) { // add table style if firs...
How can I use "mod rewrite" to redirect a folder path to a subdomain, but without a browser redirect? <p>I have a file that I want to redirect to a subdomain using mod_rewrite. For example, I would like to redirect the request for <code>http://www.mydomain.com/xyz</code> to the subdomain <code>xyz.example.com</code></...
<p>I <em>THINK</em> this will do what you want it to:</p> <pre><code>Options +FollowSymLinks RewriteEngine On RewriteRule ^(.*?)/(.*?)$ http://$1.mydomain.com/$2 </code></pre> <p>As this stands it will redirect EVERY request that goes to a subfolder so if you links for images or css that are in a sub folder it will a...
Do you know good tutorial websites to develop a prePost in Tomcat? <p>We want to integrate a prepost rutine in our webserver (tomcat). A filter that will capture the post before sent to the user and add a line of code in the html before sent to the user. We are looking for tutorial or any help on this.</p>
<p>Not 100% sure I understand the question, but it sounds like you may be looking for servlet filters:</p> <p><a href="http://java.sun.com/products/servlet/Filters.html" rel="nofollow">http://java.sun.com/products/servlet/Filters.html</a></p>
C# Threading Patterns - is this a good idea? <p>I was playing with a project of mine today and found an interesting little snippet, given the following pattern, you can safely cleanup a thread, even if it's forced to close early. My project is a network server where it spawns a new thread for each client. I've found th...
<p>Aborting another thread at all is just a bad idea unless the whole application is coming down. It's too easy to leave your program in an unknown state. Aborting your <em>own</em> thread is occasionally useful - ASP.NET throws a <code>ThreadAbortException</code> if you want to prematurely end the response, for exampl...
Understanding JavaScript - Resource <p>Using the tiny Diggit/Blog feature of StackOverflow described <a href="http://stackoverflow.com/about">here</a>:</p> <p></p> <p>I would like to post the following Google tech talk video I have just saw and that I found quite interesting.</p> <p>I have always had problems unders...
<p>JavaScript: the bad parts.</p> <ol> <li><p>The biggest mistake is late error detection. JavaScript will happily let you access a non-existant object member, or pass the wrong number of arguments to a function, and fill the gap with ‘undefined’ objects, which, unless you deliberately check for them (which is imp...
Making forms in Rails <p>So far I've built a simple form for a user using the <code>form_for</code> method to wrap around my user model.</p> <p>But if I'm going to create a form now which doesn't doesn't map directly to any particular model, should I still be using <code>form_for</code>?</p>
<p>You probably just want <a href="http://api.rubyonrails.com/classes/ActionView/Helpers/FormTagHelper.html#M001697" rel="nofollow"><code>form_tag</code></a>.</p>
problem with setting formula in column <p>I have problem with setting the formula in particular field.I am using sql database have been added from->add new item->sql database.I have orders table with following field ordernum primary key orderdate smalldatetime, custemail varchar(50), subtotal money, salestax money, shi...
<p>This example should illustrate what you are looking to achieve.</p> <pre><code> create table #table ( ordernum int identity(1,1) primary key, orderdate smalldatetime, custemail varchar(50), subtotal money, salestax money, shipping money, total AS(subto...
What is the best alternative for QueryString <p>We heard a lot about the vulnerabilities of using QueryStrings and the possible attacks. Aside from that, yesterday, an error irritated me so much that i just decide to stop using QueryStrings, i was passing something like:</p> <pre><code>Dim url As String = "pageName.as...
<p>You could use <a href="http://msdn.microsoft.com/en-us/library/ms178139.aspx" rel="nofollow">Cross-Page Postbacks</a>.</p> <p>Check also this article: </p> <ul> <li><a href="http://msdn.microsoft.com/en-us/library/6c3yckfw.aspx" rel="nofollow">How to: Pass Values Between ASP.NET Web Pages</a></li> </ul>
What are the differences between a multidimensional array and an array of arrays in C#? <p>What are the differences between multidimensional arrays <code>double[,]</code> and array-of-arrays <code>double[][]</code> in C#?</p> <p>If there is a difference, what is the best use for each one?</p>
<p>Array of arrays (jagged arrays) are faster than multi-dimensional arrays and can be used more effectively. Multidimensional arrays have nicer syntax.</p> <p>If you write some simple code using jagged and multidimensional arrays and then inspect the compiled assembly with an IL disassembler you will see that the sto...
problem occuring when i am inserting date <p>while inserting date mysql server takes the year and day correctly but the month is defaultly taking januavary into the database. i am using mysql server version 5.0.22 i am inserting the date though application. the application was developed by using Springs web mvc frame-w...
<p>Can you display the mysql INSERT statement which is being used to insert the data into the database? This would indicate whether it is a malformed INSERT statement or whether it is a valid statement using incorrect data. </p> <p>Once you know what is happening, you can track down where the problem really is. I woul...
How to prevent UIView's drawRect from clearing out the paths drawn by previous drawRect calls? <p>Everytime UIView's drawRect is called, the content drawn by previous drawRect (using Core Graphics) is cleared out. How can I make it so that the paths rendered from previous drawRect calls stay until I explicitly clear i...
<p>You basically need to clip the 'dirty' part of your rect where changes have been made, and only this part will be re-drawn.</p> <pre><code>- (void)setNeedsDisplayInRect:(CGRect)invalidRect </code></pre>
Northwind Starters Kit <p>Is the Northwind Starter Kit from Codeplex a good starting point to learn more about how to best architect an ASP.NET application?</p> <p>Is there something similar for the AdventureWorks database examples?</p>
<p>Northwind database was the best sample database for SQL Server 2000.</p> <p>Talk about SQL Server 2005, AdventureWorks is better than Northwind. Northwind is not the best database due to few new features of analysis and reporting service of SQL Server 2005.</p> <p>MSDN Book On Line (BOL) uses the AdventureWorks in...
C# Session management <p>I am using a C# Webservice to log a user out. I am using the formsauthentication.signout for the same. </p> <p>I am passing this webservice call through JQuery. How to I get the user to redirect to login page? I tried the window.location = "login.aspx", it works but if i type in another page i...
<p>Are you sure that the FormsAuthentication.SignOut() is running? (Debug to make sure it is hit by the web service.) </p> <p>You should also manually clear out the authentication cookie on the client, in your jQuery handler after a successful call to the web service.</p>
Weird apache behavior when trying to display urls without html extension <p>I have a url that is easily accessible when you request it as:</p> <pre> http://example.com/2005/01/example.html or http://example.com/2005/01/example </pre> <p>(I actually don't know why it works without the extension. Instead,...
<p><a href="http://httpd.apache.org/docs/2.2/content-negotiation.html#multiviews"><code>MultiViews</code></a> could cause this behavior. Try to disable it:</p> <pre><code>Options -MultiViews </code></pre>
Internationalization with Nibs. Is that really a good idea? <p>In the Apple Docs they say that a Nib enables internationalization by just translating the Nib into many languages. I am thinking now about a worse but realistic scenario: You have made a huge user interface. Then you translate this into 25 languages. So yo...
<p>The localization situation is not ideal. Although Cocoa UI elements support some dynamic flexibility in their sizing (the ausosizing flags), it's very difficult to arrange them in a view so that they will accommodate any sized text.</p> <p>As Heng-Cheong points out, this usually means that some adjustment to layout...
Weblogic "Abandoning transaction" warning <p>We randomly get warnings such as below on our WL server. We'd like to better understand what exactly these warnings are and what we should possibly do to avoid them. </p> <blockquote> <p>Abandoning transaction after 86,606 seconds: Xid=BEA1-52CE4A8A9B5CD2587CA9(1453...
<p>I know it's not very satisfying, but we do delete *.tlog files before startup in our app hosted on WLS 7.</p> <p>Our app is an event-processing back-end, largely driven by JMS. We aren't interested in preserving transactions across WLS restarts. If it didn't complete before the shutdown, it tends not to complete ...
MySQL: Check if the user exists and drop it <p>There’s not standard way to check if a MySQL user exists and based on that drop it. Are there any workarounds for this? </p> <p>Edit: I need a straight way to run this without throwing up an error<br /> e.g.</p> <pre><code>DROP USER test@localhost; : </code></pre>
<p>This worked for me:</p> <pre><code>GRANT USAGE ON *.* TO 'username'@'localhost'; DROP USER 'username'@'localhost'; </code></pre> <p>This creates the user if it doesn't already exist (and grants it a harmless privilege), then deletes it either way. Found solution here: <a href="http://bugs.mysql.com/bug.php?id=1916...
How do I fix Postgres so it will start after an abrupt shutdown? <p>Due to a sudden power outage, the <code>PostGres</code> server running on my local machine shut down abruptly. After rebooting, I tried to restart postgres and I get this error:</p> <p><strong><code>$ pg_ctl -D /usr/local/pgsql/data restart</code></st...
<p>You'd need to <a href="http://www.postgresql.org/docs/8.3/static/app-pgresetxlog.html">pg_resetxlog</a>. Your database can be in an inconsistent state after this though, so dump it with <code>pg_dumpall</code>, recreate and import back.</p> <p>A cause for this could be:</p> <ul> <li><p>You have not turned off hard...
'&' before the parameter name <p>Just a quick and no doubt easy question. I'm pretty new to PHP and am looking through some existing code. I have tried to find the answer to my question on google, but to no avail.</p> <p>Can somebody please let me know what the '&amp;' sign before the parameter $var does??</p> <pre><...
<p>Passes it by reference.</p> <p><strong>Huh?</strong> Passing by reference means that you pass the address of the variable instead of the value. Basically you're making a pointer to the variable.</p> <p><a href="http://us.php.net/language.references.pass">http://us.php.net/language.references.pass</a></p>
At which point in the life of an xmlHttpRequest object is serialised XML parsed into a DOM? <p>In JavaScript, <code>xmlHttpRequest.responseXML()</code> returns a <code>DOM Document</code> object. The <code>DOM Document</code> object is created from an XML-structured HTTP response body.</p> <p>At what point during the ...
<p>I wouldn't be surprised if this is browser dependent. Why not profile all three?</p>
decode base64 with dollar sign in ruby 1.8.5 <p>I have base64-encoded string (with two dollar signs, so it's not a common base64 string)</p> <p>The problem: Base64.decode64 (or .unpack("m")) decodes it just fine on my local machine(ruby 1.8.6), but with ruby 1.8.5 (the version used by Heroku) it doesn't work</p> <p>A...
<p>The dollar sign is not part of the Base64 specification.</p> <p>Simply strip the leading <code>$$</code> before unpacking:</p> <pre><code>str.sub(/^\$*/, '').unpack('m') </code></pre> <p>To strip all non-Base64 characters, emulating new (Ruby 1.8.6) behaviour,</p> <blockquote> <p><code>str.gsub(/[^ABCDEFGHIJKL...
Where do I find all Apple Guides for objective-c and cocoa? <p>I find that the xcode-builtin-documentation reader is hard to use. I want to see the root of all Guides available, to get an idea of how long I will have to keep reading until I can start. All the time some new Guide pops up to me, and I am wondering how ma...
<p>Start with <a href="http://developer.apple.com/mac" rel="nofollow">http://developer.apple.com/mac</a> - there are lots of docs there.</p>
How to import attributes and elements from XML to Filemaker? <p>I have an application that stores its user database to an XML file and I need to export selected fields to Filemaker so my client and mine the data on Filemaker. I managed to make XSLT file to import XML elements, but cannot seem to find a way to import an...
<p>I have to say I'm not sure I understood what you need here.<br /> If I did understand - you are not getting the value of </p> <pre><code>&lt;ITEM NAME="LastModifiedDate" VALUE="Fri, 05 Sep 2008 13:13:16 GMT"/&gt; </code></pre> <p>by using </p> <pre><code>&lt;xsl:call-template name="COL"&gt; &lt;xsl:with-p...
Social networks in an Delphi win32 application <p>I want to create some kind “social” connection/interaction in an application that I am creating.</p> <p>The application is for a restrict group of professionals, that would benefits for social connection/interaction with each other.</p> <p>So now I don’t know wh...
<p>Your question is quite vague but I try to give you some pointers. </p> <p>First you need to define what functionality you want in your application. You want a social network site for professionals so we can rule out the fluffy bits. But there are other aspects of a social network site that you maybe want to include...
What represents the most mentally challenging form of coding? <p>I am pursuing a graduate degree in Organic Chemistry.</p> <p>Right now, many talented people in my area are headed towards nanotechnology.</p> <p>What is the equivalent field in modern computer science?</p>
<p>For me, it's threading. Even relatively "simple" threading is challenging, and if you delve into the realms of lock-free code it gets even hairier. There are certainly threading paradigms which <em>don't</em> raise as many mental headaches (actors, message passing etc) but they tend to come with their own trade-offs...
Linq Query to Dataset <p>I got a linq query. I wanna take this query results to a dataset. How can I do this ?</p> <pre><code>var variable = from t in db.Islems where t.Tarih &gt;= dateTimePicker1.Value &amp;&amp; t.Tarih &lt; dateTimePicker2.Value select t; DataSet ...
<p>Check the extension method that I posted <a href="http://stackoverflow.com/questions/523153/how-do-i-transform-a-listt-into-a-dataset/523168#523168">here</a>, it uses reflection and generics to convert any IEnumerable&lt;T&gt; collection to a DataTable.</p>
Most important things about C# generics... lesson learned <p>What are most important things you know about generics: hidden features, common mistakes, best and most useful practices, tips...</p> <p>I am starting to implement most of my library/API using generics and would like to collect most common patterns, tips, et...
<p>One of the most important things I've learned is that you can <a href="http://msdn.microsoft.com/en-us/library/d5x73970.aspx">constrain the generic type parameter(s)</a>. This can be very powerful, allowing you to take customize the class for only certain types of objects and allowing you to use the members of that ...
Retrieving data with Selenium <p>I want to get the business hours from ScotiaBank branches that are near to me.</p> <p>The base-URL is: <a href="http://maps.scotiabank.com/" rel="nofollow">http://maps.scotiabank.com/</a></p> <p>I then,</p> <p>Click on the "Branches" radiobox.</p> <p>Click on the "Open Saturdays" ch...
<p>Here's an idea - if you can't write to a file or DB, you can certainly write quick little web app, and have selenium enter the data and click Submit there!</p>
Run db query (sql server 2005) with ajax. Is it possible? <p>I never worked with ajax.</p> <p>I need to know if it is possible to use ajax to run a query on the db (sql server 2005).</p> <p>My target is to run a query with refreshing the page.</p> <p>Have you got any ideas?</p>
<p>Directly, no. And that is a very good thing, since the JavaScript is generally running on an untrusted machine.</p> <p>But it should be pretty easy to have your AJAX fire off a callback (e.g. a post) and then have that do the query on the server side.</p>
Silverlight page not catching input events <p>I have been attempting to handle the KeyDown event of a UserControl (page) in my Silverlight application, but there seems to be some strange behaviour on the part of Silverlight user input functionality. The event is not getting raised under any circumstance. I have even tr...
<p>You can manage the user input from the main UIElement : Application.Current.RootVisual</p> <pre><code>Application.Current.RootVisual.KeyDown += Application_KeyDown </code></pre> <p>Then you can handle in the Application_KeyDown method all user inputs from the keyboard.</p> <p>You can also look at this issue : <a ...
How do I run command line "explorer /n, /select,(filename)" in c++ builder? <p>I've tried shellexecute, I've tried createprocess, I can't seem to get this to do anything.</p> <p>Running the command line manually (at the actual command prompt in a console window) works, but nothing I've tried so far will run it from ...
<p>Are you using escaped backslashes in your filename? For example:;</p> <pre><code>"c:\123.doc" </code></pre> <p>should be:</p> <pre><code>"c:\\123.doc" </code></pre> <p><strong>Edit:</strong></p> <pre><code> execlp("explorer", "/n, /select,c:\\foo.txt", 0) </code></pre> <p>works for me.</p> <p>To avoid replac...
Generation PDF from HTML (component for .NET) <p>Can you please point me to open source or a reasonably priced comercial product capable of generating PDF from HTML?</p>
<p>We currently use ABCpdf in one of our more complex applications. It has served us well and is not very expensive at all. I like that fact that I can send it raw HTML text and it will render it to a PDF in memory or as a file so we use to generate PDFs on the fly and serve them up via the web without actually ever sa...
Business entities / value objects framework with DbC support <p>The thing I think I spend most time on when building my business models is the validation of business entities and making sure the entity objects and their relationships maintains good integrity. My dream for a good entity/value object framework would help...
<p>There was a <a href="http://rads.stackoverflow.com/amzn/click/1430216468" rel="nofollow">small book I read last year by Steve Sanderson himself</a> that briefed me on DDD concepts. Even though the book was on ASP.NET MVC as a preview, he really focused on the "M" in MVC as a true and pure Domain Model - using almos...
How do you translate this code from Processing to C++? <p>I wrote this code in Processing (<a href="http://www.processing.org/" rel="nofollow">www.processing.org</a>) and was wondering how would one implement it using C++?</p> <pre><code>int i = 0; void setup() { size(1000,1000); } void draw() { // frameRate(120); ...
<p>I'd probably use <a href="http://www.libsdl.org/" rel="nofollow">SDL</a> for this. Your program will be a little longer, because you'll have to do some setup and tear-down on your own (plenty of good examples, though). You could do the same with OpenGL, but it would be quite a bit more work. If you go that route,...
Navigation Based Application with TabBar <p>I have a Navigation-Based Application that shows a TableView where you can select a cell and it brings you to a "Detail View" for that cell. I want this view to then have a TabBar where I can select between 3 subviews. I have found several solutions online for this but none a...
<p>Basically What you need to do is push a Tab View Controller onto the Navigation Controller's viewcontroller stack.</p> <p>Starting with a fresh "Navigation-Based Application" template. I added the following method in RootViewController.m :</p> <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIn...
Is there any way i can remove the line which is shown in MASKEDTEXTBOX fields when we set the mask? <p>The line that appears when we set the mask of a masked text box in winforms for c# does not seem attractive at all to me .I want to know if there is any way i can set the mask of the masked text box and that line is ...
<p>In VB.NET, the MaskedTextBox has a property called PromptChar (I'm sure it's the same in C#). It defaults to the underscore that you see. Change that.</p>
How to pass information using an HTTP redirect (in Django) <p>I have a view that accepts a form submission and updates a model.</p> <p>After updating the model, I want to redirect to another page, and I want a message such as "Field X successfully updated" to appear on this page.</p> <p>How can I "pass" this message ...
<p>This is a built-in feature of Django, called "messages"</p> <p>See <a href="http://docs.djangoproject.com/en/dev/topics/auth/#messages">http://docs.djangoproject.com/en/dev/topics/auth/#messages</a></p> <p>From the documentation:</p> <blockquote> <p>A message is associated with a User. There's no concept of e...
collection of system properties using web browser <p>Hi I am doing distributed computing environment. For the applications need to get distributed to different clients connected to the server in the network, I prefered to collect the client's system properties like free memory available in the client's system, so that ...
<p>Since you have tagged this with Java, I am assuming you are using a Java based client server model. What is the communication model between the client and the server here? RMI? Some proprietary protocol? Or is it a Java applet based app running in the browser?</p> <p>Update based on clarification : In that case you...
Why doesn't the weakref work on this bound method? <p>I have a project where i'm trying to use weakrefs with callbacks, and I don't understand what I'm doing wrong. I have created simplified test that shows the exact behavior i'm confused with. </p> <p>Why is it that in this test test_a works as expected, but the weak...
<p>You want a <a href="http://code.activestate.com/recipes/81253/">WeakMethod</a>. </p> <p>An explanation why your solution doesn't work can be found in the discussion of the recipe:</p> <blockquote> <p>Normal weakref.refs to bound methods don't quite work the way one expects, because bound methods are first-class ...
Modify VB property template in VS2008 <p>In VS2008 (VB.NET) when you type Public Property X As SomeType and press enter, VS auto-generates the rest of that property definition for you.</p> <p>I would like to be able to customize what VS generates.</p> <p>Any thoughts on how to go about that? VS must have a template ...
<p>I think that the Property generation uses an inbuilt macro. I haven't found it in the list of sample macros provided with VS. However, you can edit the <code>DefineAProperty.snippet</code>* file to modify it as per your requirement. Personally, though, I would suggest creating your own snippet rather than modifying ...
PSExec: How can I show a JPG file on a remote computer? <p>I need to start a document on a remote computer instead of an executable file, using PSExec.</p> <p>I tried to provide the file name of a jpg file to psexec associated with the -c command to copy the file, but the message returned for documents (and not execut...
<p>Try to use the command:</p> <pre><code>cmd.exe /c START c:\path\to\document.jpg </code></pre> <p>Document must be on the remote computer, so you have to copy it there by other command before calling psexec.</p>
static member variable of a subclassed class <p>Is it OK to have a static member variable defined in a base class, and having several derived classes each using its own instance of this member variable?</p> <p>The following code compiles successfully, and prints the right output, but I am still not sure that doing som...
<p>A very odd use of inheritance indeed. The base class is supposed to define interfaces ideally and contain as little or no state at all if possible according to good OO design principle. </p> <p>This works because your <code>foo()</code> resets the value of <code>A::s</code> everytime it is called. Try printing the ...
How to include() all PHP files from a directory? <p>Very quick n00b question, in PHP can I include a directory of scripts.</p> <p>i.e. Instead of:</p> <pre><code>include('classes/Class1.php'); include('classes/Class2.php'); </code></pre> <p>is there something like:</p> <pre><code>include('classes/*'); </code></pre>...
<pre><code>foreach (glob("classes/*.php") as $filename) { include $filename; } </code></pre>
Do i need one SocketAsyncEventArgs for each client connection made? <p>Please do i need a new SocketAsyncEventArgs for each client connection i make.</p> <p>I'm making several client connections in a loop, filling in the UserToken for each clients state from a database.</p> <p>Is there a way to reuse the SocketAsyncE...
<p>This question is slightly old but it's still relevant in my opinion. I suggest the following links for reference:</p> <ul> <li><a href="http://www.codeproject.com/KB/IP/socketasynceventargssampl.aspx" rel="nofollow">How to use the SocketAsyncEventArgs class</a></li> <li><a href="http://msdn.microsoft.com/en-us/libr...
TransforMiiX (XML/XSLT) <p>If you have a look at <a href="http://www.polldaddy.com" rel="nofollow">www.PollDaddy.com</a> you will see that for every question you add a resulting xml and xslt file are requested and when recieved they are transformed. </p> <p>Then when you save your page you will see that the adjusted x...
<p>I haven't used PollDaddy, but my guess is that they are not actually storing XML in the database. Most likely, it is being generated server-side for every request. The process would look something like this:</p> <ol> <li>Browser requests a specific question</li> <li>Server retrieves question detials from database</...
How to convert byte array to string in Common Lisp? <p>I'm calling a funny API that returns a byte array, but I want a text stream. Is there an easy way to get a text stream from a byte array? For now I just threw together:</p> <pre><code>(defun bytearray-to-string (bytes) (let ((str (make-string (length bytes))))...
<p>FLEXI-STREAMS (<a href="http://weitz.de/flexi-streams/">http://weitz.de/flexi-streams/</a>) has portable conversion function</p> <pre><code>(flexi-streams:octets-to-string #(72 101 108 108 111) :external-format :utf-8) =&gt; "Hello" </code></pre> <p>Or, if you want a stream:</p> <pre><code>(flexi-streams:make-f...
OnMouseDown, OnMouseMove and a Custom Control <p>I'm developing an app for <strong>windows mobile</strong>. I have my own control that moves the picture inside it. I have overrided the <strong>OnMouseDown</strong> and <strong>OnMouseMove</strong> to redraw the picture where the user move it.</p> <p>I only test it on W...
<p>I have never tryed some thing on windows mobile, but if your unsure of the events then make a multi line textbox and add some text to it each time a even is fired that way you should know when its fired..</p>
Python: Choosing between modules and classes <p>In my application I have to maintain some global application state and global application wide methods like currently connected users, total number of answers, create an application config file etc. There are two options:</p> <ol> <li><p>Make a separate appstate.py file ...
<p>Sounds like the classic conundrum :-) In Python, there's nothing dirty or shameful about choosing to use a module if that's the best approach. After all, modules, functions, and the like are, in fact, first-class citizens in the language, and offer introspection and other properties that many other languages use ob...
force firefox to get most current version of silverlight app <p>This question <a href="http://stackoverflow.com/questions/307709/how-do-you-force-firefox-to-not-cache-or-re-download-a-silverlight-xap-file">has been asked before</a> but 1) the user never accepted an answer 2) none of them stand out as better than the ot...
<p>Can you encode the version number or timestamp in the filename? That way, if the page changes, Firefox will notice that it points to a completely different resource and will reload it.</p>
Excessive static buildup <p>And here we go with my first not-directly-programming-related question on SO!</p> <p>I seem to suffer from an excessive amount of static buildup (the electrical kind, not the type modifier). This, of course, manifests itself as getting the crap shocked out of me pretty much any time that I ...
<p>Remember that static electricity is usually produced by certain materials rubbing together. So you might want to look at the materials of the things around you and see if less-static inducing items could be used instead.</p> <p>Humidity (or lack thereof) increases static buildup. Get a humidifier at home at least.<...
Database Structure & Hard drive seek time confusion <p>could some one help me out trying to understand how hard drive seeking works.</p> <p>I have a small binary database file which read performance is absolutely essential. If I need to skip a few bytes in the file is it quicker to use seek() or to read() then discard...
<p>All <em>seek</em> system call does is changing a position in file where the next read will be. It does not move the drive head. Drive heads move when data is read or written and you don't have direct control over what OS will do next.</p> <p>Reading lots of data you aren't going to need has impact because all read ...
Zend Framework PDF generation unicode issue <p>I have troubles using Zend Framework's PDF</p> <p>When I create PDF file I need to use UTF-8 as encoding. This is the code I am using to generate simple pdf file. I always get this wrong displayed. Instead of seeing 'Faktúra' in pdf file, it gives me 'Faktú' Instead of...
<p>Did you save the php source file as UTF-8?</p>
How to open multiple files with Delphi program invoked via shell open <p>I am currently using:</p> <pre><code>if ParamStr(1)&lt;&gt;'%1' then begin address.Text:=ParamStr(1); autoconfigfile; end; </code></pre> <p>to pick up the name of the file that was used to open the file with via file association.</p> <p>I n...
<p>Besides everything else, you should use %l instead of %1. That way your program will get a full (long) name of the file, not the short (DOS 8.3) one.</p> <p>EDIT: An answer to Rob's question in comments</p> <p>It seems that it's almost impossible to search for '%l' and '%1' (including percent sign) either using Go...
Simple open source paint program <p>I am trying to experiment with expanding paint-like program adding custom features to it. Can you suggest a simple open source paint-like program written in C and using GTK+ library which I could expand? It should compile in Linux but also in Windows (using MinGW). Thanks.</p> <p>ED...
<p>I never had this urge, but my 4 year old daughter loves <a href="http://www.tuxpaint.org/" rel="nofollow">TuxPaint</a>. I believe it uses GTK+.</p>
In the Eclipse JDT, how do I most efficiently find a typeroot in the workspace corresponding to a fully qualified name? <p>The JavaCore class includes a create method that allows me to get the ITypeRoot (representation of class file or compilation unit) given a handle identifier that embodies the location of the file.<...
<p>From the JavaCore singleton, try:</p> <pre><code>ITypeHierarchy myHierarchy = newTypeHierarchy(IRegion region, WorkingCopyOwner owner, IProgressMonitor monitor); </code></pre> <p>Once you have the hierarchy, you can traverse class file hierarchies as ITypes pretty easily.</p>
How do I Click a Table tag using watiN? <p>This is the table tag which i need to click . I guess this is invokes some JS function. I dont know howto resolve it .</p> <p>table id="btnTbl_compose:send_message" class="buttonTable axsButton" cellpadding="0" title="Send this message (Ctrl+Enter) | Send this message and kee...
<p>I think (as far as I go your issue) this line will work for you:</p> <pre><code>ie.Table("btnTbl_compose:send_message").Click() </code></pre>
The file an IconRef comes from <p>Is there any way to find out the .icns file an IconRef refers to or has been loaded from? Or even the id of the containing bundle if there is one?</p> <p>I understand that not all icons are loaded directly from a file (composite icons for example) so this wouldn't work all the time.</...
<p>Launch Services has private APIs for traversing its bundle registration database, and you can find the .icns files that way. You can view this information using the lsregister tool inside LaunchServices.framework/Support; use lsregister -dump to view the complete database.</p> <p>Obligatory UndocumentedGoodness war...
Reposition Air NativeWindow when Maximized? <p>How can I set the native window position when maximized?</p> <p>I've tried repositioning it upon the DISPLAY_STATE_CHANGE event which sort of works - but the window flashes at maximized size before repositioning, and more importantly the 'maximize' button of the window is...
<p>Try with NativeWindowDisplayStateEvent.DISPLAY_STATE_CHANGING</p>
JQuery/Javascript Reordering rows <p>I have a aspx page that looks something like this:</p> <pre><code>&lt;tr id="Row1"&gt; &lt;td&gt;Some label&lt;/td&gt; &lt;td&gt;Some complex control&lt;/td&gt; &lt;/tr&gt; &lt;tr id="Row2"&gt; &lt;td&gt;Some label&lt;/td&gt; &lt;td&gt;Some complex control&lt;/td&gt; &lt;/t...
<p>Why not order the rows on the server side? If you are going to reorder them with JQuery as soon as the page is loaded then it will be more efficient to do this job in server code, especially if the user's selected order is stored in a database.</p>
Should I save strings returned by NSLocalizedString()? <p>I'm working on an iPhone app that we're localizing in both English and Japanese for our initial release. We frequently call <code>NSLocalizedString()</code> to load the appropriate localized string for display. Is it generally better to save the localized stri...
<p>Micro-optimizing. First make it work, then make it right, then make it fast. And when you get to step 3, run Shark (or Instruments), then follow its guidance.</p>
divs collapsing around header <p>I have a few nested divs:</p> <pre><code>&lt;div id="wrapper"&gt; &lt;div id="header"&gt; &lt;!-- a bunch of float divs here --&gt; &lt;/div&gt; &lt;div id="body"&gt; &lt;div id="content"&gt; &lt;!-- a bunch of html controls here --&gt; &lt;/div&gt; &lt;/div&...
<p>Try this. Note: the overflow hidden on the header div solves the need for a clearing div. Note sure why you're using relative+absolute positioning for the content though. That's better handled with margins imho.</p> <pre><code>&lt;html&gt; &lt;head&gt; &lt;title&gt;Layout&lt;/title&gt; &lt;style type="text/c...
Errors on non model fields in rails <p>What's the best way to report errors on form fields not associated with a particular model in Rails? As an example, I have a form for the batch creation of user accounts with random users / passwords. It takes as inputs the quantity of users to make, information about what attribu...
<p>You can add your own errors manually to your model object like this.</p> <pre><code>@user_batch.errors.add_to_base("Foo") </code></pre>
Browser Version or Bug Detection <p>I've recently seen some information about avoiding coding to specific browsers an instead using feature/bug detection. It seems that John Resig, the creator of jQuery is a big fan of feature/bug detection (he has an excellent talk that includes a discussion of this on <a href="http:...
<p>Object detection's greatest strength is that you only use the objects and features that are available to you by the client's browser. In other words given the following code:</p> <pre><code>if (document.getFoo) { // always put getFoo in here } else { // browsers who don't support getFoo go here } </code></...
Linq to SQL Updating through BLL issues - Best Practices <p><strong>The Setup:</strong></p> <p>I have a large form with many fields that are collected to update a Product object. So in the ASPX page the user changes the fields that need updating and they hit submit. In the code behind I do something like this;</p> ...
<p>Regardless of LINQ-to-SQL or not, here's what I do. Upon submission, I search for the item (it should be quick if it is a single item using the PK), my DAL returns a data object, and I use reflection to map each element in the page with corresponding properties in the data object. My DAL only updates items that chan...
why does printf show a 0 for vector size when cout shows the correct size? <p>I don't get why I get 0 when I use printf and %d to get the size of my vector:</p> <pre><code>vector&lt;long long&gt; sieve; int size; ... //add stuff to vector ... size = sieve.size(); printf("printf sieve size: %d \n", size); //prints "pri...
<p>Now, with the complete source, it is clear.</p> <p>You declared:</p> <pre><code>int size; </code></pre> <p>Then you used:</p> <pre><code>std::printf("current last: %d sieve size: %ld\n", answer, size); std::printf("Limit: %d Answer: %d sieve size: %ld\n", limit, answer, size); </code></pre> <p>If size is int, y...
What is SQL injection? <blockquote> <p><strong>Possible Duplicates:</strong></p> <p><a href="http://stackoverflow.com/questions/332365/xkcd-sql-injection-please-explain">XKCD SQL injection - please explain</a><br /> <a href="http://stackoverflow.com/search?q=sql+injection">http://stackoverflow.com/search?q=sql...
<p><strong>Can someone explain SQL injecton?</strong> </p> <p>SQL injection happens when you interpolate some content into a SQL query string, and the result modifies the syntax of your query in ways you didn't intend.</p> <p>It doesn't have to be malicious, it can be an accident. But accidental SQL injection is mor...
WinForms data binding - Bind to objects in a list <p>I need some help/guidance on WinForms data binding and I can't seem to get Google to help me with this one.</p> <p>Here is my scenario. Consider the following classes which is similar to what I need:</p> <pre><code>public class Car { public string Name { get; s...
<p>You should note that you can bind controls to <em>any</em> object type that implements the interfaces <code>IList</code>, <code>ICollection</code> or <code>IEnumerable</code> or inherits from classes that implement these interfaces. Generic collections also qualify for this kind of binding.</p> <p>These are interna...
Which data type in c# is better suited for currency calculations? <p>And also the better counter part in sql server for mapping.</p>
<p>Decimal and Decimal :)</p> <ul> <li>.Net: <a href="http://msdn.microsoft.com/en-us/library/system.decimal.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/system.decimal.aspx</a></li> <li>SQL; <a href="http://msdn.microsoft.com/en-us/library/ms187746.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/...
How do i get all Sunday dates in a particular year? <p><strong>Exact duplicate:</strong> <a href="http://stackoverflow.com/questions/590385/how-to-get-all-dates-of-sundays-in-a-particular-year-in-java">http://stackoverflow.com/questions/590385/how-to-get-all-dates-of-sundays-in-a-particular-year-in-java</a></p> <p><hr...
<p>New to programming? Well, let's have a look at the code together!</p> <p>The first thing that I see is the conditional inside the loop:</p> <pre><code>if (cal.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) </code></pre> <p>This checks if the current date stored in the Calendar <code>cal</code> has a <code>DAY_OF_W...
Multibyte character constants and bitmap file header type constants <p>I have some existing code that I've used to write out an image to a bitmap file. One of the lines of code looks like this:</p> <pre><code>bfh.bfType='MB'; </code></pre> <p>I think I probably copied that from somewhere. One of the other devs says t...
<p>All three are (probably) equivalent, but for different reasons. </p> <pre><code>bfh.bfType=0x4D42; </code></pre> <p>This is the simplest to understand, it just loads bfType with a number that happens to represent ASCII 'M' in bits 8-15 and ASCII 'B' in bits 0-7. If you write this to a stream in little-endian for...
What is the limitation of PerlNet? <p>I've used PerlNet for a data extraction project. Perl is a powerful language for extracting data and text manipulation with a huge CPAN module. However, my program need some kind of UI, thread... which I decided to use .NET C#. With Perl Dev Kit, we have an option to wrap an Perl m...
<p>There's a book "<a href="http://rads.stackoverflow.com/amzn/click/0130652067">Programming Perl in the .NET Environment</a>" that may help you.</p> <p>ActiveState doesn't seem to have any publicly accessible documentation online that gives any kind of details about PerlNET. But I'd be very surprised if there wasn't...
What's the most irrational user behaviour you have witnessed? <p>While novice software designers expect their users to behave rationally, it's far from being the case ; I've seen many times the user perception being totally disconnected from reality, or it's feedback obviously irrational.</p> <p>I think <em>we are the...
<p>A few years ago, hospitals (at least French hospitals) were run using old win 3.11 software’s. Every single task was tedious; moving someone from one room to another would take 5 minutes to an expert user</p> <p>A friend of mine was working on selling up-to-date software to those people. The same simple task woul...
How to get the number of rows of the selected result from sqlite3? <p>I want to get the number of selected rows as well as the selected data. At the present I have to use two sql statements: </p> <p>one is </p> <pre><code>select * from XXX where XXX; </code></pre> <p>the other is </p> <pre><code>select count(*) fro...
<p>try this way</p> <pre><code>select (select count() from XXX) as count, * from XXX; </code></pre>
What's the best way to fork/thread in PHP on Win? <p>I have a php script that checks for updates on many (thousands) of sites. On occasion (more frequently as the number of sites increases), I get an execution timeout on the update of one of these sites, and the whole script goes down the drain.</p> <p>The best idea I...
<p>If you're going to use cURL look into the multi* family of methods which allows you to streamline cURL and interacting with a set of sites. That being said, you could also set your max execution time (via ini_set) to some arbitrarily high number and/or keep your own watchdog counter so that you never let it get too ...
"Bus error" accessing a set<int> from a struct <p>Searched for a while, but I can't figure out why this would raise a bus error.</p> <p>Any help would be much appreciated.</p> <pre><code>typedef struct { set&lt;int&gt; pages; } someStruct; ... void someFunction() { ... someStruct *a = createSomeStruct(); // ...
<p>malloc doesn't initialize the memory it allocates. try with new.</p>
Oolong, SIO2 or commercial Game engine for 3D iPhone Games newbie? <p>I'm trying to pick between the <a href="http://code.google.com/p/oolongengine/">Oolong</a> and <a href="http://sio2interactive.com/store.php">SIO2</a> iPhone game engines for my first game programming project. I have some Cocoa experience and many ye...
<p>I started my first SIO2 app last night and it was easy to get up &amp; running from the tutorials (the tutorials include a full XCode project that you can load and start hacking on). The tutorial projects are also very well commented - this makes it quicker to pick up.</p> <p>The interfaces to SIO2 are mostly in C,...
Minimize browser window using javascript <p>Is there a javascript or jQuery method to minimize the current browser window?</p>
<p>There is no way to minimize the browser window within javascript.</p> <p>There are ways to change the size of the window, but no true minimization (nice word)</p>
For loop with non-contiguous range <p>I have a loop that runs through each column and sets the value to an R1C1 sum of a few rows above it. I'm using a for loop, but I want to skip a few columns, as they contain formulae already in the cell. How can I set up a loop that only cycles through a non-contiguous set or numbe...
<p>A VBA version of Learning's C# answer:-</p> <pre><code>Dim col As Integer: For col = 1 To 70 Select Case col Case 25, 36, 37, 44, 60, 63, 64, 67, 68, 73, 75, 76 'do nothing' Case Else 'do something' End Select Next col </code></pre>
When to buy Visual Studio Team System? <p>We use Visual Studio Professional and we are quite pleased with it. We use Tortoise SVN, Visual VSN, NUnit and resharper. A combination that works very well for us. </p> <p>Now we need to run load tests.</p> <p>We looked at Visual Studio Team System, but frankly the pricing s...
<p>I don't really see how VSTS will help you with load testing.</p> <p>Also, a 6 developer team is too small to benefit from VSTS.</p>
Data Binding POCO Properties <p>Are there any data binding frameworks (BCL or otherwise) that allow binding between <em>any two CLR properties</em> that implement <code>INotifyPropertyChanged</code> and <code>INotifyCollectionChanged</code>? It seems to be it should be possible to do something like this:</p> <pre><cod...
<p>I wrote <a href="http://truss.codeplex.com/" rel="nofollow">Truss</a> to fill the void.</p>
How to write meaningful docstrings? <p>What, in Your opinion is a meaningful docstring? What do You expect to be described there?</p> <p>For example, consider this Python class's <code>__init__</code>:</p> <pre><code>def __init__(self, name, value, displayName=None, matchingRule="strict"): """ name - field na...
<p>I agree with "Anything that you can't tell from the method's signature". It might also mean to explain what a method/function returns.</p> <p>You might also want to use <a href="http://sphinx.pocoo.org/">Sphinx</a> (and reStructuredText syntax) for documentation purposes inside your docstrings. That way you can inc...
Ajax Modal Popup Display Issue <p>On the web page, there is gridview control contains product ID's. bind to a link button.</p> <p>On ItemCommand event of gridview, I fetch the product information and display in the ajax modal popup extender control. The popup is programatically show on ItemCommand of gridview and also...
<p>I do the same but i have no such problem. So i am pasting code here that may b help full to u.<br> <strong>CODE:</strong></p> <pre><code>protected void GVallusers_RowEditing(object sender, GridViewEditEventArgs e) { try { GridViewRow gvRow = ((GridView)sender).Rows[e.NewEditIndex]; ...
How do I utilise all the cores for nmake? <p>I just got a new quad core computer and noticed that nmake is only using 1 process.</p> <p>I used to use make which had the switch -j4 for launching 4 processes. What is the nmake equivalent?</p> <p>[edit] Based on the information below I have been able to add a command t...
<p>QT have tool supposed for this <a href="http://qt.gitorious.org/qt-labs/jom">http://qt.gitorious.org/qt-labs/jom</a></p>
How to create a string or char from an ASCII value in JavaScript? <p>In JavaScript, how to get a string representation of an ASCII value, e.g. how to turn <code>65</code> into <code>A</code>?</p>
<p>The <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/String/fromCharCode">fromCharCode</a> method converts ASCII to a string: </p> <pre><code>&lt;script type="text/javascript"&gt; document.write(String.fromCharCode(65,66,67)); // ABC &lt;/script&gt; </code></pre> <p>Hope this ...
Store last created model's row in memory <p>I am working on ajax-game. The abstract: 2+ gamers(browsers) change a variable which is saved to DB through json. All gamers are synchronized by javascript-timer+json - periodically reading that variable from DB. </p> <p>In general, all changes are stored in DB as history, b...
<p>You can use the cache system:</p> <p><a href="http://docs.djangoproject.com/en/dev/topics/cache/#topics-cache" rel="nofollow">http://docs.djangoproject.com/en/dev/topics/cache/#topics-cache</a></p>
Eclipse on the Mac... using Windows keyboard shortcuts? <p>I'm a power Eclipse user on Linux/Windows, and the keyboard shortcuts are practically muscle memory. Just recently started developing on a Mac (love it!), using Eclipse, but was really tripped up by the use of the <code>command</code> key... and not all the sho...
<p>Instead of using the command key, </p> <p><img src="http://www.pajbam.com/wp-content/uploads/2008/01/organize%5Fimports-menu%5Fitem.png" alt="alt text" /></p> <p>, may be this <a href="http://www.martinkahr.com/2006/02/13/mac-keys-for-eclipse/">article <strong>Mac Keys for Eclipse</strong></a> might contains a <a ...