input
stringlengths
51
42.3k
output
stringlengths
18
55k
Unresolved Host Exception Android <p>I'm trying to call a RESTful web service from an Android application using the following method:</p> <pre><code>HttpHost target = new HttpHost("http://" + ServiceWrapper.SERVER_HOST,ServiceWrapper.SERVER_PORT); HttpGet get = new HttpGet("/list"); String result = null; HttpEntity en...
<p>I think the problem might be on the first line:</p> <pre><code>new HttpHost("http://" + ServiceWrapper.SERVER_HOST,ServiceWrapper.SERVER_PORT);</code></pre> <p>The <code>HttpHost</code> constructor expects a hostname as its first argument, not a hostname with a <code>"http://"</code> prefix.</p> <p>Try removing <...
Java compilers or JVM languages that support goto? <p>Is there a java compiler flag that allows me to use <code>goto</code> as a valid construct? If not, are there any third-party java compilers that supports <code>goto</code>? If not, are there any other languages that support <code>goto</code> while at the same time ...
<p>JVM support goto at bytecode level. If you are doing your own language, you should use libraries like <a href="http://jakarta.apache.org/bcel/">BCEL</a> or <a href="http://asm.ow2.org/">ASM</a>, not generating .java file.</p>
SQL Merge Replication: How to tell if a record has been replicated <p>I have a merge replication scenario, with SQL2005 SP3 as the publisher and distributor and windows mobile SQLCE 3.5 SP1 as the subscribers.</p> <p>The replication filter is such that rows from one of the tables (tblJobs) only go to exactly one devic...
<p>The easiest way to tell if a record has been replicated is to check the MSmerge_contents table. If the row exists in that table then it has been previously replicated.</p> <p>Of course, if you want to ensure that the client has the latest version of the row then you'll need to do some digging in the following table...
Remove white backgrounds from images <p>I have some product photos, from which I would like to remove the white background. An example:</p> <p><img src="http://www.dewalt.at/ProductImages/imports/EU%5FImages/Dewalt/573786%5FDC415N.jpg" alt="alt text" /></p> <p>Is there a nice library or a manual way to do it with Coc...
<p>You can try ImageMagick:</p> <pre><code>convert input.gif -transparent white output.gif </code></pre> <p>For more advanced features you should try something like image masking or do it manually using any image library, setting the pixel values to something with a high alpha value.</p> <p>See also this thread: <a ...
Best way to organize this structure? <p>I have a database of foods, which I would like to divide into a tree structure of categories, subcategories and sub-subcategories. For example,</p> <p>fruits -> apples -> fuji, or fruits -> apples -> cortland</p> <p>I would like each parent page to show its immediate children (...
<p>I suggest reading <a href="http://mikehillyer.com/articles/managing-hierarchical-data-in-mysql/" rel="nofollow">Managing Hierarchical Data in MySQL</a>.</p>
Best design for search, from a user perspective. Pre or post search selection? <p>This is a question on how to best design the search experience for users of a CMS based system. It's on a intranet system. The users needs to be able to filter the search results based on where the document/information is located, and to ...
<p>I would say both. Let them specify as many fields as they want initially, then add as many as they want later. If you're worried about cluttering the GUI, you can have an Advanced Search view or a toggle to show/hide the filters.</p>
Database consistency checking framework <p>I'm looking for a framework to utilize to integrate a number of database consistency checking rules into our system. This should basically be a automated test case runner for our database checks.</p> <p>Requirements:</p> <ul> <li>Easy to write new rules or checks</li> <li>Ea...
<p>Almost all of these can be dealt with using triggers for enhanced integrity constraints.</p> <p>I suggest getting familiar with <a href="http://www.tdan.com/view-articles/5033" rel="nofollow">Object Role Modeling</a> as a way to design relational data with a more granular constraint set, including the check types y...
Stored Proc returns a Cursor, how to handle this using OLEDB in C# <p>I am using OLEDB driver to call a Stored Procedure in Oracle DB. The Stored Proc returns a cursor as the output. I am able to call this Stored Proc using Oracle Data Source (System.Data.Oracle.OracleCommand), However I do not know how to call this SP...
<p>The Oracle Provider for OLE DB converts any parameters that reference cursors into an ADO Recordset, but only if <code>PLSQLRSet=1</code> is added to your connection string.</p>
Performance: Datastore writes vs. request log writes <p>We want to collect usage statistics with our app. Therefore, we want to track user actions somewhere on the server side. </p> <p>Which option is more suitable, performance-wise: </p> <ol> <li>Track user actions in the App Engine Request Log. i.e. write a log ent...
<p>I can confirm (through my own empirical observation, only: I do not see this addressed in the official docs) that writing a log entry is faster than writing a storage entry. Thinking about it, that makes sense: log entries are always appended, no indices, no particular transactional issues (beyond atomicity of each ...
html 5 v/s XHTML <p>Which is better to learn HTML 5 or XHTML?</p>
<p>HTML 5 supports two syntaxes. One of those syntaxes is XHTML.</p> <p>Don't limit what you learn: if you plan to write HTML in the future, learn about HTML 5 and understand <em>both</em> syntaxes it uses.</p> <p>If you're writing HTML today, still learn about HTML 5, but stick to the tags which currently work (i.e....
How to detect when a UIScrollView has finished scrolling <p>UIScrollViewDelegate has got two delegate methods <code>scrollViewDidScroll:</code> and <code>scrollViewDidEndScrollingAnimation:</code> but neither of these tell you when scrolling has completed. <code>scrollViewDidScroll</code> only notifies you that the scr...
<p>The <a href="https://github.com/facebook/three20/">320 implementations</a> are so much better - here is a patch to get consistent start/ends of the scroll.</p> <pre><code>-(void)scrollViewDidScroll:(UIScrollView *)sender { [NSObject cancelPreviousPerformRequestsWithTarget:self]; //ensure that the end of scr...
Difference between Visual Basic 6.0 and VBA <p>What is the difference between the two. I always thought VBA is somewhat 'crippled' version of VB, but when a friend asked me the other day I had no idea what the actual differences are.</p> <p>Also, when you use, for example, Excel, is that VB or VBA ?</p>
<p>For nearly all programming purposes, VBA and VB 6.0 are the same thing.</p> <p>VBA cannot compile your program into an executable binary. You'll always need the host (a Word file and MS Word, for example) to contain and execute your project. You'll also not be able to create COM DLLs with VBA.</p> <p>Apart from th...
Could my embedded key/value datastore eventually exceed an App Engine limit? <p>I have a <a href="http://www.oracle.com/technology/products/berkeley-db/index.html" rel="nofollow">BerkeleyDB key/value datastore</a> embedded in my Google App Engine project, which does not use the Google Datastore.</p> <p>When I upload t...
<p>App Engine DataStore entity is limited to 1MB. You won't be able to save a larger entity. </p> <p>Free quota for DataStore is 1 GB. If you exceed it with billing disabled, you won't be able to save new entities or enlarge existing entities. If you have billing enabled, you will be charged for additional storage.</p...
JSomething something = new JSomething().somethingelse; <p>I could swear I saw an object being created this way. What does somethingelse do?</p>
<p>Taking it quite literally, it can be that the class <code>JSomething</code> has a field called <code>somethingelse</code> that is of type <code>JSomething</code>:</p> <pre><code>class JSomething { JSomething somethingelse; } </code></pre> <p>In that case, the reference to the <code>JSomething</code> called <co...
What is a Windows API? <p>What is a Windows API?</p>
<p>It's a set of functions and data structures that a Windows program can use to ask Windows to do something, like opening a file, displaying a message, etc.</p> <p>Pretty much everything that a Windows program does involves calling various API functions.</p> <p>Collectively, all the API functions that Windows makes ...
IE bug with TD's tables and whitespace? <p>I have a page that is using tables, in FF etc it works perfect, but in IE7 it causes issues, it's basically where the four corners have a td and and img (its a rounded corner form) .. if I remove the whitespace from the document it fixes the issue.. What actually happens is th...
<p>The only way to "fix it" (and I use that term loosely) is to <a href="http://webdesign.about.com/cs/tables/qt/tiptablespaces.htm" rel="nofollow">remove the whitespace</a>.</p> <p>More importantly, you should stop making websites like it's 2001. :)</p>
Should I delete vector<string>? <p>I've painfully learned during last few days a lot about programming in c++.<br> I love it :)<br> I know I should release memory - the golden "each malloc=free" or "each new=delete" rules exist now in my world, but I'm using them to rather simple objects.<br> What about vector ? Wherev...
<p>The rule is that when you clear a vector of objects, the destructor of each element will be called. On the other hand, if you have a vector of pointers, <code>vector::clear()</code> will not call <code>delete</code> on them, and you have to delete them yourself.</p> <p>So if all you have is a vector of strings, an...
How can I configure my project to generate platform independent code? <p>I am writing an application that I would like to release binaries for on Mac, Windows, and Linux. I have code that compiles under Mac and Linux, but under Windows, it does not.</p> <p>This is because of Windows lack of a strcasecmp. I've read a l...
<p>You could do</p> <pre><code>#ifdef WIN32 #include &lt;windows_specific_header.h&gt; #else #include &lt;other_header.h&gt; </code></pre> <p>There is also an MS Visual Studio-specific macro: _MSC_VER, so</p> <pre><code>#ifdef _MSC_VER </code></pre> <p>would also work here.</p> <p>There is also WINVER define in wi...
Relational Database <p>Can you do more than one clause in SQL without using aggregation and only: selection, join? Thanks.</p>
<p>If you mean having multiple WHERE's (ands), then yes.</p> <pre><code>SELECT user.id, post.title FROM user LEFT JOIN post ON (post.user = user.id) WHERE (post.title LIKE '%Monkeys%') AND (user.id &gt; 3) AND (user.id &lt; 20) </code></pre>
'Illegal Geometry' warnings in Interface Builder... significant? <p>The 'info' button in Interface Builder shows me that there are dozens of 'Illegal Geometry' warnings, each one with the issue 'This view overlaps one of it's siblings.' Is this anything to be worried about? Will it stop the app being accepted by Apple?...
<p>It should be fine. I have an app with the same warnings that was accepted with no problems. </p> <p>The issue is that overlapping siblings are not allowed if the views are not backed by Core Animation layers (default on the desktop). On the iPhone, all UIViews are backed by CoreAnimation layers, so the overlapping...
Are strtol, strtod unsafe? <p>It seems that <code>strtol()</code> and <code>strtod()</code> effectively allow (and force) you to cast away constness in a string:</p> <pre><code>#include &lt;stdlib.h&gt; #include &lt;stdio.h&gt; int main() { const char *foo = "Hello, world!"; char *bar; strtol(foo, &amp;bar, 10)...
<p>I would guess that because the alternative was worse. Suppose the prototype were changed to add <code>const</code>:</p> <pre><code>long int strtol(const char *nptr, const char **endptr, int base); </code></pre> <p>Now, suppose we want to parse a non-constant string:</p> <pre><code>char str[] = "12345xyz"; // no...
nested methods <p>add and GetContentPane are methods</p> <p>Does this code access a method in a method? What does this code do?</p> <p>frame.getContentPane().add(BorderLayout.SOUTH, b);</p>
<p>In the code that is shown, it is not a "nested method", but a method that is being called on object that was returned from another method. (Just for your information, in the Java programming language, there is no concept of a nested method.)</p> <p>The following line:</p> <pre><code>f.getContentPane().add(componen...
Assistance with openssl blowfish simple example inserting garbage characters <p>If you have a good example of simply encrypting a file using openssl that is better than this one that I am having issues with I would be very grateful. </p> <p><strong>Update:</strong> Myabe the author was correct. Using memset on somet...
<p>The error is in the way the EVP_DecryptFinal and EVP_EncryptFinal are called. These functions should be called in the end of the for cycle, also the final part where to olen is added tlen and written again was duplicating output. Below is the final working version:</p> <pre><code>#include &lt;openssl/blowfish.h&gt;...
MySQL table incrementing by 10 for some reason <p>The id field in a mysql table is incrementing by 10 (11, 21, 31) for some reason. Here is the table definition:</p> <pre><code>CREATE TABLE `clients` ( `id` int(11) NOT NULL auto_increment, `first_name` varchar(255) default NULL, `last_name` varchar(255) default...
<p>You have <a href="http://dev.mysql.com/doc/refman/5.0/en/replication-options-master.html#sysvar%5Fauto%5Fincrement%5Fincrement"><code>auto_increment_increment</code></a> set to 10, change it back to 1.</p>
Reading RSS feed using jQuery <p>I'm trying to show the title of my latest stumbleupon item using their RSS feed and jquery. The function I have is:</p> <pre><code>function get_stumbleupon() { $.get("http://rss.stumbleupon.com/user/fredkelly/", function(data) { alert(data.title); }, "xml"); } </code></pre> <p>Whi...
<p><a href="http://jquery-howto.blogspot.com/2009/04/cross-domain-ajax-querying-with-jquery.html" rel="nofollow">Here's a tutorial</a> on how to do Cross domain ajax with JQuery.</p>
Javascript inline edit, how to cancel edit to have original data? <p>I have data</p> <pre><code>&lt;tr id="row_1"&gt; &lt;td id="td_1_1"&gt;Text 1&lt;/td&gt; &lt;td id="td_2_1"&gt;Text 2&lt;/td&gt; &lt;td&gt;&lt;a href="#" onclick="editRow(1)"&gt;Edit row&lt;/a&gt;&lt;/td&gt; &lt;/tr&gt; </code></pre> <p>then ...
<p>First of all - look into Javascript frameworks. The kind of functionality you are talking about is advanced enough that if you really want your code to work in all browsers correctly you shouldn't do this on your own. It would also let you keep your HTML free of ugly inline Javascript and such, which is considered b...
Window z-ordering in java <p>Is there a way to manage the window z-ordering of JDialog windows within java?</p> <p>I would like to able to assign each window to a layer such that windows on lower layers can never go above and obscure windows on higher layers. Even when they have focus. Similar to the Z-order capabil...
<p>The only management I have been able to find for the Z order of windows has been that you can send them to the top of the order with toFront() or that you can set them as always on top with setAlwaysOnTop(). This is very basic z ordering, it doesn't seem that the Window class gives you as much fine grain ordering as...
How can I get JQueryUI sortable to 'revert' faster? <p>JQuery's <code>sortable</code> has an option to <code>revert</code> the item that the user drags back in line with the rest, but the animation is a little slow.</p> <p>Is there a simple way to specify <code>'fast'</code> like some of the other methods?</p>
<p><del>It appears to be undocumented</del>*, but setting the <code>revert</code> property to a number will treat that as the speed (or more specifically the duration in ms). So something like this gives a pretty quick revert animation:</p> <pre><code>$("#sortable").sortable({revert: 100}); </code></pre> <p>(Aside: I...
What do I need to escape in my HTML (JSON response) <p>My JSON response looks like:</p> <pre><code>{rc: "200", test: "", user: "&lt;div class='sub1'&gt; &lt;div class='avatar'&gt; &lt;a href='/blah'&gt;blah&lt;/a&gt;&lt;br /&gt; &lt;strong&gt;...
<p>I used <a href="http://www.jsonlint.com/" rel="nofollow">jsonlint</a> to validate your latest example, and the line breaks are what it flagged. When they were removed, it validated.</p> <pre><code>{ "rc": "200", "m" : "", "o": "&lt;div class='s1'&gt;&lt;div class='avatar'&gt;&lt;a href='\/asdf'&gt;asdf...
looking for free source safe for visual web developer express 2008 <p>I am using visual web developer express 2008 for one of my personal projects. I am looking for a source safe or similar product that is free and that can integrate with visual web developer 2008. Please let me know if you know any products.</p> <p>T...
<p>As far as I know, extension points allowing for such integration are unavailable in VWD. That's the price for using free Express version...</p> <p>In your place I would use Subversion and Tortoise SVN, which is quite convenient, even though you'll need to manage your source control in Explorer windows, not in VWD. ...
Loading 'modules' Data Into Views on a Per User Basis Dynamically From One Controller Using CodeIgniter <p>I am trying to load views for a set of 'modules' for a user who has selected any number of available 'modules'. I can get the name of the modules, or any column from the database.</p> <pre><code>load-&gt;view($na...
<p>maybe you wanted</p> <pre><code>$data = $this-&gt;$name.'_model'-&gt;get(); </code></pre> <p>you forgot to concatenate the strings</p>
compare nodes of a binary tree <p>If I have two binary trees, how would I check if the elements in all the nodes are equal.</p> <p>Any ideas on how to solve this problem?</p>
<p>You would do a parallel tree traversal - choose your order (pre-order, post-order, in-order). If at any time the values stored in the current nodes differ, so do the two trees. If one left node is null and the other isn't, the trees are different; ditto for right nodes.</p>
Retrieve Architecture from Java <p>I'm writing a JNI application and I want the app to download the correct binary library for the current architecture. Is there any way to retrieve this information from code?</p> <p>I need to know where it's ARM, x86 or any other architecture really.</p> <p>Kind regards, </p> <p>Ga...
<p><code>java.lang.System.getProperty("os.arch")</code> should help -- giving "arm", "amd64", and the like.</p>
How to return result of Sql Server stored procedure to .Net <p>What is the best way to return the result of the execution of a SQL Server stored procedure back to the .NET code?</p> <p>If I want to return the success or failure of a bunch of deletes in a transaction, should I 'Select' something, or maybe something lik...
<p>Yes, if you use ExecuteNonQuery(), it will return the number of rows affected. If you want to specify a value to return in your stored procedure, you can use ExecuteScalary().</p> <p>You can also use an output parameter to return values. In the SQL procedure, declare the parameter as an output parameter (ex. @ret...
compare an object to null! <p>I am trying to verify whether an object is null or not and i am using this syntax:</p> <pre><code>void renderSearch(Customer c){ System.out.println("search customer rendering&gt;..."); try { if(!c.equals(null)){ System.out.printl...
<p>Try c != null in your if statement. You're not comparing the objects themselves, you're comparing their references.</p>
Pylons FormEncode with an array of form elements <p>I have a Pylons app and am using FormEncode and HtmlFill to handle my forms. I have an array of text fields in my template (Mako)</p> <pre> &lt;tr&gt; &lt;td&gt;Yardage&lt;/td&gt; &lt;td&gt;${h.text('yardage[]', maxlength=3, size=3)}&lt;/td&gt; &lt;td&g...
<p>Turns out what I wanted to do wasn't quite right. </p> <p><strong>Template</strong>:</p> <pre><code>&lt;tr&gt; &lt;td&gt;Yardage&lt;/td&gt; % for hole in range(9): &lt;td&gt;${h.text('hole-%s.yardage'%(hole), maxlength=3, size=3)}&lt;/td&gt; % endfor &lt;/tr&gt; </code></pre> <p>(Should have made it in a ...
Total width of a wrapping inline element <p>I want to find the total width of a SPAN which wraps around several lines. Is that possible? It's a single SPAN tag, with no other internal nodes... </p> <p>If that's not possible, I would atleast like to find the left and right pixel offsets of the start and end of the SPAN...
<p>HI, I think you can achieve this by using <strong><em>getBoundingClientRect</em></strong> function.</p> <pre><code>var leftPosition = yourElement.getBoundingClientRect().left; var rightPosition = yourElement.getBoundingClientRect().right; var topPosition = yourElement.getBoundingClientRect().top; var bottomPosition...
UITouch nil in touchesMoved with light tap-slide <p>I have a view object that I can tap and get a valid touch in touchesMoved:</p> <pre><code>- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [[event allTouches] anyObject]; </code></pre> <p>If I lightly tap while sliding the object, ...
<p>Is there any reason you're not using the <code>touches</code> object instead of <code>[event allTouches]</code>?</p>
Generate DropDownList from code behind <p>Hi I am generating a DropDownList in my code behind file </p> <pre><code> protected DropDownList CountryList() { DropDownList ddl = new DropDownList(); XDocument xmlDoc = XDocument.Load(Server.MapPath("Countries.xml")); var countries = from cou...
<p>The <code>&lt;%= %&gt;</code> is only a shorthand to the Response.Write method, you should <a href="http://msdn.microsoft.com/en-us/library/kyt0fzt1.aspx" rel="nofollow">add the controls programatically</a></p> <p>Or just add an asp:DropDownList tag there you want it, and then in the code behind, you can bind the ...
differences between two SQL Server database snapshots <p>I am trying to automate order processing for a client their POS vendor doesn't have any sort of API with their software so I was hoping to be able to insert orders directly in the database.</p> <p>so what i want to do is take a snapshot of the database, enter an...
<p>I think <a href="http://www.sqldelta.com/" rel="nofollow">SQLDelta</a> should work for you.</p>
Writing drivers in C# <p>I have written earlier in C/C++ but currently, I need it to convert into C#.</p> <p>Can anyone tell me the code/way How to write drivers in C#?</p> <p>Actually currently I have some problems with my old application written in C++ and we have to write the drivers of our LPT1,COM Printers and o...
<p>Actually, you can write some drivers in C# if you use UMDF because it runs in usermode (see <a href="http://msdn.microsoft.com/en-us/library/windows/hardware/dn384105%28v=vs.85%29.aspx">Getting Started with UMDF</a>). But my recommendation is to use C/C++. </p>
How big should your WPF app be to start using MVVM <p>Recently there have been a lot of move towards MVVM framework due to the nature of WPF development. I am making a pretty small application, which might grow a little over time. I am curious to know, what sized application should benefit from a MVVM implementation. F...
<p>MVVM is useful even if you have only one screen. It doesn't really depend on the size of the application, it's mainly intended to separate your UI from the logic and to help with DataBinding. Also, you'll get used to it more quickly, and you'll see it just fits with WPF perfectly no matter how big your app is. </p>
How to use Actionscript to specify Flex "fit to content" <p>Flex Builder defaults some components to "fit to content" if you don't specify a set width or height. I'm trying to fill a mx:Tile component with Actionscript, but the layout has some strange spacing when I don't specify the width of a component I add to it. I...
<p>Do you still need the tiles to align in columns/rows, or do you want them all to be fit-to-content? If you want the former, good luck, and I hope someone else can answer for my benefit. If you want the latter, you could use FlowContainer (which I got from <a href="http://appdivision.com/" rel="nofollow">Appdivisio...
not able to include dbt.h win32 programming <p>I have written a win32 program for detecting USB port device insert and removal. For this i have used dbt.h header file provided by system. But still my program fails to link to that and hence my program dont compile. I have Windows DDK installed on my system and i can fin...
<p>You need to include the header file but you also need to link the dll that contains the actual code. </p>
How to strip the 8th bit in a KOI8-R encoded character? <p>How to strip the 8th bit in a KOI8-R encoded character so as to have translit for a Russian letter? In particular, how to make it in Python?</p>
<p>Assuming s is a KOI8-R encoded string you could try this:</p> <pre><code>&gt;&gt;&gt; s = u'Код Обмена Информацией, 8 бит'.encode('koi8-r') &gt;&gt;&gt; s &gt;&gt;&gt; '\xeb\xcf\xc4 \xef\xc2\xcd\xc5\xce\xc1 \xe9\xce\xc6\xcf\xd2\xcd\xc1\xc3\xc9\xc5\xca, 8 \xc2\xc9\xd4' &gt;&gt;&gt; print ''.j...
Generating a list of supported devices by WURFL capabilities <p>Is there an efficient way to programatically generate a list of supported devices based on a set of required capabilities using the <a href="http://wurfl.com" rel="nofollow">WURFL</a> APIs?</p> <p>For example I have two versions of an application; one tha...
<p>I suggest using the <a href="http://wurfl.sourceforge.net/njava/" rel="nofollow">new Java WURFL API</a> to load and trawl through the capabilities database. It's pretty flexible that way, you should be able to implement your pseudo-code pretty quickly.</p>
Setting affinity in multicore x86 processors <p>( I ask because it was before serious SMP and multicore that I studied OS. I like to have some vision of how code is being executed. )</p> <p>If I have a multicore x86 CPU booting directly into my program. Can someone recommend a website which describes what assembler co...
<p>Affinity is not determined by the CPU state and can therefore not be modified by assembly (alone). You need participation of the OS. And each OS will have a specific call to do this.</p> <p>What the OS will do: the OS will have a scheduler, which is in effect a program who determines which process runs when on what...
reliable way to validate IBAN/BIC in java <p>Does anyone know of a reliable way to validate International Bank Account Number (IBAN) and Bank Identifier Code (BIC) in java?</p>
<p>Apache Commons Validator has IBAN validation (since version 1.4)</p> <p>Home page: <a href="http://commons.apache.org/validator/">http://commons.apache.org/validator/</a></p> <p>Javadoc: <a href="http://commons.apache.org/proper/commons-validator/javadocs/api-1.4.0/org/apache/commons/validator/routines/checkdigit/...
How do I show details view in iPhone App using Sqlite <p>I am trying out iPhone Apps, coming from C#, I am finding very difficult to grasp the iPhone dev environment.</p> <p>So far, I am able to get my 'Makes' listed in a TableViewController. I now wish to get by 'Models' listed when a Makes is selected. <strong>Can s...
<p>A couple of things going on here...</p> <p>1- You are not selecting the primary key back from your sql query. You need to change it to something like "SELECT pk, title...." in order to retrieve that.</p> <p>2- You are only storing the title back in your makes. Ideally you want to create some data structure (prob...
How to create our own Listener interface in android? <p>Could someone help me to create user defined listener interface with some code snippets?</p>
<pre><code>public interface MyListener { // you can define any parameter as per your requirement public void callback(View view, String result); } public class MyActivity extends Activity implements MyListener { @override public void onCreate(){ MyButton m = new MyButton(this); } ...
How to include Uninstall MyProgram.exe in visual studio while creating package in c# <p>I have developed a wpf application and created setup for that. I am using windows installer for creating setup package. Now I want to include uninstall MyProgram.exe in start menu after installing my package.<br /> I am able to add ...
<p>When you create installation package, it is assigned unique id (Product Code, if i'm not forgetting). You can create a batch file with following line:</p> <pre><code> @echo off start /b /l msiexec.exe /x {Product Code} </code></pre> <p>Now right click on file system tree (in files view of project) and include t...
solution to search into files (in lamp) <p>i have site that the user upload files (PDF,WORD,POWER POINT ....) and they want to have the ability to search word in the files, how can i do it ?</p>
<p>You will have to use modules/packages/classes in PHP which allow you to read such formats as .PDF, .DOC, .PPT. Then, parse through the document and create database entries for words that you encounter, along with other relevant information. Later, you can poll the database for search results.</p>
About Spring BeanFactory <p>Does every time I new an new BeanFactory the beans in the XML file are to be recreated? In other words, if I set an bean's scope to Singleton, I got the same Object even if I newed another BeanFactory?</p>
<p>Summary: yes, for one <code>BeanFactory</code>, no, for creating a <code>BeanFactory</code> each time.</p> <p><hr /></p> <p>If you use <code>scope="singleton"</code>, which is the default setting, you will get the same instance each time from <em>the same</em> <code>BeanFactory</code>.</p> <p>Spring does not mana...
how i get data from crawler to my site? <p>what is the best way to get data from external crawler to my DATA BASE, to my site i work in LAMP environment, is web services is good idea ? the crawler run every 15 minutes. </p>
<p>It depends on the crawler, but theoretically, yes, web services are the best option. You just have to parse the XML replies into your DB.</p>
Install software on a remote machine? <p>This might seem like a dump question, but my complete ignorance with VbScript is giving me no chance to try to work it out. In short, a system administrator friend of mine, asked me to write him a script that should allow him to enter a remote machine name, a domain credentials,...
<p>This will open simple input boxes to get the required information. *NOTE: Input is only checked to make sure it is not blank, entering invalid data will cause the script to fail. </p> <pre><code>strUser = "" strPassword = "" strMSI = "" strComputer = "" 'Get user name, cannot be blank Do While strUser = "" str...
Can UDP (unicast client) recvfrom() other servers other than the one sendto()? <p>I am creating a UDP socket client in C (unicast) and is wondering why recvfrom() has a struct sockaddr * argument in which in the man page says, A null pointer, or points to a sockaddr structure in which the sending address is to be sto...
<p>Yes, this is perfectly possible. The reason for this is that UDP is not stream-based, but packet-based. Every packet is treated without any history (other packets sent or received).</p> <p>For this reason you may also open a UDP port and then send packets to different hosts from it. However, I do not remember how w...
File.WriteAllBytes causes error "Insufficient system resources exist to complete the requested service" <p>I have a standard SOAP webservice with a WebMethod which accepts a byte array and then performs a</p> <pre><code>[WebMethod(true)] WriteFile(byte[] Data, string FilePath) { File.WriteAllBytes(FilePath, Data)...
<p>I know you are not reaching this size of file but also be aware that File.WriteAllBytes has a limit of 64mb when writing to network paths - see this <a href="http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=486256" rel="nofollow">connect issue</a></p>
Is implementing a cache considered a difficult problem? <p>There are many questions on here about caching that doesn't work properly, or asking how to implement caches properly, for all sorts of things from HTTP to SQL queries, L1/L2 memory caching, etc..</p> <p>Is it generally held to be a difficult problem in comput...
<p>"There are only two hard things in Computer Science: cache invalidation and naming things." — <a href="http://people.famouswhy.com/phil%5Fkarlton/" rel="nofollow">Phil Karlton</a></p>
PHP: include function is blocked <p>My PHP files are not able to call the include function anymore. I suppose my hosting changed php settings. Is there any workaround to this problem? Can I enable the include function in php.ini/.htaccess files? How? My host is using PHP version 4.4.9.</p> <p>EDIT - All the files that...
<p>i think is permission problem,</p> <p>do you see error in error log file ,</p> <p>or see error in the screen ?</p>
KnowledgeSyncProvider class <p>Does anybody know where to find documentation, howtos, tutorials, etc., on how to extend the KnowledgeSyncProvider class. This class in new with the Microsoft Sync Framework 2.0 CTP. It comes with a sample, but we were not able to find a big picture documentation of this class, besides th...
<p>The KnowledgeSyncProvider class seems to have been in the Microsoft Sync Framework 1.0 already. There is a sample here <a href="http://msdn.microsoft.com/en-us/library/cc807255.aspx" rel="nofollow">How to: Configure N-Tier Peer-to-Peer Synchronization</a></p> <p>The SyncSDK (<a href="http://www.microsoft.com/downlo...
Cannot write in App_Data when request is from scheduler <p>Hello I have a page in an ASP.NET (website) project that writes a file to the App_Data folder.<br> When I request the page from my browser everything works.<br> When I perform this request from a cron-job scheduled job from my provider I get the following error...
<p>This is likely to be a permissions issue.</p> <p>Ensure the user account associated with the scheduled job has access to the App_Data folder.</p> <p>Process Monitor can help to check exactly what is failing and why.</p>
Exposing enum typed properties for entity framework entities fields in ADO.NET Data Service client context <p>I have an entity with fields that are typed int</p> <p>and i want to exposed those fields as properties which get and recieve enum type values for working strongly typed.</p> <p>so i've created a new partial ...
<p>I don't think that you can. In ADO.Net Data Services, you can't have enums on your proxy objects that get sent up to the server. Try changing your object around to use an int (or short) instead.</p>
In jQuery, are there any function that similar to html() or text() but return the whole content of matched component? <p>For example, if the match is <code>&lt;div class="class1"&gt;Hello world&lt;/div&gt;</code>, I need to return </p> <pre><code>&lt;div class="class1"&gt;Hello world&lt;/div&gt; </code></pre> <p>not ...
<p>There's no built-in function for getting the outerHTML, but you can use this:</p> <pre><code>jQuery.fn.outerHTML = function(s) { return (s) ? this.before(s).remove() : jQuery("&lt;p&gt;").append(this.eq(0).clone()).html(); } </code></pre> <p>Then in your selector:<br/> <code>$('.class1').outerHTML()</code> wil...
VS2008 - error in deserialization from web service <p>I have an error in deserialization from calling an operation in an external web service (https). The error is "Error in deserializing body of reply message for operation 'score'." Score is a credit score operation. The stack trace includes "There is an error in XML ...
<p>Using the <a href="http://msdn.microsoft.com/en-us/library/ms732023.aspx" rel="nofollow">Service Trace Viewer Tool</a> may offer more details on the exception. Try setting the trace level to Error or Warning.</p>
Using Visual Studio 08's Installer, how can I install a Web Application into a path that is NOT under C:\Inetpub? <p>I'm trying to alter our existing installer for a web application, so that the files are located not at C:\Inetpub\wwwroot\OurProduct but rather under C:\Program Files\OurCompany\OurProduct, so far with l...
<p>if you want to get the installation path from the user during setup, you could have a look at this project here: <a href="http://www.codeproject.com/KB/install/WebServieInstaller.aspx" rel="nofollow">http://www.codeproject.com/KB/install/WebServieInstaller.aspx</a> it explains how to get the local installation path ...
How can I access a static property in a subclass when the property is located in a base class? <p>Let's say I have:</p> <pre><code>public class Fruit { public static List&lt;String&gt; Suppliers { get; protected set; } static Fruit() { Suppliers = new List&lt;String&gt;(); Suppliers.Add("...
<p>For one thing, accessing <code>Banana.Suppliers</code> is misleading. It will always yield the same result as accessing <code>Apple.Suppliers</code> etc - you've got a <em>single</em> collection of suppliers.</p> <p>Basically any time you access <code>Banana.Suppliers</code> the compiler emits a call to <code>Fruit...
Using data from django queries in the same view <p>I might have missed somthing while searching through the documentation - I can't seem to find a way to use data from one query to form another query.</p> <p>My query is:</p> <pre><code>sites_list = Site.objects.filter(worker=worker) </code></pre> <p>I'm trying to do...
<p>You could easily do something like this:</p> <pre><code>sites_list = Site.objects.filter(worker=worker) for site in sites_list: new_sites_list = Site.objects.filter(name=site.name).filter(something else) </code></pre>
Identify current session within Windows Forms application: session ID? <p>In ASP.NET, each session can be identified by its SessionID variable. Currently, I'm working on a project for which I want to be able to identify each separate user session. In other words, I'm looking for a session identifier or an equivalent va...
<p>Maybe <a href="http://msdn.microsoft.com/en-us/library/system.diagnostics.process.id.aspx" rel="nofollow"><code>System.Diagnostics.Process.GetCurrentProcess().Id</code></a> would cover your needs? That will give you a number that uniquely identifies the currently running process on the system. The number is valid on...
Suppressing runtime exceptions in C# for ASP.NET MVC application <p>How do I suppress an exception in C#? I do not want to enclose it in a try-catch block with an empty <code>catch</code> block - that would defeat the purpose. I have a custom <code>Application_Error</code> handler/listener that checks for <code>HttpExc...
<p><strong>Two Things:</strong></p> <ol> <li><p>For production: Use <a href="http://code.google.com/p/elmah/" rel="nofollow">ELMAH</a>. Use ELMAH and any Yellow Screen of Death errors get logged.</p></li> <li><p>For Development and YSOD: See this Stack Overflow question that covers your specific issue:</p></li> </ol> ...
Is there a right way to return a new object instance by reference in C++? <p>So I was writing some code, and I had something like this:</p> <pre><code>class Box { private: float x, y, w, h; public: //... Rectangle &amp; GetRect( void ) const { return Rectangle( x, y, w, h ); } }; <...
<p>You can't return a reference to a temporary object on the stack. You have three options:</p> <ol> <li>Return it by value</li> <li>Return by reference via a pointer to something that you created on the heap with the new operator.</li> <li>Return by reference what you received by reference as an argument. [EDIT: Than...
Can two different URLs be routed to the same view in ASP.NET MVC? <p>I am just starting to learn ASP.NET MVC and I have a situation where I have two URLs which I would like to point to the same view.</p> <p>For example I could have <a href="http://some.domain/reports/daily/team1" rel="nofollow">http://some.domain/repo...
<p>Yes you can. Add another one of these.</p> <pre><code>routes.MapRoute( "Default", // Route name "{controller}/{action}/{id}", // URL with parameters new { controller = "Home", action = "Index", id = "" } // Parameter defaults ); </code></pre> <p>Just fill in the URL ...
How to use Google Guice to create objects that require parameters? <p>Maybe I am just blind, but I do not see how to use Guice (just starting with it) to replace the <code>new</code> call in this method:</p> <pre><code>public boolean myMethod(String anInputValue) { Processor proc = new ProcessorImpl(anInputValue);...
<p>There is some time since I used Guice now, but I remember something called "assisted injection". It allows you to define a factory method where some parameters are supplied and some are injected. Instead of injecting the Processor you inject a processor factory, that has a factory method that takes the <code>anInput...
Executing WPF routed commands manually <p>When executing a custom <code>RoutedUICommand</code> manually from code-behind, like this:</p> <pre><code>MyCommands.MyCommand.Execute(parameter, target) </code></pre> <p>do I need to call the <code>CanExecute</code> method first or is this already done inside the <code>Execu...
<p>Do not assume that CanExecute will get called with Execute. The interface for ICommand does not imply that it calls CanExecute when Execute is called, so if it is important to you that it only execute when CanExecute is true, simply check it yourself. </p> <p>Also, scanning the de-compiled code for RoutedUIComman...
Content for Linux Operating Systems Class <p>I will be TA for an operating systems class this upcoming semester. The labs will deal specifically with the Linux Kernel.</p> <ol> <li>What concepts/components of the Linux kernel do you think are the most important to cover in the class?</li> <li>What do you wish was cov...
<p><strong>My list</strong>:</p> <ol> <li>What an operating system's concerns are: <strong>Abstraction and extension of the physical machine</strong> and <strong>resource management</strong>.</li> <li>How the <strong>build process works</strong> ie, how architecture specific/machine code stuff is implanted</li> <li>Ho...
How to determine if a Delaunay triangle is internal or external? <p>I am writing a program that requires a implementation of Medial Axis extraction, of which Delaunay triangulation is a step. External medial axis is unwanted so the corresponding external triangles are intended to be removed. Luckily I came upon <a href...
<p>This solution assumes that you have a data structure that represents the Delaunay triangulation using a "virtual infinite Delaunay vertex" the way <a href="http://www.cgal.org" rel="nofollow">CGAL</a> does it (<a href="http://www.cgal.org/Manual/3.3/doc_html/cgal_manual/Triangulation_2/Chapter_main.html#Section_25.2...
Virtual Earth and ASP.NET MVC <p>I would like to use Virtual Earth on an ASP.NET MVC application for a client. What are the licenses available for commercial use?</p> <p>Also, does anyone have a good example? I tried a few examples but they always end with 'Object is null' error in the java script code.</p>
<p><a href="http://nerddinner.com/" rel="nofollow">nerddinner</a> has <a href="http://nerddinner.codeplex.com/" rel="nofollow">example code</a> to download.</p>
Building a Mobile Device: Possible to use XHTML/CSS/JS? <p>I'm building a general mobile device that will operate on Ubuntu x86. Is it at all possible, and decently scored in performance, to build said system from HTML/CSS/Javascript? I'm currently a frontend and backend web developer and designer. At this point, I'm ...
<p>The first thing I did when I got hold of Google phone G1 was to write Tetris clone on Adroid. Although not impossible, it'll be hard to write something like that with timer, graphics, and event handling just using XHTML/CSS/JS.</p> <p>Would you be providing API to the device itself, like saving data, via JavaScrip...
How to check an empty date argument in a XQuery function? <p>Consider the following code which checks for an empty date:</p> <pre><code>declare xqse function tns:isEmptyDate($dob as xs:date) as xs:boolean { if(empty($dob)) then { } } </code></pre> <p>When executed, why do I get the below error in ALDSP:</p> ...
<p>OK, I've had a look at this and I think you'll be able to run your query by defining your function as</p> <pre><code>declare function tns:isEmptyDate($dob as xs:date?) as xs:boolean </code></pre> <p>Note the ? after the type - it means that the argument may be the empty sequence.</p> <p>I tested this out in Oxyge...
Trouble getting a reference to a ModalPopupExtender using javascript <p>I am trying to use the following code to get a reference to a modalpopupextender, but when I check the value of the javascript variable 'modal' it is always null. What is the proper way to get a reference to the AJAX control using javascript?</p> ...
<p>I suspected that part of the problem was the popupextenders had not been rendered at the time the script was being called. So after googling I found this post: <a href="http://forums.asp.net/p/1413275/3112082.aspx#3112082" rel="nofollow">http://forums.asp.net/p/1413275/3112082.aspx#3112082</a>. Here is the solutio...
Why does my SSRS page height expand when running subreports in a local processing mode ASP.NET report viewer? <p>I have a report with subreports and when running subreports it's as if the subreport height is not being taken into account.</p> <p>So for example ... if I had a report where 10 lines that would fit on each...
<p>this is just a "feature" (see my comments)</p>
Import javascript dynamically with jQuery? <p>I'm trying to setup a widget framework using jQuery, so I need to import java script by parsing the widget's xhtml and including in the framework page. The problem is that this may lead to pollution of the namespace. Is it possible to load java script into a namespace at ru...
<p>You can do something like this...</p> <pre><code>var myOtherFramework = null; $.get("myScript.js", function(data) { myOtherFramework = eval("(" + data + ")"); }); </code></pre> <p>And then reference it like...</p> <pre><code>myOtherFramework.funcName(); </code></pre>
Should cookie content be encypted when using https? <p>I'm trying to write a cookie in ASP.NET under https, but I see a plain text cookie in the client machine. Shouldn't the cookie be encrypted by default under an https connection?</p>
<p>Short answer is no, cookies are not encrypted in ASP.NET under SSL. SSL is a transport-level protocol, encrypting only the communications between the client and server. Cookies and query-string values are NOT encrypted by SSL. Once the cookie is on the client machine, it is left in whatever format it left the server...
C# Logoff out a user via Windows Service <p>How do I logoff a user via a Windows Service? </p> <p>I found this example here but it will not work in a service. <a href="http://www.c-sharpcorner.com/UploadFile/thiagu304/desktopfunctions02112007140806PM/desktopfunctions.aspx" rel="nofollow">http://www.c-sharpcorner.com/...
<p>Check out WTSLogoffSession. It does precisely what you want and is pretty easy to call via PInvoke. To get the session ID use WTSGetActiveConsoleSessionId or WTSEnumerateSessions and WTSQuerySessionInformation.</p>
Property Pages (Wizard) - OnQueryCancel <p>I am trying to handle the 'Cancel' button in my property pages (wizard) and I've implemented the 'OnQueryCancel' function to catch the cancel message successfully, but unfortunately it seems that the 'OnQueryCancel' function is being called twice if the user clicked the cancel...
<p>My first guess is that you have directly sunk the "query cancel" message (is that a message?) or maybe you have a click handler on the button itself AND it is called automatically on click of the cancel button. Try commenting out your message map entry.</p> <p>Try creating a new project with classwizard and compare...
Consuming a WSDL file using .NET - Total Newbie Question! <p>I'm taking my first baby steps into consuming web services. Here's my situation: </p> <p>I'm writing in .NET 3.5 for an existing corporate intranet website. I need to add a call to a web service, passing account data and getting a response. </p> <p>I am abl...
<p>See <a href="http://johnwsaundersiii.spaces.live.com/blog/cns!600A2BE4A82EA0A6!790.entry" rel="nofollow">How to Consume a Web Service</a>.</p> <p>You should use WCF for all new web services development with .NET. WCF <em>is</em> "baked in" to .NET. What you refer to as the "baked in ASP.NET web services architectur...
Bash: Delete until a specific file <p>Hy, suppose you got many files in a folder and you want first to sort it in alphabetic order and then delete all files until a specific file (not including it).</p> <p><strong>So im searching for a function/command/script/whatever which takes one string as imput and the deletes al...
<p>Try,</p> <pre><code>rm $(ls | sort | sed '/input/,$d') </code></pre> <p>First try this without the <code>rm</code> as,</p> <pre><code>ls | sort | sed '/input/,$d' </code></pre> <p>Here, <code>input</code> is your regex to catch the filename. Remember, everything after the first match will go!</p>
Using jQuery to select multiple values of attributes across a collection of objects <p>In this example I am selecting a bunch of 'A's within 'LI's (it doesn't really matter what I am selecting, just know I am returning a group of 'A' tags that all have the same "attribute structure").</p> <p>I was wondering how I woul...
<p>Well, there are a lot of ways to do this, butthis particular way is relatively concise and makes use of the <a href="http://docs.jquery.com/Utilities/jQuery.makeArray#obj">makeArray</a> and <a href="http://docs.jquery.com/Utilities/jQuery.map#arraycallback">map</a> functionality in jQuery.</p> <pre><code>$('li').ma...
Where do Wikis using MediaWiki Software Store Their Articles? <p>Where and how do wikis that use the MediaWiki software store their articles?</p>
<p>In a MySQL database, typically.</p> <p>Nowadays MediaWiki also supports other databases, such as PostgreSQL. For details, read the "Database server" section <a href="http://www.mediawiki.org/wiki/Manual:Installation%5Frequirements">here</a>.</p> <p>Edit: as to <em>how</em> MediaWiki stores the articles, see <a hre...
AOP, Spring and transaction scoping <p>imagine a transactional, multithreaded java application using spring, jdbc and aop with n classes in m packages all taking part in database transations. Now let's say there is the need to scope an arbitrary set of classes within one transaction. Furthermore there is always one cla...
<p>You don't need a single point of entry, but you do need the ability to apply the transactional interceptor to all entry points so that re-entrant calls can participate in the same transaction. Assuming that you can do that, you could accomplish this with a ThreadLocal flag and a custom <code>org.springframework.tran...
java: basic web service interface without a web server <p>how hard is adding a basic web services interface to an existing java server application without having to turn it into a .war, or embedding a small web server like jetty?</p> <p>say, xml-rpc instead of more modern approaches, if it helps.</p> <p>if not too ha...
<p>It sounds like you're asking for the impossible: expose an HTTP service without plugging into or embedding an HTTP server!</p> <p>Unless you want to reimplement what Jetty already does, I'd reccommend using Jetty as a library. That way you don't need to conform to the more awkward aspects of the Servlet spec. E.g. ...
How do I take a DIB and convert it to a tif using libtiff <p>I am trying to read in a scanned image and compress it from a DIB in memory into a TIF file. I am using the libtiff library and have found a couple examples online but none of them really do as I need them to. I need to take the image from the DIB and turn it...
<p>I may be wrong, but I think that for CCITTFAX4 encoding libtiff expects eight pixels per byte, padded to the end of the byte if the image width is not divisible by 8. </p> <p>If the width of the image is 150, for example, the scanline should be 19 bytes, not 150.</p> <p>There is a good example of using libtiff <a ...
I have some questions about MVVM pattern <p>My name is Jesús from Spain, I'm a .NET developer and I just discovered this great web few days ago.</p> <p>I have some questions about the MVVM pattern and I will be glad if you can answer them.<br /> I started using WPF three months ago and I've learned the MVP pattern.<b...
<p>Wow, I'm going to try to answer as many of your questions, that don't involve a specific technology or framework, as possible... sorry if I miss some (bullet points would help)</p> <ul> <li>MVVM is not necessarily a variation of MVP. MVP itself is an ambiguous, loaded term. Martin Fowler did it justice by <a href...
How to compile using VS2008 so binary doesn't require .NET? <p>I'm trying to compile a very simple C application using VS2008. My problem is that the resultant binary requires systems to have .NET installed. No actual code within the project uses .NET functionality, but I get errors during execution on any system that ...
<p>In the Project Properties dialog, go to Configuration Properties | General. The option for "Common Language Runtime support" should be set to "No Common Language Runtime Support." Then Rebuild.</p> <p><strong>EDIT</strong>: Also check the Advanced Linker options whose names start with CLR. You shouldn't see any ...
How do you properly use a static property that implements IDisposable? <p>As an example:</p> <pre><code>using (Brushes.Black) { ... } </code></pre> <p>is not a good idea, because it is static. The next time your app goes to use Brushes.Black, you'll have problems, because it has been disposed.</p> <p>Now, if you're...
<p>Normally just use them, and let the framework class worry about disposing them.</p> <p>They are there so that you can use them without creating and disposing them each time. Each one is created when you first use it, and is cached in a hash table. The framework class is responsible for disposing them properly when ...
WPF Textbox & Borders - curious resizing behavior <p>The following XAML produces a window with strange behavior around the textbox:</p> <pre><code>&lt;Window x:Class="WpfSandbox.CuriousExample" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xa...
<p>You can force the application to use the vista theme (aero)</p> <p>Open your app.xaml and put something like:</p> <pre><code> &lt;ResourceDictionary&gt; &lt;ResourceDictionary.MergedDictionaries&gt; &lt;ResourceDictionary Source="/PresentationFramework.Aero;V3.0.0.0;31bf3856ad364e35;componen...
C++ allocation, construction and destruction questions <p>Q1. In the following line of code, what happens first: memory allocation, or the constructor call?</p> <pre><code>int *ptr = new int(); </code></pre> <p>Q2. What is the difference between the following three approaches to delete an object?</p> <ol> <li>If an ...
<p>OK, well I've given your questions a somewhat meaningful title, so I'll try to answer them as well. (Though you really should put multiple questions in multiple postings).</p> <p><strong>Q1</strong>. The allocation happens first. This is clearly the case because the object <strong>doesn't exist</strong> until it is...
How do I apply AddHandler using OnCommand in ASP.NET <p>I've been racking my brain trying to get this to work. My event for my LinkButton isn't firing. I'm figuring that it has SOMETHING to do with ViewState and that the button is not there when it tries to fire the event after the Postback or something. </p> <p>Wh...
<p>The reason that's happening is that your dynamic button "lbn" needs to be drawn again on post back when it's clicked because the button doesn't exist after you click it. </p> <p>Basically you just have to dynamically add the button to the page again on post back of click of that button.</p> <p>I would recommend ha...
How do I add the NULL device to Windows XP Embedded? <p>Windows XP Embedded is missing the NULL or "NUL" device. For one thing, Visual Studio seems to require it and trying to build a project aborts with a PRJ0015 error.</p> <p>Anyone know how to configure an XPe image to include support for the NUL device?</p>
<p>"Null Device Driver" is available in the XPe Target Designer, but it's normally hidden. Apparently each component has a visibility level, and if it's lower than that set in the Target Designer options (Tools->Options), it's hidden. Null Device Driver is at level 200, so I set the level to 100 and could see it and in...
Segmentation fault in custom QAbstractItemModel <p>I've written my own QAbstractItemModel to show a tree in TreeView. It shows the top level items, but when you expand a directory, the app closes, the the following message is written to the console: "Segmentation fault" What am I doing wrong that is causing this. Here...
<p>Use the modeltest.py module! It exercises your model for different scenarios. You can find it in the /contrib/ directory inside the PyQt source code package.</p>
Can I use .NET 4.0 beta in Visual Studio 2008? <p>There are some really great features in .NET 4.0 that I would like to start using but I am not comfortable making the change to VS 2010 just yet. Is there a way to use the .NET 4.0 beta in VS 2008?</p>
<p>no, this is not possible, .NET 4.0 requires VS 2010 to be able to target/build.</p>