Search Results

Search found 7554 results on 303 pages for 'shared secret'.

Page 91/303 | < Previous Page | 87 88 89 90 91 92 93 94 95 96 97 98  | Next Page >

  • Fairness: Where can it be better handled?

    - by Srinivas Nayak
    Hi, I would like to share one of my practical experience with multiprogramming here. Yesterday I had written a multiprogram. Modifications to sharable resources were put under critical sections protected by P(mutex) and V(mutex) and those critical section code were put in a common library. The library will be used by concurrent applications (of my own). I had three applications that will use the common code from library and do their stuff independently. my library --------- work_on_shared_resource { P(mutex) get_shared_resource work_with_it V(mutex) } --------- my application ----------- application1 { *[ work_on_shared_resource do_something_else_non_ctitical ] } application2 { *[ work_on_shared_resource do_something_else_non_ctitical ] } application3 { *[ work_on_shared_resource ] } *[...] denote a loop. ------------ I had to run the applications on Linux OS. I had a thought in my mind, hanging over years, that, OS shall schedule all the processes running under him with all fairness. In other words, it will give all the processes, their pie of resource-usage equally well. When first two applications were put to work, they run perfectly well without deadlock. But when the third application started running, always the third one got the resources, but since it is not doing anything in its non-critical region, it gets the shared resource more often when other tasks are doing something else. So the other two applications were found almost totally halted. When the third application got terminated forcefully, the previous two applications resumed their work as before. I think, this is a case of starvation, first two applications had to starve. Now how can we ensure fairness? Now I started believing that OS scheduler is innocent and blind. It depends upon who won the race; he got the largest pie of CPU and resource. Shall we attempt to ensure fairness of resource users in the critical-section code in library? Or shall we leave it up to the applications to ensure fairness by being liberal, not greedy? To my knowledge, adding code to ensure fairness to the common library shall be an overwhelming task. On the other hand, believing on the applications will also never ensure 100% fairness. The application which does a very little task after working with shared resources shall win the race where as the application which does heavy processing after their work with shared resources shall always starve. What is the best practice in this case? Where we ensure fairness and how? Sincerely, Srinivas Nayak

    Read the article

  • Should Application_End fire on an automatic App Pool Recycle?

    - by Laramie
    I have read this, this, this and this plus a dozen other posts/blogs. I have an ASP.Net app in shared hosting that is frequently recycling. We use NLog and have the following code in global.asax void Application_Start(object sender, EventArgs e) { NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); logger.Debug("\r\n\r\nAPPLICATION STARTING\r\n\r\n"); } protected void Application_OnEnd(Object sender, EventArgs e) { NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); logger.Debug("\r\n\r\nAPPLICATION_OnEnd\r\n\r\n"); } void Application_End(object sender, EventArgs e) { HttpRuntime runtime = (HttpRuntime)typeof(System.Web.HttpRuntime).InvokeMember("_theRuntime", BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.GetField, null, null, null); if (runtime == null) return; string shutDownMessage = (string)runtime.GetType().InvokeMember("_shutDownMessage", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField, null, runtime, null); string shutDownStack = (string)runtime.GetType().InvokeMember("_shutDownStack", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.GetField, null, runtime, null); ApplicationShutdownReason shutdownReason = System.Web.Hosting.HostingEnvironment.ShutdownReason; NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); logger.Debug(String.Format("\r\n\r\nAPPLICATION END\r\n\r\n_shutDownReason = {2}\r\n\r\n _shutDownMessage = {0}\r\n\r\n_shutDownStack = {1}\r\n\r\n", shutDownMessage, shutDownStack, shutdownReason)); } void Application_Error(object sender, EventArgs e) { NLog.Logger logger = NLog.LogManager.GetCurrentClassLogger(); logger.Debug("\r\n\r\nApplication_Error\r\n\r\n"); } Our log file is littered with "APPLICATION STARTING" entries, but neither Application_OnEnd, Application_End, nor Application_Error are ever fired during these spontaneous restarts. I know they are working because there are entries for touching the web.config or /bin files. We also ran a memory overload test and can trigger an OutOfMemoryException which is caught in Application_Error. We are trying to determine whether the virtual memory limit is causing the recycling. We have added GC.GetTotalMemory(false) throughout the code, but this is for all of .Net, not just our App´s pool, correct? We've also tried var oPerfCounter = new PerformanceCounter(); oPerfCounter.CategoryName = "Process"; oPerfCounter.CounterName = "Virtual Bytes"; oPerfCounter.InstanceName = "iisExpress"; logger.Debug("Virtual Bytes: " + oPerfCounter.RawValue + " bytes"); but don't have permission in shared hosting. I've monitored the app on a dev server with the same requests that caused the recycles in production with ANTS Memory Profiler attached and can't seem to find a culprit. We have also run it with a debugger attached in dev to check for uncaught exceptions in spawned threads that might cause the app to abort. My questions are these: How can I effectively monitor memory usage in shared hosting to tell how much my application is consuming prior to an application recycle? Why are the Application_[End/OnEnd/Error] handlers in global.asax not being called? How else can I determine what is causing these recycles? Thanks.

    Read the article

  • How can I allow users to switch data sources for an SSRS report?

    - by fatcat1111
    I have two SQL Server databases with identical schemas, but different data. I also have SSRS generating reports, in native mode, for one of the databases. All reports the same shared data source. I would like to allow users to get reports for the other database. I created a second shared data source for the second database. Modifying the reports to use this second data source results in reports as expected. Because the RDLs are the same, except for the data source, and because I don't want to maintain what are basically duplicate reports, I'm looking for a way to dynamically switch data sources, depending on user input. Is there an easy means of accomplishing this? An existing solution would be best. Barring that, can the RDL's data source be parametrized? Or, can the RDS's connection string be parametrized?

    Read the article

  • FxCop giving a warning on private constructor CA1823 and CA1053

    - by Luis Sánchez
    I have a class that looks like the following: Public Class Utilities Public Shared Function blah(userCode As String) As String 'doing some stuff End Function End Class I'm running FxCop 10 on it and it says: "Because type 'Utilities' contains only 'static' ( 'Shared' in Visual Basic) members, add a default private constructor to prevent the compiler from adding a default public constructor." Ok, you're right Mr. FxCop, I'll add a private constructor: Private Utilities() Now I'm having: "It appears that field 'Utilities.Utilities' is never used or is only ever assigned to. Use this field or remove it." Any ideas of what should I do to get rid of both warnings?

    Read the article

  • default webmail url workaround

    - by jan
    Hi, Is there a way or at least a workaround on masking default webmail urls or disabling access webmail urls so users will not be able to change their passwords? Website is PHP based and is using apache server under a shared hosting account. The thing is that http://domain.com/webmail will let users access the main panel where they can change their individual passwords. We do not need this. Most solutions point to changing httpd.conf which we are not allowed to change since this is on a shared hosting service. I'm looking for at least a workaround to this issue. How about disabling it through their browsers if my client is under a network server, this would be a decent workaround isn't it? or are there any more suggestions aside from this? Please help. This is my urgent issue. Thank you very much!

    Read the article

  • VB.NET, make a function with return type generic ?

    - by Quandary
    Currently I have written a function to deserialize XML as seen below. How do I change it so I don't have to replace the type every time I want to serialize another object type ? The current object type is cToolConfig. How do I make this function generic ? Public Shared Function DeserializeFromXML(ByRef strFileNameAndPath As String) As XMLhandler.XMLserialization.cToolConfig Dim deserializer As New System.Xml.Serialization.XmlSerializer(GetType(cToolConfig)) Dim srEncodingReader As IO.StreamReader = New IO.StreamReader(strFileNameAndPath, System.Text.Encoding.UTF8) Dim ThisFacility As cToolConfig ThisFacility = DirectCast(deserializer.Deserialize(srEncodingReader), cToolConfig) srEncodingReader.Close() srEncodingReader.Dispose() Return ThisFacility End Function Public Shared Function DeserializeFromXML1(ByRef strFileNameAndPath As String) As System.Collections.Generic.List(Of XMLhandler.XMLserialization.cToolConfig) Dim deserializer As New System.Xml.Serialization.XmlSerializer(GetType(System.Collections.Generic.List(Of cToolConfig))) Dim srEncodingReader As IO.StreamReader = New IO.StreamReader(strFileNameAndPath, System.Text.Encoding.UTF8) Dim FacilityList As System.Collections.Generic.List(Of cToolConfig) FacilityList = DirectCast(deserializer.Deserialize(srEncodingReader), System.Collections.Generic.List(Of cToolConfig)) srEncodingReader.Close() srEncodingReader.Dispose() Return FacilityList End Function

    Read the article

  • help finding a hosing company with unixODBC and FreeTDS support

    - by patrick
    I need to find a hosting company that provides a LAMP stack, the P being PHP. Finding that is pretty easy, but I have a further requirement of unixODBC and FreeTDS or some equilant. The project will require a remote connection to a Microsoft SQL 2005 database. Most of the project will use a local MySQL database but it also requires data from a remote MS SQL 2005 database. In my reading it looks like I'll need unixODBC and FreeTDS installed on the server to make that connection. So far I've been unable to find a shared host that provides these. Can anyone suggest or use a host that might work? The project has budget limits so we we're hoping to find a shared host.

    Read the article

  • Why can't I publish MVC project

    - by Vnuk
    I'm having problems publishing my MVC project. When I do publish and upload everything to web server I get this: [InvalidOperationException: The view 'Index' or its master could not be found. The following locations were searched: ~/Views/Home/Index.aspx ~/Views/Home/Index.ascx ~/Views/Shared/Index.aspx ~/Views/Shared/Index.ascx] Weird thing is that Index.aspx exists in ~/Views/Home/, but IIS cannot find it there. If I copy entire project to web server and let asp.net compile it on the fly it works like a charm. My routing code: routes.MapRoute( _ "Default", _ "{controller}/{action}/{id}", _ New With {.controller = "Home", .action = "Index", .id = ""} _ ) routes.MapRoute("Root", "", New With {.controller = "Home", .action = "Index", .id =""}) I'm using IIS7 on Windows 2008 Web server. ASP.NET MVC 1.0, Visual Studio 2008. I've tried it local with IIS7 on Windows 7 - same error.

    Read the article

  • How to add the ImageMagick install to my path on Ubuntu

    - by Josh
    I have had been on a roller coaster trying to get ImageMagick to work on my Ubuntu slice. I Whenever I try to upload an image I get the following error: /tmp/stream.1170.0 is not recognized by the 'identify' command. If I type 'which identify' I get: /usr/local/bin/identify If I run '/usr/local/bin/identify' or just 'identify', I get the following error: /usr/local/bin/identify: error while loading shared libraries: libMagickCore.so.3: cannot open shared object file: No such file or directory If I run '/usr/bin/identify', ImageMagick is run just fine. How can I set my path to where when Paperclip runs the identify command, it points to /usr/bin/identify? Thanks. p.s. I have tried adding this to paperclip.rb: Paperclip.options[:command_path] = '/usr/bin' and Paperclip.options[:command_path] = '/usr/local/bin'

    Read the article

  • MySQL query cache vs caching result-sets in the application layer

    - by GetFree
    I'm running a php/mysql-driven website with a lot of visits and I'm considering the possibility of caching result-sets in shared memory in order to reduce database load. However, right now MySQL's query cache is enabled and it seems to be doing a pretty good job since if I disable query caching, the use of CPU jumps to 100% immediately. Given that situation, I dont know if caching result-sets (or even the generated HTML code) locally in shared memory with PHP will result in any noticeable performace improvement. Does anyone out there have any experience on this matter? PS: Please avoid suggesting heavy-artillery solutions like memcached. Right now I'm looking for simple solutions that dont require too much time to implement, deploy and maintain.

    Read the article

  • Flash AS3 - Dispatching Events from Parent Class to Child Class

    - by John Russell
    I think this is a pretty simply problem but I do not seem to be able to pull it off. Basically I have a parent class A, and a child class B. Class A instantiates class B with addChild. There is a shared object which is being updated from a java server (red5) that has an event listener attached to it in class A. I have a function in class A which will pass certain, specific updates from this shared object to class B. The problem occurs is that when class B is instantiated, the event listener from class A doesn't work anymore. I have not removed the event listener from A. Any thoughts?

    Read the article

  • Code Analysis Error: Declare types in namespaces

    - by George
    Is VS2010, I analyzed my code and got this error: Warning 64 CA1050 : Microsoft.Design : 'ApplicationVariables' should be declared inside a namespace. C:\My\Code\BESI\BESI\App_Code\ApplicationVariables.vb 10 C:\...\BESI\ Here is some reference info on the error. Essentially, I tried to create a class to be used to access data in the Application object in a typed way. The warning message said unless I put my (ApplicationVariables) class in a Namespace, that I wouldn't be able to use it. But I am using it, so what gives? Also, here is a link to another StackOverflow article that talks about how to disable this warning in VS2008, but how would you disable it for 2010? There is no GlobalSuppressions.vb file for VS2010. Here is the code it is complaining a bout: Public Class ApplicationVariables 'Shared Sub New() 'End Sub 'New Public Shared Property PaymentMethods() As PaymentMethods Get Return CType(HttpContext.Current.Application.Item("PaymentMethods"), PaymentMethods) End Get Set(ByVal value As PaymentMethods) HttpContext.Current.Application.Item("PaymentMethods") = value End Set End Property 'Etc, Etc... End Class

    Read the article

  • Why isn't an exception thrown when the right .NET framework version is not present?

    - by Nate Heinrich
    We have a .NET application which targets .NET 3.5. Our clients run it from a shared drive (very infrequently) in order to have a central config file location. We have noticed that if a workstation accesses the shared drive and runs the program, but does not have .NET 3.5 installed, nothing happens, no error, no exception, no log entry, it just doesn't launch. Why is there no error message shown in windows by the CLR? Is there something I can put at the beginning of the code that would ensure that a proper error message is displayed? It is not an option to run an installer that would check for prereqs, as we are only installing it in one central location. Thanks.

    Read the article

  • How do you run a uncompiled CGI?

    - by Toast
    I'm going to get right to it. iPage shared hosting. Trying to use mimetex.cgi to render math. Source code is at the link. After preparing everything just as I had with a different shared host (which worked), I get errors. Tech support tells me I need to upload the uncompiled source and use that instead. ??? Rather than going with them just being ignorant and wrong, I'm going to assume I'm missing something. How am I supposed to execute and make use of the uncompiled source code? What the hell is wrong with a hosting service that doesn't support running compiled CGI written in C (as far as I can tell)?

    Read the article

  • MVC pattern implementation. What is the n-relation between its components

    - by Srodriguez
    Dear all, I'm working in a C# project and we are , in order to get some unity across the different parts of our UI, trying to use the MVC pattern. The client is windows form based and I'm trying to create a simple MVC pattern implementation. It's been more challenging than expected, but I still have some questions regarding the MVC pattern. The problem comes mostly from the n-n relationships between its components: Here is what I've understood, but I'm not sure at all of it. Maybe someone can correct me? Model: can be shared among different Views. 1-n relationship between Model-View View: shows the state of the model. only one controller (can be shared among different views?). 1-1 relationship with the Model, 1-1 relationship with the controller Controller: handles the user actions on the view and updates the model. One controller can be shared among different views, a controller interacts only with one model? I'm not sure about the two last ones: Can a view have several controller? Or can a view share a controller with another view? Or is it only a 1:1 relationship? Can a controller handle several views? can it interact with several models? Also, I take advantage of this question to ask another MVC related question. I've suppressed all the synchronous calls between the different members of the MVC, making use of the events and delegates. One last call is still synchronous and is actually the most important one: The call between the view and the controller is still synchronous, as I need to know rather the controller has been able to handle the user's action or not. This is very bad as it means that I could block the UI thread (hence the client itself) while the controller is processing or doing some work. How can I avoid this? I can make use of the callback but then how do i know to which event the callback comes from? PS: I can't change the pattern at this stage, so please avoid answers of type "use MVP or MVVC, etc ;) Thanks!

    Read the article

  • MVC pattern implementation. What is the n-relation between its components

    - by Srodriguez
    Dear all, I'm working in a C# project and we are , in order to get some unity across the different parts of our UI, trying to use the MVC pattern. The client is windows form based and I'm trying to create a simple MVC pattern implementation. It's been more challenging than expected, but I still have some questions regarding the MVC pattern. The problem comes mostly from the n-n relationships between its components: Here is what I've understood, but I'm not sure at all of it. Maybe someone can correct me? Model: can be shared among different Views. 1-n relationship between Model-View View: shows the state of the model. only one controller (can be shared among different views?). 1-1 relationship with the Model, 1-1 relationship with the controller Controller: handles the user actions on the view and updates the model. One controller can be shared among different views, a controller interacts only with one model? I'm not sure about the two last ones: Can a view have several controller? Or can a view share a controller with another view? Or is it only a 1:1 relationship? Can a controller handle several views? can it interact with several models? Also, I take advantage of this question to ask another MVC related question. I've suppressed all the synchronous calls between the different members of the MVC, making use of the events and delegates. One last call is still synchronous and is actually the most important one: The call between the view and the controller is still synchronous, as I need to know rather the controller has been able to handle the user's action or not. This is very bad as it means that I could block the UI thread (hence the client itself) while the controller is processing or doing some work. How can I avoid this? I can make use of the callback but then how do i know to which event the callback comes from? PS: I can't change the pattern at this stage, so please avoid answers of type "use MVP or MVVC, etc ;) Thanks!

    Read the article

  • Can 'locals' be used with 'collection' when rendering partials in Rails?

    - by Gav
    Everything works okay when I try to render a partial like this: = render :partial => "/shared/enquiry/car_type", :collection => @enquiry.available_car_types However, if I also want to pass a variable (in this case 'path', because I'm sharing this partial across two forms), the path is not available to me: = render :partial => "/shared/enquiry/car_type", :collection => @enquiry.available_car_types, :locals => {:path => customers_enquiry_path} I've tried moving things around, but nothing appears to work, leading me to believe one cannot use locals with collections. Any help would be appreciated. Gav

    Read the article

  • Using a "vo" for joined data?

    - by keithjgrant
    I'm building a small financial system. Because of double-entry accounting, transactions always come in batches of two or more, so I've got a batch table and a transaction table. (The transaction table has batch_id, account_id, and amount fields, and shared data like date and description are relegated to the batch table). I've been using basic vo-type models for each table so far. Because of this table structure structure, though, transactions will almost always be selected with a join on the batch table. So should I take the selected records and splice them into two separate vo objects, or should I create a "shared" vo that contains both batch and transaction data? There are a few cases in which batch records and/or transaction records. Are there possible pitfalls down the road if I have "overlapping" vo classes?

    Read the article

  • How do I get the server hostname from a mounted directory with cocoa/obj-c?

    - by Andrew
    Currently when I open a file with my program I can select files on a server by clicking on the server name in the sidebar in an NSOpenPanel and then selecting the file. No problem, this works fine for using the file as long as the shared directory is mounted. I get a path like "/Volumes/SHARENAME/filename.bla". My question is how do I get the server hostname of the computer it came from. For instance, if I clicked on the device with name SERVERNAME under "Shared" in the NSOpenPanel how do I get SERVERNAME from "/Volumes/SHARENAME/filename.bla". I have looked at quite a bit of documentation and have been unable to find a solution for this problem. Any help toward this will be greatly appreciated. Thank you.

    Read the article

  • How would you implement database updates via email?

    - by jules
    I'm building a public website which has its own domain name with pop/smtp mail services. I'm considering giving users the option to update their data via email - something similar to the functionality found in Flickr or Blogger where you email posts to a special email address. The email data is then processed and stored in the underlying database for the website. I'm using ASP.NET and SQL Server and using a shared hosting service. Any ideas how one would implement this, or if it's even possible using shared hosting? Thanks

    Read the article

  • Using ssh for remote command

    - by user1663479
    I need to use ssh to execute a remote command such as: ssh -l jsilva xman /vol/2011/linux_x64/exe/mx201111.exe When I execute ssh I receive error message: /cmg/2011.11/linux_x64/exe/mx201111.exe: error while loading shared libraries: libmkl_intel_lp64.so: cannot open shared object file: No such file or directory This application uses the variable LD_LIBRARY_PATH. I inserted this variable into /etc/profiles in localhost and remote host. The filesystem /cmg is mounted by autofs for both hosts (local and remote). Anybody have idea how to resolve this problem? Thanks!

    Read the article

  • How to make distributed builds using XCode 3.2 on OS X 10.6

    - by Sorin Sbarnea
    After I upgraded using a clean install from OS X 10.5 to 10.6.2 and upgraded the XCode to 3.2.1 I wasn't able to use distributed builds feature anymore. There are several issues that I detected: In most cases Bonjour is not detecting the other computers even they are on the same switch. I added a custom 'set' where I added manually the IP addreses of each computer. Even so I still get status: "unreachable" on them.BTW, ping does work without problems. Both share my computer for shared workgroup builds (distcc) and distribute builds via shared workgroup builds options are checked.

    Read the article

  • jaxb unmarshal problem

    - by Hoax
    private JAXBContext jaxbContext; private Marshaller marshaller; private Unmarshaller unmarshaller; private PoiList db; public XMLHandler() { try { JAXBContext.newInstance("x.y.shared"); } catch (JAXBException e) { e.printStackTrace(); } } public PoiList readXML() { try { unmarshaller = jaxbContext.createUnmarshaller(); unmarshaller.setEventHandler(new XMLValidEventHandler()); db = (PoiList) unmarshaller.unmarshal(new File("src/source.xml")); } catch (JAXBException e) { e.printStackTrace(); } return db; } gets me this Exception in thread "main" java.lang.NullPointerException at com.sem.server.XMLHandler.readXML(XMLHandler.java:32) at sem.server.testDataAPI.main(testDataAPI.java:13) Line 32 in this case is the jaxbContext.createUnmarshaller() Line. packages are x.y.client x.y.server (includes the XMLHandler) x.y.shared (includes jaxb generated classes) not really sure what the problem is. any help is appreciated!

    Read the article

  • Custom prerequsites to visual studio setup project

    - by Sandy
    I have a Visual Studio Setup project and have followed the steps mentioned in this link to load the Shared Add-in Support Update for the Microsoft .NET Framework 2.0 (KB908002) to the prerequisites list. The entry appears but there is this following warning shown No 'HomeSite' attribute has been provided for 'Shared Add-in Support Update for Microsoft .NET Framework 2.0 (KB908002)', so the package will be published to the same location as the bootstrapper. I use the Download component from the component vendor's website option. How do I set a homesite for this update so that the update is directly downloaded and installed. I do not want to distribute the update along with my setup. Thanks

    Read the article

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