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
12,943
2
null
12,877
1
null
The company [Navicat](http://www.navicat.com/) has released an Oracle client for Mac (and they do a Windows version too). It's not free, but I think you can get a 30 day demo.
null
CC BY-SA 2.5
null
2008-08-16T01:09:24.603
2008-08-16T01:09:24.603
null
null
188
null
12,941
2
null
12,870
2
null
I'm totally at a loss as to why some of you seem to think that throwing gobs of objects at the code is the way to go. For example, there are exactly four seasons, and they don't or anything. How does it simplify anything to make them objects? Wing is quite right that these should probably be (or maybe enums). Wh...
null
CC BY-SA 2.5
null
2008-08-16T01:07:35.577
2008-08-16T01:07:35.577
null
null
872
null
12,937
2
null
12,929
2
null
I believe whenever there is only 1 option, it will definitely stagnate innovation. If all we had was 1 language, then we wouldn't be able to solve anything but what that language was designed to solve. Imperative languages like Java and C# solve a certain set of problems pretty well, but it also helps to think in a f...
null
CC BY-SA 2.5
null
2008-08-16T00:56:30.560
2008-08-16T00:56:30.560
null
null
122
null
12,959
2
null
12,877
2
null
I get the same problem after there's been an active connection sitting idle for a while. I solve it by restarting sql developer every once in a while. I also have Toad for Oracle running on a vmware XP session, and it works great. If you don't mind the money, try that.
null
CC BY-SA 2.5
null
2008-08-16T02:10:30.613
2008-08-16T02:10:30.613
null
null
116
null
12,949
2
null
7,348
1
null
Looks like what you need is zlibCE from the OpenNETCF foundation. You can get it here: [http://opennetcf.com/FreeSoftware/zlibCE/tabid/245/Default.aspx](http://opennetcf.com/FreeSoftware/zlibCE/tabid/245/Default.aspx) It's a port of the linux [zlib](http://en.wikipedia.org/wiki/Zlib) library to CE. At it's core, it's...
null
CC BY-SA 2.5
null
2008-08-16T01:27:44.303
2008-08-16T01:27:44.303
null
null
194
null
12,947
2
null
12,936
2
null
Depending on how much of your PHP code is actually executed and how long that execution takes they can be a really big win. It certainly isn't going to hurt, but the gain you see will very much depend on where your time is currently spent. btw mmcache has been rolled into a different project now, I forget the name but...
null
CC BY-SA 2.5
null
2008-08-16T01:20:55.127
2008-11-03T18:10:30.037
null
null
1,043
null
12,958
2
null
12,594
1
null
I believe you're looking for [WNetGetConnectionA](https://learn.microsoft.com/en-us/windows/win32/api/winnetwk/nf-winnetwk-wnetgetconnectiona) or [WNetGetConnectionW](https://learn.microsoft.com/en-us/windows/win32/api/winnetwk/nf-winnetwk-wnetgetconnectionw).
null
CC BY-SA 4.0
null
2008-08-16T02:10:10.677
2020-05-29T13:11:00.800
2020-05-29T13:11:00.800
3,074,564
645
null
12,962
2
null
12,855
1
null
Oracle supports function-based indexes. Their canonical example: ``` create index emp_upper_idx on emp(upper(ename)); ```
null
CC BY-SA 2.5
null
2008-08-16T02:13:32.883
2008-08-16T02:13:32.883
null
null
116
null
12,961
2
null
12,927
18
null
If you are using Java 5 or later, you can connect to your application using [jconsole](http://docs.oracle.com/javase/6/docs/technotes/guides/management/jconsole.html) to view all running threads. jstack also will do a stack dump. I think this should still work even inside a container like Tomcat. Both of these tools a...
null
CC BY-SA 3.0
null
2008-08-16T02:12:04.090
2013-11-26T04:19:48.000
2013-11-26T04:19:48.000
1,102,512
235
null
12,953
2
null
12,870
1
null
A better solution would perhaps be to put all that data into a database, instead of hard-coding it in your sources or using properties files. Using a database will be much easier to maintain, and there are a [variety](http://www.mysql.com/) [of](http://www.postgresql.org/) [free](http://hsqldb.sourceforge.net/) [datab...
null
CC BY-SA 3.0
null
2008-08-16T01:46:37.243
2017-11-03T00:47:10.417
2017-11-03T00:47:10.417
1,711,796
737
null
12,968
2
null
12,593
1
null
System.Xml is in the core framework and not dependent on MSXML 6.0, but it shares a few common API (DOM parser, SAX parser, XPath node selection).
null
CC BY-SA 2.5
null
2008-08-16T02:39:54.297
2008-08-16T15:11:25.340
2008-08-16T15:11:25.340
1,508
1,508
null
12,967
2
null
12,936
3
null
Both are interesting and will provide speed boost since they compile source code into binary representation which is then executed by the PHP engine. Any huge web site running with PHP (Facebook for example) is running some sort of opcode cache system like MMCache. The problem is that they are not very easy to set up...
null
CC BY-SA 2.5
null
2008-08-16T02:34:13.327
2008-11-03T18:10:30.037
null
null
1,508
null
12,966
2
null
12,890
1
null
In line with some of the other comments, i would definately have a look at your indexing. One thing i discovered earlier this year on our MySQL databases was the power of composite indexes. For example, if you are reporting on order numbers over date ranges, a composite index on the order number and order date columns...
null
CC BY-SA 2.5
null
2008-08-16T02:30:31.947
2008-08-16T02:41:02.360
2008-08-16T02:41:02.360
1,061
1,061
null
12,915
2
null
12,906
6
null
Source: [http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1313431,00.html](http://searchsqlserver.techtarget.com/tip/0,289483,sid87_gci1313431,00.html) Works with SQL2000,2005,2008 ``` USE master; GO IF OBJECT_ID('dbo.sp_SDS', 'P') IS NOT NULL DROP PROCEDURE dbo.sp_SDS; GO CREATE PROCEDURE dbo.sp_SDS ...
null
CC BY-SA 2.5
null
2008-08-16T00:19:14.863
2008-08-16T00:19:14.863
null
null
5
null
12,971
2
null
12,268
1
null
It may have been obfuscated by tools such as Xenocode or Dotfuscator. Or as someone said, Lutz may know a lot about IL.
null
CC BY-SA 2.5
null
2008-08-16T02:48:30.130
2008-08-16T02:48:30.130
null
null
1,508
null
12,973
2
null
12,946
0
null
The answer to this will vary depending on the database server you are using to do this. Edit: Sorry, maybe i need to learn to look at the tags and not just the question - i can see you tagged this as sqlserver.
null
CC BY-SA 2.5
null
2008-08-16T02:55:48.913
2008-08-16T02:55:48.913
null
null
1,061
null
12,950
2
null
12,890
12
null
I know more about mssql that mysql, but I don't think the number of joins or number of rows you are talking about should cause you too many problems with the correct indexes in place. Have you analyzed the query plan to see if you are missing any? [http://dev.mysql.com/doc/refman/5.0/en/explain.html](http://dev.mysql...
null
CC BY-SA 2.5
null
2008-08-16T01:36:31.040
2008-08-16T01:55:57.537
2008-08-16T01:55:57.537
1,219
1,219
null
12,972
2
null
12,890
0
null
Further to my previous answer, another approach we have taken in some situations is to store key reporting data in separate summary tables. There are certain reporting queries which are just going to be slow even after denormalising and optimisations and we found that creating a table and storing running totals or summ...
null
CC BY-SA 2.5
null
2008-08-16T02:53:00.027
2008-08-16T02:53:00.027
null
null
1,061
null
12,980
2
null
12,936
5
null
MMCache has been deprecated. I recommend either [http://pecl.php.net/package/APC](http://pecl.php.net/package/APC) or [http://xcache.lighttpd.net/](http://xcache.lighttpd.net/), both of which also give you variable storage (like Memcache).
null
CC BY-SA 2.5
null
2008-08-16T03:37:34.867
2008-11-03T18:10:30.037
null
null
1,513
null
12,979
2
null
12,946
9
null
What you want is called Transactional Replication in SQL Server 2005. It will replicate changes in near real time as the publisher (i.e. "master") database is updated. [Here is a pretty good walk through of how to set it up.](http://blogs.techrepublic.com/howdoi/?p=123)
null
CC BY-SA 3.0
null
2008-08-16T03:31:52.867
2014-01-23T17:30:31.353
2014-01-23T17:30:31.353
1,927,206
1,436
null
12,978
2
null
5,727
4
null
I like the house address analogy, but I've always thought of the address being to the mailbox itself. This way you can visualize the concept of dereferencing the pointer (opening the mailbox). For instance following a linked list: 1) start with your paper with the address 2) Go to the address on the paper 3) Open the...
null
CC BY-SA 2.5
null
2008-08-16T03:28:13.903
2008-08-16T03:28:13.903
null
null
1,346
null
12,989
2
null
11,724
2
null
Which users and/or groups are in your "Debug programs" right (under User Rights Assignment)? Maybe that setting got overridden by group policy (Daniel's answer), or just got out of whack for some reason. It should, obviously, include the "Debug Users" group.
null
CC BY-SA 2.5
null
2008-08-16T04:29:43.047
2008-08-16T04:29:43.047
null
null
13
null
12,965
2
null
12,896
24
null
What are you hoping to end up with at the end? The body, the subject, the sender, an attachment? You should spend some time with [RFC2822](http://www.faqs.org/rfcs/rfc2822.html) to understand the format of the mail, but here's the simplest rules for well formed email: ``` HEADERS\n \n BODY ``` That is, the first b...
null
CC BY-SA 2.5
null
2008-08-16T02:18:11.893
2008-08-16T02:18:11.893
null
null
430
null
12,988
2
null
12,611
0
null
> That is how I have designed my events table actually, but when thinking about it, say I have 100K users who have create events, this table will be hit pretty hard, especially if I am going to be sending out emails to remind people of their events (events can be for specific times of the day also!), so I could be poll...
null
CC BY-SA 2.5
null
2008-08-16T04:22:20.503
2008-08-16T04:22:20.503
null
null
77
null
12,991
2
null
12,836
7
null
If you've written your own ORM, then I would say just use null, since you can use it however you want. I believe DBNull was originally used only to get around the fact that value types (int, DateTime, etc.) could not null, so rather than return some value like zero or DateTime.Min, which would a null (bad, bad), the...
null
CC BY-SA 2.5
null
2008-08-16T04:34:46.063
2008-08-16T04:34:46.063
null
null
1,436
null
12,994
2
null
12,982
1
null
> wrote: I'd do a hybrid. I would use an object like this... Interesting idea... passing a serialized version of the object instead of the (wsdl-ed) object itself. In a way, I like its elegance, but in another way, it seems to defeat the purpose of exposing your web service to potential third parties or partners or ...
null
CC BY-SA 2.5
null
2008-08-16T04:49:33.850
2008-08-16T04:56:42.603
2008-08-16T04:56:42.603
1,436
1,436
null
12,983
2
null
12,794
12
null
That's the difference between [block and inline](http://www.w3.org/TR/html4/struct/global.html#h-7.5.3) elements. [pre is a block level element](http://www.w3.org/TR/html4/sgml/dtd.html#block). It's not legal to put it inside a `code` tag, which [can only contain inline content](http://www.w3.org/TR/html4/struct/text.h...
null
CC BY-SA 2.5
null
2008-08-16T04:04:09.713
2008-08-16T04:04:09.713
2020-06-20T09:12:55.060
-1
1,472
null
13,000
1
13,003
null
8
7,592
I want to define something like this in : ``` $EL = "\n<br />\n"; ``` and then use that variable as an "endline" marker all over my site, like this: ``` echo "Blah blah blah{$EL}"; ``` How do I define $EL once (in only 1 file), include it on every page on my site, and have to reference it using the (strangely ba...
How to setup site-wide variables in php?
CC BY-SA 3.0
0
2008-08-16T05:05:09.683
2020-08-31T22:43:56.817
2013-02-17T07:06:20.333
1,968,705
103
[ "php" ]
12,992
2
null
12,870
1
null
Does the "date" have to be a parameter? If you're just showing the current watering schedule the WateringSchedule class itself can figure out what day it is, and therefore what season it is. Then just have a method which returns a map where the Key is the group letter. Something like: ``` public Map<String,List<String...
null
CC BY-SA 2.5
null
2008-08-16T04:35:49.557
2008-08-16T04:35:49.557
null
null
543
null
12,993
2
null
12,611
2
null
The brute-force-ish but still reasonable way would be to create a new row in your single events table for every instance of the recurring event, all pointing but to the event in the series. This simplifies selecting and/or deleting all elements in a particular series, since you can select based on parent id. It also ...
null
CC BY-SA 2.5
null
2008-08-16T04:40:32.290
2008-08-16T04:45:24.263
2008-08-16T04:45:24.263
1,370
1,370
null
13,002
2
null
12,982
1
null
oh, for sure, i only do this when i'm the consumer of the webservice or if you have some sort of controller that they request an object from and then you handle the serialization and sending rather than them directly consuming the web service. But really, if they are directly consuming the webservice, then they wouldn'...
null
CC BY-SA 2.5
null
2008-08-16T05:16:55.213
2008-08-16T05:16:55.213
null
null
77
null
13,001
2
null
12,896
0
null
yeah, ive been able to write a basic parser, based off that rfc and some other basic tutorials. but its the multipart mime nested boundaries that keep messing me up. i found out that MMS (not SMS) messages sent from my phone are just standard emails, so i have a system that reads the incoming email, checks the from (t...
null
CC BY-SA 2.5
null
2008-08-16T05:09:11.907
2008-08-16T05:09:11.907
null
null
314
null
13,003
2
null
13,000
7
null
Most PHP sites should have a file (I call it a header) that you include on every single page of the site. If you put that first line of code in the header file, then include it like this on every page: ``` include 'header.php'; ``` you won't have to use the global keyword or anything, the second line of code you wro...
null
CC BY-SA 2.5
null
2008-08-16T05:23:09.677
2008-08-16T05:31:55.417
2008-08-16T05:31:55.417
813
813
null
12,990
2
null
12,982
4
null
I'd do a hybrid. I would use an object like this ``` public class TransferObject { public string Type { get; set; } public byte[] Data { get; set; } } ``` then i have a nice little utility that serializes an object then compresses it. ``` public static class CompressedSerializer { /// <summary> /// ...
null
CC BY-SA 2.5
null
2008-08-16T04:31:53.667
2008-08-16T04:31:53.667
null
null
77
null
12,982
1
19,726
null
9
1,161
It's 2008, and I'm still torn on this one. So I'm developing a web method that needs a complex type passed into it and returned from it. The two options I'm toying with are: 1. Pass and return actual business objects with both data and behavior. When wsdl.exe is run, it will automatically create proxy classes that ...
What is your preferred method of sending complex data over a web service?
CC BY-SA 2.5
0
2008-08-16T03:58:24.687
2015-09-22T04:56:12.220
2008-08-23T18:45:41.590
2,134
1,436
[ ".net", "web-services", "soap", "wsdl" ]
13,005
2
null
13,000
-1
null
IIRC a common solution is a plain file that contains your declarations, that you include in every source file, something like ''. There you can define a bunch of application-wide variables that are then imported in every file. Still, you have to provide the include directive in single source file you use. I even saw ...
null
CC BY-SA 2.5
null
2008-08-16T05:27:22.260
2008-08-16T05:30:43.203
2008-08-16T05:30:43.203
834
834
null
13,008
2
null
13,000
-1
null
Sessions are going to be your best bet, if the data is user specific, else just use a conifg file. config.php: ``` <?php $EL = "\n<br />\n"; ?> ``` Then on each page add ``` require 'config.php' ``` the you will be able to access $EL on that page.
null
CC BY-SA 2.5
null
2008-08-16T05:34:03.480
2008-08-16T05:34:03.480
null
null
115
null
13,029
2
null
12,936
0
null
Have you checked out Phalanger? It compiles PHP to .NET code. Here are [some benchmarks](http://web.archive.org/web/20101126094453/http://php-compiler.net/doku.php?id=core%3abenchmarks) which show that it can dramatically improve performance.
null
CC BY-SA 3.0
null
2008-08-16T06:58:09.987
2011-09-15T12:17:30.573
2011-09-15T12:17:30.573
500,559
5
null
13,031
2
null
12,946
4
null
SQL Server 2008 has three different modes of replication. - [Transactional](http://msdn.microsoft.com/en-us/library/ms151706.aspx)- -
null
CC BY-SA 2.5
null
2008-08-16T07:00:28.123
2008-08-16T07:00:28.123
null
null
224
null
13,038
2
null
12,815
1
null
My experience is limited to personal projects and found much the same advantages you mentioned. I recommend [http://metacpan.org/pod/Test::Simple::Tutorial](http://metacpan.org/pod/Test::Simple::Tutorial) which was my inspiration for trying out testing-based development. The perl testing modules seem pretty useful an...
null
CC BY-SA 3.0
null
2008-08-16T07:48:08.013
2014-04-05T15:10:53.890
2014-04-05T15:10:53.890
11,827
1,438
null
13,032
2
null
9,615
2
null
Can you clarify what you mean by the "Windows lock-in" thing with Silverlight? It runs on Windows and MacIntel, and the vector portions run just fine on Linux with the Moonlight plugin. Were you thrown off by the lack of Amiga support?
null
CC BY-SA 2.5
null
2008-08-16T07:06:17.100
2008-08-16T07:06:17.100
null
null
5
null
13,037
2
null
12,870
4
null
Here's one way it look like, you can figure the rest out: ``` A = new Group(); A.getSeason(Seasons.WINTER).addDay(Days.MONDAY); A.getSeason(Seasons.SPRING).addDay(Days.TUESDAY).addDay(Days.THURSDAY); A.getSeason(Seasons.SPRING).addDays(Days.MONDAY, Days.TUESDAY, ...); schedule = new Schedule(); schedule.addWateringG...
null
CC BY-SA 2.5
null
2008-08-16T07:37:11.967
2008-08-16T07:37:11.967
null
null
795
null
13,016
2
null
12,927
3
null
If it's for professional purpose and you have some money to spend, try to get your hands on [JProfiler](http://www.ej-technologies.com/products/jprofiler/overview.html). If you just want to get some insights, try out the [Eclipse Profiler Plugin](http://eclipsecolorer.sourceforge.net/index_profiler.html). I used it sev...
null
CC BY-SA 2.5
null
2008-08-16T05:40:53.403
2008-08-16T05:40:53.403
null
null
834
null
13,021
1
13,193
null
15
3,391
I've frequently encountered sites that put all of their JavaScript inside a `namespace` structure along the lines of: ``` namespaces = { com : { example: { example.com's data} } ``` However, setting this up safely with respect to other namespaced frameworks seems to require a relatively hefty amount of code (defined...
Is there a "concise" way to do namespacing in JavaScript?
CC BY-SA 3.0
0
2008-08-16T05:57:37.487
2018-04-20T11:50:07.810
2018-04-20T11:50:07.810
7,563,191
784
[ "javascript", "namespaces" ]
13,049
1
13,275
null
876
496,009
What's the difference between struct and class in .NET?
What's the difference between struct and class in .NET?
CC BY-SA 3.0
0
2008-08-16T08:21:47.947
2021-11-01T11:10:29.890
2017-12-16T22:41:15.127
1,709,587
905
[ ".net", "class", "struct", "value-type", "reference-type" ]
13,044
2
null
13,039
4
null
The only tool that I've ever encountered is the [svn-graph.pl](http://svn.apache.org/repos/asf/subversion/trunk/tools/client-side/svn-graph.pl) perl script from the svn tools. It spits out a [graphviz](http://www.graphviz.org/) dot file which can be rendered in a variety of image formats. This could be wrapped up in a ...
null
CC BY-SA 3.0
null
2008-08-16T08:13:59.630
2015-09-24T13:34:54.653
2015-09-24T13:34:54.653
11,722
995
null
13,050
2
null
13,039
6
null
for simplicity, [tortoise svn](http://tortoisesvn.tigris.org/) gives a basic revision graph
null
CC BY-SA 2.5
null
2008-08-16T08:24:16.287
2008-08-16T08:24:16.287
null
null
370
null
13,051
2
null
13,049
11
null
Well, for starters, a struct is passed by value rather than by reference. Structs are good for relatively simple data structures, while classes have a lot more flexibility from an architectural point of view via polymorphism and inheritance. Others can probably give you more detail than I, but I use structs when the ...
null
CC BY-SA 2.5
null
2008-08-16T08:27:14.457
2008-08-16T08:27:14.457
null
null
1,053
null
13,040
2
null
12,591
1
null
Can you give an example? According to the [lxml validation docs](http://codespeak.net/lxml/validation.html), lxml can handle DTD validation (specified in the XML doc or externally in code) and system catalogs, which covers most cases I can think of. ``` f = StringIO("<!ELEMENT b EMPTY>") dtd = etree.DTD(f) dtd = etree...
null
CC BY-SA 2.5
null
2008-08-16T07:57:53.657
2008-08-16T07:57:53.657
null
null
995
null
13,055
1
25,324
null
149
60,858
I'm looking for a clear, concise and accurate answer. Ideally as the actual answer, although links to good explanations welcome.
What is boxing and unboxing and what are the trade offs?
CC BY-SA 2.5
0
2008-08-16T08:34:25.143
2021-11-16T16:16:14.840
2009-11-27T19:06:13.040
20,774
905
[ "language-agnostic", "boxing", "glossary", "unboxing" ]
13,039
1
null
null
33
22,801
Real strange. I cannot find a tool that enables one to display a SVN repository in graphical form. I would like the ability to see changes in revision / time , branch / time graphs. Does anyone know of one. . Solutions offered so far in brief: - - [Fisheye](http://www.atlassian.com/software/fisheye/)
Is there a tool that can display a SVN repository visually ( i.e. pretty charts )?
CC BY-SA 4.0
0
2008-08-16T07:57:42.987
2021-03-24T09:19:10.867
2021-03-24T09:19:10.867
-1
1,036
[ "svn" ]
13,043
2
null
13,039
13
null
[Fisheye](http://www.atlassian.com/software/fisheye/), from Atlassian, looks at an SVN repository and can show you a few graphs. Also provides a handy web interface for blame, diff, etc. for example, some sample images at [one of the demo servers:](http://fisheye2.atlassian.com/chart/~charttype=Pie,stacktype=Author,ex...
null
CC BY-SA 3.0
null
2008-08-16T08:11:58.153
2011-10-20T19:09:50.527
2011-10-20T19:09:50.527
496,830
489
null
13,060
1
13,100
null
22
13,357
I'm looking for a clear, concise and accurate answer. Ideally as the actual answer, although links to good explanations welcome. This also applies to VB.Net, but the keywords are different - `ByRef` and `ByVal`.
What do ref, val and out mean on method parameters?
CC BY-SA 2.5
0
2008-08-16T08:46:16.633
2012-10-25T07:41:48.603
2012-10-25T07:41:48.603
862,948
905
[ "c#", ".net", "vb.net" ]
13,056
2
null
13,055
74
null
Boxing & unboxing is the process of converting a primitive value into an object oriented wrapper class (boxing), or converting a value from an object oriented wrapper class back to the primitive value (unboxing). For example, in java, you may need to convert an `int` value into an `Integer` (boxing) if you want to sto...
null
CC BY-SA 2.5
null
2008-08-16T08:39:41.700
2008-08-16T08:53:26.260
2008-08-16T08:53:26.260
92
92
null
13,058
2
null
13,000
3
null
Sounds like the job of a constant. See the function [define()](http://us2.php.net/define).
null
CC BY-SA 2.5
null
2008-08-16T08:44:31.847
2008-08-16T08:44:31.847
null
null
868
null
13,053
2
null
13,049
59
null
In .NET the struct and class declarations differentiate between reference types and value types. When you pass round a reference type there is only one actually stored. All the code that accesses the instance is accessing the same one. When you pass round a value type each one is a copy. All the code is working on i...
null
CC BY-SA 3.0
null
2008-08-16T08:30:38.083
2015-04-06T11:39:33.167
2015-04-06T11:39:33.167
63,550
905
null
13,061
2
null
13,060
3
null
`out` means that the parameter will be initialised by the method: ``` int result; //not initialised if( int.TryParse( "123", out result ) ) //result is now 123 else //if TryParse failed result has still be // initialised to its default value (0) ``` `ref` will force the underlying reference to be passed: ...
null
CC BY-SA 2.5
null
2008-08-16T08:49:21.760
2008-08-16T08:58:50.430
2008-08-16T08:58:50.430
905
905
null
13,059
2
null
13,055
130
null
from [C# 3.0 In a Nutshell](http://books.google.com/books?id=_Y0rWd-Q2xkC&pg=PA81&vq=boxing&source=gbs_search_r&cad=1_1&sig=ACfU3U0SIw4v8UZzMH3f5xImIyHZHD90sA#PPA82,M1): > Boxing is the act of casting a value type into a reference type: ``` int x = 9; object o = x; // boxing the int ``` > unboxing is... the reve...
null
CC BY-SA 3.0
null
2008-08-16T08:44:40.223
2014-01-02T06:59:14.733
2014-01-02T06:59:14.733
940,072
202
null
13,078
2
null
1,644
0
null
What a great bunch of answers - Now I've got a number of podcasts to add to my listening list! My current list is StackOverflow, TWiT and Mac OS Ken. I tried to get into SERadio a few months ago but couldn't really engage myself with the podcast - Great introductory material, but I felt a lot of the shows were a bit '...
null
CC BY-SA 2.5
null
2008-08-16T09:31:43.547
2008-08-16T09:31:43.547
null
null
1,517
null
13,070
2
null
13,060
2
null
One of my own questions at stackoverflow handles this topic too. It handles about ["pass by reference" and "pass by value"](https://stackoverflow.com/questions/2027/pass-by-reference-or-pass-by-value) in different types of languages, [c# is included](https://stackoverflow.com/questions/2027/pass-by-reference-or-pass-by...
null
CC BY-SA 2.5
null
2008-08-16T09:21:35.563
2008-08-16T10:00:01.243
2017-05-23T10:31:18.997
-1
46
null
13,075
2
null
13,000
0
null
@svec yes this will, you just have to include the file inside the function also. This is how most of my software works. ``` function myFunc() { require 'config.php'; //Variables from config are available now. } ```
null
CC BY-SA 2.5
null
2008-08-16T09:26:18.017
2008-08-16T09:30:05.297
2008-08-16T09:30:05.297
115
115
null
13,086
1
13,098
null
5
468
Can anyone recommend some decent resources for a .NET developer who wishes to get a high level overview of the Delphi language? We are about acquire a small business whose main product is developed in Delphi and I am wanting to build up enough knowledge to be able to talk the talk with them. Books, websites etc all a...
Delphi resources for existing .NET developer
CC BY-SA 2.5
null
2008-08-16T10:24:05.797
2013-11-13T09:43:20.577
null
null
770
[ "delphi" ]
13,073
2
null
13,055
2
null
The .NET FCL generic collections: ``` List<T> Dictionary<TKey, UValue> SortedDictionary<TKey, UValue> Stack<T> Queue<T> LinkedList<T> ``` were all designed to overcome the performance issues of boxing and unboxing in previous collection implementations. For more, see chapter 16, [CLR via C# (2nd Edition)](http://bo...
null
CC BY-SA 2.5
null
2008-08-16T09:24:15.527
2008-08-16T18:57:07.897
2008-08-16T18:57:07.897
1,518
1,518
null
13,083
2
null
4,689
21
null
I use [Lucida Console](http://en.wikipedia.org/wiki/Lucida_Sans) for years and never find anything better. However I tried a few times [Consolas fonts](http://en.wikipedia.org/wiki/Consolas) and simply -- I prefer Lucida Console.
null
CC BY-SA 2.5
null
2008-08-16T10:07:36.623
2008-08-16T10:07:36.623
null
null
1,483
null
13,091
2
null
13,086
2
null
[http://www.delphifeeds.com/](http://www.delphifeeds.com/) is a good place to start, it has most news about what is going on in the delphi community.
null
CC BY-SA 2.5
null
2008-08-16T10:43:39.047
2008-08-16T10:43:39.047
null
null
727
null
13,088
2
null
11,291
10
null
Just a tip for syntax highlighting: Don't highlight the whole text view at once - it's slow. Also don't highlight the last edited text using -editedRange - it's very slow too if the user pastes a large body of text into the text view. Instead you need to highlight the visible text which is done like this: ``` NSRec...
null
CC BY-SA 2.5
null
2008-08-16T10:35:10.017
2008-08-16T10:35:10.017
null
null
1,165,750
null
13,092
2
null
12,656
12
null
In PHP you can pass a variable number of arguments to a function or method by using [call_user_func_array](http://www.php.net/call_user_func_array). An example for a method would be: ``` call_user_func_array(array(&$stmt, 'bindparams'), $array_of_params); ``` The function will be called with each member in the array...
null
CC BY-SA 2.5
null
2008-08-16T10:58:05.587
2008-08-16T11:36:21.920
2008-08-16T11:36:21.920
1
200
null
13,064
2
null
12,569
6
null
> How do you know when you are 'done' capturing test cases? You don't.You can't get to 100% except for the most trivial cases. Also 100% coverage (of lines, paths, conditions...) doesn't tell you you've hit all boundary conditions. Most importantly, the test cases are not write-and-forget. Check it fails with the orig...
null
CC BY-SA 2.5
null
2008-08-16T09:08:23.623
2008-08-16T09:08:23.623
2020-06-20T09:12:55.060
-1
341
null
13,087
1
null
null
56
13,879
How does one convert a .Net DateTime into a valid HTTP-formatted date string?
How do I convert a date to a HTTP-formatted date in .Net / C#
CC BY-SA 2.5
0
2008-08-16T10:33:42.033
2019-12-17T13:20:00.380
2008-09-17T07:59:10.220
2,961
1,521
[ "c#", ".net", "http" ]
13,057
2
null
13,055
23
null
In .Net: Often you can't rely on what the type of variable a function will consume, so you need to use an object variable which extends from the lowest common denominator - in .Net this is `object`. However `object` is a class and stores its contents as a reference. ``` List<int> notBoxed = new List<int> { 1, 2, 3 }...
null
CC BY-SA 3.0
null
2008-08-16T08:41:34.380
2012-10-03T08:14:26.597
2012-10-03T08:14:26.597
905
905
null
13,097
2
null
4,335
10
null
You need to use a layer 4 [load balancer](http://en.wikipedia.org/wiki/Load_balancing_%28computing%29#Relationship_with_failover) in front of the two endpoints. Prob best to stick with a dedicated piece of hardware.
null
CC BY-SA 3.0
null
2008-08-16T11:38:55.397
2013-12-02T14:04:21.527
2013-12-02T14:04:21.527
781,754
null
null
13,096
2
null
5,727
130
null
An analogy I've found helpful for explaining pointers is hyperlinks. Most people can understand that a link on a web page 'points' to another page on the internet, and if you can copy & paste that hyperlink then they will both point to the same original web page. If you go and edit that original page, then follow eithe...
null
CC BY-SA 3.0
null
2008-08-16T11:35:11.517
2013-07-26T15:56:33.397
2013-07-26T15:56:33.397
505,893
1,367
null
13,102
2
null
13,049
18
null
Instances of classes are stored on the managed heap. All variables 'containing' an instance are simply a reference to the instance on the heap. Passing an object to a method results in a copy of the reference being passed, not the object itself. Structures (technically, value types) are stored wherever they are used, ...
null
CC BY-SA 2.5
null
2008-08-16T12:16:50.450
2008-08-16T12:16:50.450
null
null
891
null
13,098
2
null
13,086
4
null
- [DelphiBasics](http://www.delphibasics.co.uk)- [Essential Delphi](http://www.marcocantu.com/edelphi/default.htm) Feel free to ask around here as well, or in the Delphi newsgroups, if you encounter specific issues :) --- [edit] @Martin: - [free "Turbo" edition](http://cc.codegear.com/Free.aspx?id=24722)[downloa...
null
CC BY-SA 2.5
null
2008-08-16T11:46:16.050
2008-08-16T18:22:42.477
2008-08-16T18:22:42.477
1,037
1,037
null
13,099
2
null
12,870
2
null
I'm with those that suggest encapsulating function in objects. ``` import java.util.Date; import java.util.Map; import java.util.Set; public class Group { private String groupName; private Map<Season, Set<Day>> schedule; public String getGroupName() { return groupName; } public void se...
null
CC BY-SA 2.5
null
2008-08-16T12:04:54.377
2008-08-16T12:09:44.897
2008-08-16T12:09:44.897
304
304
null
13,089
2
null
13,087
91
null
Dates can be converted to HTTP valid dates (RFC 1123) by using the "r" format string in .Net. HTTP dates need to be GMT / not offset - this can be done using the ToUniversalTime() method. So, in C# for example: ``` string HttpDate = SomeDate.ToUniversalTime().ToString("r"); ``` Right now, that produces HttpDate = "...
null
CC BY-SA 3.0
null
2008-08-16T10:37:41.430
2013-01-28T06:44:18.300
2013-01-28T06:44:18.300
null
1,521
null
13,104
2
null
12,936
0
null
I used Zend Accelerator a little back in the day (2004-ish). It certainly gave some significant performance wins on code it could work with, but unfortunately the system I was using was designed to quite often dynamically load code and then eval it, which Zend Accelerator couldn't do much with at the time (and I'd gues...
null
CC BY-SA 2.5
null
2008-08-16T12:26:06.423
2008-11-03T18:10:30.037
null
null
797
null
13,105
2
null
13,060
8
null
One additional note about ref vs. out: The distinction between the two is enforced by the C# compiler. The CLR does not distinguish between between out and ref. This means that you cannot have two methods whose signatures differ only by an out or ref ``` void foo(int value) {} // Only one of the following would be al...
null
CC BY-SA 2.5
null
2008-08-16T12:32:38.983
2008-08-16T13:18:05.833
2008-08-16T13:18:05.833
748
748
null
13,106
1
13,111
null
4
252
I've just started working on an `ASP.NET` project which I hope to open source once it gets to a suitable stage. It's basically going to be a library that can be used by existing websites. My preference is to support `ASP.NET 2.0` through `3.5`, but I wondered how many people I would be leaving out by not supporting `AS...
Should I support ASP.NET 1.1?
CC BY-SA 3.0
null
2008-08-16T12:34:58.060
2013-07-04T12:11:20.377
2013-07-04T12:11:20.377
1,584,286
886
[ "asp.net", ".net-1.1" ]
13,094
2
null
13,000
1
null
Are you using PHP5? If you define the __autoload() function and use a class with some constants, you can call them where you need them. The only aggravating thing about this is that you have to type something a little longer, like ``` MyClass::MY_CONST ``` The benefit is that if you ever decide to change the way th...
null
CC BY-SA 2.5
null
2008-08-16T11:21:08.037
2008-08-16T11:21:08.037
null
null
1,344
null
13,108
2
null
12,855
1
null
PostgreSQL also supports indexing the results of a function: ``` CREATE INDEX mytable_lower_col1_idx ON mytable (lower(col1)); ``` The only other option I can think of is to de-normalize your data a bit by creating another column to hold the upper-case version (updated by triggers) and index that. Blech!
null
CC BY-SA 2.5
null
2008-08-16T12:40:25.117
2008-08-16T12:40:25.117
null
null
619
null
13,111
2
null
13,106
4
null
Increasingly I think not. The kind of large rigid organisation currently still clinging to 1.1 (probably because they're only just upgraded to it) is also the kind that's highly unlikely to look at open source solutions. If I were starting a new ASP.Net project right now I'd stick with .Net 3.5 and probably the new M...
null
CC BY-SA 2.5
null
2008-08-16T12:43:39.493
2008-08-16T12:43:39.493
null
null
905
null
13,109
1
13,113
null
50
19,413
In php, I often need to map a variable using an array ... but I can not seem to be able to do this in a one liner. c.f. example: ``` // the following results in an error: echo array('a','b','c')[$key]; // this works, using an unnecessary variable: $variable = array('a','b','c'); echo $variable[$key]; ``` This is a ...
PHP: Access Array Value on the Fly
CC BY-SA 3.0
0
2008-08-16T12:42:54.017
2018-08-10T06:21:39.143
2016-02-01T14:34:16.457
5,718,610
1,532
[ "php", "arrays", "coding-style" ]
13,126
2
null
1,496
3
null
I just download the Emacs source from the GNU site and build it myself. I don't like too many Mac-specific features, because I want Emacs behavior to be consistent on all the platforms I use.
null
CC BY-SA 2.5
null
2008-08-16T13:41:47.440
2008-08-16T13:41:47.440
null
null
1,175
null
13,119
2
null
10,661
1
null
Just be aware that there currently is a bug if you call Html.RenderAction(..) on an Action that is marked to be cached. Instead of the specific action being cached, the entire page gets cached. I reported this on codeplex already and it seems to be a known issue: [Calling <% HTML.RenderAction<...>(...); %> to an Action...
null
CC BY-SA 2.5
null
2008-08-16T13:17:05.620
2008-08-16T13:17:05.620
null
null
653
null
13,115
2
null
13,086
3
null
There's also a [Delphi wiki](http://delphi.wikia.com/wiki/Main_Page) This even has a "Beginning Delphi" page with lots of external links on it. (some of them already mentioned)
null
CC BY-SA 3.0
null
2008-08-16T12:58:36.530
2013-11-13T09:43:20.577
2013-11-13T09:43:20.577
1,540,450
1,389
null
13,107
2
null
1,476
344
null
For reference— Python possibilities: Starting with Python 2.6 you can express binary literals using the prefix or : ``` >>> 0b101111 47 ``` You can also use the new function to get the binary representation of a number: ``` >>> bin(173) '0b10101101' ``` Development version of the documentation: [What's New in P...
null
CC BY-SA 2.5
null
2008-08-16T12:35:36.170
2008-08-16T12:35:36.170
null
null
1,531
null
13,123
2
null
561
2
null
I think you can do this with the [Row Test Attribute](http://blog.donnfelker.com/2008/04/01/NUnit247AndTheRowTestAttributeWithExample.aspx) (available in MbUnit and later versions of NUnit) where you could specify several sets to populate one unit test.
null
CC BY-SA 2.5
null
2008-08-16T13:31:37.727
2008-08-16T13:31:37.727
null
null
372
null
13,113
2
null
13,109
19
null
I wouldn't bother about that extra variable, really. If you want, though, you could also remove it from memory after you've used it: ``` $variable = array('a','b','c'); echo $variable[$key]; unset($variable); ``` Or, you could write a small function: ``` function indexonce(&$ar, $index) { return $ar[$index]; } ``...
null
CC BY-SA 2.5
null
2008-08-16T12:55:29.953
2008-08-16T12:55:29.953
null
null
1,037
null
13,133
2
null
11,801
3
null
I'd say MS have made the decision for you if they themselves wont support it in .NET 3.5.
null
CC BY-SA 2.5
null
2008-08-16T14:03:35.603
2008-08-16T14:03:35.603
null
null
null
null
13,134
2
null
11,801
0
null
I would say yes, as most have switched to XP or vista, from what I can tell.
null
CC BY-SA 2.5
null
2008-08-16T14:05:34.320
2008-08-16T14:05:34.320
null
null
522
null
13,132
2
null
13,049
2
null
> Structs are the actual value - they can be empty but never null This is true, however also note that as of .NET 2 structs support a Nullable version and C# supplies some syntactic sugar to make it easier to use. ``` int? value = null; value = 1; ```
null
CC BY-SA 2.5
null
2008-08-16T14:03:02.873
2008-08-16T14:03:02.873
null
null
748
null
13,140
2
null
13,128
9
null
On Unix like systems, the ld and ar utilities can do this. Check out [http://en.wikipedia.org/wiki/Ar_(Unix)](http://en.wikipedia.org/wiki/Ar_(Unix)) or lookup the man pages on any Linux box or through Google, e.g., 'Unix man ar'. Please note that you might be better off linking to a shared (dynamic) library. This woul...
null
CC BY-SA 4.0
null
2008-08-16T14:15:23.037
2022-06-27T21:19:31.363
2022-06-27T21:19:31.363
63,550
1,476
null
13,128
1
13,140
null
45
36,793
I'm tired of adding ten link libraries into my project, or requiring eight of them to use my own. I'd like to take existing libraries like libpng.a, libz.a, libjpeg.a, and combine them into one single .a library. Is that possible? How about combining .lib libraries?
How can I combine several C/C++ libraries into one?
CC BY-SA 4.0
0
2008-08-16T13:46:01.987
2022-06-27T21:36:28.233
2022-06-27T21:16:51.863
63,550
1,536
[ "c++", "c", "archive" ]
13,141
2
null
11,801
1
null
The latest version of WinRAR still supports Windows 95. Think about it, why is that? It's because WinRAR solves a extremely common problem - of unpacking a file. People still use older systems not because they like them, but because they are forced to by the hardware. If you're making a video game, sure, drop support f...
null
CC BY-SA 2.5
null
2008-08-16T14:16:29.273
2008-08-16T14:16:29.273
null
null
1,536
null
13,154
1
null
null
3
1,302
I have a web server and I am currently paying for SVN hosting at a company that specializes in hosting svn. I am thinking of just installing SVN on my dedicated server, are there any security implications of this?
Is it safe to install SVN on a production win2008 web server?
CC BY-SA 2.5
0
2008-08-16T14:46:10.773
2009-05-04T22:02:48.190
2009-05-04T21:32:20.183
72,478
1,368
[ "svn", "windows-server-2008" ]
13,136
2
null
13,128
0
null
I'm not sure how to physically combine them into a single file, however you could employ an abstraction of a sort and just include a single "AllMyLibs.a/h" which in turn includes everything you want. You could also put this into the location where your compiler searches for libraries, so it would work for any project....
null
CC BY-SA 4.0
null
2008-08-16T14:08:54.733
2022-06-27T21:17:19.017
2022-06-27T21:17:19.017
63,550
522
null
13,100
2
null
13,060
27
null
By default (in C#), passing an object to a function actually passes a copy of the reference to that object. Changing the parameter itself only changes the value in the parameter, and not the variable that was specified. ``` void Test1(string param) { param = "new value"; } string s1 = "initial value"; Test1(s1); ...
null
CC BY-SA 2.5
null
2008-08-16T12:06:17.337
2008-08-16T13:07:54.373
2017-05-23T11:54:56.483
-1
891
null
13,163
2
null
13,039
1
null
[Trac](http://trac.edgewall.org/wiki/TracGuide) includes a source code browser and limited statistics analysis. It's web-based, of course.
null
CC BY-SA 2.5
null
2008-08-16T15:01:27.030
2008-08-17T22:50:26.273
2008-08-17T22:50:26.273
853
853
null
13,162
2
null
12,946
2
null
> From what I understand, the slave/readonly database is to use the master db's transaction log file to mirror the data correct? What options do I have in terms of how often the slave db mirrors the data? (real time/every x minutes?). This sounds like you're talking about log shipping instead of replication. For wha...
null
CC BY-SA 2.5
null
2008-08-16T15:01:07.797
2008-08-16T15:01:07.797
2017-05-23T11:48:44.687
-1
1,545
null