instruction
stringlengths
21
27.8k
chosen
stringlengths
18
28.2k
rejected
stringlengths
18
33.6k
__index_level_0__
int64
0
50k
<p>I want to use data binding with an XML document to populate a simple form that shows details about a list of people. I've got it all set up and working like so right now:</p> <pre><code>&lt;Window x:Class="DataBindingSample.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://s...
<p>You could use local names in your XPath queries like this: </p> <pre><code> &lt;TextBox Name="nameText"&gt; &lt;TextBox.Text&gt; &lt;Binding XPath="*[local-name()='Name']" /&gt; &lt;/TextBox.Text&gt; &lt;/TextBox&gt; </code></pre>
<p>You could use local names in your XPath queries like this: </p> <pre><code> &lt;TextBox Name="nameText"&gt; &lt;TextBox.Text&gt; &lt;Binding XPath="*[local-name()='Name']" /&gt; &lt;/TextBox.Text&gt; &lt;/TextBox&gt; </code></pre>
23,063
<p>Any advice on how to migrate an existing Delphi 7 business application to .NET 2.0 in Visual Studio 2005? </p> <p>Visual Studio 2005 has already been purchased, the company wants to move away from the Borland/Codegear tools.</p> <p>The application is a single client server executable, utilizing a number of 3rd pa...
<p>I worked at a company that was migrating from Delphi to WPF/.Net circa 2007. We tried a piece by piece approach. It was painful. We were always running into subtle bugs in the interop. Calling from Delphi to WPF or Winforms and back is painful. If the various UI controls and windows of your application call on ...
<p>Only you can really decide if a piece by piece approach is possible. For example can the application be divided up easily or are all the forms too strongly coupled with all the business logic. Technically it's possible but all depends on how the code base is structured really.</p>
25,384
<p>I have to read CSV files line by line which can be 10 to 20 Meg. <code>file()</code> is useless and I have to find the quickest way.</p> <p>I have tried with <code>fgets()</code>, which runs fine, but I don't know if it reads a small block each time I call it, or if it caches a bigger one and optimize file I/O. Do I...
<p>You ought to be using <a href="http://www.php.net/fgetcsv" rel="nofollow noreferrer">fgetcsv()</a> if possible.</p> <p>Otherwise, there is always fgets().</p>
<p>You should have a look at <code>fgetcsv()</code>, it automatically parses the coma seperated line into an array. </p> <p>As for the runtime efficiency, I have no idea. You will have to run a quick test, preferably with a file of the size you are expecting to handle later on. But I would be surprised if the fget??? ...
33,217
<p>I'm trying to auto-generate a plain text email with a trademark symbol in it. I've tried everything I can think of but it's still not going through.</p> <pre><code>&lt;cfmail from="#x#" to="#y#" subject="test" charset="UTF-8"&gt; ™ &amp;trade; #Chr(153)# &lt;/cfmail&gt; </code></pre>
<p>This is an encoding issue.</p> <p>You state the mail is encoded as UTF-8, but <code>Chr(153)</code> does not return a trademark symbol in Unicode. It does in Windows-1252, but <code>Chr()</code> works with Unicode code points.</p> <p>Use <code>Chr(8482)</code> to nail it to the <a href="http://www.fileformat.info/...
<p>I think that this is not so much an issue with CFMail but rather an issue with email clients displaying the characters codes in plain text messages literally rather than converting them to their corresponding characters.</p> <p>Using CFMail in HTML mode should provide the result you're looking for.</p>
35,732
<p>I need to create a cherrypy main page that has a login area. I want the login area to be secure, but not the rest of the page. How can I do this in CherryPy?</p> <p>Ideally, any suggestions will be compatible with <a href="http://web.archive.org/web/20170210040849/http://tools.cherrypy.org:80/wiki/AuthenticationA...
<p>Frankly - tying data (the position in your data vector) to the presentation of the data in the list control (the position in the list ctrl) is something I would stay away from.</p> <p>In MFC each control has a "Data" DWORD member variable - when coding in MFC I Always called "SetItemData" for each item added and pa...
<p>To use a virtual list control, set the LVS_OWNERDATA style. You then need to handle the LVN_GETDISPINFO notification message (which is sent via WM_NOTIFY).</p> <p>If you do this, you are entirely responsible for the data, including the order in which it is shown. Therefore it is up to you to handle sorting and so f...
22,695
<p>Consider the following SQL:</p> <pre> BEGIN TRAN SET TRANSACTION ISOLATION LEVEL READ COMMITTED INSERT Bands ( Name ) SELECT 'Depeche Mode' UNION SELECT 'Arcade Fire' -- I've indented the inner transaction to make it clearer. BEGIN TRAN SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED SELE...
<p>I don't think that is correct.</p> <p>Refer to the remarks here: <a href="http://msdn.microsoft.com/en-us/library/ms173763(SQL.90).aspx" rel="noreferrer">Set Transaction</a></p> <blockquote> <p>Only one of the isolation level options can be set at a time, and it remains set for that connection until it is...
<p>I don't think that is correct.</p> <p>Refer to the remarks here: <a href="http://msdn.microsoft.com/en-us/library/ms173763(SQL.90).aspx" rel="noreferrer">Set Transaction</a></p> <blockquote> <p>Only one of the isolation level options can be set at a time, and it remains set for that connection until it is...
27,590
<p>Does the functional spec help or hinder your expectations? Do programmers who practice the waterfall methodology, are they open to functional specs? I'm a web designer/developer working with a team of 5 programmers and would like to write a functional spec to explain what we need, so that when I begin my work - I kn...
<p>I won't start any freelance project until I've got a design spec and functional spec written up and signed off. There's too much room for rogue clients to nickel and dime you to death if you don't have it. The functional spec allows you to stay on target/focused and gives you a natural check list to work to.</p> ...
<p>I have seen and written many specs, some were very good, most weren't. The main thing that they all had in common is that they were never followed. They all had cobwebs on them by the 3rd day of coding.</p> <p>Write the spec if you want, the best time to do it is at the end of the project. It will be useless for de...
49,967
<p>The Visual Studio compiler does not seem to warn on signed/unsigned assignments, only on comparisons. For example the code below will generate a warning on the if statement but not the initial assignments.</p> <p>Is there anyway to make it catch these? I'm already at W4 but thought (hoped) there may be another sett...
<p>You need to enable warning 4365 to catch the assignment.</p> <p>That might be tricky - you need to enable ALL warnings - use /Wall which enables lots of warnings, so you may have some trouble seeing the warning occur, but it does.</p>
<p>@quamrana:</p> <p>There must be something beyond the /Wall option to enable warning 4365:</p> <pre><code>C:\Temp&gt;cl /Wall /c foo.c Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved. foo.c foo.c(6) : warning C4018: '&lt;' : ...
10,101
<p>I'm developing an algorithm to parse a number out of a series of short-ish strings. These strings are somewhat regular, but there's a few different general forms and several exceptions. I'm trying to build a set of regexes that will handle the various forms and exceptions; I'll apply them one after another to see if...
<pre><code>(\d+)\s+(\(.*?\))?\s?Z </code></pre> <p>Note the escaped parentheses, and the <code>?</code> (zero or once) quantifiers. Any of the groups you don't want to capture can be (<code>?:</code> non-capture groups).</p> <p>I agree about the spaces. <code>\s</code> is a better option there. I also changed the qua...
<p>Try this:</p> <pre><code>X (\(Y\))? Z </code></pre>
29,866
<p>One of the "best practice" is accessing data via stored procedures. I understand why is this scenario good. My motivation is split database and application logic ( the tables can me changed, if the behaviour of stored procedures are same ), defence for SQL injection ( users can not execute "select * from some_tables...
<p>First: for your delete routine, your where clause should only include the primary key.</p> <p>Second: for your update routine, do not try to optimize before you have working code. In fact, do not try to optimize until you can profile your application and see where the bottlenecks are. I can tell you for sure that u...
<p>In SQL 2005, it supports nvarchar(max), which has a limit of 2G, but virtually accepting all string operations upon normal nvarchar. You may want to test if this can fit into what you need in the first approach.</p>
30,711
<p>I need to set the fetch mode on my hibernate mappings to be eager in some cases, and lazy in others. I have my default (set through the hbm file) as lazy="true". How do I override this setting in code? MyClass has a set defined of type MyClass2 for which I want to set the FetchMode to EAGER.</p> <p>Currently, I hav...
<p>You could try something like this: (code off the top of my head)</p> <pre><code>Criteria crit = session.createCriteria(MyClass.class); crit.add(Restrictions.eq("id", myClassId)); crit.setFetchMode("myProperty", FetchMode.EAGER); MyClass myThingy = (MyClass)crit.uniqueResult(); </code></pre> <p>I believe that Fetch...
<p>There is a static <code>initialize(Object)</code> method in the <code>Hibernate</code> main class. You could use that to force loading of your collection:</p> <pre><code>MyClass c = (MyClass)session.get(MyClass.class, myClassID); Hibernate.initialize(c.getMySetOfMyClass2()); </code></pre> <p>However, a default val...
30,158
<p>We make heavy use of Velocity in our web application. While it is easy to debug the Java side of things and ensure the Velocity Context is populated correctly, it would be extremely valuable to be able to step through the parsing of the VTL on the merge step, set breakpoints, etc. Are there any tools or IDEs/IDE p...
<p>I had not found any yet. The closest I can get is to <em>hack</em> a logging framework to print out information that you want.</p> <p>What you do is:</p> <ol> <li>create an class with logging method which return boolean value.</li> <li>Inject the object into velocity context</li> <li>From inside velocity template ...
<p>There is no step through, nor some kind of built in "print variables". This is something that bothers me too, but using velocity was a decision that was made before I joined our project...</p>
13,202
<p>Say you have a large PHP project and suddenly, when attempting to run it, you just end up with a blank page. The script terminates and you want to find exactly where that is with as little effort as possible.</p> <p>Is there a tool/program/command/IDE that can, on PHP script termination, tell you the location of a ...
<p>I use the following code and need no special debugging environment. Note that this might take really long; you can set the ticks count higher - that makes it faster, but blurry.</p> <pre><code>function shutdown_find_exit() { var_dump($GLOBALS['dbg_stack']); } register_shutdown_function('shutdown_find_exit'); fu...
<pre><code>grep -n die filename </code></pre>
26,673
<p>In a project of mine the SQL statements that are executed against a SQL Server are failing for some unknown reason. Some of the code is already used in production so debugging it is not an easy task. Therefore I need a way to see in the database itself what SQL statements are used, as the statements are generated at...
<p>Seeing how you use the Management Studio Express, I will assume you don't have access to the MSSQL 2005 client tools. If you do, install those, because it includes the SQL profiler which does exactly what you want (and more!). For more info about that one, see <a href="http://msdn.microsoft.com/en-us/library/ms18109...
<p>Best way is to fire up profiler, start a trace, save the trace and then rerun the statements</p>
6,960
<p>I want a nice 2 column layout using CSS float's.</p> <p>Column#1 160 px Column#2 100% (i.e. the rest of the space).</p> <p>I want to place the Col#2's div first, so my layout looks like:</p> <pre><code>&lt;div id="header"&gt;&lt;/div&gt; &lt;div id="content"&gt; &lt;div id="col2"&gt;&lt;/div&gt; &lt;div...
<p>Neither of the above will work.</p> <pre class="lang-css prettyprint-override"><code>div#col2 { width: 160px; float: left; position: relative; } div#col1 { width:100%; margin-left: 160px; } </code></pre> <p>That's assuming that Column 2 should appear as a left sidebar, with col 1 as the main c...
<p>You should use the "float" CSS property for doing this. Check out for a <a href="http://www.456bereastreet.com/lab/developing_with_web_standards/csslayout/2-col/" rel="nofollow noreferrer">simple implementation here</a>. And you can find a bit more detailed <a href="http://www.lissaexplains.com/css3.shtml" rel="nofo...
17,413
<p>The software development team in my organization (that develops API's - middleware) is gearing to adopt atleast one best practice at a time. The following are on the list:</p> <p>Unit Testing (in its real sense), Automated unit testing, Test Driven Design &amp; Development, Static code analysis, Continuous integrat...
<p>"a study that shows which 'best' practices when adopted have a better ROI, and improves software quality faster"</p> <p>Wouldn't that be great! If there was such a thing, we'd all be doing it, and you'd simply read it in DDJ.</p> <p>Since there isn't, you have to make a painful judgement.</p> <p>There is no "do X...
<p>There are some references for ROI with respect to unit testing and TDD. See my response to this related question; <a href="https://stackoverflow.com/questions/237000/is-there-hard-evidence-of-the-roi-of-unit-testing#237067">Is there hard evidence of the ROI of unit testing?</a>.</p>
41,778
<pre><code>/* I start with this: */ &lt;Report&gt; &lt;prop1&gt;4&lt;/prop1&gt; &lt;prop2&gt;2255&lt;/prop2&gt; &lt;prop3&gt;true&lt;/prop3&gt; &lt;prop4&gt;false&lt;/prop4&gt; &lt;prop5&gt;true&lt;/prop5&gt; &lt;/Report&gt; /* I want this result (change the value of node "prop5"): */ &lt;Re...
<p>This seems to be doing exactly what you want. It's just your code with some typos fixed.</p> <pre><code> var reportXML:XML = &lt;Report&gt; &lt;prop1&gt;4&lt;/prop1&gt; &lt;prop2&gt;2255&lt;/prop2&gt; &lt;prop3&gt;true&lt;/prop3&gt; ...
<p>Using E4X syntax in ActionScript 3 I guess that would be something like:</p> <pre><code>report.prop5[0] = false; </code></pre>
37,838
<p>I'm researching and experimenting more with Groovy and I'm trying to wrap my mind around the pros and cons of implementing things in Groovy that I can't/don't do in Java. Dynamic programming is still just a concept to me since I've been deeply steeped static and strongly typed languages. </p> <p>Groovy gives me t...
<p>A lot of the comments for duck typing don't really substantiate the claims. Not "having to worry" about a type is not sustainable for maintenance or making an application extendable. I've really had a good opportunity to see Grails in action over my last contract and its quite funny to watch really. Everyone is h...
<p>It's not that duck typing is more productive than static typing as much as it is simply different. With static typing you always have to worry that your data is the correct type and in Java it shows up through casting to the right type. With duck typing the type doesn't matter as long as it has the right method, so ...
7,031
<p>You are given a heap of code in your favorite language which combines to form a rather complicated application. It runs rather slowly, and your boss has asked you to optimize it. <strong>What are the steps you follow to most efficiently optimize the code?</strong> </p> <p>What strategies have you found to be <stron...
<p>Profile before attempting any optimisation. </p> <p>9 times out of 10, the time won't be consumed where you might guess it is.</p> <p>The usual unsuccessful strategy is micro-optimisation, when what is actually required is the appropriate algorithm.</p> <p>Obligatory Donald Knuth quote:</p> <blockquote> <p><em...
<p>Be sure to have enough unit test to make sure any optimization you will make will not break anything</p> <p>Make sure to qualify your <em>execution environment</em>. Sometime, a simple change in the execution options can go a long way.</p> <p>Then and only then, start analyzing the code.</p> <p>The rewrite decisi...
42,118
<p>I've got a database with three tables: Books (with book details, PK is CopyID), Keywords (list of keywords, PK is ID) and KeywordsLink which is the many-many link table between Books and Keywords with the fields ID, BookID and KeywordID.</p> <p>I'm trying to make an advanced search form in my app where you can sear...
<p>You need to join the 3 tables together, which gives you a tablular resultset. You can then check any columns you like, and make sure you get <em>distinct</em> results (i.e. no duplicates).</p> <p>Like this:</p> <pre><code>select distinct b.* from books b left join keywordslink kl on kl.bookid = b.bookid left join...
<p>You must also limit the product of the join by specifying something like</p> <blockquote> <pre>Books.FK1 = Keywords.FK1 and Books.FK2 = Keywordslink.FK2 and Keywords.FK3 = Keywordslink.FK3</pre> </blockquote> <p>But i don't know your exact data model so your solution may be slightly different.</p>
39,931
<p>I have a <code>SqlCommand</code> that I want to call <code>Prepare()</code> on whose <code>CommandType = Text</code> (it <strong>cannot</strong> be a stored procedure).</p> <p>In order to do this, I need to set the <code>Size</code> attribute on the parameters to be non-zero otherwise an exception is thrown. Are the...
<p>I think the only potential negative side effect of doing something like that would be the cost of memory allocation for the parameters.</p> <p>Since you're calling 'Prepare()' I'm guessing you're planning to use the SqlCommand multiple times against the same SqlConnection which suggests a discrete section of code w...
<p>This is the way the framework does it if you use the SqlParameter constructor that just takes a parameter name and a value. There might be a slight inefficiency on the client side, but I have never noticed a difference in query performance.</p>
16,931
<p>Why do concrete 3D printers lay the concrete in a zigzag shape? I know pouring it in a straight line makes it unstable, but the zigzag shape reduces the contact of the top layer to the layer below. What is the advantage?</p>
<p>According to <a href="https://github.com/MarlinFirmware/Configurations/pull/633#issuecomment-995206382" rel="nofollow noreferrer">'The-EG' comment</a> in this GitHub issue, <a href="https://github.com/MarlinFirmware/Configurations/pull/633" rel="nofollow noreferrer">Add Creality Ender 2 Pro config #633</a>, you can ...
<p>MS35775 appears to be TMC208 compatible. You can find the data sheet on relmon.com here is the overview:</p> <ul> <li>2-Phase stepping motor peak current of 2A</li> <li>Step / dir interface 2, 4, 8, 16, or 32 microstep</li> <li>Internal 256 micro steps</li> <li>Quiet mode</li> <li>Fast mode</li> <li>HS Rdson 0.29 Ω...
2,072
<p>I am looking for a regex that will match a string that starts with one substring and does not end with a certain substring.</p> <p>Example:</p> <pre><code>// Updated to be correct, thanks @Apocalisp ^foo.*(?&lt;!bar)$ </code></pre> <p>Should match anything that starts with "foo" and doesn't end with "bar". I kno...
<p>I think in this case you want <strong>negative lookbehind</strong>, like so:</p> <pre><code>foo.*(?&lt;!bar) </code></pre>
<p>As other commenters said, you need a negative lookahead. In Java you can use this pattern:</p> <pre><code>"^first_string(?!.?second_string)\\z" </code></pre> <ul> <li>^ - ensures that string starts with first_string</li> <li>\z - ensures that string ends with second_string</li> <li>(?!.?second_string) - means that...
6,462
<p>I'm attempting to create a dataset based on the properties of an object. For example, I have an instance of a Person class with properties including ID, Forename, Surname, DOB etc. Using reflection, I'm adding columns to a new dataset based on the object properties:</p> <pre><code>For Each pi As PropertyInfo In per...
<p>Here's your answer, in VB. This may be overkill for your purposes, but it also might be useful to some other folks.</p> <p>First off, here's the code to find out if you're dealing with a Nullable type:</p> <pre><code>Private Function IsNullableType(ByVal myType As Type) As Boolean Return (myType.IsGenericType)...
<p>@Mendelt Siebenga: You can only call GetType on the value property if the variable is not set to null; otherwise, you'll get an exception.</p> <p>What you want to do is use the "GetValueOrDefault" property and call GetType on that, since you are guaranteed it will not be null. Example:</p> <pre><code>Dim i As Null...
5,711
<p>In MFC, a CListBox has a "disable no scroll" property. When you set it to true, the vertical scrollbar is always there, no matter how many items you have. How can I do the same thing with CListCtrl?</p>
<p>To start the discussion.</p> <p>I like the <strong><a href="http://www.codeproject.com/KB/database/Deadlocks4Dummy.aspx" rel="nofollow noreferrer">database / transaction deadlock</a></strong> illustrated to a non-technical person.</p> <p>You have also a lot of good animations on the <strong><a href="http://www.ans...
<p>Do a google search for [insert name of algorithm] and 'applet'. Many academics and other such people have made java applets to demonstrate algorithms working. You can probably find an example for just about any published algorithm.</p>
41,920
<p>I see little functional difference between using a property</p> <pre><code>public readonly property foo as string get return bar end get end property </code></pre> <p>or a function</p> <pre><code>public function foo() as string return bar end function </code></pre> <p>Why would I want to use one form o...
<p>I read an interesting article recently in Visual Studio Magazine that discussed the different between Methods and Properties.</p> <p>Properties are supposed to return a value and the same value each time unless something else is called in between. </p> <p>A Method on the other hand is typically expected to do some...
<p>My view is that if you look at the words - "property" compared to "method". The word "property" implies "this is some value inherent in the object, like color, size, owner... calling a property would imply a relatively simple operation to return that value. Or, if it isn't a read-only property, setting the propert...
31,771
<p>I know this question isn't "directly" programming related, but since I want to be able to be well-prepared on windows-programming when Windows 7 is released, I want to try it out now. But since I don't have two computers, I can't risk to install it as dual-boot in case it screws something up, my experience with dual...
<p>I'd imagine Microsoft VirtualPC would be your best bet.</p>
<p>VMWare is simply amazing....as an option.</p>
33,027
<p>I see in a header that I didn't write myself the following: </p> <pre><code>class MonitorObjectString: public MonitorObject { // some other declarations friend inline bool operator==(MonitorObjectString&amp; lhs, MonitorObjectString&amp; rhs) { return(lhs.fVal==rhs.fVal); } </code></pre> <p>I can't understan...
<pre><code>friend inline bool operator==(MonitorObjectString&amp; lhs, MonitorObjectString&amp; rhs) { return(lhs.fVal==rhs.fVal); } </code></pre> <p>is sometimes called <code>friend definition</code>, because it is a friend declaration that also defines the function. It will define the function as a non-member f...
<p>Grammatically speaking...</p> <p>The <code>friend</code> keyword is still needed to tell the compiler that this function is not a member of a class, <b>EDIT:</b> but instead a non-member function that can see the private members of the class.</p> <hr> <p>However, this could have been implemented more cleanly like...
49,958
<p>I need to find two adjacent repeating digits in a string and replace with a single one. How to do this in Java. Some examples:</p> <p>123345 should be 12345 77433211 should be 74321</p>
<p>Probably a <code>replaceAll("(\\d)\\1+", "$1")</code></p> <ul> <li><code>$</code> plays a special role in a replacing string, designating the first capturing group.</li> <li><code>+</code> allows for replacing as many identical number as possible <code>(\\d)\\1</code> would only replace them by pair: <code>777xx</c...
<p>using a regex:</p> <pre><code>var myString='123345' myString.replace(/([0-9])\1/g,'$1') </code></pre> <p>that will match exactly 2 repeats.</p> <pre><code>'123334'.replace(/([0-9])\1+/g,'$1') </code></pre>
33,136
<h2>Question</h2> <p>I'm wondering how different ExtendScript is from JavaScript? Could I theoretically hire a web developer who has JavaScript savvy to develop it without demanding an excessive amount of learning on their part?</p> <h2>Overview</h2> <p>I'm working on a media database (or a so-called "multimedia lib...
<p>If it's anything like the scripting used for the old Flash IDE, then I think it's just straight javascript/ECMAScript. The only real difference is the APIs you have avaialble. I expect anyone who's good with javascript would be able to pick it up fairly quickly.</p>
<p>If it's anything like the scripting used for the old Flash IDE, then I think it's just straight javascript/ECMAScript. The only real difference is the APIs you have avaialble. I expect anyone who's good with javascript would be able to pick it up fairly quickly.</p>
11,963
<p>I want to write an Add-In for Visual Studio that provides instant search for the solution explorer. So you press a key combination and while you are typing a list first containing all files of the solution explorer gets narrowed down.</p> <p>But how can I get access to the solution explorer using C#? Does anyone ha...
<p><a href="http://jens-schaller.de/sonictools/sonicfilefinder/index.htm" rel="noreferrer">Sonic File Finder</a> it's free</p> <p>When you hit the shortcut you have a search box with autocomplete: <a href="http://jens-schaller.de/files/images/SonicFileFinder/sonicFileFinderToolWindow.png" rel="noreferrer">alt text htt...
<p>Don't forget <a href="http://workspacewhiz.com/" rel="nofollow noreferrer">Workspace Whiz</a> - it's free for non-commercial use. I can't live without it and just bought a licence. It does many other things too...</p> <p><a href="https://i.stack.imgur.com/ZH1Kb.png" rel="nofollow noreferrer"><img src="https://i.sta...
34,600
<p>I can't find much information around the web about it. Has anyone used both eConnect and the Dynamics web services to interact (read/write) with Great Plains. I am looking for the pros and cons of both approaches.</p> <p>This product will be installed and configured on various sites, so ease of configuration is rea...
<p>We have done sites based off of web services for GP 9. Don't worry about IIS, there isn't much you have to worry about with that. The install process is very easy. It did not require me to do any configuration with IIS. Some of the configuration is a little tricky at first, like adding users, and setting up policies...
<p>Use the Great Plains Connector - full info here <a href="http://help.boomi.com/display/BOD/Great+Plains+Connector?showChildren=false" rel="nofollow noreferrer">http://help.boomi.com/display/BOD/Great+Plains+Connector?showChildren=false</a></p> <p>and here for pro-cons/limitations etc.:</p> <p><a href="http://www.a...
21,700
<p>I have the need to display a nested set structure in HTML. I am doing it with the following partial:</p> <pre><code>&lt;ul&lt;%= ' id="tree"' if depth == 0 %&gt;&gt; &lt;% items.each do |item| %&gt; &lt;li id="node_&lt;%= item.id %&gt;"&gt;&lt;a&gt;&lt;%= item.name %&gt;&lt;/a&gt; &lt;% if item.has_children? %&...
<p>I am not sure whether it is best practice but I used similar code for rendering project tree. </p> <p>Faster alternative is to create helper method doing the same job (recursively traversing tree and adding partial strings into result string). It is a little bit PHP style :( but for such a small amount of HTML is i...
<p>Well, you should realize there's a (small) overhead for using partials, so if performance is an issue, you may not want to use them this much. Otherwise I see little problem with using this. </p> <p>However, you might want to use the collection-variant of partials (see "Rendering a collection of partials" <a href="...
31,495
<p>It seems to me that if you are writing in an interpreted language that it must be difficult to sell software, because anyone who buys it can edit it/change it/resell it without much difficulty.</p> <p>How do you get around this? I have a couple of PHP apps that I'm reluctant to sell to people as it seems that it's ...
<p>Hardly anyone sells code. We sell the ability to create, edit, support and understand the code.</p>
<p>With PHP you have the option of using the <a href="http://www.zend.com/en/products/guard/" rel="nofollow noreferrer">Zend Guard</a> for PHP. I believe it compiles the source code in a way similar to what the php interpreter does, so it should also increase performance. Of course the price of $ 600 may be too much fo...
44,218
<p>I have recently started having problems with TortoiseCVS, or more specifically with plink, the SSH application that comes with it. The IP address it tries to connect to can not be changed and is stuck with the old CVS repository's IP. Downloading plink from it's home site and calling from the command line still has ...
<p>Are you sure this is a problem with plink? It sounds to me like you have CVS/Root files lying around that still point to the old cvs ip address. In general, CVS doesn't make changing repositories into a fun process. Since you are using Windows, if you install WinCVS with macros support (Python module loaded) it h...
<p>+1 for PuTTy... been using it for the last decade and never needed anything else!</p>
4,270
<p>As the title says really. Does the virtual keyword cause a performance hit?</p>
<p>First off, in Actionscript you don't need to explicitly mark a method to be overridden as virtual as you do in C#, the compiler will do this for you. This is why the keyword doesn't show up in any docs because it is irrelevant from the developers perspective.</p> <p>To answer your question though, which is whether ...
<p>All methods are virtual in AS3 right now. But my guess is 'virtual' will become enforced in a future version of AS poss. via some compiler option setting.</p>
40,335
<p>Is there a good tutorial on using regular expressions, especially with <a href="http://en.wikipedia.org/wiki/Grep" rel="nofollow noreferrer">grep</a>? I tried googling for some, but most tutorials are too basic and cover things I already know.</p>
<p><a href="http://www.regular-expressions.info/tutorial.html" rel="nofollow noreferrer">Regular-expressions.info has a tutorial section</a>. This site is pretty comprehensive for regular expressions in general, although the emphasis is on support in scripting and programming languages.</p> <p>The <a href="https://rad...
<p><a href="http://cs.senecac.on.ca/~ctyler/regexps/regexps1.pdf" rel="nofollow noreferrer">Here</a> is an introductory article. <a href="http://www.dmoz.org/Computers/Programming/Languages/Regular_Expressions/FAQs,_Help,_and_Tutorials/" rel="nofollow noreferrer">Here</a> are some other tutorials.</p> <p>The definitiv...
43,129
<p>I have made a temperature ⨉ fan speed tower which needed 3x9-1 ChangeAtZ post processing scripts and it took me quite much time to configure them all (and check it twice). Is there a way to save this, so that I wouldn't need to make them all again if something went wrong and I needed to start over or if I wanted to ...
<p>The UK uses 230&nbsp;V mains voltage. The 220&nbsp;V designation is from the past, Europe is now using 230&nbsp;V. You do not have to worry about the frequency.</p> <p>You should place the switch to 220&nbsp;V and plug the cord into the socket. The printer should start immediately booting (cycling) the printer firm...
<p>@Oscar was correct, so long as the switch is set at 220 V, the printer will turn on. I am adding this answer to help anyone else who has a similar problem.</p> <p>I strongly recommend that you buy a multimeter if you have any power supply issues, as this helped me to figure out what was wrong.</p> <p>There were th...
1,552
<p>I'm writing a tool to run a series of integration tests on my product. It will install it and then run a bunch of commands against it to make sure its doing what it is supposed to. I'm exploring different options for how to markup the commands for each test case and wondering if folks had insight to share on this. I...
<p>Go and have a look at the XUnit suite of test tools. This framework was originally designed for Smalltalk by Kent Beck and, I think, Erich Gamma, and it has now been ported to a whole stack of other languages, e.g. <a href="http://cunit.sourceforge.net/" rel="nofollow noreferrer">CUnit</a></p>
<p>You might want to check out <a href="http://www.cpan.org/" rel="nofollow noreferrer">CPAN</a>. It does for Perl scripts exactly what it sounds like your utility will do for your app.</p>
6,324
<p>I love grids - especially the cool third party ones like Devex, C1 etc..</p> <p>Our programmer doesn't think end users can handle them - so he always designs his forms with read-only grids (with read-only classes). Choosing to edit an item in the grid opens up a detail form that allows editing. </p> <p>This app ...
<p>This is mainly a matter of taste, but my preference is in line with your developer's (and Corey's answer, above.) I much prefer a read-only/edit model over a big editable grid, <em>for most applications</em>. But I work a lot in Excel and it would kill me to have to open up a row at a time. Different purposes! I...
<p>If you don't trust your lead developer <em>completely</em>, they shouldn't be your lead developer. </p> <p>Aside: If your lead developer has a degree in Computer Science (or other similar degree), don't call them a "programmer". It's negative to a professional engineer.</p> <p>If you override their decision, they...
38,590
<p>For example, how to avoid writing the 'func_name' twice?</p> <pre><code>#ifndef TEST_FUN # define TEST_FUN func_name # define TEST_FUN_NAME "func_name" #endif </code></pre> <p>I'd like to follow the <a href="http://en.wikipedia.org/wiki/Single_Point_of_Truth" rel="noreferrer">Single Point of Truth</a> rule.</p> ...
<p><a href="https://stackoverflow.com/users/9611/shoosh">He who is Shy</a><sup>*</sup> gave you the germ of an <a href="https://stackoverflow.com/a/195980/15168">answer</a>, but only the germ. The basic technique for converting a value into a string in the C pre-processor is indeed via the '#' operator, but a simple t...
<p><code>#define TEST_FUN_NAME #FUNC_NAME</code></p> <p>see <a href="http://en.wikipedia.org/wiki/C_preprocessor#Indirectly_quoting_macro_arguments" rel="nofollow noreferrer">here</a></p>
23,813
<p>After a long battle with SKR Mini v2, TFT35 and BLTouch and creating the right firmware. I thought I was through it all and ready to start printing again after finally being able to set the Z offset and auto level the bed. My printer has other thoughts. Now my bed temperature will only heat up to 10 °C below the set...
<p>Searching the error message &quot;Heating Failed: Bed Printer Halted, Please Reset&quot; seems to indicate that the bed heater is timing out from not reaching temperature.</p> <ol> <li><p>If you measure the voltage applied to the bed heater before the error message, does the voltage stay at Max.; i.e. 12 V for a 12 ...
<p>I was having the same issue after installing BTT SKR Mini E3 V2 and BLTouch on my Ender 5 Pro.</p> <p>I did two things and my bed heats normally now, but I changed/did both things and can't say which fixed the issue for me.</p> <ul> <li>I noticed the case fan wasn't coming on. I had it plugged into <code>Fan 1</code...
1,836
<p>Our customers application seems to hang with the following stack trace:</p> <pre><code> java.lang.Thread.State: RUNNABLE at java.io.UnixFileSystem.getBooleanAttributes0(Native Method) at java.io.UnixFileSystem.getBooleanAttributes(Unknown Source) at java.io.File.isFile(Unknown Source) at org.tmates...
<p><code>getBooleanAttributes0</code> calls <code>stat</code> (or <code>stat64</code>, if available). If you have the OpenJDK source code, this is listed in file <code>jdk/src/solaris/native/java/io/UnixFileSystem_md.c</code>.</p> <p>So the real question is, why is <code>stat</code> frozen? Is the file being accessed ...
<p>No idea, but the obvious question of which JDK/JRE comes to mind and what others have you tried...</p>
27,780
<p>Say I have two strings,</p> <pre><code>String s1 = "AbBaCca"; String s2 = "bac"; </code></pre> <p>I want to perform a check returning that <code>s2</code> is contained within <code>s1</code>. I can do this with:</p> <pre><code>return s1.contains(s2); </code></pre> <p>I am pretty sure that <code>contains()</code>...
<p>Yes, contains is case sensitive. You can use java.util.regex.Pattern with the CASE_INSENSITIVE flag for case insensitive matching:</p> <pre><code>Pattern.compile(Pattern.quote(wantedStr), Pattern.CASE_INSENSITIVE).matcher(source).find(); </code></pre> <p><strong>EDIT:</strong> If s2 contains regex special charact...
<pre><code>String x="abCd"; System.out.println(Pattern.compile("c",Pattern.CASE_INSENSITIVE).matcher(x).find()); </code></pre>
11,230
<p>There appears to be some debate about "the divide is between wanting an SDK and wanting to know the underlying protocol" (see <a href="http://www.tbray.org/ongoing/When/199x/1999/08/18/BitsOnTheWire" rel="nofollow noreferrer">http://www.tbray.org/ongoing/When/199x/1999/08/18/BitsOnTheWire</a>).</p> <p>I don't reall...
<p>They're not really mutually exclusive. It's more of a continuum, but the development philosophy behind systems tends to gravitate towards one end or the other.</p> <p>Essentially bits on the wire says the communication protocol is simple enough that it can be described to outside developers via some relatively sim...
<p>They don't have to be mutually exclusive, it's just that anyone providing a service will either focus on the SDK or the wire protocol as their public customer-facing promised interface. You could have a service that provided both, and let your customers choose which one to focus on, but that might be a luxury.</p>
40,387
<p>Say you have an eclipse plugin with various views, these views should display data from some OSGi bundle that pushes data to the Views. Rather than have every view communicate with the OSGi bundle, I have an intermediate Facade class that acts as a blackboard for the views and manages communications between the vie...
<p>Choose a buffer size over 8KB. 9000 is typically the largest MTU (maximum transmission unit) size used in even the fastest networks. </p> <p>When you use a buffer larger than the MTU of the connection, the operating system will break it down in to MTU sized pieces as needed, and thus anything you use over the MTU...
<p>You can get buffer size: httpSocket.getReceiveBufferSize(); I highly recommend writing this buffer to RAM in the process of reading. For example: ByteArrayOutputStream memoryFile. and only after filling the buffer write it to disk.</p>
35,779
<p>I have an xml string </p> <pre><code>&lt;grandparent&gt; &lt;parent&gt; &lt;child&gt;dave&lt;/child&gt; &lt;child&gt;laurie&lt;/child&gt; &lt;child&gt;gabrielle&lt;/child&gt; &lt;/parent&gt; &lt;/grandparrent&gt; </code></pre> <p>What I want to get is the data raw xml that's inside the p...
<p>Iterate over the child nodes and build the string manually.</p>
<p>If you are using IXMLDOMElement, then </p> <pre><code>HRESULT getAttribute( BSTR name, VARIANT *value); </code></pre> <p>is the method in which 'name' is attribute name and 'value' is output parameter which will contain value of the attribute in string format.</p>
46,917
<p>Consider the following code snippet</p> <pre><code>private void ProcessFile(string fullPath) { XmlTextReader rdr = new XmlTextReader("file:\\\\" + fullPath); while (rdr.Read()) { //Do something } return; } </code></pre> <p>Now, this functions fine when passed a path like:</p> <p>"C:\Work F...
<p>Try omitting the <code>file:///</code> protocol prefix. It works for me without one. I believe .NET will truncate any part after the <code>#</code> if it believes this to be a URL. This is only a guess based on the error message but it seems logical considering that the part after the <code>#</code> character isn't ...
<p>Why don't you use </p> <p>XmlTextReader rdr = new XmlTextReader(fullPath);</p>
27,256
<p>How do I get the list of open file handles by process id in C#? </p> <p>I'm interested in digging down and getting the file names as well. </p> <p>Looking for the programmatic equivalent of what process explorer does. </p> <p>Most likely this will require interop. </p> <p>Considering adding a bounty on this, the...
<p>Ouch this is going to be hard to do from managed code. </p> <p>There is a <a href="http://www.codeproject.com/KB/shell/OpenedFileFinder.aspx?fid=422864&amp;df=90&amp;mpp=25&amp;noise=3&amp;sort=Position&amp;view=Quick&amp;fr=26&amp;select=2277170" rel="nofollow noreferrer">sample on codeproject</a></p> <p>Most of ...
<p>Perhaps using command line tool:</p> <p>OpenedFilesView v1.50 - View opened/locked files in your system (sharing violation issues) </p> <p><a href="http://www.nirsoft.net/utils/opened_files_view.html" rel="nofollow">http://www.nirsoft.net/utils/opened_files_view.html</a></p>
21,337
<p>We're looking for a Transformation library or engine which can read any input (EDIfact files, CSV, XML, stuff like that. So files (or webservices results) that contain data which must be transformed to a known business object structure.) This data should be transformed this to a existing business object using cust...
<p>If you think that XSLT is too difficult for you, I think you can try LINQ to XML for parsing XML files. It is integrated in the .NET framework, and you can use C# (or, if you use VB.NET 9.0, better because of the XML literals) instead of learning another language. You can integrate it with the existing application w...
<p><a href="http://www.microsoft.com/biztalk/en/us/default.aspx" rel="nofollow noreferrer">Microsoft BizTalk Server</a> does a very good job of this.</p>
8,742
<p>I'd like to setup a build server for unmanaged C++ code developed in Visual Studio 2005. The build server should be able to do the following:</p> <ul> <li>Monitor a Subversion repository for code changes and schedule a build</li> <li>Checkout code from Subversion and run unit tests</li> <li>Provide some sort of rep...
<p>NAnt takes quite a bit of work to build C++ effectively. It really is a .NET build system through and through. We're building our title to four C++ platforms plus a set of .NET tools, and it took a while to bend NAnt to our needs. For example, NAnt's C++ dependency analysis is so broken that we had to write our own....
<p>I've just started using Visual Build Professional and am very impressed, You can download a fully-featured 30 day trial from here:</p> <p><a href="http://www.kinook.com/VBP/" rel="nofollow noreferrer">http://www.kinook.com/VBP/</a></p> <p>SVN is fully supported too.</p>
37,943
<p>my java application has a loading task which requires two server calls which can be parallelized. So I launch a Thread t1 (doing <strong>task1</strong>) and a Thread t2 (for <strong>task2</strong>). I want then to do a specific task, <strong>task3</strong> when both other tasks (1 &amp; 2) are over. Naturally I can'...
<p>You've got several options:</p> <ol> <li>If task3 is on a separate thread AND task1 and task2 threads are exclusive to their tasks (no thread pooling) and finish when the task finish, you can use {T1.join(); T2.join();} to wait for both threads. Pros: Easy. Cons: The situation is rarely that simple.</li> <li>If tas...
<p>Implement a listener interface in your task3, and register it to both task1 &amp; task2. Task1 and Task2 will have to call their listener just before ending. Doing so, you can record in task3 which task has already finished, and when both have finished, you can perform your third task.</p> <p>Of course, if on of yo...
21,935
<p>I want to create a subclass of TabPage that contains some control, and I want to control the layout and properties of those controls through the designer. However, if I open my subclass in the designer, I can't position them like I could on a UserControl. I don't want to have to create a TabPage with an UserContro...
<p>I've had a similar problem in the past.</p> <p>What i did first was switch from inheriting Usercontrol to tabpage like so</p> <p>class UserInterface : UserControl // Do designer bit then change it to </p> <p>class UserInterface : TabPage</p> <p>Second i Just put all my controls and stuff in the usercontrol and d...
<p>I handle this by designing the pages themselves as individual forms, which are then hosted inside tab pages at runtime.</p> <p>How do you put a form inside a <code>TabPage</code>?</p> <pre><code>form.TopLevel = false; form.Parent = tabPage; form.FormBorderStyle = FormBorderStyle.None; // otherwise you get a form w...
31,603
<p>I use <code>serialize</code> in one <code>ActiveRecord</code> model to serialize an <code>Array</code> of simple Hashes into a text database field. I even use the second parameter to coerce deserialization into <code>Array</code>s.</p> <pre><code>class Shop &lt; ActiveRecord::Base serialize : recipients, Array en...
<p>I had the same problem with some serialized fields in one of my Rails 3.1 apps. After a lot of troubleshooting I narrowed it down to a character encoding issue. I wasn't able to reproduce it locally because I was using SQLite, while my production environment was on Postgres.</p> <p>Try applying <code>some_field.for...
<p>This seems like something you should be able to reproduce locally with enough testing. Look through your production db and logs and attempt to use the same data in your local tests.</p> <p>The hashwithindifferentaccess is coming from the controller. Perhaps you are taking data straight from the controller and not m...
19,604
<p>What's the most elegant way of implementing a DropDownList in <code>ASP.NET</code> that is editable without using 3rd party components.</p> <p>As a last resort I will probably try using a <code>TextBox</code> with an <code>AutoCompleteExtender</code> with an image to 'drop down' the list; or a <code>TextBox</code> ...
<h2>One Control on a Page</h2> <p>You can follow <a href="http://www.codeproject.com/KB/aspnet/EditableDropdown_aspx.aspx" rel="nofollow noreferrer"><strike>this simple example for an Editable DropDownlist on Code Project</strike></a> that uses standard ASP.NET TextBox and DropDownList controls combined with some Java...
<p>The 2 solution here did the trick for me. so koodos for Ray.</p> <p>Also you should look into the <a href="http://ajaxcontroltoolkit.codeplex.com/releases/view/43475" rel="nofollow">http://ajaxcontroltoolkit.codeplex.com/releases/view/43475</a>, which is the ajaxcontroltoolkit.</p> <p>I don't believe the version f...
30,972
<p>I am trying to write a console app that simply lists the number of lists at the sharepoint root.</p> <p>I tried doing it by using the following code, but the object SPContext.Current is null. Any ideas of how to get the web object?</p> <pre><code> SPWeb web = SPContext.Current.Site.OpenWeb("http://localhost") ; <...
<pre><code>SPSite spSite = new SPSite("http://myurl"); SPWeb spMySite = spSite.Allwebs["mysite"]; SPWeb spRootsite = spsite.RootWeb; </code></pre> <p>The console app will only run on the server as usual. Also, the url used <a href="http://myurl" rel="nofollow noreferrer">http://myurl</a> can be a url to a page and an ...
<p>There are a couple of other ways you can use SPSite.OpenWeb() as well...</p> <p>If you keep track of the SPWeb object's GUID:</p> <pre><code>site.OpenWeb(webUid); </code></pre> <p>Using a web's server or site relative URL or title, see <a href="http://msdn.microsoft.com/en-us/library/ms474633.aspx" rel="nofollow ...
36,795
<p>I would like to do the following:</p> <p>when a Sales person assigns a custom entity (let's call it 'Primary Expertise') to an Opportunity in MS CRM 4.0, the system would share the Opportunity with the user that is defined as the Owner of the associated 'Primary Expertise' record.</p> <p>I would like to do it auto...
<p>Correct, it is only possible via .NET assembly. However you could (If you using CRM 4) have the workflow change the owner to the owner of the activity and use the share with previous owner option to enable the old owner access to your custom entity?</p>
<p>Try this:</p> <p><a href="http://crm40sharestep.codeplex.com" rel="nofollow noreferrer">http://crm40sharestep.codeplex.com</a></p>
40,522
<p>So, I have a form in VB which is visible except when the program is started silently, in which case the form is still loaded but the interactions are done programmatically. However, in a tiny number of cases I want forms created within the invisible form to be visible. What is the best way to accomplish this, idea...
<p>the last option is preferable; after refactoring there should be no redundant code</p> <p>fiddling with invisible forms is a pretty good indication of the need for refactoring!</p>
<p>I also recommend the last option. What I would do to safely implement with the least amount of changes is as follows.</p> <p>Make a Backup or check everything into your source control and make a branch.</p> <p>Make a new ActiveX DLL Project. I would name it some variant of UI_Controller</p> <p>Note: A new project...
34,004
<p>In few months I start a project in PHP and I am hesitating to do like usual : develop on my Windows Vista 64bits machine. Since I know few things on Linux, I think it can be a good way to learn by working on a Linux distribution.</p> <p><strong>Do you think it's a good idea or not?</strong> I would run a <a href="h...
<p>You should really develop on the same platform where you are going to deploy. I'm not saying it is bad to do differently, but it can save you some pain in the long run. OTOH, you might learn faster about platform differences that way. So, the main question is: do you want to have a production system running ASAP wit...
<p>In my opinion you needn't to develop in a linux distribution. Web Development can be done from any OS. I don't know, why you are programming for the web... as a professional? for your personal homepage? I think, it's enough to get some free webspace running a PHP Server and to upload your files there... it doesn't t...
21,147
<p>I have emailed Entrek and they seem to be asleep.</p> <p>Does anyone else here use Entrek CodeSnitch? If so, have you found a way to use it with Windows Mobile 5, 6, or 6.1 ?</p> <p>I <em>really</em> need to verify my application doesn't have any memory leaks, etc. And CodeSnitch does a great job of it. But onl...
<p>What's not working? Is it a client connectivity issue?</p> <p>The older version used PlatMan for a communications layer, which is problematic from a Visual Studio standpoint (which ships with CoreCon), but if you have any tool installed that has Platman (eVC, Platform Builder) then that should still work fine sinc...
<p>I've used CodeSnitch on windows mobile 5, 6 and 6.1 devices with no problems.</p> <p>Make sure you have the v1.4 installed and applied the v1.4 patch which is referenced <a href="http://www.entrek.com/products/Readme.htm" rel="nofollow noreferrer">here</a>.</p> <p>Like ctackle says, you need an older communication...
47,186
<p>I have an application that loads external SWF files and plays them inside a Adobe Flex / Air application via the <a href="http://livedocs.adobe.com/flex/3/html/controls_15.html" rel="nofollow noreferrer">SWFLoader Flex component</a>. I have been trying to find a way to unload them from a button click event. I have G...
<blockquote> <p>... isn't that a problem with the Flex architecture?</p> </blockquote> <p>Yes it is, and it also affects Flash in general. Until you can take advantage of the <a href="http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/display/Loader.html" rel="noreferrer">Loader.unloadAndStop()</a> method in FP10 (...
<p>Try the following:</p> <pre><code>try { new LocalConnection().connect('foo'); new LocalConnection().connect('foo'); } catch (e:*) {} </code></pre> <p>That will force a Garbage Collection routine. If your SWF is still attached, then you've missed some sort of connection, like the audio. </p> <p>There are a c...
14,347
<p>I've been mystified by the R quantile function all day. </p> <p>I have an intuitive notion of how quantiles work, and an M.S. in stats, but boy oh boy, the documentation for it is confusing to me. </p> <p>From the docs:</p> <blockquote> <p>Q[i](p) = (1 - gamma) x[j] + gamma x[j+1],</p> </blockquote> <p>I'm...
<p>You're understandably confused. That documentation is terrible. I had to go back to the paper its based on (Hyndman, R.J.; Fan, Y. (November 1996). &quot;Sample Quantiles in Statistical Packages&quot;. <em>American Statistician</em> 50 (4): 361–365. <a href="http://dx.doi.org/10.2307%2F2684934" rel="noreferrer">do...
<p>I believe the R help documentation is clear after the revisions noted in @RobHyndman's comment, but I found it a bit overwhelming. I am posting this answer in case it helps someone move quickly through the options and their assumptions. </p> <p>To get a grip on <code>quantile(x, probs=probs)</code>, I wanted to che...
12,062
<p>I manage a small group and I'd keep my work breakdown in project. However, it's difficult to provide my team with an adequate view into the project and ability to report on their progress. I looked at MS Project Server (the sharepoint webpart) but it's an expensive proposition.</p> <p>Has anyone had any experienc...
<p>**A good web based hosted Project Management software that suits my EPM needs is called valleyspeak project server, which I found at www.valleyspeak.com. One of the main reasons why I like the software is the fact that I could continue to work in Microsoft Project 2007 while sharing my Microsoft Project plans with m...
<p>Take a look at <a href="http://www.ibnportal.com" rel="nofollow noreferrer">www.ibnportal.co</a>m </p>
35,094
<p>We've got a fairly complex httphandler for handling images. Basically it streams any part of the image at any size that is requested. Some clients use this handler without any problems. But we've got one location that gives us problems, and now it also gives problems on my development environment.</p> <p>What happe...
<p>A client will limit the number of simultaneous requests it will make to any one server. Furthermore when requesting from a resource that requires session state (the default) other requests for resources requiring session state will block.</p> <p>When using <code>HttpWebResponse</code> you must dispose either that ...
<p>We also used WebRequests to gather more information. Those were blocking the connections. Putting usings around the WebResponses did the trick.</p> <pre><code>using (HttpWebResponse test_resp = (HttpWebResponse)test_req.GetResponse()) { } </code></pre> <p>I didn't know that those could block other request etc...</...
35,460
<p>If this is true, I'd like to know why. Do we see a great percentage of secure and high traffic web applications built in LAMP?</p>
<p>It's all about support. A large company buying from Microsoft will get a hotline through to their support team. Because any downtime could be incredibly expensive to a large company, the ability to get immediate support at any time is more valuable than any savings made on the initial purchase.</p> <p>Also, if it...
<p>Many prefer the security of another large company to go to with support issues. That being said there are many successful and high-traffic sites built on LAMP.</p>
27,335
<p>How do I remove all attributes which are <code>undefined</code> or <code>null</code> in a JavaScript object?</p> <p>(Question is similar to <a href="https://stackoverflow.com/questions/208105/how-to-remove-a-property-from-a-javascript-object">this one</a> for Arrays)</p>
<h3>ES10/ES2019 examples</h3> <p>A simple one-liner (returning a new object).</p> <pre class="lang-js prettyprint-override"><code>let o = Object.fromEntries(Object.entries(obj).filter(([_, v]) =&gt; v != null)); </code></pre> <p>Same as above but written as a function.</p> <pre class="lang-js prettyprint-override"><cod...
<p>30+ answers but I didn't see this short ES6 one-liner, utilizing the spread operator thanks to <code>Object.assign()</code> being a vararg function that silently ignores any non-objects (like <code>false</code>).</p> <pre><code>Object.assign({}, ...Object.entries(obj).map(([k,v]) =&gt; v != null &amp;&amp; {[k]: v]...
36,355
<p>I have this rewrite rule</p> <pre><code>RewriteEngine On RewriteBase /location/ RewriteRule ^(.+)/?$ index.php?franchise=$1 </code></pre> <p>Which is suppose to change this URL</p> <pre><code>http://example.com/location/kings-lynn </code></pre> <p>Into this one</p> <pre><code>http://example.com/location/index.p...
<p>Your problem is you are redirecting twice.</p> <p><code>'location/index.php'</code> matches the regex <code>^(.+)/?$</code></p> <p>You want to possibly use the "if file does not exist" conditional to make it not try mapping a second time.</p> <pre><code>RewriteEngine on RewriteBase /location/ RewriteCond %{REQUES...
<p>It sounds to me as though the rewrite filter is executing twice. Try adding a last flag </p> <pre><code>RewriteRule ^(.+)/?$ index.php?franchise=$1 [L] </code></pre>
40,607
<p>I'm creating a reverse Bowden setup to guide my filament from spool to extruder, through a path which contains two <a href="http://amzn.eu/almYaNi" rel="nofollow noreferrer">couplers</a> in the middle as follows:</p> <p><code>[spool] --- |#= --- =#| --- [extruder]</code></p> <p>So I have to connect a tube to the <...
<p>The solution might be to countersink the opening at the threaded portion within the tube. There are various angles available for countersinks, although the more common angles are 82 degrees and 90 degrees.</p> <p>Drive the countersink to the point where the wall thickness is zero, unlike the drawing below showing s...
<p>An alternative to chamfering the connector is buying a different type of connectors with a larger bore hole all the way through the connector and let the tube pass all the way through. These are used in my similar spool to extruder setup (reversed Bowden setup in OP's terminology).</p> <p><a href="https://i.stack.i...
490
<p>I have class with a member function that takes a default argument.</p> <pre><code>struct Class { void member(int n = 0) {} }; </code></pre> <p>By means of std::tr1::mem_fn I can invoke it:</p> <pre><code>Class object; std::tr1::mem_fn(&amp;Class::member)(object,10); </code></pre> <p>That said, if I want...
<p>Default functions are bound at call time, but can't be bound into any sort of wrapper implicitly, because of the way they are implemented. When you pass <code>&amp;Class::member</code>, <code>mem_fn</code> only sees a <code>void (Class::*)(int)</code>, and can't see the default argument. Using <code>tr1::bind</code>...
<p>The reason is that any default arguments do not change the function type of a function. </p> <p><code>mem_fn</code> has no way to know the function only requires 1 argument, or that the functions' second argument is optional, since all the knowledge it gets is given to it by the type of <code>&amp;Class::member</co...
37,561
<p><strong>Background</strong></p> <p>I have made a Web Service in Visual Studio, and I'm trying to consume it using the automatically generated proxy class. The Web Service returns a class that I have implemented, containing a List.</p> <p><strong>Question</strong></p> <p>The proxy class has automatically generated...
<p>Since Web References generate partial classes, you should be able to add to your project a partial class extension to the proxy class that reimplements just the method in question (just copy and paste it) but changes the return type (and the name, of course). If the method signature changes, you'll have to update yo...
<p>Unless your client code knows about your custom class (e.g. has a reference to the assembly) you will not be able to retrieve an object of that type from the service.</p> <p>It sounds like what you are looking to do is share types across a service layer. In order to do that you will either have to give your client...
48,223
<p>I need to either find a file in which the version is encoded or a way of polling it across the web so it reveals its version. The server is running at a host who will not provide me command line access, although I can browse the install location via FTP.</p> <p>I have tried HEAD and do not get a version number repo...
<h1>The method</h1> <p>Connect to port 80 on the host and send it</p> <pre><code>HEAD / HTTP/1.0 </code></pre> <p>This needs to be followed by carriage-return + line-feed twice</p> <p>You'll get back something like this</p> <pre><code>HTTP/1.1 200 OK Date: Fri, 03 Oct 2008 12:39:43 GMT Server: Apache/2.2.9 (Ubuntu) DAV...
<p>Use this PHP script:</p> <pre><code> $version = apache_get_version(); echo "$version\n"; </code></pre> <p>Se <em><a href="http://php.net/manual/en/function.apache-get-version.php" rel="nofollow noreferrer">apache_get_version</a></em>.</p>
20,123
<p>I have a page that is supposed to launch the Print Preview page onload.</p> <p>I found this:</p> <pre><code>var OLECMDID = 7; /* OLECMDID values: * 6 - print * 7 - print preview * 1 - open window * 4 - Save As */ var PROMPT = 1; // 2 DONTPROMPTUSER var WebBrowser = '&lt;OBJECT ID="WebBrowser1" WIDTH=0 HEIGHT=0 CLA...
<p>You can't, Print Preview is a feature of a browser, and therefore should be protected from being called by JavaScript as it would be a security risk.</p> <p>That's why your example uses Active X, which bypasses the JavaScript security issues.</p> <p>So instead use the print stylesheet that you already should have ...
<p>It can be done using javascript. Say your html/aspx code goes this way:</p> <pre><code>&lt;span&gt;Main heading&lt;/span&gt; &lt;asp:Label ID="lbl1" runat="server" Text="Contents"&gt;&lt;/asp:Label&gt; &lt;asp:Label Text="Contractor Name" ID="lblCont" runat="server"&gt;&lt;/asp:Label&gt; &lt;div id="forPrintPreview...
28,496
<p>I'm trying to get rid of some spurious warnings in my SSIS Progress log. I'm getting a bunch of warnings about unused columns in tasks that use raw SQL to do their work. I have a Data Flow responsible for archiving data in a staging table prior to loading new data. The Data Flow looks like this:</p> <pre><code>+---...
<p>Union All - select only the columns you want to pass through - delete any others.</p> <p>I thought they were going to address this in the 2008 version to allow columns to be trimmed/suppressed from the pipeline.</p>
<p>Looking at your problem again, I think you are using SSIS "against the grain". I'm not really following what you are reading out of the staging table, since your upsert doesn't seem to depend on anything in a particular row, nor does the cleanup.</p> <p>It would seem to me that the cleanup would run once for every...
33,449
<p>My regular expression needs to be able to find the strings:</p> <ol> <li>Visual Studio 2008</li> <li>Visual Studio Express 2008</li> <li>Visual Basic 2008</li> <li>Visual Basic Express 2008</li> <li>Visual C++ 2008</li> <li>Visual C++ Express 2008</li> </ol> <p>and a host of other similar variants, to be replaced ...
<p>It should be</p> <pre><code>"Visual (Basic|C\+\+|Studio)( Express)? 2008" &gt;&gt;&gt; import re &gt;&gt;&gt; repl = 'Visual Studio 2005' &gt;&gt;&gt; regexp = re.compile('Visual (Studio|Basic|C\+\+)( Express)? 2008') &gt;&gt;&gt; test1 = 'Visual Studio 2008' &gt;&gt;&gt; test2 = 'Visual Studio Express 2008' &gt;&...
<p>A very late answer, but like to answer.You can simply try this</p> <pre><code>/Visual.*2008/g </code></pre> <p><a href="http://regex101.com/r/fI0yU1/1" rel="nofollow">http://regex101.com/r/fI0yU1/1</a></p>
21,049
<p>I'm an IIS guy and know its as simple as just using the <a href="http://[computername]/path" rel="noreferrer">http://[computername]/path</a> to webapp.. however, I can't seem to figure out how to make this possible for a JSP application I'm writing that runs under Tomcat. Is there a configuration setting I need to s...
<p>You need to use the Port of Tomcat which is by default 8080. So you might want to access you localhost on machine A from machine B as <a href="http://A:8080/YourProject">http://A:8080/YourProject</a> And Remember Unlike IIS , it is case sensitive.</p>
<p>As well as blocking the port (see AirSource Ltd's answer), your firewall may have restrictions on the Tomcat service. For example, Mcafee Firewall restricts Tomcat to "outgoing only".</p> <p>If using Mcafee, under Change Settings > Firewall, expand Internet Connections for Programs and find Commons Daemon Service R...
16,257
<p>I seem to be getting a strange error when I run my tests in rails, they are all failing for the same reason and none of the online documentation seems particularly helpful in regards to this particular error:</p> <pre><code>SQLite3::SQLException: cannot rollback - no transaction is active </code></pre> <p>This err...
<p>Check <a href="http://dev.rubyonrails.org/ticket/4403" rel="nofollow noreferrer">http://dev.rubyonrails.org/ticket/4403</a> which shows a workaround. Could that be the problem you are encountering?</p>
<p>I had this problem once but with MySQL. Turned out I hadn't created the test database. Doh! Rails and sqlite creates them automatically I believe (at least it does in windows).</p> <p>Are trying to do in memory testing? If not does the test database exist?</p>
14,238
<p>I'm looking to setup a lightweight, developer only web stack on Windows (and possible OSX). Ideally, I'd be working with Zend framework, MySQL. But I'm open to other APIs to facilitate creating RESTFul (or pseudo-Restful) web services. I've seen some tools, like QuickPHP, but it might have been too lightweight a...
<p>The thing is, you want your development environment to behave the same way as your production environment, so I would suggest installing whatever you are going to deploy to. I run a LAMP stack on my server, so I run <a href="http://www.wampserver.com/en/" rel="nofollow noreferrer">WAMP</a> on Windows for development...
<p>I would look into <a href="http://www.apachefriends.org/en/xampp.html" rel="nofollow noreferrer">XAMPP</a>. But I prefer to install and configure Apache and PHP myself, and not use a pre-rolled solution.</p>
28,937
<p>I have over a TB of home movies with horrible file names. Finding what you want is impossible. I would like to rename all files to the time they were originally recorded (not the file time they were placed on my computer). Some applications (like Ulead Video Studio) can access this information, which I believe is e...
<p>Here is a hacky howto based on mplayer that works at least for the MOV files produced by my camera:</p> <pre><code>mplayer -vo null -ao null -frames 0 -identify myfile.MOV 2&gt;/dev/null|grep creation_time: </code></pre> <p>I use it to batch-rename them:</p> <pre><code>for m in MVI*.MOV; do t=$(mplayer -vo nu...
<p>Here is a bit of code that i found a while back that should get you started.</p> <p><a href="http://www.developerfusion.com/code/3435/a-convenient-wrapper-class-to-get-file-info/" rel="nofollow noreferrer">http://www.developerfusion.com/code/3435/a-convenient-wrapper-class-to-get-file-info/</a></p>
26,180
<p>I've seen <a href="https://stackoverflow.com/questions/129877/how-do-i-write-a-generic-memoize-function">the other post about this</a>, but is there a clean way of doing this in Haskell?</p> <p>As a 2nd part, can it also be done without making the function monadic?</p>
<p>This largely follows <a href="http://www.haskell.org/haskellwiki/Memoization" rel="noreferrer">http://www.haskell.org/haskellwiki/Memoization</a>.</p> <p>You want a function of type (a -> b). If it doesn't call itself, then you can just write a simple wrapper that caches the return values. The best way to store ...
<p>If your arguments are going to be natural numbers, you can do simply:</p> <pre><code>memo f = let values = map f [0..] in \n -&gt; values !! n </code></pre> <p>However, that doesn't really help you with the stack overflowing, and it doesn't work with recursive calls. You can see some fancier solutions at <a h...
17,123
<p>The way I do 80-column indication in Vim seems incorrect:<code>set columns=80</code>. At times I also <code>set textwidth</code>, but I want to be able to see and anticipate line overflow with the <code>set columns</code> alternative.</p> <p>This has some <strong>unfortunate</strong> side effects:</p> <ol> <li>I ...
<p>I have this set up in my .vimrc:</p> <pre><code>highlight OverLength ctermbg=red ctermfg=white guibg=#592929 match OverLength /\%81v.\+/ </code></pre> <p>This highlights the background in a subtle red for text that goes over the 80 column limit (subtle in GUI mode, anyway - in terminal mode it's less so).</p>
<p>set column line using set colorcolumn</p> <pre><code>set autoindent set smartindent set nowrap set hlsearch ...
29,148
<p>I've recently been working with a MySQL database, and using MySQL workbench to design the Database.</p> <p>When I use the export to SQL function, so I can actually get the layout in to the Database, I get:</p> <blockquote> <p>"Error 1005: Cannot create table"</p> </blockquote> <p>This appears to be related to F...
<p>When you get this (and other errors out of the InnoDB engine) issue:</p> <pre><code>SHOW ENGINE INNODB STATUS; </code></pre> <p>It will give a more detailed reason why the operation couldn't be completed. Make sure to run that from something that'll allow you to scroll or copy the data, as the response is quite l...
<p>I ran into this situation recently when I attempted (in InnoDB tables) to make a foreign key reference to a column that had a different data type.</p> <p><a href="http://dev.mysql.com/doc/refman/5.1/en/innodb-foreign-key-constraints.html" rel="nofollow noreferrer">MySQL 5.1 Documentation</a></p>
5,488
<p>I have a user interface in .net which needs to receive data from a server, on a request/reply/update model. The only constraint is to use Java only on the server box.</p> <p>What is the best approach to achieve this ? Is it by creating a Webservice in Java and then accessing it in .net, or should I create Java prox...
<p>I recommend the web service route. It offers a standard interface that can be consumed by other client platforms in the future.</p> <p>.NET clients interact with Java web services pretty well, though there are some gotchas. The best two technologies available for you for the .NET client are Microsoft Web Service En...
<p>Using a standard type of web service (e.g. SOAP or XML-RPC) is best because not only is it easy to produce/consume, it's easy in other languages as well.</p>
9,002
<p>Is it possible to integrate SSRS reports to the webforms..an example will be enough to keep me moving. </p>
<p>Absolutely it is.</p> <p>What you are looking for is the ReportViewer control, located in the Microsoft.Reporting.WebForms assembly. It will allow you to place a control right on your web form that will give people an interface for setting report parameters and getting the report.</p> <p>Alternatively you can set ...
<p>this is a knowledge base article which describes how to render report output to an aspx page in a particular file format.</p> <p><a href="http://support.microsoft.com/kb/875447/en-us" rel="nofollow noreferrer">http://support.microsoft.com/kb/875447/en-us</a></p>
12,374
<p>For performance reasons, I draw the strings for my UITableViewCell in a custom view that overrides its drawRect method to draw strings directly in the view rectangle using NSString:drawInRect. This is similar to Apple's TableViewSuite Example 5-CustomTableViewCell.</p> <p>However, when I invoke setEditing on the ce...
<p>I had a similar problem with a UIView inside a UITableViewCell. I solved it by changing the UIView's <code>contentMode</code> to <code>UIViewContentModeLeft</code>. (I wrote it up <a href="http://worldairmaillinks.com/post/68441884/for-iphone-development-reference-purposes" rel="noreferrer">here</a>, with screensh...
<p>Try setting the contentMode of your own custom view (which resides inside the cell's contentView) to <code>UIViewContentModeLeft</code>. The "squeezing" is due to the fact that the default contentMode is <code>UIViewContentModeScaleToFill</code>.</p>
26,536
<p>In a table I have the following schema</p> <pre><code>table1: playerID int primary key, nationalities nvarchar table2: playerID int, pubVisited nvarchar </code></pre> <p>Now, I want to set all the players' playedVisited to null, for player whose nationality is "England", any idea on how to do this? </p>
<p>Tested on SQL Server 2005</p> <pre><code>update table2 set pubVisited = NULL from table1 t1 inner join table2 t2 on (t1.playerID = t2.playerID and t1.nationalities = 'England') </code></pre>
<p>Syntax in Oracle would be:</p> <pre><code>update table2 set playedvisited = NULL where playerID in (select playerID from table1 where nationalities = 'England') </code></pre>
33,640
<p>I would like to share 2 folders of content ('stylesheets' and 'graphics') between multiple asp.net projects in a solution.</p> <p>Is there a way to do this and have studio display the graphics and such appropriately at design time?</p>
<p>I looked into this deeply a while back and found no great solution right there in Visual Studio.NET. What I ended up doing was using my source control system to share the folders.</p> <p>I used Subversion Externals to share to multiple working copies, from a single source in Subversion.</p> <p><a href="http://svn...
<p>I haven't tried this, but I believe if you make it a virtual folder in IIS for both websites, it will appear properly in VS (Of course, this means using IIS instead of the internal VS webserver).</p>
24,566
<p>Does anyone have a solution for styling the borders of "select" elements in Internet Explorer using CSS?</p>
<p>As far as I know, it's not possible in IE because it uses the OS component.</p> <p>Here is a <a href="http://v2.easy-designs.net/articles/replaceSelect/" rel="nofollow noreferrer">link</a> where the control is replaced, but I don't know if thats what you want to do. </p> <h2><strong>Edit: The link is broken I'm du...
<p>You'd need a custom-designed select box with CSS and JavaScript. You'd need to make absolutely sure it degrades perfectly to a standard select element should a user have JavaScript disabled.</p> <p>IMO, it's just not worth the effort. Stick with font stylings within the select to make it close to your site's desi...
49,799
<p>I know this may be simple but being C++ I doubt it will be. How do I convert a string in the form 01/01/2008 to a date so I can manipulate it? I am happy to break the string into the day month year constituents. Also happy if solution is Windows only.</p>
<pre><code>#include &lt;time.h&gt; char *strptime(const char *buf, const char *format, struct tm *tm); </code></pre>
<p>You can utilize the boost library(cross platform)</p> <pre><code>#include &lt;stdio.h&gt; #include "boost/date_time/posix_time/posix_time.hpp" int main() { std::string strTime = "2007-04-11 06:18:29.000"; std::tm tmTime = boost::posix_time::to_tm(boost::posix_time::time_from_string(strTime)); return 0; } </cod...
39,724
<p>I have a datagridview that I'm using in Visual Studio 2008 for a winforms app. The datagridview is bound to a typed dataset. I added a few columns to the table referenced from the typed dataset. So, i open the typed dataset and reconfigured the datatable to show the new columns. When I do a preview, the columns are ...
<p>I've had the same problem. The datagridview doesn't automatically accept changes that your datasource is configured to. If you add a column to your datasource, you need to configure your datagridview to display the new column.</p> <p>Open properties to your datagridview and edit/add columns. It will allow you to ad...
<p>If you have any DataSources Created under your Properties->Data Sources folder try removing them.</p>
46,741
<p>I want to create a compiled JavaScript file for my website. For development I would prefer to keep the JavaScript in separate files and just as part of my automated scripts concatenate the files into one and run the compressor over it.</p> <p>My problem is that if I use the old DOS copy command it also puts in th...
<p>I recommend using Apache Ant and YUI Compressor.</p> <p><a href="http://ant.apache.org/" rel="noreferrer">http://ant.apache.org/</a></p> <p><a href="http://yui.github.com/yuicompressor/" rel="noreferrer">http://yui.github.com/yuicompressor/</a></p> <p>Put something like this in the Ant build xml. It will create t...
<p>You can also try <a href="http://alexo.github.com/wro4j" rel="nofollow">wro4j</a> (web resource optimizer for java), which can be used as a build tool (maven plugin), runtime solution (using filter) or command line tool. It allows you to easily keep resources organized and handle the merging for you using a dozen of...
38,673
<p>I really like <a href="http://www.devexpress.com/" rel="nofollow noreferrer">DevX</a> components, but they are pretty expensive, maybe anyone knows free equivalents ? or web site where I can look for some kind of free visual component for .NET</p>
<p>Check out free <a href="http://www.componentfactory.com/products.php#toolkit" rel="noreferrer">Krypton Toolkit</a> of Component Factory.</p>
<p>I second that. Krypton all the way. Some of their controls actually outperform the same Telerik control, too.</p>
8,437
<p>When issuing an HTTP DELETE request, the request URI should completely identify the resource to delete. However, is it allowable to add extra meta-data as part of the entity body of the request?</p>
<p><a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html" rel="noreferrer">The spec</a> does not explicitly forbid or discourage it, so I would tend to say it is allowed.</p> <p>Microsoft sees it the same way (I can hear murmuring in the audience), they state in the MSDN article about the <a href="https://web...
<p>Might be the below GitHUb url will help you, to get the answer. Actually, Application Server like Tomcat, Weblogic denying the HTTP.DELETE call with request payload. So keeping these all things in mind, I have added example in github,please have a look into that</p> <p><a href="https://github.com/ashish720/spring-e...
38,400
<p>What is the difference between abstract class and interface in Python?</p>
<p>What you'll see sometimes is the following:</p> <pre class="lang-py prettyprint-override"><code>class Abstract1: &quot;&quot;&quot;Some description that tells you it's abstract, often listing the methods you're expected to supply.&quot;&quot;&quot; def aMethod(self): raise NotImplementedError(&q...
<p>For completeness, we should mention <a href="https://www.python.org/dev/peps/pep-3119/#abcs-vs-interfaces" rel="nofollow noreferrer">PEP3119</a> where ABC was introduced and compared with interfaces, and original <a href="https://mail.python.org/pipermail/python-3000/2007-April/006614.html" rel="nofollow noreferrer"...
48,630
<p>What’s the difference between <code>Response.Write()</code> and <code>Response.Output.Write()</code>? </p>
<p>There is effectively no difference, although <code>Response.Output.Write()</code> provides more overloads which can allow you to pass different parameters. Scott Hansleman covers it <a href="http://www.hanselman.com/blog/ASPNETResponseWriteAndResponseOutputWriteKnowTheDifference.aspx" rel="nofollow noreferrer">in d...
<p>Nothing really.</p> <p>But. <code>Response.Write</code> takes the stream in the <code>Response.Output</code> property. You could set another Output stream, and in that way instead of writing back to the client, maybe write to a file or something crazy. So thats there relation.</p>
13,662
<p>Here's what I have on my list so far. I'd like to know of others in the same vein, perhaps more technical, perhaps less </p> <p>Blown to Bits: Your Life, Liberty, and Happiness After the Digital Explosion - Ableson, Leeden, and Lewis<br> Glut: Mastering Information Through the Ages - Wright<br> Information Rules ...
<ul> <li>"SIGIR" - the conference</li> <li>"TREC" - the conference</li> <li>Baeza-Yates, Ribeiro-Neto, "Modern Information Retrieval" (1999)</li> <li>Witten, "Managing Gigabytes" (1999)</li> <li>van Rijsbergen, "Information Retrieval" (1979)</li> </ul> <p>are the obvious "bibles" (as mentioned above).</p> <ul> <li>Bü...
<p>As Book <a href="http://www-csli.stanford.edu/~hinrich/information-retrieval-book.html" rel="nofollow noreferrer">Introduction to Information Retrieval</a> as mentioned.</p> <p>I think, the best advanced information are the publications found in several academic sites and the conference papers (SIGIR, CIKM, SPIRE, ...
29,506
<p>Do you have any experience with <a href="http://www.olegsych.com/2007/12/text-template-transformation-toolkit/" rel="nofollow noreferrer">T4</a> and <a href="http://www.t4editor.net/" rel="nofollow noreferrer">T4 Editor</a>? Can you compare it to <a href="http://www.codesmithtools.com/" rel="nofollow noreferrer">Cod...
<p>What exactly you are trying to do? I guess it also depends on from where you are trying to generate the code (the model).</p> <p>The advantage with Codesmith and MyGeneration is, they provide multiple options for you to generate your code - for eg, in MyGeneration, you can write your templates in various langs. </p...
<p>Besides nowadays recommended T4 templates, there is another way to generate code in VS - <a href="http://blog.stevensanderson.com/2011/01/13/scaffold-your-aspnet-mvc-3-project-with-the-mvcscaffolding-package/" rel="nofollow">MVC Scaffolding</a>, which can be used for any code generation (not only ASP.NET MVC). </p> ...
47,676
<p>I have a xml blob that's checked against a schema in sql 2005. My website uses xsl to transform and display the blob. How do I add a hyperlink to the xml (in any node) without the sql 2005 schema complaining a node was found in the wrong place? Or the xsl thinking that the hyperlink is a valid xml node?</p> <p>than...
<p>Can you instead, segregate the data into a new database, and just redirect your connection strings (they're not hard-coded, right? right?) to point to the demo database. This way, live data isn't tainted, and your code looks identical. We actually do a three tier-deployment system this way, where we do local develop...
<p>I've often seen it on certain types of live systems. For example, point of sale systems in a supermarket: cashiers are trained on the production point of sale terminals.</p> <p>The key is to carefully identify the test or training data. I wouldn't say that there's any explicit best practice for how to model this i...
20,150
<p>What avenues are there for using an XSD to generate message instances? I seem to remember reading about generating classes from XSD, but can't find anything specific now. I know you can generate classes and datasets from XSD, but I'm looking for a pattern for automating the actual generation of the messages.</p> ...
<pre><code>xsd /c yourschema.xsd &gt; yourschema.cs </code></pre>
<p>You can also create an XSD from XML samples with xsd.exe. Start the visual studio command prompt and use it to create an xsd from an xml sample. Then you can, as leppie shows, use xsd.exe to create a typed data set from that XSD. I wouldn't recommend doing this blindly, but it can certainly help when using a thir...
22,598
<p>I know the Html.Button has been moved to the Microsoft.Web.Mvc namespace, but I really miss the generic versions that used to exist in the early Previews. </p> <p>All I want the Html.Button to do is to hit an action in my controller, but I'd rather not write the JavaScript in the onClickMethod argument.</p> <p>In ...
<p>The problem with the generic versions is that filters are allowed to change the actual name of the action away from the name of the method (like the [ActionName] attribute).</p>
<p>Yes, they really screwed up with Html.Button and Html.CheckBox in CTP5. I hope they return to the previous behaviour.</p>
22,028
<p>I have a <a href="https://jqueryui.com/draggable/" rel="nofollow noreferrer"><code>draggable</code></a> with a custom <a href="http://api.jqueryui.com/draggable/#option-helper" rel="nofollow noreferrer"><code>helper</code></a>. Sometimes the helper is a clone and sometimes it is the original element. </p> <p>The pr...
<p>Ok, I found a solution! It's ugly and it breaks the 'rules of encapsulation,' but at least it does the job. </p> <p>Remember <strong>this is just for special cases</strong>! jQuery can handle its own helper removal just fine. In my case I had a helper that was sometimes the original element and sometimes a clone, s...
<p>I might be missing something here, but is it not simply a case of adding</p> <pre><code>revert: "invalid" </code></pre> <p>to the options of the draggable if the draggable is of an original element, not a clone?</p>
25,597