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
41,541
2
null
41,511
2
null
The PixelFormat enumeration lists the formats of 'bitmaps' you can create in .Net, so you'd want PixelFormat.Format32bppArgb: [http://msdn.microsoft.com/en-us/library/system.drawing.imaging.pixelformat.aspx](http://msdn.microsoft.com/en-us/library/system.drawing.imaging.pixelformat.aspx) [http://msdn.microsoft.com/en...
null
CC BY-SA 2.5
null
2008-09-03T12:18:52.697
2008-09-03T12:18:52.697
null
null
1,908
null
41,526
2
null
3,049
5
null
If it needs to be cross platfrom, I would suggest looking at Boost [Asio](http://www.boost.org/doc/libs/1_36_0/doc/html/boost_asio.html).
null
CC BY-SA 2.5
null
2008-09-03T12:12:46.500
2008-09-03T12:12:46.500
null
null
4,086
null
41,528
2
null
41,453
9
null
The two reflection-like solutions I know of from my C++ days are: 1) Use RTTI, which will provide a bootstrap for you to build your reflection-like behaviour, if you are able to get all your classes to derive from an 'object' base class. That class could provide some methods like GetMethod, GetBaseClass etc. As for ho...
null
CC BY-SA 2.5
null
2008-09-03T12:13:09.620
2008-09-03T12:13:09.620
null
null
4,385
null
41,544
2
null
7,596
3
null
One thing that I found very helpful for unit tests was to have a myApp/src/ and also myApp/test_src/ directories. This way, I can place unit tests in the same packages as the classes they test, and yet I can easily exclude the test cases when I prepare my production installation.
null
CC BY-SA 2.5
null
2008-09-03T12:21:37.760
2008-09-03T12:21:37.760
null
null
null
null
41,545
2
null
41,525
0
null
There are quite a few vi clones (e.g. vim) and also various Emacs implementations (Gnu Emacs vs. XEmacs spring to mind). These clones differ on Unix themselves and will thus also differ on Windows. One thing I found with vim is that the directory structure for plugins etc. is very different on Windows - `~/vim.rc` tr...
null
CC BY-SA 2.5
null
2008-09-03T12:22:02.830
2008-09-03T12:22:02.830
null
null
2,260
null
41,550
2
null
32,044
-2
null
I had a similar issue, however I had first implemented the solution using JavaScript, and just afterwards considered how I would have done the same thing in django templates. I used the serializer utility to turn a list off models into json, and used the json data as a basis for my hierarchy.
null
CC BY-SA 2.5
null
2008-09-03T12:25:19.000
2008-09-03T12:25:19.000
null
null
3,355
null
41,548
2
null
41,525
0
null
The Windows versions typically use the same base source code as the "regular", Unix-based versions. There may be sections of the code that are specific to Windows, just as there are sections specific to certain flavours of Unix. In general, though, the Windows versions of these packages will behave identically to the U...
null
CC BY-SA 2.5
null
2008-09-03T12:23:25.540
2008-09-03T12:23:25.540
null
null
107
null
41,551
2
null
41,407
0
null
You might find it a lot easier to parse the file with a proper parser generator - ANTLR can generate one in C#... Context Free parsers only seem hard until you "get" them - after that, they are much simpler and friendlier to use than Regular Expressions...
null
CC BY-SA 2.5
null
2008-09-03T12:26:07.703
2008-09-03T12:26:07.703
null
null
2,260
null
41,549
2
null
41,525
2
null
I use [GNU emacs built for Windows](http://ftp.gnu.org/pub/gnu/emacs/windows/), and have found very few, if any, differences. There's the option to load your .emacs file from _emacs or .emacs (although .emacs works fine on XP and above). You can configure it to use Windows-style or Unix-style line endings by default (w...
null
CC BY-SA 2.5
null
2008-09-03T12:24:40.793
2008-09-03T12:24:40.793
null
null
1,199
null
41,538
2
null
21,593
44
null
The `<file>` include tells the preprocessor to search in `-I` directories and in predefined directories , then in the .c file's directory. The `"file"` include tells the preprocessor to search the source file's directory , and then revert to `-I` and predefined. All destinations are searched anyway, only the order of s...
null
CC BY-SA 3.0
null
2008-09-03T12:17:00.173
2014-12-28T18:25:27.993
2014-12-28T18:25:27.993
null
null
null
41,543
2
null
41,089
0
null
Do you have access to the OCX code? You shouldn't really be directly invoking the click of a button. You should refactor the code so that the OCX button click code calls a function, e.g. ``` CMyWindow::OnLButtonDown() { this->FooBar(); } ``` Then from your VB6 app, directly call the FooBar method. If you can't dir...
null
CC BY-SA 3.0
null
2008-09-03T12:20:24.703
2017-08-20T23:07:21.153
2017-08-20T23:07:21.153
3,641,067
986
null
41,558
2
null
41,547
20
null
In a more general sense of not having to explicitly set variables in each view, it sounds like you want to look at writing your own [context processor](http://docs.djangoproject.com/en/dev/ref/templates/api/#writing-your-own-context-processors). From the docs: > A context processor has a very simple interface: It's j...
null
CC BY-SA 2.5
null
2008-09-03T12:31:58.703
2008-09-03T12:31:58.703
null
null
2,696
null
41,560
2
null
41,547
2
null
@Dave To use {{user.username}} in my templates, I will then have to use requestcontext rather than just a normal map/hash: [http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext](http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext) ...
null
CC BY-SA 2.5
null
2008-09-03T12:33:31.583
2008-09-03T12:33:31.583
null
null
3,355
null
41,562
1
41,574
null
9
537
I've had to do some introspection in python and it wasn't pretty: ``` name = sys._getframe(1).f_code name = "%s:%d %s()" %(os.path.split(name.co_filename)[1],name.co_firstlineno,name.co_name) ``` To get something like ``` foo.py:22 bar() blah blah ``` In our debugging output. I'd ideally like to prepend anything...
How do I do monkeypatching in python?
CC BY-SA 3.0
0
2008-09-03T12:35:45.683
2015-04-16T05:10:13.843
2015-04-16T05:10:13.843
707,364
4,319
[ "python", "monkeypatching" ]
41,547
1
41,558
null
36
31,225
I am working on a small intranet site for a small company, where user should be able to post. I have imagined a very simple authentication mechanism where people just enter their email address, and gets sent a unique login url, that sets a cookie that will always identify them for future requests. In my template setup...
Always including the user in the django template context
CC BY-SA 2.5
0
2008-09-03T12:22:44.043
2019-11-03T19:10:54.303
null
null
3,355
[ "python", "django", "authentication", "session", "cookies" ]
41,567
2
null
41,405
3
null
We use branching in source control; everyone uses the head branch until they make a release. When they branch the release, they'll branch the common utilities project as well. Additionally, our utilities project has its own unit tests. That way, other teams can know if they would break the build for other teams. Of...
null
CC BY-SA 2.5
null
2008-09-03T12:39:44.067
2008-09-03T12:39:44.067
null
null
1,206
null
41,563
2
null
40,302
1
null
@Joel (re: complex queries, joins, etc) The NHibernate and Castle ActiveRecord tool can handle very complex queries and joins via class relationships and a thorough 'Expression' class (which you can add to the query methods) or the use of the 'Hibernate Query Language' (HQL). You can Google any of these details, chec...
null
CC BY-SA 2.5
null
2008-09-03T12:36:16.367
2008-09-03T12:36:16.367
null
null
3,619
null
41,566
2
null
40,689
9
null
[Matt Cutts](http://www.mattcutts.com/blog/common-google-chrome-objections/) (the Google SEO guru) has a Q&A about chrome, and writes about it: >
null
CC BY-SA 2.5
null
2008-09-03T12:38:11.963
2008-09-03T12:38:11.963
null
null
2,757
null
41,555
2
null
41,547
2
null
If you can hook your authentication into the [Django authentication scheme](http://www.djangoproject.com/documentation/authentication/#authentication-in-web-requests) you'll be able to use `request.user`. I think this should just be a case of calling `authenticate()` and `login()` based on the contents of your Cookie....
null
CC BY-SA 2.5
null
2008-09-03T12:28:34.810
2008-09-03T12:46:08.963
2008-09-03T12:46:08.963
3,171
3,171
null
41,574
2
null
41,562
3
null
A print statement does its IO through "sys.stdout.write" so you can override sys.stdout if you want to manipulate the print stream.
null
CC BY-SA 2.5
null
2008-09-03T12:42:43.950
2008-09-03T12:42:43.950
null
null
533
null
41,577
2
null
41,561
2
null
Read up at [6.1 Namespace Scoping](http://www.w3.org/TR/REC-xml-names/#scoping) and [6.2 Namespace Defaulting](http://www.w3.org/TR/REC-xml-names/#defaulting) on w3c. Basically: > The scope of a namespace declaration declaring a prefix extends from the beginning of the start-tag in which it appears to the end of the ...
null
CC BY-SA 2.5
null
2008-09-03T12:43:53.383
2008-09-03T12:43:53.383
null
null
3,355
null
41,561
1
null
null
48
33,437
I'm trying to understand how namespaces work in XML. When I have an element like foo:bar, the attributes will often not have namespaces on them. But sometimes they will. Are the attribute in the namespace of the element, even when the default namespace has been declared? Looking over the xsd for xhtml it seems the attr...
XML namespaces and attributes
CC BY-SA 2.5
0
2008-09-03T12:34:44.467
2008-10-24T23:19:22.117
null
null
4,315
[ "xml", "xsd", "namespaces" ]
41,514
2
null
41,479
167
null
I use `var` extensively. There has been criticism that this diminishes the readability of the code, but no argument to support that claim. Admittedly, it may mean that it's not clear what type we are dealing with. So what? This is actually the point of a decoupled design. When dealing with interfaces, you are emphatic...
null
CC BY-SA 2.5
null
2008-09-03T12:01:01.087
2008-09-03T12:01:01.087
null
null
1,968
null
41,578
2
null
41,568
-2
null
Your idea should work fine. Basically you just want to spawn a bunch of threads, and make sure the ones writing the file take long enough to do it to actually make the readers wait. If all of your threads return without error, and without blocking forever, then the test succeeds.
null
CC BY-SA 2.5
null
2008-09-03T12:45:55.923
2008-09-03T12:45:55.923
null
null
1,219
null
41,589
2
null
41,568
20
null
In .NET, `ThreadPool` threads won't return without setting up `ManualResetEvent`s or `AutoResetEvent`s. I find these overkill for a quick test method (not to mention kind of complicated to create, set, and manage). Background worker is a also a bit complex with the callbacks and such. Something I have found that works...
null
CC BY-SA 3.0
null
2008-09-03T12:52:52.613
2014-09-03T03:00:29.080
2014-09-03T03:00:29.080
54,026
3,619
null
41,583
1
41,591
null
4
3,588
I am about to write an audio file converter for my side job at the university. As part of this I would need sample rate conversion. However, my professor said that it would be pretty hard to write a sample rate converter that was of good quality fast. On my research on the subject, I found some functions in the OSX ...
How to do a sample rate conversion in Windows (and OSX)
CC BY-SA 2.5
0
2008-09-03T12:48:42.203
2012-06-09T00:30:49.463
null
null
1,034
[ "c++", "windows", "macos", "audio" ]
41,590
1
41,598
null
240
199,343
I come from a Java background, where packages are used, not namespaces. I'm used to putting classes that work together to form a complete object into packages, and then reusing them later from that package. But now I'm working in C++. How do you use namespaces in C++? Do you create a single namespace for the entire ap...
How do you properly use namespaces in C++?
CC BY-SA 2.5
0
2008-09-03T12:54:06.637
2021-03-22T10:23:08.403
2014-05-23T10:11:39.347
1,271,598
1,585
[ "c++", "namespaces" ]
41,591
2
null
41,583
5
null
Try Secret Rabbit Code (= SRC = Sample Rate Conversion ) It's GPL, it's fast and it's high quality. [http://www.mega-nerd.com/SRC/license.html](http://www.mega-nerd.com/SRC/license.html)
null
CC BY-SA 2.5
null
2008-09-03T12:54:16.417
2008-09-03T12:54:16.417
null
null
3,320
null
41,571
2
null
41,513
2
null
To expand on what Mendelt Siebenga suggested, I would also add a `web` directory (for JSP files, WEB-INF, web.xml, etc). Tests should go in a folder named `test` that is a sibling of the main `src` folder - this way your unit test classes can have the same package name as the source code being tested (to ease with si...
null
CC BY-SA 2.5
null
2008-09-03T12:41:22.190
2008-09-03T12:41:22.190
null
null
4,249
null
41,592
2
null
38,090
0
null
To offer one option to my own question. There are [temp tables](http://www.postgresql.org/docs/8.3/interactive/sql-createtable.html) - "temporary tables are automatically dropped at the end of a session, or optionally at the end of the current transaction (see ON COMMIT below)" - which I think don't generate WALs. Even...
null
CC BY-SA 2.5
null
2008-09-03T12:54:39.177
2008-09-03T12:54:39.177
null
null
4,045
null
41,579
2
null
40,962
0
null
I agree with davidg; you can add a reference to the parent form to the child form's constructor, and then close the parent form as you need: ``` private Form pForm; public ChildForm(ref Form parentForm) { pForm = parentForm; } private closeParent() { if (this.pForm != null) this.pForm.Close(); thi...
null
CC BY-SA 2.5
null
2008-09-03T12:46:46.950
2008-09-03T12:46:46.950
null
null
1,206
null
41,594
1
41,985
null
2
4,032
I have a table in an access table which contains Product entries, one of the columns has a jpg image stored as an OLE Object. I am trying to import this table to MySQL but nothing seems to work. I have tried the MySQL migration tool but that has a known issue with Access and OLE Objects. (The issue being it doesnt ...
Import OLE Object from Access to MySQL
CC BY-SA 2.5
0
2008-09-03T12:55:25.743
2012-04-07T23:24:42.537
null
null
2,720
[ "mysql", "ms-access", "import", "data-transfer" ]
41,600
2
null
39,712
8
null
[StyleCop](http://stylecop.codeplex.com/), originally called ["Source Analysis"](http://code.msdn.microsoft.com/sourceanalysis) is the best choice for C#. The first version was rather inflexible, but after recognizing the value that it provides for the community, Microsoft has opened it up to extensions and customizat...
null
CC BY-SA 3.0
null
2008-09-03T12:57:18.173
2013-05-15T09:59:35.307
2013-05-15T09:59:35.307
588,916
308
null
41,604
2
null
41,590
3
null
I prefer using a top-level namespace for the application and sub namespaces for the components. The way you can use classes from other namespaces is surprisingly very similar to the way in java. You can either use "use NAMESPACE" which is similar to an "import PACKAGE" statement, e.g. use std. Or you specify the packa...
null
CC BY-SA 2.5
null
2008-09-03T13:00:50.457
2008-09-03T13:00:50.457
null
null
4,194
null
41,603
2
null
41,590
3
null
Generally speaking, I create a namespace for a body of code if I believe there might possibly be function or type name conflicts with other libraries. It also helps to brand code, ala [boost::](http://www.boost.org/) .
null
CC BY-SA 2.5
null
2008-09-03T13:00:19.070
2008-09-03T13:00:19.070
null
null
4,069
null
41,607
2
null
41,601
19
null
There are GUI testing tools that will click buttons and stuff for you but they're pretty fragile in my experience. The best thing to do is to keep your UI layer as thin as possible. Your event handler classes should optimally be only one or two lines that call out to other more testable classes. That way you can tes...
null
CC BY-SA 2.5
null
2008-09-03T13:02:12.793
2008-09-03T13:02:12.793
null
null
4,223
null
41,608
2
null
41,601
0
null
I can't really help with organization or best practices, but an [NUnit](http://www.nunit.org/index.php) extension appears to be available for forms testing, [NUnitForms](http://www.google.com/search?q=nunitforms).
null
CC BY-SA 2.5
null
2008-09-03T13:02:43.293
2008-09-03T13:02:43.293
null
null
3,619
null
41,611
2
null
39,053
1
null
@Michael Well, java.sql.Connection is an Interface - it might technically be possible for the concrete implementation you're getting from JBoss to be Serializable - but I don't think you're really going to have any options you can use. If it was possible, it would probably be easy :) I think @toolkit might have said t...
null
CC BY-SA 2.5
null
2008-09-03T13:03:38.690
2008-09-03T13:03:38.690
null
null
2,362
null
41,613
2
null
41,424
2
null
If you have industry specific translations, you will likely need a thesaurus. For example, I worked in the jewelry industry and there were abbreviate in our descriptions such as kt - karat, rd - round, cwt - carat weight... Endeca (the search engine at that job) has a thesaurus that will translate from common misspell...
null
CC BY-SA 2.5
null
2008-09-03T13:04:31.730
2008-09-03T13:04:31.730
null
null
2,017
null
41,614
2
null
41,601
1
null
The following book is an introduction to the subject. There are as many ways as there are developers out there.. [http://pragprog.com/titles/idgtr/scripted-gui-testing-with-ruby](http://pragprog.com/titles/idgtr/scripted-gui-testing-with-ruby)
null
CC BY-SA 2.5
null
2008-09-03T13:04:53.397
2008-09-03T13:04:53.397
null
null
4,189
null
41,568
1
41,589
null
23
28,149
this kind of follows on from another [question](https://stackoverflow.com/questions/41290/file-access-strategy-in-a-multi-threaded-environment-web-app) of mine. Basically, once I have the code to access the file (will review the answers there in a minute) what would be the best way to it? I am thinking of creating a m...
Whats the best way to unit test from multiple threads?
CC BY-SA 3.0
0
2008-09-03T12:39:52.630
2021-08-18T06:19:33.640
2020-06-20T09:12:55.060
-1
832
[ "c#", "multithreading", "unit-testing", "testing" ]
41,617
2
null
41,594
1
null
As far as I remember, the Microsoft "[SQL Server Migration Assistant for Access](http://www.microsoft.com/downloads/details.aspx?familyid=D842F8B4-C914-4AC7-B2F3-D25FFF4E24FB&displaylang=en)" will properly migrate OLE Images, but this is only for Access->SQLServer. However, what you can do is use this to migrate to SQL...
null
CC BY-SA 2.5
null
2008-09-03T13:05:52.520
2008-09-03T13:05:52.520
null
null
1,111
null
41,612
2
null
41,492
1
null
I don't use VB, but here it goes. I found [Using the Value of a Control](http://msdn.microsoft.com/en-us/library/aa733705%28VS.60%29.aspx), but it's not a programmatic solution. If you have access to the code, look for ``` Attribute Value.VB_UserMemId = 0 ``` using Notepad.
null
CC BY-SA 2.5
null
2008-09-03T13:03:55.473
2008-09-03T13:03:55.473
null
null
3,827
null
41,598
2
null
41,590
174
null
Namespaces are packages essentially. They can be used like this: ``` namespace MyNamespace { class MyClass { }; } ``` Then in code: ``` MyNamespace::MyClass* pClass = new MyNamespace::MyClass(); ``` Or, if you want to always use a specific namespace, you can do this: ``` using namespace MyNamespace; MyCla...
null
CC BY-SA 4.0
null
2008-09-03T12:57:13.900
2020-01-23T11:09:41.110
2020-01-23T11:09:41.110
1,536,976
986
null
41,542
2
null
41,525
0
null
[GNU Emacs](http://directory.fsf.org/project/emacs/) has long been working natively on Windows as part of the main source, and can be compiled with Visual Studio (you can also find some pre-compiled binaries). As far as I know, there are no significant differences.
null
CC BY-SA 2.5
null
2008-09-03T12:20:11.443
2008-09-03T12:20:11.443
null
null
1,441
null
41,619
2
null
41,568
1
null
@ajmastrean, since unit test result must be predictable we need to synchronize threads somehow. I can't see a simple way to do it without using events. I found that `ThreadPool.QueueUserWorkItem` gives me an easy way to test such use cases ``` ThreadPool.QueueUserWorkItem(x => { File.Open(fileName, FileMode.Open);...
null
CC BY-SA 4.0
null
2008-09-03T13:06:50.863
2021-08-18T06:19:33.640
2021-08-18T06:19:33.640
1,698,987
1,196
null
41,623
2
null
41,492
0
null
> you have access to the code, look for Unfortunetly I don't have access to the code for most of the controls. However the link is useful for the Microsoft Controls, but I still would like a way to know for other controls.
null
CC BY-SA 2.5
null
2008-09-03T13:09:47.707
2008-09-03T13:09:47.707
null
null
1,111
null
41,621
2
null
41,601
6
null
You can automate GUI testing using [White](http://www.codeplex.com/white) framework. Also consider using TDD friendly design, i.e. use [MVP/MVC](http://en.wikipedia.org/wiki/Model-view-controller) pattern. I would highly recommend you to read documentation from Microsoft patterns&practies teams. Especially have a l...
null
CC BY-SA 2.5
null
2008-09-03T13:09:44.570
2008-09-03T13:15:48.720
2008-09-03T13:15:48.720
1,196
1,196
null
41,620
2
null
41,590
6
null
@[marius](https://stackoverflow.com/questions/41590/how-do-you-properly-use-namespaces-in-c#41615) Yes, you can use several namespaces at a time, eg: ``` using namespace boost; using namespace std; shared_ptr<int> p(new int(1)); // shared_ptr belongs to boost cout << "cout belongs to std::" << endl; // c...
null
CC BY-SA 3.0
null
2008-09-03T13:08:02.967
2014-02-21T18:57:38.973
2017-05-23T11:54:50.260
-1
4,069
null
41,624
2
null
41,590
122
null
To avoid saying everything Mark Ingram already said a little tip for using namespaces: Avoid the "using namespace" directive in header files - this opens the namespace for all parts of the program which import this header file. In implementation files (*.cpp) this is normally no big problem - altough I prefer to use t...
null
CC BY-SA 3.0
null
2008-09-03T13:10:02.370
2012-03-11T15:51:48.417
2012-03-11T15:51:48.417
113,124
3,056
null
41,559
2
null
41,290
7
null
Here is the code that I use to make sure a file is not locked by another process. It's not 100% foolproof, but it gets the job done most of the time: ``` /// <summary> /// Blocks until the file is not locked any more. /// </summary> /// <param name="fullPath"></param> bool WaitForFile(string fullPath)...
null
CC BY-SA 2.5
null
2008-09-03T12:33:29.370
2008-09-03T12:33:29.370
null
null
1,219
null
41,618
2
null
41,453
15
null
I would recommend using [Qt](https://www.qt.io/). There is an open-source licence as well as a commercial licence.
null
CC BY-SA 4.0
null
2008-09-03T13:06:38.573
2019-01-01T13:21:45.103
2019-01-01T13:21:45.103
10,488,923
2,796
null
41,632
2
null
35,185
4
null
Kyle's solution would obviously not catch situations were the data set does not follow the rules. If all numbers were in pairs the algorithm would give a result of zero, the exact same value as if zero would be the only value with single occurance. If there were multiple single occurance values or triples, the result ...
null
CC BY-SA 2.5
null
2008-09-03T13:14:19.693
2008-09-03T13:14:19.693
null
4,549,416
4,549,416
null
41,629
2
null
41,498
2
null
Have you tried using [Marshal#load](http://corelib.rubyonrails.org/classes/Marshal.html)? I'm not sure how you're generating those session files, but it's quite possible Rails just uses Marshal.
null
CC BY-SA 2.5
null
2008-09-03T13:12:54.673
2008-09-03T13:12:54.673
null
null
4,272
null
41,635
2
null
41,630
6
null
No, that will just concatenate the output from `ls` and the contents of `directory`. But you can do this: ``` #!/usr/bin/env ruby directory = '/home/paulgreg/' `ls #{directory}` ```
null
CC BY-SA 2.5
null
2008-09-03T13:16:29.330
2008-09-03T13:16:29.330
null
null
4,272
null
41,630
1
41,635
null
2
2,704
I would like to execute an OS command from my ruby script but I want to add an argument from a ruby variable. I know that's possible by using keyword like that : ``` #!/usr/bin/env ruby directory = '/home/paulgreg/' system 'ls ' + directory ``` but is that possible by using the "backquotes or backticks syntax" ? (...
is it possible to concat arguments to a command line using backquotes ?
CC BY-SA 3.0
0
2008-09-03T13:13:06.980
2014-06-04T10:27:02.940
2014-06-04T10:27:02.940
1,584,106
3,122
[ "ruby", "command-line", "command-line-interface" ]
41,576
1
43,255
null
0
1,646
I wonder what the best practice for this scenario is: I have a Sharepoint Site (MOSS2007) with an ASPX Page on it. However, I cannot use any inline source and stuff like Event handlers do not work, because Sharepoint does not allow Server Side Script on ASPX Pages per default. Two solutions: 1. Change the PageParse...
Conditional Display in ASPX Pages on Sharepoint
CC BY-SA 3.0
0
2008-09-03T12:43:50.920
2017-12-13T15:56:55.107
2017-12-13T15:56:55.107
91
91
[ "asp.net", "sharepoint" ]
41,601
1
41,607
null
16
8,255
We are working on a large project with a measure of new/modified GUI functionality. We've found in the past that we often introduced new problems in related code when adding new functionality. We have non-technical users perform testing, but they often miss parts and allow bugs to slip through. Are there any best prac...
User Interface Testing
CC BY-SA 4.0
0
2008-09-03T12:57:25.443
2020-07-27T17:25:14.887
2020-07-27T17:25:14.887
4,685,471
4,392
[ "user-interface", "testing", "integration-testing" ]
41,622
2
null
41,590
12
null
In Java: ``` package somepackage; class SomeClass {} ``` In C++: ``` namespace somenamespace { class SomeClass {} } ``` And using them, Java: ``` import somepackage; ``` And C++: ``` using namespace somenamespace; ``` Also, full names are "somepackge.SomeClass" for Java and "somenamespace::SomeClass" fo...
null
CC BY-SA 2.5
null
2008-09-03T13:09:44.977
2008-09-03T13:09:44.977
null
null
3,355
null
41,640
1
null
null
1
2,666
I am in need of a way to mute a specific application in Vista. Example: Mute just Firefox, but not all of the other application. Much similar to muting a specific program from within the volume mixer in vista. If there is a program that will do this, i would appreciate that. Otherwise if there is a way to do this,...
Mute Specific Application in Vista
CC BY-SA 2.5
null
2008-09-03T13:18:29.073
2015-05-01T16:10:43.077
2008-09-03T13:32:43.453
4,394
4,394
[ "windows-vista", "audio" ]
41,625
2
null
41,424
4
null
I think this depends on how big your website it. On our local Intranet which is used by about 500 member of staff, I simply look at the search phrases that returned zero results and enter that search phrase with the new suggested search phrase into a SQL table. I them call on that table if no search results has been r...
null
CC BY-SA 2.5
null
2008-09-03T13:11:22.867
2008-09-03T13:11:22.867
2017-05-23T12:34:08.677
-1
383
null
41,643
1
41,661
null
4
591
At work we have an application to play 2K (2048*1556px) OpenEXR film sequences. It works well.. apart from when sequences that are over 3GB (quite common), then it has to unload old frames from memory, despite the fact all machines have 8-16GB of memory (which is addressable via the linux BIGMEM stuff). The frames hav...
Store more than 3GB of video-frames in memory, on 32-bit OS
CC BY-SA 2.5
0
2008-09-03T13:19:39.117
2009-02-27T16:48:00.857
null
null
745
[ "linux", "memory", "32-bit" ]
41,634
2
null
41,479
0
null
@Keith - > In your comparison between IEnumerable<int> and IEnumerable<double> you don't need to worry - if you pass the wrong type your code won't compile anyway. That isn't quite true - if a method is overloaded to both IEnumerable<int> and IEnumerable<double> then it may silently pass the unexpected infer...
null
CC BY-SA 2.5
null
2008-09-03T13:16:09.533
2010-10-26T22:57:05.877
2010-10-26T22:57:05.877
80,282
3,394
null
41,642
2
null
41,590
4
null
Note that a namespace in C++ really is just a name space. They don't provide any of the encapsulation that packages do in Java, so you probably won't use them as much.
null
CC BY-SA 2.5
null
2008-09-03T13:19:09.040
2008-09-03T13:19:09.040
null
null
1,175
null
41,637
2
null
41,590
20
null
Also, note that you can add to a namespace. This is clearer with an example, what I mean is that you can have: ``` namespace MyNamespace { double square(double x) { return x * x; } } ``` in a file `square.h`, and ``` namespace MyNamespace { double cube(double x) { return x * x * x; } } ``` in a file `cube...
null
CC BY-SA 3.0
null
2008-09-03T13:17:11.870
2015-07-23T21:24:09.640
2015-07-23T21:24:09.640
717,822
2,638
null
41,653
2
null
41,601
4
null
Keep the GUI layer as thin as possible. Michael Feathers article, [The Humble Dialog Box](http://www.objectmentor.com/resources/articles/TheHumbleDialogBox.pdf), is a classic. Also check out Martin Fowler's [Passive View](http://martinfowler.com/eaaDev/PassiveScreen.html). I have also heard that the "automatic button c...
null
CC BY-SA 2.5
null
2008-09-03T13:24:56.983
2008-09-03T13:24:56.983
null
null
3,114
null
41,655
2
null
41,647
0
null
I see `hello, world` on the page you linked to. No problems that I can see... I'm using Firefox 3.0.1 and Windows XP. What browser/OS are you running? Perhaps that might be the problem.
null
CC BY-SA 2.5
null
2008-09-03T13:25:13.910
2008-09-03T13:30:28.873
2008-09-03T13:30:28.873
572
572
null
41,645
2
null
41,640
2
null
I suggest using the built in Mixer in Vista... Why do you want to use an 3rd party program?
null
CC BY-SA 2.5
null
2008-09-03T13:20:44.060
2008-09-03T13:20:44.060
null
null
383
null
41,657
2
null
41,654
0
null
Have you considered [GDI](http://www.codeproject.com/KB/GDI-plus/cgdiplusbitmap.aspx)? -- Kevin Fairchild
null
CC BY-SA 2.5
null
2008-09-03T13:26:30.083
2008-09-03T13:26:30.083
null
null
3,743
null
41,638
1
null
null
13
3,265
The current system that I am working on makes use of Castle Activerecord to provide ORM (Object Relational Mapping) between the Domain objects and the database. This is all well and good and at most times actually works well! The problem comes about with Castle Activerecords support for asynchronous execution, well, m...
Suggestions on how to map from Domain (ORM) objects to Data Transfer Objects (DTO)
CC BY-SA 2.5
0
2008-09-03T13:17:59.200
2010-06-15T08:50:09.913
2008-09-04T07:04:53.067
231
231
[ "c#", "orm", "castle-activerecord", "dto-mapping" ]
41,654
1
41,668
null
9
3,663
Do you know any open source/free software C++ libraries to manipulate images in these formats: .jpg .gif .png .bmp ? The more formats it supports, the better. I am implementing a free program in C++ which hides a text file into one or more images, using [steganography](http://en.wikipedia.org/wiki/Steganography). I am...
C++ libraries to manipulate images
CC BY-SA 3.0
0
2008-09-03T13:25:01.383
2016-03-04T15:52:09.237
2016-03-04T15:52:09.237
996,815
1,876
[ "c++", "image", "steganography" ]
41,661
2
null
41,643
2
null
How about creating a RAM drive and loading the file into that ... assuming the RAM drive supports the BIGMEM stuff for you. You could use multiple processes: each process loads a view of the file as a shared memory segment, and the player process then maps the segments in turn as needed.
null
CC BY-SA 2.5
null
2008-09-03T13:27:57.913
2008-09-03T13:27:57.913
null
null
3,631
null
41,647
1
41,691
null
5
2,971
When using the php include function the include is succesfully executed, but it is also outputting a char before the output of the include is outputted, the char is of hex value 3F and I have no idea where it is coming from, although it seems to happen with every include. At first I thbought it was file encoding, but...
PHP Include function outputting unknown char
CC BY-SA 2.5
0
2008-09-03T13:23:43.320
2015-08-20T22:25:22.137
2008-09-03T13:54:22.357
1,111
1,111
[ "php", "encoding", "byte-order-mark" ]
41,662
2
null
41,654
0
null
[FreeImage](http://freeimage.sourceforge.net/) is pretty solid. It has a C interface but is more C++-like in its implementation.
null
CC BY-SA 2.5
null
2008-09-03T13:29:24.650
2008-09-03T13:29:24.650
null
null
2,666
null
41,665
1
41,684
null
56
96,750
Is there any way to convert a bmp image to jpg/png without losing the quality in C#? Using Image class we can convert bmp to jpg but the quality of output image is very poor. Can we gain the quality level as good as an image converted to jpg using photoshop with highest quality?
Bmp to jpg/png in C#
CC BY-SA 2.5
0
2008-09-03T13:29:58.250
2015-08-23T11:29:40.150
2008-09-04T06:33:30.710
191
191
[ "c#", "image-manipulation" ]
41,664
2
null
41,652
13
null
After validation is successful, you need to sign in the user, by calling FormsAuthentication.Authenticate: [http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.authenticate.aspx](http://msdn.microsoft.com/en-us/library/system.web.security.formsauthentication.authenticate.aspx) EDIT: It is F...
null
CC BY-SA 2.5
null
2008-09-03T13:29:53.367
2008-09-03T13:29:53.367
null
null
2,972
null
41,660
2
null
15,995
11
null
The usage of `reduce` that I found in my code involved the situation where I had some class structure for logic expression and I needed to convert a list of these expression objects to a conjunction of the expressions. I already had a function `make_and` to create a conjunction given two expressions, so I wrote `reduce...
null
CC BY-SA 2.5
null
2008-09-03T13:27:47.477
2008-09-03T13:27:47.477
null
null
4,285
null
41,667
2
null
41,647
0
null
Character 3F actually the question mark, it isn't just displaying as one. I get the same results as Thomas, no question mark showing up. In theory it could be some problem with a web proxy but I am inclined to suspect a stray question mark in your PHP markup...which perhaps you have fixed by now so we don't see the ...
null
CC BY-SA 2.5
null
2008-09-03T13:30:26.813
2008-09-03T13:30:26.813
null
null
3,267
null
41,674
1
null
null
7
8,593
In Visual Studio you can create a template XML document from an existing schema. The new [XML Schema Explorer](http://msdn.microsoft.com/en-us/library/cc716766.aspx) in VS2008 SP1 takes this a stage further and can create a sample XML document complete with data. Is there a class library in .NET to do this automaticall...
Is there a class to generate a sample XML document from XSD schema in .NET
CC BY-SA 2.5
0
2008-09-03T13:34:26.133
2012-03-03T06:51:30.877
2008-09-03T14:05:38.133
3,873
3,873
[ ".net", "xml", "xsd" ]
41,676
1
41,710
null
6
5,289
Is there a way of getting the process id of my C++ application? I am using the Carbon framework, but not Cocoa…
Is there a way of getting the process id of my C++ application?
CC BY-SA 3.0
null
2008-09-03T13:35:30.717
2018-12-28T16:27:19.590
2013-12-02T13:30:01.003
2,432,317
259
[ "c++", "macos", "macos-carbon" ]
41,668
2
null
41,654
7
null
[ImageMagick](http://www.imagemagick.org/) can manipulate about anything and has interfaces for a [dozen of languages](http://www.imagemagick.org/script/api.php), including the [Magick++](http://www.imagemagick.org/Magick++/) API for C++.
null
CC BY-SA 2.5
null
2008-09-03T13:31:00.963
2008-09-03T13:31:00.963
null
null
1,830
null
41,652
1
41,664
null
8
13,231
We have got a custom `MembershipProvider` in `ASP.NET`. Now there are 2 possible scenario the user can be validated: 1. User login via login.aspx page by entering his username/password. I have used Login control and linked it with the MyMembershipProvider. This is working perfectly fine. 2. An authentication token is...
Using Custom MembershipProvider without a Login control in ASP.NET
CC BY-SA 3.0
0
2008-09-03T13:24:56.187
2017-04-19T07:12:39.523
2017-04-19T07:09:33.243
3,641,067
191
[ "asp.net", "authentication" ]
41,682
2
null
41,590
2
null
I've used C++ namespaces the same way I do in C#, Perl, etc. It's just a semantic separation of symbols between standard library stuff, third party stuff, and my own code. I would place my own app in one namespace, then a reusable library component in another namespace for separation.
null
CC BY-SA 2.5
null
2008-09-03T13:38:25.593
2008-09-03T13:38:25.593
null
null
3,347
null
41,678
2
null
41,647
1
null
It doesn't show up on the rendered page in Firefox or IE but you can see the funny character when you View Source in IE ![enter image description here](https://i.stack.imgur.com/cyPAq.png) Is this on a Linux machine? Could you do find & replace with vim or sed to see if you can get rid of the 3F that way? If it's...
null
CC BY-SA 3.0
null
2008-09-03T13:36:34.523
2012-04-02T08:32:25.723
2012-04-02T08:32:25.723
1,219,121
305
null
41,677
2
null
41,665
1
null
Fundamentally you won't be able to keep the same quality because jpg is (so far as I'm aware) always lossy even with the highest possible quality settings. If bit-accurate quality is really important, consider using png, which has some modes which are lossless.
null
CC BY-SA 2.5
null
2008-09-03T13:36:10.700
2008-09-03T13:36:10.700
null
null
3,198
null
41,673
2
null
41,654
0
null
I like [vxl](http://vxl.sourceforge.net/) > VXL (the Vision-something-Libraries) is a collection of C++ libraries designed for computer vision research and implementation. It was created from TargetJr and the IUE with the aim of making a light, fast and consistent system. VXL is written in ANSI/ISO C++ and is designed...
null
CC BY-SA 3.0
null
2008-09-03T13:33:57.040
2012-08-31T17:52:21.597
2012-08-31T17:52:21.597
317,266
3,051
null
41,672
2
null
41,665
0
null
You can try: ``` Bitmap.InterpolationMode = InterpolationMode.HighQualityBicubic; ``` and ``` Bitmap.CompositingQuality = CompositingQuality.HighQuality; ``` Which does keep the quality fairly high, but not the highest possible.
null
CC BY-SA 2.5
null
2008-09-03T13:33:47.273
2008-09-03T13:33:47.273
null
null
383
null
41,685
2
null
41,654
2
null
@lurks: I assume that you are looking for LSB shifting? I did some stego work a couple of years ago, and that's how it appeared most apps worked. It appears that ImageMagick (suggested by others) allows you to identify and manipulate the LSBs.
null
CC BY-SA 2.5
null
2008-09-03T13:40:48.443
2008-09-03T13:40:48.443
null
null
572
null
41,659
1
41,814
null
4
5,202
Is there any way in the Servlet API to access properties specified in web.xml (such as initialization parameters) from within a Bean or Factory class that is not associated at all with the web container? For example, I'm writing a Factory class, and I'd like to include some logic within the Factory to check a hierarch...
Is there a way to access web.xml properties from a Java Bean?
CC BY-SA 3.0
null
2008-09-03T13:26:55.327
2016-11-28T08:42:43.707
2016-11-28T08:42:43.707
157,882
4,249
[ "java", "servlets" ]
41,687
2
null
41,647
3
null
Your web server (or your text editor) apparently includes a [BOM](http://en.wikipedia.org/wiki/Byte_order_mark) into the document. I don't see the rogue character in my browser except when I set the site's encoding explicitly to Latin-1. Then, I see two (!) UTF-8 BOMs. /EDIT: From the fact that there are BOMs I concl...
null
CC BY-SA 2.5
null
2008-09-03T13:41:38.363
2008-09-03T13:41:38.363
null
null
1,968
null
41,684
2
null
41,665
58
null
``` var qualityEncoder = Encoder.Quality; var quality = (long)<desired quality>; var ratio = new EncoderParameter(qualityEncoder, quality ); var codecParams = new EncoderParameters(1); codecParams.Param[0] = ratio; var jpegCodecInfo = <one of the codec infos from ImageCodecInfo.GetImageEncoders() with mime type = "imag...
null
CC BY-SA 2.5
null
2008-09-03T13:39:51.830
2008-09-03T13:39:51.830
null
null
1,196
null
41,695
2
null
41,479
2
null
After just converting over to the 3.0 and 3.5 frameworks I learned about this keyword and decided to give it a whirl. Before committing any code I had the realization that it seemed backwards, as in going back toward an ASP syntax. So I decided to poke the higher ups to see what they thought. They said go ahead so I ...
null
CC BY-SA 2.5
null
2008-09-03T13:46:04.843
2008-09-03T13:46:04.843
null
null
36
null
41,694
2
null
41,686
0
null
Are you sure that the image isn't coming through garbled or that you aren't dropping some packets on the way in.
null
CC BY-SA 2.5
null
2008-09-03T13:45:49.883
2008-09-03T13:45:49.883
null
null
17
null
41,697
2
null
40,622
0
null
I've been using FlexBuilder for awhile now and just started to switch to using Eclipse with Flex SDK. I work for a non-profit so the word FREE is huge. Initially, it is fairly intimidating so if you have the money, you might want FlexBuilder. There is a lot you need to know and do if you use the SDK. The learning a...
null
CC BY-SA 2.5
null
2008-09-03T13:46:31.627
2008-09-03T13:46:31.627
null
null
4,393
null
41,699
1
null
null
8
3,128
So creating a Windows service using Visual Studio is fairly trivial. My question goes a bit deeper as to what actually makes an executable installable as a service & how to write a service as a straight C application. I couldn't find a lot of references on this, but I'm presuming there has to be some interface I can ...
Creating Windows service without Visual Studio
CC BY-SA 2.5
0
2008-09-03T13:47:03.297
2012-12-24T16:31:00.033
2008-09-03T21:33:24.330
2,600
634
[ "c", "windows", "visual-studio", "windows-services" ]
41,693
2
null
41,647
0
null
> I'd also be curious to see what happens if you copy the code out of the include and just run it by itself. Mark: this is on a shared hosting solution, so I can not get shell access to the file. However, as you can see [here](http://driveefficiently.com/include.inc), there are no characters that shouldn't be ther...
null
CC BY-SA 2.5
null
2008-09-03T13:45:42.283
2008-09-03T13:45:42.283
null
null
1,111
null
41,706
2
null
41,699
1
null
Hope this helps: [http://support.microsoft.com/kb/251192](http://support.microsoft.com/kb/251192) It would seem that you simple need to run this exe against a binary executable to register it as a service.
null
CC BY-SA 2.5
null
2008-09-03T13:49:57.390
2008-09-03T13:49:57.390
2020-06-20T09:12:55.060
-1
17
null
41,702
2
null
41,692
6
null
This is a common layout problem in IE. If you are using CSS to style the columns width, also add the column widths to the td tags. Set the first column to a percentage that will try to suck up most of the space, like 50% or something. The first column width will take everything that it can and the other columns will...
null
CC BY-SA 2.5
null
2008-09-03T13:48:41.420
2008-09-03T13:48:41.420
null
null
17
null
41,691
2
null
41,647
11
null
What you are seeing is a UTF-8 Byte Order Mark: > The UTF-8 representation of the BOM is the byte sequence EF BB BF, which appears as the ISO-8859-1 characters  in most text editors and web browsers not prepared to handle UTF-8.[Byte Order Mark on Wikipedia](http://en.wikipedia.org/wiki/Byte_Order_Mark) PHP does not...
null
CC BY-SA 2.5
null
2008-09-03T13:44:59.447
2008-09-03T13:44:59.447
2020-06-20T09:12:55.060
-1
914
null
41,686
1
42,202
null
4
698
I've got some Java code using a servlet and Apache Commons FileUpload to upload a file to a set directory. It's working fine for character data (e.g. text files) but image files are coming out garbled. I can open them but the image doesn't look like it should. Here's my code: Servlet ``` protected void doPost(HttpS...
Why is my image coming out garbled?
CC BY-SA 2.5
null
2008-09-03T13:41:07.430
2012-05-18T15:45:03.990
2012-05-18T15:45:03.990
21,234
1,900
[ "java", "file-io", "apache-commons-fileupload" ]