Search Results

Search found 15797 results on 632 pages for 'session variables'.

Page 63/632 | < Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >

  • Transferring PuTTY session data

    - by toolkit
    My Windows NT account name was changed, and when starting PuTTY it now appears that my saved session information has been lost. The FAQ suggests that PuTTY sessions should be stored in HKEY_CURRENT_USER\Software\SimonTatham\PuTTY. Wikipedia explains that HKCU maps to NTUSER.DAT and USRCLASS.DAT under the current user's Desktop and Settings folder. I still have these files for my old account name, but I'm guessing there is no easy way to extract data from these files?

    Read the article

  • Faking the date for a specific shell session

    - by Julien Nicoulaud
    I'm certainly trying to achieve something weird here, but I want to fake the date locally for a shell session on GNU/Linux. I need to black-box test how a program behaves at different dates, and modifying the system-wide date can have unwanted side effects (cron jobs, messed up logs, etc). Any ideas ?

    Read the article

  • Accessing Network Printers from a Citrix Session:

    - by Harry
    We have an application that uses Active Reports documents. You pass a document the UNC of the printer and away it goes. We have a group that runs this application within a Citrix session and the truly networked printers function perfectly but shared printers that work well outside of Citrix become unreachable. Printers do not need to be defined on the machine running the report for the system to work. There is something in the way Critrix passes the information to the destination UNC that I don’t understand.

    Read the article

  • Need to set mailx variable to specify the From address

    - by user256817
    Running Oracle Linux 5.8 (which is just re-branded RedHat EL 5.8) I must change the From address. But we have scripts that use mailx which cannot be re-written to use any extra flags, so I'd like to use internal variables instead, which I see on the linux.die.net manpage on mailx is an alternative to the -r flag: -r address Sets the From address. Overrides any from variable specified in environment or startup files. Tilde escapes are disabled. The -r address options are passed to the mail transfer agent unless SMTP is used. This option exists for compatibility only; it is recommended to set the from variable directly instead. (Source: http://linux.die.net/man/1/mailx) How can we use these mailx variables? I tried adding this to /root/.mailrc, no go: set [email protected] I also added that to /etc/mail.rc with no gold. So I am turning to you, SuperUsers...

    Read the article

  • RDP session re-locks right after login

    - by Jon Bailey
    For some reason, after users do the initial authentication, the system logs in (or unlocks) and locks the screen again within a few seconds (without dropping the RDP session). I've seen this on XP SP3 and Server 2k3. Clients are both major versions of the MS client, and rdesktop. Update: We've seen the issue on a range of machines from 2k3 server (no logon/post logon scripts on servers) to XP SP3. Multiple machines have the same issue - even coming from a fresh and fully patched install.

    Read the article

  • Are PHP session files ever deleted?

    - by GetFree
    I see there are thousands of files in my "/tmp" directory (a CentOS machine) and almost all of them are PHP session files. I'm worried about the possible impact this might have on my system. Are those files ever deleted either by the OS, Apache or PHP? or I have to take care of it myself?

    Read the article

  • Setting Environment Variable for nginx and Rails consumption

    - by kolrie
    Apache's module mod_env offers a handy way of setting environment variables in configuration files, like: <VirtualHost *:80> ServerName xyz.com DocumentRoot /var/www/rails_app/public PassengerAppRoot /var/www/rails_app SetEnv MY_VARIABLE contents </VirtualHost> http://httpd.apache.org/docs/2.0/mod/mod_env.html#setenv However, in nginx I couldn't find anything that serves the same purpose. What's the alternative here? I thought of setting environment variables in .profile files (I am using Ubuntu 10.04), but that wouldn't have the same "per vHost" isolation I have with Apache, right? What are the alternatives here?

    Read the article

  • Do ALL your variables need to be declared private? [closed]

    - by skizeey
    Possible Duplicate: Why do we need private variables? I know that it's best practice to stay safe, and that we should always prevent others from directly accessing a class' properties. I hear this all the time from university professors, and I also see this all the time in a lot of source code released on the App Hub. In fact, professors say that they will actually take marks off for every variable that gets declared public. Now, this leaves me always declaring variables as private. No matter what. Even if each of these variables were to have both a getter and a setter. But here's the problem: it's tedious work. I tend to quickly lose interest in a project every time I need to have a variable in a class that could have simply been declared public instead of private with a getter and a setter. So my question is, do I really need to declare all my variables private? Or could I declare some variables public whenever they require both a getter and a setter?

    Read the article

  • Prevent one user from disconnecting an active remote desktop session

    - by Nick R
    I've got a server where a number of users are sharing user logins for a short period of time to prevent too many people from logging in at the same time. The users are connecting over remote desktop, but the problem is that when one user is busy doing something, another user logs in as the same user and disconnects the active session. Is there any way of preventing one user from logging in and disconnecting the same username who is already connected to somewhere else?

    Read the article

  • Do ALL your variables need to be declared private?

    - by shovonr
    I know that it's best practice to stay safe, and that we should always prevent others from directly accessing a class' properties. I hear this all the time from university professors, and I also see this all the time in a lot of source code released on the App Hub. In fact, professors say that they will actually take marks off for every variable that gets declared public. Now, this leaves me always declaring variables as private. No matter what. Even if each of these variables were to have both a getter and a setter. But here's the problem: it's tedious work. I tend to quickly loose interest in a project every time I need to have a variable in a class that could have simply been declared public instead of private with a getter and a setter. So my question is, do I really need to declare all my variables private? Or could I declare some variables public whenever they require both a getter and a setter?

    Read the article

  • Where should you store variables for a search program in java?

    - by Bored915
    I'm wondering which is a more effective storage method in java. Would be better to save variables that will not change in a class or a resource? They're going to be variables that contain a set amount so that later a search program will go through the list of variables so as to recognize possible options. Also if there is a more efficient method of storing them please say so or if i doesn't matter where i store them.

    Read the article

  • Best practice when using WebMethods and session

    - by Abdel Olakara
    Hi all, I want to reduce postback in one of my application page and use ajax instead. I used the WebMethod to do so.. I have a static WebMethod that needs to access the session variables and modify. and on the client side, i am calling this method using jQuery. I tried accessing the session as follows: [WebMethod] public static void TestWebMethod() { if (HttpContext.Current.Session["pitems"] != null) { log.Debug("Using the existing list"); Product prod = (Product)HttpContext.Current.Session["pitems"]; List<Configs> confs = cart.GetConfigs(); foreach (Configs citem in confis) { log.Info(citem.Description); } } log.Info("Inside the method!"); } The values are displayed correctly and seems to work.. but i would like to know if this practice is allowed as the method is a static methods and would like to know how it will behave if multiple people access the application. I would also like to know how developers do these kind of tasks in ASP if this is not the right method. Thanks in advance for your suggestions and ideas, Abdel Olakara

    Read the article

  • new Statefull session bean instance without calling lookup

    - by kislo_metal
    Hi! Scenario: I have @Singleton UserFactory (@Stateless could be) , it`s method createSession() generating @Statefull UserSession bean by manual lookup. If I am injecting by DI @EJB - i will get same instance during calling fromFactory() method(as it should be) What I want - is to get new instance of UserSession without preforming lookup. Q1: how could I call new instance of @Statefull session bean? Code: @Singleton @Startup @LocalBean public class UserFactory { @EJB private UserSession session; public UserFactory() { } @Schedule(second = "*/1", minute = "*", hour = "*") public void creatingInstances(){ try { InitialContext ctx = new InitialContext(); UserSession session2 = (UserSession) ctx.lookup("java:global/inferno/lic/UserSession"); System.out.println("in singleton UUID " +session2.getSessionUUID()); } catch (NamingException e) { e.printStackTrace(); } } @Schedule(second = "*/1", minute = "*", hour = "*") public void fromFactory(){ System.out.println("in singleton UUID " +session.getSessionUUID()); } public UserSession creatSession(){ UserSession session2 = null; try { InitialContext ctx = new InitialContext(); session2 = (UserSession) ctx.lookup("java:global/inferno/lic/UserSession"); System.out.println("in singleton UUID " +session2.getSessionUUID()); } catch (NamingException e) { e.printStackTrace(); } return session2; } } As I understand, calling of session.getClass().newInstance(); is not a best idea Q2 : is it true? I am using glassfish v3, ejb 3.1.

    Read the article

  • nhibernate : Repository Session Management

    - by frosty
    At the moment my repository has 2 constructors. When i call these from my mvc website i am alway calling first constructor and thus opening a new session. Should i been passing in the session. How should i be doing this. public CompanyRepository() { _session = NHibernateHelper.OpenSession(); } public CompanyRepository(ISession session) { _session = session; } public class NHibernateHelper { private static ISessionFactory _sessionFactory; private static ISessionFactory SessionFactory { get { if (_sessionFactory == null) { var configuration = new Configuration(); configuration.Configure(); configuration.AddAssembly(typeof(UserProfile).Assembly); configuration.SetProperty(NHibernate.Cfg.Environment.ConnectionStringName, System.Environment.MachineName); _sessionFactory = configuration.BuildSessionFactory(); } return _sessionFactory; } } public static ISession OpenSession() { return SessionFactory.OpenSession(); } } I'm using the Ninject IOC container ( very new to me ). I have the following container. How would i bind the ISession to the CompanyRepository. private class EStoreDependencies : NinjectModule { public override void Load() { Bind<ICompanyRepository>().To<CompanyRepository>(); Bind<IUserProfileRepository>().To<UserProfileRepository>(); Bind<IAddressRepository>().To<AddressRepository>(); Bind<IRolesService>().To<AspNetRoleProviderWrapper>(); Bind<IUserService>().To<AspNetMembershipProviderWrapper>(); Bind<ICurrentUserSerivce>().To<DefaultCurrentUserSerivce>(); Bind<IPasswordService>().To<AspNetMembershipProviderWrapper>(); Bind<IStatusResponseRepository>().To<StatusResponseRepository>(); Bind<ICategoryRepository>().To<CategoryRepository>(); Bind<IProductRepository>().To<ProductRepository>(); } }

    Read the article

  • inserting a form to session raises picklingerror - django

    - by shanyu
    I receive an exception when I add a form to the session: PicklingError: Can't pickle <class 'django.utils.functional.__proxy__'>: attribute lookup django.utils.functional.__proxy__ failed The form includes a few simple fields and has some javascript attached to a widget. It might be that Django forms cannot be pickled at all, but the exception seems to point to unicode lazy translation. To test further, I have also tried to insert only the form errors (an errordict) to the session and received the same error. I appreciate some help here, thanks in advance. EDIT: Here's why I insert a form into the session: I have an app that has a form. This form is rendered by a template tag in another app. When posted, if the form is valid, no problem, I do stuff and redirect to "next". However if it is not valid, I want to go back to the posting page to show errors. Recall that the comments app in this case redirects to an intermediate "hey, please fix the errors" page. I am trying to avoid this, and hence redirect back to the posting page with the form and its errors in the session that the template tag will render.

    Read the article

  • How can I find the jdbc connection timeout of a hibernate session

    - by StevenWilkins
    I currently have a long running thread which uses a hibernate session to perform many updates. We currently have our c3p0 connection timeout set to 20 minutes and it's timing out sometimes because of the number of updates we're performing. The solution I have is to periodically return the connection to the pool via closing the session (we have hibernate configured this way) and get a new one. Upping the timeout is not desirable because the same pool is used for the entire application. The problem is I don't know when to return the connection to the pool because I don't know what the timeout of the connection is. I know what the current setting is in our property file, but that can be changed without my knowledge at any time so it's fragile. Having a counter and returning the connection based on the number of updates I've performed is not ideal but could be my option of last resort. I have a hibernate session, how can I retrieve the connection timeout of the jdbc connection which backs the session? Using the SessionFactory and SessionFactoryImpl classes are perfectly acceptable.

    Read the article

  • new Stateful session bean instance without calling lookup

    - by kislo_metal
    Scenario: I have @Singleton UserFactory (@Stateless could be) , its method createSession() generating @Stateful UserSession bean by manual lookup. If I am injecting by DI @EJB - i will get same instance during calling fromFactory() method(as it should be) What I want - is to get new instance of UserSession without preforming lookup. Q1: how could I call new instance of @Stateful session bean? Code: @Singleton @Startup @LocalBean public class UserFactory { @EJB private UserSession session; public UserFactory() { } @Schedule(second = "*/1", minute = "*", hour = "*") public void creatingInstances(){ try { InitialContext ctx = new InitialContext(); UserSession session2 = (UserSession) ctx.lookup("java:global/inferno/lic/UserSession"); System.out.println("in singleton UUID " +session2.getSessionUUID()); } catch (NamingException e) { e.printStackTrace(); } } @Schedule(second = "*/1", minute = "*", hour = "*") public void fromFactory(){ System.out.println("in singleton UUID " +session.getSessionUUID()); } public UserSession creatSession(){ UserSession session2 = null; try { InitialContext ctx = new InitialContext(); session2 = (UserSession) ctx.lookup("java:global/inferno/lic/UserSession"); System.out.println("in singleton UUID " +session2.getSessionUUID()); } catch (NamingException e) { e.printStackTrace(); } return session2; } } As I understand, calling of session.getClass().newInstance(); is not a best idea Q2 : is it true? I am using glassfish v3, ejb 3.1.

    Read the article

  • Array to Array pushing in Zend Session object

    - by kate-koopy
    Hello! I have some example of pushing array to array in session object: class someClass extends someOtherOne { ...////// some other code here that starts session and creates namespace public function __add2Session($a,$b) { $namespc = $this -> __getnewNameSpace(); //returns a Zend Session Namesapce (object) if (!isset($namespc -> {$a})) { $namespc -> {$a} = array(); } array_push($namespc -> {$a}, $b); } } ...///////////// $item=array(1=>"one",2=>"two",3=>"three",4=>"four",5=>"five",6=>"six",7=>"seven"); $k = new someClass(); $cart = new Zend_Session_Namespace('Cart'); $k -> __add2Session("items",$item); The result is when I reload the page several times - the value of $cart -> items in the session gets overwritten and not populated. Can somebody explain why it occurs and how do I fix this? I want to have $cart -> items to be an "array in array" like: $cart -> items = array(array(1=>"one",2=>"two"), array(1=>"two",2=>"three"));

    Read the article

  • Store multiple values in a session variable

    - by user458790
    Hi, Before I ask my doubt, please consider this scenario that a user on my website have a profileID. With this profileID are associated some pluginID's. For eg: User1 might have 2, 3 and 5 plugins associated with its profile. When the user logs in, I store the profileID of the user in a session variable cod. At a certain page, the user tries to edit the plugins associated with his profile. So, on that page, I have retrieve those pluginID's from the DB. I have applied this code but this fetches only the maximum pluginID from the DB and not all the pluginID's. SqlCommand cmd1 = new SqlCommand("select plugin_id from profiles_plugins where id=(select id from profiles_plugins where profile_id=" + Convert.ToInt32(Session["cod"]) + ")", con); SqlDataReader dr1 = cmd1.ExecuteReader(); if (dr1.HasRows) { while (dr1.Read()) { Session["edp1"] = Convert.ToInt32(dr1[0]); } } dr1.Close(); cmd1.Dispose(); I was trying to figure out how can I store multiple pluginID's in this session variable? Thanks

    Read the article

  • Session scoped bean as class attribute of Spring MVC Controller

    - by Sotirios Delimanolis
    I have a User class: @Component @Scope("session") public class User { private String username; } And a Controller class: @Controller public class UserManager { @Autowired private User user; @ModelAttribute("user") private User createUser() { return user; } @RequestMapping(value = "/user") public String getUser(HttpServletRequest request) { Random r = new Random(); user.setUsername(new Double(r.nextDouble()).toString()); request.getSession().invalidate(); request.getSession(true); return "user"; } } I invalidate the session so that the next time i got to /users, I get another user. I'm expecting a different user because of user's session scope, but I get the same user. I checked in debug mode and it is the same object id in memory. My bean is declared as so: <bean id="user" class="org.synchronica.domain.User"> <aop:scoped-proxy/> </bean> I'm new to spring, so I'm obviously doing something wrong. I want one instance of User for each session. How?

    Read the article

< Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >