We use Visual Source Safe 6.0 at work and VB6 is supposed to integrate smoothly with Source Safe. Both applications are installed on my PC, but VB6 is not showing the options to integrate with Source Safe (e.g. checking out a file, seeing if a file is shared, etc.).
What do I need to do to get VB6 to integrate with Source Safe 6.0?
We are evaluating IoC containers for C# projects, and both Unity and Castle.Windsor are standing out. One thing that I like about Unity (NInject and StructureMap also do this) is that types where it is obvious how to construct them do not have to be registered with the IoC Container.
Is there way to do this in Castle.Windsor? Am I being fair to Castle.Windsor to say that it does not do this? Is there a design reason to deliberately not do this, or is it an oversight, or just not seen as important or useful?
I am aware of container.Register(AllTypes... in Windsor but that's not quite the same thing. It's not entirely automatic, and it's very broad.
To illustrate the point, here are two NUnit tests doing the same thing via Unity and Castle.Windsor. The Castle.Windsor one fails. :
namespace SimpleIocDemo
{
using NUnit.Framework;
using Castle.Windsor;
using Microsoft.Practices.Unity;
public interface ISomeService
{
string DoSomething();
}
public class ServiceImplementation : ISomeService
{
public string DoSomething()
{
return "Hello";
}
}
public class RootObject
{
public ISomeService SomeService { get; private set; }
public RootObject(ISomeService service)
{
SomeService = service;
}
}
[TestFixture]
public class IocTests
{
[Test]
public void UnityResolveTest()
{
UnityContainer container = new UnityContainer();
container.RegisterType<ISomeService, ServiceImplementation>();
// Root object needs no registration in Unity
RootObject rootObject = container.Resolve<RootObject>();
Assert.AreEqual("Hello", rootObject.SomeService.DoSomething());
}
[Test]
public void WindsorResolveTest()
{
WindsorContainer container = new WindsorContainer();
container.AddComponent<ISomeService, ServiceImplementation>();
// fails with exception "Castle.MicroKernel.ComponentNotFoundException:
// No component for supporting the service SimpleIocDemo.RootObject was found"
// I could add
// container.AddComponent<RootObject>();
// but that approach does not scale
RootObject rootObject = container.Resolve<RootObject>();
Assert.AreEqual("Hello", rootObject.SomeService.DoSomething());
}
}
}
In my project I register many ISerializers implementations with the assembly scanner. FWIW this is the code that registers my ISerializers
Scan(scanner =>
{
scanner.AssemblyContainingType<ISerializer>();
scanner.AddAllTypesOf<ISerializer>().NameBy(type => type.Name);
scanner.WithDefaultConventions();
});
Which then correctly registers
ISerializer (...ISerializer)
Scoped as: Transient
JsonSerializer Configured Instance of ...JsonSerializer
BsonSerializer Configured Instance of ...BsonSerializer
And so forth.
Currently the only way I've been able to figure out how to resolve the serializer I want is to hardcode a service location call with
jsonSerializer = ObjectFactory.GetNamedInstance<ISerializer>("JsonSerializer");
Now I know in my class that I specifically want the jsonSerializer so is there a way to configure a rule or similar that says for ISerializer's to connect the named instance based on the property name? So that I could have
MySomeClass(ISerializer jsonSerializer, ....)
And StructureMap correctly resolve this scenario? Or am I approaching this wrong and perhaps I should just register the concrete type that implements ISerializer and then just specifically use
MySomeClass(JsonSerializer jsonSerializer, ....)
for something along these lines with the concrete class?
Please note this is not a question about online/hosted SVN services.
I am working on a home based, solo developer, project that now has commercial significance and it is time to think about remote source code backup. There is no need for file level check in/out, all I need is once a day or once a week directory level snapshot to remote storage. Automatic encryption would be a bonus to protect my IP.
What I have in mind is some sort of GUI interface app that will squirt a source code snapshot off to an Amazon S3 bucket on an automatic schedule.
(My development PC runs on MS Windows.)
how can i make this entire process as 1 single event???
http://code.google.com/apis/visualization/documentation/dev/dsl_get_started.html
and draw the chart on single click?
I am new to servlets please guide me
When a user clicks the "go " button with some input.
The data goes to the servlet say "Test3". The servlet processes the data by the user and generates/feeds the data table dynamically
Then I call the html page to draw the chart as shown in the tutorial link above.
The problem is when I call the servlet it gives me a long json string in the browser as given in the tutorials
"google.visualization.Query.setResponse({version:'0.6',status:'ok',sig:'1333639331',table:{cols:[{............................"
Then when i manually call the html page to draw the chart i am see the chart.
But when I call html page directly using the request dispatcher via the servlet I dont get the result.
This is my code and o/p...... I need sugession as to how should be my approach to call the chart
public class Test3 extends HttpServlet implements DataTableGenerator {
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
DataSourceHelper.executeDataSourceServletFlow(request, response, this , isRestrictedAccessMode() );
RequestDispatcher rd;
rd = request.getRequestDispatcher("new.html");// it call's the html page which draws the chart as per the data added by the servlet.....
rd.include(request, response);//forward(request, response);
@Override
public Capabilities getCapabilities() {
return Capabilities.NONE;
}
protected boolean isRestrictedAccessMode() {
return false;
}
@Override
public DataTable generateDataTable(Query query, HttpServletRequest request) {
// Create a data table.
DataTable data = new DataTable();
ArrayList<ColumnDescription> cd = new ArrayList<ColumnDescription>();
cd.add(new ColumnDescription("name", ValueType.TEXT, "Animal name"));
cd.add.........
I get the following result along with unprocessed html page
google.visualization.Query.setResponse({version:'0.6',statu.....
<html>
<head>
<title>Getting Started Example</title>
.... Entire html page as it is on the Browser.
What I need is when a user clicks the go button the servlet should process the data
and call the html page to draw the chart....Without the json string appearing on the browser.(all in one user click)
What should be my approach or how should i design this.... there are no error in the code.
since when i run the servlet i get the json string on the browser and then when i run the html page manually i get the chart drawn.
So how can I do (servlet processing + html page drawing chart as final result) at one go without the long json string appearing on the browser.
There is no problem with the html code....
I've setup a git repository one a remote server. Now I'm trying to checkout from it with:
git fetch ssh://[email protected]/~username/workfolder/
but I get an error:
fatal: Not a git repository
What am I doing wrong? Could it be the server does not support Git+SSH?
Hi folks,
I'm trying to wire up a simple ASP.NET MVC2 controller class to my own LoggingService.
Code compiles fine, but I get the following runtime error :-
{"StructureMap Exception Code: 202
No Default Instance defined for PluginFamily System.Type, mscorlib,
Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"}
what the? mscorlib ????
Here's some sample code of my wiring up ..
protected void Application_Start()
{
MvcHandler.DisableMvcResponseHeader = true;
BootstrapStructureMap();
ControllerBuilder.Current.SetControllerFactory(
new StructureMapControllerFactory());
RegisterRoutes(RouteTable.Routes);
}
private static void BootstrapStructureMap()
{
ObjectFactory.Initialize(x =>
x.For<ILoggingService>().Use<Log4NetLoggingService>());
}
and finally the controller, simplified for this question ...
public class SearchController : Controller
{
private readonly ILoggingService _log { get; set; }
public SearchController(ILoggingService loggingService) :
base(loggingService)
{
// Error checking removed for brevity.
_log = loggingService;
_log.Tag = "SearchController";
}
...
}
and the structuremap factory (main method), also way simplified for this question...
protected override IController GetControllerInstance(RequestContext requestContext, Type controllerType)
{
IController result = null;
if (controllerType != null)
{
try
{
result = ObjectFactory.GetInstance(controllerType) as Controller;
}
catch (Exception exception)
{
if (exception is StructureMapException)
{
Debug.WriteLine(ObjectFactory.WhatDoIHave());
}
}
}
}
hmm. I just don't get it.
StructureMap version 2.6.1.0
ASP.NET MVC 2.
Any ideas?
When I commit changes with Emacs' built-in VCS interface (I use it with Bazaar) it commits only one file - that's open in current buffer.
So when I press C-c v v, enter message and C-c C-c, it does something like
bzr commit -m "my message" file/open/in.buffer
instead of
bzr commit -m "my message"
How to commit all changes with Emacs?
I need to be able to load web pages from different sites within a page on my site. I am using C# .NET and master pages. Within the content page, I want to be able to load an arbitrary page and display it without any of the browser controls appearing - just the page content.
I want to run scheduled nightly exports of my database code into my SVN source.
It's easy to schedule automated check-in's into svn from a folder, but scheduling the export from SQL in SQL Management Studio is
Right click target database, choose Tasks Generate Scripts.
Follow the wizard and presto you've got scripts in a folder.
Is it possible to extract a single script that the wizard generates, and stuff that into a stored proc which I can run nightly?
Ideas?
We are having havoc with our project at work, because our VCS is doing some awful merging when we move information across files.
The scenario is thus:
You have lots of files that, say, contain information about terms from a dictionary, so you have a file for each letter of the alphabet.
Users entering terms blindly follow the dictionary order, so they will put an entry like "kick the bucket" under B if that is where the dictionary happened to list it (or it might have been listed under both B, bucket and K, kick).
Later, other users move the terms to their correct files. Lots of work is being done on the dictionary terms all the time.
e.g. User A may have taken the B file and elaborated on the "kick the bucket" entry. User B took the B and K files, and moved the "kick the bucket" entry to the K file. Whichever order they end up getting committed in, the VCS will probably lose entries and not "figure out" that an entry has been moved.
(These entries are later automatically converted to an SQL database. But they are kept in a "human friendly" form for working on them, with lots of comments, examples etc. So it is not acceptable to say "make your users enter SQL directly".)
It is so bad that we have taken to almost manually merging these kinds of files now, because we can't trust our VCS. :(
So what is the solution? I would love to hear that there is a VCS that could cope with this. Or a better merge algorithm? Or otherwise, maybe someone can suggest a better workflow or file arrangement to try and avoid this problem?
Title says it. What's the best tool for viewing and editing a merge in Git? I'd like to get a 3-way merge view, with "mine", "theirs" and "output" in separate panels.
Also, instructions for invoking said tool would be great. (I still haven't figure out how to start kdiff3 in such a way that it doesn't give me an error)
edit: My OS is Ubuntu.
I know that in Visual SourceSafe you can go in and drill down to the history of an individual file and then drill down to an individual check-in and apply a comment to the check-in that way but that's tedious and time consuming - if you have a lot of files that were checked in at the same time and you want the same comment to apply to all of them this will take forever.
I use the tool VSSReporter to generate reports of checkins and other stuff from VSS, but it cannot edit anything, only report on them.
Are there any tools which will let you go back and retroactively apply comments to check-ins in an efficient and easy manner?
How can I query those of the labels in ClearCase with cleartool that have a specific attribute.
I can list the labels with
lstype -kind lbtype
but I'd like to get only those that have an attribute called TestAttr.
I have a git repo. It has been forked several times and many independent commits are made on top of it. Everything normal, like what happens in many github hosted projects.
Now, what exact workflow should I follow, if I want to see all that commits individually and apply the ones I like.
The workflow I followed, which is not the optimal is to create a branch of the name github-username and merge the changes into my master and undo any changes in the commit I dont need manually (there are not many, so it worked).
What I want is the ability to see all commits from different forks individually and cherry pick and apply them on top of my master.
What is the workflow to follow for that? And what gui (gitk?) enables me to see all different individual commits.
I realize that merge should be a primary part of the workflow and not cherry-pick as it creates a different commit (from git's point of view). Even rebasing other's changes on top of mine might not preserve the history on the graph to indicate that it is his commits I have rebased. So then, How do I ignore just a few commits from a lot of them?
I think github should have a "apply this commit on top of my master" thing in their graph after each commit node; so I can just pull it, after doing all that.
Hi,
we want to use Unity for IOC.
All i've seen is the implementation that there is one global static service which holds a reference to the Unity container, which registers all interface/class combinations and every class asks that object: give me an implementation for Ithis or IThat.
Frequently i see a response that this pattern is not good because it leads to a dependency from ALL classes to this service.
But what i don't see often, is: what is the alternative way?
Michel
Yesterday I was reading some articles in this site while I stumbled on an article about this two new IoC tools. Which one should I learn first? Is there some specification about which one should be used when?
I am currently maintaining a Mercurial repository of the project I am working on.
The rest of the team, however, doesn't.
There is a "good" (unversioned) copy of the code base that I can access by SSH. What I would like to do is be able to do something like an hg pull from that good copy into my master repository whenever it gets updated.
As far as I can tell, there's no obvious way to do this, as hg pull requires you have a source hg repository.
I suppose I could use a utility like rsync to update my repository, then commit, but I was wondering:
Is there was an easier/less contrived way to do this?
I keep searching, but cannot find a clear and simple explanation on how to include one XCode project, along with all of it's sub-classes into another project. I routinely see stuff like that in sample projects that I download off the web, but do not know how to do this myself.
Within XCode, along with .h and .m files, and folders, there's a whole new project, starting with a blue xcode project icon, that is expandable to contain everything within the project.
Please, can someone explain to me step by step what do I need to do to add one XCode project into another one? I've seen a ton of one liners like "header search paths", but that does not tell me much.
UPDATE: After re-reading the documentation, I realized that the project to include must be dragged ONTO the BLUE project icon of the parent project. Regular sources can be dragged anywhere, but a project must be dragged onto a project.
Thank you!
I have the oddest problem (but aren't all programming problems odd?). I have a winform that contains a webbrowser object that opens a website that has flash on it. This winform is running on a touchscreen computer (I can't find the brand or model number).
Here is what I know:
flash objects embeded in a website that is accessed via the webbrowser object in my winform do not function properly
said flash objects only react to the first 'click' on them. So the website opens and if I hit a button, that button works but nothing afterward works within the flash object works. If my first 'click' misses a button, nothing works there after.
trying to 'click' an flash button gives the same response as just hovering over the button
This isn't a problem with the touch part of the touch screen as using a mouse also gives the same not working right response
this isn't a problem with the web page as I can open up explorer on the same computer and navigate the webpage just fine from there
The program also works 100% right on my personal computer so it shouldn't be the program's fault
if it's not the touch screen fault and not the program's fault, I can't blame anything right now.
the EXACT same program worked 100% on our old touch screen (which was having other problems so we had to get rid of it).
Oh, also, surfing just a 'normal' webpage in a webbrowser in the winform works just fine.
bzr push defaults to the first target you pushed to. If I now want to push to a different location, but don't want to manually enter it every time, how do I change the default?