input
stringlengths
51
42.3k
output
stringlengths
18
55k
Can a JBoss JDBC connection be invalidated so that it doesn't get resupplied from the connection pool? <p>I have a circumstance where a JDBC connection places the Oracle session to which it is attached into a particular state (i.e. DBMS_FLASHBACK enabled mode). It's possible for the exit of this mode to fail (at least ...
<p>Your Oracle database connection configuration should contain an exception sorter:</p> <pre><code>&lt;exception-sorter-class-name&gt;org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter&lt;/exception-sorter-class-name&gt; </code></pre> <p>This attempts to determine when an exception occurs if the connection...
How could nHibernate not be 100% compile time tested? <p>One thing that bothers me about nHibernate is that it is not 100% compile time tested.</p> <p>If I rename a column in my database table, and I update the mapping file for that table, when I hit compile I should get errors in all my query code (hql/criteria whate...
<p>To achieve what you want I think your best solution is to use a combination of <a href="http://fluentnhibernate.org/" rel="nofollow">Fluent NHibernate</a> and <a href="http://code.google.com/p/nhlambdaextensions/" rel="nofollow">nhlambdaextensions</a>. Fluent NHibernate will give you type-safe checking on your mappi...
Are all clouds (such as AWS) still too "public" for internal corporate use? <p>We use AWS as a sort of developer playground --- turning on a server to test app deployment, and execution with a variety of non production data, and then turning it off again.</p> <p>We also use AWS as a host for our TFS. (because somehow ...
<p>Ubuntu offer a cloud solution that you can run within your network if management is worried about information going outside of the corporate firewall.</p> <p>Details can be found at: <a href="http://www.ubuntu.com/products/whatisubuntu/serveredition/cloud" rel="nofollow">http://www.ubuntu.com/products/whatisubuntu/...
jquery to find all exact td matches <pre><code>$('#servertable td:eq(' + server + ')') </code></pre> <p>this finds only 1 (first I think) match, how to find all matches. btw. td:contains will not work for me.</p>
<p><code>eq</code> expects a numerical index to only return a single row. If you want to match a td by its contents, you have to use the <a href="http://docs.jquery.com/Selectors/contains#text">:contains</a> selector. Saying "it doesn't work" and throwing it away is not the right approach to the problem, as the selecto...
How do I create a generic DataContext factory? <p>I'm building a generic <code>Repository&lt;T&gt;</code> class that supports Linq to SQL, and I'd like to use a factory pattern for the DataContext, because currently I have to pass the correct context to the constructor.</p> <p>Does anybody know how to determine the co...
<p>You do not really need to.</p> <p>Just take in a DataContext and you can access the tables using <code>GetTable&lt;T&gt;()</code>.</p>
Full Text Search for Multiple tables in SQl Server 2005 <p>I need to implement Full text search across tables.</p> <p>what are the different options.</p>
<p>you might be able to Full Text index and indexed view of the tables</p>
How can my program tell if Delphi is running? <p>I've heard that some custom component authors use an RTL routine that checks to see if Delphi is running in order to set up shareware restrictions. Does anyone know what this routine is? Checking obvious names like "DelphiRunning" or "IsDelphiRunning" doesn't turn up a...
<p>There are <strong>2 different ideas</strong> here:<br /> - Delphi is up and running<br /> - The application is running under the debugger</p> <p>The common way to test if <strong>Delphi is running</strong> is to check the presence of known IDE Windows which have a specific classname like TAppBuilder or TPropertyIns...
Enabling SSI (ServerSide Includes) in JBoss? <p>Any of you guys have enabled SSI (ServerSide Includes) in JBoss? I guess it should be not difficult as it is built on top of a Tomcat instance.</p>
<p>Tomcat already includes in catalina.jar the <em>org.apache.catalina.ssi.SSIServlet</em> so just declare the servlet and attach it to a mapping URL, by setting this in the applications <em>web.xml</em></p> <pre><code>&lt;servlet&gt; &lt;servlet-name&gt;ssi&lt;/servlet-name&gt; &lt;servlet-class&gt; o...
Adding UITextView as subview in UIView then to UIScrollView <p>I have a <code>UIViewController</code> (<code>ContentViewController</code>) wired to a View xib. I drop a <code>TextView</code> on the <code>UIView</code> and it appears as a subview in the hierarchy in IB.<br> <code>ContentViewController</code> has a label...
<p>Try :</p> <p>[textView setNeedsDisplay];</p> <p><hr /></p> <p>Original Answer</p> <p>You wouldn't have to deal with the textview differently.</p> <p>I first worry about your calling of "loadview". You are never supposed to call that directly. It is invoked automtically when needed.</p> <p>Also, you should decl...
Jquery Ajax call to webservice is failing <p>Can anyone help? I have an issue with calling a asp.net webservice from jquery.. actually i think it maybe jquery ... as i have a break point and it doesn't arrive in the webservice..</p> <p>Here is my jquery, the webservice method accepts 2 parameters...</p> <p>So i setup...
<p>xmlHttpRequest.responseText has always been my goto when dealing with jQuery AJAX errors.</p> <p>Try making your ASP.NET function static:</p> <pre><code>[WebMethod()] public static bool TempCanMakeCall(string reservationNum, string completedReservationNum ) { return true; } </code></pre> <p>Also note tha...
Is it possible to make an association between a Table and View in Entity Framework? <p>I have 2 databases (sql server 2005) in my system, one for configuration data and the other one for Application Data, but there are some tables that are needed in both databases. We've solved that using Synonyms but the problem is wh...
<p>Solved! All I had to do was delete the column that was mapped as a Entity Property and just keep the Navigational Property..</p>
Block while waiting for event <p>I have an external COM-object that connects to a server and then fire an event when the server is ready. The connect() call is thus asynchronously.</p> <p>My code looks (a bit...) like</p> <pre><code>ManualResetEvent waitConnection; //This is the event that is triggered when server i...
<p>Because the event's message pump is on the same thread as your WaitOne call. The thread is waiting and therefore, is not pumping around your messages.</p> <h3>Update</h3> <p>I should add that using <code>DoEvents()</code> is not usually an advisable solution. There are often better ways of handling the scenario su...
Which process was responsible for an event signalled by inotify? <p>I am using <code>pyinotify</code> to detect access, changes, etc. on files in a given directory. Is there an easier way to find out which process was responsible for that - without having to <a href="http://lkml.indiana.edu/hypermail/linux/kernel/0603....
<p>No, you can't, that information isn't in the <code>struct inotify_event</code> sent by the kernel.</p> <p>Actually there isn't any guarantee that the process responsible is still running when you get the event.</p>
Unable to Git-push master to Github <p>This question is related to my problem in <a href="http://stackoverflow.com/questions/904353/unable-to-understand-git-branch-merge-and-rebase/907799#907799">understanding rebase, branch and merge</a>, and to the problem</p> <blockquote> <p>How can you commit to your github acco...
<p>What does</p> <pre><code>$ git config --get-regexp '^(remote|branch)\.' </code></pre> <p>returns (executed within your git repository) ?</p> <p>Origin is just a default naming convention for referring to a remote Git repository.</p> <p>If it does not refer to GitHub (but rather a path to your teammate repository...
How do I force an eclipse plugin to be unpacked <p>My eclipse plugin must be unpacked. How can I enforce the installer to unpack it. Will it be unpacked if the jar file is simply dropped into the plugins folder?</p>
<p>This can be chosen when configuring the feature including the plugin. Go to the plugin list, select your plugin and check "Unpack the plug-in archive after installation".</p> <p>Arguably, this property should be defined by the plugin itself. There's a bug report about that https://bugs.eclipse.org/bugs/show_bug.cgi...
How do I programmatically add an unknown number of columns to an ASP.NET page using a repeater where some of the columns are declared at runtime in the SQL string? <p>I am declaring a SQL string that looks something similar to the following:</p> <pre><code>string SQL = "SELECT Column1, Column2, Column3, Date1, Date2 F...
<p>If you use a GridView you can set the AutoGenerate columns property to true (it is true by default) and then bind the GridView to your data.</p> <p>To make is super simple, you may want to use a <a href="http://www.asp.net/LEARN/data-access/tutorial-47-cs.aspx" rel="nofollow">SQLDataSource</a> control.</p> <p>The ...
how do i get a wpf window to refresh? <p>I am building a simple roulette app. The player(UI) puts together a list of bets and submits them to the table object to be evaluated and paid out. I've got the code to work and the game process goes smoothly. The problem is that after a turn I can't get the player balance(te...
<p>WPF can take care of updating these values for you automatically, but you have to let it know when things have changed. Typically, this is done by using DependencyProperties on your model objects, but it can also be done by implementing INotifyPropertyChanged. In either case, when you update a property's value, th...
Why can't I make a vector of references? <p>When I do this:</p> <pre><code>std::vector&lt;int&gt; hello; </code></pre> <p>Everything works great. However, when I make it a vector of references instead:</p> <pre><code>std::vector&lt;int &amp;&gt; hello; </code></pre> <p>I get horrible errors like "error C2528: 'poin...
<p>The component type of containers like vectors must be <a href="http://en.cppreference.com/w/cpp/concept/CopyAssignable"><code>Assignable</code></a>. References are not assignable (you can only initialize them once when they are declared, and you cannot make them reference something else later). Other non-assignable ...
how to pass id's frm one page to another on mobile? <p>Is it possible to send a query string to the url using get method and then getting the values in another page using eval or bind on mobile? some code example would b helpful... thanks alot</p>
<p>Can you expand on what you're trying to do and explain how it relates to mobile.</p> <p>Also, post some sample code if you are ahving a specific problem.</p>
How to turn off optimization (-02) for apache modules built with APXS <p>I'm trying to debug an apache module on RHEL and the optimization is getting in the way. I tried deleting the '-O2' from <code>EXTRA_CFLAGS</code> in <code>apache_2.2.4/build/config_vars.mk, b</code>ut it didn't help. APXS is sufficiently complex...
<p>Marko's answer is close, but -g only provides debugging symbols and does not disable the optimizer (which is sometimes a <a href="http://de.urbandictionary.com/define.php?term=pita" rel="nofollow">PITA</a> for debugging).</p> <p>When I'm debugging my mod_epp module, I use:</p> <p>Build apache with: ./configure --e...
how can i pass a parameter to EnqueueTimer in the .net ccr <p>Unclear if there are ccr gurus here but let's try anyway.</p> <p>I have this function in my code: </p> <p>dq.EnqueueTimer(TimeSpan.FromMilliseconds(TIMEOUT), timeOutFn);</p> <p>which will call my function after the timeout. However since I need this timer...
<p>Something like this should do it.</p> <pre><code>var timerPort = new Port&lt;DateTime&gt;(); dq.EnqueueTimer(TimeSpan.FromMilliseconds(TIMEOUT), timerPort); timerPort.Receive(ignored =&gt; MyFunc(myParam)); </code></pre>
How to mark a global as deprecated in Python? <p><a href="http://wiki.python.org/moin/PythonDecoratorLibrary#Smartdeprecationwarnings.28withvalidfilenames.2Clinenumbers.2Cetc..29">I've seen decorators</a> that let you mark a function a deprecated so that a warning is given whenever that function is used. I'd like to do...
<p>You can't do this directly, since theres no way of intercepting the module access. However, you can replace that module with an object of your choosing that acts as a proxy, looking for accesses to certain properties:</p> <pre><code>import sys, warnings def WrapMod(mod, deprecated): """Return a wrapped object...
When you show and hide a div, will it re-adjust surrounding elements automagically? <p>When you show and hide a div, will it re-adjust surrounding elements automagically?</p> <p>Sort of how google maps <a href="http://maps.google.com/maps?hl=en&amp;tab=wl" rel="nofollow">http://maps.google.com/maps?hl=en&amp;tab=wl</a...
<p>In terms of re-adjusting, if you are using CSS then it depends on weather or not you use the display:none option or visibility:hidden tag.</p> <p><em>Visibility</em> will hide it but not effect the surrounding elements, <em>display</em> on the other hand will...</p> <p>Check out this bit of code that should highli...
Two tables of emails addresses, return where one is not in the other <p>I have a list of e-mails from one database which I want to check against a list of unsubscribed e-mails from another database. If they exist in both lists, then I don't want them returned.</p> <pre><code>SELECT distinct `payer_email` as `email` F...
<p>I would use:</p> <p>WHERE NOT EXISTS (SELECT.....)</p> <p>I have come to learn that EXISTS is better performing than IN when using larger data sets.</p>
How to write stories / scenarios in BDD ( Behavior Driven Design ) <p>I am about to use BDD (Behavior Driven Design) for the first time and am trying to get used to this different way of approaching a problem. </p> <p>Can you give some stories / scenarios that you would write for say a simple login application using...
<p>Dan North has some excellent advice on writing stories. <a href="http://dannorth.net/whats-in-a-story">"Dan North- What's in a Story?"</a></p> <p>I would also take a look at some of the work being done around <a href="http://cukes.info">Cucumber</a> as they have spent a lot of time thinking about how to write these...
Installing/configuring gdbm Python module for cvs2svn? <p>I am trying to install cvs2svn on a Solaris 10 machine. It has Python 2.4.4 on it. I don't have root access. When I downloaded cvs2svn and tried to run it, it said</p> <blockquote> <p>ERROR: cvs2svn uses the anydbm package, which depends on lower level dbm li...
<p>I downloaded Python 2.5.1 and compiled it from the source. I made sure my gdbm libraries were in the appropriate paths and used the altinstall into my home directory. I can now run cvs2svn with my private copy of python.</p>
WPF Grid Items and Right Aligned Text <p>I have a WPF form where I'm trying to make a simple input form. Two labels, two textboxes, and a "submit" button. I have the layout pretty good, the only thing that I can't get is for my "Labels" to be right aligned inside their cells. I have tried both TextAlign="Right" and ...
<p>Your grid only has one column as written. It will need two to support your setting of Grid.Column=1 for the text boxes. Thus, you need to add a <code>&lt;ColumnDefinitions&gt;</code> block. With the XAML the way it is now, WPF just throws both controls into the same column, hence the behavior you are seeing.</p>
What does BGP Path Attribute Type 18 refer to? <p>Does anyone know what Path Attribute Type 18 refers to and how to parse it? The best I can understand is that it is a new AGGREGATOR (type 7) and I'm assuming that it's reading the new AS32 format, but that's not cutting it because I can't parse this packet. Is there ...
<p>Found a resource that describes the impact of the new Path Attributes <a href="http://opm.twnic.net.tw/6th/doc/routing/r2.pdf" rel="nofollow">here</a></p>
Saving a text file to a SQL database without column names <p>I am reading a text file in C# and trying to save it to a SQL database. I am fine except I don't want the first line, which is the names of the columns, included in the import. What's the easiest way to exclude these? </p> <p>The code is like this</p> <pre>...
<p>If you are writing the code yourself to read in the file and then importing...why don't you just skip over the first line?</p>
Is using dvcs making harder to use continuous integration in corporate environments? <p>There are unarguably lots of advantages in using dvcs and it can be used like centralized vcs, but is having local commits and being able to very easily fork the project for some smaller group making it harder to support continuous ...
<p>You can centralize a DVCS. The difference between DVCS and centralized ones is that with a DVCS, you don't <em>have</em> to centralize it.</p> <p>You could have a central repository where everyone can push changes, and everyone can pull the latest code from. You can write a commit hook on the server so that every...
Simple menu-like navigation in WinForms <p>I am writing a very simple WinForms application with few data-entry forms. But before the user gets to these forms, she has to select which action to take (ie which form to open, possibly after entering a search query). As this application is a rewrite of a legacy custom DOS F...
<p>An old project I was on was a conversion of a DOS (Clipper) application to Windows. We decided on something similar to that, with more of a web feel (single-click hyperlinking):</p> <pre><code>- - - - - - - - - - - - - - - - - - - - - - - | Bolded Group Header | Bolded Group Header | | Item Link 1 | Item...
Is there a function like PHP's vardump in Delphi? <p>I've given up on the Delphi 7 debugger and am pretty much relying on outputdebugstrings. Is there a standard function I can call to get the contents of an object as a string like the debugger would if I set a breakpoint? </p>
<p>Not exactly what your looking for, but you can use RTTI to get access to the values of various published properties. The magical routines are in the TypInfo unit. The ones you are probably most interested in are GetPropList which will return a list of the objects properties, and GetPropValue which will allow you t...
Reflection and Generic type resulting in null <p>I need to get the type object for IProcessor via reflection and according to documentation I need to do the following:</p> <pre><code>Type.GetType("IProcessor`1[System.Int32]") </code></pre> <p>However, that returns null. I then tried:</p> <pre><code>Type.GetType(type...
<p>You have to be a bit more careful with your transcription of the code you are asking about since the samples in your question have syntax errors in them; "FullName" and "AssemblyQualifiedName" need to be outside the bracket, not directly on the type.</p> <p>As such, I'll assume that you meant:</p> <pre><code>Type....
Is it possible to configure TFS not to mark file as read-only? <p>The title pretty much says it all. I'm using a RFT, VS addin that allows me to edit a proprietary data file with a GUI. The problem is that this file doesn't show up in VS and when I start editing it via the GUI, VS doesn't check it out automatically (pr...
<p>No. You can exclude it from source control, but that's probably not want you want. </p>
Delphi: Prompt for UAC elevation when needed <p>We need to change some settings to the HKEY_LOCAL_MACHINE at runtime.</p> <p>Is it possible to prompt for uac elevation if needed at runtime, or do I have to launch a second elevated process to do 'the dirty work'?</p>
<p>i would relaunch yourself as elevated, passing command line parameters indicating what elevated thing you want to do. You can then jump right to the appropriate form, or just save your HKLM stuff.</p> <pre><code>function RunAsAdmin(hWnd: HWND; filename: string; Parameters: string): Boolean; { See Step 3: Redesi...
How to fake Foreign Key Collections Properties in Entity Framework and ASP.NET MVC <p>In Alex James' blog post <a href="http://blogs.msdn.com/alexj/archive/2009/03/25/tip-7-faking-foreign-key-properties-in-net-3-5-sp1.aspx" rel="nofollow">How to fake Foreign Key Properties in .NET 3.5 SP1</a>, he explains how to add a ...
<p>I'm assuming you can get the selected Person Id's into the Action method, and all the People already exist in the database... because this form is simply creating relationships to People and updating the department itself, not creating new staff.</p> <p>In that case you want to do something like this (psuedo-code):...
Is it possible to export a site definition in MOSS/Sharepoint using STSADM? <p>Is it possible to export a site definition (NOT a site template) using stsadm? I'm looking for a way of getting an export of ONET, WEBTEMP and any required features.</p>
<p>Matt,</p> <p>There wasn't too much detail on the specifics of your situation but given the info in the question here's what I think you're looking for.</p> <p><strong>Assumption</strong> : You have a custom site definition deployed on your farm and you want to get the source for it.</p> <p>I can think of 2 ways t...
How can I have design time support for my custom user controls in Visual Studio 2008? <p>I'm an creating a custom user control for .NET Compact Framework and I want to keep design time support.</p> <p>I'd like to think in Visual Studio 2008 that this is not the crazy almost impossible task it once used to be.</p> <p>...
<p>There is a sample you can download <a href="http://msdn.microsoft.com/en-us/library/ms180794%28VS.80%29.aspx" rel="nofollow">here</a> that shows how to incorporate a WYSIWYG design-time experience.</p> <p>Also there is annother tutorial <a href="http://msdn.microsoft.com/en-us/library/aa478960.aspx" rel="nofollow">...
How do I avoid the use of getdate() in a SQL view? <p>I'm writing a database view to sum up a bunch of records where the value in a date column is within the last 7 days. It looks something like this:</p> <pre><code>CREATE VIEW RecentRecordSum AS SELECT t.ID, SUM(t.SomeValue) AS ValueSum FROM ...
<p>One reason for your question might be to make the view more optimizable by removing the data transformation. Can't do it in a view, you'd need to make it a stored procedure and do the transform into a variable:</p> <pre><code>CREATE PROCEDURE RecentRecordSum AS DECLARE @adate DATETIME SELECT @adate = DATEADD(d, -...
SVN Firefox Plugin <p>Is there a firefox plugin which functions as an SVN client? I have checked on the official addon website. I really do not wish to go to the trouble of installing a standalone client, so is there currently a firefox plugin or some easy way I or someone else could make one? This would be very useful...
<p>I found <a href="https://addons.mozilla.org/en-US/firefox/addon/3416" rel="nofollow">this firefox SVN extension</a>, but it is basically just a shortcut to access <a href="http://tortoisesvn.tigris.org/" rel="nofollow"><strong>TortoiseSVN</strong></a>.</p> <p>By itself, Tortoise is integrated into the shell, and ve...
When calling a Python script from a PHP script, temporary file that is created on a console run, is not created via the PHP invocation <p>Scenario:</p> <p>I have a php page in which I call a python script. </p> <p>Python script when run on the command line (Linux) shows output on the command line, as well as writes t...
<p>I bet your py script has some bug which couses it to break when called from inside PHP. Try</p> <pre><code>passthru('/usr/python/bin/python3 ../cgi-bin/tabular.py 1 2&gt;&amp;1'); </code></pre> <p>to investigate (notice <strong>2>&amp;1</strong> which causess stderr to be written to stdout).</p>
How do I make SSIS FTP task execute a FTP script rather than just upload a file? <p>I am working on a SSIS package that extracts some data from DB to a file then uploads it to a FTP server. I need to execute several FTP commands but seems like the SSIS FTP task only allows me to specify source &amp; destination locatio...
<p>Unfortunately no, I think you might need to use a script task. You should be able to find a .Net FTP library to re-use (adding it as a reference), and you can store user / pass / connection information in variables and access it within the script for maximum portability / maintainability.</p>
transactional sqlite? in C# <p>I am writing a prototype application. Right now some things fail such as inserting a non unique column. In this case i would like to rollback everything i have did. How do i do that? I also notice in sqlite i need to commit the data, in C# it seems to do it automatically which makes me su...
<p>Rollback: It looks like what you are looking for is the command text "INSERT OR ROLLBACK ... "</p> <p>Transaction: sqlite automatically puts each command into its own transaction unless you specifically state when to begin. EDIT: TML explains this portion a bit more in-depth in his answer</p> <p>example of expl...
Coding standards: Large amount of arguments <p>Hey, I'm a fresh out of college graduate. I'm working on a project that I expect will be ultimately maintained by somebody else. I keep encountering an annoying situation on this project, and that is objects that require many private variables and as a result very long con...
<p>Generally speaking, if you have more than about 4 arguments, you are better off using a temporary object or array instead. Often many of the parameters because optional and this can get pretty awkward and error prone pretty fast. So:</p> <pre><code>class MyClass { public function __construct($options) { ... } ......
Listing subset of MS Access Tables in MS Excel with VBA <p>I have a series of stores Queries/tables in an MS Access 2002 database that starts with "RP_". I would like to list those table names in a listbox menu in an MS Excel 2002 spreadsheet. Any ideas on how to do this?</p>
<p>There are many ways to achieve this.<br /> Here is one:</p> <ul> <li><p>Add an ActiveX ComboBox control to your form (say <code>ComboBox1</code>) and link its <code>LinkedCell</code> property to the cell where you want the result to be stored.</p></li> <li><p>Add a reference to the <em>"Microsoft DAO 3.6 Object Lib...
Source for generating people data? <p>This is only tangentially a programming question. Where can I find a simple-to-parse list of people names? This is really just filler material, so they don't need much rhyme or reason.</p> <p>Alternatively, is there a programmer's equivalent to <a href="http://en.wikipedia.org/wik...
<p>You could draw names randomly from <a href="http://projecteuler.net/project/names.txt" rel="nofollow">names.txt</a> (46 KiB, comma-separated values) from <a href="http://projecteuler.net" rel="nofollow">Project Euler</a> problem 22.</p> <p><hr /></p> <p><strong>EDIT</strong>: The <a href="http://www.census.gov" re...
Bindable LINQ (BLinq) in VB.NET <p>I cannot get Bindable LINQ to work with VB.NET for the life of me. How do I get the .AsBindable extention to appear?</p> <p>Sample code:</p> <pre><code>Class TestList : Inherits Bindable.Linq.Collection.BindableCollection(Of TestItem) 'Some Helpers and stuff' End Class Class Test...
<p>Don't make fun of me, but all I had to do was Import Bindable.Linq</p>
Problem replacing Linux system calls using LD_PRELOAD <p>I am trying to write a program that allows a binary to be run, substituting a certain file when requested with another. It is a library with simple replacements for the system call functions, that is used with LD_PRELOAD. The problem is that it catches opens for ...
<p>Nevermind -- stupid mistake.</p> <p>Wasn't checking both absolute and relative paths...</p>
Is there standard file names for Terms of Use / Privacy Policy? <p>Are there standard file names for Terms of Use and Privacy Policies?</p> <p>For some reason, I remember that Internet Explorer and possibly other browsers used to look for them on the current website, and display a little warning icon...</p>
<p>Are you looking for <a href="http://en.wikipedia.org/wiki/P3P" rel="nofollow">P3P</a>?</p> <blockquote> <p>The privacy policy can be retrieved as an XML file or can be included, in compact form, in the HTTP header. The location of the XML policy file that applies to a given document can be:</p> <ol> ...
Why do I get connection refused after 1024 connections? <p>I am testing on a local Linux server with both the server and client in the same server. After about 1024 connections, in my code, where I connect, I get connection refused. At first I thought it was the fd_set_max limit of 1024 for select and changed the serve...
<p>If you are connecting faster than your server is calling <code>accept()</code>, the queue of pending connections may be full. The maximum queue length is set by the second argument to <code>listen()</code> in the server, or the value of <code>sysctl net.core.somaxconn</code> (normally 128) if lower.</p>
Make Macro to input data into Excel spreadsheet <p>I am using Excel 2003 and I need to create a macro the asks the user for 5 inputs: Date, Project#, Fault, Problem, and Solution. I have never used macros before so I have no idea how to code this. Once the data is entered by the user I want it to go under the appropria...
<pre><code>Sub TestMacro() Range("A2").Select ActiveCell.FormulaR1C1 = InputBox("Date") Range("B2").Select ActiveCell.FormulaR1C1 = InputBox("Project #") Range("C2").Select ActiveCell.FormulaR1C1 = InputBox("Fault") Range("D2").Select ActiveCell.FormulaR1C1 = InputBox("Problem") Ra...
System.UnauthorizedAccessException from Serial Port in VB.NET <p>I am using VB.NET 2008 Express Edition to access Serial Port which is a USB to Serial port. Since this is removable, the app user can disconnect it at any time in app. I am getting an unhandled exception when I remove the USB Serial Port.</p> <p>After re...
<p>There were a number of serial port libraries written for .Net 1.1, since it did not provide built-in classes for ports. <a href="http://www.codeproject.com/KB/dotnet/DotNetComPorts.aspx" rel="nofollow">Here</a> is one example; there are others, open source and commercial.</p> <p>You do not have to use the framework...
In as/flex, Is it possible to find all Classes in a package that implement a certain interface? <p>In as/flex, Is it possible to find all Classes in a package that implement a certain interface?</p>
<p>If you're asking about doing this programmaticly, you can use the flash.utils.describeType to get XML to show you the interfaces a class implements. However, you'd still have to know the name of the classes - because the 'discovering' the classes in a package is not simple.</p>
Porting addons to Mozilla Prism 1.0b1 <p>I'm trying to port an application to the newest version of Mozilla Prism (1.0b1 currently). The instructions say to put this in install.rdf:</p> <pre><code>&lt;em:targetApplication&gt; &lt;!-- Prism --&gt; &lt;Description&gt; &lt;em:id&gt;prism@developer.mozilla.o...
<p><a href="https://developer.mozilla.org/en/Prism/Extensions" rel="nofollow">https://developer.mozilla.org/en/Prism/Extensions</a></p> <p>Are you sure the MaxVersion is the problem?</p> <pre><code>&lt;em:maxVersion&gt;1.0.0.*&lt;/em:maxVersion&gt; </code></pre> <p>is in the example.</p> <p>Also, <a href="http://ww...
Are user stories the same as Yourdon's events? <p>Are user stories (typically used in agile development or test driven development) the same thing as events in Edward Yourdon's structured analysis methodology?</p>
<p>Events and user stories are related but not identical. A Yourdon event is any stimulus to the system that requires the system to respond, so, for example, a tick from an external clock could be an event. That might require a response, eg, by incrementing a counter, but it wouldn't necessarily lead to a result with...
How do I write a bash alias/function to grep all files in all subdirectories for a string? <p>I've been using the following command to grep for a string in all the python source files in and below my current directory:</p> <pre><code>find . -name '*.py' -exec grep -nHr &lt;string&gt; {} \; </code></pre> <p>I'd like t...
<p>If you don't want to create an entire script for this, you can do it with just a shell function:</p> <pre><code>findpy() { find . -name '*.py' -exec grep -nHr "$1" {} \; ; } </code></pre> <p>...but then you may have to define it in both ~/.bashrc and ~/.bash_profile, so it gets defined for both login and interacti...
Difference between C++ reference type argument passing and C#'s ref? <p>I always thought they were about the same thing but someone pointed me out in one of my answers that such ain't quite true.</p> <p>Edit: <a href="http://stackoverflow.com/questions/838117/ref-keyword-and-appdomains/838152#838152">Here</a> is what ...
<p>In C#, you have primitive types (ints, structs, etc.) and reference types (objects). These are built in to the language. In C++, you have to be explicit. Here is a set of equivalent ways of referring to objects in C# and C++, based on whether they are reference types or primitives, and whether or not you're using re...
JQuery/AJAX: Functions using ID's from external content <h2>The Idea</h2> <p>I have a main PHP page that loads content in DIV's from an external file using JQuery and AJAX.</p> <p>The page works as follows:</p> <ol> <li>Main page has list of links, when link is clicked, AJAX loads an external DIV onto the page.</li>...
<p>With jQuery 1.3 came the ability to bind to future matching elements, using the <a href="http://docs.jquery.com/Events/live" rel="nofollow">.live method</a>.</p> <blockquote> <p>"Binds a handler to an event (like click) for all current - and future - matched element. Can also bind custom events."</p> </bloc...
Objective C: Parenthesis after object name <p>What are the parenthesis doing in </p> <pre><code>[s addChild: [restartAction() node]];" </code></pre> <p>or what is that feature called? Thanks.</p> <p>EDIT: I think the definition of restartAction() is</p> <pre><code>Class restartAction() { NSString *r = transiti...
<p>restartAction looks like a plain C function that takes no arguments. It probably returns a pointer to an objective-c type.</p> <p>Since restartAction returns an Objective-C <code>Class</code> type you can call class(+) functions on it. It's syntactically equivalent to when you call [NStype alloc]; </p> <p>If you w...
thickbox not load the embed tag content <p>I need some advice about thickbox, please! I've just follow the example in thickbox inline but I couldn't load the content of the div in my page as I wanna. My html code and jquery code like that. Any suggestion for my problem? </p> <pre><code> $(".artist").hover(function(){ ...
<p>First of all it's not wise to use replaceWith here, because after the first hovering, the $('tooltip_artist') node will be replaced with your swf --> subsequent hoverings won't work. Its better to insert the embed code into the $('tooltip_artist') by using the .html() method.</p> <p>then I'd use double/single quote...
which language / platform doesn't have a fixed stack size? <p>does some language or platform not have a fixed size of stack and therefore not easy to overflow? I remember using C on UNIX, the stack was difficult to overflow while back in the days of Win 3.1, the stack was very easy to overflow.</p>
<p>If by "stack" you mean any old stack, most languages do-- Java has a <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Stack.html" rel="nofollow">stack</a> class limited only by memory. More likely you mean the call stack, in which case the biggest example I can think of is <a href="http://www.stackless.com...
How do I execute private procedures in an Oracle package? <p>This is my first attempt at creating a package, so I must be missing something really really obvious (nothing that I've Googled for seems to even consider it worth mentioning).</p> <p>Obviously, if you have procedures in your package body that are not includ...
<p>I think you should do this:</p> <pre><code>CREATE OR REPLACE PACKAGE BODY testPackage AS PROCEDURE privateProc; --Forward declaration PROCEDURE publicProc IS BEGIN privateProc(); END; PROCEDURE privateProc IS BEGIN DBMS_OUTPUT.PUT_LINE('test'); END; END testPackage; </code></pre> <p>Just call pri...
Capturing Implicit Signals of Interest in Django <p>To set the background: I'm interested in:</p> <ul> <li>Capturing implicit signals of interest in books as users browse around a site. The site is written in django (python) using mysql, memcached, ngnix, and apache</li> </ul> <p>Let's say, for instance, my site sell...
<p>If this data is not an unimportant statistic that might or might not be available I'd suggest taking the simple approach and using a model. It will surely hit the database everytime. </p> <p>Unless you are absolutely positively sure these queries <strong>are</strong> actually degrading overall experience there is n...
Weird strange things happening in repository record! <p>SubSonic 2.2. I use the repository record pattern, with a table "appointment" with an appointmentId as auto-incrementing int.</p> <p>I am trying to update it, but when I do update the fields with something totally different, dirty columns are always zero, and I g...
<p>You're using the Structs we provide instead of instantiating an Appointment object. Do everything you're doing here, but create an Appointment instance and assign it the values. Then pass that instance to the repo.</p>
How to use Zend Framework 1.8 unit testing? <p>In Zend Framework 1.8, using Zend_Tool, the framework now generates controllers, actions, etc. automatically.</p> <p>What it does is that it also creates a tests directory when creating a project.</p> <pre><code>quickstart |-- application | |-- Bootstrap.php | |-- co...
<p>You have to create the test folder manually. I followed this <a href="http://www.zendcasts.com/unit-testing-with-the-zend-framework-with-zend%5Ftest-and-phpunit/2009/06/" rel="nofollow">tutorial</a>.</p>
Best way to retrieve variable values from a text file - Python - Json <p>Referring on <a href="http://stackoverflow.com/questions/868112/loading-files-into-variables-in-python">this question</a>, I have a similar -but not the same- problem..</p> <p>On my way, I'll have some text file, structured like:</p> <pre><code>...
<blockquote> <p>But what i'll love is to refer to the variable direclty, as i declared it in the python script..</p> </blockquote> <p>Assuming you're happy to change your syntax slightly, just use python and import the "config" module.</p> <pre><code># myconfig.py: var_a = 'home' var_b = 'car' var_c = 15.5 </code>...
ùser mapping query <p>I want to know how to get user mapping details in sql server 2005,whether the login user has the permission on the database or not.</p>
<p><a href="http://msdn.microsoft.com/en-us/library/ms190304.aspx" rel="nofollow">sp_helplogins</a> gives login + database mapping info</p>
Dispelling the UIImage imageNamed: FUD <p>Edit Feb 2014: <strong>Note that this question dates from iOS 2.0!</strong> Image requirements and handling have moved on a lot since then. Retina makes images bigger and loading them slightly more complex. With the built in support for iPad and retina images, <strong>you shoul...
<p><strong>tldr: ImagedNamed is fine. It handles memory well. Use it and stop worrying.</strong></p> <p><strong>Edit Nov 2012</strong>: Note that this question dates from iOS 2.0! Image requirements and handling have moved on a lot since then. Retina makes images bigger and loading them slightly more complex. With the...
What makes an app console or Windows Form application? <p>[Visual Studio 2008]</p> <p>I created a new project for console application and modified it to look like this:</p> <pre><code>class Program { static void Main (string[] args) { Thread.Sleep (2000); } } </code></pre> <p>Then I created another p...
<p>If you inspect the exe files usine ILDASM you can see that there is a difference in the Manifest (look for "subsystem").</p> <p>In a Winforms application:</p> <pre><code>.subsystem 0x0002 // WINDOWS_GUI </code></pre> <p>In a console application:</p> <pre><code>.subsystem 0x0003 // WINDOWS_CUI </code>...
How to make the "<a href" tag refer to nothing? <p>How to make the "&lt; a href" tag refer to nothing?</p> <p>I use jQuery, I need to make some anchor tags perform no action.</p> <p>I usually write it like this:</p> <pre><code>&lt;a href="#"&gt;link&lt;/a&gt; </code></pre> <p>However this refers to the top of the p...
<p>There are a few less than perfect solutions:</p> <p><strong>1. Link to a fake anchor</strong></p> <pre><code>&lt;a href="#"&gt; </code></pre> <p>Problem: clicking the link jumps back to the top of the page</p> <p><strong>2. Using a tag other than 'a'</strong></p> <p>Use a span tag and use the jquery to handle t...
what is difference btw /MD and /MDD in VisualStudio C++? <p>What is difference betwwen /MD and /MDD( multi threaded debug dll ) in c/c++->code generation </p> <p>propertis of visual studio ....</p>
<p>They specify which runtime to use. Both use mmulti-threaded dynamic (DLL) runtimes, but the /MDD version uses the debug version and also defines the _DEBUG symbol for you. See <a href="http://stackoverflow.com/questions/17903/should-developers-be-specialists-or-generalists">this MSDN page</a> for details.</p>
css float troubleshooting <p>i've got a very simple CSS example detailed below. The .entry class generates a simple box with a 1px black border. the example below, will render "123" within the box and "abc" and "xyz" outside the box because those elements are tagged with float left and right. My goal is to have .b...
<p>Since floats are taken out of the normal flow, their surrounding boxes will collapse. </p> <p>I'll first explain why it is working in IE. You have given it "layout" by setting a width or height on each element. It's <code>width</code> in this case. See <a href="http://www.satzansatz.de/cssd/onhavinglayout.html" rel...
Can the C main() function be static? <p>Can the <code>main()</code> function be declared <code>static</code> in a C program? If so then what is the use of it?</p> <p>Is it possible if I use assembly code and call the <code>static main()</code> function myself (consider embedded programs)?</p>
<p>No. The C spec actually says somewhere in it (I read the spec, believe it or not) that the main function cannot be static.</p> <p>The reason for this is that static means "don't let anything outside this source file use this object". The benefit is that it protects against name collisions in C when you go to link...
Portability of open(...O_DIRECT) in C? <p>In C file I/O, the <code>O_DIRECT</code> flag can be used to minimize cache effects for a file being <code>open()</code>ed. I understand that this is not a POSIX feature, has been present in the Linux kernel since version 2.4.10, and that Linus is opposed to the interface in g...
<p>For windows, you should look at CreateFile function, with flags FILE_FLAG_NO_BUFFERING and FILE_FLAG_WRITE_THROUGH. ( <a href="http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/aa363858(VS.85).aspx</a> ). But then you'll have to use windows functions...
How to Cache InputStream for Multiple Use <p>I have an InputStream of a file and i use apache poi components to read from it like this:</p> <pre><code>POIFSFileSystem fileSystem = new POIFSFileSystem(inputStream); </code></pre> <p>The problem is that i need to use the same stream multiple times and the POIFSFileSyste...
<p>Try BufferedInputStream, which adds mark and reset functionality to another input stream, and just override its close method:</p> <pre><code>public class UnclosableBufferedInputStream extends BufferedInputStream { public UnclosableBufferedInputStream(InputStream in) { super(in); super.mark(Integer.MA...
MS MVC login widget <p><strong>Context</strong><br /> In <em>LAYOUT</em>, i got 2 input fields and submit button.<br /> If user authentication is successfully, i want to redirect him somewhere, if not - i want page to be updated with some validation text. </p> <p><strong>Problems</strong> Cause widget is supposed to ...
<p>I think you would want to submit the login asynchronously with ajax. Since it won't do a full postback on submit, the page state should stay the same if the login fails. If the authentication is successful you could just redirect to wherever you want to send them.</p>
How to expand and collapse parts of NSSplitView programatically? <p>I want to replace <code>RBSplitView</code> with <code>NSSplitView</code> in my existing project. The application is now leopard only and I would like to replace <code>RBSplitView</code> with the <em>new</em> <code>NSSplitView</code> shipped with Leopar...
<p>Simply hide the subview you want to collapse, e.g.</p> <pre><code>[aSubViewToCollapse setHidden:YES]; </code></pre> <p>You might also want to implement the delegate method -(BOOL)splitView:shouldHideDividerAtIndex: to return YES to hide the divider when a collapsed.</p>
Showing/Hiding div CollapsePanel after ClientScript.RegisterClientScriptBlock <p>This question is an extension to <a href="http://stackoverflow.com/questions/920384/showing-hiding-div">http://stackoverflow.com/questions/920384/showing-hiding-div</a>.</p> <p>As stated, I found a workaround to prevent a Collapse panel f...
<p>If I remember right the RegisterClientScriptBlock injects its JS into the head. Could be that its injecting it above your code. Now that could mean a couple of things depending on what that injected code is doing.</p> <ul> <li>Is it referencing any elements straight away (remember this is in the head so you won't b...
python queue & multiprocessing queue: how they behave? <p>This sample code works (I can write something in the file):</p> <pre><code>from multiprocessing import Process, Queue queue = Queue() def _printer(self, queue): queue.put("hello world!!") def _cmdDisp(self, queue): f = file("Cmd.log", "w") print &...
<p>For your second example, you already gave the explanation yourself---<code>Queue</code> is a module, which cannot be called.</p> <p>For the third example: I assume that you use <code>Queue.Queue</code> together with <code>multiprocessing</code>. A <code>Queue.Queue</code> will not be shared between processes. If ...
Could not load file or assembly System.EnterpriseServices <p>I'm trying to read up on asp.net mvc, I have never used asp.net before but are familiar with regular c# development. <br></p> <p>Freshly installed, fully patched Windows XP Home.<br> Freshly installed updated to SP1 Visual Studio 2008 Pro.<br> <p> Started a ...
<p>Found the answer, I added it to the GAC with gacutil.</p> <blockquote> <p>C:\WINDOWS>"C:\Program\Microsoft SDKs\Windows\v6.0A\bin\gacutil.exe" /i Microsoft.NET/Framework/v2.0.50727/System.EnterpriseServices.dll</p> </blockquote>
how to reference XSD Schema location while parsing XML Doc via SAX Xerces? <p>how to reference XSD Schema location while parsing XML via SAX Xerces? </p> <p>&lt; ?xml version="1.0" encoding="ISO-8859-1"?> &lt; com.firma xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"</p> <pre><code>&gt; &lt; !-- xsi:no...
<p>include the schema in your jar and load it using getResourceAsStream in the following way</p> <pre><code>reader.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource", new InputSource(getClass().getResourceAsStream(xsdLocation))); </code></pre>
Generating MHTML from HTML <p>I'm looking for a way of generating mhtml from a page in my asp.net web app.</p> <p>I've seen this website and played with the code but i don't really want to use interop.cdo and interop.adodb. <a href="http://www.codeproject.com/KB/aspnet/aspnethtml2mht.aspx" rel="nofollow">http://www.co...
<p>This is the ticket; Does 90% of what i need.</p> <p><a href="http://www.codeproject.com/KB/files/MhtBuilder.aspx" rel="nofollow">http://www.codeproject.com/KB/files/MhtBuilder.aspx</a></p> <p>Looks like it was written by <a href="http://stackoverflow.com/users/1/jeff-atwood">this</a> man</p>
How can I see a page error in jMeter? <p>How can I see a Error in jMeter?<br> In other words if a test fail how is possible to see the page returned with error ?</p>
<p>In our application we have a custom error page displaying a certain message. In JMeter we added a <strong>Response Assertion</strong> to the TestPlan (<em>Add > Assertions > Response Assertion</em>). We configured this assertion to have a pattern checking for this message (e.g. check for "error occurred" or whatever...
Parsing Media RSS using XMLReader <pre><code>&lt;rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/"&gt; &lt;channel&gt; &lt;title&gt;Title of RSS feed&lt;/title&gt; &lt;link&gt;http://www.google.com&lt;/link&gt; &lt;description&gt;Details about the feed&lt;/description&gt; ...
<p>xtian,</p> <p>If memory usage is a concern of yours, I would recommend staying away from DOM/XPath as it requires that the whole file be read into memory first. XMLReader only reads in a chunk at a time (probably 8K as that seems to be the standard PHP Chunk Size).</p> <p>I have re-written what you originally post...
Firefox extension: how can I pass user selected text as variable to Javascript? <p>When writning very simple and basic extension for firefox, what event (I don't know if this is the right word) should I use if I want to process user selected text?</p> <p>To be more precise: when user selects some text (for example whe...
<p>See here for getting the current selection: <a href="http://www.codetoad.com/javascript_get_selected_text.asp" rel="nofollow">http://www.codetoad.com/javascript_get_selected_text.asp</a></p> <p>This document describes how to notice that the user might have selected something: <a href="http://www.java2s.com/Code/Jav...
Cocoa Touch App Architecture - MVC controller? <p>I am quite new to Cocoa and to iPhone programming.</p> <p>I am using the Xcode <em>Utility Application</em> template to implement a simple app that has:</p> <ul> <li>a view with a <strong>text field</strong> to collect a username </li> <li>a view with a <strong>connec...
<p><strong>Updating my answer based on comment:</strong></p> <p>It's in most cases ok to have state in your controller. Like an array or an instance of whatever modelobject you are writing an application for.</p> <p>I would keep the model object clean of any networking code and put that in the Controller instead thou...
Remote Locking <p>I am designing a remote threading primitive protocol. Currently we only needs mutexes (i.e. Monitors) and semaphores. The main idea is that there doesn't need to be a central authority - the primitives should be orchestrated amongst the peers that are interested in them.</p> <p>I have bashed a few id...
<p>Distributed mutexes are tricky structures. You need to handle all sort of weird conditions that do not exist with a single machine based implementation. In particular you need to handle situations where agents lose comms with the group and still hold a lock on a shared resource. Additional to that scenario there a...
ObjectDataSource Insert throws an Error (using Business Objects) <p><strong>Quick overview</strong></p> <ul> <li>Trying to insert a Business Object using ObjectDataSource (on a GridView)</li> <li>Get the following Error</li> </ul> <p>ObjectDataSource 'ObjectDataSource1' has no values to insert. Check that the 'values...
<p>The following does actually work.</p> <pre><code>IDataSource ds = ObjectDataSource1; DataSourceView view = ds.GetView(InsertGrid1.DataMember); Dictionary&lt;string, string&gt; values = new Dictionary&lt;string, string&gt;(); values.Add("Name", ""); //values.Add("Age", "0"); view.Inse...
How to resolve the following linker errors in Visual Studio? <p>Here is My scenario. I have a project which contains 30 subprojects. In one of the projects I have used CLR (common language runtime) so I modified its runtime with /mdd (multi threaded debug DLL).</p> <p>Individually all the projects are built successful...
<p>LIBCMTD is the debug version of the static multi-threaded C runtime library. MSVCR80D is a debug version of the DLL-based multi-threaded C runtime library. Some of your sub-projects are calling for one, some the other. It's a Microsoft mess, but you have to deal with it. Pick one, say, Multi-threaded debug DLL, ...
Regular Expression String followed by digits in Javascript <p>I am getting myArray as null. Can anyone help me?</p> <pre><code>myRe = new RegExp ("[A-Z]+(\\d+)"); myArray = myRe.exec("book1"); alert(myArray.length); </code></pre>
<p>Your regular expression is case sensitive; try:</p> <pre><code>myRe = new RegExp ("[A-Za-z]+(\\d+)"); </code></pre> <p>or:</p> <pre><code>myRe = new RegExp ("[A-Z]+(\\d+)", "i"); </code></pre>
Why is SQLite not incrementing my primary key? <p>Here is my table,</p> <pre><code>sqlStmt = [ [ NSString stringWithFormat:@"Create Table %@ (recordNo INTEGER PRIMARY KEY AUTOINCREMENT, noOfPlayer INTEGER, smallBlindAmt INTEGER, bigBlindAmt INTEGER , startingChips INTEGER, roundTimer INTEGER) " , SETTINGS_TABLE ] S...
<p>Don't explicitly set the primary key in your insert statement, let the system assign it using auto-increment.</p> <p>Change the insert statement to:</p> <pre><code>insert into %@ (noOfPlayer, smallBlindAmt, bigBlindAmt, startingChips, roundTimer) values (%d, %d ,%d ,%d ,%d) </code></pre>
Querying multiple databases on SQL Server <p>is it possible to create a view that selects from</p> <ol> <li>multiple tables</li> <li>in different databases</li> <li>on different servers</li> <li>using different login credentials</li> </ol> <p>Can someone point to any online examples. </p> <p>Or is there any way I ca...
<p>Yes, you'll want to use something called a linked server:</p> <p><a href="http://www.databasejournal.com/features/mssql/article.php/3085211/Linked-Servers-on-MS-SQL-Part-1.htm">http://www.databasejournal.com/features/mssql/article.php/3085211/Linked-Servers-on-MS-SQL-Part-1.htm</a></p> <p>You'll need to be databas...
Windows control returns different values when accessed different ways <p>I have a <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.control.aspx" rel="nofollow">control</a>, hosted on <a href="http://msdn.microsoft.com/en-us/library/system.componentmodel.design.designsurface.aspx" rel="nofollow">Des...
<p>Well it might depend on the object. and how you got your type descriptor. E.g. it could be a custom descriptor which could return what ever. If that's the case you can give the GetTypedescriptor method information of not to use custom typedescriptors. (sry for not posting the actual code but I don't have an IDE avai...
How to use AttachedCommandBehavior in a new project? <p>I've downloaded <a href="http://marlongrech.wordpress.com/2008/12/13/attachedcommandbehavior-v2-aka-acb/" rel="nofollow">this AttachedCommandProject</a> and ran it and it <strong>works well</strong>, enables me to e.g. put a MouseDown command on a Border element a...
<p>Did the source files that contain <code>CommandBehavior</code> get copied into the new project? If so, I would check the namespace they are in. It could be that the namespace is different in this project. The line: { <code>xmlns:c="clr-namespace:MvvmWithAttachedBehaviors.Commands"</code> } is setting the prefix "c" ...
Flash dynamic input box @ and " symbol issue <p>Having a very strange issue with a few creative banners. On some computers when you type in an input box for an email field instead of the @ symbol you get the " symbol. It is almost as though the keyboard has the wrong language set. This isn't the case though, they are a...
<p>Also watch out if you are using wmode='transparent' messes up non-English keyboards.</p>
Is it less expensive to dc->DrawLine() a bunch of times or one blit? <p>I have a control that has a grid. Is it more expensive to draw the horizontal and vertical lines that make up the grid each time using the draw line function in the device context class or would it be faster to draw the grid once to a memory device...
<p>It depends on many things, including how many lines you have, how big the grid is, and what video card the user has.</p> <p>Your best bet is to just do one of them (probably DrawLine, which my gut feeling says will be both simpler and faster) then test it on a slow machine. If it works and it's fast enough, don't ...
Remove characters from NSString? <pre><code>NSString *myString = @"A B C D E F G"; </code></pre> <p>I want to remove the spaces, so the new string would be "ABCDEFG".</p>
<p>You could use:</p> <pre><code>NSString *stringWithoutSpaces = [myString stringByReplacingOccurrencesOfString:@" " withString:@""]; </code></pre>
Creating link in dataGrid <pre><code> &lt;mx:DataGrid visible="false" id="dgPosts" width="365" click="" dataProvider="{sendReq.lastResult.loginsuccess.name}" x="140.5" y="169"&gt; &lt;mx:columns&gt; &lt;mx:DataGridColumn headerText="name" dataField="name"/&gt; &lt;/mx:columns&gt; ...
<p>As per <a href="http://livedocs.adobe.com/flex/3/html/help.html?content=dpcontrols%5F7.html" rel="nofollow">this</a> page, create an <code>itemClick</code> event handler on your DataGrid. In the function specify as the click handler, get the data you need from the <a href="http://livedocs.adobe.com/flex/3/langref/mx...
Cygwin debugging error. <p>I have an executable built in Windows. I want to pass that .exe to an output file built by Cygwin (DOS version). It is going well up to a point, after which it is showing the following error related to Cygwin dll files (ACL check) .</p> <pre><code>Program received signal SIGSEGV, Segmentatio...
<p>Check your code. Since you're already using gdb, <code>bt full</code> shall be your friend. You're possibly passing bad parameters such as invalid pointers to some system call.</p> <p>It's likely it's not <code>aclcheck</code> where the segfault itself occurs. Cygwin DLLs are normally not shipped with debugging sym...
Compiling GNU software on HP-UX. yy* symbols problem <p>When trying to compile GNU software on HP-UX (binutils for example) I'm getting error meggages about unsatisfied symbols yyfnd, yyextra, yytextuc, yyolsp ...</p> <p>Some software can't be compiled using HP-UX own lex so i've included byacc and flex executables in...
<p>Have you tried building with <code>-lfl</code> and/or <code>-ly</code>?</p>