session-variables

PHP : The awk subtraction giving exponential values

限于喜欢 提交于 2019-12-11 01:55:18
问题 I am getting awk result when I am subtracting two values, the error is I am getting exponent value 2.7755575615629E-17 instead of 0. Anything I am missing to apply, please suggest. These is happening with some cases only like 0.66, 0.67, 0.33, The prototype of the code I am using is given below, $_SESSION['x'] = 1; $_SESSION['x'] = $_SESSION['x'] - 0.83; echo ( $_SESSION['x']- 0.17) ; echo '<br>'; But on reversing the values It all fine with 0 $_SESSION['x'] = 1; $_SESSION['x'] = $_SESSION['x

Accessing JSP variable from javascript [Angular JS]

痴心易碎 提交于 2019-12-11 01:34:02
问题 I am working with angular JS and JSP. i need to retrieve the session attribute variable from the JSP to my controller. My code is below JSP <html lang="en" ng-app="myApp"> <body> <div data-ng-controller="myCtrl as vm" style="height:100%"> <md-content layout="row" style="height:100%"> <div class="widget"> <h2>Header</h2> <div ui-view></div> </div> </md-content> </div> <script type="text/javascript" src="/root/script/script.js"></script> <% String policy = session.getAttribute("POLICY_CHANGE");

Looking for a hack to prevent rewriting an app without using session variables

允我心安 提交于 2019-12-10 21:17:33
问题 Our company uses an app that was originally ColdFusion + Access later converted to classic ASP + MS Sql for task/time tracking called the request system. It's broken down by department, so there's one for MIS, marketing, logistics, etc. The problem comes in when (mainly managers) are using more than one at a time, with 2 browser windows open. The request system uses session variables, a lot of session variables, "session" is referenced 2300 times in the application. When 2 are open at once as

Python pickling error when using sessions

人走茶凉 提交于 2019-12-10 19:14:35
问题 In my django app I was creating an extended user profile using session vars. But when registration form was saved and user was about to create, I got following error : Traceback (most recent call last): File "\Python26\Lib\site-packages\django\core\servers\basehttp.py", line 279, in run self.result = application(self.environ, self.start_response) File "\Python26\Lib\site-packages\django\core\servers\basehttp.py", line 651, in __call__ return self.application(environ, start_response) File "

php login session login variables

99封情书 提交于 2019-12-10 18:19:01
问题 I am learning php and have enrolled in a course. my user login is displayed below. my question is do i have to select all fields i want in a session when logging in? could i not just use Select email and pull all rows by that or to i have to select all row on login? example take this uid = uid for that session should it not pull all info about the user with id = id? $_SESSION['email'] = $email; $_SESSION['uid'] = $row['uid']; function login_user($email, $password) { $sql = "SELECT pwd, uid,

Ratchet Session Data Synchronisation using memcache

扶醉桌前 提交于 2019-12-10 17:40:12
问题 I created a Ratchet Web Socket Server and tried to use SESSIONS. In my php file on the HTTP-Webserver (Port 80) I set the session-data like this use Symfony\Component\HttpFoundation\Session\Session; use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage; use Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcacheSessionHandler; $memcache = new Memcache; $memcache->connect('localhost', 11211); $storage = new NativeSessionStorage(array(), new MemcacheSessionHandler(

Using session_name() in PHP - Cannot Access Data

邮差的信 提交于 2019-12-10 17:26:27
问题 When I use: session_name( 'fObj' ); session_start(); $_SESSION['foo'] = 'bar'; Subsequently loading the page and running: session_start(); print_r( $_SESSION ); doe not return the session data. If I remove the session_name(); it works fine. Does anyone know how to use sessions with a different session name? UPDATE : If I run the above code, as two page loads, and then change to: session_name( 'fObj' ); session_start(); print_r( $_SESSION ); I can access the data. However, if it will only work

Can I use ASP.NET Session[] variable in an external DLL

只愿长相守 提交于 2019-12-10 14:55:15
问题 I have two projects, the DLL project which has all my logic and data access stuff, and the ASP.NET project which does my forms etc. I am a bit confused. I thought if I added the System.Web namespace reference to the DLL project I would be able to reference the Session state information of the ASP.NET page. I could use each page to get the session info out and pass it to the DLL for the processing but would love to be able to process things directly from the DLL class(s). Is this possible? I

Access session variable using jQuery

老子叫甜甜 提交于 2019-12-10 13:54:33
问题 I need to render an HTML element in rails, depending upon whether a session variable is set or not. Is it possible to do something like this? 回答1: Session is server side, I am not a rails developer, but in asp.net mvc I made an ajax call that gets the Session value and returns it back to client. Just an idea. 回答2: You cannot access any server side variable from client side. You can basically render the session variable value in a javascript variable and use it on the client side in jquery.

PHP session index undefined after header redirection?

拥有回忆 提交于 2019-12-10 13:30:01
问题 I have struggled with this for hours but I can't get it to work. When I do a redirection to another PHP page, all my session variables are null. I am on xampp server. session.php <?php session_start(); if(isset($_POST['submitted'])) { $_SESSION['first_name'] = "MAX"; var_dump($_SESSION); header("Location: http://localhost:8080/secure login/session2.php"); die(); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http