Hi,
Just playing around with some of the APIs in .NET and I can't seem to find a way to cause Array.ConstrainedCopy() fail.
According to MSDN, it's treated as an atomic operation. If it fails during the copy, the entire call fails resulting in no elements being copied as opposed to its Array.Copy() counterpart.
Can someone demonstrate this or tell me how to do this?
IoC Frameworks just make DI much easier, but it's not only DI that they do, they provide a host of other benefits over and above DI.
I saw this comment in one of the answers to a question about DI and IoC. Can someone explain this in some more details? What are other benefits of IoC?
I have the following code in an ASP.NET MVC 2 application.
internal TextWriter _writer;
// some stuff
_writer = _viewContext.Writer;
_writer.Write(_tag.ToString(TagRenderMode.EndTag));
I tried to move it to MVC 1 and now it doesn't build any more. I'm getting this error:
'System.Web.Mvc.ViewContext' does not contain a definition for 'Writer'
Can someone point out how I can resolve this?
I'm writing a program and I have the following problem:
char *tmp;
sprintf (tmp,"%ld",(long)time_stamp_for_file_name);
Could someone explain how much memory allocate for the string tmp.
How many chars are a long variable?
Thank you,
I would appreciate also a link to an exahustive resource on this kind of information.
Thank you
I'm trying to use a regular expression as below:
preg_match_all('|<table.*</table>|',$html,$matches, PREG_SET_ORDER);
But this is not working, and I think the problem is the new line inside the string $html.
Could someone tell me a work around?
There are obviously a lot of different choices out there if you want to program for the web using Java. Does anybody have recommendations for someone who wants a free software framework for web programming? I want to work on Linux, and I would prefer to avoid .net/mono.
I remember someone telling me that gzipped content is not cached on some browsers?
is this true?
Are there any other reasons why I shouldn't gzip my content (pages, javascript and css files) with htaccess?
The AJAX content loaded in a Colorbox has some JavaScript included that resizes things within the content. Colorbox determines its sizing based on the sizes before all of the AJAX happens. How can I make the Colorbox resize after the content has been loaded?
Here is a link where someone said that you can call colorbox() again after it's been loaded, but I can't figure out how to do that:
http://groups.google.com/group/colorbox/browse_thread/thread/535d21c69e9006b0
I've got two branches that are fully merged together.
However, after the merge is done, I realise that one file has been messed up by the merge (someone else did an auto-format, gah), and it would just be easier to change to the new version in the other branch, and then re-insert my one line change after bringing it over into my branch.
So what's the easiest way in git to do this?
How can I append #somehash to all links on a page without depending on a JS framework?
Or is it possible to catch when someone clicks on a link and attach #somehash?
Can someone please direct me to process for doing this? I have already done the Login verification exercise using mySQL for the dbase on my host server (thanks to kiksy). Now I am trying to move forward and "Query" from the iPhone a list of "users" that currently occupy the table (iphoneusers) in MySQL. And of course get it back to the iPhone via the php connection.
Any help would be very much appreciated.
ronbowalker
Can someone tell me what the difference is between the following
public class CarCollection:List where T:Car
{
}
and
public class CarCollection:List
{
}
To me they seem to do the same thing, create type-safe collection of "Car" objects.
Let's assume someone has to write a solution to a problem and I have to test his solution with some tests. Is it possible (maybe with reflections or something) his program to pass all my tests, but to have nothing in common with the real solution to the problem?
Hello,
is it possible to send notification emails when passenger error occurs? Something similar to the email sending by exception notifier when there is an error in Rails app.
I wonder because now we have no way to find out if someone hits an unexpected app spawner or other error (like memory limit etc.).
Thank you!
Guys, simple situation -
read a json file
discover all key-value pairs
compare key-value pairs
I tried gson, package from json.org, but can't seem to get far with it.
Can someone please provide a clear sample in Java on how to take a file, read it, end up with json objec i can get key/value pairs from
thanks so much
I want to transform a listbox to textbox when I'm clicking a checkbox.
To explain, i have a listbox that contains addresses and if an address does't belong in the list someone can click to a checkbox called 'another address';so he can put another address.Thanx for your answer...
I'm having a problem running a VS 2005 app on some machines and not others. I looked up the error message on google and found a post by someone who had the same error and fixed it by uninstalling and reinstalling the .NET framework. When I try to do that, Windows won't let me because it is in use.
Am I expected to uninstall everything that is using the framework first, then uninstall the framework, then reinstall, etc.? Does anyone know of an easier way?
I am trying to find references about different designs of metamorphic generators can someone point me to the right direction. I have gone through some papers in ACM but couldn't find what I am looking for.
I have this string:
sometext +[value]:-
I would like to match the value(1-3 numerical characters) (with regex, javascript)
sometext may contain a +sign if i'm unlucky so I don't wanna end up with matching
some +text +value:-
I sat up last night banging my head against this, so I would be really glad if someone could help me.
If I have a template definition like the one below, can someone provide a code sample for how I would actually instantiate an instance of this with two of my own classes?
template <class T1, class T2>
class LookUpTable {
public:
LookUpTable();
void set(Tl x, T2* y);
T2* get(Tl x);
};
Thanks.