Daily Archives

Articles indexed Friday April 2 2010

Page 1/105 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • How do I stop XElement.Save from escaping characters?

    - by Daniel I-S
    I'm populating an XElement with information and writing it to an xml file using the XElement.Save(path) method. At some point, certain characters in the resulting file are being escaped - for example, > becomes >. This behaviour is unacceptable, since I need to store information in the XML that includes the > character as part of a password. How can I write the 'raw' content of my XElement object to XML without having these escaped?

    Read the article

  • Mercurial extensions not working in Windows 7 x64?

    - by Samuel Meacham
    We are test driving Mercurial at work. We don't want to have to enter our user/pass each time we interact with a repository, so we set up the mercurial_keyring extension. We: Installed Python 2.6.5 (32 or 64 bit, depending on the system) Installed setuptools (for easy_install.exe) easy_install keyring easy_install mercurial_keyring And then made the appropriate changes to %userprofile%/mercurial.ini in the [auth] section. It works fine on my colleague's computer (32bit xp sp3), but it does not work on my machine (Windows 7 Ultimate x64). Also noteworthy, the setuptools had to be built from source on Win 7 x64 (python setup.py bdist_wininst, then run the resulting setuptools-0.6c11.win-amd64.exe). Using just hg.exe from the Mercurial 1.5 binary installation (the .msi), I get this error when I run hg.exe: * failed to import extension mercurial_keyring: No module named mercurial_keyring I tried to change my mercurial.ini, to specify the path to the mercurial_keyring.py file, instead of having mercurial find it (since it's in the PYTHONPATH). Old: [extensions] mercurial_keyring = New: [extensions] mercurial_keyring = c:/mercurial/extensions/mercurial_keyring.py The error changes to: abort: could not import module keyring! So while providing the path to the mercurial_keyring extension works, the dependent keyring module still cannot be found. After further investigation, it appears that NO extensions work. They all produce the error: * failed to import extension [extension name]: No module named [module name] It appears that when running hg.exe, it is not aware of PYTHONPATH. I have tried: Python 2.6.5 32 bit Python 2.6.5 64 bit Building Mercurial 1.5 from source with MinGW Building Mercurial 1.5 from source with MSVC9 Using hg.exe from the 1.5 binary dist (.msi) Using the hg.py in c:\python26\scripts when building from source Various configurations in %userprofile%/mercurial.ini Using setuptools (easy_install.exe) to install keyring and mercurial_keyring Building keyring and mercurial_keyring from source (python setup.py bdist_wininst) Nothing works. The closest I've got is using hg.py when building from source. It at least doesn't give me errors, and actually creates %userprofile%/wincrypto_pass.cfg when I enter my credentials. But on subsequent requests, it doesn't enter the credentials automatically. It prompts me for them again. Interestingly, TortoiseHG is using the keyring. I just can't get it to work on the command line. I think something is going on with Win 7 x64 that is preventing mercurial (hg.exe) from seeing the PYTHONPATH, so it can't find any of the installed modules. Does anyone have extensions working in Win 7 x64? Specifically with the binary installation of mercurial (not hg.py)?

    Read the article

  • blog post code in asp.net

    - by Alexander
    I want to write a page where user's can write a blog post and publish it to the blog. I've downloaded blog engine .NET and looked at the code and I like the way they do it, but it's completely an overkill of what I need. What I need is only a title, author, date, and the blog post it self. I don't even want users to post comments or anything like that. My approach is to save all those blog post information into an xml and then when a page loads it loops around those xml files to show the blog post. Is there a tutorial on how to do this online? Especially for doing blog posts.

    Read the article

  • add a start up item via command line (mac)

    - by adam n
    How can I add a start up item via command line on a mac? From googling, I know you have to edit ~/Library/Preferences/com.apple.loginitems.plist using defaults write com.apple.loginitems [key] [value] but i'm not sure exactly which things to edit.

    Read the article

  • JPG segment length encoding

    - by Blorgbeard
    I'm trying to write some code to extract Exif information from a JPG. Exif is stored in the APP1 segment of a JPG file. According to the Exif spec, the format of the APP1 segment is supposed to start like this: FF E1 // APP1 segment marker nn nn // Length of segment 45 // 'E' 78 // 'x' 69 // 'i' 66 // 'f' And it goes until there is an FF followed by something other than FF or 00. Looking at a JPG in a hex editor, I can see FF E1 and the Exif string, but I'm having trouble decoding the length bytes. An example: In one jpg, my hex editor tells me the APP1 segment is 686 bytes long, but the length bytes are F7 C8. How should I use those bytes to come up with 686 decimal?

    Read the article

  • How do I call a super class method

    - by KandadaBoggu
    I have two classes A, and B. Class B overrides the foo method of class A. Class B has a bar method where I want to call the foo method of the super class. What is the syntax for such a call? class A def foo "hello" end end class B def foo super + " world" end def bar # how to call the `foo` method of the super class? # something similar to super.foo end end

    Read the article

  • PHP template class with variables?

    - by Josh
    I want to make developing on my new projects easier, and I wanted a bare bones very simple template engine solution. I looked around on the net and everything is either too bloated, or makes me cringe. My HTML files will be like so: <html> <head> <title>{PAGE_TITLE}</title> </head> <body> <h1>{PAGE_HEADER}</h1> <p>Some random content that is likely not to be parsed with PHP.</p> </body> </html> Obviously, I want to replace {PAGE_TITLE} and {PAGE_HEADER} with something I set with PHP. Like this: <?php $pageElements = array( '{PAGE_TITLE}' => 'Some random title.', '{PAGE_HEADER}' => 'A page header!' ); ?> And I'd use something like str_replace and load the replaced HTML into a string, then print it to the page? This is what I'm on the path towards doing at the moment... does anyone have any advice or a way I can do this better? Thanks.

    Read the article

  • Migrating complex SVN branch hierarchy to Mercurial

    - by Christian Hang
    Our team has been using SVN for managing an application of decent size and over time a rather complex hierarchy of branches and tags has built up, which is following the basic standard layout for SVN repositories, but is more nested: |-trunk |-branches | |-releases | | |-releaseA | | `-releaseB | `-features | |-featureX | `-featureY |-tags |-releaseA | |-beta | `-RTP `-releaseB |-beta `-RTP (The feature branches are obviously temporary branches but we have to take them into consideration as it won't be feasible to close all of them at once in the near future) For several reasons but primarily because merges have been becoming an increasing pain, we are considering to switch to Mercurial. The main problem we are currently facing is migrating the existing code base without losing our history. I've tried several migration tools (e.g., yasvn2hg, hg convert and svn2hg) with yasvn2hg being the most promising, but none of them seem to be able to deal with nested hierarchies but they all assume that branches and tags are organized in one flat directory respectively. The choice between named branches or clones as the conversion target of old SVN branches is not a limiting factor in this case, as either solution would be appreciated. We are currently experimenting with both options and how they would fit into our current processes but haven't decided on one yet. I'd obviously be interested in recommendations or experiences with similar setups concerning that issue as well. So, what is the best way to convert a nested SVN branch hierarchy like this to Mercurial? Converting one branch at a time into a separate repository would be quite annoying and I am not sure if that would be the right approach in the first place, depending on how the tools handle historic merges and need to be aware of all other branches?

    Read the article

  • Problem in Eclipse 3.5 and ubuntu 9.10

    - by ki0
    Someone knows why eclipse close when i click any button. This is because when i try to do something, update eclipse or whatever, eclipse close and it gives me this log... # # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007fc329864f7a, pid=9392, tid=140476827293968 # # JRE version: 6.0_16-b01 # Java VM: Java HotSpot(TM) 64-Bit Server VM (14.2-b01 mixed mode linux-amd64 ) # Problematic frame: # C [libpango-1.0.so.0+0x24f7a] pango_layout_new+0x2a # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # I think it is something about java, anyone has any solution?¿ Thanks

    Read the article

  • 2 (or 3 or 4...) websites in IIS, pointing to same ASP.NET application IIS

    - by billfredtom
    I wish to maintain a single a single code base (ASP.NET app) setup at c:\inetpub\wwwroot\myApp, and point several IIS websites at this single code base. Will this be an issue? Will IIS see this as a conflict in resource allocation? Reasons why I want to do it: Each IIS website can then have it's own IP, SSL cert, etc. Each IIS website can have it's own ISAPI filters installed for friendly URLs, etc. Easier to maintain the code base by having single point of deployment

    Read the article

  • how could installations/configurations be easier in linux?

    - by ajsie
    although you can do anything in linux it tends to require a lot of tweaking in config files and reading a lot of manuals/tutorials before you can have it running in your way. i know that it gets a lot easier by time, and the apt-get installations with ubuntu/debian is heading the right way. but how can linux be more userfriendly for us in the future? i thought that if more is automated like an IDE environment, eg. typing svn will give us all the commands and description about each command when you move between commands with your keyboard. that would be great. but that's just one example. another is the navigation in the terminal between folders. now you have to type a lot just to jump from/to different folders. would be great with some more automatization here too. i know that these extra features will slow down the server, but its 2010 now, and these features are not that heavy for the cpu, but makes it more userfriendly and encourage maintainance of a server, not frighten u off. what do you think about this? should/could we have more user friendly linux environment in servers, something that has annoyed you a lot? a lot of things are done in the unix way, but maybe we should reinvent the wheel in some areas, cause apparently, its so...repeatingly today and difficult to do easy tasks. it should be easier i think..

    Read the article

  • Inheritence in C# question - is overriding internal methods possible?

    - by Jeff Dahmer
    Is it possible to override an internal method's behavior? using System; class TestClass { public string Name { get { return this.ProtectedMethod(); } } protected string ProtectedMethod() { return InternalMethod(); } string InternalMethod() { return "TestClass::InternalMethod()"; } } class OverrideClassProgram : TestClass { // try to override the internal method using new? (compiler warning) new string InternalMethod() { return "OverrideClassProgram::InternalMethod()"; } static int Main(string[] args) { // TestClass::InternalMethod() Console.WriteLine(new TestClass().Name); // TestClass::InternalMethod() ?? are we just screwed? Console.WriteLine(new OverrideClassProgram().Name); return (int)Console.ReadKey().Key; } }

    Read the article

  • Eclipse complains android:scrollbars and android:fadingEdge do not allow Strings - includes code.

    - by emanuel
    Having a problem in Eclipse with regards to an XML file. Eclipse complains that android:scrollbars and android:fadingEdge do not allow Strings. I checked the Android developer site and they do in fact accept strings in the xml file. A related question posed had the problem where there was a missing :android after xmlns. As you can see from the code the line beginning with xmlns is correct I believe. Here is the complete file contents: <?xml version="1.0" encoding="UTF-8"?> <com.example.todolist.TodoListItemView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent" android:padding="10dp" android:scrollbars="verticle" android:textColor="@color/notepad_text" android:fadingEdge="verticle" />

    Read the article

  • C# Working with Locking and Threads

    - by aherrick
    Work on this small test application to learn threading/locking. I have the following code, I would think that the line should only write to console once. However it doesn't seem to be working as expected. Any thoughts on why? What I'm trying to do is add this Lot object to a List, then if any other threads try and hit that list, it would block. Am i completely misusing lock here? class Program { static void Main(string[] args) { int threadCount = 10; //spin up x number of test threads Thread[] threads = new Thread[threadCount]; Work w = new Work(); for (int i = 0; i < threadCount; i++) { threads[i] = new Thread(new ThreadStart(w.DoWork)); } for (int i = 0; i < threadCount; i++) { threads[i].Start(); } // don't let the console close Console.ReadLine(); } } public class Work { List<Lot> lots = new List<Lot>(); private static readonly object thisLock = new object(); public void DoWork() { Lot lot = new Lot() { LotID = 1, LotNumber = "100" }; LockLot(lot); } private void LockLot(Lot lot) { // i would think that "Lot has been added" should only print once? lock (thisLock) { if(!lots.Contains(lot)) { lots.Add(lot); Console.WriteLine("Lot has been added"); } } } }

    Read the article

  • How to perform a 301 redirect of all .php URLs to clean URLs?

    - by spacedatdusk
    My htaccess isn't quite working the way I want it to. I've seen some similar threads on here but they aren't quite what I need and I don't know enough yet about htaccess to modify the code to suit my needs. This is what I have working so far: I've got all non-www URLs redirecting to www URLs and I'm doing an internal rewrite of all URLs to the corresponding PHP file on the server. In the files I have relative links that are clean without any file extension on them. This is what I need to do yet: All the pages on my site are still accessible through URLs with .php on the end. For SEO reasons I want the URL's with .php to all do an external 301 redirect to the clean URL without the extension. Here's what I have in my htaccess file that's in the root folder on my server. Options +FollowSymLinks RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}\.php -f RewriteRule ^(.*)$ $1.php RewriteBase / RewriteCond %{HTTP_HOST} ^domain.com [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301] I'd appreciate any help. Thanks in advance!

    Read the article

  • .Net opening and clossing database connections

    - by Dan
    I currently designed the data access portion of our framework so that every time a business object needed to interact with the database it would have to open a connection, invoke the data access layer (to execute the query), and then close the connection. Then if it needed to run in a transaction it would open the connection, begin the transaction, invoke the data access layer (to execute the query) and then commit the transaction, close the transaction, and finally close the connection. I did it this way with the mindset of open late and close early...but what if I needed to call other BO's to submit data in a single transaction? Is there a better way to handle opening and closing connections as well as working with transactions? I'm a rookie at architecting applications so I hope I'm not doing this wrong...any help is appreciated.

    Read the article

  • What is a Delphi version of the C++ header for the DVP7010B video card DLL?

    - by grzegorz1
    I need help with converting c++ header file to delphi. I spent several days on this problem without success. Below is the original header file and my Delphi translation. C++ header #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 #ifdef DVP7010BDLL_EXPORTS #define DVP7010BDLL_API __declspec(dllexport) #else #define DVP7010BDLL_API __declspec(dllimport) #endif #define MAXBOARDS 4 #define MAXDEVS 4 #define ID_NEW_FRAME 37810 #define ID_MUX0_NEW_FRAME 37800 #define ID_MUX1_NEW_FRAME 37801 #define ID_MUX2_NEW_FRAME 37802 #define ID_MUX3_NEW_FRAME 37803 typedef enum { SUCCEEDED = 1, FAILED = 0, SDKINITFAILED = -1, PARAMERROR = -2, NODEVICES = -3, NOSAMPLE = -4, DEVICENUMERROR = -5, INPUTERROR = -6, // VERIFYHWERROR = -7 } Res; typedef enum tagAnalogVideoFormat { Video_None = 0x00000000, Video_NTSC_M = 0x00000001, Video_NTSC_M_J = 0x00000002, Video_PAL_B = 0x00000010, Video_PAL_M = 0x00000200, Video_PAL_N = 0x00000400, Video_SECAM_B = 0x00001000 } AnalogVideoFormat; typedef enum { SIZEFULLPAL=0, SIZED1, SIZEVGA, SIZEQVGA, SIZESUBQVGA } VideoSize; typedef enum { STOPPED = 1, RUNNING = 2, UNINITIALIZED = -1, UNKNOWNSTATE = -2 } CapState; class IDVP7010BDLL { public: int AdvDVP_CreateSDKInstence(void **pp); virtual int AdvDVP_InitSDK() PURE; virtual int AdvDVP_CloseSDK() PURE; virtual int AdvDVP_GetNoOfDevices(int *pNoOfDevs) PURE; virtual int AdvDVP_Start(int nDevNum, int SwitchingChans, HWND Main, HWND hwndPreview) PURE; virtual int AdvDVP_Stop(int nDevNum) PURE; virtual int AdvDVP_GetCapState(int nDevNum) PURE; virtual int AdvDVP_IsVideoPresent(int nDevNum, BOOL* VPresent) PURE; virtual int AdvDVP_GetCurFrameBuffer(int nDevNum, int VMux, long* bufSize, BYTE* buf) PURE; virtual int AdvDVP_SetNewFrameCallback(int nDevNum, int callback) PURE; virtual int AdvDVP_GetVideoFormat(int nDevNum, AnalogVideoFormat* vFormat) PURE; virtual int AdvDVP_SetVideoFormat(int nDevNum, AnalogVideoFormat vFormat) PURE; virtual int AdvDVP_GetFrameRate(int nDevNum, int *nFrameRate) PURE; virtual int AdvDVP_SetFrameRate(int nDevNum, int SwitchingChans, int nFrameRate) PURE; virtual int AdvDVP_GetResolution(int nDevNum, VideoSize *Size) PURE; virtual int AdvDVP_SetResolution(int nDevNum, VideoSize Size) PURE; virtual int AdvDVP_GetVideoInput(int nDevNum, int* input) PURE; virtual int AdvDVP_SetVideoInput(int nDevNum, int input) PURE; virtual int AdvDVP_GetBrightness(int nDevNum, int input, long *pnValue) PURE; virtual int AdvDVP_SetBrightness(int nDevNum, int input, long nValue) PURE; virtual int AdvDVP_GetContrast(int nDevNum, int input, long *pnValue) PURE; virtual int AdvDVP_SetContrast(int nDevNum, int input, long nValue) PURE; virtual int AdvDVP_GetHue(int nDevNum, int input, long *pnValue) PURE; virtual int AdvDVP_SetHue(int nDevNum, int input, long nValue) PURE; virtual int AdvDVP_GetSaturation(int nDevNum, int input, long *pnValue) PURE; virtual int AdvDVP_SetSaturation(int nDevNum, int input, long nValue) PURE; virtual int AdvDVP_GPIOGetData(int nDevNum, int DINum, BOOL* value) PURE; virtual int AdvDVP_GPIOSetData(int nDevNum, int DONum, BOOL value) PURE; }; Delphi unit IDVP7010BDLL_h; interface uses Windows, Messages, SysUtils, Classes; //{$if _MSC_VER > 1000} //pragma once //{$endif} // _MSC_VER > 1000 {$ifdef DVP7010BDLL_EXPORTS} //const DVP7010BDLL_API = __declspec(dllexport); {$else} //const DVP7010BDLL_API = __declspec(dllimport); {$endif} const MAXDEVS = 4; MAXMUXS = 4; ID_NEW_FRAME = 37810; ID_MUX0_NEW_FRAME = 37800; ID_MUX1_NEW_FRAME = 37801; ID_MUX2_NEW_FRAME = 37802; ID_MUX3_NEW_FRAME = 37803; // TRec SUCCEEDED = 1; FAILED = 0; SDKINITFAILED = -1; PARAMERROR = -2; NODEVICES = -3; NOSAMPLE = -4; DEVICENUMERROR = -5; INPUTERROR = -6; // TRec // TAnalogVideoFormat Video_None = $00000000; Video_NTSC_M = $00000001; Video_NTSC_M_J = $00000002; Video_PAL_B = $00000010; Video_PAL_M = $00000200; Video_PAL_N = $00000400; Video_SECAM_B = $00001000; // TAnalogVideoFormat // TCapState STOPPED = 1; RUNNING = 2; UNINITIALIZED = -1; UNKNOWNSTATE = -2; // TCapState type TCapState = Longint; TRes = Longint; TtagAnalogVideoFormat = DWORD; TAnalogVideoFormat = TtagAnalogVideoFormat; PAnalogVideoFormat = ^TAnalogVideoFormat; TVideoSize = ( SIZEFULLPAL, SIZED1, SIZEVGA, SIZEQVGA, SIZESUBQVGA); PVideoSize = ^TVideoSize; P_Pointer = ^Pointer; TIDVP7010BDLL = class function AdvDVP_CreateSDKInstence(pp: P_Pointer): integer; virtual; stdcall; abstract; function AdvDVP_InitSDK():Integer; virtual; stdcall; abstract; function AdvDVP_CloseSDK():Integer; virtual; stdcall; abstract; function AdvDVP_GetNoOfDevices(pNoOfDevs : PInteger) :Integer; virtual; stdcall; abstract; function AdvDVP_Start(nDevNum : Integer; SwitchingChans : Integer; Main : HWND; hwndPreview: HWND ) :Integer; virtual; stdcall; abstract; function AdvDVP_Stop(nDevNum : Integer ):Integer; virtual; stdcall; abstract; function AdvDVP_GetCapState(nDevNum : Integer ):Integer; virtual; stdcall; abstract; function AdvDVP_IsVideoPresent(nDevNum : Integer; VPresent : PBool) :Integer; virtual; stdcall; abstract; function AdvDVP_GetCurFrameBuffer(nDevNum : Integer; VMux : Integer; bufSize : PLongInt; buf : PByte) :Integer; virtual; stdcall; abstract; function AdvDVP_SetNewFrameCallback(nDevNum : Integer; callback : Integer ) :Integer; virtual; stdcall; abstract; function AdvDVP_GetVideoFormat(nDevNum : Integer; vFormat : PAnalogVideoFormat) :Integer; virtual; stdcall; abstract; function AdvDVP_SetVideoFormat(nDevNum : Integer; vFormat : TAnalogVideoFormat ) :Integer; virtual; stdcall; abstract; function AdvDVP_GetFrameRate(nDevNum : Integer; nFrameRate : Integer) :Integer; virtual; stdcall; abstract; function AdvDVP_SetFrameRate(nDevNum : Integer; SwitchingChans : Integer; nFrameRate : Integer) :Integer; virtual; stdcall; abstract; function AdvDVP_GetResolution(nDevNum : Integer; Size : PVideoSize) :Integer; virtual; stdcall; abstract; function AdvDVP_SetResolution(nDevNum : Integer; Size : TVideoSize ) :Integer; virtual; stdcall; abstract; function AdvDVP_GetVideoInput(nDevNum : Integer; input : PInteger) :Integer; virtual; stdcall; abstract; function AdvDVP_SetVideoInput(nDevNum : Integer; input : Integer) :Integer; virtual; stdcall; abstract; function AdvDVP_GetBrightness(nDevNum : Integer; input: Integer; pnValue : PLongInt) :Integer; virtual; stdcall; abstract; function AdvDVP_SetBrightness(nDevNum : Integer; input: Integer; nValue : LongInt) :Integer; virtual; stdcall; abstract; function AdvDVP_GetContrast(nDevNum : Integer; input: Integer; pnValue : PLongInt) :Integer; virtual; stdcall; abstract; function AdvDVP_SetContrast(nDevNum : Integer; input: Integer; nValue : LongInt) :Integer; virtual; stdcall; abstract; function AdvDVP_GetHue(nDevNum : Integer; input: Integer; pnValue : PLongInt) :Integer; virtual; stdcall; abstract; function AdvDVP_SetHue(nDevNum : Integer; input: Integer; nValue : LongInt) :Integer; virtual; stdcall; abstract; function AdvDVP_GetSaturation(nDevNum : Integer; input: Integer; pnValue : PLongInt) :Integer; virtual; stdcall; abstract; function AdvDVP_SetSaturation(nDevNum : Integer; input: Integer; nValue : LongInt) :Integer; virtual; stdcall; abstract; function AdvDVP_GPIOGetData(nDevNum : Integer; DINum:Integer; value : PBool) :Integer; virtual; stdcall; abstract; function AdvDVP_GPIOSetData(nDevNum : Integer; DONum:Integer; value : Boolean) :Integer; virtual; stdcall; abstract; end; function IDVP7010BDLL : TIDVP7010BDLL ; stdcall; implementation function IDVP7010BDLL; external 'DVP7010B.dll'; end.

    Read the article

  • Using ExpressionEngine or Joomla templates inside a pre-existing page?

    - by Ethan
    Hey SO, So I'm new to both Joomla and Expression Engine, and want to know if I can use it like I'd like. I've already made a full site, and would like to integrate blogging into the site. The site is on CodeIgniter. Is there a way that I could create a form template for submitting a post which would then save to my Joomla/CodeIgniter DB. Then, on a different page, use a different Joomla/CodeIgniter template to display the blog in the form I would like. Note that this wouldn't necessarily be powered by EE or Joomla. From what I understand, and from all the examples I've seen, you have to make the html of the entire page inside of their templates. At worst, if neither work, is there anything I can use to do this? Thanks!

    Read the article

  • flex debugger (how to retrieve a session variable set by a browser)

    - by Rees
    hello, i'm creating a flex application and trying to debug using the "Network Monitor" view. The script i'm debugging fetches a PHP session variable (the PHP outputs xml) and the actionscript retrieves the value from the HTTPService event. if I am using say a chrome browser, i can correctly retrieve the session variable ANY TIME. if I switch to say a firefox browser, then clearly the chrome session variable is unavailable to firefox. My issue is that I create the session variable with say chrome, and then try to retrieve my session variable from my FLEX application debugger (which always returns null) -when I really want it to return my session variable. is there a way for my flex debugger to retrieve this session variable set by chrome (or any browser)? (I'm even using chrome as my debugging browser for flex)

    Read the article

  • Jini : single server with multiple clients

    - by user200340
    Hi all, I have a question about how to make multiple clients can access a single file located on server side and keep the file consistent. I have a simple PhoneBook server-client Jini program running at the moment, and server only provides some getter functions to clients, such as getName(String number), getNumber(String name) from a PhoneBook class(serializable), phonebook data are stored in a text file (phonebook.txt) at the moment. I have tried to implement some functions allowing to write a new records into the phonebook.txt file. If the writing record (name) is existing, an integer number will be added into the writing record. for example the existing phonebook.txt is .... John 01-01010101 .... if the writing record is "John 01-12345678",then "John_1 01-12345678" will be writen into phonebook.txt However, if i start with two clients A and B (on the same machine using localhost), and A tries to write "John 01-11111111", B tries to write "John 01-22222222". The early record will be overwritten later record. So, there must be something i did complete wrong. My client and server code are just like Jini HelloWorld example. My server side code is . 1. LookupDiscovery with parameter new String[]{""}; 2. DiscoveryListener for LookupDiscovery 3. registrations are saved into a HashTable 4. for every discovered lookup service, i use registrar to register the ServiceItem, ServiceItem contains a null attributeSets, a null serviceId, and a service. The client code has: 1. LookupDiscovery with parameter new String[]{""}; 2. DiscoveryListener for LookupDiscovery 3. a ServiceTemplate with null attributeSets, a null serviceId and a type, the type is the interface class. 4. for each found ServiceRegistrar, if it can find the looking for ServiceTemplate, the returned Object is cast into the type of the interface class. I have tried to google more details, and i found JavaSpace could be the one i missed. But i am still not sure about it (i only start Jini for a very short time). So any help would be greatly appreciated.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >