instruction
stringlengths
21
27.8k
chosen
stringlengths
18
28.2k
rejected
stringlengths
18
33.6k
__index_level_0__
int64
0
50k
<p>I am trying to monitor my outlook inbox so whenever new emails come in with attachments I save the attachment to some other location. Can anyone help me out?</p>
<p>This is not a complete solution, but it describes some of the fundamental tools you'll be using in the Outlook API.</p> <p>From <a href="http://hspinfo.wordpress.com/tag/outlook-email-using-c/" rel="nofollow noreferrer">Access Outlook Emails with ASP.NET, C#</a>:</p> <pre><code>using Outlook; Outlook.Application...
<p><a href="http://www.dimastr.com/redemption/" rel="nofollow noreferrer">Outlook Redemption</a> is the best thing currently to use that I have found. It will allow you to get into the messages and extract the attachments and the message bodies. I am using it now to do just that. It also keeps the security dialogs f...
38,322
<p>For e.g. if i am storing some files on a network server which is under many hierarchical folders.</p> <p>Then i want to do backup. But i always encounter issue because the file path is more than 255?</p> <p>How can i resolve this issue or work around it?</p>
<p>Preface: I'm assuming the OS of the machine you want to copy the files to is some flavor of Windows.</p> <p>The first part of Mark Bessey's is somewhat correct, however even on modern versions of windows with modern filesystems (NTFS for example) you can still run into problems.</p> <p>I suspect the limitation you...
<p>Maybe upgrade to an Operating System that's been updated in the last decade or so? Seriously, though - what OS and file system are you using? Even FAT32 supports long path and file names, though any single component of the path is limited to 255 characters.</p> <p>If you've got directories with more than 255 charac...
28,782
<p>Here is my query:</p> <pre><code> Select Top 10 CS.CaseStudyID, CS.Title, CSI.ImageFileName From CaseStudy CS Left Join CaseStudyImage CSI On CS.CaseStudyID = CSI.CaseStudyID And CSI.CSImageID in( Select Min(CSImageID) -- &gt;not really satisfactory From CaseStudyImage Group By CaseStudyID ...
<p>You can use ranking function and newid() to create randomize order with grouping.</p> <pre><code>WITH CSI AS ( SELECT CSI.CaseStudyID, CSI.ImageFileName, ROW_NUMBER() OVER(PARTITION BY CSI.CaseStudyID ORDER BY newid()) AS RowNumber FROM CaseStudyImage CSI ) SELECT TOP (10) CS.CaseStudyID, CS.Title, ...
<p><code>ORDER BY RAND() LIMIT 1</code>?</p>
48,491
<p>Consider an SQL Server table containing:</p> <pre><code>ID ParentID Text === ========= ============= 1 (null) Product 2 (null) Applications 3 1 Background 4 1 Details 5 2 Mobile </code></pre> <p>i fill a SqlDataSet with the table, and now i want to add the P...
<p>Wow no one had the right answer ....</p> <p>The problem is that the example you were reading is under the label "Step 3 - Retrieve Data and Create <strong>Nested Relationships</strong>".</p> <p>If you would like to add a relation between two columns of the SAME TABLE (nested), then you must set the 'Nested" variab...
<p>One reason why his works might be because all the rows in he result set might have a parentID. Child column is the one that refers and parent column is the one that is being refered by the child column. In other words child refers the parent. So in your case Id is the parent column and parentId is the child column.<...
36,568
<p>I think that business logic should exist in a model when using an MVC or MVP design pattern, but should be hidden behind a service in a service-oriented architecture.</p> <p>Can a software system use the MVC or MVP design pattern within a service-oriented architecture? If so, where does the model sit?</p>
<p>Well they are totally different animals. MVC is all about presentation of data, controlling the navigation of the user dialog and some business logic in building the data model.</p> <p>SOA is about retrieving data from a service provider.</p> <p>On the client side, you can use SOA within the Model part of the MVC ...
<p>Good Question. I think MVC and SOA will and must co-exist. MVC is the most sucessful architecture for User to system communication. SOA is an architecture for effective system-system communication. In most organisation, there is a place for both. Therefore I believe they will co-exist. </p> <p>In terms of how they...
44,619
<p>I work in an Oracle shop. There's a toolset that consists of roughly 1000 Oracle Forms (using the Forms builder from 6i, early 90's software) with Oracle 10g on the back end. It's serving roughly 500 unique people a month, with 200 concurrent connections at any given time during the work day.</p> <p>Obviously thi...
<p>That's exactly what I am currently doing using...</p> <p><a href="http://apex.oracle.com/i/index.html" rel="noreferrer">Oracle Application Express</a></p> <p>The learning curve is much smaller than most web-based alternatives for Forms developers, as all the code is in PL/SQL (unless you start getting fancy with J...
<p>Hi i have done a similar work using GWT/springs/ORMS combination, the results are fantastic ,how ever it also depends on the complexity of business process mine was a very very complex business process, what i did was segragate all the layers and treat each layer as a service , in the process i made an application w...
21,702
<p>i've been asked to generate some demographic reports (crime rates, birth/deaths, etc) based on state and cities for the USA. I have all the demographic data (provided by our client) but can't seem to find any places which have the boundaries (read: LAT/LONG's) of the USA States and their cities.</p> <p>Our data are...
<p>A bit late, but in case anyone stumbles across this like I did:</p> <p>To get the city boundary layers you navigate to "Download Shapefiles" for the year you're interested in and drop down to the city boundary layer, which is called "Places". (which is not an intuitive enough name for me...)</p> <p><a href="http:/...
<p>I think you are looking for <a href="http://en.wikipedia.org/wiki/Geographic_information_system" rel="nofollow noreferrer" title="Geographic information system - Wikipedia, the free encyclopedia">GIS data</a>. For example, I found <a href="http://data.geocomm.com/catalog/US/61088/group214.html" rel="nofollow norefer...
45,892
<p>I have this string</p> <pre><code>'john smith~123 Street~Apt 4~New York~NY~12345' </code></pre> <p>Using JavaScript, what is the fastest way to parse this into</p> <pre><code>var name = "john smith"; var street= "123 Street"; //etc... </code></pre>
<p>With JavaScript’s <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/split" rel="noreferrer"><code>String.prototype.split</code></a> function:</p> <pre><code>var input = 'john smith~123 Street~Apt 4~New York~NY~12345'; var fields = input.split('~'); var name = fields[...
<p>Use this code --</p> <pre><code>function myFunction() { var str = "How are you doing today?"; var res = str.split("/"); } </code></pre>
12,203
<p>I'm trying to print the following model:</p> <p><a href="https://i.stack.imgur.com/b8cSN.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/b8cSN.jpg" alt="View 1" /></a></p> <p><a href="https://i.stack.imgur.com/HGgi3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HGgi3.jpg" alt=...
<p>You may be getting shrinking due to cooling on the non-top and non-bottom layers. Sixty percent infill is rather substantial. I'm printing 20 hour pieces in ABS at 100 °C / 250 °C using ten percent infill and getting nothing like what your image shows.</p> <p>Can you do with a lower infill? More isn't always stronge...
<p>If your object doesn't need to be flexible and can tolerate a more brittle material, PLA has better dimensional accuracy. Thus, it would be easier to get your desired shape.</p> <p>Try two perimeter shells, but slow down the print speed of the perimeter.</p>
1,928
<p>We have a custom project management tool built in ASP,net 3.5 and we use VisualSVN for our version management. However, we are looking a way to report the version changes through the project management tool by integrating VisualSVN with our project management tool, i.e. pretty much similar to what Trac [python base...
<p>There is also <a href="http://sharpsvn.open.collab.net/" rel="nofollow noreferrer">SharpSvn</a> wich encapsulates the whole Subversion 1.5 client api. It's is licensed under the Apache 2.0 license and it's from CollabNet.</p>
<p>Check <a href="http://www.pumacode.org/projects/svndotnet/" rel="nofollow noreferrer">Svn.NET</a> I think is the best solution for right now .NET bindings of the Subversion client system libraries.</p>
36,861
<p>I have a table like the following:</p> <pre><code>transaction_id user_id other_user_id trans_type amount </code></pre> <p>This table is used to maintain the account transactions for a finance type app.</p> <p>Its double entry accounting so a transfer from User A to B would insert two rows into the table looking l...
<p>Are you using InnoDB tables or MyISAM tables? MySQL doesn't support transactions on MyISAM tables (but it won't give you an error if you try to use them). Also, make sure your transaction isolation level is set appropriately, it should be SERIALIZABLE which is not the default for MySQL. </p> <p>This <a href="http...
<p>The problem is that the concept of the "user account" is "scattered" through many rows in your table. With the current representation, I think you can't "lock the user account" (so to speak), so you are open to race conditions when modifying them.</p> <p>A possible solution would be to have another table with user ...
37,345
<p>I have inherited a client site which crashes every 3 or 4 days. It is built using the zend-framework with which I have no knowledge.</p> <p>The following code:</p> <pre><code>&lt;?php // Make sure classes are in the include path. ini_set('include_path', ini_get('include_path') . PATH_SEPARATOR . 'lib' . PAT...
<p>for a start I think your include path should maybe have a trailing slash. Here is an example of mine :</p> <pre><code> set_include_path('../library/ZendFramework-1.5.2/library/:../application/classes/:../application/classes/excpetions/:../application/forms/'); </code></pre> <p>You bootstrap file will be includ...
<p>It works sometimes so there isn't anything inherently wrong on the PHP end of things (if the path was wrong it would never work... but it does, yes?). So what is causing Loader.php to be periodically inaccessible? I would suspect a permissions problem. Something that is making Loader.php or the directory that it is ...
6,037
<p>I have an object I am using to store document meta data into a table. The body text of the document can be very large, sometimes > 2GB so I will be storing it into a nvarchar(max) field in SQL 2008. I'll use SQL 2008 later to index that field. I won't be using filestreams because they are very restrictive to the ...
<p>Given the answer to <a href="https://stackoverflow.com/questions/53873/can-a-linq-query-retrieve-blobs-from-a-sql-database">"Can a LINQ query retrieve BLOBs [...]"</a> I <em>suspect</em> you're out of luck. The <a href="http://msdn.microsoft.com/en-us/library/system.data.linq.binary.aspx" rel="nofollow noreferrer">S...
<p>I ended up writing my own method around linqtoSql utlising the write method avaiable to varchar(max) objects in SQL. This allows developers to chunk inserts into the DB for large data types.</p>
36,869
<p>I have potentially large files that need to be sorted by 1-n keys. Some of these keys might be numeric and some of them might not be. This is a fixed-width columnar file so there are no delimiters.</p> <p>Is there a good way to do this with Unix sort? With one key it is as simple as using '-n'. I have read the ...
<p>Take care though:</p> <p>If you want to sort the file primarily by field 3, and secondarily by field 2 you want this:</p> <pre><code>sort -k 3,3 -k 2,2 &lt; inputfile </code></pre> <p><strong>Not this:</strong> <code>sort -k 3 -k 2 &lt; inputfile</code> which sorts the file by the string from the beginning of fie...
<p>I just want to add some tips, when you using sort , be careful about your locale that effects the order of the key comparison. I usually explicitly use LC_ALL=C to make locale what I want.</p>
46,622
<p>I'm looking for a python library that will help me to create an authentication method for a desktop app I'm writing. I have found several method in web framework such as django or turbogears.</p> <p>I just want a kind of username-password association stored into a local file. I can write it by myself, but I'm reall...
<p>dbr said:</p> <blockquote> <pre><code>def hash_password(password): """Returns the hashed version of a string """ return hasher.new( str(password) ).hexdigest() </code></pre> </blockquote> <p>This is a really insecure way to hash passwords. You <em>don't</em> want to do this. If you want to know why rea...
<p>Use " md5 " it's much better than base64</p> <pre><code>&gt;&gt;&gt; import md5 &gt;&gt;&gt; hh = md5.new() &gt;&gt;&gt; hh.update('anoop') &gt;&gt;&gt; hh.digest &lt;built-in method digest of _hashlib.HASH object at 0x01FE1E40&gt; </code></pre>
9,607
<p>I would like to refer HTML templates designed/developed especially for form based Web Applications.</p> <p>I have been searching them but am not able to find out which I find better.</p> <p>Regards, Jatan</p>
<p>Much of the choice in this sort of thing is going to be defined by your choice of server tech / platform, e.g. .NET has in built widgets you can use, as do many web application frameworks.</p> <p>The django admin layouts are extremely well designed, you could download <a href="http://www.djangoproject.com/" rel="no...
<p>I personally like <a href="http://themeforest.net/" rel="nofollow noreferrer">ThemeForest</a>. They have a large selection and includes the raw markup and css scripts so you can make your forms app look like the template in no time.</p>
17,788
<p>I have a Windows form application written in C#. I update the title of the form frequently, but there's a substantial lag between the title changing and the title dislayed in the taskbar being updated. </p> <p>What's a clean way to force an update / redraw of the task bar's entry for my program? Failing that, ho...
<p>Did you try to call Form.Refresh() after updating the title?</p> <p>Edit:</p> <p>If you are doing the title updates in a loop you might have to do something along the line of:</p> <pre><code> this.Invalidate(); this.Update(); Application.DoEvents(); </code></pre>
<p>I just did a simple test. The changes are quite instantaneous. From the look of it, it's definitely less than 500ms. If you need to update the title at a higher rate, I won't really recommend it. Generally I've seen the fastest update rate of twice per second.</p> <p>EDIT: I tested using keypress event. When I hold...
49,845
<p>the new keyboard from Microsoft, <a href="http://www.microsoft.com/hardware/gaming/productdetails.aspx?pid=102" rel="nofollow noreferrer">Sidewinder x6</a> can record in game macro. I was woundering if it could be used in Visual Studio (record key in application too)?</p> <p>(This could be very useful to press 1 ke...
<p>YES IT CAN! Sure, why not? Okay, some reasoning behind my answer.</p> <p>Just create a "gaming profile" for devenv.exe instead of a game. BAM! There you go.</p>
<p>Yes its perfect for vs2008. A+++++++++ </p>
18,222
<p>I have a dictionary that I normally access with a key, so I need fast random access reads. However for one function I need to process every item in the dictionary where the order is important. It seems to be working OK in tests. Is it OK to depend on the order of items in a dictionary?</p>
<p>No. If you need to keep an order, you should have a list of items as well. You could encapsulate all the operations you need in your own collection class, which would update both the dictionary and the list at the same time.</p> <p>It's unfortunate that .NET doesn't have a dictionary which supports this itself - it...
<p>No. You're better off using a <a href="http://msdn.microsoft.com/en-us/library/f7fta44c.aspx" rel="nofollow noreferrer">SortedDictionary</a> if you want to keep your keys in an order.</p> <p>Edit: Either that, or add your keys to a linked list if you want to keep track of the order you added the items.</p>
32,224
<p>Is it possible to run an external process from Perl, capture its stderr, stdout AND the process exit code?</p> <p>I seem to be able to do combinations of these, e.g. use backticks to get stdout, IPC::Open3 to capture outputs, and system() to get exit codes.</p> <p>How do you capture stderr, stdout, and the exit co...
<p>If you reread the documentation for IPC::Open3, you'll see a note that you should call <a href="http://perldoc.perl.org/functions/waitpid.html" rel="noreferrer">waitpid</a> to reap the child process. Once you do this, the status should be available in <code>$?</code>. The exit value is <code>$? &gt;&gt; 8</code>. Se...
<p>If you're getting really complicated, you might want to try Expect.pm. But that's probably overkill if you don't need to also manage sending input to the process as well.</p>
13,439
<p><a href="http://pear.php.net/manual/en/package.database.db-dataobject.php" rel="nofollow noreferrer">DB_DataObject</a> does not appear to be ActiveRecord because you do not necessarily store business logic in the "table" classes. It seems more like Table Data Gateway or Row Data Gateway, but I really cannot tell. Wh...
<p>Follow <a href="http://pear.php.net/manual/en/package.database.db-dataobject.intro-purpose.php" rel="nofollow noreferrer">this link</a> to read what DB_DO is. In a nutshell, it doesn't implement a specific pattern, it just aims to provide a common interface. The idea is to not rebuild the same basic code in each pro...
<p>It sounds like what you're looking for is something like <a href="http://ibatis.apache.org/" rel="nofollow noreferrer">IBatis</a> for PHP. Sadly, this doesn't yet exist. I've actually written some custom DataMapper stuff based on PDO for the current application I'm working on to achieve a persistence ignorant domain...
5,971
<p>I'm having trouble wrapping my head around this. Right now I have some models that looks kind of like this:</p> <pre><code> def Review(models.Model) ...fields... overall_score = models.FloatField(blank=True) def Score(models.Model) review = models.ForeignKey(Review) question = models.TextField() ...
<p>Save/delete signals are generally favourable in situations where you need to make changes which aren't completely specific to the model in question, or could be applied to models which have something in common, or could be configured for use across models.</p> <p>One common task in overridden <code>save</code> meth...
<p>If you'll use signals you'd be able to update Review score each time related score model gets saved. But if don't need such functionality i don't see any reason to put this into signal, that's pretty model-related stuff.</p>
20,552
<p>I hope I can explain this clearly enough, but if not let me know and I'll try to clarify.</p> <p>I'm currently developing a site using ColdFusion and have a mod_rewrite rule in place to make it look like the site is using PHP. Any requests for index.php get processed by index.cfm (the rule maps *.php to *.cfm).</p>...
<p>You can use the <code>S</code> flag to skip the <code>404</code> rule, like this:</p> <pre><code>RewriteEngine on # Do not separate these two rules so long as the first has S=1 RewriteRule (.*)\.php$ $1.cfm [S=1] RewriteRule \.cfm$ - [R=404] </code></pre> <p>If you are also using the <code>Alias</code> option the...
<p>Post the rules you already have as a starting point so people don't have to recreate it to help you.</p> <p>I would suggest testing [L] on the rule that maps .php to .cfm files as the first thing to try.</p>
3,032
<p>I quite often see JavaScript with variables that start with a dollar sign. When/why would you choose to prefix a variable in this way?</p> <p>(I'm not asking about <code>$('p.foo')</code> syntax that you see in jQuery and others, but normal variables like <code>$name</code> and <code>$order</code>)</p>
<p>Very common use in <strong>jQuery</strong> is to distinguish <strong>jQuery</strong> objects stored in variables from other variables. </p> <p>For example, I would define:</p> <pre><code>var $email = $("#email"); // refers to the jQuery object representation of the dom object var email_field = $("#email").get(0);...
<p>The reason I sometimes use php name-conventions with javascript variables: When doing input validation, I want to run the exact same algorithms both client-side, and server-side. I really want the two side of code to look as similar as possible, to simplify maintenance. Using dollar signs in variable names makes t...
25,221
<p>I've somehow managed to get an SVN repository into a bad state. I've moved a directory and now I can't commit it in its new location.</p> <p>As far as <code>svn status</code> is concerned, the directory is unknown (the name of the directory is <code>type</code>).</p> <pre> $ svn status ? type </pre> <p>When ...
<p>It looks to me like <code>type</code> was created by some Subversion-aware copy command, then moved into the current directory using a Subversion-unaware copy. In my experience, this sort of thing typically occurs when package refactoring operations have been chained together in Eclipse without commits in between. ...
<p>My experience is that sometimes the local copy gets out of sync with the repository. I usually solve this by going up the local directory tree, starting from the directory with the problem and try to do do cleanup and update with each step.</p>
6,922
<p>I'm attempting to put together some basic report screens. I've got some fairly complicated SQL queries that I'm feeding into ActiveRecord's find_by_sql method. The problem I am having here is that I am losing the order of the columns as given in the original query. I'm assuming that this is because the Hash class...
<p>You're correct in that the Ruby Hash does not preserve order. That's part of the point, really - you access it using the key.</p> <p>I assume your query is written to deliver the columns in the order that you want to output them and you were hoping to output the values via a loop? Seems like a decent enough idea, b...
<p>How are you creating these "report screens"? Are they erb templates? Are you just calling .each on columns to print them all out?</p> <p>If that's the case you could override the columns() method in your models to return an ordered array.</p>
25,721
<p>I have an HttpHandler on my webserver that takes a URL in the form of "<a href="https://servername/myhandler?op=get&amp;k=Internal&amp;m=jdahug1" rel="nofollow noreferrer">https://servername/myhandler?op=get&amp;k=Internal&amp;m=jdahug1</a>". I need to call this URL from my .NET app and capture whatever the output ...
<p>Try the System.Net.WebClient class.</p> <p>You can use the .DownloadStringAsync() method to enforce a timeout.</p>
<p>we have used the following in the backend of our product (this is just the core code, not with timeout errorhandling etc.)</p> <pre><code>using System.Net; using System.IO; HttpWebRequest req = (HttpWebRequest) WebRequest.Create(WebPageUrl); WebResponse resp = req.GetResponse(); Stream stream = resp.GetResponse...
24,642
<p>I'm researching a bug that looks like some kind of timing issue and so I'm a bit curious about how events work in Delphi 7. What happens is we get some data sent to our application through a COM interface and it gets handled in an event raised from the COM thread. It seems like the event, which has quite a bit of co...
<p>Delphi is mostly serial in handling events. Unfortunately, it is possible to tell Delphi to handle other events while you're running in some event already. As a result, new events will run while your current event is waiting for the new event to finish. In the worst case, your application might appear to behave norm...
<p>Did some research and got a few pointers, particularly to my first question:</p> <p><em>Are events serial or parallell in Delphi, that is, if I get a new event while one is executing -what happens? Is it run in parallell on some kind of automatic thread, is it ignored or is it queued up? If it is queued up, how man...
48,430
<p>In MySql's interpreter, it's very easy to dump a table to the screen along with its field names. </p> <p>There seems to be no simple way to export a table to a tab-delimted or CSV outfile <em>including</em> its column headers.</p> <p>I'm trying to do this using only SQL or the Linux command line, without writing a...
<p>Piping the query to the commandline client outputs a tab separated list with the column names as the first line</p> <pre><code>$ echo "select * from surveys limit 5" | mysql -uroot -pGandalf surveys phone param1 param2 param3 param4 p0 p1 p2 p3 audio4 code time XXXXXXXXX 2008-07-...
<p>I have created a procedure to automate the exporting of the contents of a larger number of tables to .csv file by using <code>SELECT ... INTO OUTFILE</code>. Please refer to the following if you have need for something like this</p> <p><a href="http://lifeboysays.wordpress.com/2012/06/23/mysql-how-to-export-data-to...
32,912
<p>What is smart navigation in .NET? </p>
<p>SmartNavigation is a property of the Page class in System.Web.UI. When a request comes in to Internet Explorer 5.5 or higher and SmartNavigation is turned on (set to true), the following actions are performed:</p> <ul> <li>The flash caused by navigation is eliminated</li> <li>The scroll position is persisted when m...
<p>A feature of ASP.NET that allows a web page to do a postback and display new content without flickering or skipping back to the top of the page. I don't see that it has much place now that AJAX exists.</p>
47,730
<p>I have a loop that reads each line in a file using <code>getline()</code>:</p> <pre><code>istream is; string line; while (!getline(is, line).eof()) { // ... } </code></pre> <p>I noticed that calling <code>getline()</code> like this also seems to work:</p> <pre><code>while (getline(is, line)) </code></pre> <p...
<p>The <code>istream</code> returned by <code>getline()</code> is having its operator <code>void*()</code> method implicitly called, which returns whether the stream has run into an error. As such it's making more checks than a call to <code>eof()</code>.</p>
<p>I would stick with the first form. While the second form may work, it is hardly explicit. Your original code clearly describes what is being done and how it is expected to behave.</p>
32,385
<p>I'm using managed c++ to implement a method that returns a string. I declare the method in my header file using the following signature:</p> <pre><code>String^ GetWindowText() </code></pre> <p>However, when I'm using this method from C#, the signature is:</p> <pre><code>string GetWindowTextW(); </code></pre> <p>...
<p>To get around the preprocessor hackery of the Windows header files, declare it like this:</p> <pre><code>#undef GetWindowText String^ GetWindowText() </code></pre> <p>Note that, if you actually use the Win32 or MFC <code>GetWindowText()</code> routines in your code, you'll need to either redefine the macro or call...
<p>GetWindowText is a win32 api call that is aliased via a macro to GetWindowTextW in your C++ project.</p> <p>Try adding #undef GetWindowText to you C++ project.</p>
12,892
<pre><code>&lt;Grid.Triggers&gt; &lt;EventTrigger RoutedEvent="Border.Loaded"&gt; &lt;EventTrigger.Actions &gt; &lt;BeginStoryboard&gt; &lt;Storyboard x:Name="MyStoryboard" AutoReverse="True" RepeatBehavior="Forever"&gt; ...
<p>The only trigger currently available in Silverlight is "Loaded", for all other events you'll have to write a bit of code. To use this technique, Storyboards should go in the Resources section instead of Triggers, and you'll call Begin() on the Storyboard from the code.</p> <p>If you're doing templating of a control...
<p>I wasn't really looking for the animation to be turned off based on an event. I wanted to do it based on a property of my business object that Im binding too? I was hoping there was something like Storyboard.Enabled = False!?!?!</p>
20,080
<p>MySQL's explain output is pretty straightforward. PostgreSQL's is a little more complicated. I haven't been able to find a good resource that explains it either.</p> <p>Can you describe what exactly explain is saying or at least point me in the direction of a good resource?</p>
<p><a href="http://wiki.postgresql.org/wiki/Image:Explaining_EXPLAIN.pdf" rel="noreferrer">Explaining_EXPLAIN.pdf</a> could help too.</p>
<p>If you install pgadmin, there's an Explain button that as well as giving the text output draws diagrams of what's happening, showing the filters, sorts and sub-set merges that I find really useful to see what's happening.</p>
14,281
<p>I have a method in .NET (C#) which returns <code>string[][]</code>. When using RegAsm or TlbExp (from the .NET 2.0 SDK) to create a COM type library for the containing assembly, I get the following warning:</p> <blockquote> <p>WARNING: There is no marshaling support for nested arrays.</p> </blockquote> <p>This w...
<p>Even if you were to return an Object (which maps to a Variant in COM Interop), that doesn't solve your problem. VB will be able to "hold" onto it and "pass it around", but it won't be able to do anything with it.</p> <p>Technically, there is no exact equivalent in VB for a string[][]. However, if your array is not ...
<p>The equivalent of variant in C# is System.Object. So you might want to try to return the result cast to object and pick it back up on the other side as a variant.</p> <p>VB doesn't have any facilities that C# lacks, so I doubt it would be better or easier if the .NET side was written in VB.</p>
9,590
<p>Any recommended crypto libraries for Java. What I need is the ability to parse X.509 Certificates to extract the information contained in them.</p> <p>Thanks</p>
<p>In Java, java.security.cert.CertificateFactory.</p> <p>"A certificate factory for X.509 must return certificates that are an instance of java.security.cert.X509Certificate"</p>
<p>Java doesn't need crypto libraries, it ships with that functionality already. In particular, java.security.cert.X509Certificate.</p>
17,326
<p>How can I center a model at the middle of the printing area of the printer when creating a g-code with CuraEngine. </p> <p>Are there any parameters I can add to <code>ultimaker2.def.json</code> to achieve this? Thanks.</p>
<p>Found a solution. This need to be applied under <code>"settings"</code></p> <pre><code>"command_line_settings": { "label": "Command Line Settings", "description": "Settings which are only used if CuraEngine isn't called from the Cura frontend.", "type": "category", "enabled": true, "children": {...
<p>If this is over the commandline tool "CuraEngine", then you will have to read the sourcecode. According to the <a href="https://ultimaker.com/en/community/4337-doc-of-curaengine" rel="nofollow noreferrer">Author</a>, 'Nope. Only documentation there is in the code, readme and my head.' (cringe!).</p> <p>If you're ta...
708
<p>I need to do some emulation of some old DOS or mainframe terminals in Flex. Something like the image below for example.</p> <p><img src="https://i.stack.imgur.com/qFtvP.png" alt="alt text"></p> <p>The different coloured text is easy enough, but the ability to do different background colours, such as the yellow bac...
<p>Use <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/TextField.html" rel="nofollow noreferrer"><code>TextField.getCharBoundaries</code></a> to get a rectangle of the first and last characters in the areas where you want a background. From these rectangles you can construct a rectangle th...
<p>The font is fixed width and height, so making a background bitmap dynamically isn't difficult, and is probably the quickest and easiest solution. In fact, if you size it correctly there will only be one stretched pixel per character.</p> <p>Color the pixel (or pixels) according to the background of the character.<...
8,545
<p>I would like to be able to know, in run-time in my code, how much memory a certain object is taking (a Dataset in this case, but i'm looking for a "general" solution).</p> <p>Is this possible through reflection?</p> <p>This is for .Net 2.0.</p> <p>Thanks!</p>
<p>I believe this is a duplicate. Check out: </p> <ul> <li><a href="https://stackoverflow.com/questions/155022/what-is-the-easiest-way-to-find-out-how-much-memory-an-object-uses-in-net">What is the easiest way to find out how much memory an object uses in .NET?</a></li> <li><a href="https://stackoverflow.com/questions...
<pre><code>int size = Marshal.SizeOf(typeof(int)); </code></pre> <p>That should work too.</p>
28,136
<p>Ok so I've ordered <a href="http://www.amazon.co.uk/Applying-Domain-Driven-Design-Patterns-Using/dp/0321268202/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1226403396&amp;sr=1-1" rel="noreferrer">Applying Domain-Driven Design and Patterns: Using .Net</a>, but while I wait for it to arrive I'm looking at starting to apply ...
<p>The following CodePlex projects seem to be right up your ally:</p> <ul> <li><a href="http://www.codeplex.com/dddpds" rel="noreferrer">.NET Domain-Driven Design with C#: Problem-Design-Solution</a></li> <li><a href="http://www.codeplex.com/domaindrivendesign" rel="noreferrer">Domain Driven Design (.NET) Example Appl...
<p>As part of a talk I have done at a Dutch .NET community event, I have started implementing a full-blown Silverlight 4 example using CQRS and Event Sourcing. It relies heavily on one of the most serious open-source CQRS initiatives, <a href="http://ncqrs.org/" rel="nofollow noreferrer">NCQRS</a>. You can find its cor...
35,497
<p>When I do an update and zillions of files are updated, I often miss the one that aren't merged because of conflicts. The only way I have is to go through all my changelists and look at file icons.</p> <p>Isn't there a nicer way ? even a console based command would do...</p>
<p>You could immediately do an update again, which this time would just print out the conflicts. If you are using p4v, make sure you have the log showing, as the results should scroll through there.</p>
<p>You could immediately do an update again, which this time would just print out the conflicts. If you are using p4v, make sure you have the log showing, as the results should scroll through there.</p>
47,385
<p>What would be the quickest way to construct a Python binding to a C or C++ library?</p> <p>(I am using Windows if this matters.)</p>
<p><a href="https://docs.python.org/3/library/ctypes.html" rel="noreferrer">ctypes</a> module is part of the standard library, and therefore is more stable and widely available than <a href="http://www.swig.org/" rel="noreferrer">swig</a>, which always tended to give me <a href="http://groups.google.com/group/comp.lang...
<p>First you should decide what is your particular purpose. The official Python documentation on <a href="https://docs.python.org/2/extending/" rel="nofollow noreferrer">extending and embedding the Python interpreter</a> was mentioned above, I can add a good <a href="http://web.archive.org/web/20160530183233/http://pyt...
17,516
<p>currently i have jdbc code with the following basic stucture:</p> <p>get Connection</p> <p>(do the next 4 lines several times, never closing statement)<br> get statement<br> get result set<br> process result set<br> close result set </p> <p>close connection </p> <p>It occurred to me after writing this code tha...
<p>The answer depends on your JDBC driver unfortunately. What you wrote there might work.</p> <p>However, the general rule is that you close your statement only when you are done with the corresponding resultset. </p> <p>EDIT: I realize that you had a second question where you asked about the effects of not closing t...
<p>If you're using Oracle and forget to close the statements you'll get </p> <pre><code>ORA-01000: maximum open cursors exceeded </code></pre> <p>after a while.</p>
31,765
<p>Some background info;</p> <ul> <li>LanguageResource is the base class</li> <li>LanguageTranslatorResource and LanguageEditorResource inherit from LanguageResource</li> <li>LanguageEditorResource defines an IsDirty property</li> <li>LanguageResourceCollection is a collection of LanguageResource</li> <li>LanguageReso...
<p>It sounds like your collection implements <code>IEnumerable</code>, not <code>IEnumerable&lt;T&gt;</code>, hence you need:</p> <pre><code>_resources.Cast&lt;LanguageEditorResource&gt;().Where(r =&gt; r.IsDirty) </code></pre> <p>Note that <code>Enumerable.Where</code> is defined on <code>IEnumerable&lt;T&gt;</code>...
<p>In addition to Marc G's answer, and if you're able to do so, you might want to consider dropping your custom <code>LanguageResourceCollection</code> class in favour of a generic <code>List&lt;LanguageResource&gt;</code>. This will solve your current problem and get rid of that nasty .NET 1.1ish custom collection.</p...
33,614
<p>Since there are no header sections for user controls in asp.net, user controls have no way of knowing about stylesheet files. So css classes in the user controls are not recognized by visual studio and produces warnings. How can I make a user control know that it will relate to a css class, so if it is warning me ab...
<p>Here's what I did:</p> <pre><code>&lt;link rel="Stylesheet" type="text/css" href="Stylesheet.css" id="style" runat="server" visible="false" /&gt; </code></pre> <p>It fools Visual Studio into thinking you've added a stylesheet to the page but it doesn't get rendered.</p> <hr> <p>Here's an even more concise way to...
<p>You Can use <code>CSS</code> direct in <code>userControl</code>.</p> <p>Use this in <code>UserControl</code>:</p> <pre><code> &lt;head&gt; &lt;title&gt;&lt;/title&gt; &lt;style type="text/css"&gt; .wrapper { margin: 0 auto -142px; /* the bottom margin is the negative value of the...
5,459
<p>I was reading about the <code>debuggerstepperboundary</code> attribute and a site says it is is useful in a context switch.</p> <p>What exactly is a context switch? I'm assuming it is a switch from one thread to another, or in execution or security context? However, these are not particularly educated guesses so I'...
<p>A context switch (also sometimes referred to as a process switch or a task switch) is the switching of the CPU (central processing unit) from one process or thread to another.</p> <p>Context switching can be described in slightly more detail as the kernel (i.e., the core of the operating system) performing the foll...
<blockquote> <p>Switching the CPU core to another process requires performing a state save of the current process and a state restore of a different process. This task is known as a <strong><em>context switch</em></strong></p> </blockquote> <p>Excerpted from: Operating System Concepts, Abraham (Dinosaurs coverpa...
38,467
<p>I often get a problem with Windows Installer trying to uninstall a package, but it complains that:</p> <blockquote> <p>The feature you are trying to use is on a network resource that is unavailable.</p> </blockquote> <p>Is there a known means of uninstalling such packages when the original MSI is simply not avai...
<p>Please note that Microsoft has now released an official tool to resolve these issues, without the problems that previously existed with MSIZAP.</p> <ul> <li>Microsoft Fixit: <a href="http://support.microsoft.com/mats/Program_Install_and_Uninstall" rel="noreferrer">Fix problems with programs that can't be installed ...
<p>Control Panel --> Add/Remove programs?</p> <p><strong>EDIT:</strong> Your post mentions nothing about using add remove programs to uninstall the app, you said the "Windows Installer" (MSIEXEC - see the link below), which is not the same thing.</p> <p><a href="http://msdn.microsoft.com/en-us/library/aa367988(VS.85)...
43,373
<p>Say I have a hierarchy of classes, let's use the classic <code>Shape</code> examples: </p> <p><code>abstract class Shape</code><br> <code>Circle : Shape</code><br> <code>Square : Shape</code> </p> <p>I have a second hierarchy of renderer classes that handle the rendering of shapes in different ways:</p> <p><code>...
<p>I think it <em>should</em> be a breaking change. If you add a shape, the existing renderers clearly aren't going to be able to cope - they'll need to be changed.</p> <p>You could change ShapeRenderer to add RenderTriangle() as a virtual (non-abstract) method which just logs the fact that it can't render appropriate...
<p>Design to an interface not an implementation.</p> <p>Hey - I get to use the same answer twice today (i guess it's arguable that Renderer is an implementation)...</p> <p>I'm not sure I'd go with the ShapeRenderer class. What about an IRenderHTML, IRenderWindows that are implemented by the shape classes? </p> <p>...
46,039
<p>I found some informations about controlling IIS 5.1 from command line via adsutil.vbs (<a href="http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/d3df4bc9-0954-459a-b5e6-7a8bc462960c.mspx?mfr=true" rel="nofollow noreferrer">http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Libra...
<p>The microsoft official way is just to copy them into the relevant folders (as seen by downloading their template packs). However, you could also create your own site definition and add the items to the correct libraries and lists in the same way that the master pages are added.</p> <p>If you are going to deploy CS...
<p>Consider uploading them to "Style Library" in the root of the site collection. <p>If you don't have a "Style Library" at the root, consider making one -- it's just a document library. <p>Make sure the permissions are set correctly so everyone who needs to read it can. <p>You can reference them using "/Style%20Librar...
7,713
<p>I am using the program below to sort and eventually print out email messages. Some messages may contain attachments or HTML code, which would not be good for printing. Is there an easy way to strip attachments and strip HTML but not the text formatted by HTML from the messages?</p> <pre><code>#!/usr/bin/perl use wa...
<p><code>Mail::Message::isMultipart</code> will tell you whether a given message has any attachments. <code>Mail::Message::parts</code> will give you a list of the mail parts.</p> <p>Thus:</p> <pre><code>if ( $msg-&gt;isMultipart ) { foreach my $part ( $msg-&gt;parts ) { if ( $part-&gt;contentType eq 'tex...
<p>It looks like someone has already <a href="http://www.linuxquestions.org/questions/programming-9/perl-mimehtml-mail-48546/" rel="nofollow noreferrer">solved this on the linuxquestions forum</a>.</p> <p>From the forum:</p> <pre><code> # This is part of Mail::POP3Client to get the headers and body of the ...
48,504
<p>I'm looking into using MemCached for a web application I am developing and after researching MemCached over the past few days, I have come across a question I could not find the answer to.</p> <p><strong>How do you link Memcached server together or how do you replicate data between MemCached server?</strong></p> <...
<p>I've used <a href="http://code.google.com/p/beitmemcached/wiki/Embed" rel="noreferrer">BeITMemcached</a> and in that you create an instance of MemcacheClient and set the servers you want to use, just as strings.</p> <p>At that point the client itself determines which of the servers it has available to put different...
<p>Memcached does not provide replication property. To do that, you need to add the server to memcached client server list and then hit the DB for the data to be stored in that particular server.</p>
45,906
<p>I have a game in which you can score from -40 to +40 on each match. Users are allowed to play any number of matches. I want to calculate a total score that implicitly takes into account the number of matches played.</p> <p>Calculating only the average is not fair. For example, if Peter plays four games and gets 40...
<p>It depends what you want to accentuate, but I think this is both simple and effective:</p> <p>average score + games played</p> <p>You could weight the variables a bit (e.g. 2* games played, if you want to have more of an impact) - but the basic relationship seems reasonable.</p> <p>In your first example Peter wou...
<p>It depends how much you want to weight games played compared to the scores. You could define a function that returned a games played weight: some smallish fraction for only one game and 1 for a lot of games (e.g. 1 - 1/(2 * #Games)) and multiple that by the cumulative score.</p>
35,466
<p>I have an app where I would like to support device rotation in certain views but other don't particularly make sense in Landscape mode, so as I swapping the views out I would like to force the rotation to be set to portrait.</p> <p>There is an undocumented property setter on UIDevice that does the trick but obvious...
<p>This is long after the fact, but just in case anybody comes along who isn't using a navigation controller and/or doesn't wish to use undocumented methods:</p> <pre><code>UIViewController *c = [[UIViewController alloc]init]; [self presentModalViewController:c animated:NO]; [self dismissModalViewControllerAnimated:NO...
<p>If you are using UIViewControllers, there is this method:</p> <pre><code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation </code></pre> <p>Return <code>NO</code> for the view controllers containing the views you don't want to rotate.</p> <p><a href="http://developer.appl...
21,947
<p>What do I need to do to avoid the "Manual Install" in Firefox for a Plugin and where do I have to go or what do I have to do to avoid the (Author not verified) message when downloading a Plugin. Ideally I would like to initiate the installation of the Plugin automatically and if I need to sign the Plugin somehow to ...
<p>Here is the <a href="http://www.mozdevgroup.com/docs/pete/Signing-an-XPI.html" rel="nofollow noreferrer">official tutorial</a>, which only deals with signing the XPI. I don't believe it's possible to install the plug in automatically for rather obvious security reasons.</p>
<p>Here is the <a href="https://www.mozdevgroup.com/docs/pete/Signing-an-XPI.html" rel="nofollow noreferrer">official tutorial </a> which deals with signing the XPI. Automatic installation isn't possible because of the security considerations.</p>
34,973
<p>I am trying to unit test my WPF databindings using the test suit provided by Microsoft Team System. I would like to be able to test the bindings without showing the window because most of my tests will be for user controls and not actually on a window. Is this possible or is there a better way to do it? The code ...
<p>Shane, if what you're really worried about is a binding breaking silently, you should look at redirecting the binding traces to somewhere you can examine. I'd start here:</p> <p><a href="http://blogs.msdn.com/mikehillberg/archive/2006/09/14/WpfTraceSources.aspx" rel="nofollow noreferrer">http://blogs.msdn.com/mikeh...
<p>you can try <a href="http://guia.codeplex.com" rel="nofollow">Guia</a>. With it you can unit-test your UserControl and check if the data binding is correct. You have to show the window though.</p> <p>Here is an example. It starts a new instance of your UserControl and sets its DataContext and then checks if the tex...
42,900
<p>I've recently created these two (unrelated) methods to replace lots of boiler-plate code in my winforms application. As far as I can tell, they work ok, but I need some reassurance/advice on whether there are some problems I might be missing.</p> <p>(from memory)</p> <pre><code>static class SafeInvoker { //Uti...
<p>This is good stuff. Make them extension methods though to clean up your code a little more. For example:</p> <pre><code>//Replaces OnMyEventRaised boiler-plate code //Usage: SafeInvoker.RaiseEvent(this, MyEventRaised) public static void Raise(this EventHandler eventToRaise, object sender) { EventHandler...
<p>Similar patterns have worked for me with no problems. I am not sure why you are wrapping Action in MethodInvoker though.</p>
23,455
<p>Assume I have a function like this:</p> <pre><code>MyClass &amp;MyFunction(void) { static MyClass *ptr = 0; if (ptr == 0) ptr = new MyClass; return MyClass; } </code></pre> <p>The question is at program exit time, will the ptr variable ever become invalid (i.e. the contents of that ptr are cleaned up by ...
<p>When you process exits the all memory pages allocated to it will be freed by the OS (modulo shared memory pages that someone else may be using).</p> <p>However, as others point out the destructor for MyClass is never called. Nor is the value pointed to by ptr ever changed. If you have a static int with the value 1...
<p>The short answer is "no": your pointer will not "become invalid" at program exit time. I.e. the pointer value will not automatically be reset to null, and destructor of the MyClass object to which it points will not automatically be called.</p> <p>This is because a pointer is a "primitive type", i.e. not an object....
39,306
<p>As a complete beginner with no programming experience, I am trying to find beautiful Python code to study and play with. Please answer by pointing to a website, a book or some software project.</p> <p>I have the following criterias:</p> <ul> <li>complete code listings (working, hackable code)</li> <li>beautiful co...
<p>Buy <a href="https://rads.stackoverflow.com/amzn/click/com/0596529325" rel="noreferrer" rel="nofollow noreferrer">Programming Collective Intelligence</a>. Great book of interesting AI algorithms based on mining data and all of the examples are in very easy to read Python.</p> <p>The other great book is <a href="htt...
<p>I'd recommend you review Exaile music player for linux. It includes a lot of practically useful things like plugins, lambda, decorators, settings manager, gui (using GTK+) and much more.</p> <p>Exaile source code is not an ideal but will give you enough helpful information and basic Python coding concepts.</p>
15,197
<p>Is there a way (a program, a library) to approximately know which language a document is written in?</p> <p>I have a bunch of text documents (~500K) in mixed languages to import in a i18n enabled CMS (Drupal)..</p> <p>I don't need perfect matches, only some guess.</p>
<p>There is a pretty easy way to do this, given that you have corpus data in all the different languages you'll need to identify. It's called n-gram modeling. I think <a href="http://search.cpan.org/~ambs/Lingua-Identify-0.51/lib/Lingua/Identify.pm" rel="nofollow noreferrer">Lingua::Identify</a> does this already, thou...
<p>There seems to be a Perl module for this: <a href="https://metacpan.org/pod/Lingua::Identify" rel="nofollow noreferrer">Lingua::Identify</a></p> <p>Paul.</p>
32,086
<p>I'm evaluating Microsoft Team Foundation Server for my customer, who currently uses Visual SourceSafe and nothing else. They have explicitly expressed a desire to implement a more rigid and process-driven environment as their application is in production and they have future releases to consider.</p> <p>The particu...
<p>Good question(s). I've never used TFS but all this certainly is possible with a number of tools. The biggest hurdle is the culture and mindset of the company and developers. </p> <p>I am pro SVN. (But TFS would work I am sure)</p> <p>I'd suggest very light intrusion on daily tasks. </p> <p>Having sandboxes or...
<p>As much as people hate consultants, you might consider talking to a firm that does commercial svn support. If TFS is as expensive as you say, this may save you some money with the benefit of starting you off with a good setup. There are risks involved with this of course.</p>
37,129
<p>The following loop takes about 700 seconds to run in octave and 22 seconds to run in matlab when the DJI matrix has 21000 rows. How can I increase the efficiency of this?</p> <pre> for i=1:length(DJI) DJI2(i,1)=datenum(char(DJI(i,2)),'yyyy-mm-dd'); end </pre>
<p><a href="https://stackoverflow.com/questions/346842/mysql-query-takes-15-seconds-to-run-what-can-i-do-to-cacheimprove-it-php#346851">MarkR</a> mentioned the index. Make sure you:</p> <pre><code>create index videotags_tag_id on videotags(tag_id); </code></pre>
<p>I think your best bet is to create some kind of summary table which you maintain when things change.</p> <p>The query above needs to scan all the rows in the table in order to find the aggregates in the group by - there is NO WHERE CLAUSE. A query with no where clause has no hope of optimisation, as it necessarily ...
45,131
<p>I need customers to be able to download PDFs of letters that have been sent to them.</p> <p>I have read the threads about database versus filesystem storage of documents or images, and it does sound like the consensus is that, for anything more than just a few images, filesystem is the way to go.</p> <p>What I wan...
<p>If it is for archival purposes, I would definitely store the PDF because in future, your PDF generation script may change and then the letter will not be exactly the same as what was originally sent. The customer will be expecting it to be exactly the same.</p> <p>It doesn't matter what approach is superior, someti...
<p>I'm inclined to say "it depends".</p> <p>When one document is requested many times, it may be a saving if you compose it on the first request, and retrieve it subsequentially.</p> <p>OTOH if most requests for a document are of the just-once type, and the creation process doesn't eat up most of your server capacity...
28,188
<p>Is it possible to prevent an asp.net Hyperlink control from linking, i.e. so that it appears as a label, without actually having to replace the control with a label? Maybe using CSS or setting an attribute?</p> <p>I know that marking it as disabled works but then it gets displayed differently (greyed out).</p> <p>...
<p>This sounds like a job for JQuery. Just give a specific class name to all of the HyperLink controls that you want the URLs removed and then apply the following JQuery snippet to the bottom of your page:</p> <pre><code>$(document).ready(function() { $('a.NoLink').removeAttr('href') }); </code></pre> <p>All of ...
<p>If you are using databind in asp.net handle the databinding event and just don't set the NavigateUrl if that users is disabled.</p>
7,186
<p>I have 16,000 jpg's from a webcan screeb grabber that I let run for a year pointing into the back year. I want to find a way to grab every 4th image so that I can then put them into another directory so I can later turn them into a movie. Is there a simple bash script or other way under linux that I can do this.</p>...
<p>One simple way is: </p> <pre> $ touch a b c d e f g h i j k l m n o p q r s t u v w x y z $ mv $(ls | awk '{nr++; if (nr % 4 == 0) print $0}') destdir </pre>
<p>Just iterate over a list of files:</p> <pre><code>files=( frame-*.jpg ) i=0 while [[ $i -lt ${#files} ]] ; do cur_file=${files[$i]} mungle_frame $cur_file i=$( expr $i + 4 ) done </code></pre>
9,732
<p>Compiling this lines</p> <pre><code> long int sz; char tmpret[128]; //take substring of c, translate in c string, convert to int, //and multiply with 1024 sz=atoi(c.substr(0,pos).c_str())*1024; snprintf(tmpret,128,"%l",sz); </code></pre> <p>I read two warning on snprintf line:</p> <pre>...
<p>Your format lacks type, because l is a "sizeof" modifier. Should be %ld </p>
<p>int sprintf ( char * str, const char * format, ... );</p> <p>It does not require the length of "str", as the second argument. The name of the string pointer/ array name is enough.</p>
43,923
<p>How do you fix a names mismatch problem, if the client-side names are keywords or reserved words in the server-side language you are using?</p> <p>The DOJO JavaScript toolkit has a QueryReadStore class that you can subclass to submit REST patterned queries to the server. I'm using this in conjunction w/ the Filteri...
<p>While it feels like the wrong thing to do, because I'm hacking at a well tested, nicely written JavaScript toolkit, this is how I fixed the problem:</p> <p>I went into the DOJOX QueryReadStore.js and <b>replaced</b> the "start" and "count" references with acceptable (to the server-side language) parameter names.</p...
<p>As opposed to removing it from the API, as you mentioned, you can actually create a subclass with your own fetch, and remove start/count parameters (theoretically). Have a look at this URL for guidance:</p> <p><a href="http://www.sitepen.com/blog/2008/06/25/web-service-data-store/" rel="nofollow noreferrer">http://...
23,414
<p>Can you suggest an asp.net 3.5 hosting provider with continuous integration (cctray – nant builds) and source control facilities (svn)? </p> <p>My requirement would be something like this: </p> <ul> <li>I checkin to a svn branch (say trunk) on the hosting provider space.</li> <li>CruiseControl.NET on the server ...
<p>I would also have to suggest a VPS as I have yet to see a Shared Hosting provider with compilers installed.</p> <p>On the code repository side <a href="http://www.assembla.com/" rel="nofollow noreferrer">Assembla.com</a> has free svn hosting and they also provide a way to kick off a build process by allowing you to...
<p>I agree with everyone here. For every custom demands, it would be cheaper to look on a VPS / dedicated server to perform what you ask. You may find what you need, but at a high cost.</p>
16,024
<p>In c#, we have interfaces. Where did these come from? They didn't exist in c++.</p>
<p>Interfaces are pretty old, and have been around for quite a while.</p> <p>Early (mid to late late 1970's) non-object oriented languages such as Modula and Euclid used constructs called "modules" to specify the interfaces between components. Components would then communicate with each other via explicit importing an...
<p>Java, perhaps?</p> <p><a href="http://java.sun.com/docs/books/tutorial/java/concepts/interface.html" rel="nofollow noreferrer">http://java.sun.com/docs/books/tutorial/java/concepts/interface.html</a></p>
12,417
<p>I'm currently printing 11 copies of the same model. I noticed as it's printing that it seems to work on one model at a time but doesn't travel to the nearest model next. I suspect it's traveling around the bed in the order that I put the models in the slicer. This is resulting in extra unnecessary travel and ther...
<p>It's well known in mathematical circles that the &quot;salesman problem&quot; is what mathematicians call &quot;hard&quot; -- in their usage, that means a lot of extremely smart people have worked on the problem for many years (more than a century?) and still not found a robust, works-every-time solution.</p> <p>Wha...
<p><strong>Long story short:</strong> I only know the setting &quot;Combing Mode OFF&quot; that improves the travel paths. In my case it did not help. In your case I suggest you should give PrusaSlicer a try. I assume that the overall print duration will be improved because of a better calculation of the travel paths. ...
1,991
<p>I need to extend MS Project's functionality for my company, so I would like to embed some .NET GUI controls into Project. The plan is that my controls save the user input into my custom DB tables, but I do have to bind them to tasks, current user, resources etc. Could you give me some advise how to start? I am inter...
<p><a href="http://www.add-in-express.com/add-in-net/" rel="nofollow noreferrer" title="Add-In Express">Add-In Express</a> is a great library for writing .Net plugins for MS Office, including Project.</p> <p>Can't say I've used it with Project myself (only Visio really), but I know there is support for it, so might be...
<p>AFAIK you can not embed a control in Project, all you can do is make a plugin.</p>
24,464
<p>The CSRF prevention built in to Rails is causing some problems for some automated load testing we are doing, and I want to turn it off for the duration of the process. How do I do this?</p>
<p>I love simple questions with clear answers.</p> <pre><code>#I go in application.rb self.allow_forgery_protection = false </code></pre> <p>If you want to do this for testing only you can move that into one of the environment files (obviously, you'll be touching <code>Application</code> then rather than <code>self</...
<p>In Rails 3, remove the <code>protect_from_forgery</code> command in <code>app/controllers/application_controller.rb</code></p>
16,741
<p>I print ABS on a LulzBot Taz 5 and frequently have issues with the corners of objects lifting off the bed.</p> <p>My extruder is at 230&nbsp;°C and the bed is at 90&nbsp;°C for the first layer and 100&nbsp;°C for the rest of the layers.</p> <p>I have experimented with using ABS slurry (ABS + acetone) on the bed fo...
<p>There are many different approaches to solving this issue and most of the answers already are spot-on. However, the fundamental reason for the "warping" is incorrect and inconsistent temperature across the material.</p> <p>If there is too much fluctuation in the temperature across the object in this heated state ca...
<p>I think you answered your question in your statement. Lulzbot and ABS. Lulz does not have an enclosure. </p> <p>Try using PLA for an open air system. Or build an enclosure. Following you can add glue or hairspray.</p> <p>But I promise you, with any open air printer, you will face this problem. I only use ABS on my...
102
<p>I have a Visual Studio solution with four C# projects in it. I want to step into the code of a supporting project in the solution from my main project, but when I use the "Step into" key, it just skips over the call into that other project. I've set breakpoints in the supporting project, and they're ignored, and I c...
<p>Not sure if this is it, but "Tools>Options>Debugging>General:Enable Just My Code" is a possibility. (I prefer to always leave this unchecked.)</p>
<p>A couple of possibilities:</p> <ul> <li><p>There is a check box to step into "just my code". Its intent is to make it so you can't step into Microsoft's Framework code (unless you choose to by unchecking the box). </p></li> <li><p>You might try recompiling the supporting code to make sure the code you're debugging ...
27,445
<p>Note: I know very little about the GCC toolchain, so this question may not make much sense.</p> <p>Since GCC includes an Ada front end, and it can emit ARM, and devKitPro is based on GCC, is it possible to use Ada instead of C/C++ for writing code on the DS?</p> <p>Edit: It seems that the target that devKitARM use...
<p>devkitPro is not a toolchain, compiler or indeed any software package. The toolchain used to target the DS is devkitARM, one of the toolchains provided by devkitPro.</p> <p>It may be possible to build the ada compiler but I doubt very much if you'll ever manage to get anything useful running on the DS itself. devki...
<p>On a practical plane, it is not possible.</p> <p>On a theoretical plane, you could use one custom Ada parser (I found <a href="http://www.antlr.org/grammar/ada" rel="nofollow noreferrer">this one</a> on the <a href="http://www.antlr.org" rel="nofollow noreferrer">ANTLR</a> site, but it is quite old) in order to tra...
17,501
<p>I'm about to push out a website soon and so I've gotten in the last stages. Time to optimize the baby! The website performs pretty good overall, with an average framerate of 32fps. But at some heavy animation parts it likes to drop a couple of frames to about 22fps. Which is not that horrible. But I'm tweaking it as...
<p>Alpha transparency can be intensive to render...</p> <p>From what I've heard, the glow filter will wreak havoc if you are animating it.</p> <p>Use visible = false instead of alpha = 0 where possible.</p>
<p>Flash (8 - Actionscript 2 or below) will render a clip even if it's visibility is set to false - to stop it being rendered you need to move it off the 'visible' screen (i.e. x = -2000, provided the clips width is less than 2000). </p>
18,750
<p>I have recently purchased an Anet A8 but have been wondering why the prints look squished and have tiny balls on them. </p> <p>I am using 1.75&nbsp;mm cheap PLA bought from eBay and have also had problems of filament oozing out of the print block. </p> <p><img src="https://i.stack.imgur.com/9bEPO.jpg" alt="Photos ...
<p>It could be that cheap filament has inconsistent diameter, or your calibration is over extruding, or you have something loose that needs to be tight. It's hard for me to tell precisely from just these images. In your shoes, I would print 20mm x 20mm x 10mm, 100% infill boxes until I got it dialed in so that it is ...
<p>You may be having an over-extrusion issue, you should check the flow rate in whatever slicer you use. </p> <p>You should also check to make sure that the filament diameter you are using matches that of the diameter setting in your slicer.</p>
587
<p>getEmployeeNameByBatchId(int batchID)<BR> getEmployeeNameBySSN(Object SSN)<BR> getEmployeeNameByEmailId(String emailID)<BR> getEmployeeNameBySalaryAccount(SalaryAccount salaryAccount)<BR></p> <p>or</p> <p>getEmployeeName(int typeOfIdentifier, byte[] identifier) -> In this methods the typeOfIdentifier tells if iden...
<p>Why not overload the getEmployeeName(??) method? <br> <br> getEmployeeName(int BatchID)<br> <strike>getEmployeeName(object SSN)</strike>(bad idea)<br> getEmployeeName(String Email)<br> etc.</p> <p>Seems a good 'many' approach to me.</p>
<p>You are thinking C/C++.</p> <p>Use objects instead of an identifier byte (or int).</p> <p><strong>My Bad, the overload approach is better and using the SSN as a primary key is not so good</strong></p> <pre><code>public ??? getEmployeeName(Object obj){ if (obj instanceof Integer){ ... } else if (obj instanceo...
10,648
<p>Debugging some finance-related SQL code found a strange issue with numeric(24,8) mathematics precision.</p> <p>Running the following query on your MSSQL you would get A + B * C expression result to be 0.123457</p> <p>SELECT A, B, C, A + B * C FROM ( SELECT CAST(0.12345678 AS NUMERIC(24,8)) AS ...
<p>Just as addition of the float type is inaccurate, multiplication of the decimal types can be inaccurate (or cause inaccuracy) if you exceed the precision. See <a href="http://msdn.microsoft.com/en-us/library/ms191530%28SQL.90%29.aspx#_decimal" rel="noreferrer">Data Type Conversion</a> and <a href="http://msdn.micros...
<p>Following the logic pointed out by <a href="https://stackoverflow.com/questions/126401/sql-server-2005-numeric-precision-loss#126473">eed3si9n</a> and what you said in your question it seems that the best approach when doing mathematics operations is to extract them into a function and additionally to specify precis...
15,376
<p>I suspect that one of my applications eats more CPU cycles than I want it to. The problem is - it happens in bursts, and just looking at the task manager doesn't help me as it shows immediate usage only.</p> <p>Is there a way (on Windows) to track the history of CPU &amp; Memory usage for some process. E.g. I will ...
<p>Press <kbd>Win</kbd>+<kbd>R</kbd>, type <code>perfmon</code> and press <kbd>Enter</kbd>. When the Performance window is open, click on the <strong>+</strong> sign to add new counters to the graph. The counters are different aspects of how your PC works and are grouped by similarity into groups called &quot;Performan...
<p>I use taskinfo for history graph of CPU/RAM/IO speed. <a href="http://www.iarsn.com/taskinfo.html" rel="nofollow noreferrer">http://www.iarsn.com/taskinfo.html</a></p> <p>But bursts of unresponsiveness, sounds more like interrupt time due to a falty HD/SS drive. </p>
9,474
<p><b>Summary:</b> C#/.NET is supposed to be garbage collected. C# has a destructor, used to clean resources. What happen when an object A is garbage collected the same line I try to clone one of its variable members? Apparently, on multiprocessors, sometimes, the garbage collector wins...</p> <p><b>The problem</b></p>...
<p>It's simply a bug in your code: finalizers should not be accessing managed objects.</p> <p>The only reason to implement a finalizer is to release unmanaged resources. And in this case, you should carefully implement <a href="http://msdn.microsoft.com/en-us/library/b1yfkh5e.aspx" rel="noreferrer">the standard IDisp...
<h2>The Full Code</h2> <p>You'll find below the full code, copy/pasted from a Visual C++ 2008 .cs file. As I'm now on Linux, and without any Mono compiler or knowledge about its use, there's no way I can do tests now. Still, a couple of hours ago, I saw this code work and its bug:</p> <pre><code>using System; using Sys...
16,301
<p>Could anybody explain in plain words how Cloud computing works? I have read the <a href="http://en.wikipedia.org/wiki/Cloud_computing" rel="noreferrer">Wikipedia article</a>, but still not sure that I understand how cloud actually works.</p>
<p>Aside from the latest marketing term?</p> <p>Basically all the resources your program needs are held "somewhere" on the internet. You interact with them via a defined service contract; SOAP, REST, POX or whatever and what happens after that is up to the service provider. You don't care about how your information is...
<p>None of those things makes your application a cloud application. It's a cloud application if it runs in a cloud. What is a cloud?</p> <p><a href="https://stackoverflow.com/questions/1349894/difference-between-cloud-computing-and-distributed-computing">Difference between cloud computing and distributed computing?</a...
13,342
<p>If everything that can be accomplished in <a href="http://en.wikipedia.org/wiki/MXML" rel="nofollow noreferrer">MXML</a> can also be accomplished in ActionScript and many things are easier to accomplish in ActionScript (loops, conditionals, etc) why take the time to learn MXML?</p> <p>The best reasons I have at thi...
<p>It depends on your application's needs, but I generally break my design into visual chunks and use custom MXML components to lay out the main areas and components of my application (data panels, dialog boxes, etc) using mxml based custom components. Then I'll augment that with custom actionscript components where I ...
<p>Designing UI elements with mxml and the visual designer is much easier than in code, and less error-prone in my opinion.</p> <p>Even if the UI changes dynamically, often this means swapping pre-defined UI elements in and out.</p>
32,764
<p>I have a couple databases on a shared SQL Server 2005 cluster instance, that I would like performance metrics on. I have some processes that run for a very long time and suspect that code inefficiencies, rather than insufficient hardware are to blame.</p> <p>I would like some way to get these performance metrics so...
<p>The trick is to subscribe to the databinding event of the itemplaceholder in the ItemTemplate. </p> <p>The complete solution:</p> <pre><code>public class FibonacciControl : CompositeControl { public FibonacciControl() { // .... } protected override void CreateChildControls() { ...
<p>Setup a class like:</p> <pre><code>public delegate void InstantiateTemplateDelegate(Control container); public class GenericTemplateImplementation : ITemplate { private InstantiateTemplateDelegate instantiateTemplate; public void InstantiateIn(Control container) { this.instantiateTemplate(cont...
11,815
<p><strong>PHONE HOME</strong></p> <p>Everybody wants to now and then. ...What about software when it grows up and becomes a mature product? Shouldn't it be an adult and live in its new home quietly? Or, should it show some affection from whence it came?...</p> <p>I've heard some say they'd rip out from the platters ...
<p>Informed consent, where informed means that the type, frequency and content of the information you'll be sending is told to the client is truly the only reasonable option, else you start closely resembling a malware author. People will find out and will dislike you a lot if you tried to pull it off sneakily. You pro...
<p>Applications "phon[ing] home" is a very generic term, mostly used in a rather hysterical way ("iPhone phones home!!", "Microsoft Vista phones home!!")</p> <p>Any software that checks for updates is "phoning home". I simply do not care if it does this.</p> <p>Conversely, crapware (adware/spyware/viruses) that submi...
29,192
<p>I have a table of events with a recorded start and end time as a MySQL DATETIME object (in the format <code>YYYY-MM-DD HH:MM:SS</code>. I want to find all events that occur in a specific date range. However, events can span multiple days (and go outside of my date range, but I want to return them if they even overla...
<p>This will find every event that is completely contained inside the range:</p> <pre><code>SELECT * FROM table WHERE start_date BETWEEN start_of_range AND end_of_range AND stop_date BETWEEN start_of_range AND end_of_range </code></pre> <p>This will find any events where any part of the event ...
<p>Llya, Roberts answer with,</p> <p>SELECT * FROM table WHERE start_date &lt;= end_of_range AND stop_date >= start_of_range</p> <p>works fine with,</p> <p>D) events with both starting and ending dates outside the range, but overlapping it</p> <p>??</p>
35,088
<p>Given a reference to a method, is there a way to check whether the method is bound to an object or not? Can you also access the instance that it's bound to?</p>
<pre class="lang-py prettyprint-override"><code>def isbound(method): return method.im_self is not None def instance(bounded_method): return bounded_method.im_self </code></pre> <p><a href="https://docs.python.org/2.7/reference/datamodel.html#index-40" rel="nofollow noreferrer">User-defined methods:</a></p>...
<p>A solution that works for both Python 2 and 3 is tricky.</p> <p>Using the package <a href="https://six.readthedocs.io/" rel="nofollow noreferrer"><code>six</code></a>, one solution could be:</p> <pre class="lang-py prettyprint-override"><code>def is_bound_method(f): &quot;&quot;&quot;Whether f is a bound method&...
7,666
<p>While I grew up using MSWindows, I transitioned to my much-loved Mac years ago. I don't want to start a flame war here on operating systems. I do, however, want a terminal a litle closer to what I'm used to.</p> <p>I'm not asking for full POSIX support - I don't have the patience to install Cygwin - but I miss ta...
<p>Some more options:</p> <p><a href="http://www.mingw.org" rel="nofollow noreferrer">MSYS</a>: a Minimal SYStem providing a POSIX compatible Bourne shell environment, with a small collection of UNIX command line tools. Primarily developed as a means to execute the configure scripts and Makefiles used to build Open So...
<p><a href="http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx" rel="nofollow noreferrer">PowerShell</a> is worth looking into. </p>
3,136
<p>Which technology stack is best for the creation of a two dimensional MMORPG and why?</p> <p>This question is loaded, so which are the major factors would you consider for development in such a domain?</p>
<p>I develop Flash for a living, so my answer should be taken with a grain of salt. I reccomend Flash for the following reasons:</p> <ol> <li>Size of install base. I don't have numbers for Silverlight but Flash 9 (the latest non-alpha revision) is <a href="http://www.adobe.com/products/player_census/flashplayer/versio...
<p>Being a .Net person, I'd say Silverlight.</p> <ul> <li>Being a game, speed is important, so .Net's JIT compiling is a bonus. I'm not sure if ActionScript is compiled or not.</li> <li>Lots of libraries available for .Net, geared towards game development. For example, you can implement a custom GraphicsDevice for the...
24,455
<p>i am planning a simple, dual-language website and i'd like to use a .net based cms but i can't find anything suitable. i have experience with dotnetnuke and sharepoint but neither fit the bill - dotnetnuke does not do dynamic site elements multi-lingually &amp; sharepoint is a monster PITA no matter what angle you ...
<p>Have you looked at <a href="http://www.umbraco.org/" rel="nofollow noreferrer">Umbraco</a>? I have worked with it to try out for clients and it looks really good.</p> <p>I would look to them as a possible solution.</p>
<p>For .NET, assuming you're comfortable with XSLT, Umbraco - <a href="http://www.umbraco.org" rel="nofollow noreferrer">www.umbraco.org</a></p> <p>The XSLT qualification is important because that's the basis of the template (for content) system so whilst the end users have no requirement to use XSLT those defining th...
5,398
<p>I have the following code for a UDF but it errors with the message:</p> <blockquote> <p>Msg 156, Level 15, State 1, Procedure CalendarTable, Line 39 Incorrect syntax near the keyword 'OPTION'.</p> </blockquote> <p>is it because of my WITH statement as I can run the same code fine in a stored procedure?</p> ...
<p>No, you can't use the OPTION keyword.</p> <p>From the documentation: "MAXRECURSION can be used to prevent a poorly formed recursive CTE from entering into an infinite loop. The following example intentionally creates an infinite loop and uses the MAXRECURSION hint to limit the number of recursion levels to two."</p...
<p>Are you missing a closing bracket here? (the closing bracket for "AS RETURN ("</p>
39,523
<p>I've always preferred using XSD.exe/VS.Net to generate schema, generate classes off the schema, deserialize xml file into object tree to parse an XML file. [Well, most of my requirements thus far have made this a perfect choice].</p> <p>I've a crib though: The class names generated by XSD.exe are weird - meaning X...
<p>It sounds like its the schema being autogenerated that is causing the problem. I've used the class generation part of XSD.exe and the class have usually been fine.</p> <p>If the schema is being automatically generated then its probably going to need a bit of tweaking manually to correct the crazy node names.</p>
<p>I'm really starting to wish for a simple way to alter the output of xsd.exe without resorting to hacking codedom... seems like a project that just "needs to happen"... </p>
36,326
<p>I've found a answer how to remove diacritic characters on stackoverflow, but could you please tell me if it is possible to change diacritic characters to non-diacritic ones?</p> <p>Oh.. and I think about .NET (or other if not possible)</p>
<p>Copying from <a href="https://stackoverflow.com/questions/285228/how-to-convert-utf-8-to-us-ascii-in-java#285791">my own answer to another question</a>:</p> <blockquote> <p>Instead of creating your own table, you could instead convert the text to normalization form D, where the characters are represented as a bas...
<p>My site inputs data from external sources which have many strange characters. I wrote the following C# function to replace accented characters and strip out non-US keyboard characters using Regex:</p> <pre><code> using System.Text; using System.Text.RegularExpressions; internal static string SanitizeStr...
42,915
<p>I've found myself increasingly unsatisfied with the DataSet/DataTable/DataRow paradigm in .Net, mostly because it's often a couple of steps more complicated than what I really want to do. In cases where I'm binding to controls, DataSets are fine. But in other cases, there seems to be a fair amount of mental overhe...
<p>Since .NET 3.5 came out, I've exclusively used LINQ. It's really that good; I don't see any reason to use any of those old crutches any more. </p> <p>As great as LINQ is, though, I think any ORM system would allow you to do away with that dreck.</p>
<p>I NEVER use datasets. They are big heavyweight objects only usable (as someone pointed out here) for "demoware". There are lot's of great alternatives shown here.</p>
3,909
<p>I have a bulletin board (punBB based) that I was running out of the root directory for a couple of years. I foolishly decided to do a little gardening and in the process moved the punbb code into it's own subdirectory. The code works great; as long as you point the browser at the new subdirectory. The issue is that ...
<p>Something like this in .htacces should do it:</p> <pre><code> RewriteEngine On RewriteRule ^/?$ /punbb/ [R=301,L] </code></pre> <p>The 301 return code is to mark the move as permanentm making it posible for the browser to update bookmarks.</p>
<p>Your example code is missing but here's one way to do it using mod_rewrite:</p> <pre><code>RewriteEngine on RewriteRule ^$ http://guardthe.net/punbb/ [L,R=301] </code></pre>
10,071
<p>I have a library I created,</p> <h3>File <em>mylib.c:</em></h3> <pre><code>#include &lt;mylib.h&gt; int testlib() { printf(&quot;Hello, World!\n&quot;); return (0); } </code></pre> <h3>File <em>mylib.h:</em></h3> <pre><code>#include &lt;stdio.h&gt; extern int testlib(); </code></pre> <p>In my program, I've ...
<p>In C <code>int foo()</code> and <code>int foo(void)</code> are different functions. <code>int foo()</code> accepts an arbitrary number of arguments, while <code>int foo(void)</code> accepts 0 arguments. In C++ they mean the same thing. I suggest that you use <code>void</code> consistently when you mean no arguments....
<p>Try:</p> <pre><code>extern int testlib(void); </code></pre>
6,351
<p>I have played with the idea of using a wiki (MediaWiki) to centralize all project information for a development project. This was done using extensions that pull information from SVN (using <a href="http://svnkit.com/" rel="nofollow noreferrer">SVNKit</a>) and by linking to Bugzilla to extract work assigned to a de...
<p>I think this would be extremly useful. Depending on the size of a project team members come and go. And a wiki is a good tool to keep the history and the "spirit" of a project available to new team members. I did that in many projects, and though the projects were already finished, all the informations are available...
<p>The other classic integration would be your source code repository, e.g. svn, or cvs. <a href="http://trac.edgewall.org/" rel="nofollow noreferrer">trac</a> is an existing product that does exactly this - it combines a wiki, custom bug tracker, and integrates nicely with svn.</p>
7,213
<p>C#: What is the proper way to change the font style (underline) from a Label at runtime?</p> <p>So far I understand that if you want to change font related properties at runtime from a label, mainly all font properties, you would have to use,</p> <pre><code> lblName.Font = new Font(... etc. etc. </code></pre> <p>...
<p>The way you did it:</p> <pre><code>this.Font = new Font(this.Font, FontStyle.Underline); </code></pre> <p>is correct. The reason is that Font is a sealed and immutable type (by design). When introduced in .NET 1 this seemed a bit strange but with today's emphasis on functional programming, concurrency and immutabi...
<p>How about (I'm using .Net Framework 2.0) Okay so this works for a Web Application. In a forms application it is read-only.</p> <p>lblName.Font.Underline = true;</p> <p>Here's the definition:</p> <pre><code> // // Summary: // Gets or sets a value that indicates whether the font is underlined. ...
34,894
<p>I've come across this term POD-type a few times.<br> What does it mean? </p>
<p><em>POD</em> stands for <em>Plain Old Data</em> - that is, a class (whether defined with the keyword <code>struct</code> or the keyword <code>class</code>) without constructors, destructors and virtual members functions. <a href="http://en.wikipedia.org/wiki/Plain_Old_Data_Structures" rel="noreferrer">Wikipedia's ar...
<p>With C++, Plain Old Data doesn't just mean that things like int, char, etc are the only types used. Plain Old Data really means in practice that you can take a struct memcpy it from one location in memory to another and things will work exactly like you would expect (i.e. not blow up). This breaks if your class, or ...
17,637
<p>I've been developing business apps, basically CRUD, in ASP.Net for years now, and am interested in learning another language and platform.</p> <p>After a few trips to Borders and poking around a bit on the web, I have not found much dealing with generating reports in Ruby / Ruby on Rails apps. These reports would ...
<p>Perhaps <a href="http://rubyreports.org/" rel="nofollow noreferrer">Ruport</a>?</p> <blockquote> <p>A simple, extensible reporting system built for Rubyists</p> </blockquote>
<p>It looks like there are a few options out there to get you started. Granted, these are not going to be on the same level as something else you might be used to like SQL Server Reporting Services or Business Objects, but it's a start:</p> <p><a href="http://www.google.com/search?hl=en&amp;q=ruby+reports&amp;btnG=Goo...
42,659
<p>I've seen that a Processor Pack is available for Visual Studio 6, however it appears to only be available for users with SP5 and I am already using SP6:</p> <p><em>In addition, the Visual C++ Processor Pack (VCPP) was removed from Service Pack 6. If you have the VCPP installed, installing SP6 will remove it from yo...
<p>It looks like the clue was in the question:</p> <p>In addition, the Visual C++ Processor Pack (VCPP) was removed from Service Pack 6. If you have the VCPP installed, installing SP6 will remove it from your machine. If you wish to continue using the VCPP, you will need to stay with SP5 or migrate to Visual Studio 20...
<p>I think the processor pack is already integrated with SP6, like the <a href="http://msdn.microsoft.com/en-us/vs2005/aa718349.aspx" rel="nofollow noreferrer">following document</a> says.</p>
22,529