Search Results

Search found 18003 results on 721 pages for 'nidhinzz own'.

Page 88/721 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • How can I make an "abstract" enum in a .NET class library?

    - by Lazlo
    I'm making a server library in which the packet association is done by enum. public enum ServerOperationCode : byte { LoginResponse = 0x00, SelectionResponse = 0x01, BlahBlahResponse = 0x02 } public enum ClientOperationCode : byte { LoginRequest = 0x00, SelectionRequest = 0x01, BlahBlahRequest = 0x02 } That works fine when you're working in your own project - you can compare which enum member is returned (i.e. if (packet.OperationCode == ClientOperationCode.LoginRequest)). However, since this is a class library, the user will have to define its own enum. Therefore, I have two enums to add as "abstract" - ServerOperationCode and ClientOperationCode. I know it's not possible to implement abstract enums in C#. How would I go doing this?

    Read the article

  • Using Interfaces in action signature

    - by Dmitry Borovsky
    Hello, I want to use interface in Action signature. So I've tried make own ModelBinder by deriving DefaultModelBinder: public class InterfaceBinder<T> : DefaultModelBinder where T: new() { protected override object CreateModel(ControllerContext controllerContext, ModelBindingContext bindingContext, Type modelType) { return base.CreateModel(controllerContext, bindingContext, typeof(T)); } } public interface IFoo { string Data { get; set; } } public class Foo: IFoo /*other interfaces*/ { /* a lot of */ public string Data { get; set; } } public class MegaController: Controller { public ActionResult Process( [ModelBinder(typeof(InterfaceBinder))]IFoo foo){/bla-bla-bla/} } But it doesn't work. Does anybody have idea how release this behaviour? And yes, I know that I can make my own implementation of IModelBinder, but I'm looking for easier way.

    Read the article

  • WPF (irc) chat log control

    - by user408952
    I'm trying to learn WPF and was thinking about creating a simple IRC client. The most complicated part is to create the chat log. I want it to look more or less like the one in mIRC: or irssi: The important parts are that the text should be selectable, lines should wrap and it should be able to handle quite large logs. The alternatives that I can come up with are: StackPanel inside a ScrollViewer where each line is a row ListView, since that seems more suitable for dynamic content/data binding. Create an own control that does the rendering on its own. Is there any WPF guru out there that has some ideas on which direction to take and where to start?

    Read the article

  • Static Access To Multiple Instance Variable

    - by Qua
    I have a singleton instance that is referenced throughout the project which works like a charm. It saves me the trouble from having to pass around an instance of the object to every little class in the project. However, now I need to manage multiple instances of the previous setup, which means that the singleton pattern breaks since each instance would need it's own singleton instance. What options are there to still maintain static access to the singleton? To be more specific, we have our game engine and several components and plugins reference the engine through a static property. Now our server needs to host multiple game instances each having their own engine, which means that on the server side the singleton pattern breaks. I'm trying to avoid all the classes having the engine in the constructor.

    Read the article

  • Multiple webservices in 1 ear/ejb project

    - by arinte
    We have a ejb project (which is in an ear) that shares quite a bit of code between 2 webservices. The classes that the webservices expose are in different packages but they have different names. For example Web service1 com.d.trunk.Response WS1.process( com.d.trunk.Input ); Web service2 com.d.fwd.Response WS2.process( com.d.fwd.Input ); So this builds fine, but when we deploy and we view the generated wsdl and the generated xsd things begin to go a bit haywire. So if we look at web service 2 it generates the wsdl and xsd as we expect. But when we look at ws 1's wsdl for some reason it includes the xsd from the ws 2 and its own xsd. And its own xsd are missing key types like the Response type. Is this an issue because we have 2 web services in 1 ejb project? Or some config issue with Netbeans 6.7.1 and glassfish v2?

    Read the article

  • What tools are people using to measure SQL Server database performance?

    - by Paul McLoughlin
    I've experimented with a number of techniques for monitoring the health of our SQL Servers, ranging from using the Management Data Warehouse functionality built into SQL Server 2008, through other commercial products such as Confio Ignite 8 and also of course rolling my own solution using perfmon, performance counters and collecting of various information from the dynamic management views and functions. What I am finding is that whilst each of these approaches has its own associated strengths, they all have associated weaknesses too. I feel that to actually get people within the organisation to take the monitoring of SQL Server performance seriously whatever solution we roll out has to be very simple and quick to use, must provide some form of a dashboard, and the act of monitoring must have minimal impact on the production databases (and perhaps even more importantly, it must be possible to prove that this is the case). So I'm interested to hear what others are using for this task? Any recommendations?

    Read the article

  • What are people's opinions vis-a-vis my choice of authorization plugins?

    - by brad
    I'm slowly but surely putting together my first rails app (first web-app of any kind in fact - I'm not really a programmer) and it's time to set up a user registration/login system. The nature of my app is such that each user will be completely separated from each other user (except for admin roles). When users log in they will have their own unique index page looking at only their data which they and no-one else can ever see or edit. However, I may later want to add a role for a user to be able to view and edit several other user's data (e.g. a group of users may want to allow their secretary to access and edit their data but their secretary would not need any data of their own). My plan is to use authlogic to create the login system and declarative authorization to control permissions but before I embark on this fairly major and crucial task I thought I would canvas a few opinions as to whether this combo was appropriate for the tasks I envisage or whether there would be a better/simpler/faster/cheaper/awesomer option.

    Read the article

  • Click Once doesn't create StartMenu entry and Shortcut on Windows 7 x64

    - by MadBoy
    I've application that I deploy to share with ClickOnce so other users can install it and use it on their own machines. It worked fine till i noticed that when i install this app on my own machine (Windows 7 x 64) it doesn't add StartMenu (even thou it installs correctly and I have it in Control Panel / Programs). I didn't had that problem when my development machine was Windows XP. Application also deploys fine on other Windows XP computers. Also during installation (when i rerun setup) even thou I already have Net Framework 3.5 it always wants to install one (it starts that and terminates few seconds later - probably installer sees that it's already there). I can run application straigit from share just a bit of pain to do it. Are there some special settings I should do? Or some patches? I have Visual Studio 2008 and system with all optional updates installed. Application is written in C# and uses NET 3.5.

    Read the article

  • Cobol: science and fiction

    - by user847
    There are a few threads about the relevance of the Cobol programming language on this forum, e.g. this thread links to a collection of them. What I am interested in here is a frequently repeated claim based on a study by Gartner from 1997: that there were around 200 billion lines of code in active use at that time! I would like to ask some questions to verify or falsify a couple of related points. My goal is to understand if this statement has any truth to it or if it is totally unrealistic. I apologize in advance for being a little verbose in presenting my line of thought and my own opinion on the things I am not sure about, but I think it might help to put things in context and thus highlight any wrong assumptions and conclusions I have made. Sometimes, the "200 billion lines" number is accompanied by the added claim that this corresponded to 80% of all programming code in any language in active use. Other times, the 80% merely refer to so-called "business code" (or some other vague phrase hinting that the reader is not to count mainstream software, embedded systems or anything else where Cobol is practically non-existent). In the following I assume that the code does not include double-counting of multiple installations of the same software (since that is cheating!). In particular in the time prior to the y2k problem, it has been noted that a lot of Cobol code is already 20 to 30 years old. That would mean it was written in the late 60ies and 70ies. At that time, the market leader was IBM with the IBM/370 mainframe. IBM has put up a historical announcement on his website quoting prices and availability. According to the sheet, prices are about one million dollars for machines with up to half a megabyte of memory. Question 1: How many mainframes have actually been sold? I have not found any numbers for those times; the latest numbers are for the year 2000, again by Gartner. :^( I would guess that the actual number is in the hundreds or the low thousands; if the market size was 50 billion in 2000 and the market has grown exponentially like any other technology, it might have been merely a few billions back in 1970. Since the IBM/370 was sold for twenty years, twenty times a few thousand will result in a couple of ten-thousands of machines (and that is pretty optimistic)! Question 2: How large were the programs in lines of code? I don't know how many bytes of machine code result from one line of source code on that architecture. But since the IBM/370 was a 32-bit machine, any address access must have used 4 bytes plus instruction (2, maybe 3 bytes for that?). If you count in operating system and data for the program, how many lines of code would have fit into the main memory of half a megabyte? Question 3: Was there no standard software? Did every single machine sold run a unique hand-coded system without any standard software? Seriously, even if every machine was programmed from scratch without any reuse of legacy code (wait ... didn't that violate one of the claims we started from to begin with???) we might have O(50,000 l.o.c./machine) * O(20,000 machines) = O(1,000,000,000 l.o.c.). That is still far, far, far away from 200 billion! Am I missing something obvious here? Question 4: How many programmers did we need to write 200 billion lines of code? I am really not sure about this one, but if we take an average of 10 l.o.c. per day, we would need 55 million man-years to achieve this! In the time-frame of 20 to 30 years this would mean that there must have existed two to three million programmers constantly writing, testing, debugging and documenting code. That would be about as many programmers as we have in China today, wouldn't it? Question 5: What about the competition? So far, I have come up with two things here: 1) IBM had their own programming language, PL/I. Above I have assumed that the majority of code has been written exclusively using Cobol. However, all other things being equal I wonder if IBM marketing had really pushed their own development off the market in favor of Cobol on their machines. Was there really no relevant code base of PL/I? 2) Sometimes (also on this board in the thread quoted above) I come across the claim that the "200 billion lines of code" are simply invisible to anybody outside of "governments, banks ..." (and whatnot). Actually, the DoD had funded their own language in order to increase cost effectiveness and reduce the proliferation of programming language. This lead to their use of Ada. Would they really worry about having so many different programming languages if they had predominantly used Cobol? If there was any language running on "government and military" systems outside the perception of mainstream computing, wouldn't that language be Ada? I hope someone can point out any flaws in my assumptions and/or conclusions and shed some light on whether the above claim has any truth to it or not.

    Read the article

  • Check malicious Redirect URL in ASP.NET

    - by acidzombie24
    I heard of sites using other site to redirect users either to their own site or to hide behind another site. In my code i redirect in a few places such as post a comment (its easier to use a return url then figure out the page using data given). How do i check if the return URL is my own url? I think i use absolute paths so i can easily check if the first character is '/' but then i will lose relative flexibility. This also disallows me from doing http://mysite.com/blah in the redirect url. I could patch the url by adding mysite + string but i'll need to figure out if string is a relative url or already a mysite.com url. Whats the easiest way to ensure i am only redirecting to my site?

    Read the article

  • Linking jQuery UI to the ASP.NET MVC 2 project

    - by Tx3
    What I am trying to accomplish is using jQuery UI dialog method from my own JavaScript source code file. I have this kind of links in the Site.Master <script src="/Scripts/jquery-1.4.2.js" type="text/javascript"></script> <script src="/Scripts/jquery.validate.js" type="text/javascript"></script> <script src="/Scripts/jquery-ui.js" type="text/javascript"></script> <script src="/Scripts/Common.js" type="text/javascript"></script> Common.js is my own helper file. jQuery works fine there, but when I try to call for example: $(document).ready(function() { $("#dialog").dialog(); }); I'll get "Microsoft JScript runtime error: Object doesn't support this property or method" Any ideas why this happens? jQuery Works fine, but jQuery UI doesn't.

    Read the article

  • Silverlight DRY when animating multiple UserControls on main Navigation page.

    - by Tobias op den Brouw
    Hello all. Starting with Silverlight development. Yet to read a good Silverlight book: suggestions welcome. I have a main GUI screen where 7 user controls (menu items) 'swoop' into sight, all along their own path. I have the user controls nicely seperated and behaving well. Having multiple storyboards (1 each for each menuitem) with multiple keyframe animations (X,Y,height, width) in one .XAML is not sitting well with me. Repeating all those property values is hideous, neverthemind maintenance. I've tried to move values into the app.xaml and set animation durations with style keys, but having limited success. Can anyone suggest a nice way of making this cleaner? Refactor the storyboards out to their own control? Property values in resources? Dynamic building in codebehind? Referring me to a how-to site is fine as well. Tx!

    Read the article

  • netbeans custom jax-ws stubs..

    - by Sam
    Hi, I am using netbeans 6.9. I have made a JAX-WS service that returns a complex type, I have also made a JAX-WS client to consume it. The JAX-WS system automaticly creates a class for the client, inferred from the WSDl spec. I want to make my own class for this using JAXB annotations, so that I can add some extra functions to it. How do I go about replacing the autogenerated file with my own one? Could I also use the same class in the service to control how it is transmitted? Thanks!

    Read the article

  • Code completion in NetBeans' python plugin does not work properly

    - by T.K.
    I am asking on StackOverflow because surely I am doing something completely silly and I hope S.O. might provide me with a quick answer. I've installed the latest stable Python-plugin for NetBeans. It works great, and I tested code completion with various packages such as sys, os and so on. It works beautifully. However, it does not seem to pick up the code completion for the code in my own project. I created a package called mypackage (it has _init_.py as well), and in it I have a module called mymodule.py. Inside mymodule I've put a class called MyClass, complete with doc-strings and all. Please refer to this screenshot to describe what happens in code-completion: As you see, it's suggesting irrelevant things, as opposed to just MyClass. (Note that if I execute mymodule.MyClass() it works 100%, it's just that I would really like code completion on my own code) Hope I'm just doing something silly here... Any ideas?

    Read the article

  • How to store images without taking up huge amounts of RAM

    - by Sheeo
    I'm working on a silverlight project where users get to create their own Collages. The problem When loading a bunch of images by using the BitmapImage class, Silverlight hogs up huge unreasonable amounts of RAM. 150 pictures where single ones fill up at most 4,5mb takes up about 1,6GB of RAM--thus ending up throwing memory exceptions. I'm loading them through streams, since the user selects their own photos. What I'm looking for A class, method or some process to eliminate the huge amount of RAM being sucked up. I've tried using a WriteableBitmap to render the images into, but I find this method forces me to reinvent the wheel when it comes to drag/drop and other things I want users to be able to do with the images.

    Read the article

  • JAX-WS: when input soap validation fails

    - by Jakob
    I have created a web service with JAX-WS. When the input SOAP message is not well formed or can not be validated, a soap fault is returned automatically to the caller. I dont want the caller to receive this standard SOAP message but i want to create an own custom SOAP fault. So if the call looks like this (note Envelope1, its not valid): hello a default return message is something like this: S:Client Couldn't create SOAP message due to exception: unexpected XML tag. expected: {http://schemas.xmlsoap.org/soap/envelope/}Envelope but found: {http://schemas.xmlsoap.org/soap/envelope/}Envelope1 I want the return message to be something like this: S:Client My own custom SOAP message! I have tried to get this to work the whole day, but i cant figure out how to do it. So if someone could help me I would be really glad!

    Read the article

  • Building highly scalable web services

    - by christopher-mccann
    My team and I are in the middle of developing an application which needs to be able to handle pretty heavy traffic. Not facebook level but in the future I would like to be able to scale to that without massive code re-writes. My thought was to modularise out everything into seperate services with their own interfaces. So for example messaging would have a messaging interface that might have send and getMessages() as methods and then the PHP web app would simply query this interface through soap or curl or something like that. The messaging application could then be any kind of application so a Java application or Python or whatever was suitable for that particular functionality with its own seperate database shard. Is this a good approach?

    Read the article

  • readobject method throws ClassNotFoundException

    - by eruina
    Hi all, I'm trying to pick up Java and wanted to test around with Java's client/server to make the client send a simple object of a self defined class(Message) over to the server. The problem was that I kept getting a ClassNotFoundException on the server side. I think the rest of the codes seem to be alright because other objects such as String can go through without problems. I had two different netbeans projects in different locations for client and server each. Each of them have their own copy of Message class under their respective packages. Message class implements Serializable. On the client side, I attempt to send a Message object through. On the server side, upon calling the readObject method, it seems to be finding Message class from the client's package instead of it's own. printStackTrace showed: "java.lang.ClassNotFoundException: client.Message" on the server side I have not even tried to cast or store the object received yet. Is there something I left out?

    Read the article

  • log4net - configure using multiple configuration files

    - by Gai
    Hi, I have an application consisting of a host and pluggable modules (plugins). I want to be able to configure log4net for the host and for each of the other modules. Each of them should have its own configuration file and each will log to a different file. Only the host has an App.config file. The plugins have their own config file containing the log4net config sections. Calling XmlConfigurator.Configure from one of the plugins overrides the host's app.config log4net definitions. Is there an easy way to append configurations instead of overriding them? Thanks, Gai.

    Read the article

  • Embedded strongly-typed views with ASP.NET MVC

    - by Brian Vallelunga
    I'm working on a plugin-type of system for ASP.NET MVC that loads views from an embedded assembly. I have created a VirtualPathProvider that does the work of retrieving out of the assembly. Everything is working fine except for strongly-typed views. Whenever I try to load one of those, I get an exception of: Could not load type 'System.Web.Mvc.ViewPage'. The problem is that there is no Web.config file under the Views folder. Well, actually there is, but the system doesn't seem to want to read the embedded version. If I manually create the file under the corresponding directory in the web app, everything is fine. This isn't an acceptable workaround however, as each plugin would need its own file in its own specific directory. Does anyone know how I might get ASP to read the embedded Web.config file? Thanks, Brian

    Read the article

  • Pitfalls to avoid when starting a software company.

    - by Imagist
    It's been my goal to start my own software company basically since I started programming HyperCard on System 6 back in elementary school. Recent changes in my job situation have convinced me that I should be pursuing this goal more actively. My question is, what are some pitfalls that I should avoid when starting a software company? A lot of companies fail and I'm sure there are a lot of reasons. As a side-request, it would be particularly helpful if you could tell me a little about your own experience with starting a software company or being a part of a startup, so I know how you know what you know.

    Read the article

  • UITabBarController "More" tab issues

    - by codemonkey
    I've got a UITabBarController with 7 tabs. Each of the 7 tabs has its own UINavigationController and customizes its toolbar. When a view is loaded via the UITabBarController's "More" menu its custom toolbar isn't appearing. If i switch the order of the views around so that the same view is now accessible from the UITabBar without going through the "More" menu then the custom toolbar shows up like it's supposed to. Is there a way to customize a NavigationController's toolbar when that NavigationController is loaded via the "More" menu of a TabBarController? I'm actually also interested in replacing the "More" menu navigation controller with my own custom one on views loaded via the "More" menu... not sure whether that's even possible. Any feedback will be appreciated.

    Read the article

  • TypeError: Python thinks that I passed a function 2 arguments but I only passed it 1

    - by slhck
    I work on something in Seattle Repy which is a restricted subset of Python. Anyway, I wanted to implement my own Queue that derives from a list: class Queue(list): job_count = 0 def __init__(self): list.__init__(self) def appendleft(item): item.creation_time = getruntime() item.current_count = self.job_count self.insert(0, item) def pop(): item = self.pop() item.pop_time = getruntime() return item Now I call this in my main server, where I use my own Job class to pass Jobs to the Queue: mycontext['queue'] = Queue() # ... job = Job(str(ip), message) mycontext['queue'].appendleft(job) The last line raises the following exception: Exception (with type 'exceptions.TypeError'): appendleft() takes exactly 1 argument (2 given) I'm relatively new to Python, so could anyone explain to me why it would think that I gave appendleft() two arguments when there obviously was only one?

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >