Daily Archives

Articles indexed Tuesday March 9 2010

Page 25/49 | < Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >

  • moqing static method call to c# library class

    - by Joe
    This seems like an easy enough issue but I can't seem to find the keywords to effect my searches. I'm trying to unit test by mocking out all objects within this method call. I am able to do so to all of my own creations except for this one: public void MyFunc(MyVarClass myVar) { Image picture; ... picture = Image.FromStream(new MemoryStream(myVar.ImageStream)); ... } FromStream is a static call from the Image class (part of c#). So how can I refactor my code to mock this out because I really don't want to provide a image stream to the unit test.

    Read the article

  • Lots of users still using 1.5?

    - by user246114
    Hi, I'm looking at market stats here for sdk distribution: http://developer.android.com/resources/dashboard/platform-versions.html saying that 31% of marketplace users are still running 1.5. Is it true that an OS update went out for G1 and myTouch users? I'm wondering why so many people are still running 1.5 if so? Just curious because I'd like to use th setView() method introduced in 1.6 for TabSpec, but not if so many people are still using 1.5, I might have to roll my own control, Thanks

    Read the article

  • Application development using google applications?

    - by Ali
    Hi guys I'm developing a collaboration system and our team has been at it for the past couple of years. However the boss suggested that we try and redevelop it using something robust. Basically our collaboration system incorporates a webmail client and a custom built contacts management system plus project management system. My boss likes the robustness of GMAIL and Google docs and really would like a solution that if possible could incorporate these two and other google applications - I'm not so sure how to get started on developing a custom application using google applications - especially consider the fact that in the long run we wish to host our collaboration system as a paid service - just like the services that 37signals basecamp and highrise have been.

    Read the article

  • Git-Based Source Control in the Enterprise: Suggested Tools and Practices?

    - by Bob Murphy
    I use git for personal projects and think it's great. It's fast, flexible, powerful, and works great for remote development. But now it's mandated at work and, frankly, we're having problems. Out of the box, git doesn't seem to work well for centralized development in a large (20+ developer) organization with developers of varying abilities and levels of git sophistication - especially compared with other source-control systems like Perforce or Subversion, which are aimed at that kind of environment. (Yes, I know, Linus never intended it for that.) But - for political reasons - we're stuck with git, even if it sucks for what we're trying to do with it. Here are some of the things we're seeing: The GUI tools aren't mature Using the command line tools, it's far to easy to screw up a merge and obliterate someone else's changes It doesn't offer per-user repository permissions beyond global read-only or read-write privileges If you have a permission to ANY part of a repository, you can do that same thing to EVERY part of the repository, so you can't do something like make a small-group tracking branch on the central server that other people can't mess with. Workflows other than "anything goes" or "benevolent dictator" are hard to encourage, let alone enforce It's not clear whether it's better to use a single big repository (which lets everybody mess with everything) or lots of per-component repositories (which make for headaches trying to synchronize versions). With multiple repositories, it's also not clear how to replicate all the sources someone else has by pulling from the central repository, or to do something like get everything as of 4:30 yesterday afternoon. However, I've heard that people are using git successfully in large development organizations. If you're in that situation - or if you generally have tools, tips and tricks for making it easier and more productive to use git in a large organization where some folks are not command line fans - I'd love to hear what you have to suggest. BTW, I've asked a version of this question already on LinkedIn, and got no real answers but lots of "gosh, I'd love to know that too!"

    Read the article

  • Counting the number of visitors for a web page - JavaScript and Struts

    - by Dj
    Hi i am Dhananjay, I need to keep track of the number of visitors to a web page. I have planned like this: on load of the home page, I will call a javascript callCounter(); From javascript, I need then to call an action and update a record in database. Please help me with this. How do i call the action? I should be in the same home jsp after updating database. Thanks in advance, Dhananjay

    Read the article

  • How to Command Query Responsibility Segregation (CQRS) with ASP.NET MVC?

    - by Jeffrey
    I have been reading about Command Query Responsibility Segregation (CQRS). I sort of wonder how would this work with ASP.NET MVC? I get the idea of CQRS conceptually it sounds nice and sure does introduce some complexities (event and messaging pattern) compared to the "normal/common" approach . Also the idea of CQRS sort of against the use of ORM in some ways. I am trying to think how I could use this pattern in the coming projects so if anyone has experience in combining CQRS with ASP.NET MVC and NHibernate please give some concrete examples to help me better understand CQRS and use with ASP.NET MVC. Thanks!

    Read the article

  • how to get memory address

    - by levirg
    hey Folks, Is there any way in ruby to get the memory address of objects.. say.. (i = 5) is that possible to get the mem address of that object 5.. 'object_id_' is not that satisfying.. I just wanted to know how referencing to objects work on ruby, so i thought address will be useful, to get things done plugin memprof doesnt work on x_32bit, so is there any better way pls help me..., Any answer would be really appreciated... thanks, Regards levirg

    Read the article

  • Why Do You Use Delphi?

    - by lkessler
    Nick Bradbury (the author of HomeSite, TopStyle and FeedDemon) just posted a fascinating explanation of why he uses Delphi: http://nick.typepad.com/blog/2009/07/why-i-use-delphi.html I'd like to know if there are other reasons. Why do you use Delphi? (I'm making this community wiki from the onset. I'm interested in hearing your answers, not in points.)

    Read the article

  • fade in all divs of a page. once the content of the divs is loaded

    - by daniel
    I want all the divs on my page to fade in after the content is loaded. The code below loads in all imgs in the #div container. Which is great. but it does not load in images that are used as div background images loaded through the css file. So i think the most effective way is to create a piece of code that fades in all the divs on the page after the content ie: images and text has loaded. Is there A way to do this. Cheers. $(document).ready(function() { $('#container img').fadeIn(4000); // and tell pending images to do the same, once they've finished loading: $('#container img').load(function () { $(this).fadeIn(4000); }); });

    Read the article

  • How can I create a button with a UIActivityIndicator in my navigation bar with the same style as nor

    - by Jarin Udom
    All of the examples I've seen on here and other sites involved creating a UIActivityIndicatorView and loading it with something like: self.navigationItem.rightBarButtonItem = [[[UIBarButtonItem alloc] initWithCustomView:myActivityIndicatorView target:nil action:nil] autorelease]; However, that just creates a plain activity indicator in the navigation bar. What I want to do is have a button that looks just like the normal UIBarButtonSystemItem buttons but with an activity indicator instead of one of the default images. I've tried doing initWithImage and initWithTitle with nil images or titles and then adding the activity indicator as a subview, but that doesn't work. Any ideas?

    Read the article

  • How to create a Subdomain in IIS7?

    - by Techboy
    In IIS7 I have a site: http://www.mydomain.com/mysite How can I get the same site to appear as: http://mysite.mydomain.com ? I already have the DNS set up and can ping it, I just do not know how to configure it in IIS7.

    Read the article

  • Safari taking too long to load web-pages.

    - by ayaz
    I am running the latest and greatest Snow Leopard on a MacBook. I have started to notice that Safari is taking too long to open properly most of the web-pages I routinely visit. Safari would first sit at "Connecting ..." status, and then on "Waiting ..." status, taking a lot of time to load the page. In contrast, Firefox (and Opera), for example, is loading pages quickly. I am not using any proxy settings on either. I have emptied the cache on Safari; also re-set Safari completely, but all in vain. I am now stumped about what I should try to locate what the problem is, and if possible, fix it. Any help from the community here will be very much appreciated!

    Read the article

  • Network shares do not mount.

    - by Alex
    My network shares were mounting fine yesterday.. suddenly they are not. They were mounting fine for the last two weeks or however long since I added them. When I run sudo mount -a I get the following error: topsy@monolyth:~$ sudo mount -a mount error(12): Cannot allocate memory Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) mount error(12): Cannot allocate memory Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) mount error(12): Cannot allocate memory Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) mount error(12): Cannot allocate memory Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) topsy@monolyth:~$ I followed this guide when setting them up: http://ubuntuforums.org/showthread.php?t=288534 So I tried removing them by doing the reverse, and then rebooting, then adding them again and rebooting. Problem persists.

    Read the article

  • Python urllib2 Basic Auth Problem

    - by Simon
    I'm having a problem sending basic AUTH over urllib2. I took a look at this article, and followed the example. My code: passman = urllib2.HTTPPasswordMgrWithDefaultRealm() passman.add_password(None, "api.foursquare.com", username, password) urllib2.install_opener(urllib2.build_opener(urllib2.HTTPBasicAuthHandler(passman))) req = urllib2.Request("http://api.foursquare.com/v1/user") f = urllib2.urlopen(req) data = f.read() I'm seeing the following on the Wire via wireshark: GET /v1/user HTTP/1.1 Host: api.foursquare.com Connection: close Accept-Encoding: gzip User-Agent: Python-urllib/2.5 You can see the Authorization is not sent, vs. when I send a request via curl: curl -u user:password http://api.foursquare.com/v1/user GET /v1/user HTTP/1.1 Authorization: Basic =SNIP= User-Agent: curl/7.19.4 (universal-apple-darwin10.0) libcurl/7.19.4 OpenSSL/0.9.8k zlib/1.2.3 Host: api.foursquare.com Accept: */* For some reason my code seems to not send the authentication - anyone see what I'm missing? thanks -simon

    Read the article

  • Finding the angle of a fleeing dodo.

    - by donthackmyacc
    I'm coding some critter AI for a game i am working on for my Unity 3D project. I have no programming background and have been stumbling through this using tutorials and other peoples scripts. My problem is that i want my critter to run directly away from the player when the player kicks it. I need the dodo to run directly away from the player when kicked, and i dont know the math nor the syntax to calculate that angle. They are two characters moving independently through worldspace. Here is what i got so far: waypoint = (fleeWP.transform.position); transform.LookAt(Vector3(waypoint.x, transform.position.y, waypoint.z)); transform.Translate (Vector3.forward * speed * Time.deltaTime); This currently makes the critter move towards the waypoint, rather than away. I might be attacking this all wrong. Please chastise me.

    Read the article

  • How to do logout functionality in C# smart device application?

    - by Shailesh Jaiswal
    I am developng Smart device application in C#. It is a window application. In this application I am using Login form to authenticate the users. Only authenticated users can login into the system. In this application I am calling java web services which resides on another machine. I am passing mobile number & password from mu application's login form to the java web services. The java web services returns the userid after successful authentication. I made this userid static so that it can be used frequently with other web services. I using statc variables in this application so that they can be used at application level. After deploying the application I can see that emulator provides the close button with multiplicaton symbol. In this way I can close my form as well as application. But I want to provde one logout link in my application. Can I provide logout functionality in C# window application ? If yes, how to do that ? Please make sure that all the functions of .net framework does not work with .net compact framwork? Can you provide me the code or link through which can resolve the above issue ?

    Read the article

< Previous Page | 21 22 23 24 25 26 27 28 29 30 31 32  | Next Page >