Search Results

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

Page 68/632 | < Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >

  • how to type/send hex on a putty session

    - by Amit Phatarphekar
    I'm using Putty to make a serial connection to a device. I need to send a Hex string on this session. How do I do this? The Hex String is FF7E414244 This is required to break the serial device into command interface mode... From an XP machine, I can use HyperTerminal. And then on the serial connection, do a "send file", where the file has this hexstring entered using hex editing means. So this mechanism works. But now I have a windows 7 with no hyperterminal. so I'm using putty. But now how do I send the hex string? Thanks

    Read the article

  • Session persistence between multiple Rails / Unicorn servers with Redis as session_store on AWS

    - by d_ethier
    I've got 2 nginx EC2 instances pointing to 2 Unicorn EC2 instances in a round robin load balanced configuration. The two nginx instances are being the Elastic Load Balancer. Both Unicorn instances have a Redis session_store configured which is in a master/slave configuration with an Elastic IP attached to the master. I've tried configuring the session stickiness on the load balancer, but sessions are lost on each page refresh. I'm using the redis-store gem for the session_store configuration and redis support. Anyone have any ideas as to why this is not working?

    Read the article

  • Leave Windows Session Logged On

    - by Kyle Brandt
    Is a bad idea for any reason to leave accounts logged onto Windows remote desktop sessions? So instead of logging off, just closing the session so it locks. In this case, the limited number of remote desktop connections is not an issue. I am just wondering if anyone has seen sessions leak memory over time or maybe security issues with doing this, etc... I could see if programs were left open they might suck up and or leak memory, but has anyone seen this with Microsoft software such as Control Panels, Management Consoles, and Exchange System Administrator?

    Read the article

  • Can't open an SSH session because of OpenSSL version mismatch [on hold]

    - by user3287849
    I just ran apt-get upgrade, and according to /var/log/apt/history.log, openssl has been updated to version 1.0.1e-2+rvt+deb7u7. Now I have one SSH session still open, but I can't open another one. I restarted SSH, which returned OpenSSL version mismatch. Built against 1000105f, you have 10001080. I tried apt-get remove openssl && apt-get install openssl with no luck. I'm running debian on a raspberry pi. Edit: moved to SuperUser

    Read the article

  • Citrix Mixed Server Session problems

    - by oldskool
    Hello, we've run an Citrix Farm with 4 x Windows 2008 x64 (XenApp 5.0 FP3) and one server Win 2003 x86 (Xenapp 4.6). Yesterday we had a strange problem with Session logins. Existing Sessions could work without problems but new logins were not possible. In the AMC we could not see the Sessions on the Servers. After an reboot all worked fine again. We run the 32 Bit Server since 3 days in our farm (for one Application). Could it be possible that this behavior is caused of the mixed farm? -- (we got in this time a lot of wmi warnings that the Provider CitrixEvemtProv has been registered but it does not correctly impersonate user requests.

    Read the article

  • how to include screen's session name in hardstatus?

    - by fungusakafungus
    I use different screen sessions for different projects. Starting screen like screen -S project1. Now, I'd like to mention 'project1' in hardstatus line. Session name can be obtained from environment variable STY: STY=13539.project1. But how to get this into screen? I've tried backtick command and %` in hardstatus, but I can't seem to get it right. What I did: .screenrc: hardstatus string '%H:%`' backtick 0 30 30 echo $STY no luck, empty %`. backtick 0 30 30 sessionname still no luck, sessionname: Not found

    Read the article

  • Remote desktop auto start session on workstation login

    - by me2011
    I am setting up Remote Desktop Services for use by one of our remote offices. The workstations at the remote office are all Windows 7 Pro, joined to the domain. There is nothing installed on the local workstation othern than the Win7 OS. The remote and main office are linked via VPN. The workers will login to the local workstation, using their domain login, then right now double click an icon on the desktop which will do the RDP to the Remote Desktop Server. This does work fine, but requires some user education. Is there a way that when the user logs into the local workstation, it will start the RDP session right away and pass their username/password through as well? Would using a thin client PC do what I am asking? Thanks.

    Read the article

  • Session Cookies and IE 8

    - by Matt Luongo
    I recently built a simple web-app deployed over Tomcat. The app uses pretty standard session based security where a user who has logged in is given a session. Sessions work fine in Firefox and Chrome, but require the use of jsessionid in the URL for IE (tested 7 & 8), set to medium privacy. In IE 8, I tried to override cookie handling, setting "Allow all 3rd party cookies" and "Allow all session cookies"- no dice. However, when I run Tomcat on my local machine, IE accepts the cookie, and sessions work just fine. And now, for the HTTP headers. From Chrome, a logged in user gets a session GET http://devl:8080/testing/ HTTP/1.1 Host: devl:8080 Connection: keep-alive User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1036 Safari/532.5 Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 HTTP/1.1 200 OK Server: Apache-Coyote/1.1 P3P: CP="NON CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT STA" Set-Cookie: JSESSIONID=9280023BCE2046F32B13C89130CBC397; Path=/testing Content-Type: text/html;charset=UTF-8 Content-Language: en-US Content-Length: 2450 Date: Fri, 26 Mar 2010 14:14:40 GMT GET http://devl:8080/testing/logout HTTP/1.1 Host: devl:8080 Connection: keep-alive User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.1.249.1036 Safari/532.5 Referer: http://devl:8080/testing/ Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Encoding: gzip,deflate,sdch Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3 Cookie: JSESSIONID=9280023BCE2046F32B13C89130CBC397 ... From IE 8, with standard medium level security and privacy- GET http://devl:8080/testing/ HTTP/1.1 Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, */* Accept-Language: en-US User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDC; Tablet PC 2.0) UA-CPU: AMD64 Accept-Encoding: gzip, deflate Host: devl:8080 Connection: Keep-Alive HTTP/1.1 200 OK Server: Apache-Coyote/1.1 P3P: CP="NON CURa ADMa DEVa TAIa OUR BUS IND UNI COM NAV INT STA" Set-Cookie: JSESSIONID=192999F922D6E9C868314452726764BA; Path=/testing Content-Type: text/html;charset=UTF-8 Content-Language: en-US Content-Length: 2450 Date: Fri, 26 Mar 2010 14:32:34 GMT GET http://devl:8080/testing/logout HTTP/1.1 Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, */* Referer: http://devl:8080/testing/;jsessionid=6371A83EFE39A46997544F9146AA5CEA Accept-Language: en-US User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Win64; x64; Trident/4.0; .NET CLR 2.0.50727; SLCC2; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MDDC; Tablet PC 2.0) UA-CPU: AMD64 Accept-Encoding: gzip, deflate Connection: Keep-Alive Host: devl:8080 ... I thought it might be P3P, but on adding a compact policy, nothing changes. This is the standard Tomcat session, so I'm really surprised I haven't been able to find other people with the same problem so far. Anyone have any ideas?

    Read the article

  • problem to create session of facebook login

    - by khoyendra
    import com.facebook.api.FacebookRestClient; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.HttpState; import org.apache.commons.httpclient.NameValuePair; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.methods.PostMethod; import org.apache.commons.httpclient.params.HttpClientParams; public class FaceLogin { public FaceLogin(){ getUserID("xxxxxx", "xxxxxx"); } private static void getUserID(String email, String password){ String session = null; try { HttpClient http = new HttpClient(); http.setParams(new HttpClientParams()); http.setState(new HttpState()); String api_key = "API KEY"; String secret = "SECRETS"; FacebookRestClient client = new FacebookRestClient(api_key, secret); client.setIsDesktop(true); String token = client.auth_createToken(); final String loginId = "http://www.facebook.com/login.php"; GetMethod get = new GetMethod(loginId + "?api_key=" + api_key + "&v=1.0&auth_token=" +token); System.out.println("Get="+get); http.executeMethod(get); PostMethod post = new PostMethod(loginId); post.addParameter(new NameValuePair("api_key", api_key)); post.addParameter(new NameValuePair("v", "1.0")); post.addParameter(new NameValuePair("auth_token", token)); post.addParameter(new NameValuePair("fbconnect","true")); post.addParameter(new NameValuePair("return_session","true")); post.addParameter(new NameValuePair("session_key_only","true")); post.addParameter(new NameValuePair("req_perms","read_stream,publish_stream")); post.addParameter(new NameValuePair("lsd","8HYdi")); post.addParameter(new NameValuePair("locale","en_US")); post.addParameter(new NameValuePair("persistent","1")); post.addParameter(new NameValuePair("email", email)); post.addParameter(new NameValuePair("pass", password)); System.out.println("Token ="+token); int postStatus = http.executeMethod(post); System.out.println("Response : " + postStatus); session = client.auth_getSession(token); // Here I am getting error System.out.println("Session string: " + session); long userid = client.users_getLoggedInUser(); System.out.println("User Id is : " + userid); } catch (Exception e) { e.printStackTrace(); } } public static void main(String k[]) { FacebookLogin facebookLoginObj=new FacebookLogin(); } } here i have to find some error when i create session error is run: Get=org.apache.commons.httpclient.methods.GetMethod@17ec9f7 Token =0c578e0692ae04327cd29a4beede48e3 Jun 8, 2010 7:04:48 PM org.apache.commons.httpclient.HttpMethodBase processResponseHeaders WARNING: Cookie rejected: "$Version=0; $Domain=deleted; $Path=/; $Domain=.facebook.com". Cookie name may not start with $ Response : 200 Jun 8, 2010 7:04:48 PM org.apache.commons.httpclient.HttpMethodBase processResponseHeaders WARNING: Cookie rejected: "$Version=0; $Path=deleted; $Path=/; $Domain=.facebook.com". Cookie name may not start with $ Facebook returns error code 100 - v -> 1.0 - auth_token -> 0c578e0692ae04327cd29a4beede48e3 - method -> facebook.auth.getSession com.facebook.api.FacebookException: Invalid parameter - call_id -> 1276004088734 - api_key -> f7cb1e48c383ef599da9021fc4dec322 - sig -> 8b7f0a5394b25551ab3cf1487ac0da00 at com.facebook.api.FacebookRestClient.callMethod(FacebookRestClient.java:828) at com.facebook.api.FacebookRestClient.callMethod(FacebookRestClient.java:606) at com.facebook.api.FacebookRestClient.callMethod(FacebookRestClient.java:606) at com.facebook.api.FacebookRestClient.auth_getSession(FacebookRestClient.java:1891) at facebookcrawler.FacebookLogin.getUserID(FacebookLogin.java:81) at facebookcrawler.FacebookLogin.<init>(FacebookLogin.java:24) at facebookcrawler.FaceLogin.main(FaceLogin.java:80) BUILD SUCCESSFUL (total time: 7 seconds)

    Read the article

  • One of my most frequently used commands

    - by Kevin Smith
    On a Linux or UNIX server this is one of my most frequently used commands. find . -name "*.htm" -exec grep -iH "alter session" {} \; It is an easy way to find a string you know is in a group of files, but don't know or can't remember which file it is in. For the example above, I knew that WebCenter Content sends a bunch of alter session commands to the database when it opens a new database connection. I wanted to find where these were defined and what all the alter session commands were. So, I ran these commands: cd /opt/oracle/middleware/Oracle_ECM1/ucm/idc/resources/core find . -name "*.htm" -exec grep -iH "alter session" {} \; And the results were: ./tables/query.htm: ALTER SESSION SET optimizer_mode = ?./tables/query.htm: ALTER SESSION SET NLS_LENGTH_SEMANTICS = ?./tables/query.htm: ALTER SESSION SET NLS_SORT = ?./tables/query.htm: ALTER SESSION SET NLS_COMP = ?./tables/query.htm: ALTER SESSION SET CURSOR_SHARING = ?./tables/query.htm: ALTER SESSION SET EVENTS '30579 trace name context forever, level 2'./tables/query.htm: ALTER SESSION SET NLS_DATE_FORMAT = ?./tables/query.htm: alter session set events '30579 trace name context forever, level 2' I could then go edit the query.htm file and find the include that contained all the ALTER SESSION commands.

    Read the article

  • Rails: Should partials be aware of instance variables?

    - by Alexandre
    Ryan Bates' nifty_scaffolding, for example, does this edit.html.erb <%= render :partial => 'form' %> new.html.erb <%= render :partial => 'form' %> _form.html.erb <%= form_for @some_object_defined_in_action %> That hidden state makes me feel uncomfortable, so I usually like to do this edit.html.erb <%= render :partial => 'form', :locals => { :object => @my_object } %> _form.html.erb <%= form_for object %> So which is better: a) having partials access instance variables or b) passing a partial all the variables it needs? I've been opting for b) as of late, but I did run into a little pickle: some_action.html.erb <% @dad.sons.each do |a_son| %> <%= render :partial => 'partial', :locals => { :son => a_son } %> <% end %> _partial.html.erb The son's name is <%= son.name %> The dad's name is <%= son.dad.name %> son.dad makes a database call to fetch the dad! So I would either have to access @dad, which would be going back to a) having partials access instance variables or I would have to pass @dad in locals, changing render :partial to <%= render :partial = 'partial', :locals = { :dad = @dad, :son = a_son } %, and for some reason passing a bunch of vars to my partial makes me feel uncomfortable. Maybe others feel this way as well. Hopefully that made some sense. Looking for some insight into this whole thing... Thanks!

    Read the article

  • Importing Variables from PHP 4 into Flash

    - by Glenn
    I'm trying to get variable importing from a PHP script before I implement it into a larger project. So far all I've gotten is headaches. //this is all thats in test.php other than the open and close brackets. Normally I'd have it doing a mysql_query and putting useful information into the print statement. print( "lamegame.net/test/test.php?val=foo&id=0000&name=Glenn"); All test.as has to do is access the three variables. The problem comes in that 'val' is undefined. The id and name variables however are just fine and return 0000 and Glenn respectively. package { import flash.display.MovieClip; import flash.text.TextField; import flash.events.; import flash.net.; public class test extends MovieClip { public function test() { super(); //prep request var request:URLRequest = new URLRequest("test.php"); request.method = URLRequestMethod.GET; var loader:URLLoader = new URLLoader(); //load request loader.dataFormat = URLLoaderDataFormat.VARIABLES; loader.addEventListener(Event.COMPLETE, dataLoaded); loader.load(request); } public function dataLoaded(e:Event):void { var name = e.target.data.name; var id = e.target.data.id; var val = e.target.data.val; trace("Val: " + val + "ID: " + id + " Name: " + name); } } }

    Read the article

  • Perl: Exporting variables in a subclass

    - by Jonathan
    I have a base class like this: package MyClass; use vars qw/$ME list of vars/; use Exporter; @ISA = qw/Exporter/; @EXPORT_OK = qw/ many variables & functions/; %EXPORT_TAGS = (all => \@EXPORT_OK ); sub my_method { } sub other_methods etc { } --- more code--- I want to subclass MyClass, but only for one method. package MySubclass; use MyClass; use vars qw/@ISA/; @ISA = 'MyClass'; sub my_method { --- new method } And I want to call this MySubclass like I would the original MyClass, and still have access to all of the variables and functions from exporter. However I am having problems getting the Exporter variables from the original class, MyClass, to export correctly. Do I need to run exporter again inside the subclass? That seems redundant and unclear. Example file: #!/usr/bin/perl use MySubclass /$ME/; -- rest of code But I get compile errors when I try to import the $ME variable. Any suggestions?

    Read the article

  • Signals and Variables in VHDL - Problem

    - by Morano88
    I have a signal and this signal is a bitvector. The length of the bitvector depends on an input n, it is not fixed. In order to find the length, I have to do some computations. Can I define a signal after defining the variables ? It is ggiving me errors when I do that. It is working fine If I keep the signal before the variables .. but I don't want that .. the length of Z depends on the computations of the variables. What is the solution ? library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity BSD_Full_Comp is Generic (n:integer:=8); Port(X, Y : inout std_logic_vector(n-1 downto 0); FZ : out std_logic_vector(1 downto 0)); end BSD_Full_Comp; architecture struct of BSD_Full_Comp is Component BSD_BitComparator Port ( Ai_1 : inout STD_LOGIC; Ai_0 : inout STD_LOGIC; Bi_1 : inout STD_LOGIC; Bi_0 : inout STD_LOGIC; S1 : out STD_LOGIC; S0 : out STD_LOGIC ); END Component; Signal Z : std_logic_vector(2*n-3 downto 0); begin ass : process Variable length : integer := n; Variable pow : integer :=0 ; Variable ZS : integer :=0; begin while length /= 0 loop length := length/2; pow := pow+1; end loop; length := 2 ** pow; ZS := length - n; wait; end process; end struct;

    Read the article

  • Signals and Variables in VHDL (order) - Problem

    - by Morano88
    I have a signal and this signal is a bitvector (Z). The length of the bitvector depends on an input n, it is not fixed. In order to find the length, I have to do some computations. Can I define a signal after defining the variables ? It is giving me errors when I do that. It is working fine If I keep the signal before the variables (that what is showing below) .. but I don't want that .. the length of Z depends on the computations of the variables. What is the solution ? library IEEE; use IEEE.STD_LOGIC_1164.ALL; use IEEE.STD_LOGIC_ARITH.ALL; use IEEE.STD_LOGIC_UNSIGNED.ALL; entity BSD_Full_Comp is Generic (n:integer:=8); Port(X, Y : inout std_logic_vector(n-1 downto 0); FZ : out std_logic_vector(1 downto 0)); end BSD_Full_Comp; architecture struct of BSD_Full_Comp is Component BSD_BitComparator Port ( Ai_1 : inout STD_LOGIC; Ai_0 : inout STD_LOGIC; Bi_1 : inout STD_LOGIC; Bi_0 : inout STD_LOGIC; S1 : out STD_LOGIC; S0 : out STD_LOGIC ); END Component; Signal Z : std_logic_vector(2*n-3 downto 0); begin ass : process Variable length : integer := n; Variable pow : integer :=0 ; Variable ZS : integer :=0; begin while length /= 0 loop length := length/2; pow := pow+1; end loop; length := 2 ** pow; ZS := length - n; wait; end process; end struct;

    Read the article

  • iPhone OS: Get a list of methods and variables from anonymous object

    - by ChrisOPeterson
    I am building my first iPhone/Obj-c app and I have a large amount of data-holding subclasses that I am passing into a cite function. To the cite function these objects are anonymous and I need to find a way to access all the variables of each passed object. I have been using a pre-built NSArray and Selectors to do this but with more than 30 entries (and growing) it is kind of silly to do manually. There has to be a way to dynamically look up all the variables of an anonymous object. The obj-c runtime run-time docs mention this problem but from what I can tell this is not available in iPhone OS. If it is then I don't understand the implementation and need some guidance. A similar question was asked before but again I think they were talking about OSX and not iPhone. Any thoughts? -(NSString*)cite:(id)source { NSString *sourceClass = NSStringFromClass([source class]); // Runs through all the variables in the manually built methodList for(id method in methodList) { SEL x = NSSelectorFromString(method); // further implementation // Should be something like NSArray *methodList = [[NSArray alloc] initWithObjects:[source getVariableList]] for(id method in methodList) { SEL x = NSSelectorFromString(method); // Further implementation }

    Read the article

  • Unable to pass variables from one view to another

    - by jerincbus
    I have a detail view that includes three UIButtons, each of which pushes a different view on to the stack. One of the buttons is connected to a MKMapView. When that button is pushed I need to send the latitude and longitude variables from the detail view to the map view. I'm trying to add the string declaration in the IBAction: - (IBAction)goToMapView { MapViewController *mapController = [[MapViewController alloc] initWithNibName:@"MapViewController" bundle:nil]; mapController.address = self.address; mapController.Title = self.Title; mapController.lat = self.lat; mapController.lng = self.lng; //Push the new view on the stack [[self navigationController] pushViewController:mapController animated:YES]; [mapController release]; mapController = nil; } But I get this when I try to build: 'error: incompatible types in assignment' for both lat and lng variables. So my questions are am I going about passing the variables from one view to another the right way? And does the MKMapView accept latitude and longitude as a string or a number?

    Read the article

  • Creating PowerShell Automatic Variables from C#

    - by Uros Calakovic
    I trying to make automatic variables available to Excel VBA (like ActiveSheet or ActiveCell) also available to PowerShell as 'automatic variables'. PowerShell engine is hosted in an Excel VSTO add-in and Excel.Application is available to it as Globals.ThisAddin.Application. I found this thread here on StackOverflow and started created PSVariable derived classes like: public class ActiveCell : PSVariable { public ActiveCell(string name) : base(name) { } public override object Value { get { return Globals.ThisAddIn.Application.ActiveCell; } } } public class ActiveSheet : PSVariable { public ActiveSheet(string name) : base(name) { } public override object Value { get { return Globals.ThisAddIn.Application.ActiveSheet; } } } and adding their instances to the current POwerShell session: runspace.SessionStateProxy.PSVariable.Set(new ActiveCell("ActiveCell")); runspace.SessionStateProxy.PSVariable.Set(new ActiveSheet("ActiveSheet")); This works and I am able to use those variables from PowerShell as $ActiveCell and $ActiveSheet (their value change as Excel active sheet or cell change). Then I read PSVariable documentation here and saw this: "There is no established scenario for deriving from this class. To programmatically create a shell variable, create an instance of this class and set it by using the PSVariableIntrinsics class." As I was deriving from PSVariable, I tried to use what was suggested: PSVariable activeCell = new PSVariable("ActiveCell"); activeCell.Value = Globals.ThisAddIn.Application.ActiveCell; runspace.SessionStateProxy.PSVariable.Set(activeCell); Using this, $ActiveCell appears in my PowerShell session, but its value doesn't change as I change the active cell in Excel. Is the above comment from PSVariable documentation something I should worry about, or I can continue creating PSVariable derived classes? Is there another way of making Excel globals available to PowerShell?

    Read the article

  • Field Members vs Method Variables?

    - by Braveyard
    Recently I've been thinking about performance difference between class field members and method variables. What exactly I mean is in the example below : Lets say we have a DataContext object for Linq2SQL class DataLayer { ProductDataContext context = new ProductDataContext(); public IQueryable<Product> GetData() { return context.Where(t=>t.ProductId == 2); } } In the example above, context will be stored in heap and the GetData method variables will be removed from Stack after Method is executed. So lets examine the following example to make a distinction : class DataLayer { public IQueryable<Product> GetData() { ProductDataContext context = new ProductDataContext(); return context.Where(t=>t.ProductId == 2); } } (*1) So okay first thing we know is if we define ProductDataContext instance as a field, we can reach it everywhere in the class which means we don't have to create same object instance all the time. But lets say we are talking about Asp.NET and once the users press submit button the post data is sent to the server and the events are executed and the posted data stored in a database via the method above so it is probable that the same user can send different data after one another.If I know correctly after the page is executed, the finalizers come into play and clear things from memory (from heap) and that means we lose our instance variables from memory as well and after another post, DataContext should be created once again for the new page cycle. So it seems the only benefit of declaring it publicly to the whole class is the just number one text above. Or is there something other? Thanks in advance... (If I told something incorrect please fix me.. )

    Read the article

  • Passing variables from a thread to another form using C#

    - by kirstom14
    Hi, I am trying to pass 2 variables from a thread, in the MainForm, to another form, but when doing so an error occurs. private void TrackingThread( ) { float targetX = 0; float targetY = 0; while ( true ) { camera1Acquired.WaitOne( ); camera2Acquired.WaitOne( ); lock ( this ) { // stop the thread if it was signaled if ( ( x1 == -1 ) && ( y1 == -1 ) && ( x2 == -1 ) && ( y2 == -1 ) ) { break; } // get middle point targetX = ( x1 + x2 ) / 2; targetY = ( y1 + y2 ) / 2; } if (directionForm != null) { directionForm.RunMotors(targetX, targetY); } } } In the form, directionForm, I am simply displaying the variables targetX and targetY. The code for the directionForm.RunMotors() is the following: public void RunMotors(float x, float y) { label1.Text = "X-ordinate " + x.ToString(); label2.Text = "Y-ordinate " + y.ToString(); } The error happen when I am trying to display the two variables: "InvalidOperationException was unhandled Cross-threading operation not valid: Control label1 accessed from a thread other than . the thread it was created on" What shall I do??? Thanks in advance

    Read the article

  • Using static variables for Strings

    - by Vivart
    below content is taken from Best practice: Writing efficient code but i didn't understand why private static String x = "example"; faster than private static final String x ="example"; Can anybody explain this. Using static variables for Strings When you define static fields (also called class fields) of type String, you can increase application speed by using static variables (not final) instead of constants (final). The opposite is true for primitive data types, such as int. For example, you might create a String object as follows: private static final String x = "example"; For this static constant (denoted by the final keyword), each time that you use the constant, a temporary String instance is created. The compiler eliminates "x" and replaces it with the string "example" in the bytecode, so that the BlackBerry® Java® Virtual Machine performs a hash table lookup each time that you reference "x". In contrast, for a static variable (no final keyword), the String is created once. The BlackBerry JVM performs the hash table lookup only when it initializes "x", so access is faster. private static String x = "example"; You can use public constants (that is, final fields), but you must mark variables as private.

    Read the article

  • Javascript variables are not working

    - by linkcool
    Hi, my problem is that my variables are not working in javascript. all variables need names without some character at the beginning, this is the stupid thing...Anyways, im trying to make a funtion that makes "select all checkboxes". It is not working so i looked at the page source/info and found out that the variables were not changing. this is my input: echo "<input onclick='checkAll(1);' type='checkbox' name='master'/><br/>"; My function: function checkAll(i) { for(var i=1; i < <?php echo $num; ?>; i++) { if(document.demo.master[i].checked == true) { document.demo.message[i].checked = true; } else { document.demo.message[i].checked = false; } } } so yes that's it. I can tell you that i also tried without the <i> in: checkAll("i") Thanks for the help.

    Read the article

  • Initiate User Scope Class at Session Start

    - by James Santiago
    I want to initiate a class for each user at the start of the user's session so that a single class can be used throughout the user's session. I checked out this post but I'm not sure where I should be placing this Sessionhandler class. Inside global.asax? How do I go about accomplishing this?

    Read the article

  • ASP.NET Session Expired error when viewing reports using ReportViewer web control in SSRS 2008

    - by RKP
    Hi, I am getting "ASP.NET Session Expired" error when viewing SQL Server 2008 reports using the Microsoft ReportViewer web control. I found this article http://balanagaraj.wordpress.com/2009/09/25/session-has-expired-in-asp-net/ which suggests to use one worker process in IIS application pool, but that may affect performance, is there any other solution for this? I tried setting "AsyncRendering" to false already and that didn't work.

    Read the article

  • Mysql locale session variable ?

    - by Maxim Veksler
    Hunting internationalization bugs here. Does mysql has a variable which can be set per session, meaning the each connection will know the timezone of it's client and will act upon that. If such variable does exists I would expect sql statements such as the following will return diffect values, based on connection session locale. select date('2010-04-14') + 0; Thank you, Maxim.

    Read the article

< Previous Page | 64 65 66 67 68 69 70 71 72 73 74 75  | Next Page >