text
stringlengths 3
1.74M
| label
class label 2
classes | source
stringclasses 3
values |
---|---|---|
Angularjs watch service object. <p>Why can't I watch a object in a service.
Ive got a simple variable working, but a object wont work.
<a href="http://plnkr.co/edit/S4b2g3baS7dwQt3t8XEK?p=preview" rel="noreferrer">http://plnkr.co/edit/S4b2g3baS7dwQt3t8XEK?p=preview</a></p>
<pre><code>var app = angular.module('plunker', []);
app.service('test', ['$http', '$rootScope',
function ($http, $rootScope) {
var data = 0;
var obj = {
"data": 0
};
this.add = function(){
obj.data += 1;
console.log('data:', obj);
};
this.getData = function() { return obj; };
}]);
app.controller('TestController', ['$scope', '$rootScope', '$filter', 'test',
function($scope, $rootScope, $filter, test) {
//test controller
$scope.add = function(){
test.add();
};
$scope.test = test;
$scope.$watch('test.getData()', function(newVal){
console.log('data changes into: ', newVal)
});
}]);
</code></pre>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
CatWorm done in Micron pens and cheap pencil crayons. | 0non-cybersec
| Reddit |
Why would an image (the Mandelbrot) be skewed and wrap around?. <p>So I just wrote a little snippet to generate the Mandelbrot fractal and imagine my surprise when it came out all ugly and skewed (as you can see at the bottom). I'd appreciate a point in the direction of why this would even happen. It's a learning experience and I'm not looking for anyone to do it for me, but I'm kinda at a dead end debugging it. The offending generation code is:</p>
<pre><code>module Mandelbrot where
import Complex
import Image
main = writeFile "mb.ppm" $ imageMB 1000
mandelbrotPixel x y = mb (x:+y) (0:+0) 0
mb c x iter | magnitude x > 2 = iter
| iter >= 255 = 255
| otherwise = mb c (c+q^2) (iter+1)
where q = x -- Mandelbrot
-- q = (abs.realPart $ x) :+ (abs.imagPart $ x) --Burning Ship
argandPlane x0 x1 y0 y1 width height = [ (x,y) |
y <- [y1, y1 - dy .. y0], --traverse from
x <- [x0, x0 + dx .. x1] ] --top-left to bottom-right
where dx = (x1 - x0) / width
dy = (y1 - y0) / height
drawPicture :: (a -> b -> c) -> (c -> Colour) -> [(a, b)] -> Image
drawPicture function colourFunction = map (colourFunction . uncurry function)
imageMB s = createPPM s s
$ drawPicture mandelbrotPixel (replicate 3)
$ argandPlane (-1.8) (-1.7) (0.02) 0.055 s' s'
where s' = fromIntegral s
</code></pre>
<p>And the image code (which I'm fairly confident in) is:</p>
<pre><code>module Image where
type Colour = [Int]
type Image = [Colour]
createPPM :: Int -> Int -> Image -> String
createPPM w h i = concat ["P3 ", show w, " ", show h, " 255\n",
unlines.map (unwords.map show) $ i]
</code></pre>
<p><img src="https://imgur.com/R3fmQ.png" alt="Ugly Mandelskew thing"></p>
| 0non-cybersec
| Stackexchange |
Is there any association between public IP and secondary alias IP in google compute engine?. <p>I want to implement a HA solution for my product in GCP, where I want to move secondary alias IP and public IP from active to standby node on switchover. For this purpose, I want all traffic coming on public IP of an interface should land on secondary alias IP address. What I observed is: the traffic coming on a public ip is landing on primary private ip address. So is there any way we can bind public IP to alias IP..?</p>
<p>Thanks in advance.</p>
| 0non-cybersec
| Stackexchange |
[DEV] I've made a live location sharing app. **Intro**
Graticule is an android app that I created for myself to get rid of those annoying "how much longer till you arrive?" kind of questions.
But while using it, I realized it can be useful for much more, so I've decided to publish it in case it might help others.
**What does it do?**
It sends location information from your phone/tablet to a web page that you can share with anyone.
**How is it different from other location sharing apps?**
* designed with real-time location sharing in mind, not as an after-thought
* very tweak-able beacon settings
* viewers only need an internet connection and a browser
* hassle-free (no signups, friends list, etc): just set it, start it and share your tracking link
* as light-weight as possible
* nothing that can correlate your identity with the location beacons is sent from your device
* random, non-guessable tracking link
* disposable tracking links
**Tell me more about the tweak-able beacon settings**
Everybody knows about GPS @ 1 point per second, but what if you want to save battery or don't need that kind of high accuracy?
In Graticule you can choose both the location technology (GPS, Network, Passive) and the beacon interval (between 1 second and 31 years :-P )
**What's the difference between the location technologies?**
* **GPS**: high accuracy, high battery usage, needs clear view of the sky (sucks indoors)
* **Network**: pretty good accuracy, much lower battery usage, triangulates location based on nearby wireless access points, needs Wi-Fi enabled, but not necessarily connected (sucks outside of cities or places without wireless APs)
* **Passive**: lowest battery usage, piggy-backs on location requests made by other apps (like Google Maps when asking for Directions)
**Download link**
[Google Play link](https://play.google.com/store/apps/details?id=com.emilburzo.graticule)
**PRO version**
Because servers cost money, there's also a "PRO" version available with tracklog support (with much more to come).
But I'm not going to link it because I don't want people to think that's the reason I've made this post.
The free version is functional and has no ads, except that only the last beacon is saved.
The tracklog disappears when you reload the browser with the tracking page. | 0non-cybersec
| Reddit |
Obama kills Babies.....apparently. At what age do you start discussing difficult topics?. So our neighbors are really right wing Christian and we live in the South. My 7 year old comes home today and tells me that his friend (neighbor's kid) told him that she would only vote for Romney because her Mom says "Obama kills babies"! He was smart enough to get that it wasn't true. I told him it was a lie. What else could I say he's not old enough to understand that whole debate.
This isn't the first time that I've had to potentially broach subjects that I don't think are appropriate for his age. His friend has also told him that being gay is wrong and that if two girls get married they're going to hell. I was certainly more comfortable discussing homosexuality than abortion (side stepped the abortion one for now).
Obviously these people are ignorant but they can believe whatever they want as long as my kid's head isn't being filled with hate. Maybe I'm wrong not discussing these things early but I feel like he will grow up quick enough and doesn't need to be thinking about all of this quite yet.
I try my best to be impartial and I'm pretty liberal so I do my best to always give both sides of the story in my explanations. Although today I was blown away and just said it was a lie. With the homosexual question I did explain why some folks think it's a sin. I'm not deeply religious but I like to think that there is something bigger than all of us. So I told him that God loves everyone the same.
How do my fellow Redditors with kids deal with these discussions and at what age do you discuss? I'm just wondering if I'm being overly protective? Should I say something to the parents?
| 0non-cybersec
| Reddit |
Serialize and De-serialize a Django Enum field to accept Numerical and Text representation. <p>I'm trying to create an <a href="https://github.com/5monkeys/django-enumfield" rel="noreferrer">enum field</a> in Django that, upon a GET request will return the text representation of the enum and upon a POST or PATCH request will convert the text representation to the corresponding integer before saving.</p>
<p>The </p>
<pre><code>transform_<field>()
</code></pre>
<p>method works nicely for converting the integer enum value to its corresponding string, but I can't figure out a better way of converting the string into it's corresponding integer other than hacking the </p>
<pre><code>validate_<field>()
</code></pre>
<p>method.</p>
<p>Is there a better way of doing this? Please see code below</p>
<p>Models file</p>
<pre><code>class Status(enum.Enum):
RUNNING = 0
COMPLETED = 1
labels = {
RUNNING: 'Running',
COMPLETED: 'Completed'
}
translation = {v: k for k, v in labels.iteritems()}
class Job(models.Model):
status = enum.EnumField(Status)
</code></pre>
<p>Serializer </p>
<pre><code>class JobSeralizer(serializers.ModelSerailzer):
status = seralizers.CharField(max_length=32, default=Status.QUEUED)
def transform_status(self, obj, value):
return JobStatus.labels[value]
def validate_status(self, attrs, source):
"""Allow status to take numeric or character representation of status
"""
status = attrs[source]
if status in JobStatus.translation:
attrs[source] = JobStatus.translation[status]
elif status.isdigit():
attrs[source] = int(status)
else:
raise serializers.ValidationError("'%s' not a valid status" % status)
return attrs
</code></pre>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Can you give an example of two projective morphisms of schemes whose composition is not projective?. <p>Grothendieck and Dieudonné prove in <span class="math-container">$EGA_{II}$</span> (Proposition 5.5.5.(ii), page 105) that if <span class="math-container">$f:X\to Y, g:Y\to Z$</span> are projective morphisms of schemes and <strong>if</strong> <span class="math-container">$Z$</span> is separated and quasi-compact, or <strong>if</strong> the underlying topological space <span class="math-container">$\operatorname {sp}(Z)$</span> is noetherian, then the composition <span class="math-container">$g\circ f:X\to Z$</span> is also projective.<br>
<strong>Question:</strong> Is there an example where <span class="math-container">$Z$</span> satisfies neither of the two sufficient conditions above and where <span class="math-container">$g\circ f:X\to Z$</span> is not projective?</p>
<p><strong>Edit</strong>
I have corrected my initially wrongly stated sufficient conditions on <span class="math-container">$Z$</span>, caused by the change in terminology:<br>
Prescheme in EGA=Scheme nowadays<br>
Scheme in EGA=Separated scheme nowadays.<br>
Thanks a lot to R. Van Dobben de Bruyn for making me aware of my initial confusion.</p>
| 0non-cybersec
| Stackexchange |
massive memory leak in ios UIWebView. <p>looking for mem leaks elsewhere in our system, I created a 20 MB web page with a meta refresh tag. the idea was to move a lot data through our datapath code to confirm mem stability.</p>
<pre><code><html>
<meta http-equiv="refresh" content="1">
<body>
<div style="border: 1px solid red">
Content loading
</div><!-- 20mb worth of comments -->
</body>
</html>
</code></pre>
<p>what I found was the uiwebview displaying that meta refresh page leaks memory very, very fast. the app memory hits 300mb in about 2 minutes and gets shot on a low mem warning, even when our code is not in play.</p>
<p>I have stopped the refresh loading and tried to dealloc the webview.</p>
<p>I have tried loadurl:"about:blank", loadhtml:"", javascript document close.</p>
<p>I also tried writing a recursive removeFromSuperview and removeFromParentViewController, reading that the private scrollview in the webview is a memory problem, but that memory is never freed. I can't seem to find a reliable way to close, dealloc a webview when we are done with it.</p>
<p>We have lived with a slow rate of webview leaking for quite a while and really want to find a way of assuring a webview can be fully cleaned up when we are done with it. We recently converted the app to ARC which did not change the memory rate.</p>
<p>I am considering trying a recursive loop through all the objects in the webview and see if they can be freed. instruments shows 20 mb of cfdatas, alive, for each refresh of the 20MB page, but does not show them as leaks. if i only deliver the response header and done to the urlprotocol client we run stably so was ale to confirm the memleaks in the rest of the data path, but this is such a dramatic test case result am hoping to find a webview mem leak solution once and for all. </p>
<p>Does any one have any better ideas or has anyone tried recursing through the objects in a uiwebview? </p>
| 0non-cybersec
| Stackexchange |
iOS Collection view flow layout dynamic row height with max height of item in row. <p>I want to create collection view cells which should have max height of item in row. Each item is having dynamic height. Wanted to stretch cells to maximum row height. </p>
<p>Attached the screenshot for same below:<img src="https://i.stack.imgur.com/JQwat.png" alt="Attached screenshot for current layout"></p>
<p>So i would like to stretch item 1 & item 3 to match item 2 height, and item 6 to match item 4 & 5 height and alignment.</p>
<p>Please suggest the solution, its kind of top and bottom aligned flow together I want to achieve.</p>
| 0non-cybersec
| Stackexchange |
I'm not sure when this was added but the bootloader on the pi 4 has a diagnostic screen apparently. | 0non-cybersec
| Reddit |
When recording my telemetry website using JMeter after I have logged in the recorded steps continually increases. <p>When recording my telemetry website using JMeter after I have logged in the recorded steps continually increases, what do I do? Should I stop the recording ASAP just to the obtain the landing page or is there a way to deal with this in JMeter?</p>
| 0non-cybersec
| Stackexchange |
Asus laptop makes weird sound when touched. <p>I've had my Asus N56VV-S4021H for about 1 year and a half. It runs Windows 8.1.</p>
<p>Recently, it started making a sound every time I touch it. Whenever I type, knock on the laptop's case, touch the screen, etc., the speaker makes a corresponding echo. When I turn the volume down, the echo is weaker and when I turn off the volume completely, I can't hear it at all. I don't know what happened.</p>
<p>Can anyone help me get rid of these bizarre sounds?</p>
| 0non-cybersec
| Stackexchange |
Strengthening Enterprises with AI in Video Surveillance. | 1cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Yay flowers, and also what's wrong with the leaf in the first pic?. | 0non-cybersec
| Reddit |
Book list - getting book details from amazon using Excel VBA barcode lookups. <p>I have a barcode reader and bunch of books. For each of the books, I want to list the book name and the author in an Excel spreadsheet. </p>
<p>My view is that some VBA code connecting to an Amazon web service would make this easier. </p>
<p>My questions is - hasn't anyone done this before? Could you point me to the best example. </p>
| 0non-cybersec
| Stackexchange |
What is the purpose of "~/.adobe" directory?. <p>I was cleaning my home directory and found hidden .adobe folder with two files in it:</p>
<pre><code>md5 containing only one line "F894CEFB…"
userid containing also one line "424E8…"
</code></pre>
<p>I deleted whole folder and whole Adobe Creative Suite seems to work. Does anybody know what are these files for? Where does userid comes from?</p>
| 0non-cybersec
| Stackexchange |
Looking for a new dish to add to my repertoire. I'm scheduled to cook for a group of ~10 people. Last two times, I cooked slow-cooked some pulled pork with the advice of this sub and everyone loved it. However, I'd like to try something new that's really simple and tasty. I'd rather not do chili, since I like it better reheated. | 0non-cybersec
| Reddit |
Little Yorkie Lovingly Pets His Owner. | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
THE TIMESTAMP OF TIMED AUTOMATA
AMNON ROSENMANN
Graz University of Technology, Steyrergasse 30, A-8010 Graz, Austria
Abstract. Let eNTA be the class of non-deterministic timed automata
with silent transitions. Given A ∈ eNTA, we effectively compute its
timestamp: the set of all pairs (time value, action) of all observable
timed traces of A. We show that the timestamp is eventually periodic
and that one can compute a simple deterministic timed automaton with
the same timestamp as that of A. As a consequence, we have a partial
method, not bounded by time or number of steps, for the general lan-
guage non-inclusion problem for eNTA. We also show that the language
of A is periodic with respect to suffixes.
1. Introduction
Timed automata (TA) are finite automata extended with clocks that mea-
sure the time that elapsed since past events in order to control the triggering
of future events. They were defined by Alur and Dill in their seminal paper
[1] as abstract models of real-time systems and were implemented in tools
like UPPAAL [20], Kronos [10], RED [27] and PRISM[19].
A fundamental problem in this area is the reachability problem, which
in its basic form asks whether a given location of a timed automaton is
reachable from the initial location. The set of states of the system (i.e., lo-
cations and valuation to the clocks) is, in general, an infinite uncountable set.
However, through the construction of a region automaton, which contains
finitely-many equivalence classes of regions [1], the reachability problem be-
comes a decidable problem (though of complexity PSPACE-complete).
Research on the reachability problem went beyond the above basic ques-
tion. In [14] it is shown that the problem of the minimum and maximum
reachability time is also PSPACE-complete. In another work, [13], which
is more of a theoretical nature, the authors show that some problems on
the relations between states may be defined in the decidable theory of the
domain of real numbers equipped with the addition operation. In particu-
lar, the reachability problem between any two states is decidable. For other
aspects of the reachability problem, also in the context of variants and ex-
tensions of timed automata (e.g. with game and probability characteristics)
we refer to [14],[3], [26], [28], [5], [18], [11], [17]. In this paper we generalize
E-mail address: [email protected].
1
ar
X
iv
:1
41
2.
56
69
v5
[
cs
.F
L
]
1
6
A
ug
2
01
9
2 THE TIMESTAMP OF TIMED AUTOMATA
the reachability problem in another direction. We show that the problem of
computing the set of all time values on which any observable transition oc-
curs (and thus, a location is reached by an observable transition) is solvable.
This set, called the timestamp of the automaton A and denoted TS(A), is
more precisely defined to be the set of all pairs (t, a) that appear in the ob-
servable timed traces of A. Note that for this definition it does not matter
whether we consider infinite runs or finite ones.
We show that the timestamp is in the form of a union of action-labeled
open intervals with integral end-points, and action-labeled points of integral
values. When the timestamp is unbounded in time then it is eventually
periodic.
The set of languages defined by the class DTA of deterministic timed au-
tomata is strictly included in the set of languages defined by the class NTA of
non-deterministic timed automata [1], [16], and the latter is strictly included
in the set of languages defined by the class eNTA of non-deterministic timed
automata with silent transitions [8]. The fundamental problem of inclusion
of the language accepted by a timed automaton A (e.g. the implementation)
in the language accepted by the timed automaton B (e.g. the specification)
is undecidable for the class NTA but decidable for the class DTA. On the
other hand, for special sub-classes or modifications it was shown that decid-
ability exists (see [6, 8, 2, 9, 24, 23, 25, 4, 21] for a partial list). However, the
abstraction (or over-approximation) represented in the form of a timestamp
is a discrete object, in which questions like inclusion of timestamps or uni-
versality are decidable. In fact, we show that for any given non-deterministic
timed automaton with silent transitions, one can construct a simple deter-
ministic timed automaton having the same timestamp.
The computation of the timestamp is done through the construction of
a periodic augmented region automaton Rtper(A). It is a region automaton
augmented with a global non-resetting clock t and containing periodic re-
gions and periodic transitions: they are defined modulo a time period L ∈ N.
This kind of abstraction demonstrates a periodic nature which is absent, in
general, from timed traces: there are timed automata with no timed traces
that are eventually periodic (see Example 6.2). Periodic transitions were
introduced in [12], where it was shown that they increase the expressiveness
of DTA, though they are less expressive than silent transitions.
The construction of the periodic automaton is preceded by defining the
infinite augmented region automaton Rt∞(A), in which the values of the
clock t are unbounded. Then, after exhibiting the existence of a pattern
that repeats itself every L time units, we fold the infinite automaton into a
finite one according to this periodic structure.
Our construction shows that the language of a timed automaton A ∈
eNTA is periodic with respect to suffixes: for every run % with suffix ς that
occurs after passing a fixed computable time there are infinitely-many runs
of A with the same suffix ς, but with the suffix shifted in time by multiples
THE TIMESTAMP OF TIMED AUTOMATA 3
of L. Note that this result does not follow from the pumping lemma, which
does not hold in general in timed automata [7].
In Section 2 basic definitions concerning timed automata are given. Then,
in Section 3 we describe the trail and timestamp of a single path of a timed
automaton, more from a geometric than from an algebraic point of view, af-
ter treating the absolute-time clock t as part of the system. The augmented
and infinite augmented region automaton, Rt(A) and Rt∞(A), are presented
in Section 4, and then, in Section 5, we explore the time-periodicity in them,
so that Rt∞(A) can be folded into the finite periodic augmented region au-
tomaton Rtper(A) (Section 6). In last section (Section 7) we construct the
entire eventually periodic timestamp. As for the general language inclusion
problem in eNTA, the timestamp, or better - the more informative automa-
ton Rtper, may serve as a tool in demonstrating the non-inclusion relation
between the languages of two members of eNTAs.
2. Timed Automata with Silent Transitions
A timed automaton is an abstract model aiming at capturing the temporal
behavior of real-time systems. It is a finite automaton extended with a
finite set of clocks defined over R≥0, the set of non-negative real numbers.
It consists of a finite set of locations q with a finite set of transitions τ
between the locations, while time, measured by the clocks, is continuous. A
transition at time t can occur only if the condition expressed as a transition
guard is satisfied at t. The transition is immediate - no clock is advancing
in time. However, some of the clocks may be reset to zero.
There are two sorts of transitions: observable transitions, which can be
traced by an outside observer, and silent transitions, which are inner transi-
tions and thus cannot be observed from the outside. There are finitely-many
types of observable transitions, each type labeled by a unique action a ∈ Σ,
whereas all the silent transitions have the same label �. In NTA, the class
of non-deterministic timed automata, there exist states in which two transi-
tions from the same location q can be taken at the same time and with the
same action but to two different locations q′ and q′′. When this situation
cannot happen, the TA is deterministic.
Let N0 := N∪ {0} and let P (S) be the power set of a set S. A transition
guard is a conjunction of constraints of the form c ∼ n, where c is a clock,
∼ ∈ {<,≤,=,≥, >} and n ∈ N0. A formal definition of eNTA is as follows.
Definition 2.1 (eNTA). A non-deterministic timed automaton with silent
transitions A ∈ eNTA is a tuple (Q, q0,Σ�, C, T ), where:
(1) Q is a finite set of locations and q0 is the initial location;
(2) Σ� = Σ∪ {�} is a finite set of transition labels, called actions, where
Σ refers to the observable actions and � represents a silent transition;
(3) C is a finite set of clock variables;
(4) T ⊆ Q×Σ� ×G ×P (C)×Q is a finite set of transitions of the form
(q, a, g, Crst, q′), where:
4 THE TIMESTAMP OF TIMED AUTOMATA
(a) q, q′ ∈ Q are the source and the target locations respectively;
(b) a ∈ Σ� is the transition action;
(c) g ∈ G is the transition guard ;
(d) Crst ⊆ C is the subset of clocks to be reset.
A clock valuation v is a function v : C → R≥0. We denote by V the set of
all clock valuations and by d the valuation which assigns the value d to every
clock. Given a valuation v and d ∈ R≥0, we define v+ d to be the valuation
(v + d)(c) := v(c) + d for every c ∈ C. The valuation v[Crst], Crst ⊆ C, is
defined to be v[Crst](c) = 0 for c ∈ Crst and v[Crst](c) = v(c) for c /∈ Crst.
The semantics of A ∈ eNTA is given by the timed transition system
JAK = (S, s0,R≥0,Σ�, T ), where:
(1) S = {(q, v) ∈ Q×V} is the set of states, with s0 = (q0,0) the initial
state;
(2) T ⊆ S× (Σ�∪R≥0)×S is the transition relation. The set T consists
of
(a) Timed transitions (delays): (q, v)
d−→ (q, v + d), where d ∈ R≥0;
(b) Discrete transitions (jumps): (q, v)
a−→ (q′, v′), where a ∈ Σ�
and there exists a transition (q, a, g, Crst, q′) in T , such that for
each clock c, v(c) satisfies the constraints of g regarding c, and
v′ = v[Crst].
A (finite) run % of A ∈ eNTA is a sequence of alternating timed and
discrete transitions of the form
(q0,0)
d1−→ (q0,d1)
a1−→ (q1, v1)
d2−→ · · · dk−→ (qk−1, vk−1 + dk)
ak−→ (qk, vk)
and duration T =
∑k
j=1 dj . The run % of A induces the timed trace (timed
word)
λ = (t1, a1), (t2, a2), . . . , (tk, ak),
with ai ∈ Σ� and ti = Σij=1dj . From the latter we can extract the observable
timed trace (observable timed word), which is obtained by deleting from
λ all the pairs containing silent transitions. Note that when the TA is
deterministic then each timed trace refers to a unique run. We remark that
we did not include for a location q the location invariants in the definition
of timed automata since these invariants can be incorporated in the guards
of the transitions to q (for the clocks that are not reset at the transitions)
and in those emerging from q. We also do not distinguish between accepting
and non-accepting locations as they do not change the analysis and results
concerning the reachability problems that are dealt with here. Thus, the
language L(A) of A refers here to the set of observable timed traces of A
without restricting it to those observable timed traces of runs that end in
acceptable locations.
THE TIMESTAMP OF TIMED AUTOMATA 5
3. The Trail and Timestamp of a Single Path
In this section we describe the trail and timestamp of a single path of a
TA. Given a timed automaton A ∈ eNTA over s clocks x1, . . . , xs, we add
to it a non-resetting global clock t that displays absolute time. A finite
path in A has the form γ = q0τ1q1τ2 · · · τnqn of alternating locations and
transitions, with q0 the initial location and τi a transition between qi−1 and
qi, i = 1, . . . , n, that is, a path here refers to the standard definition in a
directed graph. A run of the TA induces a trajectory in the non-negative
part of the tx1 · · ·xs-space that is a piecewise-linear curve (the discontinuity
is the clocks reset).
Definition 3.1 (Trajectory of a run). Let {t, x1, . . . , xs} be an ordered set
of clocks of A ∈ eNTA. Let % be a run of duration T of A. The trajectory
of % is the set of points (t, x1, . . . , xs) in the tx1 · · ·xs-space visited during
%, where 0 ≤ t ≤ T .
Next, we define the trail of a path.
Definition 3.2 (Trail of a path). The trail of a path γ is the union of the
trajectories of all feasible runs along γ, that is, runs that follow the locations
and discrete transitions of γ.
The trail legs, the parts of the trail between clocks reset, are in the form of
zones [15], a conjunction of diagonal constraints xi−xj < nij or xi−xj ≤ nij ,
nij ∈ Z, bounded by transition constraints xi ∼ ni, where ∼ ∈ {<,≤,=,≥
, >}, ni ∈ N0. Each trail leg can be further partitioned into simplicial trails,
which are (possibly unbounded) parallelotopes consisting of a sequence of
regions [1] arranged along the directional vector 1 = (1, 1, . . . , 1). Each
region n + ∆ is in the form of an open (unless it is a point) simplex ∆
that is a hyper-triangle of dimension 0 ≤ d ≤ s + 1. The simplex ∆ is
characterized by the fractional values {xi} of the clock variables, and each
point in the simplex satisfies the same fixed ordering of the form
(1) 0 �1 {xi1} �2 {xi2} �3 · · · �s {xis} < 1,
where �i ∈ {=, <}. The integral point n ∈ Ns+10 consists of the integral
parts of the values of the clocks x0, x1, . . . , xs, and it indicates the lowest
point in the x0 · · ·xs-space of the boundary of the region. Each region
has a unique immediate time-successor, which is the next region along the
directional vector 1, as long as no clock is reset on an event.
When the simplicial trail S is k-dimensional then the immediate time-
successor of an open k-simplex (a simplex of dimension k, 1 ≤ k ≤ r + 1)
is a (k − 1)-simplex and vice-versa, where each (k − 1)-simplex is a face of
its neighbouring k-simplices. A region which is in the form of a k-simplex
refers to the case where the fractional parts of the clocks are all non-zero,
and then its immediate time-successor is a (k − 1)-simplex, in which the
integral part of the clock with maximal fractional part is increased by 1
while its fractional part is set to zero. The order between the other clocks
6 THE TIMESTAMP OF TIMED AUTOMATA
remains as before. The switch from a k− 1-simplex into a k-simplex occurs
when a clock of fractional part 0 turns into a positive fractional part and
the order of the fractional parts of the clocks as well as their integral values
remains as before. Thus, at each switch there is a cyclic shift in the fractional
parts of the clocks, which results in a periodic sequence of simplices along a
simplicial trail.
Let di ≥ 0 be the feasible duration of the i-th event along a path γ. That
is, di = Mi − mi, where Mi is the supremum, over the runs along γ, of
the time at which the i-th event of the run occurs, and mi is defined as
the infimum of the same set. In case of an automaton with a single clock
x, if x resets on this transition then the size of the temporal part of the
timestamp of the i-th event increases by di, resulting in an increase in the
width of the parallelogram that represents the trail of γ after the i-th event,
and possibly increasing the dimension of the trail from 1 to 2. Otherwise,
the width remains as before. In case of multiple clocks, the dimension of
the trail can increase, decrease or stay the same after an event with reset
of clocks: clocks with the same fractional part can be separated, resulting
in an increase of the dimension, while clocks whose fractional parts become
identical (namely, 0) contribute to a decrease of the dimension.
Let us look at a simple example of the trail and timestamp of a path in
an automaton with a single clock.
Example 3.3. In Fig. 1(a) a TA is drawn, and in Fig. 1(b) we see the trail
and timestamp of the finite path γ : (0)
a−→ (1) b−→ (2) a−→ (3) a−→ (2), where
’a-timestamp’ refers to the projection on the t-axis of the elements (t, a) of
the timestamp, and similarly for ’b-timestamp’. The first event occurs when
x = 1 and the timestamp is {1}×{a}. Then x resets and the trail (a straight
line of slope 1) continues from the t-axis. Event 2 occurs when 1 ≤ x ≤ 3
with timestamp [2, 4] × {b} and a reset of x. After that event the trail is
2-dimensional (a parallelogram). Event 3 occurs when 1 < x < 2 without
clock reset, and the orthogonal projection to the t-axis gives the timestamp
(3, 6) × {a} (here (3, 6) is the open interval 3 < t < 6). The fourth event
happens when x = 3 and its timestamp is [5, 7]×{a}. The timestamp of γ is
the union of the above sets, that is, S1×{a}∪S2×{b}, with S1 = {1}∪(3, 7]
and S2 = [2, 4].
Definition 3.4 (Timestamp of a run). The timestamp of a run % is the set
of pairs (ti, ai) ∈ R≥0 × Σ of the observable timed trace induced by %.
A finite path in A has the form γ = q0τ1q1τ2 · · · τnqn of alternating loca-
tions and transitions, and we always assume that q0 is the initial location.
Such a path is an abstraction of a run since the temporal part is omitted.
Given a path γ in A, there may be many possible runs along γ, and we say
that γ is feasible when there is at least one run along it.
Definition 3.5 (Timestamp of a path). The timestamp of a feasible path γ
of A is the union of the timestamps of all runs % along γ.
THE TIMESTAMP OF TIMED AUTOMATA 7
2 3
0
3
2
1
0 1 4 65 7
tr
ai
l
event 2
tr
ai
l
tr
ai
l
event 3
event 3
0 1 2 3 4 5 6
0
1
2
3
7
1
−
d
im
t
ra
il
2
−
d
im
t
ra
il
event 4event 1
event 4
event 1
event 2
b-timestamp
(a)
x
t
1 2 3
1 < x < 2
a
0
a
t
x
(c)
(b)
b
1 ≤ x ≤ 3, {x}
x = 1, {x}
a
x = 3, {x}
a-timestamp
Figure 1. Trail, timestamp and regions of a path (single clock)
Each instance of a transition along γ is an event. That is, a transition is
a static object which joins two locations of the TA, whereas an event refers
to a specific occurrence of a transition within the path γ. Hence, several
events along a path may refer to the same transition of the TA.
Definition 3.6 (Timestamp of an event in a path). The timestamp of an
event in a path γ is the union of the timestamps of that event of all runs
along γ. It is the part of the timestamp of the path that refers to that event.
Proposition 3.7. The timestamp of each event is either a labeled integral
point or a labeled (open, closed or half-open) interval between points m and
n, m < n, m ∈ N0 and n ∈ N ∪∞.
Proof. The trail of each path is composed of simplices as in (1) residing
on the integral grid. The intersection of such a simplex ∆ with a domain
satisfying a transition constraint of the form xi ∼ ni, where ∼ ∈ {<,≤,=,≥
, >}, ni ∈ N0 is either the whole of ∆ or the empty set. A possible reset of
clocks xi during an event results in mapping ∆ to another simplex ∆
′, which
may be of smaller dimension. Thus, it suffices to show that the timestamp
of a single simplex ∆ is of the required form. But the temporal part of the
timestamp of ∆ is the set n + S, were n ∈ N0 and S is the set of values of
the clock t = x0 in ∆. Since S is either {0} or the open interval (0, 1), we
get that the timestamp of ∆ is either an action-labeled integral point {n}
or an action-labeled open unit interval (n, n+ 1).
8 THE TIMESTAMP OF TIMED AUTOMATA
Another way of proving the claim is via linear programming. Suppose
that a path γ contains r events and that the time of event i, 0 ≤ i ≤ r, is
recorded by the variable ti. Then we can represent ti as satisfying equalities
and inequalities over the integers: instead of referring to a regular clock x
in the constraint of the i-th transition along γ, we refer to the variable tj ,
where the j-th transition along γ was the last time that the clock x was
reset. The result then follows by the fact that the corresponding maximum
and minimum linear programming problems have integer solutions. �
Definition 3.8 (Timestamp of a timed automaton). The timestamp TS(A)
of a timed automaton A is the set of all pairs (t, a), such that an observable
transition with action a occurs at time t in some run of A.
4. Augmented and Infinite Augmented Region Automaton
4.1. Infinite Augmented Region Automaton. Given a (finite) timed
automaton A, the region automaton R(A) [1] is a finite discretized version
of A, such that time is abstracted and both automata define the same un-
timed language. Each vertex in R(A) records a location q in A and a region
r, which is either in the form of a simplex (as described in Section 3) or
an unbounded region, in which the value of at least one of the clocks is >,
meaning that it passed the maximal integer value M that appears in the
transition guards. The regions partition the space of clock valuations into
equivalence classes, where two valuations belong to the same equivalence
class if and only if they agree on the clocks with > value and on the integral
parts and the order among the fractional parts of the other clocks. The
edges of R(A) are labeled by the transition actions, and they correspond to
the actual transitions that occur in the runs of A. Using the time-successor
relation over the clock regions (see [1]), the region automaton can be ef-
fectively constructed. As shown in [1], through the region automaton the
questions of reachable locations and states of A and the actions along the
(possibly infinitely-many) paths that lead to these locations, i.e. the un-
timed language of A, become decidable.
Now we define the infinite augmented region automaton Rt∞(A). First,
we add to A a clock t that measures absolute time, does not appear in the
transition guards, is never reset to 0 and does not affect the runs and timed
traced of A. Next, we construct the region automaton augmented with
t. The construction is similar to the construction of the standard region
automaton with respect to the regular clocks (all clocks except for t) and
the maximal bound M , that is, the time regions of each regular clock xi are
{0}, (0, 1), {1}, (1, 2), . . . ,M,> M , the latter being unbounded and refers to
all values of x greater than M . The integration of the clock t is as follows.
The construction of regions is as usual by considering the integral parts and
the order of the fractional parts of all clocks, including t. The only difference
is that the integral part of t is in N0 and not bounded by M . Thus, the
infinitely-many time-regions associated with t are the alternating point and
THE TIMESTAMP OF TIMED AUTOMATA 9
open unit interval: {0}, (0, 1), {1}, (1, 2), . . . (see Fig. 2(b)). Hence, Rt∞(A)
contains information about absolute time that is lacking from the standard
region automaton.
Definition 4.1 (Infinite augmented region automaton). Given A ∈ eNTA
extended with the clock t that measures absolute time, a corresponding
infinite augmented region automaton Rt∞(A) is a tuple (V, v0, E,Σ�), where:
(1) V is an infinite (in general) set of vertices of the form (q,n,∆), where
q is a location of A and the pair (n,∆) is a region, with
(2) n = (n0, n1, . . . , ns) ∈ N0 × {0, 1, . . . ,M,>}s
containing the integral parts of the clocks t, x1, . . . , xs, and ∆ is the
simplex defined by the order of the fractional parts of the clocks.
(2) v0 = (q0,0,0) is the initial vertex with q0 the initial location of A
and with all clocks having integral part and fractional part equal to
0.
(3) E is the set of edges. There is an edge
(3) (q, r)
a−→ (q′, r′)
labeled with a in Rt∞(A) if and only if there is a run of A which
contains a timed transition followed by a discrete transition of the
form
(4) (q, v)
d−→ (q, v + d) a−→ (q′, v′),
such that the clock valuation v over t, x1, . . . , xs represents a point
in the region r and the clock valuation v′ represents a point in the
region r′.
(4) Σ� = Σ ∪ {�} is the finite set of actions that are edge labels.
We note that there may be infinitely-many edges going-out of the same
region in Rt∞(A) (see Fig. 2(b)).
Proposition 4.2. For each positive integer n, one can effectively construct
the part of Rt∞(A) which contains all regions with t ≤ n and all in-coming
edges of these regions.
Proof. There are finitely-many regions obeying the constraint t ≤ n. These
regions and their in-coming edges can be constructed the same way as a stan-
dard region automaton is constructed, starting with the initial location and
proceeding step by step according to the immediate time-successor regions
(which include the clock t) and according to the transitions of A. Indeed, the
additional clock t is only responsible for a finer partition of regions, but its
introduction does not affect the transition guards of A. Note also that since
the clock t never resets, there are no edges connecting regions with t > n
to regions with t ≤ n. Hence, the number of edges of Rt∞(A) restricted to
t ≤ n is finite. �
10 THE TIMESTAMP OF TIMED AUTOMATA
The benefit of introducing the clock t into the region automaton is that
we can know approximately at what absolute time an action occurs. For
example, suppose that A has a single clock x and that x is reset on a
transition from location q to location q′. Then, in the corresponding region
automaton the information about the time spent at location q before moving
to q′ is lost. In Rt∞(A), however, if we take the absolute time at which an
action occurs to be n + 0.5 when entering a region whose time-region (the
value of t) is the open interval (n, n + 1), and the absolute time n when
entering a region whose time-region is exactly t = n, then it is possible to
construct from it an (infinite) approximate timed automaton with a single
clock and which differs from A by at most 0.5 time units at each action.
The timestamp of the TA A, denoted TS(A), is the union of the times-
tamps of all observable transitions of A, that is, the set of all pairs (t, a),
such that an observable transition with action a occurs at time t in some
run of A. We define also the timestamp of Rt∞(A).
Definition 4.3 (Timestamp of Rt∞(A)). The timestamp of R
t
∞(A), denoted
TS(Rt∞(A)), is the union of sets s × a, where s is a time-region of t (an
integral point {n} or an open unit interval (n, n+1)) that is part of a region
of a vertex of Rt∞(A) and a ∈ Σ is a label of an edge of Rt∞(A) that is
directed towards this vertex.
Proposition 4.4. TS(A) = TS(Rt∞(A)).
Proof. By definition of the infinite augmented region automaton Rt∞(A), its
regions are exactly the clock-regions which are visited by runs of the TA
A extended with the clock t. In particular, the time-regions of Rt∞(A) are
the time-regions that are visited by the runs on the extended TA. Thus,
TS(A) ⊆ TS(Rt∞(A)). By Proposition 3.7, this is an equality since for each
open interval (n, n + 1) representing absolute time that is visited in some
run of A on an action a, the set of all runs of A cover all the points of this
interval with the same action a. �
4.2. Augmented Region Automaton. A second construction is the aug-
mented region automaton, denoted Rt(A), in which we consider only the
fractional part of t and ignore its integral part. Rt(A) is a finite folding of
Rt∞(A), obtained by identifying vertices that contain the same data except
for the integral part of t, and the corresponding edges. Thus, t has only two
time-regions: {0} and (0, 1). As a compensation, we assign weights to the
edges of Rt(A), as explained below.
Definition 4.5 (Augmented region automaton). Given a non-deterministic
timed automaton with silent transitions A ∈ eNTA, extended with the
absolute-time clock t, a corresponding (finite) augmented region automaton
Rt(A) is a tuple (V, v0, E,Σ�,W
∗), where:
THE TIMESTAMP OF TIMED AUTOMATA 11
(1) V is the set of vertices. Each vertex is a triple (q,n,∆), where q is
a location of A and the pair (n,∆) is a region, with
(5) n = (n1, . . . , ns) ∈ {0, 1, . . . ,M,>}s
containing the integral parts of the clocks x1, . . . , xs, and ∆ is the
simplex defined by the fractional parts of the clocks t, x1, . . . , xs.
(2) v0 = (q0,0,0) is the initial vertex.
(3) E is the set of edges. There is an edge (q, r)
a−→ (q′, r′) labeled
with action a if and only if there is a run of A which contains a
timed transition followed by a discrete transition of the form (q, v)
d−→
(q, v+d)
a−→ (q′, v′), such that, when ignoring the integral part of the
time measured by t, the clock valuation v represents a point in the
region r and the clock valuation v′ represents a point in the region
r′.
(4) Σ� = Σ ∪ {�} is the finite set of actions.
(5) W ∗ is the set of weights on the edges. Each weight m, possibly
marked with ‘ ∗ ‘, is m = bt1c − bt0c ∈ [0..M ], where bt1c is the
integral part of the value of t in the target location and bt0c - in the
source location in the corresponding run of A.
There may be more than one edge between two vertices of Rt(A), each
one with a distinguished weight. A marked weight m∗ represents infinitely-
many consecutive values m,m + 1,m + 2, . . . as weights between the same
two vertices, with m being the minimal value of such a sequence. It refers
to a transition to or from a region r in which all regular clocks have passed
the maximal integer M appearing in a transition guard.
Example 4.6. In Fig. 2(a) we see a very simple TA A containing a transi-
tion to an unbounded region. The corresponding infinite augmented region
automaton Rt∞(A) is shown in Fig. 2(b). Each vertex of R
t
∞(A) is repre-
sented by a rounded rectangle containing the original location of A (circled,
on the left), the integral values of t and of x (in the top of the rectangle)
and the simplex (in the bottom). Notice that when the value of x is greater
than M = 0 it is marked by > and its fractional part is ignored. To the
left of Rt∞(A) we see the discretization of time t into time-regions, and each
vertex of Rt∞(A) is drawn in the level of its time-region. In Fig. 2(c) the
augmented region automaton Rt(A) is shown. Here the integral part of the
value of t is ignored. The edge labeled by 0∗ represents the infinitely-many
differences in the integral parts of the values of t: 0, 1, 2, . . .. Similarly, the
edge labeled with 1∗ refers to the differences 1, 2, 3, . . ..
The languages L(Rt(A)) of Rt(A) and L(Rt∞(A)) of R
t
∞(A) consist of
all observable timed traces but, in contrast to the language L(A) of A,
in each pair (ti, ai) the time ti is not exact: it is either an exact integer
n or an arbitrary value of an interval (n, n + 1) that satisfies ti ≥ ti−1.
Thus, L(Rt(A)) and L(Rt∞(A)) are less abstract than the untimed language
12 THE TIMESTAMP OF TIMED AUTOMATA
(a)
0 = {t} = {x}
0
1
a (∗)
(0, 0)
0 < {t}
(d)
a
1
a
0 = {t} = {x}
1
(0, 0)
(∗)
0 = {t}
(0 + N,>)
(1 + N,>)
(0, 1) + N
1 + N
0
t
0 = {t} = {x}
0
1
a 0∗
(−, 0)
0 < {t}
a
0 = {t} = {x}
1
(−, 0)
(−,>)
1
0 = {t}
(−,>)
(c)
0
a
1∗a
a
a
a
a
a
1
1
1
1
(2,>)
(2,>)
(1,>)
(1,>)
0
0 = {t}
0 = {t}
(0, 1)
(1, 2)
(2, 3)
1
a (0, 0)
0 = {t} = {x}
1
1
2
(0,>)
0 < {t}
(0, 0)
0 = {t} = {x}
0 < {t}
0 < {t}
0
t
(b)
10
x ≥ 0
a
Figure 2. (a) A ∈ TA; (b) The infinite augmented region
automaton Rt∞(A); (c) The augmented region automaton
Rt(A); (d) A periodic augmented region automaton Rtper(A).
Each rectangle represents a vertex containing the location of
A (circled, left), the integral values of t and x (top) and the
simplex (bottom).
L(R(A)) of the region automaton R(A) but are more abstract than L(A):
one cannot, in general, distinguish between a transition that occurs without
any time delay, e.g. when xi ≥ 0, and a transition that demands a time
delay, e.g. when xi > 0. When comparing L(R
t(A)) and L(Rt∞(A)) then,
since Rt(A) may be obtained from Rt∞(A), it is clear that L(R
t(A)) cannot
be less abstract than L(Rt∞(A)). But, in fact, these region automata are
equally informative: for each positive integer n, one can effectively construct
Rt∞(A) up to time t = n, as in Proposition 4.2, by unfolding R
t(A) and
recovering absolute time t by summing up the weights of the edges along
the taken paths. Indeed, since the transitions in A do not rely on t, by
taking the quotient of Rt∞(A) by ’forgetting’ the integral part of t, the only
loss of information is the time difference in t between the target and source
regions, but then this information is regained in the form of weight on the
corresponding edge of Rt(A). Thus, we have the following.
Proposition 4.7. L(Rt(A)) = L(Rt∞(A)).
As with Rt∞(A), we can construct from R
t(A) an approximate automa-
ton, this time a finite and deterministic one, which approximates A with a
THE TIMESTAMP OF TIMED AUTOMATA 13
maximal error of 1/2 time units at each observed transition. This automaton
has only one clock and this clock resets at every transition. The maximal
error � = 1/2 could be further reduced to 1/n by allowing transitions in the
approximate automaton to occur at times p/n, p ∈ N0 and only on such
times.
5. Eventual Periodicity
In this section we address the main topic of this paper: exploring the
time-periodic property of TA. In addition to demonstrating its existence,
we show how one can actually compute the parameters of a period.
5.1. Non-Zeno Cycles in Rt(A). Rt(A) is in the form of a finite connected
directed graph with an initial vertex. Every edge of Rt(A) corresponds to a
feasible transition in A (contained in a run of A). In what follows, a ‘path’ in
Rt(A) is a directed path that starts at the initial vertex g0, unless otherwise
stated.
Definition 5.1 (Duration of a path). Given a path γ in Rt(A), its minimal
integral duration, or simply duration, d(γ) ∈ N0 is the sum of the weights
on its edges, where a weight m∗ is counted as m.
Definition 5.2 ((Non)-Zeno cycle). A cycle of Rt(A) of duration 0 is called
a Zeno cycle . Otherwise, it is a non-Zeno cycle.
A path is called simple if no vertex of it repeats itself, and we let D be
the maximal duration of a simple path in Rt(A).
Lemma 5.3. There exists a minimal positive integer tnz ≤ D+ 1, the non-
Zeno threshold time, such that every path γ of Rt(A) that is of (minimal)
duration tnz or more contains a vertex belonging to some non-Zeno cycle.
Proof. Indeed, if Rt(A) does not contain non-Zeno cycles then we can take
tnz = D+1 and the claim holds vacuously. So, suppose that R
t(A) contains
non-Zeno Cycles. Then each path of duration D+ 1 must contain non-Zeno
cycles because otherwise the Zeno cycles could have been removed, without
changing the duration of the path, resulting in a simple path of duration
D + 1 - a contradiction. �
In order to compute tnz we can explore the simple paths of R
t(A), say
in a breadth-first manner, up to the time t0 in which each such path either
cannot be extended to a path of a larger duration or any extension of it hits
a vertex belonging to some non-Zeno cycle. Then tnz = t0 + 1, which may
be much smaller than D + 1.
5.2. A Period of Rt(A). A set S is minimal with respect to some property
if for every element e ∈ S the set S r {e} does not satisfy the property.
14 THE TIMESTAMP OF TIMED AUTOMATA
Definition 5.4 (Covering set of non-Zeno cycles). A set C of non-Zeno
cycles of Rt(A) is called a covering set of non-Zeno cycles if every path γ of
Rt(A) whose duration d(γ) is at least tnz intersects a cycle in C in a common
vertex.
Without loss of generality, we may assume that a covering set of non-Zeno
cycles is minimal.
Definition 5.5 (Period of Rt(A)). A time period (or just period) L of Rt(A)
is a common multiple of the set of durations d(π), π ∈ C, for some fixed
(minimal) covering set of non-Zeno cycles C. For convenience, we also set
L to be greater than M , unless Rt(A) does not contain non-Zeno cycles, in
which case we define L to be 0.
We remark that if we want to compute a minimal period L > M we need
to conduct a thorough exploration of the duration of cycles in Rt(A), taking
into account their common factors, but this computation is not needed for
the results presented here.
5.3. Eventual Periodicity of Rt∞(A). Let tnz, C, L be as above, with C
fixed. We denote by Rt∞(A)|t≥n the subgraph of Rt∞(A) that starts at time-
level n, that is, the set of vertices of Rt∞(A) with absolute time t ≥ n and
their out-going edges.
Definition 5.6 (L-shift in time). Given a subgraph G of Rt∞(A), an L-shift
in time of G, denoted G + L, is the graph obtained by adding the value L
to each value of the integral part of the clock t in G and leaving the rest of
the data unaltered. We also denote by V (G) +L the L-shift in time for the
set of vertices of G, with v + L in case V = {v}.
Lemma 5.7. If Rt∞(A) is not bounded in time then
Rt∞(A)|t≥tnz + L ⊆ R
t
∞(A)|t≥tnz+L.
Proof. First we show that the inclusion holds for the set of vertices of the
above subgraphs. Let γ be a path of Rt∞(A) which terminates in a vertex
v1 ∈ Rt∞(A)|t≥tnz . Let γ′ = p(γ) be the image of γ under the projection
to Rt(A). If γ contains an edge e1 whose image e
′
1 = p(e1) is labeled by
a marked weight m∗ then we can replace e1 by another edge e2 ∈ p−1(e′1)
whose delay is greater by L than the delay of e1. So, suppose that e1 starts
in the vertex u1 and terminates in w1. Then e2 starts in u1 and terminates
in the vertex w2 = w1 + L and then the path continues as in γ but with
an L-shift in time, terminating in the vertex v2 = v1 + L. Otherwise, no
edge of γ′ has a marked weight. Since d(γ) ≥ tnz then by Lemma 5.3 and
the definition of L, γ′ contains a vertex v′ that belongs to a non-Zeno cycle
π and whose duration is a factor of L. Hence, by a ’pumping’ argument,
we can extend γ′ with L/d(π) cycles of π that start and end in v′ and then
reach the vertex v2 = v1 + L in the pre-image in R
t
∞(A) of this extended
path.
THE TIMESTAMP OF TIMED AUTOMATA 15
The inclusion of the out-going edges follows from the fact that the out-
going edges do not depend on the value of t. �
Let us denote by Vk, k = 0, 1, 2, . . ., the set of vertices
Vk = V (R
t
∞(A)|t≥tnz+kL) r V (R
t
∞(A)|t≥tnz+(k+1)L).
Theorem 5.8. If the infinite augmented region automaton Rt∞(A) is not
bounded in time then it is eventually periodic: there exists an integral time
tper > 0 such that
Rt∞(A)|t≥tper + L = R
t
∞(A)|t≥tper+L.
Proof. By Lemma 5.7, Vk+L ⊆ Vk+1, for k ≥ 0. But there is a bound on the
number of possible vertices of Vk since t is bounded, hence the sequence Vk
eventually stabilizes. The result then follows since for the out-going edges
the same argument given in the proof of Lemma 5.7 holds also here. �
When Rt∞(A) is finite then we can set tper to be tmax+1, where tmax is the
maximal integral time of Rt∞(A). By the following proposition, a possible
value for tper can be effectively computed when R
t
∞(A) is infinite.
Proposition 5.9. if |Vk| = |Vk+1| = |Vk+2| for some k then we can set
tper = tnz + kL.
Proof. The equalities |Vk| = |Vk+1| = |Vk+2| are equivalent to Vk+1 = Vk+L
and Vk+2 = Vk+1 +L. By induction, it suffices to show that these equalities
imply that |Vk+2| = |Vk+3|, that is, Vk+3 = Vk+2 + L. Let v ∈ Vk+3. We
need to show that there exists v′ ∈ Vk+2 such that v = v′ + L.
Suppose that v is reached by an edge from a vertex u ∈ Vk+1∪Vk+2. Since
Vk+2 = Vk+1 + L = Vk + 2L, there exists a vertex u
′ = u − L ∈ Vk ∪ Vk+1
and this vertex is connected to a vertex v′ = v − L ∈ Vk+2.
Otherwise, v is reached by an edge e1 from a vertex u in Vk or earlier,
and the time difference d between u and v is greater than 2L. This implies
that the projection p(e1) ∈ Rt(A) is of unbounded time delay m∗. Since
L > M then d − L > M . Hence, there is another edge e2 in Rt∞(A), that
is also a pre-image of p(e1), and which joins u to a vertex v
′ ∈ Vk+2, where
v = v′ + L. �
Example 5.10. This example refers to the TA of Fig. 4 (a). In order to
make the analysis of its time-periodic structure simpler, we changed the
guard on the transition from location 1 to location 2 to be simpler (Fig. 3
(a)), so that in the resulting infinite augmented region automaton Rt∞(A)
(Fig. 3 (b)) we can clearly see two different cycles of period 6 (circled in
dotted lines) (the edges with label c are only partly shown). We then added
the original guard between locations 1 and 2 (Fig. 4 (a)). In the additional
part in Rt∞(A) (Fig. 4 (b)) we see two more cycles, one of period 11 and
one of period 5. We can still use a period of length 6 for this more complex
automaton, but the existence of cycles of other lengths results in a longer
time until reaching the repeated periodic part of the entire automaton.
16 THE TIMESTAMP OF TIMED AUTOMATA
(b)
(0, 1)
1
0
(1, 2)
2
4
t
(4, 5)
(6, 7)
6
(7, 8)
7
...
...
(8, 9)
(10, 11)
(12, 13)
...
...
...
(>,>)
2 {t} > 0
c
�
(0, 2)
2 ∆0
(2, 0)
∆01
(0, 0)
0 ∆0
(0, 0)
3 ∆0
�
(0, 4)
∆02
(1, 1)
∆51
(2, 2)
∆01
a
a
∆5
(0, 0)
3
a
�
a
a
�
�
b
�
∆8 ∆3
(0, 0)
3
(0, 0)
3 ∆2
(0, 0)
3 ∆9
(2, 0)
1 ∆3
� � a
a
a
�
�
a
∆7 ∆4
(0, 0)
3
(0, 1)
3 ∆1
(0, 1)
3 ∆6
(1, 0)
1 ∆1
�
� � a
(0, 0)
3
a
a
�
a
a
�
a
a
�
(0, 0)
3
a
a
�
(0, 0)
3 ∆3
(0, 2)
2 ∆4
(0, 2)
2 ∆3
(0, 2)
2 ∆0
(0, 0)
3 ∆0
a
(0, 0)
3 ∆0
(0, 0)
3
a
∆5
a
a
b
b
∆1 : 0 = {t} = {y} < {x}
∆0 : 0 = {t} = {x} = {y}
∆7 : 0 < {x} < {t} = {y}
∆6 : 0 < {t} = {y} < {x}
∆5 : 0 < {t} = {x} = {y}
∆4 : 0 = {x} < {t} = {y}
∆2 : 0 = {t} < {x} = {y}
∆8 : 0 < {x} = {y} < {t}
∆3 : 0 = {x} = {y} < {t}
∆9 : 0 < {t} < {x} = {y}
a
a
...
...
...
C2
C1
c
C1
10
�
1 < x ≤ 2
2
x = 4, {x}
a
a
x = 2, {x}
3
0 ≤ x < 1, {x}
a
0 < x < 1
�
y = 2
b
�
y = 2, {y}
a
x = 2, {x, y}
c
(x > 4) ∧ (y ≥ 4)
(a)
Figure 3. (a) The simplified A ∈ eNTA; (b) Rt∞(A) with
period 6
As is known, a TA may be totally non-periodic in the sense that no single
timed trace of it is eventually periodic (see Example 6.2). However, a special
kind of periodicity, which we call suffix-periodicity, holds between different
timed traces, as shown in the following theorem.
THE TIMESTAMP OF TIMED AUTOMATA 17
C4
(0, 3)
∆42
(0, 1)
0
t
(0, 1)
2 ∆4
(0, 2)
∆02
(0, 2)
∆42
(0, 0)
3 ∆3
∆0
(0, 0)
3
∆3
(0, 0)
3
(2, 0)
∆31
(0, 1)
∆42
(0, 1)
2 ∆11
(0, 0)
2 ∆3
(0, 0)
3 ∆3
(0, 0)
3 ∆0
(2, 0)
1 ∆0
(0, 0)
3 ∆3
(0, 1)
2 ∆10
(2, 0)
1 ∆3
(0, 1)
2 ∆12
∆1 : 0 = {t} = {y} < {x}
∆0 : 0 = {t} = {x} = {y}
∆7 : 0 < {x} < {t} = {y}
∆6 : 0 < {t} = {y} < {x}
∆5 : 0 < {t} = {x} = {y}
∆4 : 0 = {x} < {t} = {y}
∆2 : 0 = {t} < {x} = {y}
∆8 : 0 < {x} = {y} < {t}
∆3 : 0 = {x} = {y} < {t}
∆9 : 0 < {t} < {x} = {y}
∆10 : 0 = {t} = {x} < {y}
∆11 : 0 = {x} < {t} < {y}
∆12 : 0 = {x} < {y} < {t}
(2, 0)
∆01
(1, 1)
∆51
(2, 2)
∆01
(1, 0)
∆1
(1, 2)
2
1
(3, 4)
... �
�
(0, 0)
0 ∆0
(0, 0)
3 ∆0
�
∆4
(0, 0)
3
�
a
�a
�
�
4
(4, 5)
(5, 6)
6
...
(6, 7)
...
�
a
a
a
(7, 8)
�
�
�
�
�
a
�
...
13
(9, 10)
(11, 12)
...
...
...
...
�
a
9
a
(8, 9)
...
a
8
�
(10, 11)
11
(2, 0)
1 ∆0
a
�
(x > 4) ∧ (y ≥ 4)
0 ≤ x < 1, {x}
10
1 < x ≤ 2
2
a
a
x = 2, {x}
3
a
0 < x < 1
�
y = 2
b
�
y = 2, {y}
a
c
x = 2, {x, y}
3 < x ≤ 4, {x}
�
(a)
(b)
C3
� C4
C3
Figure 4. (a) The original A ∈ eNTA; (b) The additional
part of Rt∞(A) with cycles of lengths 11 and 5
Theorem 5.11. If A ∈ eNTA is not bounded in time then its language L(A)
is suffix-periodic: if tr > tper and
λ = (t1, a1), . . . , (tr−1, ar−1), (tr, ar), (tr+1, ar+1), . . . , (tr+m, ar+m)
18 THE TIMESTAMP OF TIMED AUTOMATA
is an observable timed trace of L(A) then, for each k ∈ LZ, if tr + k > tper
then there exists an observable timed trace λ′ ∈ L(A) such that
λ′ = (t′1, a
′
1), . . . , (t
′
s, a
′
s), (tr + k, ar), (tr+1 + k, ar+1), . . . , (tr+m + k, ar+m).
Proof. Suppose that λ is the observable timed trace of some run % of A.
This run corresponds to a path in Rt∞(A) whose r-th transition reaches
a vertex v with some time-region α with tr ∈ α. By Theorem 5.8 there
exists a path γ in Rt∞(A) which reaches a vertex u = v + k. That is, if
v = (q, (n0, n1, . . . , ns),∆) then u is identical to v except for the integral
part of t, which is increased by k: u = (q, (n0 + k, n1, . . . , ns),∆), or, in
other words, the time-region α′ of u is a translate by k of the time-region
α of v. Hence, since tr ∈ α then tr + k ∈ α′. As we saw in Section 3, the
trail of the path γ (the union of the trajectories along γ) is composed of
regions in the form of simplices. Thus, for every value of the time-region α′,
in particular for tr + k, there exists a run %
′ of A which reaches location q
at the exact time tr + k ∈ α′ on an observable action ar. From that time
on, the run %′ can imitate the behavior of % by keeping a time difference k
in the taken transitions. The result then follows. �
6. Periodic Augmented Region Automaton
After revealing the periodic structure of Rt∞(A), it is natural to fold it into
a finite graph according to this period, which we call periodic augmented
region automaton and denote by Rtper(A). The construction of R
t
per(A) is
done by first taking the subgraph of Rt∞(A) of time t < tper + L and then
folding the infinite subgraph of Rt∞(A) of time t ≥ tper+L onto the subgraph
of time tper ≤ t < tper + L, which becomes the periodic subgraph. Thus,
each vertex of the periodic subgraph represents infinitely-many vertices of
Rt∞(A). Similarly, the out-going edges of the periodic subgraph are periodic
edges. In addition, some of the edges of Rtper(A) are marked with (∗) or (∗+),
as explained below. For an edge e, we denote by ι(e) and τ(e) the initial,
resp. terminal, vertex of e.
Definition 6.1 (Periodic augmented region automaton). Given an infinite
augmented region automaton Rt∞(A) with period L and periodicity starting
time tper, a finite projection p(R
t
∞(A)) of it, called periodic augmented region
automaton and denoted Rtper(A), is a tuple (V, v0, E,Σ�, B), where:
(1) V is the set of vertices, with v0 = (q0,0,0) the initial vertex. For
each v ∈ Rtper(A), if u ∈ p−1(v) ⊆ Rt∞(A) then u equals v in all
fields, except possibly for the integral part of t. If v.btc < tper then
u = v and v is a regular vertex. Otherwise, v is a periodic vertex,
v.btc is written as n + LN0, for some tper ≤ n < tper + L, p−1(v) is
infinite and {u.btc | p(u) = v} = {n+ kL | k = 0, 1, 2, . . .}.
(2) E is the set of edges, which are the projected edges of Rt∞(A) under
the map p. Each edge joining two vertices of Rt∞(A) is mapped to
an edge with the same action label that joins the projected vertices.
THE TIMESTAMP OF TIMED AUTOMATA 19
Some of the edges are marked with a symbol of B = {(∗), (∗+)}.
The description below is technical and refers to the different types
of edges that occur when folding Rt∞(A): whether the source of the
edge is a regular (R) or a periodic (P) vertex (in the latter case the
preimage in Rt∞(A) contains infinitely-many edges, one from each
of the preimage vertices), whether it is unmarked (U) or marked
(M) (in the latter case there are infinitely-many edges starting from
each of the vertices in the preimage source vertices), and finally the
plus sign (+) represents the case where in the preimage the target
vertices are not of value n but n+ L.
• UR : (unmarked, regular) If e ∈ Rtper(A) is unmarked and ι(e)
is regular then ι(e).btc = n1 < tper, τ(e).btc = n2 or τ(e).btc =
n2 +LN0 and p−1(e) = {e′}, with ι(e′).btc = n1 and τ(e′).btc =
n2.
• UP : (unmarked, periodic) If e ∈ Rtper(A) is unmarked and
ι(e) is periodic then ι(e).btc = n1 + LN0, τ(e).btc = n2 + LN0,
tper ≤ n1, n2 < tper + L and the preimage of e in Rt∞(A) are
the infinitely-many edges satisfying the following. If n1 ≤ n2
then p−1(e) = {e′ | ι(e′).btc = n1 + kL, τ(e′).btc = n2 + kL, k =
0, 1, 2, . . .}, and if n1 > n2 then p−1(e) = {e′ | ι(e′).btc = n1 +
kL, τ(e′).btc = n2 + (k + 1)L, k = 0, 1, 2, . . .}.
• MR : (marked, regular) If e ∈ Rtper(A) is marked with ‘(∗)‘
and ι(e) is regular, with ι(e).btc = n1 and τ(e).btc = n2 or
n2 + LN0, then p−1(e) = {e′ | ι(e′).btc = n1, τ(e′).btc = n2 +
kL, k = 0, 1, 2, . . .}, that is, infinitely-many edges starting from
the same vertex.
• MP : (marked, periodic) If e ∈ Rtper(A) is marked with ‘(∗)‘
and ι(e) is periodic, with ι(e).btc = n1 + LN0 and τ(e).btc =
n2 + LN0, then its preimage in Rt∞(A) contains all the edges
according to both rules UP and MR.
• MP+ : (marked, periodic, shifted) If e ∈ Rtper(A) is marked
with ‘(∗+)‘ then the same rules that apply to an edge marked
with ‘(∗)‘ hold, except that the target vertices are of L-shift in
time compared to those of an edge marked with ‘(∗)‘.
(3) Σ� = Σ ∪ {�} is the finite set of actions.
We remark that instead of periodic time interval of type [a, b) we can
define it analogously to be of type (a, b] as in Fig. 2(d), where the periodic
time is (0, 1].
Example 6.2. The TA shown in Fig. 5(a) is taken from [1], where it demon-
strates non-periodicity: the time difference between an a-transition and the
following b-transition is strictly decreasing along a run. However, the period-
icity among the collection of timed traces is seen in the periodic augmented
region automaton, where the period here is of size 1, and the vertices in
times (2, 3) + N0 and 3 + N0 are periodic. Notice also that there are edges
20 THE TIMESTAMP OF TIMED AUTOMATA
marked with (∗) which represent infinitely-many edges with the same source.
t
10 2 3
x = 1, {x}a b
a
x = 1, {x}
b
(0 < x) ∧ (y < 1), {y}
{y}
(a)
2
1
0
0 = {t} = {x} = {y}
3 + N0 2
2
b
b
0 = {t} = {x} = {y}
2
0 = {y} < {t} = {x}
0 = {y} < {t}
(2 + N0,>, 0)
(3 + N0,>, 0)
(1, 0, 1)
(1, 0, 0)
(2, 1, 0)
(0, 0, 0)
0 = {t} = {y}
0 = {t} = {x} = {y}
(1, 0, 0)b
3 3
3
2
(b)
(2, 0, 1) (2, 0, 0)
(3 + N0, 0, 0)
(2 + N0, 0, 0)
0 = {t} = {x} < {y}
0 = {y} < {t} = {x}
0 = {t} = {x} = {y} 0 = {t} = {x} = {y} 0 = {t} = {x} < {y}
(∗)
(∗)
b
2
b
a
a b
b
b
a
a
a
(0, 1)
(1, 2)
(2, 3) + N0
1
2
0
Figure 5. a) A ∈ TA ; b) Rtper(A), a periodic augmented
region automaton of A
Proposition 6.3. Rtper(A) is well-defined and as informative as R
t
∞(A).
Proof. Clearly, since Rtper(A) may be obtained from R
t
∞(A) then it cannot
be more informative. It suffices then to show that for each positive integer
n, Rt∞(A) can be effectively constructed from R
t
per(A) up to time t = n.
Well, for t < tper, R
t
per(A) is identical to R
t
∞(A). Then, by Theorem 5.8,
the graph of Rt∞(A) becomes periodic in the sense that the subgraph of
time tper ≤ t < tper +L repeats itself, except for the integral part of t, which
progresses indefinitely in Rt∞(A) but can be expressed modulo the period
L, as is done in Rtper(A). Indeed, since the transitions in A do not rely on
t, by taking the quotient of Rt∞(A) modulo L from time t ≥ tper, the only
loss of information is the exact time difference in t between the target and
source regions. But due to the periodicity in Rt∞(A), this information can
THE TIMESTAMP OF TIMED AUTOMATA 21
be finitely presented. Hence, since the edges of Rt∞(A) whose initial vertices
are of time t ≥ tper + L are translates of similar edges that start at time
tper ≤ t < tper + L, it suffices to examine the latter.
So, let e be an edge of Rt∞(A) which joins a vertex u of integral time
btc = n1, tper ≤ n1 < tper + L, with a vertex v of integral time btc = n2,
and suppose that n1 ≤ n2 mod L. Suppose also that u is not joined to
a vertex v′ = v − L. Then, since L > M there are only two cases: either
n2−n1 < L or L ≤ n2−n1 < 2L. In order to distinguish between these cases,
the latter case is marked by a plus sign that is added to the corresponding
edge of Rtper(A) from a vertex of integral time btc = n1 + LN0 to a vertex
of integral time btc = tper + ((n2 − tper) mod L) + LN0. When u is also
connected to a vertex v′ = v−L then we let v” be of minimal integral time
modulo L to which u is connected, that is v” = v − iL, for some i > 0,
and there is no edge from u to v”−L (here v, v′ ans v” are identical except
for the integral time of t). If v” is of integral time n then necessarily u is
connected to infinitely-many vertices of integral time n+ kL, k ≥ 0, and all
these edges are captured in Rtper(A) by marking with (∗) the edge from the
corresponding vertex of integral time btc = n1 +LN0 to a vertex of integral
time btc = tper + ((n− tper) mod L) + LN0.
The case where n1 > n2 mod L is handled similarly. It is now clear
that in order to construct Rt∞(A) up to time t = n we only need to unfold
Rtper(A) up to this time by obeying the above rules. �
6.1. Complexity. Let N = N(Rt(A)) denote the number of vertices in
the augmented region automaton Rt(A). If κ denotes the number of clocks,
including the absolute clock t, λ the number of locations in A and µ = M+2,
where M is the maximal integer appearing in a guard of A, then
(6) N ≤ λ(2µ)κκ!.
Indeed, the number of combinations of the integral values of the clocks is
bounded by µκ (in fact, t is assigned a single value), there are κ! different
orderings of the fractional parts of the clocks {xi}, and the term 2κ refers
to all possibilities of inequality or equality between each pair of adjacent
{xi}, {xj} in an ordering.
Let us look now at the number of vertices in Rtper(A). At each time-level
the number of vertices is bounded by N . Since tnz ≤MN then there are at
most MN2 vertices of time t ≤ tnz. After passing tnz we have the subgraphs
Ḡk of time length L, where L is the period. Each such subgraph has at most
NL vertices. Since the number of vertices in the subgraphs forms an almost
increasing sequence (until an equality occurs two consecutive times), the
number of vertices from time tnz to time tper is bounded by (NL)
2. Thus,
the number N(Rtper(A)) of vertices in R
t
per(A) satisfies
(7) N(Rtper(A)) ≤ (L
2 +M)N2(1 + o(1))
as N →∞.
22 THE TIMESTAMP OF TIMED AUTOMATA
The largest factor in (7) may come from the period L, so let us compute
an upper bound of L. L is the least common multiple of the durations d(π)
of cycles that form a covering set of non-Zeno cycles. For each such cycle
π, d(π) ≤MN since the length of a simple cycle is bounded by the number
N of vertices in Rt(A) and the time difference between two vertices along
a path is at most M . Thus, a bound on L is given by the least common
multiple of 1, 2, . . . ,MN , which is by the prime number theorem
(8) L ≤ lcm(1, 2, . . . ,MN) = eMN(1+o(1))
as MN →∞.
Example 6.4. When computing the period L, in the worst case the numbers
d(π) are pairwise prime and the vertices of the cycles π form a disjoint union
of sets which (almost) covers the set of vertices of Rt(A). So, suppose that
Rt(A) is in the form of n simple cycles, where each cycle is connected to the
initial vertex by an additional edge. Suppose also that the length of cycle i is
pi, the i-th prime number, i = 1, . . . , n. Let us assume that M = 1 and each
edge is of weight 1. The number of vertices in Rt(A) is N = 1 +
∑n
i=1 pi ∼
(1/2)n2 log n. Then L = lcm{p1, . . . , pn} =
∏n
i=1 pi = e
n logn(1+o(1)), the
primorial pn#. This upper bound is closer to e
M
√
N than to the bound eMN
of (8).
7. The Timestamp
Recall that the timestamp TS(A) of a timed automaton A is the set of
all pairs (t, a), such that an observable transition with action a occurs at
time t in some run of A.
Theorem 7.1. The timestamp of a TA A is a union of action-labeled inte-
gral points and open unit intervals with integral end-points. It is either finite
or forms an eventually periodic (with respect to time t) subset of R≥0 × Σ
and is effectively computable.
Proof. By Theorem 5.11, if the timestamp is not finite then it becomes
periodic, with period L, after time t = tper. Thus, if it can effectively be
computed up to time tper + L, then in order to find whether there is an
observable transition with action a at time tper + L + t one only needs to
check the timestamp at time tper + (t mod L).
By Proposition 3.7, the timestamp up to time tper + L is a finite number
of labeled integral points and open intervals between integral points and by
Proposition 4.2, it is effectively computable. �
The timestamp of a TA is an abstraction of its language: it does not
preserve the timestamps of single timed traces. However, the timestamp is
eventually periodic and computable, hence the timestamp inclusion prob-
lem is decidable. Thus, due to the general undecidability of the language
inclusion problem in non-deterministic timed automata, one may use the
timestamp for refutation purpose.
THE TIMESTAMP OF TIMED AUTOMATA 23
Corollary 7.2. Given two timed automata A,B ∈ eNTA over the same
alphabet (action labels), the question of non-inclusion of their timestamps is
decidable, thus providing a decidable sufficient condition for the (in general,
undecidable) question of non-inclusion of their languages: L(A) * L(B).
The timestamp is easily extracted from Rtper (in fact, it is enough to take
the subgraph of Rt∞ up to level tper + L). We just form the union of the
time-regions up to level tper + L, where each time-region is either a point
{n} or an open interval (n, n + 1), along with the labels of the actions of
the in-going edges. The timestamp in the interval tper ≤ t < tper + L then
repeats itself indefinitely.
Definition 7.3. For each a ∈ Σ, let Aa be the restriction of A to a-actions,
obtained by substituting each b ∈ Σ r {a} with �, representing the silent
transition.
Thus, the language of Aa is the ’censored’ language of A, which is the
outcome of deleting from each word (timed trace) all pairs (b, t), b 6= a.
Example 7.4. The timestamp of the a-transitions of the automaton of
Fig. 5 is TS(Aa) = N, and that of the b-transitions is TS(Ab) = [1,∞).
7.1. Timestamp Automaton. Given a TA A, one can effectively con-
struct a deterministic TA Ã, called a timestamp automaton of A with the
same timestamp as that of A. Such as automaton is decomposable into the
timestamp automata of the automata Aa.
Definition 7.5 (Timestamp automaton). Given a timed automaton A ∈
eNTA, a timestamp automaton à is a deterministic (finite) timed automaton
with a single clock and with timestamp identical to that of A. It is the union
of the timestamp automata Ãa, a ∈ Σ, having a common initial vertex. Each
Ãa has the form of a single path γ̃a of positive length, which may end in a
loop π̃a, thus giving à the form of a bouquet.
Theorem 7.6. Given a timed automaton A ∈ eNTA, one can effectively
construct a timestamp automaton Ã.
Proof. We construct Ãa by following the ordered connected components
(intervals) of the timestamp TS(Aa) (here ’interval’ includes also singletons
{n}). To each such time interval corresponds the next transition guard in γ̃a,
where the lower and upper constraint on the clock x in the transition guard
are exactly the left and right end-points of the interval. In case TS(Aa)
contains a finite number of intervals (possibly the last interval of infinite
length) then we are done.
Otherwise, TS(Aa) contains infinitely-many intervals, which form an even-
tually periodic sequence with respect to the sizes of the intervals and the
distances among them. Then we need to attach a loop at the end of γ̃a. We
distinguish between two cases.
24 THE TIMESTAMP OF TIMED AUTOMATA
Case (i): The periodic part of TS(Aa) contains an integral point n (not
necessarily as an isolated point). Then we first split the interval, say [a, b),
to which n belongs into disjoint intervals [a, n), {n}, (n, b), such that the
point n belongs to a singleton. Then we extend γ̃a until reaching {n}, so
that the last transition of γ̃a is constrained to x = n while resetting x. From
that point begins the loop π̃a, which obeys the same rules as applied to γ̃a,
with x being reset only when finishing the loop (see Fig. 6 (a)).
Case (ii): The periodic part of TS(Aa) does not contain an integral point,
that is, it is a union of open unit intervals (n, n + 1). Then, if necessary,
we split the last interval before starting the loop into two with the second
component a unit open interval (we know that this last interval is not a
singleton). This unit interval refers to the last transition of γ̃a and we reset
x on that transition. Then, all transitions within the loop π̃a are forced to
occur at integral times, with x being reset when completing the whole loop
(see Fig. 6 (b)) (hence, in both cases the clock x is reset in each Ãa only
on a transition to the vertex va ∈ γ̃a ∩ π̃a). The idea is that if we enter the
loop at a fractional time, say c = 0.3, then all the next transitions will take
place at times n+ 0.3, but since c can be arbitrarily chosen within the open
interval (0, 1) then the set of all runs will cover the entire timestamp. �
Example 7.7. Let A be a TA with timestamp
TS(Aa) = (1, 3] ∪ {5} ∪ (6 + ([0, 2) ∪ {3} ∪ (8, 18)) + 21N0)× {a},
TS(Ab) = [0, 1] ∪ (2, 4) ∪ {5} ∪ (6 + ((0, 1) ∪ (1, 2) ∪ (5, 6) ∪ (8, 9)) + 10N0)
×{b},
TS(Ac) = [1, 4] ∪ {6} ∪ (10,∞)× {c}.
Then a possible timestamp automaton of A is given in Fig. 6.
(a)
1 2 3
4
5
x = 5
a
x = 3
8 < x < 18
a
6
0 < x < 2
a a
x = 6, {x}
a
x = 21, {x}
a
x = 5
x = 8
6 < x < 7, {x}
x = 10, {x}
10
11
12
13
90 7 8
x = 5
b
2 < x < 4
b
0 ≤ x ≤ 1
b
x = 1
b b
b
b
b
c
14 15 16
10 < x <∞
c
x = 6
1 ≤ x ≤ 4
c
1 < x ≤ 3
a
(b)
(c)
Figure 6. Timestamp automata of a) TS(Aa); b) TS(Ab);
c) TS(Ac)
THE TIMESTAMP OF TIMED AUTOMATA 25
0 < x < 1, {x}
�
0 1 10
(b)
a
x = 1, {x}
0 < x < 1
a
x = 1, {x}
(a)
a
Figure 7. a) A non-determinizable A ∈ eNTA ; b) A times-
tamp automaton Ã
Example 7.8. The language of the TA A ∈ eNTA of Fig. 7 (a) is
L(A) = {(t0, a), (t1, a), . . . , (tn, a) | i < ti < i+ 1, i = 0, . . . , n− 1, n ∈ N0}
(supposing all locations are ‘accepting’). The timestamp of A is the set of
all positive non-integral reals: TS(A) = R≥0 rN0. A is not determinizable.
Each transition occurs between the next pair of successive natural numbers.
The guard of each such transition must refer to a clock which was reset on
some previous integral time. But since all transitions occur on non-integral
time, the only clock that can be referred to is a clock x that is reset at time 0
and hence the transition guards need to be of the form n < x < n+1 for each
n ∈ N0, which makes the automaton infinite. Nevertheless, the timestamp
automaton associated with A, seen in Fig. 7 (b), is deterministic.
8. Conclusion and Future Research
The timestamp of a non-deterministic timed automaton with silent tran-
sitions (eNTA) consists of the set of all action-labeled times at which loca-
tions can be reached by observable transitions. The problem of computing
the timestamp is a generalization of the basic reachability problem, a funda-
mental problem in model checking, thus being of interest from the theoretical
as well as from the practical point of view. In this paper we showed that
the timestamp can be effectively computed, also when the timed automata
are non-deterministic and include silent transitions.
One of the major problems in testing and verification of abstract models
of real-time systems is the inclusion of the language of one timed automaton
in the language of another timed automaton. This problem is, in general,
undecidable. Thus, since (non)-inclusion of timestamps of timed automata is
a decidable problem, we have a tool which provides a sufficient condition for
language non-inclusion in timed automata. However, the timestamp may be
seen as overly abstract since it does not take into account the order in which
events occur. Another property to be considered is complexity. We did not
try to find here an efficient algorithm for the construction of the timestamp,
e.g. by replacing regions with time-periodic structures like zones or other
symbolic representations [22] and this can be the subject of possible future
research.
26 THE TIMESTAMP OF TIMED AUTOMATA
Acknowledgements. This research was partly supported by the Austrian Science
Fund (FWF) Project P29355-N35.
References
[1] Rajeev Alur and David L. Dill, A theory of timed automata, Theor. Comput. Sci. 126
(1994), no. 2, 183–235.
[2] Rajeev Alur, Limor Fix, and Thomas A. Henzinger, Event-clock automata: A deter-
minizable class of timed automata, Theor. Comput. Sci. 211 (1999), no. 1-2, 253–273.
[3] Rajeev Alur, Robert P. Kurshan, and Mahesh Viswanathan, Membership questions
for timed and hybrid automata, Real-Time Systems Symposium, 1998, pp. 254–263.
[4] Rajeev Alur and P. Madhusudan, Decision problems for timed automata: A survey,
Formal Methods for the Design of Real-Time Systems, International School on Formal
Methods for the Design of Computer, Communication and Software Systems, 2004,
pp. 1–24.
[5] Eugene Asarin and Oded Maler, As soon as possible: Time optimal control for timed
automata, HSCC, 1999, pp. 19–30.
[6] Christel Baier, Nathalie Bertrand, Patricia Bouyer, and Thomas Brihaye, When are
timed automata determinizable?, ICALP (2), 2009, pp. 43–54.
[7] Danièle Beauquier, Pumping lemmas for timed automata, FoSSaCS, 1998, pp. 81–94.
[8] Béatrice Bérard, Antoine Petit, Volker Diekert, and Paul Gastin, Characterization
of the expressive power of silent transitions in timed automata, Fundam. Inform. 36
(1998), no. 2-3, 145–182.
[9] Patricia Bouyer, Catherine Dufourd, Emmanuel Fleury, and Antoine Petit, Updatable
timed automata, Theor. Comput. Sci. 321 (2004), no. 2-3, 291–345.
[10] Marius Bozga, Conrado Daws, Oded Maler, Alfredo Olivero, Stavros Tripakis, and
Sergio Yovine, Kronos: A model-checking tool for real-time systems, CAV, 1998,
pp. 546–550.
[11] Taolue Chen, Tingting Han, Joost-Pieter Katoen, and Alexandru Mereacre, Reacha-
bility probabilities in markovian timed automata, CDC-ECC, 2011, pp. 7075–7080.
[12] Christian Choffrut and Massimiliano Goldwurm, Timed automata with periodic clock
constraints, Journal of Automata, Languages and Combinatorics 5 (2000), no. 4,
371–403.
[13] Hubert Comon and Yan Jurski, Timed automata and the theory of real numbers,
CONCUR, 1999, pp. 242–257.
[14] Costas Courcoubetis and Mihalis Yannakakis, Minimum and maximum delay prob-
lems in real-time systems, Formal Methods in System Design 1 (1992), no. 4, 385–415.
[15] Conrado Daws and Stavros Tripakis, Model checking of real-time reachability proper-
ties using abstractions, TACAS, 1998, pp. 313–329.
[16] Olivier Finkel, Undecidable problems about timed automata, FORMATS, 2006,
pp. 187–199.
[17] Christoph Haase, Joël Ouaknine, and James Worrell, On the relationship between
reachability problems in timed and counter automata, Reachability Problems, 2012,
pp. 54–65.
[18] Thomas A. Henzinger and Vinayak S. Prabhu, Timed alternating-time temporal logic,
FORMATS, 2006, pp. 1–17.
[19] M. Kwiatkowska, G. Norman, and D. Parker, PRISM 4.0: Verification of probabilistic
real-time systems, Proc. 23rd International Conference on Computer Aided Verifica-
tion (CAV’11) (G. Gopalakrishnan and S. Qadeer, eds.), LNCS, vol. 6806, Springer,
2011, pp. 585–591.
[20] Kim G. Larsen, Paul Pettersson, and Wang Yi, Uppaal in a nutshell, STTT 1 (1997),
no. 1-2, 134–152.
THE TIMESTAMP OF TIMED AUTOMATA 27
[21] Florian Lorber, Amnon Rosenmann, Dejan Ničković, and Bernhard K. Aichernig,
Bounded determinization of timed automata with silent transitions, Real-Time Sys-
tems 53 (2017), no. 3, 291–326.
[22] Georges Morbé, Florian Pigorsch, and Christoph Scholl, Fully symbolic model checking
for timed automata, CAV, 2011, pp. 616–632.
[23] Joël Ouaknine, Alexander Rabinovich, and James Worrell, Time-bounded verification,
CONCUR, 2009, pp. 496–510.
[24] Joël Ouaknine and James Worrell, On the language inclusion problem for timed au-
tomata: Closing a decidability gap, LICS, 2004, pp. 54–63.
[25] Joël Ouaknine and James Worrell, Towards a theory of time-bounded verification,
ICALP (2), 2010, pp. 22–37.
[26] Stavros Tripakis and Sergio Yovine, Analysis of timed systems using time-abstracting
bisimulations, Formal Methods in System Design 18 (2001), no. 1, 25–68.
[27] Farn Wang, Efficient verification of timed automata with bdd-like data structures,
STTT 6 (2004), no. 1, 77–97.
[28] Bozena Wozna, Andrzej Zbrzezny, and Wojciech Penczek, Checking reachability prop-
erties for timed automata via SAT, Fundam. Inform. 55 (2003), no. 2, 223–241.
1. Introduction
2. Timed Automata with Silent Transitions
3. The Trail and Timestamp of a Single Path
4. Augmented and Infinite Augmented Region Automaton
4.1. Infinite Augmented Region Automaton
4.2. Augmented Region Automaton
5. Eventual Periodicity
5.1. Non-Zeno Cycles in Rt(A)
5.2. A Period of Rt(A)
5.3. Eventual Periodicity of Rt(A)
6. Periodic Augmented Region Automaton
6.1. Complexity
7. The Timestamp
7.1. Timestamp Automaton
8. Conclusion and Future Research
Acknowledgements.
References
| 0non-cybersec
| arXiv |
Domain-joined Windows 10 Hyper-V VM reboots after RDP session disconnects. <p>I have several Win10 VMs set up in Hyper-V on Server 2012 R2. The server participates as a node in a failover cluster. The VMs are Roles in the cluster.
These are new VMs with fresh installs of Windows 10 Enterprise 1909.</p>
<p>I've observed that when a user uses Remote Desktop (RDP) to connect to one of the VMs, then disconnects the session (by closing the RDP client; Microsoft RDP client on both Windows and MacOS), then attempts to reconnect - the VM spontaneously reboots.</p>
<p>I've scoured the Google and found older forum posts making references to services that no longer exist (or are no longer configurable) and registry keys that also do not exist in my environment. I can not locate any material published by Microsoft relating to this.</p>
<p>My Windows 7 VMs running on the same Hyper-V server do not exhibit this behavior - but I wasn't around when they were built. I don't know what customizations may have been applied to them.</p>
<p>Is this normal behavior? Is there documentation of this behavior? Is it adjustable?</p>
<p>I'm happy to provide any additional information that may be required.</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Kid say the... F WORD. | 0non-cybersec
| Reddit |
The Sexiest GIF!. | 0non-cybersec
| Reddit |
High quality custom stickers?. Can anyone help out with finding good custom stickers? Maybe a local shop near yourself or something along those lines? Thanks | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
One Zoom to Rule Them All - Lord of the Rings Reunion. | 0non-cybersec
| Reddit |
Cannot format a 64 GB Class 10 SanDisk card. <p>I have this card and it has suddenly gone read only. Windows and my phone can only read and cannot add or delete files from it. I am currently trying gparted to correct this card, but it is of no use. When I delete the partition and try to format it via gparted, it says this:</p>
<ul>
<li>libparted messages
Can't have overlapping partitions.</li>
</ul>
<p>Any ideas? I have personal pictures, bank passwords etc, I am really reluctant to send it to the service center. Any kind of help is appreciated.</p>
| 0non-cybersec
| Stackexchange |
Chartlk. | 0non-cybersec
| Reddit |
Conjugacy of maximal subgroups. <p>This is inspired by my earlier duplicate question seen here: <a href="https://math.stackexchange.com/questions/2091138/is-conjugation-in-infinite-groups-well-behaved">Is conjugation in infinite groups well behaved?</a></p>
<p>The answer to that question is no. This slight tweak might change the result, but I don't have much intuition for infinite groups (who does?). </p>
<p>Let $G$ be an infinite group, and let $M$ be a maximal subgroup (in the sense that there are no proper subgroups of $G$ containing $M$ that aren't $M$). Is it possible for $gMg^{-1}\subset M$, with the containment being proper?</p>
| 0non-cybersec
| Stackexchange |
Advice for customers. | 0non-cybersec
| Reddit |
They did it, they found something in Lake Vostok. For real, this is what dreams are made of.. | 0non-cybersec
| Reddit |
Backbone.js Multi-Step Form. <p>I'm looking to make a step by step form for an "instant quote" type of thing on my website. I made the following image on photoshop, it's pretty self-explanatory that I want the user to enter information at each step of the form and ultimately submit the form at step 3 (going to the next step should be seamless, without a page reload). </p>
<p><img src="https://i.stack.imgur.com/rlU07.png" alt="enter image description here"></p>
<p>Can someone please give me some general pointers how I should go about this? This is my first project using backbone.js and it would really help to have a high level overview of whats the best way to approach this particular widget. </p>
<p>Thanks</p>
| 0non-cybersec
| Stackexchange |
VSCode and ES6 warnings. <p>I keep on getting ES6 jshint warnings, for example:
''import' is only available in ES6 (use 'esversion: 6'). (W119)'
source: 'jshint'
code: 'W119'</p>
<p>I followed suggestions such as</p>
<ol>
<li>Adding a .jshintrc file in the root with
{
"esversion": 6
}</li>
<li>Adding the following to the user and\or workspace settings:
"jshint.options":{
"esversion":6
}</li>
</ol>
<p>But I still get the warning. Are there other things that I can do?</p>
<p>Thanks</p>
| 0non-cybersec
| Stackexchange |
Find distance $d (A,B)$ between line $A$ and $B$. <blockquote>
<p>Let:
<span class="math-container">$$A=\left\{(x,y,z)\in \mathbb R^3: x+y=0,x+z=0\right\}$$</span>
<span class="math-container">$$B=\left\{(1,t,1+2t):t \in \mathbb R\right\}$$</span>
Find distance <span class="math-container">$d (A,B)$</span> between line <span class="math-container">$A$</span> and <span class="math-container">$B$</span>.</p>
</blockquote>
<p>I have a question to this task because I think that I'm making a mistake here, because then this task would be too easy:<br><br><span class="math-container">$A$</span> we can write as: <span class="math-container">$$A=\left\{(x,-x,-x):x\in \mathbb R\right\}$$</span>
So the point <span class="math-container">$(1,-1,-1)$</span> is in <span class="math-container">$A$</span> and <span class="math-container">$B$</span>. <br><br>That's why: <span class="math-container">$$d(A,B)=\inf \left\{|a-b|:a\in A, b\in B\right\}=\inf \left\{|(1,-1,-1)-(1,-1,-1)|\right\}=0$$</span>However I think that this sollution is too trivial to be true.</p>
| 0non-cybersec
| Stackexchange |
Condition for the product of the ratio of the elements of two sequences to be greater than 1.. <p>I have the following product:</p>
<p>$$\prod_{n=1}^N \frac{A_n}{B_n}$$</p>
<p>, where $A_n$ and $B_n$ are the nth element of the finite sequences {$A_x$} and {$B_x$} respectively. I'd like to know the conditions under which this product is higher than one. Note: the two sequences are just random numbers and do not follow some logic pattern.</p>
<p>It probably has to do with the comparison of some central value of the two series. But I don't know if I have to compare the two arithmetic means, the harmonic means, the geometric means, … </p>
| 0non-cybersec
| Stackexchange |
Cryptolocker Ransomware Makes a Bitcoin Wallet per Victim. | 1cybersec
| Reddit |
Shredding wood = pure dog happiness. | 0non-cybersec
| Reddit |
construct an entire function given its zero set. <p>Construct an entire function $f$ whose zero set is $\{im^2: m\in\mathbb N\}\cup\{\sqrt[4]n: n\in\mathbb N\}$, all zeroes being simple. If $g$ is another such function what is the relation between $f$ and $g$? I tried constructing two separate functions one with zero set $A=\{im^2: m\in Z\}$ and another with the zero set $B$, the remainder of what is supplied. The idea is that the product of the functions so constructions would do the job for the former part of the question. I encountered problems however:</p>
<p>I tried condisering the series $\sum\frac1{z-im^2}$. It is a series that converges normally outside $A$. It has simple poles at points in $A$. So when I took reciprocal I got simple zeroes at points in $A$. Sadly the series has infinitely many zeroes on the imaginary axis. So I need to remove them all before taking the reciprocal to ensure that the reciprocal is entire. But I could not get it through.</p>
<p>I considered the function $\cosh(\pi iz^4)$. But its zero set strictly contains $B$ where again I had trouble having to remove infinitely many zeroes.</p>
<p>Any help is greatly appreciated.</p>
| 0non-cybersec
| Stackexchange |
/u/lakerswiz shoots half court shot for $35,000 at Suns @ Lakers game tonight.. | 0non-cybersec
| Reddit |
What kind of flower are you?. | 0non-cybersec
| Reddit |
Table with table-layout: fixed; and how to make one column wider. <p>So I have a table with this style:</p>
<pre><code>table-layout: fixed;
</code></pre>
<p>Which makes all columns to be of the same width. I would like to have one column (the first one) to be wider and then rest of the columns to occupy the remaining width of the table with equal widths.</p>
<p>How to achieve that?</p>
<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-css lang-css prettyprint-override"><code>table {
border-collapse: collapse;
width: 100%;
border: 1px solid black;
background: #ddd;
table-layout: fixed;
}
table th, table td {
border: 1px solid #000;
}
table td.wideRow, table th.wideRow {
width: 300px;
}</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code><table class="CalendarReservationsBodyTable">
<thead>
<tr>
<th colspan="97">Rezervovane auta</th>
</tr>
<tr>
<th class="corner wideRow">Auto</th>
<th class="odd" colspan="4">0</th>
<th class="" colspan="4">1</th>
<th class="odd" colspan="4">2</th>
<th class="" colspan="4">3</th>
<th class="odd" colspan="4">4</th>
<th class="" colspan="4">5</th>
<th class="odd" colspan="4">6</th>
<th class="" colspan="4">7</th>
<th class="odd" colspan="4">8</th>
<th class="" colspan="4">9</th>
<th class="odd" colspan="4">10</th>
<th class="" colspan="4">11</th>
<th class="odd" colspan="4">12</th>
<th class="" colspan="4">13</th>
<th class="odd" colspan="4">14</th>
<th class="" colspan="4">15</th>
<th class="odd" colspan="4">16</th>
<th class="" colspan="4">17</th>
<th class="odd" colspan="4">18</th>
<th class="" colspan="4">19</th>
<th class="odd" colspan="4">20</th>
<th class="" colspan="4">21</th>
<th class="odd" colspan="4">22</th>
<th class="" colspan="4">23</th>
</tr>
</thead>
<tbody>
<tr>
<td class="alignRight wideRow">KE-260 FC - Octavia combi</td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td colspan="16" class="highlighted borderLeft" title="Richard Knop">
Richard Knop
</td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td colspan="14" class="highlighted" title="Richard Knop">
Richard Knop
</td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
<td class=" borderLeft"></td>
<td class="odd"></td>
<td class=""></td>
<td class="odd"></td>
</tr>
</tbody>
</table></code></pre>
</div>
</div>
</p>
<p>jsfiddle: <a href="http://jsfiddle.net/6p9K3/">http://jsfiddle.net/6p9K3/</a></p>
<p>Notice the first column, I want it to be <code>300px</code> wide.</p>
| 0non-cybersec
| Stackexchange |
Ubuntu Desktop 17.10 will not accept static IP with a wifi dongle. <p>After looking at several threads like this <a href="https://ubuntuforums.org/showthread.php?t=2380174" rel="nofollow noreferrer">one</a> or this <a href="https://askubuntu.com/questions/972955/ubuntu-17-10-server-static-ip-netplan-how-to-set-netmask">one</a>.</p>
<p>Here is my <code>/etc/netplan/01-network-manager-all.yaml</code> content:</p>
<pre><code>network:
version: 2
renderer: NetworkManager
ethernets:
wlxa0f3c123eaf8:
dhcp4: no
dhcp6: no
addresses: [192.168.0.150/24]
gateway4: 192.168.0.1
nameservers:
addresses: [127.0.0.53]
</code></pre>
<p>I choose these parameters with <code>ip route show</code></p>
<pre><code>default via 192.168.0.1 dev wlxa0f3c123eaf8 proto static metric 600
169.254.0.0/16 dev wlxa0f3c123eaf8 scope link metric 1000
192.168.0.0/24 dev wlxa0f3c123eaf8 proto kernel scope link src 192.168.0.100 metric 600
</code></pre>
<p>and <code>nslookup google.com</code></p>
<pre><code>Server: 127.0.0.53
Address: 127.0.0.53#53
Non-authoritative answer:
Name: google.com
Address: 172.217.10.14
</code></pre>
<p>Wifi is working but it always goes with the dhcp. Where should I look to resolve this ?</p>
| 0non-cybersec
| Stackexchange |
lost my most prized possession, feel like a fucking loser. i lost my film camera just as i was really starting to get into it. i have DCD and i lose things constantly and i just zoned out and got off the bus and immediately freaked out when i remembered it was on there and yelled and pounded at the back window and some people ahead of me on the street tried to stop it and i couldnt and i called but they said its unlikely and im fucking devastated. all i was thinking about was photography it was like what i was focusing on to get less depressed and now i feel completely lost and stupid and regretful and i hate myself sm | 0non-cybersec
| Reddit |
Natural logarithm limit. <p>Is
$$\lim_{n\rightarrow +\infty}\ln\left(\frac{n+1}{n}\right)=0?$$
Because it is $\ln(1+\frac{1}{n})$ and $\frac{1}{n}$ tends to $0$, since $n$ tends to infinity, so the limit becomes $\ln(1+0)=\ln(1)=0$.</p>
<p>Is this right, or is there any remarkable limit related to this?</p>
<p>P.S. I am not used to formatting yet, I didn't really understand the rules, but I did what I could. </p>
| 0non-cybersec
| Stackexchange |
ebproofs Help: Proving Constructive Dilemma. <p>Okay, I'm trying to prove the constructive dilemma: </p>
<pre><code>\{p\lor q, p\to r, q\to r\} \vdash r
</code></pre>
<p>And I was attempting a proof tree for it in ebproofs and it is giving me some problems.</p>
<p>My code looks like this:</p>
<pre><code>\begin{prooftree}
\Hypo{\neg r} \Hypo{p\to r} \Infer{2}[MT]{\neg p}
\Hypo{p\lor q} \Infer{2}[MT]{q}
\end{prooftree}
</code></pre>
<p>Up to this point it turns out fine. But when I add this:</p>
<pre><code>\begin{prooftree}
\Hypo{\neg r} \Hypo{p\to r} \Infer{2}[MT]{\neg p}
\Hypo{p\lor q} \Infer{2}[MT]{q}
\Hypo{\neg r} \Hypo{p\to q} \Infer{2}[MT]{\neg q}
\end{prooftree}
</code></pre>
<p>I know this is an unfinished proof, but I get a problem here when I try to run the code. Apparently it's a "malformed proof tree".</p>
<p>MT = modus tollens here.</p>
| 0non-cybersec
| Stackexchange |
Full Moon. Tortola, British Virgin Islands [3072x2304]. | 0non-cybersec
| Reddit |
Why does a bool "flag" get generated for the async/await state machine?. <p>If you compile the following code:</p>
<pre><code>private async Task<int> M()
{
return await Task.FromResult(0);
}
</code></pre>
<p>And then decompile it (I used dotPeek) and examine the all-important <code>MoveNext</code> method, you will see a <code>bool</code> variable declared near the beginning; dotPeek chose "flag" for me.</p>
<pre><code>bool flag = true;
</code></pre>
<p>In this case, you will see one subsequent consumer of that variable, in the default case statement after initiating the first async call:</p>
<pre><code>if (!awaiter.IsCompleted)
{
this.\u003C\u003E1__state = 0;
this.\u003C\u003Eu__\u0024awaiter11 = awaiter;
this.\u003C\u003Et__builder.AwaitUnsafeOnCompleted<TaskAwaiter<int>, Program.\u003CP\u003Ed__10>(ref awaiter, ref this);
flag = false;
return;
}
</code></pre>
<p>I've tried half a dozen more complicated examples than my initial one, and they are consistent in <em>only assigning to this variable</em> before exiting the method. So in other words, in all the cases I've tried so far, this variable is not only never consumed, but is only given a non-initial value immediately before returning from the method -- a point in time where the assignment is definitionally useless. </p>
<p>As background, I am enjoying the process of trying to implement async/await in Javascript via a C# -> JS cross-compiler. I'm trying to understand in what situation I need to consider the utility of this flag. At face, it seems spurious and therefore I should ignore it. However, I'd like to understand why the C# compiler introduces this variable -- I suspect there are more complicated expressions that consume this variable in a useful way. </p>
<p>To put is succinctly: Why does the C# compiler generate this <code>flag</code> variable?</p>
| 0non-cybersec
| Stackexchange |
Im a 19 year old meeting with a 56 year old women for sex. Thoughts/tips?. Today i will be meeting with a 56 year old women for sex. She has hinted she wants it to be a regular thing. I don't really know what to expect as i've only had sex a few times and always with someone of a similar age. Obviously I have my doubts about this, she's old! But i'm a horny fucker with a high sex drive and don't want to give up the chance for regular no-strings-attached sex. | 0non-cybersec
| Reddit |
This guy makes the Assassin's Creed: Revelations multiplayer look sooo fun!. | 0non-cybersec
| Reddit |
Why am i randomly socially badass then randomly get really awkward. This happens a lot. I'll get super charged and become socially amazing. Funny, happy, charasmatic. I'll talk to anybody and make conversations about anything. Then the next day I'll wake up and be the polar opposite. Maybe not super awkward but I won't want to talk to anybody and I'll have nothing to say. I'll be silent with a resting "bitch" face (idk what the male equivalent is). Then I'll slowly become super insecure and shit. It's not a big deal tbh but I'm just interested as to why I'm like this and if anyone else is like this. | 0non-cybersec
| Reddit |
Post-Match Thread: MLS All Stars 2 - 1 Bayern Munich. | 0non-cybersec
| Reddit |
Mussels & Frites in Half Moon Bay. | 0non-cybersec
| Reddit |
Using CoreData on a client-side application. <p>This may be a bit more of an SO question, but...</p>
<p>If I'm writing a client-side application for OS X that's going to sync with an online MySQL database, is there any difference on if I have CD use SQLite or XML?</p>
| 0non-cybersec
| Stackexchange |
Sick of the Wii remote?. Hardcore fan here (can't you tell by my name?)
I am honestly sick of the Wii remote. I miss the traditional controller. I need something to HOLD with FORCE. I need it to process my reactions instantly. I sincerely miss the GCN and N64 days. I destroyed my N64 joystick. The GCN controller was great. RE4 and so many other games were amazing on that system. The IR sensor on Wii doesn't do it for me. Traditional games feel gimmicky even without motions/sensor (it pains me to say it) I dont see any game on the Wii that cannot be adapted to a normal Nintendo console. e.g. Zelda will not get any better by Wii remote controls (Skyward Sword). | 0non-cybersec
| Reddit |
Noise complaint turns to hilarious deception. | 0non-cybersec
| Reddit |
Pandas Series correlation against a single vector. <p>I have a DataFrame with a list of arrays as one column.</p>
<pre><code> import pandas as pd
v = [1, 2, 3, 4, 5, 6, 7]
v1 = [1, 0, 0, 0, 0, 0, 0]
v2 = [0, 1, 0, 0, 1, 0, 0]
v3 = [1, 1, 0, 0, 0, 0, 1]
df = pd.DataFrame({'A': [v1, v2, v3]})
print df
</code></pre>
<p>Output:</p>
<pre><code> A
0 [1, 0, 0, 0, 0, 0, 0]
1 [0, 1, 0, 0, 1, 0, 0]
2 [1, 1, 0, 0, 0, 0, 1]
</code></pre>
<p>I want to do a pd.Series.corr for each row of df.A against the single vector v.
I'm currently doing a loop on df.A and achieving it. It is very slow.</p>
<p>Expected Output:</p>
<pre><code> A B
0 [1, 0, 0, 0, 0, 0, 0] -0.612372
1 [0, 1, 0, 0, 1, 0, 0] -0.158114
2 [1, 1, 0, 0, 0, 0, 1] -0.288675
</code></pre>
| 0non-cybersec
| Stackexchange |
Illinois increases max speed limit to 70 mph speed. | 0non-cybersec
| Reddit |
Avaleer - Sandstorms Mixtape [2015]. | 0non-cybersec
| Reddit |
What you must see in Tanzania Africa. | 0non-cybersec
| Reddit |
Existence of alternative basis element in free module over a PID. <p>first question on stack exchange, please let me know if I have made any errors with formatting or in general! :)</p>
<p>Let $f_1,f_2, ...,f_s$ be a basis of a free module $V$ over a PID $R$. Suppose that $f=r_1f_1+r_2f_2+... + r_sf_s$ and that $1$ is a gcd of {$r_1,r_2,...,r_s$}. Show that $f$ is a part of a basis for $V$.</p>
<p>My first thought was that any element in a free module over a PID could be an element of some basis, but then realised that $\mathbb{Z}$ (which is a PID) is a free module over itself and any non-unit is not a basis element. (My suspicion is existence of non-trivial ideals in a PID means not every element is necessarily part of a basis as some elements do not generate the whole set). I guess this is something that is true for vector spaces but not for modules.</p>
<p>I feel as though if I can find some sort of automorphism where one of the basis elements is sent to $f$ I would have it, however I've tried to think of a map and they have tended to be pretty unintuitive and messy so far. Any help would be appreciated, thanks!</p>
| 0non-cybersec
| Stackexchange |
$\sum_{m=-l, ....,l; l=0,1,2,..} e^{\frac{-i E_l (t_f-t_i)}{\hbar}} Y_{lm}(\phi_f,\theta_f)Y_{lm}(\phi_i, \theta_i)$. <p>I have encountered this series while trying to calculate the path integral of a free particle on a sphere. The sum is $$K=\sum e^{\frac{-i E_l (t_f-t_i)}{\hbar}} Y_{lm}(\phi_f,\theta_f)Y_{lm}(\phi_i, \theta_i)$$ $E_l=\frac{\hbar^2}{2I}l(l+1)$, $\frac{\hbar^2}{2I}$ is a constant.</p>
<p>The sum over m is from $-m$ to $m$, and that over $l$ is over the natural numbers $1,2,3...$. $Y's$ are the spherical harmonics on two points of a sphere. The m sum can be done using the <a href="http://en.wikipedia.org/wiki/Spherical_harmonics#Addition_theorem" rel="nofollow noreferrer">addition theorem for spherical harmonics</a></p>
<p>After doing this, the answer is $K(\theta, t_f-t_i) = \sum_{l=0}^{\infty}\frac{2l+1}{4 \pi} e^{\frac{-\hbar^2}{2I} l(l+1)(t_f-t_i)}P_l(cos(\theta))$. </p>
<p>$\theta$ is the angle between the two position vectors i.e. $\cos{\theta}=\hat{n_f}\cdot \hat{n_i}$, where $n_f, n_1$ are the vectors to the two points. </p>
<p><strong>How do I do the sum over $l$</strong>? I am stumped and no idea how to proceed. </p>
<p>Note: I had asked this question on Physics SE <a href="https://physics.stackexchange.com/questions/66076/calculation-of-the-spherical-harmonic-sum-in-the-propagator-of-the-particle-on-a/66091?noredirect=1#comment133325_66091">here</a>, and got a response, but for the above sum the answer gives reference to a review, which is much beyond my understanding. I am wondering if there is a cute and quick method to do it, or a simplified summary of the method used in the review. </p>
| 0non-cybersec
| Stackexchange |
How Do You Keep Interested/Motivated in Personal Finance?. I've been browsing this subreddit for a while, and would say that I have a pretty good process in place. I've been out of college for about a year with a good paying job, no debt, good savings, and lead a relatively frugal lifestyle. Reading posts here, /r/financialindependence and mrmoneymustache have helped keep me interested and motivated in personal finance, but I find myself looking for something more at times.
What do you folks do to keep up your enthusiasm in personal finance? Is there anything (sites/books/forums) that you find to be very motivational?
Thanks! | 0non-cybersec
| Reddit |
[Canada] Rear ended on highway by speeding idiot. | 0non-cybersec
| Reddit |
expected value and variance of a binomial variable. <p>If $X \sim \operatorname{Bin}(10, \theta)$, $p(2)=0.1$ and $p(3)=0.2$, find $\operatorname{E}(X)$ and $\operatorname{V}(X)$</p>
<p>I'm a little lost here so the first thing I did was:</p>
<p>$$p(2)={10 \choose 2}\theta^2(1-\theta)^8=0.1$$ then,
$$45\theta^2(1-\theta)^8=0.1 \rightarrow \theta^2(1-\theta)^8=\frac{1}{450}$$ and,</p>
<p>$$\theta(1-\theta)^4=\sqrt{\frac{1}{450}}$$
I did the same with $p(3)=0.2$, but I'm not very sure that's what I am supposed to do.</p>
| 0non-cybersec
| Stackexchange |
React Native DateTimePicker not Opening in IOS. <p><strong>Datetime Picker is not opening</strong>
i'm using react-native with react-hooks, in Android works fine . but its not opening in IOS and not showing any error. </p>
<p>i just created local component for datepicker so i can use it for both android and ios. for android its going fine IOS is the issue, its not responding </p>
<p>i done pod clean and install also no luck </p>
<pre><code>const DatePicker =({}) =>{
const [state, setState] = useState({
date: new Date(),
mode: 'date',
show: false
});
const showPicker = mode => {
setState(prevState => ({
...prevState,
show: Platform.OS === 'ios',
mode
}));
};
const datePicker = () => {
showPicker('datetime');
};
return(
<>
<View>
<View style={styles.createBorder}>
<TouchableHighlight
underlayColor={disable ? 'transperant' : ''}
onPress={!disable && timePicker}
>
<View style={styles.datePickerBox}>
<Text
style={[styles.datePickerText, { width: width - 60 }]}
>
{state.date}
</Text>
</View>
</TouchableHighlight>
</View>
{state.show && Platform.OS === 'ios' && (
<DateTimePicker
style={[styles.inputBackground, {width: '100%' }]}
value={state.date}
mode="datetime"
is24Hour={false}
display="default"
onChange={setDate}
/>
)}
</View>
</>
);
}
export default DatePicker;
</code></pre>
| 0non-cybersec
| Stackexchange |
Prove $\;\log_2 (1-t^3+O(1/n))=\log_2(1-t^3)+O(1/n)$. <p>I read this today and I'm having trouble proving it:</p>
<p>$$\log_2 (1-t^3+O(1/n))=\log_2(1-t^3)+O(1/n)$$</p>
<p>It is also said that it works for $0\le t\le 1/2$. How to derive this bound?</p>
<p>I know that $\log(1+x)=O(x)$ for $|x|\lt1$ but I'm not being able to apply it.</p>
| 0non-cybersec
| Stackexchange |
Apply central limit theorem with strict inequality. <p>Let <span class="math-container">$\{X_n\}_{n=1}^\infty$</span> be an i.i.d sequence with mean <span class="math-container">$0$</span> and variance <span class="math-container">$1$</span>. The CLT tells us that</p>
<p><span class="math-container">$$\lim_{n \to \infty} \mathbb{P}\left\{\frac{ \sum_{i=1}^nX_i}{\sqrt{n}} \leq x\right\} = \Phi(x)$$</span></p>
<p>where <span class="math-container">$\Phi(x), x \in \mathbb{R}$</span> denotes the probability distribution function of a standard normal variable.</p>
<p>Is it true that <span class="math-container">$$\lim_{n \to \infty} \mathbb{P}\left\{\frac{\sum_{i=1}^nX_i}{\sqrt{n}} < x\right\} = \Phi(x)$$</span></p>
<p>as well? (Note that I replaced the inequality by strict inequality).</p>
<p>Thanks in advance.</p>
| 0non-cybersec
| Stackexchange |
[Text]"You're an interesting species. An interesting mix. You're capable of such beautiful dreams, and such horrible nightmares. You feel so lost, so alone, only you're not. See, in all our searching, the only thing we've found that makes the emptiness bearable, is each other" -Carl Sagan. This powerful quote by astronomer Carl Sagan had a profound impact on my life at a time when I was depressed, so I wanted to share it with you guys. Hope it inspires you as much as it inspired me. Cheers! | 0non-cybersec
| Reddit |
C++ Equivalent to Java's BlockingQueue. <p>I'm in the process of porting some Java code over to C++, and one particular section makes use of a BlockingQueue to pass messages from many producers to a single consumer.</p>
<p>If you are not familiar with what a Java BlockingQueue is, it is just a queue that has a hard capacity, which exposes thread safe methods to put() and take() from the queue. put() blocks if the queue is full, and take() blocks if the queue is empty. Also, timeout-sensitive versions of these methods are supplied.</p>
<p>Timeouts are relevant to my use-case, so a recommendation that supplies those is ideal. If not, I can code up some myself.</p>
<p>I've googled around and quickly browsed the Boost libraries and I'm not finding anything like this. Maybe I'm blind here...but does anyone know of a good recommendation?</p>
<p>Thanks!</p>
| 0non-cybersec
| Stackexchange |
These motherfuckers are always the worst. | 0non-cybersec
| Reddit |
Here's my visual for Steve Nash. | 0non-cybersec
| Reddit |
Can accounts still be logged onto if Password Caching is not enabled?. <p>This is kind of an extension of my other <a href="https://security.stackexchange.com/questions/9721/is-it-possible-to-not-store-passwords-locally-at-all">question</a>.. If you were not storing any of the passwords locally (caching disabled), would a user some how still be able to circumvent around this security measure? I am not quite sure how this all ties into the registry / SAM & other files.. So would someome still be able to use a program like ONTPRE and add in an administrative password to the SAM file or log in by some other means? (Through sniffing or other means.. I assume the other means would generally be easier, if they exist)</p>
<p>In a nutshell, this is my question: The question is it still possible to reset the SAM file or some other method to get onto the computer without accessing the domain?</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
We did it!. | 0non-cybersec
| Reddit |
Xbox converted into a Millenium Falcon [xpost /r/gaming]. | 0non-cybersec
| Reddit |
black&blue or gold&white: no choice edition. | 0non-cybersec
| Reddit |
How to extract information from a Wikipedia infobox?. <p>There is this fancy <a href="https://en.wikipedia.org/wiki/Help:Infobox" rel="noreferrer">infobox</a> in <some Wikipedia article>. How do I get the value of <this field and that>?</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
I love my shop and wanted to share it. | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
SQL Replication sysarticles Status 57. <p>I am looking at the data kept in the various SQL Replication tables. I am trying to understand what information is available and what it means.</p>
<p>In this example I have push replication on the database AdventureWorks2014 in a SQL 2017 Enterprise edition instance. The subscription is on the same instance.</p>
<p>The table <a href="https://docs.microsoft.com/en-us/sql/relational-databases/system-tables/sysarticles-transact-sql?view=sql-server-ver15" rel="nofollow noreferrer">sysarticles</a> has the column <code>status</code> and it is showing a value of 57, I don't understand how that is possible, nor what it might mean</p>
<blockquote>
<p>status tinyint</p>
<p>The bitmask of the article options and status, which can be the bitwise logical OR result of one or more of these values:</p>
<p>1 = Article is active.</p>
<p>8 = Include the column name in INSERT statements.</p>
<p>16 = Use parameterized statements.</p>
<p>24 = Both include the column name in INSERT statements and use parameterized statements.</p>
<p>64 = Identified for informational purposes only. Not supported. Future compatibility is not guaranteed.</p>
<p>For example, an active article using parameterized statements would have a value of 17 in this column. A value of 0 means that the article is inactive and no additional properties are defined.</p>
</blockquote>
<p>This query</p>
<pre><code>SELECT TOP (1000) [artid]
,[del_cmd]
,[dest_table]
,[filter]
,[ins_cmd]
,[name]
,[pubid]
,[status]
,[type]
,[upd_cmd]
,[schema_option]
FROM [AdventureWorks2014].[dbo].[sysarticles]
</code></pre>
<p>Gives these results</p>
<p><a href="https://i.stack.imgur.com/2tWk9.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2tWk9.jpg" alt="sysarticles" /></a></p>
<p>There is one clue (emphases mine)</p>
<blockquote>
<p>The bitmask of the <strong>article options</strong> and status, which can be the bitwise logical OR result of one or more of these values:</p>
</blockquote>
<p>Which leads to <a href="https://docs.microsoft.com/en-us/sql/relational-databases/system-stored-procedures/sp-addarticle-transact-sql?view=sql-server-ver15" rel="nofollow noreferrer">sp_addarticle</a> Additionally I have included the value of <code>schema_option</code> in the results the value in my example is <code>0x000000000803509F</code> I am not sure how/if this could create the 57</p>
<blockquote>
<p>schema_option binary(8)</p>
<p>A bitmask of the schema generation options for the article, which control what parts of the article schema are scripted out for delivery to the Subscriber. For more information about schema options, see sp_addarticle (Transact-SQL).</p>
</blockquote>
<p>I can understand 17, but how do you get 57? 1+8+16+24=49</p>
<p>If you subtract one (57-1=56) Fifty Six is a factor of Eight, (7*8=56) but it is hard to imagine where any potential values could be reported twice.</p>
| 0non-cybersec
| Stackexchange |
Help me evaluate limit of sequence. <p>I have this limit, and i have no idea of approach:
$$\lim_{n \rightarrow + \infty } \left(\frac{n^3}{4n-7}\right)\left(\cos\left(\frac1n\right)-1\right)$$
turns out to be of indeterminate form, how to solve it?</p>
| 0non-cybersec
| Stackexchange |
Angular 2 get Input element value. <p>how to get html element value using ionic 2</p>
<p>Below my html code</p>
<pre><code> <div class="messagesholder" *ngFor="let chat of chatval | orderby:'[date]'" >
<div *ngIf="chat.sender == currentuser || chat.receiver == currentuser">
<div *ngIf="chat.date" style="text-align: center;" >
<p style="font-size:9px;" id="amount" #amount>{{chat.date | amDateFormat:'LL'}}</p>
<input #myname [ngModel]="range" (ngModelChange)="saverange($event)"/>
<input #myname type="text" value={{chat.date}}>
</div>
</div>
<div class="message" *ngIf="chat.sender == currentuser || chat.receiver == currentuser" [ngClass]="{'me': currentuser == chat.sender}">
<div class='image' *ngIf="chat.path" >
<img *ngIf="chat.path" [src]="chat.path"/><br>
<span *ngIf="chat.path_text">{{chat.path_text}}</span>
<span style="font-size:9px;">{{chat.date | amDateFormat:'hh:mmA'}}</span>
</div>
<div *ngIf="chat.message_text">
<span>{{chat.message_text}}</span>
<span style="font-size:9px;">{{chat.date | amDateFormat:'hh:mmA'}}</span>
</div>
</div>
</code></pre>
<p></p>
<p>Below my ts file</p>
<pre><code>import { Component,Inject,ViewChild,ElementRef,AfterViewInit} from '@angular/core';
export class ChatPage implements AfterViewInit {
@ViewChild('myname') input:ElementRef;
constructor(public modalCtrl: ModalController,public navCtrl: NavController) {}
ngAfterViewInit() {
console.log(this.input.nativeElement.value);
}
}
</code></pre>
<p>Same date values are repeated.I want same date values are not repeated.</p>
<p>Because I will check two variable.</p>
<p>so I need chat.date value.because i binded the value of input.But i cannot get the value of input element.</p>
<p>i am getting this error</p>
<p>Cannot read property 'nativeElement' of undefined</p>
<p>How to fix this issue.or any other way to find slutions.</p>
<p>Thanks</p>
| 0non-cybersec
| Stackexchange |
Deriving BAC-CAB from differential forms. <p>I've recently begun reading up on differential forms in a physics context, and my resources said that one can often derive vector identities from differential forms.</p>
<p>For instance,</p>
<ul>
<li><p>$\nabla \cdot (\nabla \times F)=0$ and $\nabla \times (\nabla F)=0$ both follow from $\text{dd}=0$, where $\text{d}$ is the exterior derivative.</p></li>
<li><p>$A\cdot (B\times C)=B\cdot (C\times A)=C\cdot (A\times B)$ follows from $A \wedge B \wedge C=B \wedge C \wedge A=C \wedge A \wedge B$, where $\wedge$ is the wedge product.</p></li>
<li><p>$\nabla \cdot (A\times B)=B\cdot (\nabla\times A)-A\cdot(\nabla\times B)$ follows from the product rule for the exterior derivative: $d(A\wedge B)=dA\wedge B + (-1)^P A\wedge dB$ (where $P$ is the degree of $A$).</p></li>
</ul>
<p>I tried deriving the infamous BAC-CAB rule,
$A\times(B\times C)= B(A\cdot C) - C(A\cdot B)$, in this mode, but I couldn't get too far.</p>
<p>I would think the relevant expression in the language of differential forms should perhaps be $*(A\wedge *(B\wedge C)) = (B\wedge (A\lrcorner C) - C\wedge (A\lrcorner B))$, but I'm not sure. (Where $*$ is the Hodge star operator and $\lrcorner$ is the interior product).</p>
<p>Does anyone have some insight to share on deriving this identity or others from differential forms? Thanks!</p>
| 0non-cybersec
| Stackexchange |
Static electricity in a freshly-printed stack of paper. | 0non-cybersec
| Reddit |
How to convert a video stream to mp3 file while downloading using Streamlink?. <p>How to convert a video stream to mp3 file while downloading using Streamlink? is it possible using ffmpeg or other?</p>
| 0non-cybersec
| Stackexchange |
Java heap inside or outside jvm memory?. <p>Till today I knew that java has heap and that is created by JVM. Further, this memory is allocated by OS to JVM instance, i.e. heap resides inside JVM instance.</p>
<p>But today I saw a picture, <img src="https://i.stack.imgur.com/Uieu9.png" alt="enter image description here" /></p>
<p>which shows, JVM and heap far apart.</p>
<p>So, I am confused right now, Can anyone let me know, whether I was wrong before or I am not able to understand the picture?</p>
| 0non-cybersec
| Stackexchange |
Nginx returning 444 for PUT and DELETE. <p>I'm trying to build a REST API through Nginx and everything works fine except when I the requests are PUT or DELETE. In these cases, Nginx returns 444 (no response). I did some research and all I could find was something about Nginx being configured with the "--with-http_dav_module" option. I've checked that with nginx -V and and it seems that it was configured with this.</p>
<p>So, any idea what else could it be?</p>
| 0non-cybersec
| Stackexchange |
First time travelling to Norway in 2 weeks, need advices. My friends and I (3 people) are travelling to Norway in 2 weeks and we need a little help to plan out roadtrip. We are from Malaysia, and this will be our first time in Norway. We'll arrive in Oslo on April 24th and will leave on the 30th. We'll rent car for the road trip but haven't finalized on the places to visit, but we really want to spend times at the Fjords/towns nearby. Questions:
1) What are the must-go places? We really want to spend times at the fjords. But what are the best towns to do that during end of April? In terms of cost (budget is very limited), weather, free/almost free activities, and accessibility
2) We know that end of April is still considered winter-ish especially on the highlands and hiking may be limited, but any suggestions on hiking trail that can have great fjord sceneries? Easy/Moderate ones as time will be limited.
3) Any suggestion on activities that must be done in western Norway during this time. They must be free or very cheap as budget is very limited :D | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Does spinning fast in space make you dizzy?. | 0non-cybersec
| Reddit |
How to test which addon makes Firefox unstable?. <p>I have installed a lot of addons and recently I find that Firefox keeps increasing memory usage and sometimes hangs after 30 minutes running.</p>
<p>It's hard to test them one by one. Is there a better way to test them?</p>
| 0non-cybersec
| Stackexchange |
superfuture sunglasses panama. hey r/mfa... i'm ready to take the plunge into investing some cash into some well made sunglasses. been looking at the panama superfuture range, and they look pretty awesome. problem is, can't really seem to find any pictures of men wearing them... let alone women. does anyone own a pair of these and know how they fit? i'm sort of worried that they look better sitting on the desk than they do on someones head. if that makes sense?
see: http://store.retrosuperfuture.com/collections/panama/products/934_v5a | 0non-cybersec
| Reddit |
Dedicated to his country... Wait what??. | 0non-cybersec
| Reddit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.