multiple-instances

Multiple RequiredFieldValidators on page but they need to apply to different button clicks

只谈情不闲聊 提交于 2020-01-29 13:35:46
问题 I'm working on a asp.net page and I have the following scenario: I have 2 fields that have requiredfieldvalidators which need to "fire" their validation when button1 is clicked but NOT when button2 is clicked and another field which is validated by another requiredfieldvalidator with the opposite scenario. (requiredfieldvalidator for this field needs to "fire" when button2 is clicked but NOT when button1 is clicked.) Any suggestions for the simplest solution would be appreciated. Thanks in

Multiple RequiredFieldValidators on page but they need to apply to different button clicks

不羁岁月 提交于 2020-01-29 13:35:31
问题 I'm working on a asp.net page and I have the following scenario: I have 2 fields that have requiredfieldvalidators which need to "fire" their validation when button1 is clicked but NOT when button2 is clicked and another field which is validated by another requiredfieldvalidator with the opposite scenario. (requiredfieldvalidator for this field needs to "fire" when button2 is clicked but NOT when button1 is clicked.) Any suggestions for the simplest solution would be appreciated. Thanks in

How do you save your Activity's state when exiting? Android

蹲街弑〆低调 提交于 2020-01-21 10:20:14
问题 I have a basic app with text inputs, a spinner input, and a second spinner input whose array depends on a setting changed in the Options menu. Currently, when I press Home or press Return while in my app, I either return to the desktop or cycle back through old inputs i put in recently. How can I prevent my app from opening multiple instances of itself so that there is only one instance running at any given time, and then how can I save the data entered into inputs, and the settings chosen in

Send data to previous JFrame

橙三吉。 提交于 2020-01-17 12:39:08
问题 I am working with JFrames, I have a main JFrame, which calls for a second JFrame (jFrame2 for example). I need at that jFrame2 has 9 buttons with images within each button (UP HERE ALL PERFECT). Then when in the jFrame2 press a button, close the jFrame2 and send a string to jFrame1. the jFrame1 must be waiting for the end jFrame2 to receive the string that sends the jFrame2, and since the jFrame1 send a JSON to the server with that string. This is my example code: ////// class jFrame1 //////

Send data to previous JFrame

允我心安 提交于 2020-01-17 12:38:00
问题 I am working with JFrames, I have a main JFrame, which calls for a second JFrame (jFrame2 for example). I need at that jFrame2 has 9 buttons with images within each button (UP HERE ALL PERFECT). Then when in the jFrame2 press a button, close the jFrame2 and send a string to jFrame1. the jFrame1 must be waiting for the end jFrame2 to receive the string that sends the jFrame2, and since the jFrame1 send a JSON to the server with that string. This is my example code: ////// class jFrame1 //////

How can I start multiple Tornado Server instances in multiple ports

主宰稳场 提交于 2020-01-15 06:38:29
问题 I need to start the blog demo in the following ports: 127.0.0.1:8000 127.0.0.1:8001 127.0.0.1:8002 127.0.0.1:8003 When I run the application using: ./demos/blog/blog.py it starts in port 8888 as defined by: define("port", default=8888, help="run on the given port", type=int) How do I run multiple instances in multiple ports? 回答1: I found what I was looking for: ./demos/blog/blog.py --port=8889 回答2: Make sure you know, the --port option gets parsed by the options module of the Tornado

How to find out if an instance of my .app is already running or not?

微笑、不失礼 提交于 2020-01-05 03:50:46
问题 My app is getting installed in the Application folder. But I can copy this .app file and paste it on my desktop. When I try to run this .app file on my desktop, two instances are running on my system. How do I prevent this? 回答1: There could by many ways, The first way that hit my mind is to look at runningApplications in NSWorkspace . This returns an NSArray containing a dictionary for each launched application. You can loop through the array to see if the app you are looking for is already

Batch to process files one by one

前提是你 提交于 2020-01-04 15:31:55
问题 I have a batch file to compress PNG files. When I drag and drop some files on batch, it starts to process all of them in the same time. And it becomes useless when I tried with hundreds of files (sure) The main part is something like that (simplified) START "" /W truepng.exe /out "%~n1_out1.png" %1 START "" /W pngwolf.exe --in="%~n1_out1.png" --out="%~n1_out2.png" I think I must to solve the "%1" part. I'm trying to make batch to process files with 4-file blocks. Thinking of 2 different

iPhone: Parsing multiple XML with NSXMLParser in background disturbing each other

Deadly 提交于 2020-01-03 06:00:31
问题 I have a strange issue, when it comes to parsing XML with NSXMLParser on the iPhone. When starting the app, I want to preload 4 table-views, that are populated by RSS-Feeds in the background. When I init the table-views one-by-one, than loading, parsing and displaying all works like a charm. But when I try to init all view at once (at the same time), than it seems, that the XML-parser-instances are disturbing each other . Somehow data from one XML-Feed are "broadcasted" into other xml-parser

PHP Multiple Concurrent Sessions Per User

跟風遠走 提交于 2019-12-30 05:49:26
问题 I'm working on a web app using PHP on Apache. $_SESSION variables are used quite a bit for the information that must persist across pages. We need each user to be able to open multiple concurrent sessions, either as new tabs or new windows, depending on their choice of browser. Right now when a user opens an addition tab or window and goes to the site the existing session is adopted. How can I prevent this so that the user must (or may) log in and start a new session, without it interfering