Daily Archives

Articles indexed Sunday January 16 2011

Page 19/29 | < Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >

  • GNU GPL LICENSE

    - by user577616
    I develop an android application and in my app I use a libary (jar) that I download from the internet. This jar is open-source under the "GNU General Public License v2". I tried to read the text of the license but had difficulty understanding it. My question is: can I use this libary without changing nothing in the jar in a commercial application? I will be making profit from selling my app which uses this GPL-ed .jar file. If possible, I would like to avoid converting my application to open-source.

    Read the article

  • How to run video from total commander(wine)?

    - by 101
    When I click on video file nothing happens, I tried to make a link to it /media/DATA/#TO_BACKUP/_MUSIC/MUSIC2/Black Eyed Peas - The Time (Dirty Bit).avi but it says Failed to execute child process "/media/DATA/" (Permission denied) Opening the full location from MediaPlayer does not work (open location) Location not found I can open it slowly by navigating in the slow file open dialog, but I would like to open it from totalcmd or by created link or by passing full location. P.S. Before that I have opened the DATA Partition.

    Read the article

  • Are there still plans for a new sound theme?

    - by Ingo Gerth
    Let me quote from Mark's blog almost one year ago: March 5th, 2010 at 7:19 pm Mark, will there be an update to the sound theme to match the updated visual brand? Mark Shuttleworth: Gack, I completely forgot about that. A very good point. Would you see if you can rally a round of community submissions for a sound theme inspired by light? Lets keep it short and sweet: What are the current considerations for the Ubuntu default sound theme?

    Read the article

  • Upgraded to Maverick; can't change theme

    - by Mike Doherty
    Hi, I just upgraded to Maverick, and now I can't change my theme except for the cursor and window border/decoration. I've just reinstalled the themes I want to use (Dust + Dust extra) successfully, and while the window border/decorations change properly when I select them, nothing else changes. The icon set doesn't change; gnome-panel doesn't change. I'm stuck on the fugly fallback theme - the one you see when you do gksudo gedit or something. Halp! -Mike

    Read the article

  • How to return a variable from a javascript function into html body.

    - by anthr
    Hi there, I am still new to javascript, and I am trying to get a function to return a variable using html & javascript. Basically the function should just return whichever radio button that the user clicks on, although at the moment I don't see anything being returned at all. The function is here: <script type="text/javascript"> function GetSelectedItem() { var chosen = "" len = document.f1.r1.length for (i = 0; i <len; i++) { if (document.f1.r1[i].checked) { chosen = document.f1.r1[i].value } } } return chosen </script> And then in the html section I have these radio buttons, and my attempt to get the variable "chosen" output to the screen. <form name = f1><Input type = radio Name = r1 Value = "ON" onClick=GetSelectedItem()>On <Input type = radio Name = r1 Value = "OFF" onClick =GetSelectedItem()>Off</form> <script type ="text/javascript">document.write(chosen)</script> At the moment nothing seems to be getting returned from the function (although if I output the variable 'chosen' inside the function then it is working correctly. Thanks in advance!

    Read the article

  • Web Application - Authentication / Login Framework

    - by user456563
    This is a very simple, probably a most asked question and frequently developed as part of any web application. Say I'm planning to build a web application and some of the functional requirements include (apart from the usual hard hitting security reqs), - Need to have users sign up for a new account profile - Authenticate user using the native app authentication / Facebook or Google or Yahoo or OpenId login - Allow lost password retrieval - Session handling needs Is there an out of the box frameworks (Drupal, Liferay??) that I can use to wrap my application which can be a bunch of JSP's or HTML's with JS? I know I'm asking a very simple and maybe a naive question. But this is a topic every web developer guru will go thru. Any help, advise and pointers much appreciated.

    Read the article

  • Primary reasons why programming language runtimes use stacks?

    - by manuel aldana
    Many programming language runtime environments use stacks as their primary storage structure (e.g. see JVM bytecode to runtime example). Quickly recalling I see following advantages: Simple structure (pop/push), trivial to implement Most processors are anyway optimized for stack operations, so it is very fast Less problems with memory fragmentation, it is always about moving memory-pointer up and down for allocation and freeing complete blocks of memory by resetting the pointer to the last entry offset. Is the list complete or did I miss something? Are there programming language runtime environments which are not using stacks for storage at all?

    Read the article

  • Using ExecuteQuery() with entity framework, entity class.

    - by sfreelander
    I am trying to jump from ASP Classic to asp.net. I have followed tutorials to get Entity Framework and LINQ to connect to my test database, but I am having difficulties figuring out ExecuteQuery(). I believe the problem is that I need an "entity class" for my database, but I can't figure out how to do it. Here is my simple code: Dim db as New TestModel.TestEntity Dim results AS IEnumerable(OF ???) = db.ExecuteQuery(Of ???)("Select * from Table1") From the microsoft example site, they use an entity class called Customers, but I don't understand what that means.

    Read the article

  • Semaphore - What is the use of initial count?

    - by Sandbox
    http://msdn.microsoft.com/en-us/library/system.threading.semaphoreslim.aspx To create a semaphore, I need to provide an initial count and maximum count. MSDN states that an initial count is - The initial number of requests for the semaphore that can be granted concurrently. While it states that maximum count is The maximum number of requests for the semaphore that can be granted concurrently. I can understand that the maximum count is the maximum number of threads that can access a resource concurrently. But, what is the use of initial count? If I create a semaphore with an initial count of 0 and a maximum count of 2, none of my threadpool threads are able to access the resource. If I set the initial count as 1 and maximum count as 2 then only thread pool thread can access the resource. It is only when I set both initial count and maximum count as 2, 2 threads are able to access the resource concurrently. So, I am really confused about the significance of initial count? SemaphoreSlim semaphoreSlim = new SemaphoreSlim(0, 2); //all threadpool threads wait SemaphoreSlim semaphoreSlim = new SemaphoreSlim(1, 2);//only one thread has access to the resource at a time SemaphoreSlim semaphoreSlim = new SemaphoreSlim(2, 2);//two threadpool threads can access the resource concurrently

    Read the article

  • remotestart (0.4.0) requires plug-in org.eclipse.rse.files.ui

    - by user310291
    I want to install http://emonic.sourceforge.net/html/downloadinfos.html#Download+via+update+site on eclipse sdk 3.2.2 but I get this message. I'd like not to upgrade eclipse due to other plugin. Is it possible to fix this ? It is supposed to work http://emonic.sourceforge.net/html/requirements.html o use this plug-in you will need: Eclipse 3.2 or newer (Tested on Eclipse 3.2.2, 3.3, and 3.4 development line)

    Read the article

  • Why won't my PHP script work?

    - by sadicool
    I have a script that reports the following error: Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'admin'@'localhost' (using password: YES) in C:\wamp\www\bits\includes\connect.inc.php on line 10 Notice: Undefined variable: l_error in C:\wamp\www\bits\includes\connect.inc.php on line 12 Notice: Undefined variable: l_cannotconnecttodatabase in C:\wamp\www\bits\includes\connect.inc.php on line 12 Why would this be?

    Read the article

  • How to run Java Web Application from commandLine prompt or any where

    - by soso
    hello, I have created two (java web applcaion ). one acts as a Server , I created ( web service) into. the second acts as client , I created ( Web service client) into . I created them in netBeans, and they run . but now I want to run them out net beans , how I can do this? I want any way to run out netBeans such as command prompt or an where. if you have idia about running (.war) file , please tell me. thanks in advance.

    Read the article

  • how do i search from php file ?

    - by Tum Bin
    Dear Friends, im totally new in php. Just learning. I got 2 Assingment with php and html. Assignment 01: I have to mansion some pplz name and all of them some friends name. and I have to print common friend if there have common friend. Bt there have a prob that I got also msg which dnt have any common friend like “Rana has 0 friends in common with Roni.” I want to stop this and how can i? Assignment 02: I made a html form to search a person from that php file. Like: when I will search for Rana php form will b open and and print : Rana have 4 friends and he has a common friend with Nandini and Mamun. when I will search for Tanmoy the page will be open and print: Tonmoy is Rana’s friend who have 4 friend and common friends with Nandini and Mamun. for this I have to use the function “post/get/request” Plz plz plzzzzzzzzzz help me! Here im posting my codes; <?php # Function: finfCommon function findCommon($current, $arr) { $cUser = $arr[$current]; unset($arr[$current]); foreach ($arr As $user => $friends) { $common = array(); $total = array(); foreach ($friends As $friend) { if (in_array($friend, $cUser)) { $common[] = $friend; } } $total = count($common); $add = ($total != 1) ? 's' : ''; $final[] = "<i>{$current} has {$total} friend{$add} in common with {$user}.</i>"; } return implode('<br />', $final); } # Array of users and friends $Friends = array( "Rana" => array("Pothik", "Zaman", "Tanmoy", "Ishita"), "Nandini" => array("Bonna", "Shakib", "Kamal", "Minhaj", "Ishita"), "Roni" => array("Akbar", "Anwar", "Khakan", "Pavel"), "Liton" => array("Mahadi", "Pavel"), "Mamun" => array("Meheli", "Tarek", "Zaman") ); # Creating the output value $output = "<ul>"; foreach ($Friends As $user => $friends) { $total = count($friends); $common = findCommon($user, $Friends); $output .= "<li><u>{$user} has {$total} friends.</u><br /><strong>Friends:</strong>"; if (is_array($friends) && !empty($friends[0])) { $output .= "<ul>"; foreach ($friends As $friend) { $output .= "<li>{$friend}</li>"; } $output .= "</ul>"; } $output .= "{$common}<br /><br /></li>"; } $output .= "</ul>"; # Printing the output value print $output; ?>

    Read the article

  • ASP.net PreInit() Vs Init()

    - by ASP.netBeginner
    From local forum i understood that PreInit can be used to handle the following PreInit() >Master pages can be called dynamically >Themes can be set dynamically >Programatically add controls to controls collection and i read Init() is for Init() In this event, we can read the controls properties (set at design time). We cannot read control values changed by the user because that changed value will get loaded after LoadPostData() event fires. Question I am not getting the point "We cannot read control values changed by the user".Where do users change the value of control?.Example would help me to understand the point.

    Read the article

  • SVG text - total length changes depending on zoom

    - by skco
    In SVG (for web-browsers), if i add a <text>-element and add some text to it the total rendered width of the text string will change depending on the scale of the text. Lets say i add "mmmmmmmmmmmmmmmmmmmmmmmmmmA" as text, then i want to draw a vertical line(or other exactly positioned element) intersecting the very last character. Works fine but if i zoom out the text will become shorter or longer and the line will not intersect the text in the right place anymore. The error can be as much as +/- 5 characters width which is unacceptable. The error is also unpredictable, 150% and 160% zoom can add 3 characters length while 155% is 2 charlengths shorter. My zoom is implemented as a scale-transform on the root element of my canvas which is a <g>. I have tried to multiply the font-size with 1000x and scale down equally on the zoom-transform and vice versa in case it was a floating point error but the result is the same. I found the textLength-attribute[1] which is supposed to adjust the total length so the text always end where i choose but it only works in Webkit. Firefox and Opera seems to not care at all about this value (haven't tried in IE9 yet). Is there any way to render text exactly positioned without resorting to homemade filling of font-outlines? [1] http://www.w3.org/TR/SVG11/text.html#TextElementTextLengthAttribute Update Snippet of the structure i'm using <svg> <g transform="scale(1)"> <!--This is the root, i'm changing the scale of this element to zoom --> <g transform="scale(0.014)"> <!--This is a wrapper for multi-line text, scaling, other grouping etc --> <text font-size="1000" textLength="40000">ABDCDEFGHIJKLMNOPQRSTUVXYZÅÄÖabcdefghijklmnopqrstxyzåäö1234567890</text> </g> </g>

    Read the article

  • Rename files to increment filenumber using PowerShell?

    - by Frode Lillerud
    Hi, I've got a bunch of files named attachment.023940 attachment.024039 attachment.024041 attachment.024103 etc... I need to rename the files by incrementing the filenumber by a given number. (So that they match the right ID in a database) I guess I could write a C# application that uses RegEx to parse the filename, but I assume this is a task that could be accomplished in PowerShell as well? I've found several other threads on SO about using PowerShell to rename files, but none of them handled incrementing a filenumber. I'm on Win7, so PowerShell 2.0 is available.

    Read the article

  • SelectedItem of listbox - BindableCollection is binded on listbox

    - by user572844
    Hi, I bind BindableCollection from caliburn micro on listbox. Also I bind selected listbox item on property in view model. After I select some item on listbox, property SelectedFriedn which is bind on SelectedItem of listbox is still null. Code from view model: private BindableCollection<UserInfo> _friends; //bind on listbox public BindableCollection<UserInfo> Friends { get { return _friends; } set { _friends = value; NotifyOfPropertyChange(() => Friends); } } private UserInfo _selectedFriend = new UserInfo(); //bind on SelectedItem property of listbox public UserInfo SelectedFriend { get { return _selectedFriend; } set { _selectedFriend = value; NotifyOfPropertyChange(() => SelectedFriend); } } In view I have this: <ListBox Name="Friends" SelectedIndex="{Binding Path=SelectedFriendsIndex,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" SelectedItem="{Binding Path=SelectedFriend, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}" Style="{DynamicResource friendsListStyle}" IsTextSearchEnabled="True" TextSearch.TextPath="Nick" Grid.Row="2" Margin="4,4,4,4" PreviewMouseRightButtonUp="ListBox_PreviewMouseRightButtonUp" PreviewMouseRightButtonDown="ListBox_PreviewMouseRightButtonDown" MouseRightButtonDown="ListBox_MouseRightButtonDown" Micro:Message.Attach="[MouseDoubleClick]=[Action OpenChatScreen()]" > Where can be problem?

    Read the article

  • Supporting multiple instances of a plugin DLL with global data

    - by Bruno De Fraine
    Context: I converted a legacy standalone engine into a plugin component for a composition tool. Technically, this means that I compiled the engine code base to a C DLL which I invoke from a .NET wrapper using P/Invoke; the wrapper implements an interface defined by the composition tool. This works quite well, but now I receive the request to load multiple instances of the engine, for different projects. Since the engine keeps the project data in a set of global variables, and since the DLL with the engine code base is loaded only once, loading multiple projects means that the project data is overwritten. I can see a number of solutions, but they all have some disadvantages: You can create multiple DLLs with the same code, which are seen as different DLLs by Windows, so their code is not shared. Probably this already works if you have multiple copies of the engine DLL with different names. However, the engine is invoked from the wrapper using DllImport attributes and I think the name of the engine DLL needs to be known when compiling the wrapper. Obviously, if I have to compile different versions of the wrapper for each project, this is quite cumbersome. The engine could run as a separate process. This means that the wrapper would launch a separate process for the engine when it loads a project, and it would use some form of IPC to communicate with this process. While this is a relatively clean solution, it requires some effort to get working, I don't now which IPC technology would be best to set-up this kind of construction. There may also be a significant overhead of the communication: the engine needs to frequently exchange arrays of floating-point numbers. The engine could be adapted to support multiple projects. This means that the global variables should be put into a project structure, and every reference to the globals should be converted to a corresponding reference that is relative to a particular project. There are about 20-30 global variables, but as you can imagine, these global variables are referenced from all over the code base, so this conversion would need to be done in some automatic manner. A related problem is that you should be able to reference the "current" project structure in all places, but passing this along as an extra argument in each and every function signature is also cumbersome. Does there exist a technique (in C) to consider the current call stack and find the nearest enclosing instance of a relevant data value there? Can the stackoverflow community give some advice on these (or other) solutions?

    Read the article

  • Why this search can not generate correct result?

    - by user482742
    Hi, All: Below is to find same customer and if he is in list, the number add one. If he is not in the list, just add him in the list. I use Search function to do this, but failed and generated incorrect records. It can not find the customer or the right number of customers. But if I use For..loop to iterate the list, it does well and can find the customer and add new customer in that for..loop search procedure. (I did not paste for ..loop search procedrue here). Another problem is that there is no difference between setting list.sorted true and false. It seems Search function is not correct. This search function is from an example of delphi textbook. The below is with Delphi 7. Thank you. Procedure Form1.create; begin list:=Tstringlist.create; list.sorted:=true; // Search function will generate exactly Same and Incorrect //records no matter list.sorted is set true or false. list.duplicates:=dupignore; .. end; Procedure addcustomer; var .. begin while p1.MatchAgain do begin //p1 is regular expression customer:=p1.MatchedExpression; if (search(customer)=false) then begin list.Add(customer+'=1'); end; allcustomer:=allcustomer+1; .. end; Function Tform1.search(customer: string): boolean; var fre:string; num:integer; L:integer; R:integer; M: Integer; CompareResult: Integer; found: boolean; begin result:=false; found:=false; L := 0; R := List.Count - 1; while (L <= R) and ( not found ) do begin M := (L + R) div 2; CompareResult := Comparetext(list.Names[m]), customer); if (compareresult=0) then begin fre:=list.ValueFromIndex [m]; num:=strtoint(fre); num:=num+1; list.ValueFromIndex[m]:=inttostr(num); Found := True; Result := true; exit; end else if compareresult > 0 then r := m - 1 else l := m + 1; end; end;

    Read the article

  • upload video to youtube via iphone application ----ServiceForbiddenException

    - by user577670
    Hey,I use GData try to upload my video to youtube, but meet these error: serviceBase:<GDataServiceGoogleYouTube: 0x2435f0> objectFetcher:<GDataHTTPUploadFetcher: 0x26dca0> failedWithStatus:403 data:<errors xmlns='http://schemas.google.com/g/2005'> <error> <domain>GData</domain> <code>ServiceForbiddenException</code> <internalReason>Currently authenticated user does not have write access to desrender&apos;s videos.</internalReason> </error> </errors> * is my youtube account. Following is the code: - (GDataServiceGoogleYouTube *)youTubeService { static GDataServiceGoogleYouTube* service = nil; if (!service) { service = [[GDataServiceGoogleYouTube alloc] init]; [service setShouldCacheDatedData:YES]; [service setServiceShouldFollowNextLinks:YES]; [service setIsServiceRetryEnabled:YES]; } // update the username/password each time the service is requested NSString *username = [mUsernameField text]; NSString *password = [mPasswordField text]; if ([username length] > 0 && [password length] > 0) { [service setUserCredentialsWithUsername:username password:password]; } else { // fetch unauthenticated [service setUserCredentialsWithUsername:nil password:nil]; } NSString *devKey = [mDeveloperKeyField text]; [service setYouTubeDeveloperKey:devKey]; return service; } - (IBAction)uploadPressed:(id)sender { NSString *devKey = [mDeveloperKeyField text]; GDataServiceGoogleYouTube *service = [self youTubeService]; [service setYouTubeDeveloperKey:devKey]; NSString *username = [mUsernameField text]; NSString *clientID = [mClientIDField text]; NSURL *url = [GDataServiceGoogleYouTube youTubeUploadURLForUserID:username clientID:clientID]; // load the file data NSString *path = [[NSBundle mainBundle] pathForResource:@"YouTubeTest" ofType:@"m4v"]; NSData *data = [NSData dataWithContentsOfFile:path]; NSString *filename = [path lastPathComponent]; // gather all the metadata needed for the mediaGroup NSString *titleStr = [mTitleField text]; GDataMediaTitle *title = [GDataMediaTitle textConstructWithString:titleStr]; NSString *categoryStr = [mCategoryField text]; GDataMediaCategory *category = [GDataMediaCategory mediaCategoryWithString:categoryStr]; [category setScheme:kGDataSchemeYouTubeCategory]; NSString *descStr = [mDescriptionField text]; GDataMediaDescription *desc = [GDataMediaDescription textConstructWithString:descStr]; NSString *keywordsStr = [mKeywordsField text]; GDataMediaKeywords *keywords = [GDataMediaKeywords keywordsWithString:keywordsStr]; BOOL isPrivate = mIsPrivate; GDataYouTubeMediaGroup *mediaGroup = [GDataYouTubeMediaGroup mediaGroup]; [mediaGroup setMediaTitle:title]; [mediaGroup setMediaDescription:desc]; [mediaGroup addMediaCategory:category]; [mediaGroup setMediaKeywords:keywords]; [mediaGroup setIsPrivate:isPrivate]; NSString *mimeType = [GDataUtilities MIMETypeForFileAtPath:path defaultMIMEType:@"video/mp4"]; // create the upload entry with the mediaGroup and the file data GDataEntryYouTubeUpload *entry; entry = [GDataEntryYouTubeUpload uploadEntryWithMediaGroup:mediaGroup data:data MIMEType:mimeType slug:filename]; SEL progressSel = @selector(ticket:hasDeliveredByteCount:ofTotalByteCount:); [service setServiceUploadProgressSelector:progressSel]; GDataServiceTicket *ticket; ticket = [service fetchEntryByInsertingEntry:entry forFeedURL:url delegate:self didFinishSelector:@selector(uploadTicket:finishedWithEntry:error:)]; [self setUploadTicket:ticket]; } It almost same as GData's YouTubeSample.. Someone help me!!!!

    Read the article

  • WCF data services (OData), query with inheritance limitation?

    - by Mathieu Hétu
    Project: WCF Data service using internally EF4 CTP5 Code-First approach. I configured entities with inheritance (TPH). See previous question on this topic: Previous question about multiple entities- same table The mapping works well, and unit test over EF4 confirms that queries runs smoothly. My entities looks like this: ContactBase (abstract) Customer (inherits from ContactBase), this entity has also several Navigation properties toward other entities Resource (inherits from ContactBase) I have configured a discriminator, so both Customer and Resource map to the same table. Again, everythings works fine on the Ef4 point of view (unit tests all greens!) However, when exposing this DBContext over WCF Data services, I get: - CustomerBases sets exposed (Customers and Resources sets seems hidden, is it by design?) - When I query over Odata on Customers, I get this error: Navigation Properties are not supported on derived entity types. Entity Set 'ContactBases' has a instance of type 'CodeFirstNamespace.Customer', which is an derived entity type and has navigation properties. Please remove all the navigation properties from type 'CodeFirstNamespace.Customer'. Stacktrace: at System.Data.Services.Serializers.SyndicationSerializer.WriteObjectProperties(IExpandedResult expanded, Object customObject, ResourceType resourceType, Uri absoluteUri, String relativeUri, SyndicationItem item, DictionaryContent content, EpmSourcePathSegment currentSourceRoot) at System.Data.Services.Serializers.SyndicationSerializer.WriteEntryElement(IExpandedResult expanded, Object element, ResourceType expectedType, Uri absoluteUri, String relativeUri, SyndicationItem target) at System.Data.Services.Serializers.SyndicationSerializer.<DeferredFeedItems>d__b.MoveNext() at System.ServiceModel.Syndication.Atom10FeedFormatter.WriteItems(XmlWriter writer, IEnumerable`1 items, Uri feedBaseUri) at System.ServiceModel.Syndication.Atom10FeedFormatter.WriteFeedTo(XmlWriter writer, SyndicationFeed feed, Boolean isSourceFeed) at System.ServiceModel.Syndication.Atom10FeedFormatter.WriteFeed(XmlWriter writer) at System.ServiceModel.Syndication.Atom10FeedFormatter.WriteTo(XmlWriter writer) at System.Data.Services.Serializers.SyndicationSerializer.WriteTopLevelElements(IExpandedResult expanded, IEnumerator elements, Boolean hasMoved) at System.Data.Services.Serializers.Serializer.WriteRequest(IEnumerator queryResults, Boolean hasMoved) at System.Data.Services.ResponseBodyWriter.Write(Stream stream) Seems like a limitation of WCF Data services... is it? Not much documentation can be found on the web about WCF Data services (OData) and inheritance specifications. How can I overpass this exception? I need these navigation properties on derived entities, and inheritance seems the only way to provide mapping of 2 entites on the same table with Ef4 CTP5... Any thoughts?

    Read the article

  • click multiple times a submit button

    - by Olga Anastasiadou
    Hi all, I encountered a problem that I can't solve. My point is to "click" my sybmit button and every time increase a counter, while this counter reach 10. For the first time it works, but this is it! My test code is below : <form name="testForm" method="post"> <?php $cnt=0; ?> <input type="submit" name="next" id="next" value="NEXT"/> <?php if(isset($_POST['next'])){ if($cnt< 10){ echo $cnt.' --> '; $cnt++; echo $cnt; } } ?> </form> Only 0 -- 1 is printed, every time... please help!! Thanks

    Read the article

  • BDD for C# NUnit

    - by mjezzi
    I've been using a home brewed BDD Spec extension for writing BDD style tests in NUnit, and I wanted to see what everyone thought. Does it add value? Does is suck? If so why? Is there something better out there? Here's the source: https://github.com/mjezzi/NSpec There are two reasons I created this To make my tests easy to read. To produce a plain english output to review specs. Here's an example of how a test will look: -since zombies seem to be popular these days.. Given a Zombie, Peson, and IWeapon: namespace Project.Tests.PersonVsZombie { public class Zombie { } public interface IWeapon { void UseAgainst( Zombie zombie ); } public class Person { private IWeapon _weapon; public bool IsStillAlive { get; set; } public Person( IWeapon weapon ) { IsStillAlive = true; _weapon = weapon; } public void Attack( Zombie zombie ) { if( _weapon != null ) _weapon.UseAgainst( zombie ); else IsStillAlive = false; } } } And the NSpec styled tests: public class PersonAttacksZombieTests { [Test] public void When_a_person_with_a_weapon_attacks_a_zombie() { var zombie = new Zombie(); var weaponMock = new Mock<IWeapon>(); var person = new Person( weaponMock.Object ); person.Attack( zombie ); "It should use the weapon against the zombie".ProveBy( spec => weaponMock.Verify( x => x.UseAgainst( zombie ), spec ) ); "It should keep the person alive".ProveBy( spec => Assert.That( person.IsStillAlive, Is.True, spec ) ); } [Test] public void When_a_person_without_a_weapon_attacks_a_zombie() { var zombie = new Zombie(); var person = new Person( null ); person.Attack( zombie ); "It should cause the person to die".ProveBy( spec => Assert.That( person.IsStillAlive, Is.False, spec ) ); } } You'll get the Spec output in the output window: [PersonVsZombie] - PersonAttacksZombieTests When a person with a weapon attacks a zombie It should use the weapon against the zombie It should keep the person alive When a person without a weapon attacks a zombie It should cause the person to die 2 passed, 0 failed, 0 skipped, took 0.39 seconds (NUnit 2.5.5).

    Read the article

  • Linux clients and Windows Servers can connect but not windows clients

    - by Mustafa Ismail Mustafa
    This is driving me insane because I can't make head or tails of it. We have two DCs (W2K3 SP1) and I'v tried this once on each machine as a sanity check. DHCP is being served by either one of the machines and all machines get an address no problem. The servers can connect/ping/browse to the www and so can all our linux clients. But NONE of our windows clients (all windows 7). I can do anything within the network, I can even ping the firewall/router but nothing from the windows clients is leaving the confines of our subnet. I don't get it. The linux and windows clients are both served from the same DHCP server, the gateway is the same, everything is the same. Anyone care to take a shot at how to resolve this? I tried adding explicit routes at the clients, but still no go. TIA SMIM

    Read the article

  • Will this increase my Virtual private Server failing rate ?

    - by Spencer Lim
    Will this increase my Virtual private Server failing rate if i :- install Microsoft Window Server 2008 Enterprise install SQL server enterprise 2008 install IIS 7.5 install ASP.Net Mvc 2 install Microsoft Exchange << should live inside MWS2008 ? or standalone without OS? install Team foundation server << should live inside MWS2008 ? or standalone without OS? on one mini VPS with specification of DELL Poweredge R710 shared plan DDR3 ECC RAMs 16GB and -- 1GB for this VPS using DELL PERC 6i raid controller (this thing alone about 1.5k-2k) and the SAS HDD (15K RPM) (146GB) -- 33GB to this VPS each hdd is freaking fast over 300MB read / write possible with proper tuning the motherboard is a DELL and it has twin redundant PSU (870watt 85%eff) its running on Intel Xeon 5502 (Quad Core) x2 so about 8 physical proc (fairly share) is there any ruler to measure for this about one VPS can only install what what what service ? because of my resource is limited =.@ may i know if it is install in this way,maybe it seem like defeat the way of "VPS"... what will happen ? or any guideline on this issue (fully configuring the window server 2008 R2) ? Thx for reply

    Read the article

< Previous Page | 15 16 17 18 19 20 21 22 23 24 25 26  | Next Page >