Search Results

Search found 20592 results on 824 pages for 'path variables'.

Page 12/824 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • what other bash variables are available during execution such as $USER that can assist on my script?

    - by semi-newbie
    This is related to question 19245, in that one of the responders answered the question in an awesome way, and very VERY clear to any newbie. Now here is a question that i can't seem to figure. i wrote a script for starting the vmware firefox plugin (don't worry. i gave that up and now run vBox VERY happily. i left vmware for my servers :) ) I needed to start the plugin as sudo, but i also needed to pass an argument (password) to it, that happen to be the same. So, if my password was Hello123, the command would be: sudo ./myscript.sh hi other Hello123 running from command line, the script would ask for my sudo password and then run. i wanted to capture THAT password and pass it as well. i also wanted to run graphically, so i tried gksudo, and there is an option -p that returns the password for variable assignment. well, that was a nightmare, because i would still get prompted for the original sudo: see below Find UserName vUser=$USER Find password (and hopefully enable sudo) vP=gksudo -p -D somedescriptiontext echo Execute command gksudo ./myscript.sh hi $vUser $vP and i still get prompted twice. so my question is tri-fold: is there a variable i can use for the password, just like there is one for user, $USER? is there a different way i should be assigning the value resulting of the command i have in $vP? i am wondering if executing the way i have it, does it in an uninitiated session and not the current one, since i am getting some addtl warning type errors on some variables blah blah i tried using Zenity to just capture the text, but then of course, i couldn't pass that value to sudo, so i could only use as a parameter, which puts me back in 2 prompts. Thanksssssssssss!

    Read the article

  • In Ruby are there any related applications of the syntax: class << self ... end

    - by pez_dispenser
    class << self attr_accessor :n, :totalX, :totalY end The syntax above is used for defining class instance variables. But when I think about what syntax implies, it doesn't make any sense to me, so I'm wondering if this type of syntax is used for any other types of definitions. My point of confusion here is this: class << self The append operator normally means "add what's on the right to the object on the left". But in the context of this block, how does that add up to "put the contents of this block into the definition of the class instance rather than the instance"? For the same reason I'm confused as to why in one context class << self can define class instance variables while in another it seems to create class variables such as here: class Point # Instance methods go here class << self # Class methods go here end end

    Read the article

  • Trouble setting up php Zend include path

    - by behrk2
    Hello, I am trying to set up a PHP path to my Zend Framework. I am very confused on how to do this. My Zend Framework is located at the following location on my server: amazon/ZendFramework-1.10.3-minimal I am going to be creating a couple of php files in the amazon/ directory that will require the Zend Framework. My include path is: include("ZendFramework-1.10.3-minimal/library/Zend/Service/Amazon.php"); This works, however inside of Amazon.php is the line require_once 'Zend/Rest/Client.php'; ...and then Client.php has more dependencies set up like that, and so on. How can I set up my include path so that Amazon.php and Client.php (and so on) can correctly reference the location of the Zend Framework? Thanks

    Read the article

  • Running ASP.NET MVC application behind a proxy with different root relative path

    - by Wiebe
    Hi All, I'm having trouble with paths in a ASP.NET MVC application that's running behind a proxy. Our IIS Application root path is for example http://server/MyApp/ meaning that all urls using the application root ("~/",Url.Action("MyAction","MyController")) are resolved to "/MyApp" Now we're running behind a proxy server that forwards all requests, but changes the application root to something like this: "/Secury/Proxy/RubbishUrl/MyApp" Because the original url is only available on the client, I thought of creating a cookie with the path prefix, and insert this before each generated URL on the server. Now the question is, what's the best location in code to modify each URL that's resolved/sent to the client (to resources, controller actions, images etc)? Every path in the application is resolved with the MVC methods (Url.Content, Url.Action etc).

    Read the article

  • Finding if a path between 2 sides of a game board exists

    - by Meny
    Hi, i'm currently working on a game as an assignment for school in java. the game cuurently is designed for Console. the game is for 2 players, one attacking from north to south, and the other from west to east. the purpose of the game is to build a "bridge"/"path" between the 2 of your sides before your opponent does. for example: A B C D E F 1 _ _ X _ _ _ 1 2 O X X _ _ _ 2 3 O X O O O O 3 4 O X O _ _ _ 4 5 X X _ _ _ _ 5 6 X O _ _ _ _ 6 A B C D E F player that attacks from north to south won (path/bridge from C to A) my problem is, what algorithm would be good to check if the user have managed to create a path (will be checked at the end of each turn). you're help would be very appreciated.

    Read the article

  • Folder path before project

    - by Annie Chua
    I am trying to get a folder path in my C drive that I did not want to hard code with my program. I know that I can use string path = System.AppDomain.CurrentDomain.BaseDirectory; However its give me : C:\FACE\Camera\Camera\bin\Debug . Which I want to only have C:\FACE\ as I want to initialise something in the FACE folder but outside of my Camera folder. I do not wish to hardcode the file path. Is it possible to do it? Thanks for the help!

    Read the article

  • C++ wrapper for C library

    - by Maximilien
    Hi, Recently I found a C library that I want to use in my C++ project. This code is configured with global variables and writes it's output to memory pointed by static pointers. When I execute my project I would like 2 instances of the C program to run: one with configuration A and one with configuration B. I can't afford to run my program twice, so I think there are 2 options: Make a C++ wrapper: The problem here is that the wrapper-class should contain all global/static variables the C library has. Since the functions in the C library use those variables I will have to create very big argument-lists for those functions. Copy-paste the C library: Here I'll have to adapt the name of every function and every variable inside the C library. Which one is the fastest solution? Are there other possibilities to run 2 instances of the same C source? Thanks, Max

    Read the article

  • ExpandEnvironmentStrings Not Expanding My Variables

    - by Adam Driscoll
    I have a process under the Run key in the registry. It is trying to access an environment variable that I have defined in a previous session. I'm using ExpandEnvironmentStrings to expand the variable within a path. The environment variable is a user profile variable. When I run my process on the command line it does not expand as well. If I call 'set' I can see the variable. Some code... CString strPath = "\\\\server\\%share%" TCHAR cOutputPath[32000]; DWORD result = ExpandEnvironmentStrings((LPSTR)&strPath, (LPSTR)&cOutputPath, _tcslen(strPath) + 1); if ( !result ) { int lastError = GetLastError(); pLog->Log(_T( "Failed to expand environment strings. GetLastError=%d"),1, lastError); } When debugging Output path is exactly the same as Path. No error code is returned. What is goin on?

    Read the article

  • How to set PATH to another variable value with spaces in Windows batch file

    - by Evgeny
    I've got a Windows batch script issue that I'm bashing my head against (no pun intended). The problematic script looks like this: if defined _OLD_VIRTUAL_PATH ( set PATH=%_OLD_VIRTUAL_PATH% ) When I run it and _OLD_VIRTUAL_PATH is set I get: \Microsoft was unexpected at this time. _OLD_VIRTUAL_PATH is a variable that was originally set from PATH and it contains spaces - I'm pretty sure that's the problem. But what's the solution? It runs successfully if I enclose it in quotes, but I don't think the entire value of the PATH variable is supposed to be in quotes.

    Read the article

  • Seeking enlightenment - global variables in AppEngine (aeoid.get_current_user())

    - by jerd
    Hello This may be a 'Python Web Programming 101' question, but I'm confused about some code in the aeoid project (http://github.com/Arachnid/aeoid). here's the code: _current_user = None def get_current_user(): """Returns the currently logged in user, or None if no user is logged in.""" global _current_user if not _current_user and 'aeoid.user' in os.environ: _current_user = User(None, _from_model_key=os.environ['aeoid.user']) return _current_user But my understanding was that global variables were, ehm, global! And so different requests from different users could (potentially) access and update the same value, hence the need for sessions, in order to store per-user, non-global variables. So, in the code above, what prevents one request from believing the current user is the user set by another request? Sorry if this is basic, it's just not how i thought things worked. Thanks

    Read the article

  • Variables versus constants versus associative arrays in PHP

    - by susmits
    I'm working on a small project, and need to implement internationalization support somehow. I am thinking along the lines of using constants to define a lot of symbols for text in one file, which could be included subsequently. However, I'm not sure if using variables is faster, or if I can get away with using associative arrays without too much of a performance hit. What's better for defining constant values in PHP, performance-wise -- constants defined using define("FOO", "..."), or simple variables like $foo = "...", or associative arrays like $symbols["FOO"]?

    Read the article

  • PHP Session variables not passing across pages

    - by mitch
    Common problem, but I'm stumped. Session variables are passing across pages on my local (localhost) deployment, but not on my (www) host. I use a common includes file for each page with this code: $sessionDomain = "/"; @ini_set("session.cookie_path",$sessionDomain); $sessionName = "ccSID".md5('/store/'); session_name($sessionName); session_start(); I confirmed that the session ID cookie (ccSIDxxxxx...) remains the same across pages in my browser, but session variables don't seem to hold up when changing to a page in a different directory.

    Read the article

  • Passing Flash variables to PHP.

    - by user340553
    Hi, I have a simple standalone application written in Visual Basic that I'm porting to a browser based application using PHP/javascript. The original VB application has some simple embedded flash games with token and point counters. The token and point values are being passed as variables between the application and the game. I'm trying to achieve the same effect in my PHP port without modifying the actionscript code( using the variables in actionscript that already exist). Below is Visual Basic code that's loading a value from a database and posting that value to flash using FlashVars: Private Sub loadPlayer() Try If CtblPoints.CheckPointsByID(mCard) Then objPoints = CtblPoints.GettblPointsByID(mCard) objPlayerAc = CtblPlayerAccount.GettblPlayerAccountByPlayerID(objPoints.AccountId) objPlayer = CtblPlayer.GettblPlayerByID(objPlayerAc.PlayerID) objPlayerBal = CtblPlayerBalance.GettblPlayerBalanceByID(objPlayerAc.PlayerID) objPlayerAcDetail = CtblPlayerAccountDetail.GettblPlayerAccountDetailByAmount(objPoints.AccountId) strTotalPoints = Convert.ToString(objPlayerAc.Points) strTotalWin = Convert.ToString(objPlayerBal.TokenAmount) 'Dim intTokenAmount As Decimal = Convert.ToDecimal(objPlayerBal.TokenAmount) 'strTotalWin = Convert.ToString(Convert.ToInt64(intTokenAmount * 100)) flashPlayer.Size = panelGame.Size flashPlayer.FlashVars = "totalEntries=" & strTotalPoints & "&credit=" & strTotalWin flashPlayer.LoadMovie(0, strGameFile) flashPlayer.Play() Else Me.Close() Dim frmInvCrd As New frmInvalidCard frmInvCrd.ShowDialog() End If Catch ex As Exception End Try I'm trying to recreate this in PHP, but I'm at a loss as to how to begin implementing it. The variables in flash are declared publicly, and global imports used: import com.atticmedia.console.*; import flash.display.*; import flash.events.*; import flash.geom.*; import flash.media.*; import flash.net.*; import flash.system.*; import flash.utils.*; First declaration of variable 'totalEntries' is: public var totalEntries:int = 0; and this is a snip of totalEntries being used in the actionscript public function notifyServerOfUnwonCredits(param1) { var remainder:* = param1; if (this.useServer) { this.targetWinAmount = 0; this.cancelUpdateOverTime = F9.setEnterFrame(this.updateOverTime); fscommand("OverTime", "" + remainder); this.flashVarsUpdatedAction = function () { originalTotalWin = totalWin; return; }// end function ; } else { this.setTotalEntries(100000); this.setTotalWin(0); } return; }// end function Eventually I'll be passing these values back to a mySQL database. Any insight into this would be extremely helpful, Thanks!

    Read the article

  • Problem sending php variables to flash game, on facebook

    - by FlashWars
    When I run the app for the first time in a session it works great i get all data form Database(if i logout, and enter with a diffrent account)the swf does not receive the variables. If i run manually the script typing the url address in the browser (typing: http://myserver.com/app/variables.php), and refresh the facebook app, it receives the data perfectly.How can i fix this?I used the URLVariables, URLRequest and flashvars but still with no succes.I asked for help on many forums but without succes, apparently there are many in my situation.Could this porblem be due the fact tha facebook does not allow flash to talk outside? Any help would be highly apreciated!Thanks!!

    Read the article

  • Defining Makefiles variables from a script

    - by Freddy
    I am creating a Makefile which I want it to be a single file for different architectures, OSes, libraries, etc. To do this I have a build specific XML file which defines the different configuration options for each architecture. The config file is read by Perl (it could be any language) and the Perl output returns something like: var1 := var1_value var2 := var2_value var3 := var3_value What I am trying to do is define this variables in my Makefile. From the makefile I am calling my readconfig script and it is giving the correct output, but I have not been able to get this variables as part of my Makefile. I have tried the use of eval and value, but none of them have work (although it could be an issue of me not knowing how to use them. In overall what I am trying to do is something like: read_config: $(eval (perl '-require "readConfig.pl"')) @echo $(var1) It could be assumed I am using only GNU Make behavior. Things I could not change: Config file is on XML Using Perl as a XML parser

    Read the article

  • Sending variables in URLs in PHP with echo

    - by alexpelan
    Hi all, I can't really find good guidelines through google searches of the proper way to escape variables in URLs. Basically I am printing out a bunch of results from a mysql query in a table and I want one of the entries in each row to be a link to that result's page. I think this is easy, that I'm just missing a apostrophe or backslash somewhere, but I can't figure it out. Here's the line that's causing the error: echo "<a href = \"movies.php/?movie_id='$row['movie_id']'\"> Who Owns It? </a> "; and this is the error I'm getting: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING If you could elaborate in your answers about general guidelines for working with echo and variables in urls, that would be great. Thanks.

    Read the article

  • Printing out variables in c changes values of variables

    - by George Wilson
    I have an odd problem with some c-programme here. I was getting some wrong values in a matrix I was finding the determinant of and so I started printing variables - yet found that by printing values out the actual values in the code changed. I eventually narrowed it down to one specific printf statement - highlighted in the code below. If I comment out this line then I start getting incorrect values in my determinent calculations, yet by printing it out I get the value out I expect Code below: #include <math.h> #include <stdio.h> #include <stdlib.h> #define NUMBER 15 double determinant_calculation(int size, double array[NUMBER][NUMBER]); int main() { double array[NUMBER][NUMBER], determinant_value; int size; array[0][0]=1; array[0][1]=2; array[0][2]=3; array[1][0]=4; array[1][1]=5; array[1][2]=6; array[2][0]=7; array[2][1]=8; array[2][2]=10; size=3; determinant_value=determinant_calculation(size, array); printf("\n\n\n\n\n\nDeterminant value is %lf \n\n\n\n\n\n", determinant_value); return 0; } double determinant_calculation(int size, double array[NUMBER][NUMBER]) { double determinant_matrix[NUMBER][NUMBER], determinant_value; int x, y, count=0, sign=1, i, j; /*initialises the array*/ for (i=0; i<(NUMBER); i++) { for(j=0; j<(NUMBER); j++) { determinant_matrix[i][j]=0; } } /*does the re-cursion method*/ for (count=0; count<size; count++) { x=0; y=0; for (i=0; i<size; i++) { for(j=0; j<size; j++) { if (i!=0&&j!=count) { determinant_matrix[x][y]=array[i][j]; if (y<(size-2)) { y++; } else { y=0; x++; } } } } //commenting this for loop out changes the values of the code determinent prints -7 when commented out and -3 (expected) when included! for (i=0; i<size; i++) { for(j=0; j<size; j++){ printf("%lf ", determinant_matrix[i][j]); } printf("\n"); } if(size>2) { determinant_value+=sign*(array[0][count]*determinant_calculation(size-1 ,determinant_matrix)); } else { determinant_value+=sign*(array[0][count]*determinant_matrix[0][0]); } sign=-1*sign; } return (determinant_value); } I know its not the prettiest (or best way) of doing what I'm doing with this code but it's what I've been given - so can't make huge changes. I don't suppose anyone could explain why printing out the variables can actually change the values? or how to fix it because ideally i don't want to!!

    Read the article

  • Accessing XAML Object Variables in XAML

    - by Asryael
    So, what I'm trying to do is access my Form's width and/or height to use in a storyboard. Essentially, I have a Translate Transform animation to slide what are essentially two pages. The animation works fine with hard coded From/To variables, however I need to use soft variables that enable the animation to start from the left/right of my form no matter what size it is. <Storyboard x:Key="SlideLeftToRight" TargetProperty="RenderTransform.(TranslateTransform.X)" AccelerationRatio=".4" DecelerationRatio=".4"> <DoubleAnimation Storyboard.TargetName="PageViewer" Duration="0:0:0.6" From="WindowWidth" To="0"/> <DoubleAnimation Storyboard.TargetName="BorderVisual" Duration="0:0:0.6" From="0" To="NegativeWindowWidth"/> </Storyboard> However, I have no idea how to do so. Any help is greatly appreciated. EDIT: I'm guessing it has something to do with: From="{Binding Width, Source=MainWindow}" However, when I attempt this, I don't know how to make it negative.

    Read the article

  • In game programming are global variables bad?

    - by Joe.F
    I know my gut reaction to global variables is "badd!" but in the two game development courses I've taken at my college globals were used extensively, and now in the DirectX 9 game programming tutorial I am using (www.directxtutorial.com) I'm being told globals are okay in game programming ...? The site also recommends using only structs if you can when doing game programming to help keep things simple. I'm really confused on this issue, and all the research I've been trying to do is very confusing. I realize there are issues when using global variables (threading issues, they make code harder to maintain, the state of them is hard to track etc) but also there is a cost associated with not using globals, I'd have to pass a loooot of information around very often which can be confusing and I imagine time-costing, although I guess pointers would speed the process up (this is my first time writing a game in C++.) Anyway, I realize there is probably no "right" or "wrong" answer here since both ways work, but I want my code to be as proper as I can so any input would be good, thank you very much!

    Read the article

  • Ubuntu 10.04 & IBM DS3524 with FC multipath, inactive path is [failed][faulty] instead of [active][ghost]

    - by Graeme Donaldson
    OK, this is my setup: FC Switches IBM/Brocade, Switch1 and Switch2, independent fabrics. Server IBM x3650 M2, 2x QLogic QLE2460, 1 connected to each FC Switch. Storage IBM DS3524, 2x controllers with 4x FC ports each, but only 2x connected on each. +-----------------------------------------------------------------------+ | HBA1 Server HBA2 | +-----------------------------------------------------------------------+ | | | | | | +-----------------------------+ +------------------------------+ | Switch1 | | Switch2 | +-----------------------------+ +------------------------------+ | | | | | | | | | | | | | | | | | | | | +-----------------------------------+-----------------------------------+ | Contr A, port 3 | Contr A, port 4 | Contr B, port 3 | Contr B, port 4 | +-----------------------------------+-----------------------------------+ | Storage | +-----------------------------------------------------------------------+ My /etc/multipath.conf is from the IBM redbook for the DS3500, except I use a different setting for prio_callout, IBM uses /sbin/mpath_prio_tpc, but according to http://changelogs.ubuntu.com/changelogs/pool/main/m/multipath-tools/multipath-tools_0.4.8-7ubuntu2/changelog, this was renamed to /sbin/mpath_prio_rdac, which I'm using. devices { device { #ds3500 vendor "IBM" product "1746 FAStT" hardware_handler "1 rdac" path_checker rdac failback 0 path_grouping_policy multibus prio_callout "/sbin/mpath_prio_rdac /dev/%n" } } multipaths { multipath { wwid xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx alias array07 path_grouping_policy multibus path_checker readsector0 path_selector "round-robin 0" failback "5" rr_weight priorities no_path_retry "5" } } The output of multipath -ll with controller A as the preferred path: root@db06:~# multipath -ll sdg: checker msg is "directio checker reports path is down" sdh: checker msg is "directio checker reports path is down" array07 (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) dm-2 IBM ,1746 FASt [size=4.9T][features=1 queue_if_no_path][hwhandler=0] \_ round-robin 0 [prio=2][active] \_ 5:0:1:0 sdd 8:48 [active][ready] \_ 5:0:2:0 sde 8:64 [active][ready] \_ 6:0:1:0 sdg 8:96 [failed][faulty] \_ 6:0:2:0 sdh 8:112 [failed][faulty] If I change the preferred path using IBM DS Storage Manager to Controller B, the output swaps accordingly: root@db06:~# multipath -ll sdd: checker msg is "directio checker reports path is down" sde: checker msg is "directio checker reports path is down" array07 (xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx) dm-2 IBM ,1746 FASt [size=4.9T][features=1 queue_if_no_path][hwhandler=0] \_ round-robin 0 [prio=2][active] \_ 5:0:1:0 sdd 8:48 [failed][faulty] \_ 5:0:2:0 sde 8:64 [failed][faulty] \_ 6:0:1:0 sdg 8:96 [active][ready] \_ 6:0:2:0 sdh 8:112 [active][ready] According to IBM, the inactive path should be "[active][ghost]", not "[failed][faulty]". Despite this, I don't seem to have any I/O issues, but my syslog is being spammed with this every 5 seconds: Jun 1 15:30:09 db06 multipathd: sdg: directio checker reports path is down Jun 1 15:30:09 db06 kernel: [ 2350.282065] sd 6:0:2:0: [sdh] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE Jun 1 15:30:09 db06 kernel: [ 2350.282071] sd 6:0:2:0: [sdh] Sense Key : Illegal Request [current] Jun 1 15:30:09 db06 kernel: [ 2350.282076] sd 6:0:2:0: [sdh] <<vendor>> ASC=0x94 ASCQ=0x1ASC=0x94 ASCQ=0x1 Jun 1 15:30:09 db06 kernel: [ 2350.282083] sd 6:0:2:0: [sdh] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00 Jun 1 15:30:09 db06 kernel: [ 2350.282092] end_request: I/O error, dev sdh, sector 0 Jun 1 15:30:10 db06 multipathd: sdh: directio checker reports path is down Jun 1 15:30:14 db06 kernel: [ 2355.312270] sd 6:0:1:0: [sdg] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE Jun 1 15:30:14 db06 kernel: [ 2355.312277] sd 6:0:1:0: [sdg] Sense Key : Illegal Request [current] Jun 1 15:30:14 db06 kernel: [ 2355.312282] sd 6:0:1:0: [sdg] <<vendor>> ASC=0x94 ASCQ=0x1ASC=0x94 ASCQ=0x1 Jun 1 15:30:14 db06 kernel: [ 2355.312290] sd 6:0:1:0: [sdg] CDB: Read(10): 28 00 00 00 00 00 00 00 08 00 Jun 1 15:30:14 db06 kernel: [ 2355.312299] end_request: I/O error, dev sdg, sector 0 Does anyone know how I can get the inactive path to show "[active][ghost]" instead of "[failed][faulty]"? I assume that once I can get that right then the spam in my syslog will end as well. One final thing worth mentioning is that the IBM redbook doc targets SLES 11 so I'm assuming there's something a little different under Ubuntu that I just haven't figured out yet. Update: As suggested by Mitch, I've tried removing /etc/multipath.conf, and now the output of multipath -ll looks like this: root@db06:~# multipath -ll sdg: checker msg is "directio checker reports path is down" sdh: checker msg is "directio checker reports path is down" xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxdm-1 IBM ,1746 FASt [size=4.9T][features=0][hwhandler=0] \_ round-robin 0 [prio=1][active] \_ 5:0:2:0 sde 8:64 [active][ready] \_ round-robin 0 [prio=1][enabled] \_ 5:0:1:0 sdd 8:48 [active][ready] \_ round-robin 0 [prio=0][enabled] \_ 6:0:1:0 sdg 8:96 [failed][faulty] \_ round-robin 0 [prio=0][enabled] \_ 6:0:2:0 sdh 8:112 [failed][faulty] So its more or less the same, with the same message in the syslog every 5 minutes as before, but the grouping has changed.

    Read the article

  • Create a thread in xna Update method to find path?

    - by Dan
    I am trying to create a separate thread for my enemy's A* pathfinder which will give me a list of points to get to the player. I have placed the thread in the update method of my enemy. However this seems to cause jittering in the game every-time the thread is called. I have tried calling just the method and this works fine. Is there any way I can sort this out so that I can have the pathfinder on its own thread? Do I need to remove the thread start from the update and start it in the constructor? Is there any way this can work. Here is the code at the moment: bool running = false; bool threadstarted; System.Threading.Thread thread; public void update() { if (running == false && threadstarted == false) { thread = new System.Threading.Thread(PathThread); //thread.Priority = System.Threading.ThreadPriority.Lowest; thread.IsBackground = true; thread.Start(startandendobj); //PathThread(startandendobj); threadstarted = true; } } public void PathThread(object Startandend) { object[] Startandendarray = (object[])Startandend; Point startpoint = (Point)Startandendarray[0]; Point endpoint = (Point)Startandendarray[1]; bool runnable = true; // Path find from 255, 255 to 0,0 on the map foreach(Tile tile in Map) { if(tile.Color == Color.Red) { if (tile.Position.Contains(endpoint)) { runnable = false; } } } if(runnable == true) { running = true; Pathfinder p = new Pathfinder(Map); pathway = p.FindPath(startpoint, endpoint); running = false; threadstarted = false; } }

    Read the article

  • How to OpenWebConfiguration with physical path?

    - by aron
    hi, I have a win form that creates a site in IIS7. One function needs to open the web.config file and make a few updates. (connection string, smtp, impersonation) However I do not have the virtual path, just the physical path. Is there any way I can still use WebConfigurationManager? I need to use it's ability to find section and read/write. System.Web.Configuration.WebConfigurationManager.OpenWebConfiguration Thanks!!

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >