input
stringlengths
51
42.3k
output
stringlengths
18
55k
Hibernate for getting a list of primitive integers for subselect <p>Isn't there a way with Hibernate to return a list of (primitive) values from one column in a table? I need this for a subselect where I only want rows where a particular field is not in a list of ids from another table.</p>
<p>Can you use a Hibernate raw SQLQuery?</p> <pre><code>SQLQuery q = getSession().createSQLQuery("select int_column from table"); List&lt;Integer&gt; list = (List&lt;Integer&gt;) q.list(); </code></pre>
sed: using variables across multiple lines <p>I am attempting to "grep" out bind for a specific user from an LDAP log file. The lines I need will be spread across multiple lines in the log. Here is example input:</p> <pre><code>[2009/04/28 17:04:42.414] DoBind on connection 0x7c8affc0 [2009/04/28 17:04:42.414] Bind na...
<p>As an intellectual challenge, I have come up with a solution using sed (as requested), but I would say that using some other technology (perl in my favorite) would be more easy to understand, and hence easier to support.</p> <p>You have a couple of options where is comes to multi-line processing in sed:</p> <ul> <...
Binding Textbox IsFocused to Popup IsOpen plus additional conditions <p>I have a <code>TextBox</code> and a <code>Popup</code> control. I want the <code>Popup.IsOpen</code> property to be bound to the <code>TextBox.IsFocused</code> property. In other words, if the textbox has focus, the popup is open. Alternatively, if...
<p>The following code demonstrates having two text boxes in a StackPanel, setting focus to the top text box will open the Popup. At which point, if you then move Focus to the text box contained in the Popup it will remain open. If you move focus to another element, in this instance the second text box in the StackPanel...
Why put search input inside a form tag? <p>I found that SO put the search input inside a form tag, and i found some other websites do the same, such as google, they put the search input and search button inside this:</p> <pre><code>&lt;form action="/search" method="get" name="gs" id="tsf"&gt; </code></pre> <p>I want ...
<p>How about you read a <a href="http://www.w3schools.com/html/html%5Fforms.asp" rel="nofollow">tutorial on HTML forms</a>?</p> <p>The data entered in the form must be send to a server. The <code>action</code> attribute tells the browser <em>which</em> server.</p> <p>Also, there are two common ways to send the data: ...
Dragging text from a Word document to a Java text component? <p>When you drag a block of text from a Word document into a Java text component, the text is removed from the Word document. This is obviously undesirable in some cases. Is there a way I can prevent Word from removing the text, while still copying it into ...
<p>Try holding down ALT, CTL, or SHIFT (I forget) while dragging. I believe this changes the default behavior of your cursor from cut -> copy.</p> <p>You may be able to set the default Drop action in your JText component to only allow copy, I know you can do that in SWT.</p>
How do you preform an EJB lookup with application security? <p>I'm trying to lookup an EJB from a standalone java application. I'm thinking in terms of WebSphere Application Server 6.1, but if someone knows how to do this for another application server, it may get me in the right direction. </p> <p>What I'm currentl...
<p>For WebSphere 6, was trying to acceess an secured EJB from a servlet (Jersey-RESTful WAR) also deployed in the same WebSphere; Here is the code that works</p> <pre><code> Properties prop = new Properties(); prop.put("org.omg.CORBA.ORBClass", "com.ibm.CORBA.iiop.ORB"); prop.put("java.naming.factory.i...
Supporting the "Expect: 100-continue" header with ASP.NET MVC <p>I'm implementing a REST API using ASP.NET MVC, and a little stumbling block has come up in the form of the <code>Expect: 100-continue</code> request header for requests with a post body.</p> <p><a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.ht...
<p>The .NET framework by default always sends the <code>expect: 100-continue</code> header for every HTTP 1.1 post. This behavior can be programmatically controlled per request via the <a href="http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.expect100continue.aspx"><code>System.Net.ServicePoint....
Removing irrelevant directories with SVN <p>I have a directory that came off of the part of the trunk that I checked out that is not relevant to my interests. How do I use Tortoise SVN to remove this folder from my system and stop SVN from trying to give me updates with out removing it from the repository?</p>
<p>I have not used it myself yet, but take a look at Sparse Directories:</p> <p><a href="http://svnbook.red-bean.com/en/1.5/svn.advanced.sparsedirs.html" rel="nofollow">http://svnbook.red-bean.com/en/1.5/svn.advanced.sparsedirs.html</a></p> <blockquote> <p>Subversion 1.5 introduces a feature called sparse directori...
How to picture "for" loop in block representation of algorithm <p>I have probem / strange question, i got algorithm with few "for" loops and now i need to do block scheme of this algorithm. </p> <p>I know how to picture "while" loop, but is this acceptable to represent "for" loop using "while" and at this point make d...
<p>Here's a flow chart that illustrates a for loop:</p> <p><img src="http://i.stack.imgur.com/dr2hY.png" alt="Flow Chart For Loop"></p> <p>The equivalent C code would be</p> <pre><code>for(i = 2; i &lt;= 6; i = i + 2) { printf("%d\t", i + 1); } </code></pre> <p>I found this and several other examples on one of ...
F# Print if true <p>I'm trying to print the output of function only when it is true but so far all attempts have been unsuccsessful.</p> <p>Something on the lines of: </p> <pre><code>let printFactor a b = if b then print_any((a,b)) </code></pre> <p>Where <code>b</code> is a boolean and <code>a</code> is an integer...
<p>You could do e.g. this</p> <pre><code>let xyz() = [ (1,true); (2,false) ] let printFactor (i,b) = if b then printfn "%A" i xyz() |&gt; List.iter printFactor </code></pre> <p>but it would probably be more idiomatic to do, e.g. this</p> <pre><code>xyz() |&gt; List.filter (fun (i,b) -&gt; b) |&gt; L...
Statistic for requests in deployed VPS servers <p>I was thinking about different scalability features, and suddenly understand that I don't really know how much can handle one server (VPS). The question for them who have loaded projects.</p> <p>Imagine server with:</p> <ol> <li>1 Gb Ram</li> <li>1 Xeon CPU</li> <li>C...
<p>I would look at cacti - it can give you plenty of stats to choose from.</p>
firebug net tab 0 request problem <p>I've step into a problem with firebug,</p> <p>say under the "Net" tab,it always shows "0 request"</p> <p>But I've already "enabled monitor for xxx"</p> <p>Has any one met the same problem before?</p> <p>What can I do to make "Net" tab return to normal again?</p>
<p>You probably aren't looking at "all". Above the "Net" tab is another set of Tabs (All, HTML, CSS, JS, XHR, Images, Flash) You probably have one of these selected. </p> <p>I'd laugh, but I've had this happen to me before as well.</p>
Best practices - store Twitter credentials or not? <p>I'd like to be able to give my users the ability to display their recent tweets on their profile on my website.</p> <p>I have a PHP twitter wrapper and understand how to make API calls etc, but I'm just wondering how to manage the user information.</p> <p><strong>...
<p>Use OAuth, no need to ask users for their passwords:</p> <p><a href="http://apiwiki.twitter.com/Authentication" rel="nofollow">http://apiwiki.twitter.com/Authentication</a></p> <p>I think everyone would/should probably agree that storing the twitter usernames/passwords is bad, I can't believe they ever created a s...
GalleryView - JQuery With Landscape and Portrait Photos <p>Does anyone have a nice solution for <a href="http://spaceforaname.com/galleryview" rel="nofollow">GalleryView</a> when I want to display photos that are a mix of landscapes and portraits? </p>
<p>I generally do this with CSS. I have a main div that floats left and is sized as needed. Then, I put the rest of the contents in that div. You might be able to see what I'm talking about on this article about <a href="http://dpatrickcaldwell.blogspot.com/2008/12/online-image-thumbnailer.html" rel="nofollow">an on...
How do I monitor the lock on a file to see when it is released? [C++] <p>I am looking for a way to create a program in <em>unmanaged</em> c++ that waits until a file is unlocked (as in it is no longer in use) and than does something. I have had no luck locating how to do this, any help would be appreciated!</p> <p>UP...
<p>Something like this will wait without wasting cpu cycles.</p> <pre><code>HANDLE h = FindFirstChangeNotification("C:\Path to folder holding file", FALSE, FILE_NOTIFY_CHANGE_LAST_WRITE); while(true) { if (CheckLockFile("C:\Path to file")) { // Do something break; } WaitForSingleObjec...
How can I layer two audio files in C#? <p>I need to mix two audio files. Audio 1 will be a static file and used to "tag" Audio 2. To be clear I'm talking about an audio tag not an ID3 tag.</p> <p>There are two basic problems I can't wrap my head around. </p> <p>1) How can I repeat Audio 1 when mixed with Audio 2 so t...
<p>You can use <a href="http://naudio.codeplex.com" rel="nofollow">NAudio</a> to do this. Use the WaveFileReader class to make a WaveStream that can read from each of your files (the MP3 one would need to be converted to PCM first - see the use of Mp3FileReader in the NAudio demo code). Then I would make a derived Wave...
Show pictures on mouseover <p>I have an ASP.NET page where I am showing products in a Gridview control. When users mouse over a Product name a window should appear and show that Product's picture in it (by getting product id and than find associated image for it.) </p> <p>Is there an AJAX control or something like th...
<p>There are a number of ways that it could be done, but typically I see it as a "tooltip" on the item that has an image tag, that points to an aspx page that returns the image. Or the image directly.</p> <p>Here is an example of my first option</p> <pre><code>&lt;img src="http://www.mysite.com/GenerateProductImage....
How to learn MVC -- *not* in a web setting <p>I wish to learn the MVC paradigm and apply it to GUI development (in C#.NET, at least at first, but I think I'd like to apply it elsewhere too). Pretty much every tutorial I've seen so far assumes that if you are thinking MVC, you must be doing web development, and they ex...
<p>Check out the book Head <em>First Design Patterns.</em> It's an excellent guide to implementing design patterns and has a solid example of MVC as well.</p>
staging and production database <p>I need to run calculations on a very large database. The application slows down significantly when I run the calculations. A possible work around would to copy this into a second database and run the calculations offline. When it's done switch it with the live database. Can this proce...
<p>Sure, and it can be automated. But data cannot be altered if you are going to swap back over it.</p> <p>I would only transfer the data that needs to be transferred, and aggregate what data can be aggregated during the transfer - and index the destination tables to optimize the calculation. However, both these opt...
What is the => token called? <p>The => token is part of the C# 3.0 lambda syntax. My efforts to find the name of this token have failed so far.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/bb311046.aspx">Lambda operator</a></p>
Debugging stored procedure in SQL Server 2005 from Visual Studio? <p>I see a lot of frustrated questions here and elsewhere with no clear answer. I am trying to get the stored procs to debug, but with no success. </p> <p>Client: either VS2005 or VS2008, works in neither. When I select 'Step into Stored Procedure' f...
<p>One important issue here is that this won't work if SQL Server process is running as local system, which is the default install. It needs to be running as an account which is in the administrator group on the local machine. </p> <p>What I have done is set up local user on my box named "sqlserver" and put it into th...
How to implement displaying the requested named anchor using JQuery / JavaScript / CSS <p>The page has a container div which holds multiple content divs. Each content div has a named anchor. Only one of the content divs is displayed at a time:</p> <p>Example:</p> <pre><code>&lt;style&gt; .lurk { display: none; } &...
<p>You can use <code>location.hash</code> to retrieve the anchor from the URL. This will work across browsers and will work in <code>$(document).ready</code>.</p> <p>For example:</p> <pre><code>$("div.container &gt; div").removeClass("lurk"); if (location.hash) $("#" + location.hash).addClass("lurk"); </code></pr...
Is it correct to have many Castle Windsor containers per application if those containers belong to different tiers? <p>I've been playing around with Castle Windsor lately and realized I could use it to back a container-like object I currently use already. So far I've only read information about an application having on...
<p>Personally, I don't have any problem using just one container. After all, your MonoRail controllers will only be aware of the services/interfaces they need so they don't need to know about the inner components of other tiers. </p> <p>If you still don't want to make your inner components so visible to the rest of th...
Team Foundation 2010 beta - get rid of unused fields (Migration plan) <p>Downloading it now and was wondering if anyone else has moved an existing Custom process template (Work Items types, work items and source control) to the beta.</p> <p>Over the past few years our custom process template has "evolved" and I know i...
<p>In your new server instance you would be able to move over a copy of the latest version of files from version control and migrate your work items by taking the new version of the process templates and putting in the fields that you need and then adding the data for the current work items (I usually use Excel to do a...
Is it possible to update/insert data into dataset with SqlCommand? <p>I use this code to update data in database table. Can reuse same code to update a dataset? Thanks.</p> <pre><code> using (SqlConnection cn = new SqlConnection(ConfigurationManager.ConnectionStrings["Northwind"].ConnectionString)) { ...
<p>The same exact code? No. SqlConnection (and SqlCommand) is specific to SqlServer. DataSet exists outside of that context, so you would have to rewrite your code to accomodate updating a DataSet.</p>
Adding text labels to sliders in iPhone Settings application <p>When configuring a Settings.bundle as part of an iPhone application bundle, it's trivial to add minimum and maximum value <em>images</em> to sliders (PSSliderSpecifier), but not simple maximum and minimum <em>text</em> labels.</p> <p><a href="http://devel...
<p>I needed to do the same thing by exposing some timing variables from my code to the settings bundle so that non-developers could play around with them. As far as I know, there is no way to do this using a slider. I did, however find a good workaround:</p> <p>Use a multi value control instead and give it a list of s...
C# Linq-SQL: An UpdateByID method for the Repository Pattern <p>I have implemented a sort of <code>Repository</code> class and it has has <code>GetByID</code>, <code>DeleteByID</code> methods and so on, but I'm having trouble implementing the <code>UpdateByID</code> method.</p> <p>I did something like this:</p> <pre>...
<p>All you have updated is a local variable; for that to work you would have to copy the <em>member values</em> from <code>entity</code> to <code>item</code> - not quite so simple.</p> <p><hr /></p> <p>Something like below; the only reason I used <code>TKey</code> was that I tested on Northwind.Customer, which has a ...
Posting data from one asp.net page to another <p>Ok I have done enough research on it but cant find the solution. Its from one page of a application to another page of application. Since I would be sending in username and password i cant send it as "getT" so i need to do a "post". I will be using ssl though - not sure ...
<p>We use Global.asax to do much the same thing you are describing. Assuming both web apps use the same business domain. You can use the following to set a logged in user in our business domain. You can then use the presence of that property to know not to ask for login again on your second Web App.</p> <pre><code>...
why would shorthand PHP opening statements not be working? <p>I am trying to get my Mac setup as a php server, however, as successful as I have been so far, I seem to have run into a bit of bother. </p> <p>My PHP opening statments are not working... but only the shorthand ones.</p> <p>This works:</p> <pre><code>&lt;...
<p>In your php.ini, set <a href="http://ie.php.net/manual/en/ini.core.php#ini.short-open-tag" rel="nofollow">short_open_tag</a> to On.</p> <pre><code>short_open_tag = On </code></pre> <p>From the docs:</p> <blockquote> <p>short_open_tag boolean</p> <p>Tells whether the short form (<code>&lt;? ?&gt;</code> ) ...
How do you know when looking at the list of attributes and methods listed in a dir which are attributes and which are methods? <p>I am working through trying to learn to program in Python and am focused on getting a better handle on how to use Standard and other modules. The dir function seems really powerful in the i...
<p>Instead of: "<code>print hasattr(d1,each)</code>", try: "<code>print each, type(getattr(d1,each))</code>". You should find the results informative. </p> <p>Also, in place of <code>dir()</code> try <code>help()</code>, which I think you're really looking for.</p>
Difference between a user and a schema in Oracle? <p>What is the difference between a user and a schema in Oracle? </p>
<p>From <a href="http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11%5FQUESTION%5FID:6162110256950">Ask Tom</a></p> <p>You should consider a schema to be the user account and collection of all objects therein as a schema for all intents and purposes.</p> <p>SCOTT is a schema that includes the EMP, DEPT and BONUS...
bash check if user mount fails <p>I'm writing a script to transfer some files over sftp. I wanted do the transfer as a local transfer by mounting the directory with sshfs because it makes creating the required directory structure much easier. The problem I'm having is I'm unsure how to deal with the situation of not ...
<p>Just test whether <code>sshfs</code> returns 0 (success):</p> <pre><code>sshfs user@host:dir mountpoint || exit 1 </code></pre> <p>The above works because in bash the logical-or <code>||</code> performs <a href="http://en.wikipedia.org/wiki/Short-circuit%5Fevaluation" rel="nofollow">short-circuit evaluation</a>. A...
Can I set two background images on the same element with CSS? <p>Sample HTML code:</p> <pre><code>&lt;table&gt; &lt;tr&gt; &lt;td class="a b"&gt; </code></pre> <p>Sample CSS file:</p> <pre><code>.a { background-image:url(a.png); } .b { background-image:url(b.png); } </code></pre> <p>It seems like the "b" part...
<p>Now you can do with CSS3. <a href="http://www.zenelements.com/blog/css3-background-images/">http://www.zenelements.com/blog/css3-background-images/</a></p> <pre><code>#my_CSS3_id { background: url(image_1.extention) top left no-repeat, url(image_2.extention) bottom left no-repeat, url(image_3.extention) bottom righ...
how to connect and disconnect usb programmaticaly <p>i need to connect and disconnect usb progrmmatically , that is i have inserted the usb device i need to transfer the file using C#,.net application ,the application will watch the particular folder and transfer the file from that folder to usb drive. i need to disco...
<p>May be this <a href="http://www.codeproject.com/KB/system/DriveDetector.aspx" rel="nofollow">code sample</a> could help you.</p>
Static/strong typing and refactoring <p>It seems to me that the most invaluable thing about a static/strongly-typed programming language is that it helps refactoring: if/when you change any API, then the compiler will tell you what that change has broken.</p> <p>I can imagine writing code in a runtime/weakly-typed lan...
<p>I think you're conflating when types are checked with how they're checked. Runtime typing isn't necessarily weak.</p> <p>The main advantage of static types is exactly what you say: they're exhaustive. You can be confident all call sites conform to the type just by letting the compiler do it's thing.</p> <p>The mai...
Mysql ORDER BY using date data row <p>I have a query something like this:</p> <pre><code>SELECT title, desc, date FROM tablename ORDER BY date ASC, title ASC; </code></pre> <p>Works fine when the data actually has a date. Issue is, date submission is optional, so I sometimes get 0000-00-00 as a date, which ha...
<pre><code>ORDER BY date = '0000-00-00' ASC, date ASC, title ASC </code></pre>
ASP.NET web page to device connect to server's USB (COM) port <p>I am working on a way to send commands to an Arduino board from a web site. The Arduino board is connected to the computer via a USB port (a COM port).</p> <p>I have managed to connect and control the board using a VB.NET program. I also wrote a VB.NET c...
<p>Rather than storing the connecting object in the <a href="http://msdn.microsoft.com/en-us/library/system.web.sessionstate.httpsessionstate.aspx" rel="nofollow"><code>HttpSessionState</code></a>, store it in the <a href="http://msdn.microsoft.com/en-us/library/system.web.httpapplicationstate.aspx" rel="nofollow"><cod...
JQuery submitted values for checkboxes are undefined <p>I just received some really great help today with a prior jQuery problem and figured since my luck was running that maybe I could also get some help with some checkboxes. Can someone please tell me what I am doing wrong?</p> <p>Thanks!</p> <p>The checkboxes are ...
<p>Actually both..</p> <p>the checkboxes don't have value, so if you try to alert() their values it will lead to "undefined", but if you are facing this on alerting the checkbox itself you are probably doing something wrong.</p> <p>Setting their values to true, won't lead to anything, as @Soviut said, most properties...
Can modules have properties the same way that objects can? <p>With python properties, I can make it such that </p> <pre><code>obj.y </code></pre> <p>calls a function rather than just returning a value.</p> <p>Is there a way to do this with modules? I have a case where I want</p> <pre><code>module.y </code></pre> ...
<p>Only instances of new-style classes can have properties. You can make Python believe such an instance is a module by stashing it in <code>sys.modules[thename] = theinstance</code>. So, for example, your m.py module file could be:</p> <pre><code>import sys class _M(object): def __init__(self): self.c = 0 d...
Is it bad practice to use unicode symbols or shapes in a  app? <p>There have been a few times where I've used unicode symbols in place of small icons in one of my Cocoa apps, either because it's easier to draw inline with text or because I didn't feel like firing up Photoshop to draw a simple arrow. I've wondered th...
<p>I don't see anything really wrong with this shortcut approach, especially given Apple's concern for typographic quality. In your shoes, I would consult the <a href="http://unicode.org/charts/symbols.html" rel="nofollow">Unicode Code Charts</a>, and make sure I'm very carefully specifying a programmatic unicode chara...
Question about server socket programming model <p>Over the last couple of months I've been working on some implementations of sockets servers in C++ and Java. I wrote a small server in Java that would handle &amp; process input from a flash application hosted on a website and I managed to successfully write a server th...
<p>Sounds like you have a couple of questions here. I'll do my best to answer what I can see.</p> <p><strong>1. How should I handle threading in my network server?</strong></p> <p>I would take a good look at what kind of work you're doing on the worker threads that are being spawned by your server. Spawning a new thr...
warning: declaration does not declare anything <p>I'm getting this warning all over the place in some perfectly well functioning objective-c code within XCode. My google-fu has failed me... others have run into this but I could not find an explanation on what exactly is causing it or how it can be fixed.</p>
<p>In pure C, the following code:</p> <pre><code>int; typedef int; </code></pre> <p>elicits the following warnings from GCC with no warning options set:</p> <pre><code>x.c:1: warning: useless keyword or type name in empty declaration x.c:1: warning: empty declaration x.c:2: warning: useless keyword or type name in e...
ClientLogin for Picasa Web Albums Data API with a Google App Domain login <p>I'm using the Picasa Web Albums Data API to access users' photo albums from a WPF application.</p> <p>I've followed the code located here: <a href="http://code.google.com/apis/gdata/clientlogin.html" rel="nofollow">http://code.google.com/apis...
<p>After playing around a bit, I changed the <code>AccountType = "GOOGLE"</code>, and that worked. </p> <p>Thinking about it, that makes sense. I created the account using an existing email address. So in this situation, I was logging into the Google account, not the hosted account.</p> <p>Originally, I had not sp...
How to build a top-like UI in Ruby <p>I want to build an application with a text based UI that is similar to the Linux command 'top', in Ruby. What toolkits and/or techniques can I use to build the UI? In particular I want an area of the console window that is constantly updating, and the ability to press keys to man...
<p>For a terminal interface, see <a href="http://ncurses-ruby.berlios.de/" rel="nofollow">http://ncurses-ruby.berlios.de/</a></p>
CMenu and Dialog-based applications <p>Is it possible to put a menu in a dialog based application? How?</p>
<p>Yes, it is possible to add menu to the dialog based applications. You can create the menu as a resource and attach the same to the dialog.</p> <p>If you open the properties for dialog, you can see a Menu as a property for which you can assign an existing Menu ID.</p> <p>Steps:</p> <ul> <li>Right click on Resource...
How is dependency property implemented? <p><br/> Can anyone explain how is dependency property implemented? Is it just a static dictionary that is declared in base class with a reference of given instance as a key?I can't find any resources about this in internet...<br/>Thanks a lot</p>
<p>I see two questions:</p> <ol> <li>How do dependency properties work? The <a href="https://msdn.microsoft.com/en-us/library/ms753192(v=vs.100).aspx" rel="nofollow">MSDN article on Properties in WPF</a> is a great series on dependency properties. Should be a good overview to get you started.</li> <li>How are dependen...
StringBuilder and capacity? <p>I have created test application to test, Is StringBuilder copy data to another instance and grow it buffer when its length is more than current capacity and verify in ildasm.exe but it seem identical.</p> <p>How to verify StringBuilder will copy its data into new instance and grow the bu...
<p>Capacity represents the contiguous memory allocated to the StringBuilder. Capacity can be >= length of the string. When more data is appended to the StringBuilder than the capacity, StringBuilder automatically increases the capacity. Since the capacity has exceeded (that is contiguous memory is filled up and no more...
How to solve symbolic equation with double coefficients in matlab? <p>I have quadratic equation 1/x = 1/(a-x) + 1/(3*a -x)</p> <p>I want to solve it in matlab:</p> <pre><code>solve('1/x=1/(a-x)+1/(3*a-x)', 'x') ans = (4/3+1/3*7^(1/2))*a (4/3-1/3*7^(1/2))*a </code></pre> <p>Is there any way to solve equation with f...
<p><a href="http://forum.allaboutcircuits.com/showthread.php?t=8234" rel="nofollow">Apparently</a>, <code>double(ans)</code> should convert it for you.</p>
Long check list ui pattern for web <p>I have a data entry page where the user is required so make some selections from a list. Currently it is just a check list with about 10 items they can tick, but is will expand soon to about 230. What is a good UI paradigm for dealing with a large number of selectable items? I am c...
<p>Dual list, BUT, for a large # of non-groupable elements:</p> <ul> <li>MUST have ability to select multiple elements (Duh!)</li> <li>SHOULD have ability to select ALL elements with a click</li> <li>SHOULD have ability to search (in either list), and select all matching elements</li> </ul> <p>Also, if the lists are ...
Memory consumption of EF <p>Good morning!</p> <p>Actually I'm playing around with EF atm a little bit and I need your guys help:<br /> Following scenario: I have a table with a lot of data in it. If I'm querying this table through EF, all the records get load into memory.</p> <p>eg.</p> <pre><code>var counter = defa...
<p>First of all, I hope you're not actually doing a count like that; the Count method is far more efficient. But presuming this is just demo code to show the memory issue:</p> <p><a href="http://blogs.msdn.com/adonet/archive/2008/02/11/exploring-the-performance-of-the-ado-net-entity-framework-part-2.aspx" rel="nofollo...
How to suppress the carriage return in python 2? <pre><code> myfile = open("wrsu"+str(i)+'_'+str(j)+'_'+str(TimesToExec)+".txt",'w') sys.stdout = myfile p1 = subprocess.Popen([pathname,"r", "s","u",str(i),str(j),str(runTime)],stdout=subprocess.PIPE) output = p1.communicate()[0] pr...
<p>Here's how I removed the carriage return:</p> <pre><code> p = Popen([vmrun_cmd, list_arg], stdout=PIPE).communicate()[0] for line in p.splitlines(): if line.strip(): print line </code></pre>
Help with google maps link for Iphone <p>i have a google maps link which will open the google map application...@"http://maps.google.com/maps?q=cupertino"...instead of a specific location i want it to open with the current longitude and latitude..would the link be like @"http://maps.google.com/maps?q=ll" like that...or...
<p>You can use different URL parameters to set the location like </p> <blockquote> <p>?center=l,l</p> </blockquote> <p><a href="http://code.google.com/apis/maps/documentation/staticmaps/#URL_Parameters" rel="nofollow">http://code.google.com/apis/maps/documentation/staticmaps/#URL_Parameters</a></p>
Need git repo layout suggestion for a new project <p>I'm working on a new project that I plan to keep in a git repository. I know how I would do this in CVS, but I'm a bit new to git and could use some suggestions.</p> <p>The project is firmware for two embedded devices that talk to each other and are packaged as a pa...
<p>I used git to manage hardware/software codesigns, so I may have some useful advice to give.</p> <p>As a rule of thumb, if you have parts of the design that can interoperate with each other regardless of the revision you're working on, you're better off making separate git repositories for these.</p> <p>To give an ...
How to create a large Compatible Memory DC in GDI programming? <p>I want to create a large CompatibleDC, draw a large image on it, then bitblt part of the image to other DC, in order to achieve high performance. <p>I am using the following code to create compatible Memory DC. But when the rect becomes very large, etc:...
<p>Instead of creating a large DC and then blitting a portion of it another, smaller DC, create a DC the same size as the destination DC, or at least the same size as the blit destination. Then, offset all your drawing commands by the (-x,-y) of the sub section you want to copy. If your destination is (100,200)-(400,40...
IB objects vs manually allocated objects in init/viewDidLoad <p>When I programmatically allocated a UILabel in my custom initWithNibName method, and later in viewDidLoad, tried to assign a string to it, the label was not pointing to anything. I didn't release it; the label shows on the screen. If I create the label in ...
<p>If you want to create the UILabel programatically you can, but you still do it in viewDidLoad (as opposed to initWithNibName). </p> <p>Don't be afraid to do UI setup in viewDidLoad. It is provided to add any static UI elements BEFORE the view appears on screen.</p> <p>The view will not appear until just before vie...
How do I get database validation among my rule violations on ASP.NET MVC? <p>On the <a href="http://www.wrox.com/WileyCDA/Section/id-321793.html" rel="nofollow">NerdDinner</a> example a set of <em>business rules</em> are written to validate the data on a model. Things like empty strings are checked for and by calling m...
<p>You need to catch the exceptions thrown by your Data Access Layer, and convert those into calls which update the ModelState to indicate the errors in question. There's not really a good way to do this on a global level, since specific SQL errors will only be able to be interpreted at the time they're called, rather ...
How to modularize a (large) Java App? <p>I have a rather large (several MLOC) application at hand that I'd like to split up into more maintainable separate parts. Currently the product is comprised of about 40 Eclipse projects, many of them having inter-dependencies. This alone makes a continuous build system unfeasibl...
<p>Using <a href="http://www.osgi.org/Main/HomePage">OSGi</a> could be a good fit for you. It would allow to create modules out of the application. You can also organize dependencies in a better way. If you define your interfaces between the different modules correctly, then you can use continuous integration as you...
Is it necessary to serialise properties when using sqlserver session state for .net 3.5 framework and IIS 7.0 <p>I was wondering if the following error,</p> <p><em>System.Web.HttpException: Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, a...
<p>When you use a StateServer or SQL Server session state all objects you store in session must be serializable. For your own classes this can often be easily fixed by marking them with the [Serializable] attribute, but for classes delivered by third-parties there is no trivial fix. </p> <p>If you keep running into th...
Way to find out which Compilation Options were used to build SQLite <p>During my performance tests I found out the the SQLite version which Apple provides on the iPhone 3.0 is significantly faster then my self compiled amalgamation SQLite version. So my question is, is there a way to find out which compilation options ...
<p>You can use the <a href="http://www.sqlite.org/pragma.html#pragma_compile_options" rel="nofollow">compile_options</a> pragma (or the related functions as mentioned in the linked documentation) to view the compile-time options that were used when building SQLite. However, the availability of this pragma (and the rela...
How to Debug .net applications in windows mobile <p>I am new to mobile application development.</p> <p>How to Debug .net applications in windows mobile. </p> <p>Please help me in this. Thanks in advance. </p>
<p>use Debug configuration and you should be able to run through active sync your application to your mobile device or emulator with break points etc.</p> <p>If for some reason your breakpoints are not hit, then go and delete your bin/obj directories and also your mobile deployment folder, some times VS gets stucked.....
can i store datatable for the further refinement <p>i have a datatable with the results i just want to refine the results using this datatable... i am trying to do it but this datatable is distroyed each time page is refreshed......</p>
<p>You can save the datatable in a session variable or cache</p> <pre><code>Cache.Insert("MyData1", datatable) </code></pre> <p>when the the page loads again you can check to see of the cache value is not equal to null. If its not you can use the value again.</p> <p>ie. </p> <pre><code>Datatable Source; Source = (...
Sorting JSON by values <p>I have a very simple JSON object like the following:</p> <pre><code>{ "people":[ { "f_name":"john", "l_name":"doe", "sequence":"0", "title":"president", "url":"google.com", "color":"333333" }, { "f_name":"mich...
<p>Try this on for elegance and efficiency.</p> <p>I love my jQuery, but it's not ideal for sorting here, unless you can only use the existing html (you don't have the array handy to do your sorting on). Just write a function that takes the property name as a string and the order (ascending or descending) as a boolean...
What programming language to be used for developing sofware for Mobile Phones? <p>What language should I use to develop programs for Nokia/Samsung/LG/Sony Ericsson phones? (Both Symbian and Non Symbian) ?</p> <p>Ofcourse to install the software straight inside the phone.</p> <p>Thanks.</p>
<p>There are 2 main "classes" of applications for mobile phones - native apps and Java apps.</p> <p>For Java, most new phones support some version of <a href="http://en.wikipedia.org/wiki/Mobile%5FInformation%5FDevice%5FProfile" rel="nofollow">MIDP</a>, and developing for it is fairly easy. As for installation, howeve...
source code for unix environments 'cd' command <p>Where can I find the source code for Unix environment's <code>cd</code> command?</p> <p>I want to know how the command is implemented.</p>
<p>Here is a complete explanation how <code>cd</code> works: <a href="http://web.archive.org/web/20090515201659/http://www.cs.ucr.edu/~brett/cs153_w02/syscall.html" rel="nofollow">http://web.archive.org/web/20090515201659/http://www.cs.ucr.edu/~brett/cs153_w02/syscall.html</a></p> <p>The <code>cd</code> Unix command j...
Classes vs. Modules in VB.NET <p>Is it considered an acceptable practice to use Modules instead of Classes with Shared member functions in VB.NET?</p> <p>I tend to avoid Modules, because they feel like leftover remains from Visual Basic 6.0 and don't really seem to fit in anymore. On the other hand, there doesn't seem...
<p><code>Module</code>s are VB counterparts to C# <code>static</code> classes. When your class is designed solely for helper functions and extension methods and you <strong>don't</strong> want to allow <strong>inheritance</strong> and <strong>instantiation</strong>, you use a <code>Module</code>.</p> <p>By the way, us...
What technologies to use for starting up a new project? (Technology Prespective) <p>Today I had a nice opportunity from my manager to propose new technologies to start up a new project. Here we used to use ASP.NET and SQL mainly. I really wanna propose using ASP.NET MVC and LINQ To SQL and do some nice TDD. The questio...
<p>The obvious, if not immediately helpful answer is to go learn about any technologies before you recommend them to anyone. If you are not convinced then go pick up one of the bits of kit and try to make it do something.</p> <p>.Net MVC, Ruby on Rails and a raft of other platforms exist, pick 3 and try the same proje...
Problem with IE when using display:block for links <p>This is my HTML:</p> <pre><code>&lt;div id="links"&gt; &lt;a href=""&gt;Link 1&lt;/a&gt; &lt;a href=""&gt;Link 2&lt;/a&gt; &lt;a href=""&gt;Link 3&lt;/a&gt; &lt;a href=""&gt;Link 4&lt;/a&gt; &lt;/div&gt; </code></pre> <p>And these are the CSS styles:</p> ...
<p>I have had the same problem and none of the solutions above worked for me. I also needed the background of the links to be transparent.</p> <p>A very uncomfortable solution, but one that worked perfectly is to set the background to a transparent gif. Only needs to be 1x1 px as it will repeat.</p> <pre><code>#links...
How to implement private mail for website? <p>How would you go about implementing private mail functionality such like Bebo/Facebook and other social networking sites?</p> <p>You have the option to post public comments on a member's profile, but you can also send a private mail.</p> <p>I was considering using XML and...
<p>I may have misunderstood what you want, but how about creating a mail table, with for example</p> <ul> <li>Sender</li> <li>Recipient</li> <li>Subject</li> <li>Message</li> <li>Sent</li> <li>Read (bool)</li> </ul> <p>And then just add a row to that table when someone sends a private message to someone.</p>
How do I 301 redirect one domain to the other if the first has a folder path <p>I want to 301 redirect from: www.olddomain.com to the root of newdomain.com but I want it to work no matter what the folder path is on the old domain. eg: the following should all redirect to the root of newdomain.com</p> <pre><code>www.ol...
<p>Try this rule:</p> <pre><code>RewriteEngine on RewriteCond %{HTTP_HOST} (^|\.)old\.example\.com$ RewriteRule ^ http://new.example.com/ [L,R=301] </code></pre> <p>Where <code>old.example.com</code> is the old host name and <code>new.example.com</code> the new.</p>
Excel .NET COM - Automation error. The system cannot find the file specified <p>I have a .NET 2.0 COM object that's used by VBA in Excel. It works fine on my dev machine, but when trying to use it on a clean VM workstation I get this error:</p> <p>Automation error. The system cannot find the file specified.</p> <p>T...
<p>You need to either invoke regasm with the full path to the assembly as the <code>codebase</code> parameter value or put the assembly into some location which is always on the path for searching libraries. Otherwise it will not be found when the client tries to instantiate the COM object.</p>
Troubleshooting consistent "SQLException: Lock wait timeout exceeded" <p>I have an application running Quartz 1.6.1 w/persistent job store, with MySQL 5.1 as the DB. This application used to boot up okay in Tomcat6. At some point, it began throwing the following exception upon EVERY boot:</p> <pre><code>- MisfireHandl...
<p>Have you tried running<br> <code>show processlist</code> <br> or <br> <code>show full processlist</code> <br> from the mysql command line? These will normally show you the full sql for the query that is locking. It will also show you how long the process has been running that query. It may help you get closer to th...
InterlockedExchange and memory alignment <p>I am confused that Microsoft says memory alignment is required for InterlockedExchange however, Intel documentation says that memory alignment is not required for LOCK. Am i missing something, or whatever? thanks</p> <h1><strong>from Microsoft MSDN Library</strong></h1> <p>...
<p>Once upon a time, Microsoft supported WindowsNT on processors other than x86, such as MIPS, PowerPC, and Alpha. These processors all require alignment for their interlocked instructions, so Microsoft put the requirement in their spec to ensure that these primitives would be portable to different architectures.</p>
Generating Missing Spec Files for RSpec <p>Is there any command available for generating all missing spec files for existing models / controllers? I have a project that has several models that have been generated with out spec files.</p>
<p>In rspec-rails-2 which is intended for Rails 3 all of the rspec generators have been removed. </p> <p>You can solve this problem by running the rails model generator. You can add -s to skip any existing files and --migration=false to skip creating the migration file.</p> <p>Like so:</p> <pre><code>rails generate ...
Open Source alternative to Mathworks Polyspace? <p>Anyone knows about an open source project (or maybe just free to use in commercial projects) that is an alternative to <a href="http://www.mathworks.com/products/polyspace/" rel="nofollow">Mathworks Polyspace</a>?</p> <p>I'm searching for tools for code checking and ...
<p>Polyspace only handles C, C++ and Java, so that's a powerful alternative indeed that you are looking for. The dynamic lookup of methods that's pervasive in C# and Java does not make these languages any easier to analyse.</p> <p>For C, have a look at <a href="http://frama-c.cea.fr/">http://frama-c.cea.fr/</a></p>
PHP include class functions with variables <p>I am trying to use a variable to get a function in a extended class, this is what I want to do but I can't get it to work, Thanks for your help.</p> <pre><code>class topclass { function mode() { $mode = 'function()'; $class = new extendclass; $...
<p>Don't include the brackets "()" in the $mode variable.</p> <pre><code>class topclass { function mode() { $mode = 'functionx'; $class = new extendclass; $class-&gt;$mode(); } } </code></pre>
SQL Server 2008 - Go From Select to Edit Quickly <p>In server management studio 2008 you can right mouse click on a table and then hit the select the first 1000 rows. Is there a button or a quick way to edit one of the returned rows instead of having to right mouse click on the table again and click edit first 200 row...
<p>Here's the way I normally go about this:</p> <ol> <li><p>Right-Click table and select "Edit Top 200 Rows"</p></li> <li><p>Right-Click anywhere on the results, navigate to Pane -> SQL</p></li> </ol> <p>You'll see a SELECT statement that begins with </p> <pre><code>SELECT TOP(200) ..... </code></pre> <p>Change the...
Nesting pages in the 'Manage Pages' view of Movable Type <p>On the 'Manage Pages' screen in the admin area of Movable Type, is it possible to nest pages, or to achieve any kind of page hierarchy? Essentially I need to mirror the site structure.</p> <p>I would also like to order pages, not by published date, but by a m...
<p>Yes, create "Folders" in Movable Type and then place the pages into folders.</p> <p>Be sure to place a page with the filename of <code>index</code> or an index template (or other template) in each folder so that when the folder is accessed without a file name, a page is displayed.</p> <p>I'm hoping that MT gets ri...
Sorting an array of objects in Ruby by object attribute? <p>I have an array of objects in Ruby on Rails. I want to sort the array by an attribute of the object. Is it possible?</p>
<p>I recommend using sort_by instead:</p> <pre><code>objects.sort_by {|obj| obj.attribute} </code></pre> <p>Especially if attribute may be calculated.</p>
Javascript - How to squared a number? <p>Using the javascript function</p> <pre><code>function squareIt(number) { return number * number; } </code></pre> <p>When given the number 4294967296 the function returns 18446744073709552000 is returned</p> <p>Everyone knows the real answer is 18446744073709551616 :-)</p> ...
<p>ChrisV- <a href="http://stackoverflow.com/questions/307179/what-is-javascripts-max-int-whats-the-highest-integer-value-a-number-can-go-to">see this post</a>. Also it easier for people to evaluate your question by typing the following JavaScript directly into the browser URL textbox:</p> <pre><code>javascript:429496...
Gurus say that LD_LIBRARY_PATH is bad - what's the alternative? <p>I read some articles about problems in using the LD_LIBRARY_PATH, even as a part of a wrapper script:</p> <p><a href="http://linuxmafia.com/faq/Admin/ld-lib-path.html">http://linuxmafia.com/faq/Admin/ld-lib-path.html</a></p> <p><a href="http://blogs.o...
<p>You can try adding:</p> <pre><code>-Wl,-rpath,path/to/lib </code></pre> <p>to the linker options. This will save you the need to worry about the <code>LD_LIBRARY_PATH</code> environment variable, and you can decide at <strong>compile time</strong> to point to a specific library.</p> <p>For a path relative to the ...
Issue passing private key and public key? <p>Hi I need to pass the public key and private key in string format for encryption and decryption in pgp.I've generated the keys like this but I am not able to use those.So can anyone tell me how to get the public key and private key in string format from this.And also the rsa...
<p>You need to ask the user for the passphrase. The whole point of <em>having</em> a passphrase is that you won't be able to work out the private key without it, and only the user can supply it.</p> <p>(I haven't looked at the rest of your code, not being familiar with the BouncyCastle API. I do question the wisdom of...
Subversion repository statistics, other than StatSVN? <p>Are there other open source/free packages for producing repository statistics for a Subversion repository?</p> <p>I've tried StatSVN but it seems to be incompatible with the logfiles for Subversion 1.5 and above.</p> <p>Note, I know that TortoiseSVN has some st...
<p><a href="http://www.statsvn.org/">StatSVN</a> does work for Subversion 1.5 and above. See my comment <a href="https://sourceforge.net/forum/message.php?msg_id=7400116">on the SourceForge forums</a> concerning a similar issue reported today on the StatSVN forums. </p>
How to call API with PUCHAR? <p>I'm trying to use an API under Delphi. Here's the API documentation</p> <pre><code>OKERR ENTRY SCardCLMifareStdAuthent (IN SCARDHANDLE ulHandleCard,IN ULONG ulMifareBlockNr, IN UCHAR ucMifareAuthMode,IN UCHAR ucMifareAccessType,IN UCHAR ucMifareKeyNr, IN PUCHAR pucMifareKey...
<pre><code>type TSCardCLMifareStdAuthent = function(SCARDHANDLE: cardinal; ulMifareBlockNr: ULONG; ucMifareAuthMode, ucMifareAccessType, ucMifareKeyNr: byte; pucMifareKey: puchar; ulMifareKeyLen: cardinal):LONG; </code></pre> <p>I think you should replace 'byte' with 'UCHAR':</p> <pre><code>ucMifareAuthMode...
What have all the AJAX frameworks to do with AJAX? <p>With the upcoming rise of AJAX applications on the web, I wrote some own pieces of code to understand what it is about. I know there must be easier ways than directly dealing with the XMLHttpRequest object and thought this is why all the AJAX frameworks were created...
<p>Once you've got data back from the server you'll want to display it somehow. The sensible way to do this is through DOM manipulation. And most people using AJAX are doing so because they want to turn a static web page into a dynamic visual application. Hence the focus on visual effect.</p>
Parse String to Date with Different Format in Java <p>I want to convert <code>String</code> to <code>Date</code> in different formats.</p> <p>For example, </p> <p>I am getting from user,</p> <pre><code>String fromDate = "19/05/2009"; // i.e. (dd/MM/yyyy) format </code></pre> <p>I want to convert this <code>fromDate...
<p>Take a look at <a href="http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html"><code>SimpleDateFormat</code></a>. The code goes something like this:</p> <pre><code>SimpleDateFormat fromUser = new SimpleDateFormat("dd/MM/yyyy"); SimpleDateFormat myFormat = new SimpleDateFormat("yyyy-MM-dd"); try { ...
How to hide "cgi-bin", ".py", etc from my URLs? <p>Brand new to web design, using python. Got Apache up and running, test python script working in cgi-bin directory. Get valid results when I type in the URL explicitly: ".../cgi-bin/showenv.py"</p> <p>But I don't want the URL to look that way. Here at stackoverflow...
<p>The python way of writing web applications is not cgi-bin. It is by using <a href="http://wsgi.org">WSGI</a>.</p> <p>WSGI is a standard interface between web servers and Python web applications or frameworks. The <a href="http://www.python.org/dev/peps/pep-0333/">PEP 0333</a> defines it.</p> <p>There are no disadv...
sql server 2005:is it safe to use @@identity? <p>i have a procedure in which i am inserting record in employee table.nad getting empid by using @@identity ? when this procedure will be called by more than one user at same time,there can be possibility that it returns identity of some other employee inserted at same ti...
<p>You should be using SCOPE_IDENTITY() instead. However, @@IDENTITY refers to the current connection so other users won't affect you but there are other issues to consider.</p> <p>More information <a href="http://blog.sqlauthority.com/2007/03/25/sql-server-identity-vs-scope%5Fidentity-vs-ident%5Fcurrent-retrieve-last...
webservice in jQuery returns collection type <p>I have an ASP.NET WebService that returns an object of List</p> <pre><code>public class Students { public string StudentName { get; set; } public int Age { get; set; } } </code></pre> <p>I am accessing this webservice using this jQuery code</p> <pre><code>$.a...
<p>Everything is [Object object] in jquery (when you inspect a jQuery object).</p> <p>You are actually getting an array of Student objects; you can iterate through the results like this</p> <pre><code>for (x = 0; x &lt; msg.length; x++) { alert(msg[x].StudentName); } </code></pre>
How to decide where to store per-user state? Registry? AppData? Isolated Storage? <p>When should the Windows Registry be used for per-user state, and when should we use the filesystem, particularly the user's AppData folder? (eg, C:\Users\USERNAME\AppData). Where does Isolated Storage come in? </p> <p>Is there a prett...
<p>If you have a small number of key/value pairs and the values aren't big the registry is great - and you don't care about xcopy deployment - then use the registry (I know this isn't exact, but it's usually obvious when working with the registry becomes a pain).</p> <p>If you want xcopy deployment the data must be in...
"Namespaces", constants and multiple PHP includes <p>I have some PHP code similar to the following: </p> <pre><code>foreach ($settingsarray as $settingsfile) { include ($settingsfile); // do stuff here } </code></pre> <p>$settingsarray is an array of file names from a particular folder.</p> <p>The problem is...
<p>My answer is somewhat complex, but should work for you quite nicely. I'm assuming you have a ton of these settings files, since you're so averse to changing each one individually.</p> <p>If you're able to use namespaces, I'll assume you've already upgraded to PHP 5.3RC2. Copy the following into a .php file, and c...
Embedded Cellphone Code <p>What do most cellphones use to run the hardware? C?</p> <p>I'm just talking about the "common cellphone", not smart phone/android stuff.</p>
<p>I work for wireless semiconductor chip provider, and we work on variety of phone platforms from ULC (ultra low cost ) segments to Smart phones. </p> <p>In our Reference phone design, the entire code (including Protocol stack, Kernel, Middleware, Application and MMI) is written purely in C. AFAIK even first tier cus...
What's the best way to manage storing builds in source control? <p>I'm using Perforce, if that changes the tune of the answers at all.</p> <p>I'd like to implement a build process that, when a solution is built in a "release" mode, tags the entire source tree with a label and pushes the output of the build (DLLs, webp...
<p>I think you are missing the simple voodoo:) You should consider just using a plain old file system for your build drops. Source control is designed to manage change, versioning, and collaboration and there really is no need for any of this related to builds. The whole point to an build system is to be able to rep...
Can I obtain higher resolution in the frequency domain with a stereo signal? <p><strong>Background</strong></p> <p>I admit, this question stems from an ultimate lack of deep understanding of the underlying mathematics involved with digital signal processing; I'm still learning.</p> <p>I want to take a set of amplitud...
<p>In general, no. Your stereo signal is certainly 2048 amplitude samples, but these are samples from two separate channels, each of which was filtered to remove all information above the Nyquest frequency before A/D conversion.</p> <p>Two cases to think about involving a pair of 48 KHz channels:</p> <ol> <li><p>A 10...
UpdateProgress bars and update Panels <p>I have a grideview that displays rows that will be deleted across servers by the click of a delete button in the footer of the grid. This delete will take a long time so i want an updateprogress bar. I'm not really familiar with it so I don't know where to begin.</p>
<p>Check out <a href="http://www.asp.net/learn/ajax-videos/" rel="nofollow">asp.net video tutorial</a> section. The one you looking for is: <a href="http://www.asp.net/learn/ajax-videos/video-123.aspx" rel="nofollow">Use the ASP.NET AJAX UpdateProgress Control</a></p>
Fluent NHibernate Joined-Subclass Problems <p>I have this class</p> <pre><code>public class Address:Entity { public virtual string Address1 { get; set; } public virtual string Address2 { get; set; } public virtual string City { get; set; } public virtual string State { get; set; } public virtual st...
<p>Appears to be fixed as of revision 531.</p>
Dragging files to an .exe sets different working directory <p>If I have a regular console application (or any other application for that matter) and drag a file onto the .exe file using windows explorer (in order to use the file as "command-line-input"), the current directory is set to some other directory (my home fol...
<p>Searching for a reason I found this on <a href="http://www.autoitscript.com/forum/index.php?showtopic=40026" rel="nofollow">autoitscript.com</a>:</p> <blockquote> <p>[The application] simply inherits whatever Explorer's working directory is</p> </blockquote> <p>This is consistent with my own observations, for ex...
Logging AD User Actions (with deleted users) <p>We are about to migrate an intranet web application from using a proprietary forms-based security to Active Directory. The application logs a variety of user actions, and there is a significant amount of data associated with user accounts. Our plan was to migrate all of...
<p>I wouldn't fully denormalize the log table, but instead store the pertinent AD information alongside the GUID, as Tim said. However, if you will need this AD information in other areas, cache it in your user table. I would recommend against changing your security policy.</p>
why won't this validate (jquery problem)? <p>On my site I'm using the jquery cycle plugin for a slideshow with a pager. This example: <a href="http://malsup.com/jquery/cycle/pager.html" rel="nofollow">http://malsup.com/jquery/cycle/pager.html</a></p> <p>So in the head of my document, I have a script similar to:</p> ...
<p>If you put HTML comment tags into your script block the validator will ignore that block of code and validate correctly.</p> <pre><code>&lt;script type="text/javascript"&gt; &lt;!-- $('#s4').before('&lt;div id="nav"&gt;').cycle({ fx: 'turnDown', speed: 'fast', timeout: 3000, pager: '#nav' ...
How can I call a stored procedure from Crystal Reports? <p>I have a stored procedure that takes a user ID and calculates their balance with a really simple query and returns it. I want to add this to a crystal report in my application. The only problem is, Crystal Reports wants me to set a value for the procedure, and ...
<p>Within your main report you can add a subreport that will use the stored procedure as a data source and the userId as a parameter.</p> <p>Your main report will list all the userID you are interested in and pass each of them individually to subreport</p> <p>It has been quiet some time since I last worked with cryst...
correctly printstacktrace of servlet exception <p>so i am using a filter to catch servlet exception (because we are using a mix of jsf/plain servlets)</p> <p>when catching the ServletException and calling printstacktrace most of the information is lost.</p> <p>the "true" root exception seems to be hidden behind the "...
<p>Take a look at the <a href="http://commons.apache.org/lang/api-release/org/apache/commons/lang/exception/ExceptionUtils.html" rel="nofollow">ExceptionUtils</a> class from commons-lang. It contains several useful methods for printing the entire chain of exceptions.</p>