Search Results

Search found 24043 results on 962 pages for 'private methods'.

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

  • Why does dstat show zeroes for disk activity on my virtual private server running Ubuntu?

    - by Jonathan Berger
    I'm trying to monitor the number of disk reads and writes on my VPS (Rackspace in this case) running Ubuntu 9.04. I realize there are many tools to do this, but when using dstat 0.7 I tried the following command: dstat -d The output is just two columns of zeroes even when I upload a large file via scp that should be causing a large number of disk writes. Why is this, and how do I get dstat to correctly display the number of disk reads and writes?

    Read the article

  • Who are good suppliers of .NET 4 Hosted Virtual Private Servers ? (May 2010)

    - by Nick Haslam
    I'm looking for a supplier for hosting a Virtual server, running Windows Server 2008 (R2 ideally) and .NET 4 to run an internet facing ASP.NET web application. I'd also like to be able to remote desktop onto it, and install other apps as necessary, including other websites as and when. I'm based in the UK, so a UK based supplier would be great. I was looking at Fasthosts, but having researched them a bit more, they look like a bad idea.

    Read the article

  • Find computer names on a private network (with nmap?)

    - by paracaudex
    On a LAN, I want to find out the names of all the connected computers using a cross-platform program, preferably nmap. I know I can do nmap -sn xxx.xxx.xxx.xxx/24 (where xxx.xxx.xxx.xxx is a local IP address) to find hosts which are up, but how do I find the computers' hostnames? Do they broadcast this in a way that I can find using nmap? UPDATE: It looks like Angry IP Scanner can do this. How does it do this? Can I replicate it with nmap?

    Read the article

  • Copying single files into a folder that changes name every time the batch file is executed

    - by Daniel Jochem
    Can you please help, I am using this to put the text files made by the batch file into the folder created by the batch file as well. but my problem is that the name is changed of the new folder every time because it is named by the date and time it was created. This is the code: @echo off for /F " tokens=1,2,3* delims=/, " %%i IN ('date /T') DO ( set CUR_DAY_OF_WEEK=%%i set CUR_MONTH=%%j set CUR_DAY=%%k set CUR_YEAR=%%l) for /F " tokens=1,2,3* delims=:, " %%i IN ('time /T') DO ( set CUR_HOUR=%%i set CUR_MIN=%%j set AM_PM=%%k) if not exist E:\Private goto :F cd E:\Private md "E:\Private\%CUR_HOUR%.%CUR_MIN%%AM_PM% %j%%CUR_MONTH%-%CUR_DAY%-%CUR_YEAR%" goto :start :F if not exist F:\Private goto :G cd F:\Private md "F:\Private\%CUR_HOUR%.%CUR_MIN%%AM_PM% %j%%CUR_MONTH%-%CUR_DAY%-%CUR_YEAR%" goto :start :G cd G:\Private md "G:\Private\%CUR_HOUR%.%CUR_MIN%%AM_PM% %j%%CUR_MONTH%-%CUR_DAY%-%CUR_YEAR%" goto :start :start start /min A /stext A.txt start /min B /stext B.txt start /min C /stext C.txt start /min D /stext D.txt (As the directory (E:-G:) changes, how can I check all without an error? And once that is found, then put all these text files into the date folder.

    Read the article

  • Using a Dell PowerConnect to set up load balancing/redundancy, 1 switch 2 routres 2 private wan link

    - by MarianoC
    Hi, We have different locations connected by two different WAN providers. Each site has a dell powerConnect 6224 and two cisco routers with the WAN connections (we don’t have access to router admin). The 6224 connects to each cisco LAN port and to our LAN backbone. We would like the 6224 provide the ip gateway address and load balance and support redundancy, if one of the routes fail. Is this possible?. We can't find any samples on doing this and we have tried with no success. Any help or link to documentation regarding this, will be greatly appreciated. Thanks, MarianoC

    Read the article

  • Exchange2010 has Private Machine Name and IP in outbound SMTP - How to remove?

    - by John Bergman
    We have a domain (domain.local) that has IP Addresses in the 10.10.10.* range. In the outbound SMTP server traffic, I see the internal machine name (exchange.domain.local), and the internal ip address (10.10.10.55). The question is, how do you remove this header from exchange, or change it to have the external machine name/ip addresses. I am not talking about the HELO / EHLO handshake as part of the protocol. Please help.

    Read the article

  • How do I securely buy a domain from a private party?

    - by Matt
    I have a domain I want. I found the owners contact information, and negotiated a price. Is there a domain brokerage service out there that would help me with the exchange. I don't want to send off money, and never hear from him again, and I'm sure it's likewise. I've found a lot of sites that carry collections of domains for sale, but I've already found mine, and contacted the owner. I just want a service to facilitate the hand-off. Has anyone used a service like this that they could recommend?

    Read the article

  • OpenVZ container is running but does not show in vzlist nor can I find the private/conf files for the container

    - by Kakeakeai
    I was creating a new OpenVZ container on one of our VPS Nodes while the power went out for that machine. After bringing the machine back online I could no longer access the container CTID=101. I could not destroy it using "vzctl destroy 101", I can not enter or control it, and "vzlist -a" does NOT display any containers at all (this was a fresh node and the first container was being created). I decided to create a new container at this point assuming that the old container just was not saved for some reason. However when I go to add the ip/host to the new container I get a warning that the IP is already in use. After doing a ping to the IP I realized there was a machine on that IP. I SSH into the machine and discover it is the OLD container that some how is orphaned. I can not find it on the filesystem, I can not find it using VZ commands, and It is set to start on Node boot so it is impossible to shutdown (even ssh in and typing the "shutdown now" command just reboots the container not shut it down). Is this a flaw in OpenVZ or am I missing something? I have all the outputs and logs if needed. Thank you all so much in advance.

    Read the article

  • Exchange2010 has Private Machine Name and IP in outbound SMTP - How to remove?

    - by user44755
    We have a domain (domain.local) that has IP Addresses in the 10.10.10.* range. In the outbound SMTP server traffic, I see the internal machine name (exchange.domain.local), and the internal ip address (10.10.10.55). The question is, how do you remove this header from exchange, or change it to have the external machine name/ip addresses. I am not talking about the HELO / EHLO handshake as part of the protocol. Please help.

    Read the article

  • Application workflow

    - by manseuk
    I am in the planning process for a new application, the application will be written in PHP (using the Symfony 2 framework) but I'm not sure how relevant that is. The application will be browser based, although there will eventually be API access for other systems to interact with the data stored within the application, again probably not relavent at this point. The application manages SIM cards for lots of different providers - each SIM card belongs to a single provider but a single customer might have many SIM cards across many providers. The application allows the user to perform actions against the SIM card - for example Activate it, Barr it, Check on its status etc Some of the providers provide an API for doing this - so a single access point with multiple methods eg activateSIM, getStatus, barrSIM etc. The method names differ for each provider and some providers offer methods for extra functions that others don't. Some providers don't have APIs but do offer these methods by sending emails with attachments - the attachments are normally a CSV file that contains the SIM reference and action required - the email is processed by the provider and replied to once the action has been complete. To give you an example - the front end of my application will provide a customer with a list of SIM cards they own and give them access to the actions that are provided by the provider of each specific SIM card - some methods may require extra data which will either be stored in the backend or collected from the user frontend. Once the user has selected their action and added any required data I will handle the process in the backend and provide either instant feedback, in the case of the providers with APIs, or start the process off by sending an email and waiting for its reply before processing it and updating the backend so that next time the user checks the SIM card its status is correct (ie updated by a backend process). My reason for creating this question is because I'm stuck !! I'm confused about how to approach the actual workflow logic. I was thinking about creating a Provider Interface with the most common methods getStatus, activateSIM and barrSIM and then implementing that interface for each provider. So class Provider1 implements Provider - Then use a Factory to create the required class depending on user selected SIM card and invoking the method selected. This would work fine if all providers offered the same methods but they don't - there are a subset which are common but some providers offer extra methods - how can I implement that flexibly ? How can I deal with the processes where the workflow is different - ie some methods require and API call and value returned and some require an email to be sent and the next stage of the process doesn't start until the email reply is recieved ... Please help ! (I hope this is a readable question and that this is the correct place to be asking) Update I guess what I'm trying to avoid is a big if or switch / case statement - some design pattern that gives me a flexible approach to implementing this kind of fluid workflow .. anyone ?

    Read the article

  • .NET remoting exception: Permission denied: cannot call non-public or static methods remotely.

    - by Vilx-
    I'm writing a program which will allow to load a specific managed .DLL file and play with it. Since I want the ability to unload the .DLL file, I'm creating two AppDomains - one for the app itself, the other for the currently loaded .DLL. Since most of the objects in the loaded .DLL do not serialize well, I'm creating a MarshalByRefObject wrapper class which will keep the object itself in its own AppDomain, and expose some reflection functions to the main application AppDomain. However when I try to invoke a method on the remote object I get stuck with an exception: Permission denied: cannot call non-public or static methods remotely. This is very strange, because I'm not using any non-public or static methods at all. In essence, what I have is: class RemoteObjectWrapper: MarshalByRefObject { private Type SourceType; private object Source; public RemoteObjectWrapper(object source) { if (source == null) throw new ArgumentNullException("source"); this.Source = source; this.SourceType = source.GetType(); } public T WrapValue<T>(object value) { if ( value == null ) return default(T); var TType = typeof(T); if (TType == typeof(RemoteObjectWrapper)) value = new RemoteObjectWrapper(value); return (T)value; } public T InvokeMethod<T>(string methodName, params object[] args) { return WrapValue<T>(SourceType.InvokeMember(methodName, System.Reflection.BindingFlags.FlattenHierarchy | System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.InvokeMethod | System.Reflection.BindingFlags.Public, null, this.Source, args)); } } And I get the exception when I try to do: var c = SomeInstanceOfRemoteObjectWrapper.InvokeMethod<RemoteObjectWrapper>("somePublicMethod", "some string parameter"); What's going on here? As far as I can understand, the InvokeMethod method doesn't even get executed, the exception is thrown when I try to run it. Added: To clarify - SomeInstanceOfRemoteObjectWrapper is constructed in the .DLL's AppDomain and then returned to my main AppDomain, The InvokeMethod<T>() is called from my main AppDomain (and I expect it to execute in the .DLL's AppDomain).

    Read the article

  • Any way to avoid creating a huge C# COM interface wrapper when only a few methods needed?

    - by Paul Accisano
    Greetings all, I’m working on a C# program that requires being able to get the index of the hot item in Windows 7 Explorer’s new ItemsView control. Fortunately, Microsoft has provided a way to do this through UI Automation, by querying custom properties of the control. Unfortunately, the System.Windows.Automation namespace inexplicably does not seem to provide a way to query custom properties! This leaves me with the undesirable position of having to completely ditch the C# Automation namespace and use only the unmanaged COM version. One way to do it would be to put all the Automation code in a separate C++/CLI module and call it from my C# application. However, I would like to avoid this option if possible, as it adds more files to my project, and I’d have to worry about 32/64-bit problems and such. The other option is to make use of the ComImport attribute to declare the relevant interfaces and do everything through COM-interop. This is what I would like to do. However, the relevant interfaces, such as IUIAutomation and IUIAutomationElement, are FREAKING HUGE. They have hundreds of methods in total, and reference tons and tons of interfaces (which I assume I would have to also declare), almost all of which I will never ever use. I don’t think the UI Automation interfaces are declared in any Type Library either, so I can’t use TLBIMP. Is there any way I can avoid having to manually translate a bajillion method signatures into C# and instead only declare the ten or so methods I actually need? I see that C# 4.0 added a new “dynamic” type that is supposed to ease COM interop; is that at all relevant to my problem? Thanks

    Read the article

  • How to determine which inheriting class is using an abstract class' methods.

    - by Kin
    In my console application have an abstract Factory class "Listener" which contains code for listening and accepting connections, and spawning client classes. This class is inherited by two more classes (WorldListener, and MasterListener) that contain more protocol specific overrides and functions. I also have a helper class (ConsoleWrapper) which encapsulates and extends System.Console, containing methods for writing to console info on what is happening to instances of the WorldListener and MasterListener. I need a way to determine in the abstract ListenerClass which Inheriting class is calling its methods. Any help with this problem would be greatly appreciated! I am stumped :X Simplified example of what I am trying to do. abstract class Listener { public void DoSomething() { if(inheriting class == WorldListener) ConsoleWrapper.WorldWrite("Did something!"); if(inheriting class == MasterListener) ConsoleWrapper.MasterWrite("Did something!"); } } public static ConsoleWrapper { public void WorldWrite(string input) { System.Console.WriteLine("[World] {0}", input); } } public class WorldListener : Listener { public void DoSomethingSpecific() { ConsoleWrapper.WorldWrite("I did something specific!"); } } public void Main() { new WorldListener(); new MasterListener(); } Expected output [World] Did something! [World] I did something specific! [Master] Did something! [World] I did something specific!

    Read the article

  • Ruby on Rails: How to sanitize a string for SQL when not using find and other built-in methods?

    - by williamjones
    I'm trying to sanitize a string that involves user input without having to resort to manually crafting my own possibly buggy regex if possible. There are a number of methods in Rails that can allow you to enter in native SQL commands, how do people escape user input for those? The question I'm asking is a broad one, but in my particular case, I'm working with a column in my Postgres database that Rails does not natively understand as far as I know, the tsvector, which holds plain text search information. Rails is able to write and read from it as if it's a string, however, unlike a string, it doesn't seem to be automatically escaping it when I do things like vector= inside the model. For example, when I do model.name='::', where name is a string, it works fine. When I do model.vector='::' it errors out: ActiveRecord::StatementInvalid: PGError: ERROR: syntax error in tsvector: "::" "vectors" = E'::' WHERE "id" = 1 This seems to be a problem caused by lack of escaping of the semicolons, and I can manually set the vector='\:\:' fine. I also had the bright idea, maybe I can just call something like: ActiveRecord::Base.connection.execute "UPDATE medias SET vectors = ? WHERE id = 1", "::" However, this syntax doesn't work, because the raw SQL commands don't have access to find's method of escaping and inputting strings by using the ? mark. This strikes me as the same problem as calling connection.execute with any type of user input, as it all boils down to sanitizing the strings, but I can't seem to find any way to manually call Rails' SQL string sanitization methods. Can anyone provide any advice?

    Read the article

  • What's the Matlab equivalent of NULL, when it's calling COM/ActiveX methods?

    - by David M
    Hi, I maintain a program which can be automated via COM. Generally customers use VBS to do their scripting, but we have a couple of customers who use Matlab's ActiveX support and are having trouble calling COM object methods with a NULL parameter. They've asked how they do this in Matlab - and I've been scouring Mathworks' COM/ActiveX documentation for a day or so now and can't figure it out. Their example code might look something like this: function do_something() OurAppInstance = actxserver('Foo.Application'); OurAppInstance.Method('Hello', NULL) end where NULL is where in another language, we'd write NULL or nil or Nothing, or, of course, pass in an object. The problem is this is optional (and these are implemented as optional parameters in most, but not all, cases) - these methods expect to get NULL quite often. They tell me they've tried [] (which from my reading seemed the most likely) as well as '', Nothing, 'Nothing', None, Null, and 0. I have no idea how many of those are even valid Matlab keywords - certainly none work in this case. Can anyone help? What's Matlab's syntax for a null pointer / object for use as a COM method parameter? Update: Thanks for all the replies so far! Unfortunately, none of the answers seem to work, not even libpointer. The error is the same in all cases: Error: Type mismatch, argument 2 This parameter in the COM type library is described in RIDL as: HRESULT _stdcall OurMethod([in] BSTR strParamOne, [in, optional] OurCoClass* oParamTwo, [out, retval] VARIANT_BOOL* bResult); The coclass in question implements a single interface descending from IDispatch.

    Read the article

  • TypeError: Error #2007: Parameter child must be non-null.

    - by Bobby Francis Joseph
    I am running the following piece of code: package { import fl.controls.Button; import fl.controls.Label; import fl.controls.RadioButton; import fl.controls.RadioButtonGroup; import flash.display.Sprite; import flash.events.MouseEvent; import flash.text.TextFieldAutoSize; public class RadioButtonExample extends Sprite { private var j:uint; private var padding:uint = 10; private var currHeight:uint = 0; private var verticalSpacing:uint = 30; private var rbg:RadioButtonGroup; private var questionLabel:Label; private var answerLabel:Label; private var question:String = "What day is known internationally as Speak Like A Pirate Day?"; private var answers:Array = [ "August 12", "March 4", "September 19", "June 22" ]; public function RadioButtonExample() { setupQuiz(); } private function setupQuiz():void { setupQuestionLabel(); setupRadioButtons(); setupButton(); setupAnswerLabel(); } private function setupQuestionLabel():void { questionLabel = new Label(); questionLabel.text = question; questionLabel.autoSize = TextFieldAutoSize.LEFT; questionLabel.move(padding, padding + currHeight); currHeight += verticalSpacing; addChild(questionLabel); } private function setupAnswerLabel():void { answerLabel = new Label(); answerLabel.text = ""; answerLabel.autoSize = TextFieldAutoSize.LEFT; answerLabel.move(padding + 120, padding + currHeight); addChild(answerLabel); } private function setupRadioButtons():void { rbg = new RadioButtonGroup("question1"); createRadioButton(answers[0], rbg); createRadioButton(answers[1], rbg); createRadioButton(answers[2], rbg); createRadioButton(answers[3], rbg); } private function setupButton():void { var b:Button = new Button(); b.move(padding, padding + currHeight); b.label = "Check Answer"; b.addEventListener(MouseEvent.CLICK, checkAnswer); addChild(b); } private function createRadioButton(rbLabel:String, rbg:RadioButtonGroup):void { var rb:RadioButton = new RadioButton(); rb.group = rbg; rb.label = rbLabel; rb.move(padding, padding + currHeight); addChild(rb); currHeight += verticalSpacing; } private function checkAnswer(e:MouseEvent):void { if (rbg.selection == null) { return; } var resultStr:String = (rbg.selection.label == answers[2]) ? "Correct" : "Incorrect"; answerLabel.text = resultStr; } } } This is from Adobe Livedocs. http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/ I have added a Radiobutton to stage and then deleted it so that its there in the library. However I am getting the following error TypeError: Error #2007: Parameter child must be non-null. at flash.display::DisplayObjectContainer/addChildAt() at fl.controls::BaseButton/fl.controls:BaseButton::drawBackground() at fl.controls::LabelButton/fl.controls:LabelButton::draw() at fl.controls::Button/fl.controls:Button::draw() at fl.core::UIComponent/::callLaterDispatcher() Can anyone tell me what is going on and how to remove this error.

    Read the article

  • Should you declare methods using overloads or optional parameters in C# 4.0?

    - by Greg Beech
    I was watching Anders' talk about C# 4.0 and sneak preview of C# 5.0, and it got me thinking about when optional parameters are available in C# what is going to be the recommended way to declare methods that do not need all parameters specified? For example something like the FileStream class has about fifteen different constructors which can be divided into logical 'families' e.g. the ones below from a string, the ones from an IntPtr and the ones from a SafeFileHandle. FileStream(string,FileMode); FileStream(string,FileMode,FileAccess); FileStream(string,FileMode,FileAccess,FileShare); FileStream(string,FileMode,FileAccess,FileShare,int); FileStream(string,FileMode,FileAccess,FileShare,int,bool); It seems to me that this type of pattern could be simplified by having three constructors instead, and using optional parameters for the ones that can be defaulted, which would make the different families of constructors more distinct [note: I know this change will not be made in the BCL, I'm talking hypothetically for this type of situation]. What do you think? From C# 4.0 will it make more sense to make closely related groups of constructors and methods a single method with optional parameters, or is there a good reason to stick with the traditional many-overload mechanism?

    Read the article

  • How to determine which inheriting class is using an abstract class's methods.

    - by Kin
    In my console application have an abstract Factory class "Listener" which contains code for listening and accepting connections, and spawning client classes. This class is inherited by two more classes (WorldListener, and MasterListener) that contain more protocol specific overrides and functions. I also have a helper class (ConsoleWrapper) which encapsulates and extends System.Console, containing methods for writing to console info on what is happening to instances of the WorldListener and MasterListener. I need a way to determine in the abstract ListenerClass which Inheriting class is calling its methods. Any help with this problem would be greatly appreciated! I am stumped :X Simplified example of what I am trying to do. abstract class Listener { public void DoSomething() { if(inheriting class == WorldListener) ConsoleWrapper.WorldWrite("Did something!"); if(inheriting class == MasterListener) ConsoleWrapper.MasterWrite("Did something!"); } } public static ConsoleWrapper { public void WorldWrite(string input) { System.Console.WriteLine("[World] {0}", input); } } public class WorldListener : Listener { public void DoSomethingSpecific() { ConsoleWrapper.WorldWrite("I did something specific!"); } } public void Main() { new WorldListener(); new MasterListener(); } Expected output [World] Did something! [World] I did something specific! [Master] Did something! [World] I did something specific!

    Read the article

  • How to structure code with 2 methods, one after another, which throw the same two exceptions?

    - by dotnetdev
    Hi, I have two methods, one called straight after another, which both throw the exact same 2 exceptions (IF an erroneous condition occurs, not stating that I'm getting exceptions). For this, should I write seperate try and catch blocks with the one statement in each try block and catch both exceptions (Both of which I can handle as I checked MSDN class library reference and there is something I can do, eg, re-open SqlConnection or run a query and not a stored proc which does not exist). So code like this: try { obj.Open(); } catch (SqlException) { // Take action here. } catch (InvalidOperationException) { // Take action here. } And likewise for the other method I call straight after. This seems like a very messy way of coding. The other way is to code with the exception variable (that is ommited as I am using AOP to log the exception details, using a class-level attribute). Doing this, this could aid me in finding out which method caused an exception and then taking action accordingly. Is this the best approach or is there another best practise altogether? I also assume that, as only these two methods are thrown, I do not need to catch Exception as that would be for an exception I cannot handle (causes way out of my control). Thanks

    Read the article

  • Where do you store the private key for your code signing certificate?

    - by flipdoubt
    I recently acquired a code signing certificate for my employer, but I am not the InstallShield developer who will sign the binaries before distribution. I know I can export the certificate along with its private key, but where do I store it so the InstallShield developer can install it on his machine? Should I remove it from my machine once I give it to the person doing the signing? Where do I store the master copy? Obviously, source control is not the best place, unless I lock down that directory in SVN.

    Read the article

  • Formatting the code en-masse in Visual Studio

    - by AngryHacker
    I've inherited a project where all the private variables, and there are thousands, are separated by a blank line. For instance, private pnlSecurityReport _pnlSecurityReport = null; private pnlCalendar _pnlCalendar = null; private CtlContacts _pnlContacts = null; private pnlEmails _pnlEmails = null; private CtlNotes _pnlNotes = null; private pnlRoles _pnlRoles = null; private pnlSecurity _pnlSecurity = null; private pnlSignatures _pnlSignatures = null; This is really annoying. I'd like to remove the blank lines. Beyond writing my own tool to seek out and remove the extra line, is there a way to do this, perhaps, using RegEx-Fu in the Search and Replace dialog?

    Read the article

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