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
29,544
2
null
29,531
0
null
I think what you want is a const rather than static. I assume what you want is the effect of having a static readonly which is why you always want the value to be 5. In c# consts are treated exactly the same as a readonly static. [From the c# docs](http://msdn.microsoft.com/en-us/library/aa645749(VS.71).aspx): > Eve...
null
CC BY-SA 2.5
null
2008-08-27T04:53:33.227
2008-08-27T04:53:33.227
null
null
493
null
29,547
2
null
29,539
1
null
I've never heard of such a function, but it would be trivial enough to implement... ``` def die(msg) puts msg exit end ``` Then, if this is defined in some .rb file that you include in all your scripts, you are golden.... just because it's not built in doesn't mean you can't do it yourself ;-)
null
CC BY-SA 2.5
null
2008-08-27T04:54:19.217
2008-08-27T04:54:19.217
null
null
122
null
29,548
2
null
8,472
6
null
> Very simple arithmetic is good. Blind people will be able to answer. (But as Jarod said, beware of operator precedence.) I gather someone could write a parser, but it makes the spamming more costly. Sufficiently simple, and it will be not difficult to code around it. I see two threats here: 1. random spambots an...
null
CC BY-SA 2.5
null
2008-08-27T04:54:56.627
2010-04-19T16:18:38.860
2010-04-19T16:18:38.860
63,550
3,166
null
29,555
1
null
null
4
1,074
I want to write a front-end to an application written in C/C++. I use Solaris 10 and plan to port the application to some other architectures (Windows first).
GUI toolkit for rapid development?
CC BY-SA 2.5
0
2008-08-27T04:59:23.073
2008-09-05T10:07:26.863
2008-08-27T12:32:47.007
1,662
3,006
[ "user-interface", "unix", "solaris" ]
29,549
2
null
25,646
1
null
It's highly unlikely that a basic function like might not be working. Have you tried some really simple settings like or for format and or for type? If not, can you share with us the smallest possible program which replicates your problem?
null
CC BY-SA 2.5
null
2008-08-27T04:55:03.223
2008-08-27T04:55:03.223
null
null
1,630
null
29,557
1
30,700
null
19
4,250
I've read time and time again that TDD/test first is more difficult with MSTest than it is with other testing frameworks such as nUnit, MBUnit, etc... What are some suggested manual workarounds and/or 3rd party bits that you suggest when MSTest is the only option due to infrastructure policy? I'm mainly wondering about...
How to Ease TDD with MSTest / VS2008
CC BY-SA 2.5
0
2008-08-27T05:01:30.087
2014-02-24T06:29:35.660
2008-12-11T03:48:49.680
1,644
1,644
[ "visual-studio-2008", "tdd", "mstest" ]
29,563
2
null
29,557
2
null
I have not seen any serious issues with MSTest. What, specifically, are you talking about? We are, in fact, moving away from NUnit to MSTest. I do not know our reasons for this, though.
null
CC BY-SA 2.5
null
2008-08-27T05:05:41.903
2008-08-27T05:05:41.903
null
null
2,928
null
29,558
1
29,574
null
5
1,493
This might be on the "discussy" side, but I would really like to hear your view on this. Previously I have often written data access classes that handled both reading and writing, which often led to poor naming, like FooIoHandler etc. The rule of thumb that classes that are hard to name probably are poorly designed su...
Split data access class into reader and writer or combine them?
CC BY-SA 2.5
0
2008-08-27T05:02:33.847
2013-05-04T16:00:23.100
2008-08-27T05:19:27.800
832
276
[ "architecture", "oop", "data-access" ]
29,565
2
null
29,555
3
null
I'd recommend taking a look at [wxWidgets](http://www.wxwidgets.org/) to provide some cross platform UI widgets that will work on Solaris and Windows.
null
CC BY-SA 2.5
null
2008-08-27T05:05:50.577
2008-08-27T05:05:50.577
null
null
2,219
null
29,567
2
null
29,555
3
null
Qt 4 is the best tool for this job. If you want to work with other languages, it also has bindings for Java and Python
null
CC BY-SA 2.5
null
2008-08-27T05:07:03.927
2008-08-27T05:07:03.927
null
null
1,897
null
29,568
2
null
29,557
2
null
There are lots of config files with mstest, making it less condusive. Another reason I chose mbunit, is the "rollback" feature of mbunit. This allows you to rollback all database things done in this test, so you can actually do full circuit tests and not worry about the pond being tainted after the test. Also lack of R...
null
CC BY-SA 2.5
null
2008-08-27T05:08:26.437
2008-08-27T05:08:26.437
null
null
1,220
null
29,566
2
null
29,555
1
null
On a Mac, this would be easy. The Cocoa API is great when programming in Objective C (which compiles fine with C/C++ files). Otherwise the situation is a bit more grim. As for Rapid prototype, you might want to check the CodeGear (Borland/C++ Builder) tools. I think their VCL library is cross-platform. Otherwise, you...
null
CC BY-SA 2.5
null
2008-08-27T05:06:10.343
2008-08-27T05:06:10.343
null
null
338
null
29,570
2
null
29,525
5
null
Most of the memory overhead will come from the opcode cache size. Each opcode cacher has their own default(e.g. 30MB for APC) which you can change through the config file. Other than the cache size, the actual memory overhead of the cacher itself is negligible.
null
CC BY-SA 2.5
null
2008-08-27T05:09:39.740
2008-08-27T07:08:26.710
2008-08-27T07:08:26.710
2,633
2,633
null
29,572
2
null
29,511
1
null
The [,] operator returns a string back to you, it is a substring operator, where as the [] operator returns the character which ruby treats as a number when printing it out.
null
CC BY-SA 2.5
null
2008-08-27T05:10:25.200
2008-08-27T05:10:25.200
null
null
2,925
null
29,562
1
29,575
null
25
11,036
I wrote a quick program in python to add a gtk GUI to a cli program. I was wondering how I can create an installer using distutils. Since it's just a GUI frontend for a command line app it only works in *nix anyway so I'm not worried about it being cross platform. my main goal is to create a .deb package for debian/ub...
How to use Python distutils?
CC BY-SA 4.0
0
2008-08-27T05:03:07.993
2018-12-06T13:50:33.577
2018-12-06T13:50:33.577
1,033,581
2,908
[ "python", "linux", "installation", "debian", "distutils" ]
29,574
2
null
29,558
3
null
ORM might be your best solution. Or use a repository type pattern, with a "thingContext" object that is responsible for state persistence. Personally, I use the activeRecord pattern, where save logic is baked into a base class, but I'm leaving it in favor of an nHibernate style repository pattern. The allowance for DD...
null
CC BY-SA 2.5
null
2008-08-27T05:12:08.580
2008-08-27T05:12:08.580
null
null
1,220
null
29,573
2
null
29,461
8
null
I don't know anything about groovy so in a sense I've qualified to answer this... I would want you to: - - - - - - - I'm not sure about how the Java6 scripting support works but I'm fairly sure it can be made secure. I remember something about defining the API the script can use before it's run. If this is the cas...
null
CC BY-SA 2.5
null
2008-08-27T05:11:06.477
2008-08-27T05:11:06.477
null
null
1,666
null
29,571
2
null
29,383
132
null
How about using the C++ language itself? ``` bool t = true; bool f = false; std::cout << std::noboolalpha << t << " == " << std::boolalpha << t << std::endl; std::cout << std::noboolalpha << f << " == " << std::boolalpha << f << std::endl; ``` UPDATE: If you want more than 4 lines of code without any conso...
null
CC BY-SA 4.0
null
2008-08-27T05:10:23.017
2018-07-27T16:27:48.627
2018-07-27T16:27:48.627
52,074
342
null
29,580
1
29,588
null
6
1,436
It's one of those things that seems to have an odd curve where the more I think about it, the more it makes sense. To a certain extent, of course. And then it doesn't make sense to me at all. Care to enlighten me?
Why is pagination so resource-expensive?
CC BY-SA 2.5
0
2008-08-27T05:21:23.003
2008-12-17T15:50:04.027
2008-08-27T05:46:00.433
832
2,293
[ "performance", "pagination" ]
29,577
2
null
29,558
3
null
I am now using Linq to Sql. This solves the problem entirely. However if you do not have that option (or some similar ORM tool), I don't see any reason to separate Read/Write methods. It just adds more classes and complicates data access. I have always designed it as follows: 1. Component/Business Object: Car 2. Dat...
null
CC BY-SA 2.5
null
2008-08-27T05:13:22.087
2008-08-27T05:13:22.087
null
null
51
null
29,582
2
null
29,505
1
null
Well I am not Python expert so I can't comment on how to solve your problem but if you have program in .NET you may use IKVM.NET to deserialize Java objects easily. I have experimented this by creating .NET Client for Log4J log messages written to Socket appender and it worked really well. I am sorry, if this answer d...
null
CC BY-SA 2.5
null
2008-08-27T05:22:24.033
2008-08-27T05:22:24.033
null
null
959
null
29,585
2
null
27,836
2
null
There definitely isn't a Box Plot built into SSRS 2005, though it's possible that 2008 has one. SSRS 2005 does have a robust extension model. If you can implement a chart in System.Drawing/GDI+, you can make it into a [custom report item](http://msdn.microsoft.com/en-us/magazine/cc188686.aspx) for SSRS. There are a ...
null
CC BY-SA 2.5
null
2008-08-27T05:23:45.760
2008-08-27T05:23:45.760
null
null
1,818
null
29,492
2
null
29,437
9
null
Hurray for pointers! This code works by looking ahead 12 bits for each byte and copying the proper bits forward. 12 bits is the bottom half (nybble) of the next byte and the top half of 2 bytes away. ``` unsigned char length = 10; unsigned char data[10] = {0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0,0x0A,0xBC}; unsigned char *s...
null
CC BY-SA 2.5
null
2008-08-27T04:02:45.970
2008-08-27T17:15:26.923
2008-08-27T17:15:26.923
2,146
2,146
null
29,587
2
null
29,539
24
null
If you want to denote an actual error in your code, you could raise a `RuntimeError` exception: ``` raise RuntimeError, 'Message goes here' ``` This will print a stacktrace, the type of the exception being raised and the message that you provided. Depending on your users, a stacktrace might be too scary, and the act...
null
CC BY-SA 2.5
null
2008-08-27T05:25:26.473
2008-08-29T01:50:47.720
2008-08-29T01:50:47.720
2,988
2,988
null
29,588
2
null
29,580
18
null
Because in most cases you've got to sort your results first. For example, when you search on Google, [you can view only up to 100 pages of results](http://www.google.com.au/search?hl=en&safe=off&q=google&start=1000&sa=N). They don't bother sorting by page-rank beyond 1000 websites for given keyword (or combination of k...
null
CC BY-SA 2.5
null
2008-08-27T05:26:17.237
2008-08-27T05:32:03.477
2008-08-27T05:32:03.477
275
275
null
29,589
2
null
29,580
2
null
This is a really vague question. We'd need a concrete example to get a better idea of the problem.
null
CC BY-SA 2.5
null
2008-08-27T05:26:59.327
2008-08-27T05:26:59.327
null
null
956
null
29,522
2
null
8,472
2
null
Even with rep, there should still be SOME type of capcha, to prevent a malicious script attack.
null
CC BY-SA 2.5
null
2008-08-27T04:34:21.400
2008-08-27T04:34:21.400
null
null
1,366
null
29,564
2
null
29,505
2
null
, it's possible. The Java Serialization, like pretty much everything in Javaland, is standardized. So, you implement a deserializer according to that standard in Python. However, the Java Serialization format is not designed for cross-language use, the serialization format is closely tied to the way objects are repres...
null
CC BY-SA 2.5
null
2008-08-27T05:05:47.270
2008-08-27T05:05:47.270
null
null
2,988
null
29,599
2
null
25,458
168
null
In his talk [The Performance of Everyday Things](http://weblogs.asp.net/craigshoemaker/archive/2008/06/17/the-performance-of-everyday-things.aspx), Jeff Richter shows that calling a method by reflection is about than calling it normally. Jeff's tip: if you need to call the method multiple times, use reflection once...
null
CC BY-SA 2.5
null
2008-08-27T05:42:40.893
2009-05-02T00:24:10.000
2009-05-02T00:24:10.000
88
88
null
29,601
2
null
29,580
3
null
[Lubos](https://stackoverflow.com/questions/29580/why-is-pagination-so-resource-expensive#29588) is right, the problem is not the fact that you are paging (which takes a HUGE amount of data off the wire), but that you need to figure out what is actually going on the page.. The fact that you need to page implies there ...
null
CC BY-SA 2.5
null
2008-08-27T05:47:48.760
2008-08-27T05:47:48.760
2017-05-23T12:33:26.220
-1
832
null
29,609
2
null
29,496
12
null
You'll need a command line tool to zip up the files. I recommend [7-Zip](http://www.7-zip.org/download.html) which is free and easy to use. The self-contained command line version (7za.exe) is the most portable choice. Here's a two-line batch file that would zip the log files and delete them afterwards: ``` 7za.exe a...
null
CC BY-SA 2.5
null
2008-08-27T06:00:40.507
2008-08-27T06:00:40.507
null
null
2,783
null
29,614
2
null
28,280
0
null
It would probably be more work than it's worth, but you can use static C#/VB variables in a SQL CLR UDF, so I think you'd be able to do what you want to do by simply incrementing this variable every time the UDF is called. The static variable would be lost whenever the appdomain unloaded, of course. So if you need co...
null
CC BY-SA 2.5
null
2008-08-27T06:07:01.257
2008-08-27T06:07:01.257
null
null
1,818
null
29,603
2
null
29,557
13
null
If you have no choice but to use MSTest, learn the keyboard shortcuts. They'll make your life a little easier. Test in Current Context: +, All Tests in Solution: +, Debug Tests in Current Context: +, + Debug All Tests in Solution: +, +
null
CC BY-SA 3.0
null
2008-08-27T05:49:18.117
2013-07-21T10:21:06.167
2013-07-21T10:21:06.167
2,231,069
598
null
29,606
2
null
15,695
9
null
I recommend checking out the book referenced by jko: > a book from The Pragmatic Bookshelf called [Stripes: ...and Java web development is fun again](http://www.pragprog.com/titles/fdstr/stripes) Whilst still in 'beta' the book covers everything very well. Another good place to start is [this ONJava article](http://...
null
CC BY-SA 2.5
null
2008-08-27T05:58:10.357
2008-08-27T05:58:10.357
null
null
2,966
null
29,620
2
null
29,615
3
null
Check [getrusage](http://linux.die.net/man/2/getrusage), I think that should solve your problem.
null
CC BY-SA 2.5
null
2008-08-27T06:17:00.377
2008-08-27T06:17:00.377
null
null
2,957
null
29,605
2
null
26,882
0
null
The view state only lasts for [multiple requests for the same page](http://msdn.microsoft.com/en-us/library/540y83hx.aspx). Changing the query string in the URL is requesting a new page, thus clearing the view state. Is it possible to remove the reliance on the view state by adding more query string parameters? You ca...
null
CC BY-SA 2.5
null
2008-08-27T05:55:37.337
2008-08-27T05:55:37.337
null
null
3,139
null
29,617
2
null
29,557
1
null
To answer a non-pointed question, my answer would be "probably NUnit just stays out of your face." : I've no actual experience with MS version of xUnit, however I hear problems like 'You need to install the gigantic idea just to run your tests on a separate machine' - which is a complete No-No. Other than that MS has...
null
CC BY-SA 2.5
null
2008-08-27T06:13:35.610
2008-08-27T06:13:35.610
null
null
1,695
null
29,622
2
null
29,466
7
null
If you are a one-man team, then your only option is really WiiWare. At $2000 for the kit, you picked the right console. That's a tiny fraction of the cost of a 360 or PS3 dev kit. You do have to have your own business. You also have to get your game rated by the [ESRB](http://www.esrb.org/) which will put you back an...
null
CC BY-SA 2.5
null
2008-08-27T06:20:07.623
2008-08-27T06:20:07.623
null
null
1,892
null
29,621
1
29,623
null
14
21,007
On Windows I can do: ``` HANDLE hCurrentProcess = GetCurrentProcess(); SetPriorityClass(hCurrentProcess, ABOVE_NORMAL_PRIORITY_CLASS); ``` How can I do the same thing on *nix?
Change priority of the current process in C
CC BY-SA 3.0
0
2008-08-27T06:17:47.533
2016-12-21T03:25:14.990
2016-12-21T03:25:14.990
1,459,996
163
[ "c", "unix", "cross-platform", "process-management" ]
29,615
1
29,620
null
1
2,370
On Windows I can do: ``` HANDLE hProcess = GetCurrentProcess(); FILETIME ftCreation, ftExit, ftKernel, ftUser; GetProcessTimes(hProcess, &ftCreation, &ftExit, &ftKernel, &ftUser); SYSTEMTIME stKernel; FileTimeToSystemTime(&ftKernel, &stKernel); SYSTEMTIME stUser; FileTimeToSystemTime(&ftUser, &stUser); printf("Ti...
Get current process CPU usage in C
CC BY-SA 2.5
0
2008-08-27T06:11:03.383
2009-12-28T20:28:38.727
2009-12-28T20:28:38.727
63,550
163
[ "c", "unix", "cross-platform", "process-management" ]
29,514
2
null
29,437
3
null
Here a working solution, using temporary variables: ``` void shift_4bits_left(uint8_t* array, uint16_t size) { int i; uint8_t shifted = 0x00; uint8_t overflow = (0xF0 & array[0]) >> 4; for (i = (size - 1); i >= 0; i--) { shifted = (array[i] << 4) | overflow; overflow = (0xF0 & ...
null
CC BY-SA 2.5
null
2008-08-27T04:23:41.520
2008-08-27T04:34:43.350
2008-08-27T04:34:43.350
609
609
null
29,626
1
null
null
38
259,612
In a VB.NET WinForms project, I get an exception > Cannot access a disposed of object when closing a form. It occurs very rarely and I cannot recreate it on demand. The stack trace looks like this: ``` Cannot access a disposed object. Object name: 'dbiSchedule'. at System.Windows.Forms.Control.CreateHandle() at ...
Cannot access a disposed object - How to fix?
CC BY-SA 4.0
0
2008-08-27T06:36:17.100
2019-10-18T08:50:57.053
2019-10-18T08:40:19.747
5,582,190
961
[ ".net", "vb.net", "winforms" ]
29,629
2
null
29,593
3
null
Are you running your application locally inside of IIS or inside of the development web server? If it's the latter, then that's probably why: Cassini (the development web server) doesn't do ISAPI, so this value will be empty.
null
CC BY-SA 2.5
null
2008-08-27T06:38:29.717
2008-08-27T06:38:29.717
null
null
1,554
null
29,624
1
194,969
null
5
8,761
I have a form element that contains multiple lines of inputs. Think of each line as attributes of a new object that I want to create in my web application. And, I want to be able to create multiple new objects in one HTTP POST. I'm using Javascript's built-in cloneNode(true) method to clone each line. The problem is ...
How to Maintain Correct Javascript Event After Using cloneNode(true)
CC BY-SA 2.5
0
2008-08-27T06:27:51.643
2011-12-29T12:24:56.960
2011-12-29T12:24:56.960
938,089
1,376
[ "javascript", "events", "dom", "prototypejs", "clonenode" ]
29,627
2
null
29,580
1
null
I thought you meant [pagination of the printed page](http://en.wikipedia.org/wiki/Pagination) - that's where I cut my teeth. I was going to enter a great monologue about collecting all the content for the page, positioning (a vast number of rules here, constrait engines are quite helpful) and justification... but appa...
null
CC BY-SA 2.5
null
2008-08-27T06:37:13.587
2008-08-27T06:37:13.587
null
null
3,166
null
29,630
1
29,719
null
4
16,342
I've writen an Excel-based, database reporting tool. Currentely, all the VBA code is associated with a single XLS file. The user generates the report by clicking a button on the toolbar. Unfortunately, unless the user has saved the file under another file name, all the reported data gets wiped-out. When I have created...
What is the best way to package and distribute an Excel application
CC BY-SA 2.5
0
2008-08-27T06:40:13.253
2020-02-07T00:14:32.947
2020-02-07T00:14:32.947
4,240,030
2,665
[ "excel", "vba", "office-addins" ]
29,631
2
null
21,738
1
null
IDEA 8 Milestone 1 is a beta(ish) "based on a new platform". This may have changed the way that swing is handled. Also you are running a beta JDK. You will probably get more help/submit a bug at the Jetbrain forums unless they are on SO also. [Here is the bug tracker link](http://www.jetbrains.net/jira/browse/IDEA/)
null
CC BY-SA 2.5
null
2008-08-27T06:42:53.823
2008-08-27T06:42:53.823
null
null
3,431,280
null
29,623
2
null
29,621
25
null
Try: ``` #include <sys/time.h> #include <sys/resource.h> int main(){ setpriority(PRIO_PROCESS, 0, -20); } ``` Note that you must be running as superuser for this to work. (for more info, type 'man setpriority' at a prompt.)
null
CC BY-SA 2.5
null
2008-08-27T06:20:54.843
2008-08-27T06:26:40.570
2008-08-27T06:26:40.570
2,933
2,933
null
29,635
2
null
29,626
1
null
You sure the timer isn't outliving the 'dbiSchedule' somehow and firing after the 'dbiSchedule' has been been disposed of? If that is the case you might be able to recreate it more consistently if the timer fires more quickly thus increasing the chances of you closing the Form just as the timer is firing.
null
CC BY-SA 2.5
null
2008-08-27T06:47:00.130
2008-08-27T06:47:00.130
null
null
2,508
null
29,636
2
null
29,626
0
null
Looking at the error stack trace, it seems your timer is still active. Try to cancel the timer upon closing the form ( in the form's OnClose() method). This looks like the cleanest solution.
null
CC BY-SA 3.0
null
2008-08-27T06:48:14.527
2015-04-08T03:33:48.227
2015-04-08T03:33:48.227
2,150
2,150
null
29,634
2
null
29,626
22
null
Try checking the [IsDisposed](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.isdisposed.aspx) property before accessing the control. You can also check it on the [FormClosing](http://msdn.microsoft.com/en-us/library/system.windows.forms.form.formclosing.aspx) event, assuming you're using the FormC...
null
CC BY-SA 2.5
null
2008-08-27T06:45:36.173
2008-08-27T08:53:28.267
2008-08-27T08:53:28.283
718
718
null
29,602
2
null
29,004
13
null
[Peter's answer](https://stackoverflow.com/questions/29004/parsing-xml-using-unix-terminal#29023) is correct, but it outputs a trailing line feed. ``` <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="text"/> <xsl:template match="root"> <xsl:for-each select="my...
null
CC BY-SA 2.5
null
2008-08-27T05:48:46.433
2008-08-27T05:48:46.433
2017-05-23T10:31:34.200
-1
2,679
null
29,575
2
null
29,562
14
null
See the [distutils simple example](http://docs.python.org/dist/simple-example.html). That's basically what it is like, except real install scripts usually contain a bit more information. I have not seen any that are fundamentally more complicated, though. In essence, you just give it a list of what needs to be installe...
null
CC BY-SA 2.5
null
2008-08-27T05:12:47.643
2008-08-27T05:12:47.643
null
null
2,928
null
29,637
2
null
29,626
11
null
It looks like a threading issue. : Maybe you have the main thread and a timer thread accessing this control. The main thread shuts down - calling Control.Dispose() to indicate that I'm done with this Control and I shall make no more calls to this. However, the timer thread is still active - a context switch to that thr...
null
CC BY-SA 4.0
null
2008-08-27T06:49:16.133
2019-10-18T08:50:57.053
2019-10-18T08:50:57.053
5,582,190
1,695
null
29,640
2
null
29,426
6
null
Another good GUI designer for Eclipse is [Window Builder Pro](http://www.windowbuilderpro.com/). Like Jigloo, it's not free for commercial use. It allows you to design user interfaces for Swing, SWT and even the Google Web Toolkit (GWT).
null
CC BY-SA 2.5
null
2008-08-27T06:51:59.543
2008-08-27T06:51:59.543
null
null
2,783
null
29,641
2
null
29,499
1
null
Redirect the data to disk and use a [Hex Editor](https://www.hhdsoftware.com/free-hex-editor). Most text editors / viewers do their own conversions behind the scenes, so it is difficult to be sure you are seeing the data in it's true form.
null
CC BY-SA 3.0
null
2008-08-27T06:53:48.803
2017-09-13T09:05:01.063
2017-09-13T09:05:01.063
6,761,181
259
null
29,639
2
null
27,910
1
null
The following regex should do the job (Perl regex syntax): ``` /(10\.\d+\/\d+)/ ``` You could do some additional sanity checking by opening the urls ``` http://hdl.handle.net/<doi> ``` and ``` http://dx.doi.org/<doi> ``` where is the candidate doi, and testing that you a) get a 200 OK http status, and b) the...
null
CC BY-SA 2.5
null
2008-08-27T06:51:20.747
2008-08-27T06:51:20.747
null
null
2,933
null
29,642
2
null
22,907
4
null
In our application, there is a layer of code that provides the content of the query (and is sometimes a call to a stored procedure). This allows us to: - - - Access control is implemented in the middle layer, rather than in the database, so we don't need stored procedures there. This is in some ways a middle road be...
null
CC BY-SA 2.5
null
2008-08-27T06:56:40.390
2008-08-28T23:59:59.237
2008-08-28T23:59:59.237
2,219
2,219
null
29,646
2
null
29,626
1
null
Another place you could stop the timer is the [FormClosing](http://msdn.microsoft.com/en-us/library/system.windows.forms.form.formclosing.aspx) event - this happens before the form is actually closed, so is a good place to stop things before they might access unavailable resources.
null
CC BY-SA 2.5
null
2008-08-27T07:01:49.627
2008-08-27T07:01:49.627
null
null
1,908
null
29,593
1
29,629
null
0
3,323
I've trying to get an ASP.net (v2) app to work in the debugger and keep running into a problem because the value returned by the following code is an empty string: `HttpContext.Current.Request.ServerVariables["APPL_MD_PATH"].ToLower()` I have found out that this "Retrieves the metabase path for the Application for t...
What does ServerVariables["APPL_MD_PATH"] retrieves the metabase path for the Application for the ISAPI DLL mean?
CC BY-SA 3.0
null
2008-08-27T05:35:58.977
2017-03-27T15:02:09.207
2017-03-27T15:02:09.207
1,033,581
2,375
[ ".net", "asp.net", "visual-studio", ".net-2.0", "debugging" ]
29,643
1
29,652
null
7
691
Okay, here's the scenario. I have a utility that processes tons of records, and enters information to the Database accordingly. It works on these records in multi-threaded batches. Each such batch writes to the same log file for creating a workflow trace for each record. Potentially, we could be making close to a mill...
Which is a better approach in logging - files or DB?
CC BY-SA 2.5
0
2008-08-27T06:58:51.617
2008-10-16T13:57:54.967
null
null
380
[ "multithreading", "logging" ]
29,645
1
29,649
null
21
65,920
I have a few lines of PowerShell code that I would like to use as an automated script. The way I would like it to be able to work is to be able to call it using one of the following options: 1. One command line that opens PowerShell, executes script and closes PowerShell (this would be used for a global build-routine...
Set up PowerShell Script for Automatic Execution
CC BY-SA 2.5
0
2008-08-27T07:00:43.093
2016-11-15T13:48:52.427
2008-08-27T07:05:47.043
51
51
[ "command-line", "powershell", "scripting" ]
29,647
1
29,656
null
11
10,053
Let's say I'm creating a program in C that needs to use a tempfile. Creating an ad hoc tempfile in /tmp is probably not a good idea. Is there a function or OS call to supply me with a tempfile name so that I can begin to write and read from it?
How do you get the filename of a tempfile to use in Linux?
CC BY-SA 2.5
null
2008-08-27T07:05:07.060
2020-11-22T13:20:09.663
2009-04-08T19:30:56.257
2,284
432
[ "c", "linux" ]
29,648
2
null
29,643
0
null
I think it depends greatly on what you are doing with the log files afterwards. Of the two operations writing to the log file will be faster - especially as you are suggesting writing to a database on another server. However if you are then trying to process and search the log files on a regular basis then the best p...
null
CC BY-SA 2.5
null
2008-08-27T07:05:22.567
2008-08-27T07:05:22.567
null
null
1,908
null
29,650
2
null
29,643
1
null
Database - since you mentioned multiple threads. Synchronization as well as filtered retrieval are my reasons for my answer. See if you have a performance problem before deciding to switch to files
null
CC BY-SA 2.5
null
2008-08-27T07:06:55.560
2008-08-27T07:06:55.560
null
null
1,695
null
29,649
2
null
29,645
9
null
Save your script as a .ps1 file and launch it using powershell.exe, like this: ``` powershell.exe .\foo.ps1 ``` Make sure you specify the full path to the script, and make sure you have set your execution policy level to at least "RemoteSigned" so that unsigned local scripts can be run.
null
CC BY-SA 2.5
null
2008-08-27T07:06:22.393
2008-08-27T07:06:22.393
null
null
615
null
29,651
2
null
29,643
1
null
There are ways you can work around the limitations of file logging. You can always start each log entry with a thread id of some kind, and grep out the individual thread ids. Or a different log file for each thread. I've logged to database in the past, in a separate thread at a lower priority. I must say, queryab...
null
CC BY-SA 2.5
null
2008-08-27T07:07:26.277
2008-08-27T07:07:26.277
null
null
257
null
29,653
2
null
29,643
1
null
How about logging to database-file, say a SQLite database? I think it can handle multi-threaded writes - although that may also have its own performance overheads.
null
CC BY-SA 2.5
null
2008-08-27T07:10:45.783
2008-08-27T07:10:45.783
null
null
null
null
29,657
2
null
29,647
2
null
Absolutely: man mkstemp. The man page has example usage.
null
CC BY-SA 2.5
null
2008-08-27T07:12:52.690
2008-08-27T07:12:52.690
null
null
3,148
null
29,628
2
null
29,168
1
null
Unfortunately, git provides no way to do this. Instead, the 'git way' is to have two repositories -- client and server, and clone the one(s) you need.
null
CC BY-SA 2.5
null
2008-08-27T06:38:13.617
2008-08-27T06:38:13.617
null
null
2,933
null
29,654
1
281,963
null
6
4,841
I'm developing a WinForms application (.Net 3.5, no WPF) where I want to be able to display foreign key lookups in a databound DataGridView. An example of the sort of relationship is that I have a table of OrderLines. Orderlines have a foreign key relationship to Products and Products in turn have a foreign key rela...
WinForms databinding and foreign key relationships
CC BY-SA 2.5
0
2008-08-27T07:11:46.407
2019-06-11T15:26:54.910
2010-03-07T22:43:52.340
2,660
2,660
[ "c#", ".net", "winforms" ]
29,658
2
null
29,643
3
null
One thing that comes to mind is that you could have each thread writing to its own log file and then do a daily batch run to combine them. If you are logging to database you probably need to do some tuning and optimization, especially if the DB will be across the network. At the least you will need to be reusing the D...
null
CC BY-SA 2.5
null
2008-08-27T07:12:56.327
2008-08-27T07:12:56.327
null
null
2,087
null
29,659
2
null
29,647
1
null
Not sure about anything in a C lib, but you can do this at the shell with [mktemp](http://linux.die.net/man/1/mktemp).
null
CC BY-SA 2.5
null
2008-08-27T07:13:58.820
2008-08-27T07:13:58.820
null
null
3,024
null
29,656
2
null
29,647
20
null
You can use the [mkstemp(3)](http://www.linuxmanpages.com/man3/mkstemp.3.php) function for this purpose. Another alternative is the [tmpfile(3)](http://www.linuxmanpages.com/man3/tmpfile.3.php) function. Which one of them you choose depends on whether you want the file to be opened as a C library file stream (which `tm...
null
CC BY-SA 2.5
null
2008-08-27T07:12:14.470
2008-08-27T07:12:14.470
null
null
2,794
null
29,661
2
null
29,654
1
null
welcome to StackOverflow :) Normally what you would do is base the information in the drop down on two values [ValueMember and DisplayMember](http://windowsclient.net/blogs/faqs/archive/2006/07/12/what-are-the-displaymember-and-valuemember.aspx). The ValueMember is the source of the actual controls value (this will b...
null
CC BY-SA 2.5
null
2008-08-27T07:15:50.937
2008-08-27T07:15:50.937
null
null
832
null
29,664
1
62,688
null
131
116,834
I need to specifically catch SQL server timeout exceptions so that they can be handled differently. I know I could catch the SqlException and then check if the message string Contains "Timeout" but was wondering if there is a better way to do it? ``` try { //some code } catch (SqlException ex) { if (ex.Messa...
How to catch SQLServer timeout exceptions
CC BY-SA 2.5
0
2008-08-27T07:18:54.173
2020-12-24T13:28:39.740
null
null
2,231
[ "c#", ".net", "sql-server", "error-handling" ]
29,665
1
30,452
null
2
4,614
I need to implement a [wavetable synthesizer](http://en.wikipedia.org/wiki/Wavetable) in an ARM Cortex-M3 core. I'm looking for any code or tools to help me get started. I'm aware of [this AVR implementation](http://elm-chan.org/works/mxb/report.html). I actually converted it to a PIC a while back. Now I am looking fo...
Free Wavetable Synthesizer?
CC BY-SA 2.5
null
2008-08-27T07:20:38.617
2018-01-14T06:37:41.673
2013-09-02T10:32:18.387
1,320,710
3,175
[ "audio", "arm", "microcontroller", "synthesizer", "sound-synthesis" ]
29,667
2
null
29,643
6
null
The interesting question, should you decide to log to the database, is where do you log database connection errors? If I'm logging to a database, I always have a secondary log location (file, event log, etc) in case there are communication errors. It really does make it easier to diagnose issues later on.
null
CC BY-SA 2.5
null
2008-08-27T07:20:58.583
2008-08-27T07:20:58.583
null
null
377
null
29,672
2
null
9,589
4
null
I've used [Bakefile](http://www.bakefile.org/index.html) before with some success. It's fairly simple and seems to work well.
null
CC BY-SA 2.5
null
2008-08-27T07:27:43.670
2008-08-27T07:27:43.670
null
null
3,175
null
29,668
1
38,889
null
4
2,415
I have two machines in two different domains. On both I have VS 2005 installed. I want remote debug between them. Without authentication it is possible but I want to debug managed code. I don't want to debug directly since it is really crappy machine. When I try to attach with debugger I get message "The trust relatio...
Remote debugging across domains
CC BY-SA 3.0
0
2008-08-27T07:21:35.353
2013-07-12T17:00:09.183
2013-01-23T11:44:45.213
1,806,414
501
[ "visual-studio", "debugging", "managed-code" ]
29,669
2
null
22,907
0
null
I prefer keeping all data logic in the program code, in which the data access layer executes straight SQL queries. On the other hand, data logic I put in the database in the form of triggers, stored procedures, custom functions and whatnot. An example of something I deem worthy of database-ifying is data generation -...
null
CC BY-SA 2.5
null
2008-08-27T07:22:01.263
2008-08-27T07:22:01.263
null
null
2,928
null
29,666
2
null
29,664
0
null
Whats the value for the SqlException.ErrorCode property? Can you work with that? When having timeouts, it may be worth checking the code for . I would set this up as a static const in your data code.
null
CC BY-SA 3.0
null
2008-08-27T07:20:43.950
2015-12-23T19:06:29.617
2015-12-23T19:06:29.617
5,067,286
832
null
29,673
2
null
22,907
0
null
These days I hardly ever use stored procedures. I only use them for complicated sql queries that can't easily be done in code. One of the main reasons is because stored procedures do not work as well with OR mappers. These days I think you need a very good reason to write a business application / information system...
null
CC BY-SA 2.5
null
2008-08-27T07:29:27.127
2008-08-27T07:29:27.127
null
null
2,785
null
29,676
2
null
3,231
1
null
Maybe the [Jack](http://jackaudio.org/) source code may help too. It's a sound driver for Posix compatible systems with a lot of possibilities and supports USB and Firewire audio devices.
null
CC BY-SA 4.0
null
2008-08-27T07:37:36.547
2019-04-13T20:11:34.717
2019-04-13T20:11:34.717
6,296,561
3,056
null
29,677
1
29,692
null
3
715
What should I do if I want to release a .net assembly but wish to keep its internals detailed in the manifest private (from a utility such as [ildasm.exe](https://learn.microsoft.com/en-us/dotnet/framework/tools/ildasm-exe-il-disassembler)) ?
How do I make the manifest of a .net assembly private?
CC BY-SA 4.0
0
2008-08-27T07:38:06.593
2018-08-08T17:01:34.003
2018-08-08T17:01:34.003
770,254
381
[ ".net", "security", "obfuscation" ]
29,675
2
null
29,645
3
null
[Source](http://www.microsoft.com/technet/scriptcenter/topics/winpsh/manual/run.mspx#ECEAC) for Matt's answer. I can get it to run by double-clicking a file by creating a batch file with the following in it: ``` C:\WINDOWS\system32\windowspowershell\v1.0\powershell.exe LocationOfPS1File ```
null
CC BY-SA 2.5
null
2008-08-27T07:35:06.863
2008-08-27T07:35:06.863
null
null
51
null
29,684
2
null
29,654
0
null
Here's a good "How Do I" video that demonstrates data binding: [http://windowsclient.net/learn/video.aspx?v=52579](http://windowsclient.net/learn/video.aspx?v=52579)
null
CC BY-SA 2.5
null
2008-08-27T07:46:48.897
2008-08-27T07:46:48.897
null
null
373
null
29,660
2
null
28,280
2
null
> I'm starting to think it can't be done that way since there doesn't seem to be a way to maintain the offset counter between calls. Is that right, or is there something I'm missing. You aren't missing anything; SQL Server does not support global variables, and it doesn't support data modification within UDFs. And ev...
null
CC BY-SA 2.5
null
2008-08-27T07:14:44.853
2008-08-27T07:14:44.853
null
null
2,929
null
29,670
2
null
29,004
2
null
Here's a little ruby script that does what your question asks (pull an attribute called 'name' out of elements called 'myel'). Should be easy to generalize ``` #!/usr/bin/ruby -w require 'rexml/document' xml = REXML::Document.new(File.open(ARGV[0].to_s)) xml.elements.each("//myel") { |el| puts "#{el.attributes['nam...
null
CC BY-SA 2.5
null
2008-08-27T07:25:01.320
2008-08-27T08:05:18.603
2008-08-27T08:05:18.603
2,994
2,994
null
29,688
2
null
29,686
1
null
I've not really had to face this issue too much yet myself, so please keep that in mind. Is there not anyway you can run the process async and specify a callback method to occur once complete, and then keep the page in a "we are processing your request.." loop cycle. You could then open this up to add some nice UI enh...
null
CC BY-SA 3.0
null
2008-08-27T07:54:48.627
2015-10-08T08:22:10.203
2015-10-08T08:22:10.203
67,579
832
null
29,686
1
29,754
null
14
9,981
I'll have an ASP.net page that creates some Excel Sheets and sends them to the user. The problem is, sometimes I get Http timeouts, presumably because the Request runs longer than executionTimeout (110 seconds per default). I just wonder what my options are to prevent this, without wanting to generally increase the ex...
Set ASP.net executionTimeout in code / "refresh" request
CC BY-SA 3.0
0
2008-08-27T07:50:05.957
2015-10-08T08:22:10.203
2015-10-08T08:20:44.187
67,579
91
[ "c#", "asp.net" ]
29,690
2
null
27,774
0
null
I still can't see the formulae in your example (just values), but that is exactly what I'm trying to do in terms of the result; obviously I can already do it "by the side" and sum separately - the key for me is doing it in one cell. I have looked at it again this morning - using the `MATCH` function for the lookup wor...
null
CC BY-SA 2.5
null
2008-08-27T07:55:09.423
2008-12-10T13:58:49.010
2008-12-10T13:58:49.010
2,492
2,492
null
29,692
2
null
29,677
7
null
I think what you're talking about is "obfuscation". There are lots of articles about it on the net: [http://en.wikipedia.org/wiki/Obfuscation](http://en.wikipedia.org/wiki/Obfuscation) The "standard" tool for obfuscation on .NET is by Preemptive Solutions: [http://www.preemptive.com/obfuscator.html](http://www.preem...
null
CC BY-SA 2.5
null
2008-08-27T07:55:52.837
2008-08-27T07:55:52.837
null
null
986
null
29,691
2
null
28,588
7
null
I've actually done this (set up my own server using phpMyID). It's very easy and works quite well. One thing that annoys me to no end is the use of HTML redirects instead of HTTP. I changed that manually, based on some information gotten in the [phpMyID forum](https://www.siege.org/forum/viewforum.php?id=8). However, ...
null
CC BY-SA 2.5
null
2008-08-27T07:55:10.887
2008-08-27T07:55:10.887
null
null
1,968
null
29,681
2
null
29,643
2
null
Not sure if it helps, but there's also a utility called [Microsoft LogParser](http://www.microsoft.com/technet/scriptcenter/tools/logparser/default.mspx) that you can supposedly use to parse text-based log files and use them as if they were a database. From the website: > Log parser is a powerful, versatile tool tha...
null
CC BY-SA 2.5
null
2008-08-27T07:40:15.777
2008-08-27T07:40:15.777
null
null
1,037
null
29,693
2
null
29,647
3
null
@garethm: > I believe that the function you're looking for is called tmpnam. You should definitely use `tmpnam`. It suffers from the race condition problem I mentioned in my answer: Between determining the name and opening it, another program may create the file or a symlink to it, which is a huge security hole. Th...
null
CC BY-SA 2.5
null
2008-08-27T07:56:09.153
2008-08-27T08:08:19.077
2008-08-27T08:08:19.077
1,968
2,794
null
29,689
1
31,946
null
32
41,201
I have a large codebase without Javadoc, and I want to run a program to write a skeleton with the basic Javadoc information (e.g., for each method's parameter write @param...), so I just have to fill the gaps left. Anyone know a good solution for this? JAutodoc is what I was looking for. It has Ant tasks, an Eclip...
Javadoc template generator
CC BY-SA 3.0
0
2008-08-27T07:55:06.443
2016-01-06T14:05:42.850
2016-01-06T14:05:42.850
584,674
2,937
[ "java", "documentation", "javadoc" ]
29,694
1
29,804
null
1
3,046
Trying to make a MySQL-based application support MS SQL, I ran into the following issue: I keep MySQL's auto_increment as unsigned integer fields (of various sizes) in order to make use of the full range, as I know there will never be negative values. MS SQL does not support the unsigned attribute on all integer types...
How to work around unsupported unsigned integer field types in MS SQL?
CC BY-SA 2.5
0
2008-08-27T07:57:16.110
2008-10-08T22:28:12.223
2008-10-08T22:28:12.223
15,401
2,077
[ "mysql", "sql-server", "database", "interop" ]
29,697
2
null
29,694
0
null
I would say this.. "How do we normally deal with differences between components?" .. You need to create an abstraction layer within you data access layer to get it to the point where it whether or not the database is MySQL or MS SQL..
null
CC BY-SA 2.5
null
2008-08-27T08:00:20.563
2008-08-27T08:00:20.563
null
null
832
null
29,700
1
null
null
9
3,793
I am having trouble finding good guides for WPF. I have experience in C# and .NET but I don't know anything about WPF except for the regular marketing-ish description of the technology as a whole. Can anyone point me to a good beginner's tutorial/guide on WPF.
Can someone point me to some guides for WPF
CC BY-SA 2.5
0
2008-08-27T08:01:42.200
2013-08-20T12:56:44.553
2013-08-20T12:56:44.553
null
2,976
[ ".net", "wpf" ]