instruction stringlengths 0 30k ⌀ |
|---|
Are you counting the allocs and frees by interpolating your own syscall functions which record the calls and then pass the call to the real function?
This is the only way you can keep track of calls originating from code that you haven't written.
cheers,
Rob |
Are you counting the allocs and frees by interpolating your own syscall functions which record the calls and then pass the call to the real function?
This is the only way you can keep track of calls originating from code that you haven't written.
Have a look at the man page for ld.so. Or ld.so.1 on some systems.... |
Is there a limit with the number of SSL connections? |
|ssl| |
Is there a limit with the number of SSL connections? |
I keep going on about it, but there's no way I can recommend [regexr][1] too often. It's fantastic for testing this type of things.
[1]: http://www.gskinner.com/RegExr/ |
At the risk of being an 'architecture astronaut' here, I would be more inclined to go with separate tables for the subclasses. Have the primary key of the subclass tables also be a foreign key linking back to the supertype.
The main reason for doing it this way is that it then becomes much more logically consistent ... |
Visual Studio Add-in not going away |
|visual-studio|software-tools| |
Ok, so I demo'd Refactor Pro and Resharper, I'm more comfortable with Resharper so that's what I bought. When I uninstalled Refactor Pro I thought everything was breezy. However, now when I open Visual Studio I get
The Add-in 'DevExpress Tools' failed to load or caused and exception, woudl you like to remove this... |
Can you re-factor in parallel? What I mean is re-write the pieces you want to refactor using TDD, but leave the existing code base in place. Then phase out the existing code when your new tests meet the needs for your PM? |
Sorry to be pedantic, but the title should really be "Which RDBMS?" - the way it's phrased makes about as much sense as "Which Java?" |
Sorry to be pedantic, but the title should really be "Which RDBMS?" - the way it's phrased makes about as much sense as "Which Java?" or "[Which Internet?][1]"...
[1]: http://thedailywtf.com/Articles/Which-Internet.aspx |
In my experience this is so easy that the whining takes more time than the doing. There are very few things in 1.6 that can't be backported with a minute or so (literally) worth of work. How many compile errors are you seeing when you try it with 1.5, and what for?
Keep in mind that there are readily available, AP... |
string.Replace is fine. I'd prefer using a Regex, but I'm *** for regular expressions.
The thing to keep in mind is how big these templates are. If its real big, and memory is an issue, you might want to create a custom tokenizer that acts on a stream. That way you only hold a small part of the file in memory w... |
If you really just want to jump in with both feet, I would suggest looking at ColdFusion from Adobe. The developer edition is free and runs on windows, os x and linux. The documentation is authoritative and extensive, there is a very active developer community and only a few books you might want to dig into. The def... |
If you are doing multiple replaces on large strings then it might be better to use StringBuilder.Replace(), as the usual performance issues with strings will appear. |
Offline forms |
|forms|offline| |
Anyone doing any work using "offline" forms? We have an application that requires inputting data from outside our company. I was thinking about sending a form out via email, allowing the form to be filled out then sent back. Obviously a web application would be the best solution, but management doesn't seem ready to... |
I am part of a high school robotics team, and there is some debate about which language to use to program our robot. We are choosing between C (or maybe C++) and LabVIEW. There are pros for each language.
C(++):
- Widely used
- Good preparation for the future (most programming positions require text-based ... |
I am part of a high school robotics team, and there is some debate about which language to use to program our robot. We are choosing between C (or maybe C++) and LabVIEW. There are pros for each language.
C(++):
- Widely used
- Good preparation for the future (most programming positions require text-based ... |
I use [Ninject][1]. I like the fact that I don't have to use Xml to configure the dependencies. I can just use straight up C# code. There are [multiple ways][2] of doing it also. I know other libraries have that feature, but Ninject offers fast instantiation, it is pretty lightweight, it has conditional binding, su... |
I was trying to leave it somewhat open because the number of possibilities is staggering. I believe this one of those questions that could not be answered 100% here without going through a lot of technical detail about is considered a "good" or "bad" range. I'm just trying to find a jumping point for ideas on how oth... |
Is there some way to compile a .NET application to native code? |
|.net|compilation| |
What if I want to run a .NET application in a machine where the .NET framework is not available? Is there some way to compile the application to native code? |
I'm using Entourage, so this may not match up exactly with the behavior you're seeing, but I hope it helps.
Using the iCalendar from your reply, Entourage wouldn't even import the data. Using a known-good file, I got it to import, then successfully update. Comparing the two files, the only structural differences are... |
Thanks Konrad, that's a good response (+1), but just to expand on it.
Let's pretend that C# has an explicit constructor function:
//your example
var x = new Foo( 1 );
//becomes
var x = Foo.ctor( 1 );
//your problem is valid because this would be
var x = Foo<T>.ctor<int>( 1 );
... |
Why doesn't C# support implied generic types on class constructors? |
|c#|.net|generics| |
C# doesn't require you to specify a generic type parameter if the compiler can infer it, for instance:
List<int> myInts = new List<int> {0,1,1,
2,3,5,8,13,21,34,55,89,144,233,377,
610,987,1597,2584,4181,6765};
//this statement is clunky
List<string> myStrings = myInts.
Sele... |
Easiest way, as I see it, is to use a for loop that calls a second batch file for processing, passing that second file the base name.
According to the for /? help, basename can be extracted using the nifty ~n option. So, the base script would read:
for %%f in (*.in) do call process.cmd %%~nf
Then, in proce... |
XML dataset in Crystal Reports |
|xml|crystal-reports|infopath| |
I am trying to print a report from within an InfoPath template. So my dataset is an XML DOM that I will load into the Crystal Report at runtime.
But how do I define the dataset off which the Crystal Report is developed?
Crystal Reports has a great tool to build a dataset from an SQL database. Is there something sim... |
Not sure what your level of expertise is, but here are the basics.
Below is a linker error from VS 2005 - yes, it's a giant mess if you're not familiar with it.
ByteComparator.obj : error LNK2019: unresolved external symbol "int __cdecl does_not_exist(void)" (?does_not_exist@@YAHXZ) referenced in function "v... |
C# String output: format or concat? |
Is there an easy way to do transparent forms in a VB .NET app? |
|vb.net|transparency| |
I'm writing a simple app that's going to have a tiny form sitting in one corner of the screen, updating itself.
I'd really love for that form to be transparent and to have the transparency be user-configurable.
Is there any easy way to achieve this? |
Yes, typically Dispose is one of the places you want to ensure exceptions aren't thrown. However, based on this MSDN [forum thread][1] there were some historical reasons for this behavior. As such, the recommended pattern is the try{Close}/catch{Abort} paradigm.
[1]: http://forums.microsoft.com/MSDN/ShowPost.asp... |
This website lists some common techniques:
http://dev.mysql.com/tech-resources/articles/hierarchical-data.html
I'd do the "nested set" model, but have multiple roots (e.g. each "topic" is a new tree). It's very fast, simple to query, but complicated to maintain... |
WYSIWYG editor gem for Rails? |
|ruby|ruby-on-rails|rubygems|webdevelopment| |
Is there a good ruby gem for a WYSIWYG editor that will easily work with a rails app? |
|ruby|ruby-on-rails|rubygems| |
|ruby|ruby-on-rails|rubygems|webdevelopment| |
|ruby|ruby-on-rails|rubygems| |
Beginner Digital Synth |
|synthesizer| |
I'm looking into writing a audio syntesizer in Java, and was wondering if anybody has any advice or good resources for writing such a program. I'm looking for info on generating raw sound waves, how to output them into a usable form (playing over speakers), as well as general theory on the topic. Thanks guys. |
You could use [CruiseControl.Net](http://confluence.public.thoughtworks.org/display/CCNET/Welcome+to+CruiseControl.NET), which can do a build on every check in, nightly builds, or however you want to do it. A quick google search suggests CC.Net has some [integration with NAnt](http://ccnet.sourceforge.net/CCNET/NAnt%2... |
There's also [Draco.NET][1], which was inspired by CruiseControl.NET and is a little more lightweight. See this [article][2] for more information on both continuous integration solutions.
[1]: http://draconet.sourceforge.net/
[2]: http://www.theserverside.net/tt/articles/showarticle.tss?id=ContinuousIntegration |
Add service reference to Amazon service fails |
|web-services|amazon| |
Add service reference to Amazon service fails, saying "Could not load file or assembly "System.Core, Version=3.5.0.0,...' or one or more of it dependencies. The module was expected to contain an assembly manifest."
This is in VS 2008, haven't installed SP1 on this machine yet.
Any ideas? |
By putting the data into a form, I was able to make the body around 1800 characters long before the form stopped working.
The code looked like this:
<form action="mailto:youremail@domain.com">
<input type="hidden" name="Subject" value="Email subject">
<input type="hidden" name="Body" value="... |
Drag and drop ftp file upload web widgets |
|ftp|upload| |
It seems like drag and drop upload widgets disappeared from the face of Web 2.0. The last one of these I remember using was an activex widget, and inability of using it in anything other than IE doomed it. Have you used or seen one of these recently? |
Sorry I couldn't be more help. I would definately keep looking at xdelta because I have used it a number of times to produce quality diffs on 600MB+ ISO files we have generated for distributing our products and it performs very well. |
[FTP Drop][1] for Yahoo Widgets allows you to drag files over the widget and the file will be sent to the defined ftp server.
[1]: http://widgets.yahoo.com/widgets/ftp-drop |
it tends to take an inexperienced team longer to build 3-tier.It's more code, so more bugs. I'm just playing the devil's advocate though. |
Here's a wacky gum-and-shoestring idea:
Copy all the files manually or using your existing method for the first time. Then, since I take it you're on a Windows platform, install [SyncToy][1] and configure it in the [subscribe method][2], which would effectively one-way copy only the changes made since the last pseu... |
I guess a fairly big downside is that the extra volume of code that you have to write, manage and maintain for a **small** project may just be overkill.
It's all down to what's appropriate for the size of the project, the expected life of the final project and the budget! Sometimes, whilst doing things 'properly' i... |
If you use TortoiseSVN, you can use the export feature to automatically strip out all of the .svn files. I think other svn things have the same feature.
Right click the root project folder, TortoiseSVN > Export and tell it where you want the .svn free directory. |
I agree with "Is Nothing". As stated above, it's easy to negate with "IsNot Nothing".
I find this easier to read...
If printDialog IsNot Nothing Then
'blah
End If
than this...
If Not obj Is Nothing Then
'blah
End If |
C# doesn't require you to specify a generic type parameter if the compiler can infer it, for instance:
List<int> myInts = new List<int> {0,1,1,
2,3,5,8,13,21,34,55,89,144,233,377,
610,987,1597,2584,4181,6765};
//this statement is clunky
List<string> myStrings = myInts.
Sele... |
Yes, everything has a limit. As far as I'm aware, there is no inherit limit with "SSL".. it is after all just a protocol.
But, there is a limited amount of memory, ports, CPU on the machine you are connected to, from and every single one in between.
The actually server you are connected to may have an arbitrary l... |
If you're using Visual Studio it might be worth looking at [Bounds Checker][1]. It's not free, but it's been incredibly helpful in finding leaks in my code. It doesn't just do memory leaks either, but also GDI resource leaks, WinAPI usage errors, and other stuff. It'll even show you where the leaked memory was initi... |
Microsoft has an article describing how you can [Compile MSIL to Native Code][1]
You can use [Ngen][2].
> The Native Image Generator (Ngen.exe)
> is a tool that improves the
> performance of managed applications.
> Ngen.exe creates native images, which
> are files containing compiled
> processor-specific mac... |
I had the same issue with the VS.NET 2005 version and I'm not sure it is related. It was a registry problem and when i contacted the people from devexpress they send me a clean up tool.
You can try to see if there is another clean up tool for 2008 or search in the registry for the file name and remove it manually. |
What's a Good Database ERD Tool for Linux? |
|linux|ubuntu|erd| |
I've recently switched to Linux on my work machine and, new to the Linux desktop environment, I'd like to find a decent ERD tool for database design. Booting back into my Windows partition every time I need to create a diagram is going to get unpleasant quickly. I looked at Dia, but didn't see any DB tools - only UML... |
ASP.NET Proxy Application |
|.net|asp.net|iis|windowsserver| |
Let me try to explain what I need. I have a server that is visible from the internet. What I need is to create a ASP.NET application that get the request of a web Site and send to a internal server, then it gets the response and publish the the info. For the client this should be totally transparent.
For different r... |
|.net|asp.net|iis|windows-server| |
Database triggers |
|sql-server|triggers|database-design| |
In the past I've never been a fan of using triggers on database tables. To me they always represented some "magic" that was going to happen on the database side, far far away from the control of my application code. I also wanted to limit the amount of work the DB had to do, as it's generally a shared resource and I al... |
|sql-server|database-design|triggers| |
The problem with unit testing any kind of data-related programming is that you have to have a reliable set of test data to start with. A lot also depends on the complexity of the stored proc and what it does. It would be very hard to automate unit testing for a very complex procedure that modified many tables.
Some ... |
|string|c#|codingstyle|religion| |
Let's say that you want to output or concat strings, what style do you prefer:
var p = new { FirstName = "Bill", LastName = "Gates" };
Console.WriteLine("{0} {1}", p.FirstName, p.LastName);
Console.WriteLine(p.FirstName + " " + p.LastName);
Do you rather use format or do ... |
|c#|string|codingstyle|string.format|religion| |
|c#|string|coding-style|string.format|religion| |
|c#|string|coding-style|string.format| |
Actually, the TRACE macro is a lot more flexible than OutputDebugString. It takes a printf() style format string and parameter list whereas OutputDebugString just takes a single string. In order to implement the full TRACE functionality in release mode you need to do something like this:
void trace(const char* f... |
<http://www.emrecamdere.com/news_scroller_jquery.html> |
Unfortunatly Bryan is probably right.
And I have tried to make a VS plugin for use with InfoPath development. It is very restrictive and hard to use. Not very effective for quick scripting work.
I have found [AutoHotKey][1] to be the best ad hoc scripting tool for use with InfoPath. It doesn't integrate directly... |
I've written lots of Javascript and window.onload is a **terrible** way to do it. It is brittle and waits until **every** asset of the page has loaded. So if one image takes forever or a resource doesn't timeout until 30 seconds, your code will not run before the user can see/manipulate the page.
Also, if another pi... |
Algorithm to format text to Pascal or camel casing |
|algorithm| |
[Using this question][1] as the base is there an alogrithm or coding example to change some text to Pascal or Camel casing.
For example:
mynameisfred
becomes
Camel: myNameIsFred
Pascal: MyNameIsFred
[1]: http://stackoverflow.com/questions/32149/does-anyone-have-a-good-proper-case-algorithm |
RemoteSoft makes a tool that compiles a .NET application into a package that can be run without .NET installed. I don't have any experience with it:
[RemoteSoft Salamander][1]
[1]: http://www.remotesoft.com/linker/intro.html |
I think it's not possible. You will need to distribute .NET FW as well. If you want to compile .NET app to native code, use NGen [tool][1]
[1]: http://msdn.microsoft.com/en-us/library/6t9t5wcf.aspx |
How to do multi-column sorting on a Visual Basic 6 ListView? |