Id
int64
4
8.51M
PostTypeId
int64
1
7
AcceptedAnswerId
int64
7
75.5M
ParentId
int64
4
41.8M
Score
int64
-208
27.7k
ViewCount
int64
11
12.4M
Body
stringlengths
0
45k
Title
stringlengths
2
150
ContentLicense
stringclasses
3 values
FavoriteCount
int64
0
225
CreationDate
stringdate
2008-07-31 21:42:52
2011-12-14 18:48:47
LastActivityDate
stringdate
2008-08-01 12:19:17
2023-03-05 04:40:26
LastEditDate
stringdate
2008-08-01 13:54:25
2023-03-05 03:12:45
LastEditorUserId
int64
-1
21.3M
OwnerUserId
int64
-1
21.1M
Tags
listlengths
1
6
22,221
2
null
22,084
1
null
The HTML renders with those sort of IDs because its ASP.NET's way of preventing ID collisions. Each container control, such as a Master page or Wizard control, will prepend an "ID_" on its childrens' IDs. In the case of your bullet list, the ListView provides a nice middle ground. You can still bind it to a datasour...
null
CC BY-SA 2.5
null
2008-08-22T12:40:18.513
2008-08-22T12:45:58.047
2008-08-22T12:45:58.047
60
60
null
22,251
2
null
22,239
3
null
I'm pretty sure VC++ just inserts a return 0 if you don't include one in main functions. The same thing can happen with functions too, but in those cases at least you'll get a warning.
null
CC BY-SA 2.5
null
2008-08-22T12:51:49.033
2008-08-22T12:51:49.033
null
null
1,546
null
22,245
1
22,364
null
25
44,948
I have multiple projects in a couple of different workspaces. However, it seems like I can never figure out how to change my current workspace. The result is that files that I have checked out on my machine are shown to be checked out by somebody else and are not accessible.
How do I change my workspace in Team Foundation Server 2005 and 2008?
CC BY-SA 3.0
0
2008-08-22T12:51:03.043
2019-10-28T17:26:22.117
2017-08-16T15:34:34.037
61,654
null
[ "tfs", "tfs-2005" ]
22,216
2
null
22,011
2
null
The "Robert C Martin" book, which was actually written by Michael Feathers ("Uncle Bob" is, it seems, a brand name these days!) is a must. It's near-impossible - not to mention insanely time-consuming - to put unit tests into an application not developed with them. The code just won't be amenable. But that's not a pr...
null
CC BY-SA 2.5
null
2008-08-22T12:38:08.160
2008-08-22T12:38:08.160
null
null
1,060
null
22,212
1
27,815
null
1
1,486
I need to create an Aggregate Field in a TClientDataSet, but as said in the docs: > Choose OK. The newly defined aggregate field is automatically added to the client dataset and its Aggregates property is automatically updated to include the appropriate aggregate specification. When I add a new aggregate fi...
TClientDataSet Aggregates specification aren't added automatically when creating an Aggregate field
CC BY-SA 3.0
null
2008-08-22T12:34:44.673
2015-04-17T18:11:52.837
2015-04-17T18:11:52.837
1,215,724
727
[ "delphi" ]
22,231
2
null
22,187
6
null
Also [kilim](http://www.malhar.net/sriram/kilim/) is a library for java, that brings erlang style message passing/actors to the Java language.
null
CC BY-SA 2.5
null
2008-08-22T12:46:57.500
2008-08-22T12:46:57.500
null
null
1,870
null
22,253
2
null
22,239
18
null
This is part of the C++ language standard. An implicit return 0 is generated for you if there's no explicit return statement in main.
null
CC BY-SA 2.5
null
2008-08-22T12:52:03.417
2008-08-22T12:52:03.417
null
null
2,150
null
22,239
1
22,262
null
37
10,336
(I'm using Visual C++ 2008) I've always heard that main() is to return an integer, but here I didn't put in `return 0;` and and it compiled with 0 errors and 0 warnings! In the debug window it says the program has exited with code 0. If this function is named anything other than main(), the compiler complains saying...
Why does int main() {} compile?
CC BY-SA 2.5
0
2008-08-22T12:49:37.213
2015-10-08T15:18:53.373
2009-07-17T20:19:31.917
113,116
2,222
[ "c++", "return-value", "program-entry-point" ]
22,257
2
null
6,371
1
null
Check out the [dbdeploy](http://dbdeploy.com/), there are Java and .net tools already available, you could follow their standards for the SQL file layouts and schema version table and write your python version.
null
CC BY-SA 2.5
null
2008-08-22T12:53:34.037
2008-08-22T12:53:34.037
null
null
1,248
null
22,256
2
null
21,956
4
null
I wrote a script to do this a little while back. The script (Compare-QueryResults.ps1) is available [here](http://podcast.acoupleofadmins.com/media/Scripts/Compare-QueryResults.ps1) and you will also need my Run-SQLQuery script (available [here](http://podcast.acoupleofadmins.com/media/scripts/Run-SQLQuery.ps1)) or yo...
null
CC BY-SA 2.5
null
2008-08-22T12:53:16.767
2008-08-22T12:53:16.767
null
null
1,233
null
22,267
2
null
22,259
0
null
[This article](http://www.phpit.net/article/image-manipulation-php-gd-part2/) seems like it would fit what you want. You'll need to change the saving imagejpeg() function to imagepng() and have it save the file to a string rather than output it to the page, but other than that it should be easy copy/paste into your ex...
null
CC BY-SA 2.5
null
2008-08-22T12:57:24.480
2008-08-22T12:57:24.480
null
null
1,662
null
22,263
2
null
22,067
0
null
My company decided to buy the Infragistics NetAdvantage for .NET. We will be using their Gantt control. Thanks for your answers.
null
CC BY-SA 2.5
null
2008-08-22T12:55:56.637
2008-08-22T12:55:56.637
null
null
2,437
null
22,265
1
null
null
1
1,685
Does anyone know (in c#) a way of getting the available NT4 domains (a bit like the WinXP login box dropdown)? I know that this is fairly easy for Active Directory using the DirectoryServices namespace, but I can't find anything for the old NT4 domains. I'd rather not use API calls if at all possible (that might be a...
Get a list of available domains (NT4 and Active Directory)
CC BY-SA 2.5
null
2008-08-22T12:56:36.493
2009-12-09T11:10:27.097
2009-03-10T03:52:16.603
5,640
445
[ "c#", "active-directory", "nt4" ]
22,266
2
null
22,165
0
null
If you're using C++ (or any other language with deterministic destructor execution when scopes end) you can take a look at [Scope Guards](http://www.ddj.com/cpp/184403758). This technique can probably also be adapted to .NET by making ScopeGuard implement IDisposable and sprinkling "using" statements as needed.
null
CC BY-SA 2.5
null
2008-08-22T12:56:42.423
2008-08-22T12:56:42.423
null
null
2,150
null
22,270
2
null
22,259
1
null
Is GD absolutely required? [ImageMagick](http://imagemagick.org/) is faster, generates better images, is more configurable, and finally is (IMO) much easier to code for.
null
CC BY-SA 2.5
null
2008-08-22T12:58:51.403
2008-08-22T12:58:51.403
null
null
1,902,010
null
22,269
1
null
null
2
1,819
I'm trying to build a C# console application to automate grabbing certain files from our website, mostly to save myself clicks and - frankly - just to have done it. But I've hit a snag that for which I've been unable to find a working solution. The website I'm trying to which I'm trying to connect uses ASP.Net forms ...
Authenticate on an ASP.Net Forms Authorization website from a console app
CC BY-SA 3.0
null
2008-08-22T12:57:41.407
2013-09-01T16:11:48.570
2012-08-11T16:16:23.403
1,477,076
111
[ "c#", "asp.net", "authentication" ]
22,272
2
null
7,174
1
null
As for speeding up the IIS reset, Andrew Connell has some tips here as well [http://www.andrewconnell.com/blog/archive/2006/08/21/3882.aspx](http://www.andrewconnell.com/blog/archive/2006/08/21/3882.aspx) This brought my IIS reset time from 10+ seconds down to less than 2 seconds.
null
CC BY-SA 2.5
null
2008-08-22T12:59:21.463
2008-08-22T12:59:21.463
null
null
2,470
null
22,259
1
22,403
null
9
16,976
I want to allow users to upload avatar-type images in a variety of formats (), but to save them all as . If the images are oversized, pixelwise, I want to resize them before DB-insertion. Edit: Sadly, only [GD](http://php.net/manual/en/book.image.php) is available on the server I need to use, no [ImageMagick](http:...
How do I resize and convert an uploaded image to a PNG using GD?
CC BY-SA 3.0
0
2008-08-22T12:53:54.863
2017-08-10T02:17:11.123
2017-08-10T02:17:11.123
6,036,428
1,820
[ "php", "database", "image", "png", "gd" ]
22,279
2
null
22,269
3
null
[This page](http://www.netomatix.com/development/httpwebrequestredirect.aspx) should get you started. You need to first make a request to the page, and then saving the cookie to a container that you include in all later request. That should keep you logged in, and able to retrieve the files.
null
CC BY-SA 3.0
null
2008-08-22T13:05:04.553
2012-08-11T16:16:30.690
2012-08-11T16:16:30.690
1,477,076
2,257
null
22,271
2
null
22,259
0
null
I think [this page](http://codecaine.co.za/posts/zend-image-class-to-convert-and-resize-images) is a good starting point. It uses imagecreatefrom(jpeg/gif/png) and resize and converts the image and then outputs to the browser. Instead of outputting the browser you could output to a BLOB in a DB without many minuttes of...
null
CC BY-SA 2.5
null
2008-08-22T12:58:54.507
2008-08-22T12:58:54.507
null
null
2,257
null
22,273
2
null
22,181
0
null
If you don't want to use an ORM you can also use reflection for things like this (though in this case because ProductID is not named the same on both sides, you couldn't do it in the simplistic fashion demonstrated here): [List Provider in C#](http://wiki.lessthandot.com/index.php/Generic_List_Provider_in_CSharp)
null
CC BY-SA 2.5
null
2008-08-22T12:59:40.947
2008-08-22T12:59:40.947
null
null
794
null
22,278
1
null
null
5
1,600
Most of my experience is on the MSFT stack, but I am now working on a side project, helping someone with a personal site with cheap hosting that is built on the LAMP stack. My options for installing extras are limited, so I'm wondering about how to write my data access code without embedding raw queries in the .php fi...
What's a good way to encapsulate data access with PHP/MySQL?
CC BY-SA 3.0
0
2008-08-22T13:04:29.487
2011-11-13T14:09:26.860
2011-11-13T14:09:26.860
367,456
1,219
[ "php", "mysql", "database", "lamp" ]
22,284
2
null
22,278
3
null
Take a look at the [Zend Framework](http://framework.zend.com), specifically Zend_Db. It has a Database Abstraction layer that doesn't require anything other than the MySQLi extension to be installed and isn't a full-blown ORM model.
null
CC BY-SA 2.5
null
2008-08-22T13:08:46.747
2008-08-22T13:08:46.747
null
null
204
null
22,222
2
null
7,089
0
null
I wrote a blog article on this a while back, so for more info, [see here](http://www.kibbee.ca/Blog/viewComments.php?blogid=354) ``` <div class="item_with_border"> <div class="border_top_left"></div> <div class="border_top_right"></div> <div class="border_bottom_left"></div> <div class="border_bottom_...
null
CC BY-SA 2.5
null
2008-08-22T12:41:23.597
2008-08-22T12:41:23.597
null
null
1,862
null
22,290
2
null
21,698
1
null
Here are some more valid classes. Actionscript 3 classes (and packages) must start with a letter, "_", or "$". They may also contain (but not start with) a number. ``` public class $Test {} public class _Test {} public class test {} ```
null
CC BY-SA 3.0
null
2008-08-22T13:09:28.867
2012-02-08T18:31:42.733
2012-02-08T18:31:42.733
547,122
22
null
22,287
2
null
22,165
1
null
Next to the GOF [Command Pattern](http://en.wikipedia.org/wiki/Command_Pattern) you might also want to have a look at the [Transaction Script](http://martinfowler.com/eaaCatalog/transactionScript.html) pattern from [P of EAA](http://martinfowler.com/books.html#eaa). You should probably create a Composite Command (or Tr...
null
CC BY-SA 2.5
null
2008-08-22T13:09:17.430
2008-08-22T13:09:17.430
2020-06-20T09:12:55.060
-1
1,830
null
22,280
2
null
22,211
0
null
Here are a few links that might be helpful as an overview. From my own experience, when I first started using MVC based web-frameworks the biggest issue I had was with the Models. Prying SQL out of my fingers and making me use Objects just felt strange. Once I started thinking of my data as Objects instead of SELECT...
null
CC BY-SA 2.5
null
2008-08-22T13:05:48.157
2008-08-22T13:05:48.157
null
null
1,754,676
null
22,292
2
null
22,269
3
null
I have dealt with something similar, and the hardest part is figuring out exactly what you needed to "fake" to get authorized. In my case it was authorizing into some Lotus Notes webservice, but the details are unimportant, the method is the same. Essentially, we need to record a regular user session. I would recom...
null
CC BY-SA 2.5
null
2008-08-22T13:09:40.253
2008-08-22T13:09:40.253
null
null
2,170
null
22,297
2
null
17,085
1
null
When working with XML, always use the XML API that works with your programming environment. Don't try to roll your own XML document building and escaping code. As Longhorn213 mentioned, in .Net all the appropriate stuff is in the System.XML namespace. Trying to to write your own code for writing XML documents will j...
null
CC BY-SA 2.5
null
2008-08-22T13:14:14.987
2008-08-22T13:14:14.987
null
null
1,862
null
22,293
2
null
17,085
0
null
You can use the System.XML namespace to do it. Of course you can also use LINQ. But I choose the .NET 2.0 approach because I am not sure which version of .NET you are using. ``` XmlDocument doc = new XmlDocument(); // Create the Where Node XmlNode whereNode = doc.CreateNode(XmlNodeType.Element, "Where", string.Empt...
null
CC BY-SA 3.0
null
2008-08-22T13:10:18.537
2015-08-31T17:35:59.213
2015-08-31T17:35:59.213
2,185,245
2,469
null
22,303
2
null
22,265
1
null
Unfortunately I think your only option is to use the ADSI API. You can switch between NT4 and Active Directory by changing providers in your code. NT4 uses the WinNT provider and Active Directory uses the LDAP provider. If you query the RootDSE node of whichever provider you are using, that should return naming contex...
null
CC BY-SA 2.5
null
2008-08-22T13:15:27.900
2008-08-22T13:15:27.900
null
null
507
null
22,298
2
null
22,278
3
null
Maybe [Doctrine](http://www.phpdoctrine.org/) would do the job? It seems to be inspired by [Hibernate](http://www.hibernate.org/).
null
CC BY-SA 2.5
null
2008-08-22T13:14:21.723
2008-08-22T13:14:21.723
null
null
1,709
null
22,285
2
null
22,187
8
null
Message Passing Interface (MPI) ([http://www-unix.mcs.anl.gov/mpi/](http://www-unix.mcs.anl.gov/mpi/)) is a highly scalable and robust library for parallel programming, geared original towards C but now available in several flavors [http://en.wikipedia.org/wiki/Message_Passing_Interface#Implementations](http://en.wikip...
null
CC BY-SA 2.5
null
2008-08-22T13:08:51.863
2008-08-22T13:08:51.863
null
null
1,416
null
22,309
1
28,847
null
2
7,091
Does anyone know of a disassembler for executables and DLLs? I've got a plug-in DLL I'm writing with a very rare `data abort` (<5% of the time) that I have narrowed down to a specific function (via dumpbin and the address output by the `data abort`). However, it is a fairly large function and I would like to narrow ...
ARMV4i (Windows Mobile 6) Native Code disassembler
CC BY-SA 3.0
null
2008-08-22T13:17:48.317
2013-03-01T04:58:51.023
2013-03-01T04:58:51.023
1,880,339
194
[ "windows-mobile", "arm", "disassembly" ]
22,262
2
null
22,239
72
null
> # 3.6.1 Main function ....2 An implementation shall not predefine the `main` function. This function shall not be overloaded. It shall have a return type of type `int`, but otherwise its type is implementation-defined. All implementations shall allow both of the following definitions of main:``` int main() { /* ......
null
CC BY-SA 3.0
null
2008-08-22T12:54:54.313
2015-10-08T15:18:53.373
2020-06-20T09:12:55.060
-1
269
null
22,319
1
22,693
null
3
926
I am writing a program that needs to send out an email every hour on the hour, but at a time local to the user. Say I have 2 users in different time zones. John is in New York and Fred is in Los Angeles. The server is in Chicago. If I want to send an email at 6 PM local to each user, I'd have to send the email to John...
How to send out email at a user's local time in .NET / Sql Server?
CC BY-SA 3.0
null
2008-08-22T13:22:31.050
2016-08-03T16:25:55.810
2016-08-03T16:25:55.810
182,371
26
[ "sql", ".net", "sql-server", "timezone" ]
22,318
1
429,683
null
0
578
I'm developing a website which will be used in the corporate intranet which uses JCIFS and NTLM to automatically authenticate the users without asking them to log on. Everything seems to be working in IE 6, but some users are being prompted for their passwords in IE 7. We've had some success by getting the users to...
IE Securty Zone Issues
CC BY-SA 2.5
null
2008-08-22T13:21:18.807
2009-01-09T20:49:58.537
2008-08-22T19:18:29.540
466
466
[ "internet-explorer", "ntlm", "intranet", "jcifs", "security-zone" ]
22,304
2
null
22,278
4
null
[ActiveRecord](http://en.wikipedia.org/wiki/Active_record_pattern) seems to be the state of the art at the moment. I can't recommend any good PHP frameworks for that though. I tried [Propel](http://propel.phpdb.org/) which, while nice, is not easy to set up (especially on a host that you can't install anything on). Ul...
null
CC BY-SA 2.5
null
2008-08-22T13:15:32.050
2008-08-22T13:15:32.050
null
null
2,474
null
22,282
2
null
22,259
3
null
If you want to use gdlib, use gdlib 2 or higher. It has a function called imagecopyresampled(), which will interpolate pixels while resizing and look much better. Also, I've always heard noted around the net that storing images in the database is bad form: - - - - - The only advantage I can see is that you don't ne...
null
CC BY-SA 2.5
null
2008-08-22T13:07:29.480
2008-08-22T13:07:29.480
null
null
2,474
null
22,300
2
null
22,259
6
null
Your process steps should look like this: 1. Verify the filetype 2. Load the image if it is a supported filetype into GD using imagecreatefrom* 3. Resizing using imagecopyresize or imagecopyresampled 4. Save the image using imagepng($handle, 'filename.png', $quality, $filters) > ImageMagick is faster, generates be...
null
CC BY-SA 2.5
null
2008-08-22T13:14:56.373
2008-08-22T13:30:53.620
2008-08-22T13:30:53.620
2,025
2,025
null
22,324
2
null
22,259
3
null
Are you sure you have no ImageMagick on server? I guest you use PHP (question is tagged with PHP). Hosting company which I use has no ImageMagick extension turned on according to phpinfo(). But when I asked them about they said . So simply -- there are no IM interface in PHP, but I can call IM programs directly from ...
null
CC BY-SA 2.5
null
2008-08-22T13:23:32.793
2008-08-22T13:23:32.793
null
null
1,483
null
22,322
1
479,664
null
17
4,292
I've got a problem similar to,but subtly different from, that described [here](https://stackoverflow.com/questions/22012/loading-assemblies-and-its-dependencies) (Loading assemblies and their dependencies). I have a C++ DLL for 3D rendering that is what we sell to customers. For .NET users we will have a CLR wrapper a...
How to late bind 32bit/64 bit libs at runtime
CC BY-SA 3.0
0
2008-08-22T13:23:15.773
2015-11-20T11:39:42.673
2017-05-23T10:27:19.503
-1
2,102
[ "c#", ".net", "64-bit", "clr", "x86-64" ]
22,311
2
null
22,245
-1
null
I don't entirely understand your question. Are you saying that files you check out on one machine seems to be unaccessible on another of your machines? I'd say that would be entirely by design, as now you have a file that has local modifications done on one machine, which may or may not be available on your other mach...
null
CC BY-SA 2.5
null
2008-08-22T13:18:51.260
2008-08-22T13:18:51.260
null
null
267
null
22,328
2
null
14,582
2
null
I use TortoiseSVN with VFP, and it mostly-seamlessly handles the case flipping. The only time it doesn't is if I have the file open in the IDE when I try to do the commit: the file lock VFP holds confuses it. Is this where your problem comes in, or are there other issues? I did a presentation at FoxForward last year a...
null
CC BY-SA 2.5
null
2008-08-22T13:25:26.223
2008-08-22T13:25:26.223
null
null
null
null
22,321
1
160,441
null
4
4,006
I have a client/server application that communicates with .Net remoting. I need my clients to be able to find the server(s) on the network without requiring client-side configuration. As far as I know, there is no support for discovery in remoting. I am prepared to implement a UDP solution where the clients will be a...
Remoting server auto-discovery. Broadcast or not?
CC BY-SA 2.5
0
2008-08-22T13:22:38.867
2009-03-25T06:43:42.930
2008-08-22T13:34:20.303
227
227
[ ".net", "networking", "remoting", "udp", "broadcast" ]
22,325
2
null
22,211
1
null
My basic rule in Django is: if you could conceivably need the functionality from somewhere other than the view itself, it doesn't belong in the view function. I'd also recommend downloading some of the plethora of apps on [Django Pluggables](http://djangoplugables.com/) and seeing how they do it.
null
CC BY-SA 2.5
null
2008-08-22T13:23:43.700
2008-08-22T13:23:43.700
null
null
2,123
null
22,335
2
null
22,326
-3
null
You can use a RichTextbox to convert RTF to text or vice versa. ``` RichTextBox r = new RichTextBox(); r.Rtf = strRTFString; Console.WriteLine(r.Text); ```
null
CC BY-SA 2.5
null
2008-08-22T13:26:46.373
2008-08-22T16:17:00.537
2008-08-22T16:17:00.537
1,908
1,908
null
22,338
1
null
null
11
5,861
I flatter myself that I'm a good programmer, and can get away with graphic design. But something I'm incapable of doing is coming up with good names - and it seems neither are the people I work with. We're now in the slightly ludicrous situation that the product we've been working on for a couple of years is being inst...
How do people choose product names?
CC BY-SA 2.5
0
2008-08-22T13:27:26.060
2014-03-28T00:50:00.533
2012-05-04T14:38:26.710
363,592
1,000
[ "naming" ]
22,306
1
null
null
0
2,756
Just recently started having issues with an SQL Server Agent Job that contains an SSIS package to extract production data and summarize it into a separate reporting database. I that some of the Alerts/Notifications settings I tried playing with caused the problem as the job had been running to completion unattended ...
Where do I begin to learn about SQL Server alerts or notifications?
CC BY-SA 3.0
null
2008-08-22T13:15:52.157
2015-08-24T08:58:46.180
2015-08-24T08:58:46.180
155,077
2,292
[ "sql-server", "ssis", "notifications", "alert", "etl" ]
22,339
2
null
22,015
0
null
> OpenID of course doesn't solve that problem. For example, if I use OpenID to sign in to StackOverflow, it doesn't mean I don't need to sign in to another website again using the same openID. -- tj9991 It can mean that, though. If your sign-on on the OpenID site is rememberd (for example, through cookies), you would ...
null
CC BY-SA 2.5
null
2008-08-22T13:27:38.213
2008-08-22T13:27:38.213
null
null
2,474
null
22,326
1
27,425
null
11
6,799
I am trying to by some stored in a variable. Here is the current code: ``` Clipboard.SetText(strRTFString, TextDataFormat.Rtf) oWord.ActiveDocument.ActiveWindow.Selection.PasteAndFormat(0) ``` Is there any way to do the same thing without going through the clipboard. Or is there any way to push the clipboard data...
Word Automation: Write RTF text without going through clipboard
CC BY-SA 2.5
0
2008-08-22T13:24:24.697
2020-07-05T12:04:44.867
2020-07-05T12:04:44.867
100,297
1,508
[ "vba", "automation", "ms-word" ]
22,344
2
null
22,306
0
null
In each step of the job click on advanced then from there you can log to a file or to a table, this will have all errorcodes and other things why the job failed You should be able to see this also from the job history. Right click on the job-->view history, click on the + sign to expand, the click on each step and it ...
null
CC BY-SA 2.5
null
2008-08-22T13:29:10.613
2008-08-22T13:29:10.613
null
null
740
null
22,330
2
null
22,278
3
null
[rix0rrr hit on it a bit](https://stackoverflow.com/questions/22278/whats-a-good-way-to-encapsulate-data-access-with-php-mysql/22304#22304), in that many tools are a pain to set up. Of course, I have my own solution to this problem that has been working quite well for the past few years. It's a project called [dbFacile...
null
CC BY-SA 3.0
null
2008-08-22T13:25:39.873
2011-11-13T14:07:37.547
2017-05-23T12:33:27.093
-1
null
null
22,340
1
204,036
null
9
11,792
> See also [How does a WCF server inform a WCF client about changes? (Better solution then simple polling, e.g. Coment or long polling)](https://stackoverflow.com/questions/1700917/how-does-a-wcf-server-inform-a-wcf-client-about-changes-better-solution-then-si) I need to use push-technology with WCF through client fir...
WCF push to client through firewall?
CC BY-SA 2.5
0
2008-08-22T13:27:53.937
2015-01-07T11:19:35.973
2017-05-23T10:29:36.727
-1
2,440
[ ".net", "wcf", "firewall", "push", "duplex" ]
22,346
1
null
null
4
14,383
In a C# console app I have the need to extract the text from an RTF string, add some more text to it, and then convert it back into RTF. I have been able to do this using the System.Windows.Forms.RichTextBox class, but I find it a bit odd to use a Forms control in a non-Forms app. Any better way to do this?
How do I extract/insert text into RTF string in C#
CC BY-SA 2.5
null
2008-08-22T13:30:25.633
2010-11-12T18:47:39.133
2008-08-22T14:25:37.450
4
324
[ "c#", "rtf" ]
22,333
2
null
22,259
3
null
Something like this, perhaps: ``` <?php //Input file $file = "myImage.png"; $img = ImageCreateFromPNG($file); //Dimensions $width = imagesx($img); $height = imagesy($img); $max_width = 300; $max_height = 300; $percentage = 1; //Image scaling calculations if ( $width > $max_width ) {...
null
CC BY-SA 2.5
null
2008-08-22T13:26:06.937
2008-08-22T13:26:06.937
null
null
1,993
null
22,351
2
null
22,211
0
null
View function should only contain display helpers or display logic. View functions should never access the model itself, but should take parameters of model data. It is important to separate the model from the view. So if the function handles accessing the database or database objects, it belongs in the model. If the f...
null
CC BY-SA 2.5
null
2008-08-22T13:32:35.893
2008-08-22T13:32:35.893
null
null
2,482
null
22,358
1
null
null
1,257
1,135,398
Is there any way to tinker with the iPhone SDK on a Windows machine? Are there plans for an iPhone SDK version for Windows? The only other way I can think of doing this is to run a Mac VM image on a server running on Windows, although I'm not too sure how legal this is.
How can I develop for iPhone using a Windows development machine?
CC BY-SA 3.0
0
2008-08-22T13:35:01.550
2022-06-27T14:28:57.093
2019-02-05T08:55:32.757
5,235,756
2,454
[ "ios", "iphone", "windows" ]
22,356
1
22,397
null
81
121,825
I find that the .NET event model is such that I'll often be raising an event on one thread and listening for it on another thread. I was wondering what the cleanest way to marshal an event from a background thread onto my UI thread is. Based on the community suggestions, I've used this: ``` // earlier in the code mC...
Cleanest Way to Invoke Cross-Thread Events
CC BY-SA 2.5
0
2008-08-22T13:34:02.583
2021-03-14T20:35:31.363
2008-08-22T16:00:38.220
1,490
1,490
[ "c#", "multithreading", "events" ]
22,334
2
null
22,306
0
null
You'll want to have "When the job completes" marked in your notifications page on the job's properties. Just go to that dropdown and switch it to job completion instead of failure (which is on the screenshot). ![Job_Properties_Notification](https://i.stack.imgur.com/HGlQh.png) You'll also want to make sure that your...
null
CC BY-SA 3.0
null
2008-08-22T13:26:08.530
2011-07-24T16:29:06.147
2011-07-24T16:29:06.147
null
null
null
22,350
2
null
22,346
0
null
It depends on what you mean by 'better'. You are already using the simplest and easiest way of doing it.
null
CC BY-SA 2.5
null
2008-08-22T13:32:32.087
2008-08-22T13:32:32.087
null
null
1,908
null
22,347
2
null
22,322
1
null
I encountered a similar scenario a while back. A toolkit I was using did not behave well in a 64-bit environment and I wasn't able to find a way to dynamically force the assemblies to bind as 32 bit. It is possible to force your assemblies to work in 32 bit mode, but this requires patching the CLR header, (there is a ...
null
CC BY-SA 2.5
null
2008-08-22T13:30:52.090
2008-08-22T13:30:52.090
null
null
227
null
22,364
2
null
22,245
35
null
I'm going to assume you mean "workspace", not "workstation", as your question doesn't quite make sense to me otherwise. In Visual Studio, go to the Source Control Explorer (View->Other Windows->Source Control Explorer). At the top of the source control explorer window you should have a toolbar with a few buttons. So...
null
CC BY-SA 2.5
null
2008-08-22T13:36:08.707
2008-08-22T13:36:08.707
null
null
1,409
null
22,359
2
null
22,319
0
null
I'm a PHP developer so I'll share what I know from PHP. I'm sure .NET will include something similar. In PHP you can get timezone differences for the server time - as you've suggested you'd send the emails at different times on the server. Every time you add a user save their time offset from the server time (or thei...
null
CC BY-SA 2.5
null
2008-08-22T13:35:17.710
2008-08-22T13:35:17.710
null
null
2,025
null
22,354
1
null
null
1
2,336
I am working on a SharePoint application that supports importing multiple documents in a single operation. I also have an ItemAdded event handler that performs some basic maintenance of the item metadata. This event fires for both imported documents and manually created ones. The final piece of the puzzle is a batch...
Sharepoint COMException 0x81020037
CC BY-SA 2.5
null
2008-08-22T13:33:37.340
2013-01-24T10:13:46.280
2008-08-25T13:39:35.960
2,470
2,470
[ "multithreading", "sharepoint", "com" ]
22,369
2
null
22,338
4
null
You should try [BustaName](http://www.bustaname.com/). It basically combines words to create available domain names. You are able to choose similar words for the words that you previously entered. Also try these links out: 1. Naming a company 2. 77 ways to come up with an idea 3. Igor Naming Guide (PDF)
null
CC BY-SA 2.5
null
2008-08-22T13:36:52.403
2008-08-22T13:36:52.403
null
null
299
null
22,384
2
null
22,379
0
null
[See here](https://stackoverflow.com/questions/18632/how-to-monitor-a-text-file-in-realtime#18635) You could either call out to tail and retrieve the stream back into your app, or as it's open source, maybe try to pull it into your own code. Also, it is possible in C++ iostream to open a file for viewing only and jus...
null
CC BY-SA 3.0
null
2008-08-22T13:41:22.017
2013-01-23T05:11:59.520
2017-05-23T10:29:24.563
-1
194
null
22,361
2
null
21,640
187
null
The following (C#) code should do the trick ``` Uri uri = new Uri("http://www.mywebsite.com:80/pages/page1.aspx"); string requested = uri.Scheme + Uri.SchemeDelimiter + uri.Host + ":" + uri.Port; ```
null
CC BY-SA 3.0
null
2008-08-22T13:35:39.863
2015-03-30T23:24:44.613
2015-03-30T23:24:44.613
3,476,191
4,367
null
22,379
1
22,399
null
3
893
I'm wondering how you can implement a program similar to `tail -f` in C/C++, a program that watches for and processes new lines added to a log file?
Implementing a log watcher
CC BY-SA 3.0
0
2008-08-22T13:40:32.597
2016-03-31T14:05:58.113
2016-03-31T14:05:58.113
4,332,828
486
[ "c++", "c", "file", "io" ]
22,395
2
null
22,356
2
null
I've always wondered how costly it is to assume that invoke is required... ``` private void OnCoolEvent(CoolObjectEventArgs e) { BeginInvoke((o,e) => /*do work here*/,this, e); } ```
null
CC BY-SA 2.5
null
2008-08-22T13:44:28.267
2008-08-22T14:05:25.627
2008-08-22T14:05:25.643
null
null
null
22,389
2
null
22,338
0
null
Names -- you can try yourselves or ask friends/customers about what they are thinking about when listen/use your product (I don't know correct English word for that -- if two things have something in common they are associated?). Or, depends on what kind of product is it, ask someone with unlimited imagination -- kids...
null
CC BY-SA 2.5
null
2008-08-22T13:43:05.960
2008-08-22T13:43:05.960
null
null
1,483
null
22,370
2
null
22,321
0
null
The best solution I have found in my remoting work was to keep the server list in a config file on the client systems and make it updateable. Not the easiest to maintain but was fast and no broadcasting.
null
CC BY-SA 2.5
null
2008-08-22T13:36:53.527
2008-08-22T13:36:53.527
null
null
2,305
null
22,387
2
null
22,356
11
null
I shun redundant delegate declarations. ``` private void mCoolObject_CoolEvent(object sender, CoolObjectEventArgs args) { if (InvokeRequired) { Invoke(new Action<object, CoolObjectEventArgs>(mCoolObject_CoolEvent), sender, args); return; } // do the dirty work of my method here } ``` ...
null
CC BY-SA 3.0
null
2008-08-22T13:42:47.477
2015-08-18T17:07:27.007
2015-08-18T17:07:27.007
1,968
1,968
null
22,376
2
null
3,544
2
null
I agree with Joseph, my experience with ClickOnce is its great for the vast majority of projects especially in a corporate environment where it makes build, publish and deployment easy. Implementing the "forced upgrade" to ensure users have the latest version when running is so much easier in ClickOnce, and a main re...
null
CC BY-SA 2.5
null
2008-08-22T13:39:46.563
2008-08-22T13:39:46.563
null
null
2,418
null
22,401
1
22,407
null
74
62,045
I'm looking at the [PHP Manual](http://www.php.net/manual/en/), and I'm not seeing a section on data structures that most languages have, such as lists and sets. Am I just blind or does PHP not have anything like this built in?
Does PHP have built-in data structures?
CC BY-SA 2.5
0
2008-08-22T13:47:43.297
2022-01-09T14:35:35.733
2008-08-25T12:56:41.913
2,134
572
[ "php", "data-structures" ]
22,399
2
null
22,379
5
null
You can use fseek() to clear the eof condition on the stream. Essentially, read to the end of the file, sleep for a while, fseek() (without changing your position) to clear eof, the read to end of file again. wash, rinse, repeat. man fseek(3) for details. Here's what it looks like in perl. perl's seek() is essenti...
null
CC BY-SA 2.5
null
2008-08-22T13:46:16.093
2008-08-22T13:57:10.733
2008-08-22T13:57:10.733
430
430
null
22,396
2
null
22,338
25
null
When it's for something that "matters", I plop down the $50 and have the folks at PickyDomains.com help out. That also results in a name that's available as a .com. For guidelines, here's an extract from my own guide on naming open source projects: 1. If the name you're thinking of is directly pulled from a scifi or...
null
CC BY-SA 2.5
null
2008-08-22T13:45:02.197
2009-02-08T04:43:20.363
2009-02-08T04:43:20.363
9,345
1,124
null
22,400
2
null
22,379
0
null
I think what you're looking for is the select() call in c/c++. I found a copy of the man page here: [http://www.opengroup.org/onlinepubs/007908775/xsh/select.html](http://www.opengroup.org/onlinepubs/007908775/xsh/select.html). Select takes file descriptors as arguments and tells you when one of them has changed and is...
null
CC BY-SA 2.5
null
2008-08-22T13:47:39.880
2008-08-22T13:47:39.880
null
null
2,191
null
22,404
2
null
16,326
0
null
Just as an update in case anyone else has this problem, I installed the .Net 3.5 SP1 update separately. Now I'm down to "only" 5045MB required.
null
CC BY-SA 2.5
null
2008-08-22T13:49:11.563
2008-08-22T13:49:11.563
null
null
1,414
null
22,407
2
null
22,401
62
null
The only native data structure in PHP is array. Fortunately, arrays are quite flexible and can be used as hash tables as well. [http://www.php.net/array](http://www.php.net/array) However, there is SPL which is sort of a clone of C++ STL. [http://www.php.net/manual/en/book.spl.php](http://www.php.net/manual/en/book....
null
CC BY-SA 3.0
null
2008-08-22T13:51:02.447
2013-10-22T20:57:42.883
2013-10-22T20:57:42.883
1,508
1,508
null
22,403
2
null
22,259
24
null
``` <?php /* Resizes an image and converts it to PNG returning the PNG data as a string */ function imageToPng($srcFile, $maxSize = 100) { list($width_orig, $height_orig, $type) = getimagesize($srcFile); // Get the aspect ratio $ratio_orig = $width_or...
null
CC BY-SA 2.5
null
2008-08-22T13:49:01.267
2008-08-22T13:49:01.267
null
null
2,482
null
22,409
1
848,533
null
8
12,580
I have a need to convert images from CMYK to RGB - not necessarily back again, but hey, if it can be done... With the release of ColdFusion 8, we got the [CFImage](http://cfquickdocs.com/cf8/?getDoc=cfimage) tag, but it doesn't support this conversion; and nor does [Image.cfc](http://x.com), or [Alagad's Image Compone...
How do I convert images between CMYK and RGB in ColdFusion (Java)?
CC BY-SA 3.0
0
2008-08-22T13:51:39.263
2013-07-06T00:07:06.810
2012-01-11T19:02:07.717
850,882
751
[ "java", "image", "coldfusion" ]
22,402
2
null
22,245
11
null
Are you wanting to change the location of the files on the workstation? If so, here's how I do it: 1. Open Visual Studio 2. Open the Source Control Explorer window. 3. From the Workspace dropdown select "Workspaces..." 4. The Manage Workspaces dialog should show up. 5. Select the workspace you want to modify, and cl...
null
CC BY-SA 2.5
null
2008-08-22T13:48:30.520
2008-08-22T13:57:05.757
2008-08-22T13:57:05.757
733
733
null
22,414
2
null
22,322
3
null
I was able to do this about a year ago, but I no longer remember all of the details. Basically, you can use IntPtr.Size to determine which DLL to load, then perform the actual LoadLibrary through p/Invoke. At that point, you've got the module in memory and you ought to be able to just p/Invoke functions from inside o...
null
CC BY-SA 2.5
null
2008-08-22T13:53:12.893
2008-08-22T13:53:12.893
null
null
533
null
22,415
2
null
22,356
0
null
You can try to develop some sort of a generic component that accepts a [SynchronizationContext](http://msdn.microsoft.com/en-us/library/system.threading.synchronizationcontext.aspx) as input and uses it to invoke the events.
null
CC BY-SA 2.5
null
2008-08-22T13:53:17.420
2008-08-22T13:53:17.420
null
null
2,150
null
22,405
2
null
22,401
8
null
PHP has arrays, which are actually associative arrays and can also be used as sets. Like many interpreted languages, PHP offers all this under one hood instead of providing different explicit data types. E.g. ``` $lst = array(1, 2, 3); $hsh = array(1 => "This", 2 => "is a", 3 => "test"); ``` Also, take a look [in the ...
null
CC BY-SA 4.0
null
2008-08-22T13:49:41.157
2022-01-09T14:35:35.733
2022-01-09T14:35:35.733
1,968
1,968
null
22,412
2
null
22,401
7
null
PHP's [array](http://hudzilla.org/phpwiki/index.php?title=Arrays) doubles as both a list and a dictionary. ``` $myArray = array("Apples", "Oranges", "Pears"); $myScalar = $myArray[0] // == "Apples" ``` Or to use it as an associative array: ``` $myArray = array("a"=>"Apples", "b"=>"Oranges", "c"=>"Pears"); $myScalar...
null
CC BY-SA 2.5
null
2008-08-22T13:52:42.037
2008-08-22T13:52:42.037
null
null
1,595
null
22,397
2
null
22,356
29
null
A couple of observations: - ``` BeginInvoke(new EventHandler<CoolObjectEventArgs>(mCoolObject_CoolEvent), sender, args); ``` - Also you don't need to create and populate the object array because the args parameter is a "params" type so you can just pass in the list.- I would probabl...
null
CC BY-SA 3.0
null
2008-08-22T13:45:40.993
2013-08-21T13:14:41.877
2013-08-21T13:14:41.877
1,871,700
1,120
null
22,421
2
null
22,417
1
null
I would probably leave it up to your application to perform the scoring. Check out [Maybe Normalizing Isn't Normal](http://www.codinghorror.com/blog/archives/001152.html) by Jeff Atwood.
null
CC BY-SA 2.5
null
2008-08-22T13:58:59.167
2008-08-22T13:58:59.167
null
null
299
null
22,424
2
null
22,417
0
null
The architecture you are talking about could become very cumbersome in the long run, and if you need to change the questions it means more changes to the UDF you are using. I would think you could probably do your analysis in code without necessarily de-normalizing your database. De-normalization could also lend to i...
null
CC BY-SA 2.5
null
2008-08-22T14:00:51.753
2008-08-22T14:00:51.753
null
null
312
null
22,416
2
null
22,401
3
null
Of course PHP has data structures. The array in php is incredibly flexible. Some examples: ``` $foo = array( 'bar' => array(1,'two',3), 'baz' => explode(" ", "Some nice words") ); ``` Then you have an absolute plethora of array functions available to map/filter/walk/etc the structures, or convert, flip, reverse,...
null
CC BY-SA 2.5
null
2008-08-22T13:53:41.660
2008-08-22T13:53:41.660
null
null
1,951
null
22,418
2
null
22,401
16
null
The associative array can be used for most basic data structures hashtable, queue, stack. But if you want something like a tree or heap I don't think they exist by default but I'm sure there are free libraries anywhere. To have an array emulate a stack use `array_push()` to add and `array_pop()` to take off To have ...
null
CC BY-SA 2.5
null
2008-08-22T13:57:21.513
2008-08-22T13:57:21.513
null
null
792
null
22,413
2
null
22,401
5
null
I think you might want to be a bit more specific, when you say data structures my mind goes in a few directions... Arrays - They are certainly well documented and available in. ([http://us.php.net/manual/en/book.array.php](http://us.php.net/manual/en/book.array.php)) SQL Data - Depends on the database you are using, bu...
null
CC BY-SA 4.0
null
2008-08-22T13:52:54.737
2022-01-09T13:42:31.023
2022-01-09T13:42:31.023
1,839,439
2,490
null
22,425
2
null
21,411
4
null
What this probably means is that your Apache is only using 1 child process. Therefore: The 1 child process is handling a request (in this case sleeping but it could be doing real work, Apache can't tell the difference), so when a new request comes it, it will have to wait until the first process is done. The soluti...
null
CC BY-SA 2.5
null
2008-08-22T14:01:07.120
2008-08-22T14:01:07.120
null
null
2,474
null
22,426
2
null
22,417
0
null
No way, you definitely want to keep it normalized. It's not even that hard of a query. Basically, you want to left join the students correct answers with the total answers for that question, and do a count. This will give you the percent correct. Do that for each student, and put the minimum percent correct in a where...
null
CC BY-SA 2.5
null
2008-08-22T14:01:58.427
2008-08-22T14:01:58.427
null
null
26
null
22,427
2
null
22,417
0
null
Denormalization is generally considered a last resort. The problem seems very similar to survey applications, which are very common. Without seeing your data model, it's difficult to propose a solution, but I will say that it is definitely possible. I'm wondering why you need 20 parameters to that function? A relat...
null
CC BY-SA 2.5
null
2008-08-22T14:02:13.683
2008-08-22T14:02:13.683
null
null
1,219
null
22,417
1
22,448
null
0
2,323
Say I have a Student table, it's got an int ID. I have a fixed set of 10 multiple choice questions with 5 possible answers. I have a normalized answer table that has the question id, the Student.answer (1-5) and the Student.ID I'm trying to write a single query that will return all scores over a certain pecentage. ...
SQL Query Help - Scoring Multiple Choice Tests
CC BY-SA 2.5
0
2008-08-22T13:53:46.137
2008-09-26T19:46:34.793
2008-09-26T19:46:34.807
2,134
1,975
[ "dynamic-sql" ]
22,430
2
null
22,379
0
null
The tail program is open source, so you could reference that. I wondered the same thing and looked at the code a while back, thinking it would be pretty simple, but I was surprised at how complex it was. There are lots of gotchas that have to be taken into account.
null
CC BY-SA 2.5
null
2008-08-22T14:04:49.637
2008-08-22T14:04:49.637
null
null
1,219
null
22,437
2
null
22,429
1
null
[jQuery inline search plugin](https://github.com/hmert/inline-search) provides this functionality
null
CC BY-SA 3.0
null
2008-08-22T14:07:13.220
2012-09-18T12:42:16.467
2012-09-18T12:42:16.467
425,076
648
null
22,429
1
22,437
null
6
2,889
Is it possible to embed an inline search box into a web page which provides similar functionality to the [IE7Pro Inline Search](http://www.ie7pro.com/inline-search.html) or similar plugins for Firefox/Safari?
Adding Inline Search function to web page
CC BY-SA 2.5
null
2008-08-22T14:04:13.633
2012-09-18T12:42:16.467
null
null
2,418
[ "javascript", "html" ]