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
11,562
1
2,684,544
null
126
36,796
`std::swap()` is used by many std containers (such as `std::list` and `std::vector`) during sorting and even assignment. But the std implementation of `swap()` is very generalized and rather inefficient for custom types. Thus efficiency can be gained by overloading `std::swap()` with a custom type specific implementa...
How to overload std::swap()
CC BY-SA 3.0
0
2008-08-14T19:24:17.260
2021-10-12T12:56:04.737
2013-03-22T18:30:07.997
140,719
1,366
[ "c++", "performance", "optimization", "stl", "c++-faq" ]
11,580
2
null
11,574
0
null
> I can post the inner loop code, but I'm not sure if SO is supposed to be generic or specific. I'll let the mob decide. The code you post as an example can be as specific as you (or your boss) is comfortable with - more often than not, it's easier to help you with more specific details.
null
CC BY-SA 2.5
null
2008-08-14T19:34:54.040
2008-12-27T15:56:40.430
null
null
35
null
11,588
2
null
11,462
20
null
Here are some caveats I came across that will vanish if you use a wiki other than Sharepoint. Sharepoint lets you create tons of separate wikis, but I'd recommend having one big wiki for everything. My company made a bunch of little wikis for each project/feature, but only admins can create the individual wikis, so if...
null
CC BY-SA 2.5
null
2008-08-14T19:42:02.840
2008-08-14T19:42:02.840
null
null
1,317
null
11,589
2
null
11,586
2
null
There are many design patterns beyond the simple that are used in "real world". Good example Stackoverflow uses the Model View Controller Pattern. I have used Class Factories multiple times in projects for my employer, and I have seen many already written projects using them as well. I am not saying every design patt...
null
CC BY-SA 2.5
null
2008-08-14T19:42:32.840
2008-08-14T19:42:32.840
null
null
567
null
11,592
2
null
11,586
2
null
Yes, Factory, Chain of Responsibility, Command, Proxy, Visitor, and Observer, among others, are in use in a codebase I work with daily. As far as MVC goes, this site seems to use it quite well, and the devs couldn't say enough good things in the [latest podcast](http://itc.conversationsnetwork.org/shows/detail3787.htm...
null
CC BY-SA 2.5
null
2008-08-14T19:44:48.467
2008-08-14T20:02:37.777
2008-08-14T20:02:37.777
35
35
null
11,587
2
null
11,586
3
null
I try to, yes. They do indeed help maintainability and readability of your code. However, there are people who do abuse them, usually (from what I've seen) by forcing a system into a pattern that doesn't exist.
null
CC BY-SA 2.5
null
2008-08-14T19:41:40.330
2008-08-14T19:41:40.330
null
null
572
null
11,597
2
null
11,586
3
null
I try to use patterns if they are applicable. I think it's kind of sad seeing developers implement design patterns in code just for the sake of it. For the right task though, design patterns can be very useful and powerful.
null
CC BY-SA 2.5
null
2008-08-14T19:46:04.597
2008-08-14T19:46:04.597
null
null
936
null
11,591
2
null
11,586
2
null
Yes we do, it usually happens when we start designing something and then someone notices that it resembles an existing pattern. We then take a look at it and see how it would help us achieve our goal. We also use patterns that are not documented but that emerge from designing a lot. Mind you, we don't use them a lot....
null
CC BY-SA 2.5
null
2008-08-14T19:44:40.667
2008-08-14T19:44:40.667
null
null
810
null
11,601
2
null
11,586
1
null
Yes, I use a lot of well known design patterns, but I also end up building some software that I later find out uses a 'named' design pattern. Most elegant, reusable designs could be called a 'pattern'. It's a lot like dance moves. We all know the waltz, and the 2-step, but not everyone has a name for the 'bump and scoo...
null
CC BY-SA 2.5
null
2008-08-14T19:47:18.010
2008-08-14T19:47:18.010
null
null
12,081
null
11,602
2
null
11,586
1
null
MVC is very well known so yes we use design patterns quite a lot. Now if your asking about the Gang of Four patterns, there are several that I use because other maintainers will know the design and what we are working towards in the code. There are several though that remain fairly obscure for what we do, so if I use...
null
CC BY-SA 2.5
null
2008-08-14T19:47:20.880
2008-08-14T19:47:20.880
null
null
1,327
null
11,613
2
null
11,514
4
null
FWIW, I did finally find solution to the situation. I had my travel buddy (who is still stuck in the qwerty stone age) type while I dictated. That was a 10x speed improvement over my hunting-and-pecking. And much easier, too.
null
CC BY-SA 2.5
null
2008-08-14T19:52:10.463
2008-08-14T19:52:10.463
null
null
1,318
null
11,594
2
null
11,520
4
null
You should take a look at [Visual Studio Gallery](http://www.visualstudiogallery.com/), the . Here you'll find quite a lot of extensions for Visual Studio in all categories, from intellisense and refactoring to designers and documentation builders.
null
CC BY-SA 2.5
null
2008-08-14T19:45:43.520
2008-08-14T19:45:43.520
null
null
267
null
11,611
2
null
11,585
1
null
Hmm. You can specify a VaryByCustom attribute on the OutputCache item. The value of this is passed as a parameter to the GetVaryByCustomString method that you can implement in global.asax. The value returned by this method is used as an index into the cached items - if you return the number of comments on the page, for...
null
CC BY-SA 2.5
null
2008-08-14T19:51:50.683
2008-08-14T19:51:50.683
null
null
1,194
null
11,615
1
11,618
null
13
3,851
I'm looking for a book/site/tutorial on best practices for relational database design, tuning for performance etc. It turns out this kind of resource is a bit difficult to find; there's a lot of "here's normalization, here's ER diagrams, have at it," but not much in the way of real examples. Anyone have any ideas?
Good Resources for Relational Database Design
CC BY-SA 2.5
0
2008-08-14T19:52:54.847
2014-05-20T20:35:17.820
2008-08-23T18:08:57.123
2,134
1,370
[ "sql", "database", "performance" ]
11,616
2
null
11,500
1
null
Have you tried these tips? [http://weblogs.asp.net/haroonwaheed/archive/2008/06/30/ASP.NET-Performance-Tips.aspx](http://weblogs.asp.net/haroonwaheed/archive/2008/06/30/ASP.NET-Performance-Tips.aspx)
null
CC BY-SA 2.5
null
2008-08-14T19:53:55.437
2008-08-14T19:53:55.437
null
null
731
null
11,619
2
null
11,561
9
null
I'd hop over to [http://www.w3.org/TR/wsdl.html](http://www.w3.org/TR/wsdl.html) which I think explains Port, Service and Endpoint reasonably well. A locator is an implementation specific mechanism that some WS stacks use to provide access to service endpoints.
null
CC BY-SA 2.5
null
2008-08-14T19:54:23.860
2008-08-14T19:54:23.860
null
null
419
null
11,618
2
null
11,615
10
null
Book: [Database Design for Mere Mortals](https://rads.stackoverflow.com/amzn/click/com/0201752840)
null
CC BY-SA 2.5
null
2008-08-14T19:54:23.113
2009-09-25T14:07:43.213
2009-09-25T14:07:43.213
619
619
null
11,609
2
null
11,586
1
null
I find the MVC pattern really useful to isolate your model logic, which can than be reused or worked on without too much trouble. It also helps de-coupling your classes and makes unit testing easier. I wrote about it [recently](http://blog.lonestardeveloper.com/2008/07/mvc-pattern-and-me.html) (yes, shameless plug here...
null
CC BY-SA 2.5
null
2008-08-14T19:50:15.007
2008-08-14T19:50:15.007
null
null
160
null
11,599
2
null
11,562
55
null
You're not allowed (by the C++ standard) to overload std::swap, however you are specifically allowed to add template specializations for your own types to the std namespace. E.g. ``` namespace std { template<> void swap(my_type& lhs, my_type& rhs) { // ... blah } } ``` then the usages in the s...
null
CC BY-SA 3.0
null
2008-08-14T19:46:32.113
2014-01-27T14:15:05.883
2014-01-27T14:15:05.883
368,896
1,367
null
11,617
2
null
11,586
54
null
Any large program that is well written will use design patterns, even if they aren't named or recognized as such. That's what design patterns are, designs that repeatedly and occur. If you're interfacing with an ugly API, you'll likely find yourself implementing a `Facade` to clean it up. If you've got messaging be...
null
CC BY-SA 2.5
null
2008-08-14T19:54:09.633
2008-08-14T20:00:38.280
2008-08-14T20:00:38.280
872
872
null
11,620
1
11,624
null
294
433,948
I want to rename a database, but keep getting the error that 'couldn't get exclusive lock' on the database, which implies there is some connection(s) still active. How can I kill all the connections to the database so that I can rename it?
How do you kill all current connections to a SQL Server 2005 database?
CC BY-SA 2.5
0
2008-08-14T19:54:25.187
2019-11-14T16:17:02.803
2010-07-13T14:28:26.700
5,696,608
1,341
[ "sql-server", "sql-server-2005" ]
11,623
2
null
11,620
4
null
In MS SQL Server Management Studio on the object explorer, right click on the database. In the context menu that follows select 'Tasks -> Take Offline'
null
CC BY-SA 2.5
null
2008-08-14T19:56:56.540
2008-08-14T19:56:56.540
null
null
1,194
null
11,621
2
null
11,585
1
null
If you change "*" to just the parameters the cache should vary on (PostID?) you can do something like this: ``` //add dependency string key = "post.aspx?id=" + PostID.ToString(); Cache[key] = new object(); Response.AddCacheItemDependency(key); ``` and when someone adds a comment... ``` Cache.Remove(key); ``` I gu...
null
CC BY-SA 2.5
null
2008-08-14T19:55:31.847
2008-08-14T19:55:31.847
null
null
521
null
11,627
2
null
11,620
112
null
Script to accomplish this, replace 'DB_NAME' with the database to kill all connections to: ``` USE master GO SET NOCOUNT ON DECLARE @DBName varchar(50) DECLARE @spidstr varchar(8000) DECLARE @ConnKilled smallint SET @ConnKilled=0 SET @spidstr = '' Set @DBName = 'DB_NAME' IF db_id(@DBName) < 4 BEGIN PRINT 'Connection...
null
CC BY-SA 2.5
null
2008-08-14T19:57:15.073
2008-08-14T19:57:15.073
null
null
1,341
null
11,624
2
null
11,620
386
null
The reason that the approach that [Adam suggested](https://stackoverflow.com/questions/11620/how-do-you-kill-all-current-connections-to-a-sql-server-2005-database/11627#11627) won't work is that during the time that you are looping over the active connections new one can be established, and you'll miss those. You could...
null
CC BY-SA 4.0
null
2008-08-14T19:56:56.633
2019-11-14T16:17:02.803
2019-11-14T16:17:02.803
5,543,915
740
null
11,593
2
null
10,855
1,396
null
You can't query against the `DataTable`'s collection, since `DataRowCollection` doesn't implement `IEnumerable<T>`. You need to use the `AsEnumerable()` extension for `DataTable`. Like so: ``` var results = from myRow in myDataTable.AsEnumerable() where myRow.Field<int>("RowNo") == 1 select myRow; ``` And as [@Keith]...
null
CC BY-SA 4.0
null
2008-08-14T19:45:01.383
2021-09-22T18:38:30.743
2021-09-22T18:38:30.743
1,369
1,369
null
11,633
2
null
11,620
24
null
I've always used: ``` ALTER DATABASE DB_NAME SET SINGLE_USER WITH ROLLBACK IMMEDIATE GO SP_RENAMEDB 'DB_NAME','DB_NAME_NEW' Go ALTER DATABASE DB_NAME_NEW SET MULTI_USER -- set back to multi user GO ```
null
CC BY-SA 2.5
null
2008-08-14T20:00:23.427
2008-08-14T20:00:23.427
null
null
225
null
11,638
2
null
11,632
9
null
This topic has had a lot of face time since .Net 2.0 was released. See this [Wikipedia](http://en.wikipedia.org/wiki/Comparison_of_C_sharp_and_Visual_Basic_.NET) article for a readable summary.
null
CC BY-SA 2.5
null
2008-08-14T20:02:47.197
2008-08-14T20:02:47.197
null
null
149
null
11,632
1
11,663
null
34
10,292
Certainly there's the difference in general syntax, but what other critical distinctions exist? There are differences, right?
What are the most important functional differences between C# and VB.NET?
CC BY-SA 2.5
0
2008-08-14T19:59:40.090
2015-02-11T01:21:02.683
null
null
337
[ "c#", "vb.net", "comparison" ]
11,640
2
null
11,632
3
null
[This](http://www.codeproject.com/KB/dotnet/vbnet_c__difference.aspx) is a very comprehensive reference.
null
CC BY-SA 2.5
null
2008-08-14T20:03:21.033
2008-08-14T20:03:21.033
null
null
44
null
11,643
2
null
11,615
6
null
Take a look at the [Library of Free Data Models](http://www.databaseanswers.org/data_models/index.htm). There are tons of example database designs, with diagrams that cover real-world scenarios (and some just fun/funny ones as well). I haven't ever used one as-is, but it's often been handy to get an idea of how to appr...
null
CC BY-SA 2.5
null
2008-08-14T20:05:06.740
2008-08-14T20:05:06.740
null
null
1,124
null
11,641
2
null
11,585
49
null
I've found the answer I was looking for: ``` HttpResponse.RemoveOutputCacheItem("/caching/CacheForever.aspx"); ```
null
CC BY-SA 2.5
null
2008-08-14T20:04:36.290
2008-08-14T20:04:36.290
null
null
383
null
11,646
2
null
11,612
3
null
Both Jotspot and MediaWiki allow you to do this. The latter has support for a lot of plugins, of which this is one. The format is essentially PageTitle@something. Jotspot is a hosted solution where you get your own email address, MediaWiki is self-hosted and you give it a mailbox to monitor for incoming. Articles are ...
null
CC BY-SA 2.5
null
2008-08-14T20:06:44.180
2008-08-14T20:06:44.180
null
null
1,043
null
11,630
2
null
11,620
2
null
Try this: ``` ALTER DATABASE [DATABASE_NAME] SET SINGLE_USER WITH ROLLBACK IMMEDIATE ```
null
CC BY-SA 2.5
null
2008-08-14T19:58:13.777
2008-08-14T19:58:13.777
null
null
317
null
11,629
2
null
11,620
27
null
Using SQL Management Studio Express: In the Object Explorer tree drill down under Management to "Activity Monitor" (if you cannot find it there then right click on the database server and select "Activity Monitor"). Opening the Activity Monitor, you can view all process info. You should be able to find the locks for t...
null
CC BY-SA 3.0
null
2008-08-14T19:58:03.947
2011-11-21T07:51:13.603
2011-11-21T07:51:13.603
79,835
507
null
11,648
2
null
11,615
1
null
Here are some resources I could find on the web. They include examples you are looking for: - [Designing and creating a Relational Database - Dr Lorna Scammell: Newcastle University Database Adviser](http://databases.ncl.ac.uk/databases/Design/default.aspx)- [Sample Data Models for Relational Database Design](http://w...
null
CC BY-SA 3.0
null
2008-08-14T20:07:39.217
2014-05-20T20:35:17.820
2014-05-20T20:35:17.820
1,972,695
1,311
null
11,649
2
null
11,520
3
null
Once you get into resharper, you really don't want to leave, its done a massive amount to improve my productivity. It depends though on what you are doing. Are you doing a lot of TDD when you write tests, write code, then refactor? Unless you are pretty intensely into refactoring then I'd suggest that you might not g...
null
CC BY-SA 2.5
null
2008-08-14T20:07:46.050
2008-08-14T20:07:46.050
null
null
942
null
11,653
2
null
11,635
6
null
Assuming you are looking for a method and not a magic function that already exists, there is frankly no better way. We could all write code snippets with clever tricks for limited character sets, but at the end of the day at somepoint you have to convert the characters. The best approach for this conversion is to do s...
null
CC BY-SA 2.5
null
2008-08-14T20:10:37.807
2008-08-14T20:13:45.507
2008-08-14T20:13:45.507
1,043
1,043
null
11,654
2
null
11,635
13
null
Visual C++ string functions supporting unicode: [http://msdn.microsoft.com/en-us/library/cc194799.aspx](http://msdn.microsoft.com/en-us/library/cc194799.aspx) the one you are probably looking for is `_wcsnicmp`
null
CC BY-SA 3.0
null
2008-08-14T20:11:48.070
2013-07-26T15:17:11.983
2013-07-26T15:17:11.983
1,009,479
77
null
11,635
1
315,463
null
372
602,058
What is the best way of doing case-insensitive string comparison in C++ without transforming a string to all uppercase or all lowercase? Please indicate whether the methods are Unicode-friendly and how portable they are.
Case-insensitive string comparison in C++
CC BY-SA 3.0
0
2008-08-14T20:01:28.497
2022-01-02T11:38:29.237
2017-08-23T16:35:26.420
4,850,040
1,366
[ "c++", "string" ]
11,662
2
null
11,632
2
null
Since I assume you can google, I don't think a link to more sites is what you are looking for. My answer: Choose base on the history of your developers. C# is more JAVA like, and probably C++ like. VB.NET was easier for VB programmers, but I guess that is no really an issue anymore sine there are no new .NET programme...
null
CC BY-SA 2.5
null
2008-08-14T20:23:49.323
2008-08-14T20:23:49.323
null
null
350
null
11,612
1
11,646
null
6
376
I want to consolidate all the loose information of the company I work for into a knowledge base. A wiki seems to be the way to go, but most of the relevant information is buried inside PST files, and it would take ages to convince people to manually translate their emails one by one (including attachments) into wiki pa...
Is there any wiki engine that supports page creation by email?
CC BY-SA 3.0
null
2008-08-14T19:51:52.010
2012-08-11T15:43:23.870
2012-08-11T15:43:23.870
1,477,076
1,014
[ "email", "wiki", "mime", "wiki-engine" ]
11,669
2
null
11,635
12
null
FYI, `strcmp()` and `stricmp()` are vulnerable to buffer overflow, since they just process until they hit a null terminator. It's safer to use `_strncmp()` and [_strnicmp()](http://msdn.microsoft.com/en-us/library/chd90w8e(VS.80).aspx).
null
CC BY-SA 3.0
null
2008-08-14T20:29:24.867
2013-07-26T15:18:45.680
2013-07-26T15:18:45.680
1,009,479
332
null
11,657
2
null
11,586
10
null
In my opinion, the question: "Do you design pattern?", alone is a little flawed because the answer is universally YES. Let me explain, we, programmers and designers, all use design patterns... we just don't always realise it. I know this sounds cliché, but you don't go to patterns, patterns come to you. You design st...
null
CC BY-SA 2.5
null
2008-08-14T20:16:55.733
2008-08-14T20:16:55.733
null
null
42
null
11,670
2
null
11,635
4
null
I've had good experience using the [International Components for Unicode libraries](http://icu-project.org/userguide/) - they're extremely powerful, and provide methods for conversion, locale support, date and time rendering, case mapping (which you don't seem to want), and [collation](http://icu-project.org/userguide/...
null
CC BY-SA 2.5
null
2008-08-14T20:29:47.707
2008-08-26T11:02:19.713
2008-08-26T11:02:19.713
1,199
1,199
null
11,665
1
12,310
null
2
5,982
Here is the sample code for my accordion: ``` <mx:Accordion x="15" y="15" width="230" height="599" styleName="myAccordion"> <mx:Canvas id="pnlSpotlight" label="SPOTLIGHT" height="100%" width="100%" horizontalScrollPolicy="off"> <mx:VBox width="100%" height="80%" paddingTop="2" paddingBottom="1" verticalGa...
How do I restyle an Adobe Flex Accordion to include a button in each canvas header?
CC BY-SA 4.0
null
2008-08-14T20:25:07.840
2018-12-27T22:02:20.540
2018-12-27T22:02:20.540
4,751,173
26
[ "apache-flex", "actionscript-3" ]
11,664
2
null
2,756
1
null
I'm not sure exactly what you mean by 'lightweight,' but here are a few popular IDEs for linux: [Anjuta](http://anjuta.sourceforge.net/) for Gtk/Gnome [KDevelop](http://www.kdevelop.org/) or [Quanta](http://quanta.kdewebdev.org/) for KDE [CodeBlocks](http://www.codeblocks.org/) runs on Windows/Mac/Linux and is written...
null
CC BY-SA 2.5
null
2008-08-14T20:24:33.130
2008-08-14T20:28:58.673
2008-08-14T20:28:58.673
1,249
1,249
null
11,663
2
null
11,632
33
null
The linked comparisons are very thorough, but as far as the main differences I would note the following: - - - [implicit late binding](http://smartypeeps.blogspot.com/2006/06/late-binding-in-c-and-vbnet.html)- - - - In general the things MS focuses on for each vary, because the two languages are targeted at very dif...
null
CC BY-SA 3.0
null
2008-08-14T20:23:55.457
2015-02-11T01:21:02.683
2015-02-11T01:21:02.683
327
327
null
11,676
1
11,688
null
5
3,100
I haven't touched sharepoint in years. If I want to setup a development environment to get up to speed, what options do I have? I don't have an MSDN license, is there anyway I can get up and running for free? (for development only)
Creating a development environment for SharePoint
CC BY-SA 2.5
0
2008-08-14T20:34:07.727
2008-09-25T21:55:28.463
null
null
1,368
[ "sharepoint" ]
11,681
2
null
11,680
1
null
The Strategy pattern is maybe one you want to look at. The strategy being the file parsing algorithm. Then you want a separate strategy for database insertion.
null
CC BY-SA 2.5
null
2008-08-14T20:37:15.193
2008-08-14T20:37:15.193
null
null
942
null
11,677
2
null
11,632
1
null
Apart from syntax not that much any more. They both compile to exactly the same IL, so you can compile something as VB and reflect it into C#. Most of the apparent differences are syntactic sugar. For instance VB appears to support dynamic types, but really they're just as static as C#'s - the VB compiler figures them...
null
CC BY-SA 2.5
null
2008-08-14T20:34:32.283
2008-08-14T20:34:32.283
null
null
905
null
11,680
1
11,712
null
6
7,908
Does anybody recommend a design pattern for taking a binary data file, parsing parts of it into objects and storing the resultant data into a database? I think a similar pattern could be used for taking an XML or tab-delimited file and parse it into their representative objects. A common data structure would includ...
Design pattern for parsing binary file data and storing in a database
CC BY-SA 3.0
0
2008-08-14T20:36:07.380
2013-02-10T06:43:26.547
2013-02-10T06:43:26.547
834,176
1,048
[ "design-patterns", "fileparse" ]
11,675
2
null
11,635
57
null
Are you talking about a dumb case insensitive compare or a full normalized Unicode compare? A dumb compare will not find strings that might be the same but are not binary equal. Example: ``` U212B (ANGSTROM SIGN) U0041 (LATIN CAPITAL LETTER A) + U030A (COMBINING RING ABOVE) U00C5 (LATIN CAPITAL LETTER A WITH RING A...
null
CC BY-SA 4.0
null
2008-08-14T20:31:35.300
2020-04-13T11:53:59.837
2020-04-13T11:53:59.837
-1
42
null
11,683
2
null
11,676
3
null
There is no way you can have a MOSS 2007/WSS 3.0 development for free but a [Microsoft Action Pact](https://partner.microsoft.com/40016455) is so cheap to get. :) There is a nice blog to read to get the requirements and the steps to get a full MOSS 2007 image up and running here : [How to Create a MOSS 2007 VPC Image:...
null
CC BY-SA 2.5
null
2008-08-14T20:43:58.410
2008-08-14T20:53:51.167
2008-08-14T20:53:51.167
1,291
1,291
null
11,686
1
11,728
null
4
328
I have a MySQL query that returns a result with a single column of integers. Is there any way to get the MySQL C API to transfer this as actually integers rather than as ASCII text? For that matter is there a way to get MySQL to do /any/ of the API stuff as other than ASCII text. I'm thinking this would save a bit of t...
Is there any kind of non text interface to MySQL?
CC BY-SA 2.5
0
2008-08-14T20:47:06.860
2013-07-04T12:21:31.540
2013-07-04T12:21:31.540
207,421
1,343
[ "mysql", "api" ]
11,679
2
null
11,635
16
null
I'm trying to cobble together a good answer from all the posts, so help me edit this: Here is a method of doing this, although it does transforming the strings, and is not Unicode friendly, it should be portable which is a plus: ``` bool caseInsensitiveStringCompare( const std::string& str1, const std::string& str2 )...
null
CC BY-SA 3.0
null
2008-08-14T20:35:17.180
2011-12-19T21:54:29.727
2011-12-19T21:54:29.727
1,366
1,366
null
11,690
1
11,700
null
6
3,332
I've got some Japanese in the ALT attribute, but the tooltip is showing me the ugly block characters in the tooltip. The rest of the content on the page renders correctly. So far, it seems to be limited to the tooltips.
How can I get Unicode characters to display properly for the tooltip for the IMG ALT in IE7?
CC BY-SA 2.5
0
2008-08-14T20:50:31.470
2008-09-17T00:51:00.750
null
null
337
[ "internet-explorer", "unicode" ]
11,692
2
null
11,462
5
null
The Sharepoint Wiki is essentially a list of Static HTML Pages, with the only Wiki-feature being [[article]] links. No Templates, No Categories, nothing. We ended up having a separate MediaWiki and only use the Sharepoint wiki for text-based content that does not need much layout.
null
CC BY-SA 2.5
null
2008-08-14T20:53:07.457
2008-08-14T20:53:07.457
null
null
91
null
11,688
2
null
11,676
9
null
You a Windows 2003 Server (or 2008 Server, but I have no experience with that), no way around that. You can then of course use Visual C# 2005 Express and the SHarepoint Services 3.0 if that's your target. If you want to do development on Sharepoint 2007, you have to buy a Sharepoint 2007 license, which has a pretty h...
null
CC BY-SA 2.5
null
2008-08-14T20:49:08.633
2008-08-14T20:49:08.633
null
null
91
null
11,694
2
null
11,689
1
null
Hmm, sounds kind of like this site... As far as a database design would go, a versioning system kind of like SVN, where you never actually do any updates, just inserts (with a version number) when things change, might be what you need. This is called MVCC, Multi-Value Concurrency Control. A wiki is another good exam...
null
CC BY-SA 2.5
null
2008-08-14T20:57:36.573
2008-08-14T20:57:36.573
null
null
1,219
null
11,693
2
null
11,690
2
null
I'm not sure about the unicode issue but if you want the tooltip effect you should be using the title attribute, not alt. Alt is for text you want screenreaders to speak, and it's what gets displayed if an image can't be loaded.
null
CC BY-SA 2.5
null
2008-08-14T20:56:08.183
2008-08-14T20:56:08.183
null
null
444
null
11,516
1
12,138
null
5
3,565
I’m creating a UserControl for a rich TreeView (one that has context menus for renaming nodes, adding child nodes, etc.). I want to be able to use this control to manage or navigate any hierarchical data structures I will create. I currently have it working for any data structure that implements the following interface...
Variable Bindings in WPF
CC BY-SA 2.5
null
2008-08-14T19:01:02.737
2012-08-11T15:49:40.103
null
null
317
[ "c#", "wpf", "data-binding" ]
11,703
2
null
11,405
8
null
The main reason C++ cannot assume anything here is that the base template can be specialized for a type later. Continuing the original example: ``` template<> class A<int> {}; B<int> x; x.bar();//this will fail because there is no member foo in A<int> ```
null
CC BY-SA 2.5
null
2008-08-14T21:06:41.360
2008-08-14T21:06:41.360
null
null
852
null
11,704
2
null
11,462
2
null
I've played very briefly with [SharePoint Wiki Plus](http://www.kwizcom.com/ProductPage.asp?ProductID=524&ProductSubNodeID=525). It's a third-party extension that adds features to the SharePoint Wiki. For serious wiki users then you probably need something more than the SharePoint provided Wiki - either via an extensio...
null
CC BY-SA 2.5
null
2008-08-14T21:07:05.790
2008-08-14T21:07:05.790
null
null
636
null
11,700
2
null
11,690
5
null
This is because the font used in the tooltip doesn't include the characters you are trying to display. Try installing a font pack that includes those characters. I'm affraid you can't do much for your site's visitors other than implementating a tooltip yourself using javascript.
null
CC BY-SA 2.5
null
2008-08-14T21:04:22.160
2008-08-14T21:09:28.123
2008-08-14T21:09:28.123
42
42
null
11,709
2
null
11,699
1
null
Clippy noticed that you have sensitive information in your files and automatically encrypted them. Are you sure it's for EFS? I've had things prompt me to backup my keys before, but I didn't know exactly what they were to. I was assuming it was like a DRM protected file or something. It was a while ago so i don't reme...
null
CC BY-SA 2.5
null
2008-08-14T21:17:27.750
2008-08-14T21:17:27.750
null
null
77
null
11,713
2
null
11,690
0
null
Can you sanitize the alt text so that it doesn't have the characters in it, preferably by replacing the entire text with something useful (rather than just filtering the string)? That's not ideal, but neither is displaying broken characters, or telling your users to install a new font pack.
null
CC BY-SA 2.5
null
2008-08-14T21:21:07.523
2008-08-14T21:21:07.523
null
null
872
null
11,712
2
null
11,680
21
null
1. Just write your file parser, using whatever techniques come to mind 2. Write lots of unit tests for it to make sure all your edge cases are covered Once you've done this, you will actually have a reasonable idea of the problem/solution. Right now you just have theories floating around in your head, most of whic...
null
CC BY-SA 2.5
null
2008-08-14T21:20:18.213
2008-08-14T21:20:18.213
null
null
234
null
11,719
2
null
10,808
0
null
Rather than checking if the super method exists, you can just define it ``` class ActiveRecord::Base def after_initialize end end ``` This works in my testing, and shouldn't break any of your existing code, because all your other classes which define it will just be silently overriding this method anyway
null
CC BY-SA 2.5
null
2008-08-14T21:30:58.813
2008-08-14T21:30:58.813
null
null
234
null
11,689
1
11,694
null
2
387
I am intentionally leaving this quite vague at first. I'm looking for discussion and what issues are important more than I'm looking for hard answers. I'm in the middle of designing an app that does something like portfolio management. The design I have so far is - - - - - - My question is about the temporal natu...
Design debate: what are good ways to store and manipulate versioned objects?
CC BY-SA 2.5
0
2008-08-14T20:50:11.847
2008-10-31T09:50:35.670
2008-09-09T21:13:46.960
-1
1,190
[ "architecture", "time", "rdbms", "versions" ]
11,661
2
null
11,330
0
null
If your parameters change, I would change the function pointer declaration to use the "..." technique to set up a variable number of arguments. It could save you in readability and also having to make a change for each parameter you want to pass to the function. It is definately a lot safer than passing void around. ...
null
CC BY-SA 2.5
null
2008-08-14T20:22:54.740
2008-08-14T20:22:54.740
null
null
1,117
null
11,722
2
null
3,112
0
null
I would re-factor the code inside the loop and then do ``` if( ref $results eq 'ARRAY' ){ my_sub($result) for my $result (@$results); }else{ my_sub($results); } ``` Of course I would only do that if the code in the loop was non-trivial.
null
CC BY-SA 2.5
null
2008-08-14T21:41:18.903
2008-08-14T21:45:53.853
2008-08-14T21:45:53.853
1,337
1,337
null
11,725
2
null
8,508
2
null
If you could go back and modify your app code, I'd suggest getting log4j/log4net integrated into the application. From there you could write code that would check a form field or URL (say at the global.asax level for .NET apps) and make a log entry when malicious code is detected. The nice thing about log4j/log4net is...
null
CC BY-SA 2.5
null
2008-08-14T21:49:19.200
2008-08-14T21:49:19.200
null
null
71
null
11,717
2
null
8,508
2
null
[UrlScan](http://learn.iis.net/page.aspx/473/using-urlscan) does seem like a nice option for iis6 and 7; I also found: [dotDefender](http://www.applicure.com/?page=dotDefender) for pay which also covers Apache or IIS 5-7, and I had found an [SQL Injection sanitation ISAPI](http://www.codeplex.com/IIS6SQLInjection) It ...
null
CC BY-SA 2.5
null
2008-08-14T21:29:13.170
2008-08-14T21:32:59.433
2008-08-14T21:32:59.433
459
459
null
11,728
2
null
11,686
1
null
You're probably out of luck, to be honest. Looking at the MySQL C API ([http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html](http://dev.mysql.com/doc/refman/5.0/en/mysql-fetch-row.html), [http://dev.mysql.com/doc/refman/5.0/en/c-api-datatypes.html](http://dev.mysql.com/doc/refman/5.0/en/c-api-datatypes.html), l...
null
CC BY-SA 2.5
null
2008-08-14T21:59:12.767
2008-08-14T21:59:12.767
null
null
1,370
null
11,726
2
null
11,586
0
null
I absolutely use design patterns. At this point I take MVC for granted as a design pattern. My primary reason for using them is that I am humble enough to know that I am likely not the first person to encounter a particular problem. I rarely start a piece of code knowing which pattern I am going to use; I constantly...
null
CC BY-SA 2.5
null
2008-08-14T21:50:32.910
2008-08-14T21:50:32.910
null
null
1,227
null
11,699
1
null
null
14
10,426
I'm getting notifications to back up my encryption key for EFS in Vista, however i haven't enabled bit locker or drive encryption. Anyone know how to find out what files may be encrypted or have an explanation for why it would notify me?
EFS encryption key pop up
CC BY-SA 2.5
0
2008-08-14T21:04:11.740
2011-09-15T22:18:29.107
null
null
580
[ "windows-vista", "encrypting-file-system" ]
11,724
1
12,989
null
0
3,060
On my machine Visual Studio 2003 2005 and 2008 all complain that I cannot start debugging my because I must either be a member of the Debug Users group or of the Administrators group. So, I am an Administrator and I added Debug Users just in case, and it still complains. Short of reformatting my machine and starting...
In Visual Studio you must be a member of Debug Users or Administrators to start debugging. What if you are but it doesn't work?
CC BY-SA 3.0
null
2008-08-14T21:48:45.660
2012-08-11T16:14:05.527
2012-08-11T16:14:05.527
1,477,076
459
[ "visual-studio", "debugging", "permissions" ]
11,729
2
null
11,194
14
null
When it comes to conditional linq, I am very fond of the filters and pipes pattern. [http://blog.wekeroad.com/mvc-storefront/mvcstore-part-3/](http://blog.wekeroad.com/mvc-storefront/mvcstore-part-3/) Basically you create an extension method for each filter case that takes in the IQueryable and a parameter. ``` publi...
null
CC BY-SA 2.5
null
2008-08-14T22:03:19.997
2008-08-14T22:03:19.997
null
null
960
null
11,738
2
null
9,033
36
null
Being able to have enum types have values other than int (the default) ``` public enum MyEnum : long { Val1 = 1, Val2 = 2 } ``` Also, the fact that you can assign any numeric value to that enum: ``` MyEnum e = (MyEnum)123; ```
null
CC BY-SA 2.5
null
2008-08-14T22:31:26.180
2008-08-14T22:31:26.180
null
null
646
null
11,639
2
null
11,561
41
null
I found the information based on Kevin Kenny's answer, but I figured I'd post it here for others. A WSDL document defines services as collections of network endpoints, or ports. In WSDL, the abstract definition of endpoints and messages is separated from their concrete network deployment or data format bindings. This ...
null
CC BY-SA 2.5
null
2008-08-14T20:03:09.647
2008-08-14T20:03:09.647
null
null
1,310
null
11,732
2
null
11,699
2
null
Yes it's EFS: [Window Title] Encrypting File System [Main Instruction] Back up your file encryption certificate and key [Content] Creating this backup file helps you avoid permanently losing access to your encrypted files if the original certificate and key are lost or corrupted. [Back up now (recommended)] [Back u...
null
CC BY-SA 2.5
null
2008-08-14T22:10:37.720
2008-08-14T22:10:37.720
null
null
580
null
11,734
1
11,735
null
1
760
I am developing an application to install a large number of data files from multiple DVDs. The application will prompt the user to insert the next disk, however Windows will automatically try to open that disk either in an explorer window or ask the user what to do with the new disk. How can I intercept and cancel aut...
How to intercept and cancel auto play from an application?
CC BY-SA 3.0
null
2008-08-14T22:29:57.633
2013-07-04T12:24:47.170
2013-07-04T12:24:47.170
1,584,286
1,254
[ "windows", "disk" ]
11,739
2
null
11,462
3
null
We looked at Sharepoint for a department wiki a few months ago. Even though we're primarily an MS shop, we went with [DokuWiki](http://www.dokuwiki.org/dokuwiki). Open-source, so easy to keep up to date, great plugins, and a file-based back end.
null
CC BY-SA 2.5
null
2008-08-14T22:31:38.380
2008-08-14T22:31:38.380
null
null
1,372
null
11,720
1
24,369
null
15
2,142
What I would like to do is create a clean virtual machine image as the output of a build of an application. So a new virtual machine would be created (from a template is fine, with the OS installed, and some base software installed) --- a new web site would be created in IIS, and the web app build output copied to a l...
How can I create virtual machines as part of a build process using MSBuild and MS Virtual Server and/or Hyper-V Server Virtualization?
CC BY-SA 2.5
0
2008-08-14T21:32:34.287
2012-05-01T17:10:23.367
2012-05-01T17:10:23.367
123,743
1,341
[ "msbuild", "virtualization", "hyper-v" ]
11,735
2
null
11,734
3
null
There are two approaches that I know of. The first and simplest is to register the special Windows message "QueryCancelAutoPlay" and simply return 1 when the message is handled. This only works for the current window, and not a background application. The second approach requires inserting an object that implements ...
null
CC BY-SA 2.5
null
2008-08-14T22:30:37.570
2008-08-14T22:30:37.570
null
null
1,254
null
11,757
2
null
11,740
1
null
[LightSpeed](https://www.mindscape.co.nz/products/LightSpeed/default.aspx) allows you to specify an that lets you resolve table names dynamically at runtime.
null
CC BY-SA 4.0
null
2008-08-14T23:04:50.530
2021-04-01T06:39:17.587
2021-04-01T06:39:17.587
9,193,372
608
null
11,730
2
null
11,720
3
null
You can actually script a fair number of tasks in MS Virtual Server: [http://www.microsoft.com/technet/scriptcenter/scripts/vs/default.mspx?mfr=true](http://www.microsoft.com/technet/scriptcenter/scripts/vs/default.mspx?mfr=true) [http://msdn.microsoft.com/en-us/library/aa368876(VS.85).aspx](http://msdn.microsoft.com...
null
CC BY-SA 2.5
null
2008-08-14T22:08:31.360
2008-08-14T22:13:24.377
2008-08-14T22:13:24.377
419
419
null
11,744
2
null
10,808
3
null
Have you tried `alias_method_chain`? You can basically chained up all your `after_initialize` calls. It acts like a decorator: each new method adds a new layer of functionality and passes the control onto the "overridden" method to do the rest.
null
CC BY-SA 2.5
null
2008-08-14T22:37:56.463
2008-08-15T00:56:38.773
2008-08-15T00:56:38.790
1
1,376
null
11,761
1
11,826
null
5
8,971
I have a web service that queries data from this json file, but I don't want the web service to have to access the file every time. I'm thinking that maybe I can store the data somewhere else (maybe in memory) so the web service can just get the data from there the next time it's trying to query the same data. I kinda ...
best way to persist data in .NET Web Service
CC BY-SA 3.0
0
2008-08-14T23:13:32.493
2014-03-08T23:45:43.023
2014-03-08T23:45:43.023
1,644,214
1,381
[ ".net", "web-services", "json", "memory", "persistence" ]
11,767
1
11,775
null
65
123,703
How can I present a control to the user that allows him/her to select a directory? There doesn't seem to be any native .net controls which do this?
Browse for a directory in C#
CC BY-SA 3.0
0
2008-08-14T23:18:52.543
2019-02-09T22:47:25.630
2018-10-23T10:52:28.040
6,750,540
234
[ "c#", ".net", "directory" ]
11,759
2
null
11,199
0
null
> The nice thing about the .NET framework is that Windows XP has the 2.0 framework runtime library installed by default Since when? I've had to tell lots of our windows XP users to install it. Yes you can pull it down through windows update, but I'm pretty confident it's an optional install and not something that happ...
null
CC BY-SA 2.5
null
2008-08-14T23:06:40.620
2008-08-14T23:06:40.620
null
null
234
null
11,764
1
11,770
null
5
2,194
I'm not new to web publishing, BUT I am new to publishing against a web site that is frequently used. Previously, the apps on this server were not hit very often, but we're rolling out a high demand application. So, what is the best practice for publishing to a live web server? 1. Is it best to wait until the middl...
Publishing to IIS - Best Practices
CC BY-SA 2.5
0
2008-08-14T23:15:59.447
2010-06-11T16:31:15.660
2010-06-11T16:31:15.660
1,380
1,380
[ "iis", "publish" ]
11,766
2
null
104
18
null
If you need to diagnose a memory leak in .NET, check these links: [http://msdn.microsoft.com/en-us/magazine/cc163833.aspx](https://web.archive.org/web/20141203155344/http://msdn.microsoft.com/en-us/magazine/cc163833.aspx) [http://msdn.microsoft.com/en-us/magazine/cc164138.aspx](https://web.archive.org/web/20150102222...
null
CC BY-SA 3.0
null
2008-08-14T23:16:39.803
2016-01-19T10:30:03.883
2016-01-19T10:30:03.883
3,305,116
1,219
null
11,762
1
26,283
null
40
72,768
I needed some simple string encryption, so I wrote the following code (with a great deal of "inspiration" from [here](http://www.codeproject.com/KB/security/DotNetCrypto.aspx)): ``` // create and initialize a crypto algorithm private static SymmetricAlgorithm getAlgorithm(string password) { SymmetricAlgori...
Why does a bad password cause "Padding is invalid and cannot be removed"?
CC BY-SA 3.0
0
2008-08-14T23:14:38.823
2017-11-04T22:32:27.143
2017-05-08T19:03:14.820
637,783
369
[ "c#", ".net", "exception", "encryption" ]
11,775
2
null
11,767
62
null
The [FolderBrowserDialog class](http://msdn.microsoft.com/en-us/library/system.windows.forms.folderbrowserdialog.aspx) is the best option.
null
CC BY-SA 3.0
null
2008-08-14T23:25:12.967
2016-01-17T12:54:56.970
2016-01-17T12:54:56.970
490,018
null
null
11,769
2
null
11,194
4
null
Another option would be to use something like the PredicateBuilder discussed [here](http://www.albahari.com/nutshell/predicatebuilder.html). It allows you to write code like the following: ``` var newKids = Product.ContainsInDescription ("BlackBerry", "iPhone"); var classics = Product.ContainsInDescription ("Nokia",...
null
CC BY-SA 2.5
null
2008-08-14T23:21:45.800
2008-08-14T23:21:45.800
2017-05-23T12:16:56.393
-1
708
null
11,776
2
null
11,762
3
null
Yes, this is to be expected, or at least, its exactly what happens when our crypto routines get non-decryptable data
null
CC BY-SA 2.5
null
2008-08-14T23:25:22.470
2008-08-14T23:25:22.470
null
null
489
null
11,772
2
null
10,933
3
null
Not to promote reinventing the wheel, but I originally wrote my own web SVN browser by using the ``` svn log --xml ``` command and then just an XML parser in whatever language i was using. I don't use .Net, but it shouldn't be too hard.
null
CC BY-SA 2.5
null
2008-08-14T23:23:26.497
2008-08-14T23:23:26.497
null
null
1,063
null
11,779
2
null
11,761
2
null
ASP.NET caching works just as well with Web services so you can implement regular caching as explained here: [http://msdn.microsoft.com/en-us/library/aa478965.aspx](http://msdn.microsoft.com/en-us/library/aa478965.aspx)
null
CC BY-SA 2.5
null
2008-08-14T23:29:27.500
2008-08-14T23:29:27.500
null
null
null
null