text
stringlengths
8
267k
meta
dict
Q: Visual Studio 2005 -> 2008/10 Service Installer Project Upgrade issue I've upgraded a [.vdproj MSI generator project built into VS2008] System.Configuration.Install.Installer with a ServiceProcessInstaller and a ServiceInstaller from Visual Studio 2005 to 2008. There are no customisations of consequence to the insta...
{ "language": "en", "url": "https://stackoverflow.com/questions/370940", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: In WSH, how can I parse multiple-key presses like ALT-CTRL-DEL? How can I use multiple keys in WSH Script like (ALT,CTRL,DELETE)? How can i take a screenshot of an application and paste it in MSWord using WSH SCript? A: Using SendKeys, you can't. I told you so. Regarding sending multiple keys - please read the docu...
{ "language": "en", "url": "https://stackoverflow.com/questions/370943", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-2" }
Q: How to get DataTextField of DropDownList in javascript? I am using a DropDownList as <asp:DropDownList ID="ddlLocationName" runat="server" DataValueField="Guid" DataTextField="LocationName" AppendDataBoundItems="false" AutoPostBack="false" onchange="LocationChange()" ></asp:DropDownList> and w...
{ "language": "en", "url": "https://stackoverflow.com/questions/370944", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: html form fields as array elements in a struts form What I would like to do is add dynamically HTML input fields in one page, and each one of them correspond to an element of a struts array property. Let's say I have a number of identical fields in an HTML page: < input type="file" name="myfile" /> and when the fo...
{ "language": "en", "url": "https://stackoverflow.com/questions/370946", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: scrolling KTextEdit to start I have a KTextEdit, filled with some text. When I put lots of text, the KTextEdit will be scrolled automatically to the end (obviously). My question is: how can I scroll to the start (viz to the first line of the KTextEdit) ?!? A: Looks like you use QTextCursor cursor = edit->textCur...
{ "language": "en", "url": "https://stackoverflow.com/questions/370954", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Auto Install activeX I'm a web developer and my current task is to build an ActiveX component. It's the first time I have to work with ActiveX and I managed to make an working example. However I cannot make the ActiveX install from a browser. When installing it using visual studio 2008 and running the web page all ...
{ "language": "en", "url": "https://stackoverflow.com/questions/370960", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why can't static methods be abstract in Java? The question is in Java why can't I define an abstract static method? for example abstract class foo { abstract void bar( ); // <-- this is ok abstract static void bar2(); //<-- this isn't why? } A: The abstract annotation to a method indicates that the method ...
{ "language": "en", "url": "https://stackoverflow.com/questions/370962", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "655" }
Q: Server-side paging with DevExpress without XPO Is there any (relatively) easy way to implement server-side paging using DevExpress controls (either Win- or Web-ones) without using an XPO data source? By server-side paging I mean control retrieving only the records it needs to display from the database, not the whole...
{ "language": "en", "url": "https://stackoverflow.com/questions/370968", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: is it possible to set per-file options for Nedit like you can do for emacs/vim With VIM or Emacs I can put comments in the file that will be VIM's settings for that file: /* * Local Variables: * mode: C * c-basic-offset: 4 * c-indentation-style: linux * indent-tabs-mode: nil * default-tab-width: 8 * fi...
{ "language": "en", "url": "https://stackoverflow.com/questions/370970", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-1" }
Q: Which common features of desktop applications do most web applications miss? Stackoverflow User Luke wrote in this answer: The boundaries between desktop and web applications have really blurred. Whilst once upon a time the nature of developing for the web was totally different to developing for the deskt...
{ "language": "en", "url": "https://stackoverflow.com/questions/370972", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "11" }
Q: What are some good computer science resources for a blind programmer? I'm a totally blind individual who would like to learn more of the theory aspect of computer science. I've had an intro data structures class and the general intro programming but would like to learn more on things such as software design, advance...
{ "language": "en", "url": "https://stackoverflow.com/questions/370976", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: How to synchronize requests for data with data update process? I have an application that uses a cron like job to update a set of data. The update process happens once a minute and doesn't last long. A servlet exposes this data set to the users. My problem is that during the update process, the servlet requests shou...
{ "language": "en", "url": "https://stackoverflow.com/questions/370978", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Unity IOC Configuration I have a class public class Broker { public Broker(string[] hosts, string endPoint, string port, Type remoteType) { } } Which I want to configure using Unity XML Configuration, I can configure it using code in C# as follows already, where "container" is my Unity container ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371005", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Firefox overflow:scroll resize issue In Firefox...... <div id="container" style="overflow:scroll; width:400px; height:500px"> <div id="content" style="height:500px; width:800px"/> </div> The "container" DIV should have scroll bars since the div with id "content" is wider than it. If, using JavaScript (see bel...
{ "language": "en", "url": "https://stackoverflow.com/questions/371007", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Create modified HFONT from HFONT I using the Win32 API and C/C++. I have a HFONT and want to use it to create a new HFONT. The new font should use the exact same font metrics except that it should be bold. Something like: HFONT CreateBoldFont(HFONT hFont) { LOGFONT lf; GetLogicalFont(hFont, &lf); lf.lfWe...
{ "language": "en", "url": "https://stackoverflow.com/questions/371018", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "17" }
Q: Java listener must inherit from java.util.EventListener - why? In the javadoc it says that EventListener is "A tagging interface that all event listener interfaces must extend." Why is that? What's the significance of making a custom listener implement EventListner? Is there any special handling for EventListner ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371019", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "10" }
Q: Shortest way to get an Iterator over a range of Integers in Java What's the shortest way to get an Iterator over a range of Integers in Java? In other words, implement the following: /** * Returns an Iterator over the integers from first to first+count. */ Iterator<Integer> iterator(Integer first, Integer count); ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371026", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "31" }
Q: Silly sprintf() question How do I add the SQL wildcard characters to this: sprintf("SELECT robot FROM robots WHERE robot LIKE '%s'",strtolower($user_agent)); as sprintf("SELECT robot FROM robots WHERE robot LIKE '%%s%'",strtolower($user_agent)); blows up in a spectacular ball of flame, PS sorry for the rathe...
{ "language": "en", "url": "https://stackoverflow.com/questions/371027", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Bandwidth throttling in C# I am developing a program that continually sends a stream of data in the background and I want to allow the user to set a cap for both upload and download limit. I have read up on the token bucket and leaky bucket alghorhithms, and seemingly the latter seems to fit the description since th...
{ "language": "en", "url": "https://stackoverflow.com/questions/371032", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: Has anyone tried NetBeans 6.5 Python IDE? Has anyone tried the NetBeans 6.5 Python IDE? What are your opinions? Is it better/worse than PyDev? Do you like it? How does it integrate with source control tools (especially Mercurial)? A: I will share some of the feelings from using it for quite a while now. Things that...
{ "language": "en", "url": "https://stackoverflow.com/questions/371037", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Uses of Action delegate in C# I was working with the Action Delegates in C# in the hope of learning more about them and thinking where they might be useful. Has anybody used the Action Delegate, and if so why? or could you give some examples where it might be useful? A: Well one thing you could do is if you have a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371054", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "134" }
Q: How can I convert messages in an mbox file to UTF-8? I am trying to modify the below program to ensure each msg is converted to utf-8 using Encode::decode(), but I am unsure of how and where to place this to make it work. #!/usr/bin/perl use warnings; use strict; use Mail::Box::Manager; open (MYFILE, '>>data.txt')...
{ "language": "en", "url": "https://stackoverflow.com/questions/371055", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Custom serial terminal I am trying to develop a custom application which has a built-in serial port terminal, but it will be able to suspend terminal and do some I/O in the custom command and data format. e.g. When I click "Get Data" button, the software will send some binary command and get some binary data in retu...
{ "language": "en", "url": "https://stackoverflow.com/questions/371058", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How can I modify this to get a random record on the many end of a join? Here is my query: 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) -- >not really satisfactor...
{ "language": "en", "url": "https://stackoverflow.com/questions/371059", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: building sorted sections from map I have unsorted map of key value pairs. input = { "xa" => "xavalue", "ab" => "abvalue", "aa" => "aavalue", "ba" => "bavalue", } Now I want to sort them by the key and cluster them into sections by the first character of the key. Similar to this: output1 = { "a" => { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371064", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: javascript problem - including php I have the code pasted below, which servers as the core of a small ajax application. This was working fine previously, with makewindows actually displaying a popup containing the rsult of artcile_desc. I seem to have an error before that function however, as now only the actual php...
{ "language": "en", "url": "https://stackoverflow.com/questions/371072", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: jquery UI Dialog and __DoPostback I have a problem with the jQuery-UI dialog in my ASP.NET form: $("#pnlReceiverDialog").dialog({ autoOpen:false, modal: true, height:220, width:500, resizable :false, overlay: { opacity: 0.5,background: "black" }, buttons: { "Cancel": function() { $(this)....
{ "language": "en", "url": "https://stackoverflow.com/questions/371079", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: HTML table horizontal spacing How can I set an X spacing between html table's columns? Using cellpadding or cellspacing I got vertical spacing too (and I don't want it!). I can't use CSS. Suggestions? A: Hm, how about inserting an extra column with width=X ? I think it is the only way to do that in pure html.
{ "language": "en", "url": "https://stackoverflow.com/questions/371088", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Best way to decode hex sequence of unicode characters to string What is the most code free way to decode a string: \xD0\xAD\xD0\xBB\xD0\xB5\xD0\xBA\xD1\x82\xD1\x80\xD0\xBE\xD0\xBD\xD0\xBD\xD0\xB0\xD1\x8F to human string in C#? This hex string contains some unicode symbols. I know about System.Convert.ToByte(string...
{ "language": "en", "url": "https://stackoverflow.com/questions/371096", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: can you get XmlCompiledTransform progress? I want to read an xml file, apply a transform, then write to another file. The best way I can think of is this: using (XmlTextReader reader = new XmlTextReader(new FileStream(_source, FileMode.Open))) using (XmlTextWriter writer = new XmlTextWriter(new StreamWriter(_destina...
{ "language": "en", "url": "https://stackoverflow.com/questions/371105", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: How much RAM is there in an an iOS (Iphone/iPad/iPod Touch) Device? Different iPhones have different published memory 4GB, 8GB and 16GB. The touch can have 32GB. My understanding is this is the off-line memory (disk alike). How much actual fast ram is there in the device available for my Cocoa Application? Is ther...
{ "language": "en", "url": "https://stackoverflow.com/questions/371107", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "30" }
Q: Garbage collection when using anonymous delegates for event handling UPDATE I have combined various answers from here into a 'definitive' answer on a new question. Original question In my code I have an event publisher, which exists for the whole lifetime of the application (here reduced to bare essentials): public...
{ "language": "en", "url": "https://stackoverflow.com/questions/371109", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "13" }
Q: How can I retrieve a full list of account activities with the Dynamics CRM Views? Using the CRM views, is there a way to retrieve a list of all of the activities linked to a specific account? I want it to retrieve not only those associated with the account directly, but also those associated with the account's conta...
{ "language": "en", "url": "https://stackoverflow.com/questions/371112", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Count all occurrences of a string in lots of files with grep I have a bunch of log files. I need to find out how many times a string occurs in all files. grep -c string * returns ... file1:1 file2:0 file3:0 ... Using a pipe I was able to get only files that have one or more occurrences: grep -c string * | grep -v ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371115", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "328" }
Q: In PHP, how many DB calls per page is okay? I've got shared hosting on a LAMP set up. Obviously the fewer calls to the Db per page the better. But how many is too many? Two? Ten? A hundred? Curious what people think. A: That really depends on your (db)servers setup. Try to cache most of information as possible and ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371126", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "14" }
Q: Element Defaulting using JAXB I am trying to use JAXB 1.0 provided by JDeveloper 10g version. I have created a Schema definition with elements having default values. I have following questions: * *Whenever I create the Java Content tree using the JAXB generated classes, the java objects should have been created w...
{ "language": "en", "url": "https://stackoverflow.com/questions/371127", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Run code when a collection is modified (items added or removed) I have a class that contains a list of objects. What's the best way to run some code in the class when the list is modified? class MyManagerClass { ArrayList list = new ArrayList(); // will likely be a different collection class private OnItemAd...
{ "language": "en", "url": "https://stackoverflow.com/questions/371133", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Binary Trees vs. Linked Lists vs. Hash Tables I'm building a symbol table for a project I'm working on. I was wondering what peoples opinions are on the advantages and disadvantages of the various methods available for storing and creating a symbol table. I've done a fair bit of searching and the most commonly recom...
{ "language": "en", "url": "https://stackoverflow.com/questions/371136", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "72" }
Q: How to create a file without a Command Prompt window I'm using WinRAR SFX module to create an installation, and use its presetup option to run some preliminary tests. Since wscript can only accept vbs file, and not the script itself, I first run "cmd /c echo {...script code...} > setup.vbs", and then I run "wscript ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371140", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Rails AJAX: My partial needs a FormBuilder instance So I've got a form in my Rails app which uses a custom FormBuilder to give me some custom field tags <% form_for :staff_member, @staff_member, :builder => MyFormBuilder do |f| %> [...] <%= render :partial => "staff_members/forms/personal_details", :locals => {:...
{ "language": "en", "url": "https://stackoverflow.com/questions/371147", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How can I strip HTML and attachments from emails? 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 th...
{ "language": "en", "url": "https://stackoverflow.com/questions/371153", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: String conversion in Python I'm using Python 2.5. The DLL I imported is created using the CLR. The DLL function is returning a string. I'm trying to apply "partition" attribute to it. I'm not able to do it. Even the partition is not working. I think "all strings returned from CLR are returned as Unicode". A: Could ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371155", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "-3" }
Q: Cross join (pivot) with n-n table containing values I have 3 tables : TABLE MyColumn ( ColumnId INT NOT NULL, Label VARCHAR(80) NOT NULL, PRIMARY KEY (ColumnId) ) TABLE MyPeriod ( PeriodId CHAR(6) NOT NULL, -- format yyyyMM Label VARCHAR(80) NOT NULL, PRIMARY KEY (PeriodId) ) TABLE MyValue ( ColumnId...
{ "language": "en", "url": "https://stackoverflow.com/questions/371162", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Linq with custom base collection I often find linq being problematic when working with custom collection object. They are often defened as The base collection abstract class BaseCollection<T> : List<T> { ... } the collections is defined as class PruductCollection : BaseCollection<Product> { ... } Is there a better...
{ "language": "en", "url": "https://stackoverflow.com/questions/371174", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }
Q: MS Exchange integration Does there exist a third party component which lets you seamless integrate your calendar application with MS Exchange? Are there any open source components who do that? This is about calendar, not mail. A: By default, Exchange now use WebDAV to give access to mail & calendar. You may want t...
{ "language": "en", "url": "https://stackoverflow.com/questions/371175", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: My DLLs are strong named, but WSPBuilder reports they are not WSPBuilder Version: 0.9.8.0830 Created by Carsten Keutmann GPL License 2007 Install and deploying [MYDLL] Unable to deploy solution Inner exception(1): This solution contains one or more assemblies targeted for the global assembly cache. You should use a ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371181", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Developing HTML email newsletter, refreshing Apple Mail I'm developing an HTML newsletter system using PHP & PEAR. It sends out the emails fine. However I cannot force Apple Mail to reload images from the server. I have tried: * *Restarting Mail *Clear ~/Library/MailDownloads *Clear ~/Library/Cache/Mail *Empt...
{ "language": "en", "url": "https://stackoverflow.com/questions/371183", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Recommendation for tools to migrate from TFS to SVN Can you recommend any tool to migrate sources (with history) from TFS to SVN? A: Have you looked at tfs2svn? tfs2svn is a Windows application that converts a Team Foundation Server (TFS) repository into a Subversion (SVN) repository, preserving the histor...
{ "language": "en", "url": "https://stackoverflow.com/questions/371203", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "21" }
Q: How do I show Error Message using Managed Custom Actions with Windows Installer I am writing a managed custom action. I am using the DTF Framework from Windows Installer Xml to wrap the managed dll into a usable CA dll. The CA does what it is supposed to, but I am still having trouble with error handling: Dim record...
{ "language": "en", "url": "https://stackoverflow.com/questions/371204", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: Can I automate creating a .NET web application / virtual directory in IIS 5? I asked this Can I automate creating a .NET web application in IIS? a little ago, and got solutions for IIS 6 and IIS 7: * *IIS6 : iisweb /create C:\Rome "My Vacations" /d www.reskit.com /dontstart *IIS7 : %windir%\system32\inetsrv\App...
{ "language": "en", "url": "https://stackoverflow.com/questions/371207", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Full Page Blur in CSS How can I blur a whole page using CSS? Other elements such as images are allowed. A: Real life demo here: http://premium.wpmudev.org/project/e-commerce/ (click on the video). They add the class thickbox-open to the body, when thickbox is open, and from there target and style a whole-content (e...
{ "language": "en", "url": "https://stackoverflow.com/questions/371209", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "35" }
Q: Possible to validate a .NET Attibute parameter? I am wondering if it is possible to validate parameters to (custom) .net attributes. eg: If I had an attribute that takes a positive integer, could I force a compile time error when a negative value was supplied? [DonkeyAttribute(1)] //OK [DonkeyAttribute(-828)] //err...
{ "language": "en", "url": "https://stackoverflow.com/questions/371218", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Changing ASPNETDB name Is there anyway to change the ASPNETDB and also using SQLExpress (2005) user instance ? I have changed my web.config's connectin string to <remove name="LocalSqlServer"/> <add name="LocalSqlServer" connectionString="Data Source=.\SQLEXPRESS; AttachDbFilename=|DataDirectory|\Kooft.md...
{ "language": "en", "url": "https://stackoverflow.com/questions/371227", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: Generating sets of integers in C# In F#, you can generate a set of numbers, just by saying [1..100]. I want to do something similar in C#. This is what I have come up with so far: public static int[] To(this int start, int end) { var result = new List<int>(); for(int i = start; i <= end; i++) result...
{ "language": "en", "url": "https://stackoverflow.com/questions/371237", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "3" }
Q: UPDATE query works fine when run from Access, but raises SQL syntax error from within C# app I have a very simple Update statement that will update mail server settings and network credentials info... Query works fine when I run it in Access but C# keeps giving me the error stating that my SQL Syntax is wrong ... I ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371246", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Using a debug mode for a program that runs on a remote desktop I have a short program that is used exclusively with a remote desktop connection that's been set to only run that program and not allow any other access into the remote machine. Previously, the program just exited and let the connection terminate, but it...
{ "language": "en", "url": "https://stackoverflow.com/questions/371248", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Is using TransactionScope causing delete statements againist the database? I am using LINQ to SQl and using TransactionScopre I am inserting the data in SQL . _context.tblDataContainer.InsertOnSubmit(migrationData); using (TransactionScope ts = new TransactionScope()) { _context.SubmitChanges(); ts.Complete...
{ "language": "en", "url": "https://stackoverflow.com/questions/371262", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Checking C# new() initialisation for null? I've found this piece of code on Koders: private ServiceProvider SiteServiceProvider { get { if (serviceProvider == null) { serviceProvider = new ServiceProvider(site as VSOLE.IServiceProvider); Debug.Assert(serviceProvider !=...
{ "language": "en", "url": "https://stackoverflow.com/questions/371266", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "9" }
Q: How Do You Send Emails if SMTP is Not Loaded on the Server? using the Code Snippet for sending email in VB.Net I have successfully sent an email from my local machine, but when I Upload it to my server I get a message that the email failed. We have a national relay server that is running SMTP and I am pointed at th...
{ "language": "en", "url": "https://stackoverflow.com/questions/371268", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C# Extension Methods - How far is too far? Rails introduced some core extensions to Ruby like 3.days.from_now which returns, as you'd expect a date three days in the future. With extension methods in C# we can now do something similar: static class Extensions { public static TimeSpan Days(this int i) { ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371272", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How can i reduce the number of db round-trips with this Linq2Sql? I've got the following Linq2Sql and it's doing more than one round trip for my 'SELECT' statement. I'm not sure why. First the code, then the explanation:- from p in db.Questions select new Models.Question { Title = p.Title, TagList = (from t ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371279", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: Managed C++ Web reference to WCF service problems I deveploped a simple WCF service called CLSAPIService that it's Contract contains a method named UpdateLastOpenCloseCall: [OperationContract(Name = "UpdateLastOpenCloseCall", Action = "http://uniform.com/UpdateLastOpenCloseCall")] CallResult UpdateLastOpenCloseCall(...
{ "language": "en", "url": "https://stackoverflow.com/questions/371287", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Sharepoint: is performance of iteration through all subsites bearable? I need to create feature which will iterate through all subsites of site collection and add some sample content to each of them (sample content=new pages,images,documents,possibly some lists). There is solution that uses recursion to loop through...
{ "language": "en", "url": "https://stackoverflow.com/questions/371288", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Use type of object in HQL where clause In my domain model I have an abstract class CommunicationChannelSpecification, which has child classes like FTPChannelSpecification, EMailChannelSpecification and WebserviceChannelSpecification. Now I want to create an HQL query which contains a where clause that narrows down t...
{ "language": "en", "url": "https://stackoverflow.com/questions/371300", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: VS Post Build Event I would like to implement a post build event that performs the following actions * *A relative path copy of the DLL output (1 file, not all the debug jazz) *A register the output DLL to GAC How is this done? A: Enter following into "Project properties->Build events->Post build events comma...
{ "language": "en", "url": "https://stackoverflow.com/questions/371302", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: loadVideoById() in YouTube's regular player (not chromeless) I have a YouTube's player in the webpage. I need to change the video played by this player dynamicaly. This is (relatively) easy using YouTube's chromeless player. It has method loadVideoById() which works perfectly. The problem is, that the chromeless pla...
{ "language": "en", "url": "https://stackoverflow.com/questions/371320", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "6" }
Q: Securing ActiveMQ externally by IP filtering I have an instance of ActiveMQ running on an externally facing server and exposing a STOMP interface. I would like to be able to ensure that externally connected clients can only receive topic notifications, and not send anything to the topic themselves. Any internally c...
{ "language": "en", "url": "https://stackoverflow.com/questions/371321", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: I have to read invoice data from a convoluted ASCII file, how would you guard against future changes? I have to read invoice ascii files that are structured in a really convoluted way, for example: 55651108 3090617.10.0806:46:32101639Example Company Construction Company Example Road. 9 ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371322", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Why is it important to override GetHashCode when Equals method is overridden? Given the following class public class Foo { public int FooId { get; set; } public string FooName { get; set; } public override bool Equals(object obj) { Foo fooItem = obj as Foo; if (fooItem == null) ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371328", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1637" }
Q: How to make Enter on a TextBox act as TAB button I've several textboxes. I would like to make the Enter button act as Tab. So that when I will be in one textbox, pressing Enter will move me to the next one. Could you please tell me how to implement this approach without adding any code inside textbox class (no overr...
{ "language": "en", "url": "https://stackoverflow.com/questions/371329", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "22" }
Q: How to extract a single character (as a string) from a larger string in Ruby? What is the Ruby idiomatic way for retrieving a single character from a string as a one-character string? There is the str[n] method of course, but (as of Ruby 1.8) it returns a character code as a fixnum, not a string. How do you get to a...
{ "language": "en", "url": "https://stackoverflow.com/questions/371333", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "19" }
Q: Background image is not displayed in Firefox An image set as the background of a DIV is displayed in IE, but not in Firefox. CSS example: div.something { background:transparent url(../images/table_column.jpg) repeat scroll 0 0; } (The issue is described in many places but haven't seen any conclusive explanation or ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371337", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "20" }
Q: Serialize Data Structures in C I'd like a C library that can serialize my data structures to disk, and then load them again later. It should accept arbitrarily nested structures, possibly with circular references. I presume that this tool would need a configuration file describing my data structures. The library is ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371371", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "45" }
Q: mysql full text search is empty I am using ruby on rails with a MySQL backend. I have a table called notes and here is the migration I use to create it: def self.up create_table(:notes, :options => 'ENGINE=MyISAM') do |t| t.string :title t.text :body t.timestamps end execute "alter table notes A...
{ "language": "en", "url": "https://stackoverflow.com/questions/371372", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: C# UserControl Inheritance Working with VS.NET 2008, output type Class Library, Target Framework .NET 2.0 I've come up with a simplified scenario to ask this question. I have a Button user control, its a simple panel with a single big button on it. I want to create a RedButton control that extends Button, and simila...
{ "language": "en", "url": "https://stackoverflow.com/questions/371378", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Best way to print for Windows Clients (Not Web Apps)? What is the best way to print stuff from c#/.net? The question is in regard to single pages as well as to reports containing lots of pages. It would be great to get a list of the most common printing libs containing the main features and gotchas of each of them....
{ "language": "en", "url": "https://stackoverflow.com/questions/371384", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "12" }
Q: Strange caching(?) problem with ASP.Net MVC Having an odd problems with ASP MVC deployed on IIS6 (Windows 2003). I've simplified the controller code to the below; <AcceptVerbs(HttpVerbs.Get)> _ Public Function CloseBatches() As ActionResult ViewData("Title") = "Close Batches" ViewData("Message") = Session("M...
{ "language": "en", "url": "https://stackoverflow.com/questions/371386", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Trying to do a sub query in Linq ... having issues! I am trying to convert some of my stored procedures to Linq and am having problems with the following Transact-Sql statement: Select Year(p.StartDate) As Year, (Select Sum(t.Units) From Time t Where Year(t.TransactionDate) = Year(p.StartDate)) As Hours, ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371391", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Using HTML Mime Mail for PHP to send email, but need to authenticate through Exchange server First off, the server: Exchange 2003 sp2 running on Windows 2003 Server sp2 I have a script that sends email to two email accounts, one called students@ and the other being fs@ (faculty/staff). We are setting both those emai...
{ "language": "en", "url": "https://stackoverflow.com/questions/371392", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Problems with auto-properties This is what reflector gives: public int Int1 { get; set; } public string StringA { get; set; } // Fields [CompilerGenerated] private int <Int1>k__BackingField; [CompilerGenerated] private string <StringA>k__BackingField; The problem is that C# specification doesn't explicitly specify...
{ "language": "en", "url": "https://stackoverflow.com/questions/371398", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I use the current sound out as an audio input in Quartz Composer? If I want to build a spectrum visualizer of what's currently playing on my speakers (not the line in) what do I do? A: Download and install Wiretap Anywhere from Ambrosia Software. Wiretap allows you to take any audio outputs from applicatio...
{ "language": "en", "url": "https://stackoverflow.com/questions/371401", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How do I list all the queries in a MS Access file using OleDB in C#? I have an Access 2003 file that contains 200 queries, and I want to print out their representation in SQL. I can use Design View to look at each query and cut and paste it to a file, but that's tedious. Also, I may have to do this again on other Ac...
{ "language": "en", "url": "https://stackoverflow.com/questions/371404", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to get the parameters of an inline delegate? Does anyone know if there is way to get the sender and the eventarguments passed to an event when using an inline delegate like below? p.Click+=delegate { //do some stuff }; A: Well, you can declare it: p.Click += delegate (object sen...
{ "language": "en", "url": "https://stackoverflow.com/questions/371413", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: How to print from Visual Studio Object Browser I'm working on mapping two objects in .NET. I would like to be able to print the items in the properties list from the Object Browser window in Visual Studio 2008. Is there a way to print that information out to the console? If that is not possible, what is a good me...
{ "language": "en", "url": "https://stackoverflow.com/questions/371417", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Can you represent CSV data in Google's Protocol Buffer format? I've recently found out about protocol buffers and was wondering if they could be applied to my specific problem. Basically I have some CSV data that I need to convert to a more compact format for storage as some of the files are several gig. Each field...
{ "language": "en", "url": "https://stackoverflow.com/questions/371418", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "5" }
Q: What's the most pythonic way of testing that inputs are well-formed numbers I have a function that expects real numbers (either integers or floats) as its input, and I'm trying to validate this input before doing mathematical operations on it. My first instinct is to cast inputs as floats from within a try-except bl...
{ "language": "en", "url": "https://stackoverflow.com/questions/371419", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do I write a string search query that uses the non-clustered indexing I have in place on the field? I'm looking to build a query that will use the non-clustered indexing plan on a street address field that is built with a non-clustered index. The problem I'm having is that if I'm searching for a street address ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371422", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: ASP.Net error: "The type 'foo' exists in both "temp1.dll" and "temp2.dll" When running a web application project, at seemingly random times a page may fail with a CS0433 error: type exists in multiple DLL's. The DLL's are all generated DLL's residing in the "Temporary ASP.NET Files" directory. A: Just in case some...
{ "language": "en", "url": "https://stackoverflow.com/questions/371426", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "110" }
Q: How do I turn off row selection in a C# ListView -- specifically the dotted outline! I have a ListView control that is in FullRowSelect mode, MultiSelect off and using the "Details" View mode. When the user clicks on a row, it highlights the row in blue, which is fine, But when I programatically turn off the selecti...
{ "language": "en", "url": "https://stackoverflow.com/questions/371427", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How to extract the picture in the img element in a webcontrol host? I would like to extract a bitmap from an html page. I expected to find a IStream, IPersistStream or IPersistStreamInit from the IHTMLImgElement I got in the web page. However I can't found any of those. I could read the picture from the cache but th...
{ "language": "en", "url": "https://stackoverflow.com/questions/371431", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: Printing/Previewing WPF RichTextBox - ApplicationCommands.PrintPreview? I'm really loving the WPF RichTextBox, and all of the out-of-the-box functionality it comes with...but printing is something that I'm having trouble with. I can print (from code) using a PrintDialog and passing in my RichTextBox as a Visual (or ...
{ "language": "en", "url": "https://stackoverflow.com/questions/371435", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Linq2SQL: Update object not created in datacontext Normally when you update an object in linq2sql you get the object from a datacontext and use the same datacontext to save the object, right? What's the best way to update a object that hasn't been retreived by that datacontext that you use to perform the save operat...
{ "language": "en", "url": "https://stackoverflow.com/questions/371439", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "4" }
Q: Linq to SQL Stored Procedures with Multiple Results We have followed the approach below to get the data from multiple results using LINQ To SQL CREATE PROCEDURE dbo.GetPostByID ( @PostID int ) AS SELECT * FROM Posts AS p WHERE p.PostID = @PostID SELECT c.* FROM Categories...
{ "language": "en", "url": "https://stackoverflow.com/questions/371445", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "15" }
Q: How can I get started developing a site in Arabic in ASP.NET? I would like to develop a website using ASP.NET in an Arabic language. What would be some good places to begin? Useful advice to keep in mind? A: I did some of this in a former life, here's what I recall: Is it going to be just ar-foo? If not (and I wou...
{ "language": "en", "url": "https://stackoverflow.com/questions/371446", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "0" }
Q: How do I convert NSDecimalNumber to NSInteger? OK, I'm using a JSON-enabled Rails web-service to provide data to an iPhone application. I'm finding my Integer values (IDs) are being interpreted by the json-framework as a NSDecimalNumber type. I need it as an integer. How can I get an integer value out of my NSDecima...
{ "language": "en", "url": "https://stackoverflow.com/questions/371450", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: How do you represent inheritance in LinqToSql? I need to represent inheritance like Person/Student. How do you do that in LInqToSql? A: Try : linqtosql inheritance or another linqtosql inheritance
{ "language": "en", "url": "https://stackoverflow.com/questions/371453", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "2" }
Q: Active Directory authentication I have a c# class which uses the WindowsIdentity namespace to return details of the current Active Directory user. This is accessible through a web part on SPS and sure enough returns the desired record values specific to that user. I have a classic ASP application which I would lik...
{ "language": "en", "url": "https://stackoverflow.com/questions/371455", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "1" }
Q: Find Programming Language Used Whats the easiest way to find out what programming language an application was written in? I would like to know if its vb or c++ or delphi or .net etc from the program exe file. A: You could try using Depends to see what runtime dependancies it has, which might give some clues. A: Tr...
{ "language": "en", "url": "https://stackoverflow.com/questions/371460", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "44" }
Q: Get Component's Parent Form I have a non-visual component which manages other visual controls. I need to have a reference to the form that the component is operating on, but i don't know how to get it. I am unsure of adding a constructor with the parent specified as control, as i want the component to work by just...
{ "language": "en", "url": "https://stackoverflow.com/questions/371464", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "27" }
Q: Quadtree vs Red-Black tree for a game in C++? I have been looking for a quadtree/quadtree node implementation on the net for ages. There is some basic stuff but nothing that I would be able to really use it a game. My purpose is to store objects in a game for processing things such as collision detection. I am not 1...
{ "language": "en", "url": "https://stackoverflow.com/questions/371465", "timestamp": "2023-03-29T00:00:00", "source": "stackexchange", "question_score": "8" }