text
stringlengths 3
1.74M
| label
class label 2
classes | source
stringclasses 3
values |
---|---|---|
[Help] Possible muscle spasms?. I have a 16 lb, 7 year old, Jack Russell Terrier mix who I think is having muscle spasms or cramps?
His behavior, appetite, and poops are normal so I'm not worried that its something serious but you can tell he's very uncomfortable during the spasm/cramp. When it hits he walks in a circle and stretches (head down, butt up) while whining, he also tries to bite my hand but it's not hard just like "make it stop".
He's done this before but it's been a while since. He also has a vet appointment later this afternoon. Does it sound like muscle spasms or cramps? | 0non-cybersec
| Reddit |
Experiences with advanced CORBA services
THAP005
EXPERIENCES WITH ADVANCED CORBA SERVICES
G. Milcinski, M. Plesko, M. Sekoranja, Josef Stefan Institute, Ljubljana, Slovenia
Abstract
The Common Object Request Broker Architecture
(CORBA) is successfully used in many control systems
(CS) for data transfer and device modeling.
Communication rates below 1 millisecond, high
reliability, scalability, language independence and other
features make it very attractive. For common types of
applications like error logging, alarm messaging or slow
monitoring, one can benefit from standard CORBA
services that are implemented by third parties and save
tremendous amount of developing time. We have started
using few CORBA services on our previous CORBA-
based control system for the light source ANKA [1] and
use now several CORBA services for the ALMA
Common Software (ACS) [2], the core of the control
system of the Atacama Large Millimeter Array. Our
experiences with the interface repository (IFR), the
implementation repository, the naming service, the
property service, telecom log service and the notify
service from different vendors are presented.
Performance and scalability benchmarks have been
performed.
1 INTRODUCTION
Our team has over the last five years developed a
control system framework that uses and extends modern
component-based, distributed computing and object-
oriented concepts. The basic entities of the system are
accelerator devices that are represented as CORBA
(Common Object Request Broker Architecture) objects
– objects that are remotely accessible from any
computer through the established client-server
paradigm. We chose CORBA among other environment
for distributed systems (CDEV, J2EE, DCOM...)
because of its platform and language independence. A
successful implementation, based on Borland’s
Visibroker [6] is running the CS at the light source
ANKA. It uses Visibroker’s proprietary smart agent,
location service and interface repository. Then we
decided also to use other standard CORBA services. At
first we had some doubts – we were not sure if we could
accommodate to programs that were not written by us,
we were afraid of the high prices of some of these
programs, etc. But starting fears have vanished quickly.
We have completely rewritten the framework, making it
more general and useful for other control systems [2].
We used mostly TAO [4] and ORBacus [5]
implementations (both are free for non-commercial use),
both for ORB and services.
2 USED SERVICES
2.1 Event Service
This service coordinates the communication between
two kinds of objects – supplier (it produces event data)
and consumer (it processes event data). That is exactly
what a control system is doing – for example: user sets
current to a power supply and vice versa – a machine
sends readback to the user. When we started to develop
ANKA control system, there was a major disadvantage
of this service – it supported just generic events of type
Any. But, to discover all typing errors at compile time,
we wanted typed events [1]. That is why we defined our
own callback classes, one for each data type.
Nowadays both ORBacus and TAO Event Service
already support typed events (but TAO’s solution for
typed events support is non-standard).
2.2 Notify service
It extends Event Service and has added some further
functionality. These are filtering events (by type and
data), subscription to only some kinds of events, the
ability to configure various qualities of service
properties (per-channel, per-proxy or even per-event).
This is in our opinion the most useful service. It is just
perfect for controlling a few devices. The main problem
is, that queuing, filtering and processing events demand
time, memory and CPU and it could not process all data
used in a large control system It is a potential bottleneck
and a single point of failure. It is best used for system
wide services such as alarm and logging, where one
central process collects all messages from anywhere in
the control system.
ORBacus and TAO Notify Service are not supporting
typed events. One can use structured events, which are
actually Anys, but you can set a type property of an
event.
We performed benchmark and scalability tests on this
service, which will be discussed later.
2.3 Telecom Log Service
It is some kind of event consumer, which stores data
in persistent store. In some cases it must also supply an
event (to inform user that something in its state has
changed – like when a threshold is being crossed).
ORBacus did actually implement notify logging service
which has all notification functionality and a persistent
store. User can also query log entries, using some kind
of filter.
ORBacus T-Log has already implemented storing
data in its own database, which is not suited for large
amounts of data. TAO’s Telecom Log Service stores
records in memory and it is actually just a skeleton for a
serious implementation. We had to add features
ourselves (like persistent store, sending events to notify
channel, etc).
2.4 Naming Service
A useful tool - just like the telephone directory. It is
used to give names to objects. To work properly there
are two requirements – all objects have to be named and
each name is used only once. An object can have two
names, but vice versa is not possible. It is much like file
structure on hard disk – the equivalent name can only be
used for a file in different directory. Other services are
easer to manage when connected to naming service (for
example: notify supplier and consumer can exchange
IOR-s of the event channel; in ORBacus demos you can
find an approach without NS – saving and reading IOR
to/from a file – a little clumsy idea - just think about
sending a file by every channel creation).
2.5 Property Service
Property Service introduces a Property Set, which is a
collection property. Every property has a name (unique
within the property set) and a value, which can be of any
type (the CORBA *any* type). Property Sets are very
useful for storing object's data. For example, an object
representing a device in our control system is storing all
its characteristics in a property set, so that they are all
read in a single CORBA call during initialization. On
Windows systems, a key in the registry is equivalent to a
property set.
2.6 Interface Repository
A service that exposes the interfaces of CORBA objects
(the IDL file) in form of an object model, which is
available at run-time. Through the IFR, a program is
able to determine what operations are valid on an object
and make an invocation on it, even though its interface
was not known at compile-time In that way we have
developed Object Explorer (OE) – a program, which
can control the whole system without knowing almost
anything about the structure of the controlled devices.
The OE finds all CORBA objects on the network and
asks IFR for their operations. Using dynamic invocation
interface (DII) it executes chosen method via its name
and queries the user for all parameters in the parameter
list.
Another interesting usage of the IFR was in our
JavaBeans generator: the generator queries the running
IFR and creates Java source code that wraps the
CORBA objects into Java Beans – one Bean per
CORBA object interface. This is much more convenient
that writing our own IDL parser. We use ORBacus
implementation of this service and have found it very
stable – it has been running continuously for three
months now.
2.7 Implementation Repository
The Implementation Repository contains information
that allows the ORB to locate and activate
implementations of objects. Ordinarily, installation of
implementations and control of policies related to the
activation and execution of object implementations is
done through operations on this service.
We did not actually use this service, but took its features
and interfaces into account when writing our main
management program. It starts objects, loads their
shared libraries and other CORBA services, needed for
logging, archiving, etc.
3 PERFORMANCE AND SCALABILITY
BENCHMARKS
Tests were made with 1 GHz Athlon PC with 512 Mb of
RAM. All processes were running on the same machine,
so network latencies were excluded. The downside of
this is that processes switching might have affected the
results. We can safely assume that the real performance
is only better. All test were made with notify service’s
default settings.
We concentrated on testing a Notify Service for three
reasons. It is the easiest to test, results represent also
event service performance and it is the only one whose
performance directly influences the performance of the
CS Already on the beginning we found a minor
advantage of TAO notify service – when it starts, it
writes an IOR of an event channel factory to the name
service. ORBacus notify does not, so user must do it
manually or use resolve_initial_reference instead.
3.1 Time needed for processing an event
First test is very simple. We have one supplier and one
consumer. The supplier sends events and the consumer
receives them, both doing it as quickly as they can.
Trying to overload the service, supplier was sending
events in separate threads. First observation in the figure
1 is that time, needed for one event, is increasing with
number of threads (except from one thread to ten
threads – this is expected because of better exploiting of
CPU). A big jump from 30 threads to 100 threads is
presumably consequence of overloading the CPU.
0
1
2
3
4
5
1 10 30 100 threads
tim
e
pe
r e
ve
nt
[m
s]
TAO
ORBacus
Figure 1 - chart shows average time, needed for
processing an event (processes for sending events
were running on separate threads)
We can also see that TAO is quite faster than ORBacus.
In this test we have also noticed TAO’s immunity to
increasing number of events. This cannot be said for
ORBacus, which had quite a few problems dealing with
this. It actually lost a bit of them, which can be very
critical in some conditions.
3.2 Increasing number of suppliers
0
1
2
3
10 30 50 suppliers
tim
e
pe
r
ev
en
t [
m
s] TAO
ORBacus
Figure 2 - average time for processing an event from
many suppliers
From 10 to 50 suppliers were connected to the same
event channel and doing their job. The result is quite
expected. Time needed for one event is slowly
increasing (from 0.5 ms, 10 suppliers, to 0.6 ms, 50
suppliers at TAO and 2.3 to 2.6 ms, ORBacus). We can
again see that TAO is faster.
3.3 Increasing number of consumers
We used one supplier, to which 10 to 50 consumers
were connected.
The time per event increases with the number of
consumers, because the service must create one event
for each consumer. Although ORBacus is slower again it
has one advantage. If we divide time needed for one
event with number of consumers, we get the result,
which can be seen in figure 2.
With ORBacus, the needed time is decreasing (just the
opposite from TAO). This means that ORBacus is better
dealing with big number of consumers. This can be
probably explained with better logic for multiplying
events.
0
1
2
3
10 30 50 consumers
tim
e
pe
r e
ve
nt
[m
s]
TAO
ORBacus
Figure 3 - chart shows average time needed for
multiplying an event - one supplier sends event,
many consumers are receiving it
3.4 Other observations
First thing you notice dealing with these two services is
much more professional appearance of ORBacus. Web
pages are clearer, documentation is extensive, replies to
messages, send to mail list, are quicker. ORBacus
service is also more thoroughly implemented (more
possibilities for quality of service settings, etc). It is also
easier to destroy TAO service with a bad client. These
advantages are probably at the same time the reasons,
which make ORBacus service slower.
4 CONCLUSIONS
Most of the services, described in this paper, are
successfully running at ALMA [2] (for now just for
testing and development purposes), ANKA [1] and other
systems. Many others and ourselves have found them
very useful – so it is a waste of time and money not to
use them. But they are just not so perfect to use them
without fundamental consideration of possible
bottlenecks and other points of failure. And we still hat
to implement a few extra features of our own, so it is
unlikely to get away without programming..
REFERENCES
[1] M. Plesko et al: A Control System Based on Web,
Java, CORBA and Fieldbus Technologies, PCaPAC99
workshop, KEK, Tsukuba, January 1999
[2] G. Chiozzi, B. Gustafsson, B. Jeram, M. Plesko, M.
Sekoranja, G. Tkacik, Common Software for the ALMA
project, this conference
[3] Object Management Group: http://www.omg.org
[4] TAO home page:
http://www.cs.wustl.edu/~schmidt/TAO.html
[5] ORBacus home page: http://www.orbacus.com
[6] Borland – Visibroker’s CORBA:
http://www.borland.com/visibroker/
http://www.omg.org/
http://www.cs.wustl.edu/~schmidt/ACE_wrappers/TAO
http://www.orbacus.com/
http://www.borland.com/visibroker/
| 0non-cybersec
| arXiv |
Cygwin uses relative and absolute path for environment variables. <p>When I use the below command in Cygwin:</p>
<pre><code>$ go get github.com/gorilla/mux
</code></pre>
<p>I receive the below error:</p>
<pre><code># cd .; git clone https://github.com/gorilla/mux C:\cygwin64\home\USER\Go\src\github.com\gorilla\mux
Cloning into 'C:\cygwin64\home\USER\Go\src\github.com\gorilla\mux'...
fatal: Invalid path '/home/USER/C:\cygwin64\home\USER\Go\src\github.com\gorilla\mux': No such file or directory
package github.com/gorilla/mux: exit status 128
</code></pre>
<p>When I use the command:</p>
<pre><code>cd $GOPATH
</code></pre>
<p>The correct folder opens.</p>
<p>Does anyone how I can solve this?</p>
| 0non-cybersec
| Stackexchange |
Going through a breakup. I found out my first long term gf cheated on me last night. I'm struggling to cope with it all. And would like advice to help me get over her or atleast forget. | 0non-cybersec
| Reddit |
What's something genuinely unique about your girlfriend/spouse?. Could be something about their personality, quirks, anything. | 0non-cybersec
| Reddit |
Well, that escalated quickly.. Spent some time playing my 3 year old today in Flower Fairy (aka Blumenfee). We wrap up after an edgy win building flowers before the arrival of Rosalina, the flower fairy.
**Me** - Good game, baby!
**Her** - Yes!
**Me** - Can you help me put the pieces back in the box?
**Her** - *<Sweetly obliges my request>*
**Me** - Okay, it's nap time now.
**Her** - Uhhhh, I wanna play....*<Looking around desperately now>*
**Her** - This one! *<Strolls back over to me holding nothing other than Food Chain Magnate>*
**Me** - *<Seriously contemplates the value of a 3 year old's knowledge of fast food and how that might affect gameplay>*
Compromise? Nap time and story time with page 1 of the FCM rules. Now she wants burgers. | 0non-cybersec
| Reddit |
Is the compiler allowed to interlace the evaluation of subexpressions within different function arguments?. <p>I am wondering about the following situation:</p>
<pre><code>void f(int a, int b) { }
int a(int x) { std::cout << "func a" << std::endl; return 1; }
int b(int x) { std::cout << "func b" << std::endl; return 2; }
int x() { std::cout << "func x" << std::endl; return 3; }
int y() { std::cout << "func y" << std::endl; return 4; }
f(a(x()), b(y()));
</code></pre>
<p>After reading <a href="http://en.cppreference.com/w/cpp/language/eval_order">http://en.cppreference.com/w/cpp/language/eval_order</a> I am still having difficulty to understand whether the following evaluation order is possible:</p>
<p><code>x()</code> -> <code>y()</code> -> <code>a()</code> -> <code>b()</code></p>
<p>or that the standard guarantees that <code>a(x())</code> and <code>b(y())</code> will be evaluated as units, so to speak.</p>
<p>In other words, is there any possibility this will print</p>
<pre><code>func x
func y
func a
func b
</code></pre>
<p>Running this test on GCC 5.4.0 gives the to my mind more logical</p>
<pre><code>func y
func b
func x
func a
</code></pre>
<p>but this of course does not tell me anything about what the standard requires. It would be nice to get a reference to the standard.</p>
| 0non-cybersec
| Stackexchange |
Working around unset "length" property on partial functions created with lodash's partialRight. <p>I'm working with <a href="https://momentjs.com/timezone/docs/" rel="noreferrer">MomentTimezone</a> for time manipulation in the browser.</p>
<p>I am using TypeScript and <a href="https://lodash.com/docs/4.17.15" rel="noreferrer">Lodash</a> too.</p>
<p>I have some <code>accountTimezone</code> set on the <code>window</code> containing the authenticated user's preferred timezone. I am trying to create a helper method <code>localMoment()</code> that will accept any of <a href="https://github.com/DefinitelyTyped/DefinitelyTyped/blob/a3528daaf0b06c5ed3864bf4c28a0c438fd374a3/types/moment-timezone/moment-timezone.d.ts#L21-L32" rel="noreferrer">the many signatures of <code>moment.tz()</code></a>, appending this <code>window.accountTimezone</code> as the final <code>timezone: string</code> argument.</p>
<p>It seems <a href="https://lodash.com/docs/4.17.15#partialRight" rel="noreferrer"><code>partialRight</code></a> may be what I'm looking for.</p>
<pre><code>const localMoment = partialRight(moment.tz, window.accountTimezone);
</code></pre>
<p>The problem I'm having has to do with this note from the lodash docs:</p>
<blockquote>
<p><strong>Note:</strong> This method doesn't set the "length" property of partially applied functions.</p>
</blockquote>
<p>Specifically, for a call like <code>localMoment('2019-08-01 12:00:00')</code>, TypeScript complains that <code>localMoment()</code> was provided 1 argument, but expects zero.</p>
<p><strong>How can I keep TypeScript happily understanding a call to <code>localMoment()</code> should look like a call to <code>moment.tz()</code> via the <code>MomentTimzone</code> interface, while avoiding this arity confusion from the use of <code>partialRight()</code>?</strong></p>
<hr>
<p>I considered something like this as an alternative, but don't know how to type <code>...args</code> to keep TypeScript happy.</p>
<pre><code>const localMoment = (...args): Moment => moment.tz(...args, window.accountTimezone);
</code></pre>
| 0non-cybersec
| Stackexchange |
This weeks prep. This week I made:
Adobo chicken
Lime cilantro rice
Slow cooker black beans
Spaghetti squash with spinach and turkey meatballs
2 salads (spring mix with fresh mozzarella onion and cherry tomatoes, and a broccoli slaw with chicken)
Breakfast "muffins"
Sausage, egg, green peppers, chive
https://imgur.com/gallery/fEBC2
Edit:imgur link
| 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 |
Webpages loading slowly at start. <p>I'm having an issue in my organization where webpages are slow to load when first requested. In a Chrome browser we typically see the "waiting for <em>site</em>" or "establishing secure connection" messages in the lower corner. This typically lasts for 5-10 seconds and then the page loads quickly like normal.</p>
<p>A few observations on this:</p>
<ul>
<li>Have been noticing it off and on for a couple of weeks now.</li>
<li>Happened out of the blue.</li>
<li>Happens with all browsers.</li>
<li>Happens with both HTTP and HTTPS requests.</li>
</ul>
<p>One more thing that I find to be very odd is that it seems to only be affecting our Mac devices running OSX. We have several that are bootcamped with Windows 7 and have no problem at all on these.</p>
<p>Any ideas?</p>
<p>Thanks for your time!</p>
<p><strong><em>EDIT</em></strong></p>
<p>Results from Chrome Connectivity Diagnostics:
<a href="https://i.stack.imgur.com/GSKN5.png" rel="nofollow noreferrer">Diagnostic Report Screen Shot</a></p>
<pre><code>> SUMMARY Test Name: Google Websites HTTP Latency Test Test ID: 9
> Test result: Problem detected
>
> Tue May 16 2017 11:02:50 GMT-0500 (CDT) - HTTP response # / time received (microtimestamp) / elapsed time(ms): 2 / 1494950570671 / 7422
> Tue May 16 2017 11:02:50 GMT-0500 (CDT) - Total HTTP response time (ms): 22414
> Tue May 16 2017 11:02:50 GMT-0500 (CDT) - Total number of HTTP requests: 3
> Tue May 16 2017 11:02:50 GMT-0500 (CDT) - Average HTTP response time (ms): 7471.33
</code></pre>
| 0non-cybersec
| Stackexchange |
Single vs multiple MemoryCache instances. <p>MemoryCache comes with a Default cache by default and additional named caches can be created.</p>
<p>It seems like there might be advantages to isolating the caching of results of different processes in different instances For example, results of queries against an index could be cached in an "IndexQueryResult" cache and result of database queries in a "DatabaseQueryResult" cache. That's rather contrived but explains the principle.</p>
<p>Does the memory pressure on one cache that results in evictions affect the other caches at all? Are there any differences in the way .Net manages multiple caches compared to how it manages one?</p>
<p>Am I wasting my time considering the idea of multiple caches, or is there real value in doing so?</p>
| 0non-cybersec
| Stackexchange |
Pyspark equivalent for df.groupby('id').resample('D').last() in pandas. <p>I have a large table like </p>
<p><a href="https://i.stack.imgur.com/zOZUF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zOZUF.png" alt=""></a> </p>
<p>I want to change it to a new table : id, date, last_state . </p>
<p>It is very easy by pandas :</p>
<pre><code>df['time_create'] = pd.to_datetime(df['time_create'])
df = df.set_index('time_create')
df = df.sort_index()
df = df.groupby('id').resample('D').last().reset_index()
</code></pre>
<p>But it is very hard to implement by pyspark. </p>
<p>I knew: </p>
<ol>
<li><p>Resample equivalent in pysaprk is groupby + window :</p>
<pre><code>grouped = df.groupBy('store_product_id', window("time_create", "1 day")).agg(sum("Production").alias('Sum Production'))
</code></pre>
<p>here groupby store_product_id , resample in day and calculate sum</p></li>
<li><p>Group by and find first or last:</p>
<p>refer to <a href="https://stackoverflow.com/a/35226857/1637673">https://stackoverflow.com/a/35226857/1637673</a></p>
<pre><code>w = Window().partitionBy("store_product_id").orderBy(col("time_create").desc())
(df
.withColumn("rn", row_number().over(w))
.where(col("rn") == 1)
.select("store_product_id", "time_create", "state"))
</code></pre>
<p>This groupby id and get the last row order by time_create .</p></li>
</ol>
<p>However what I need is groupby id, resample by day,then get last row order by time_create .</p>
<p>I know this problem may could be solved if I use pandas udf , <a href="https://stackoverflow.com/questions/40006395/applying-udfs-on-groupeddata-in-pyspark-with-functioning-python-example">Applying UDFs on GroupedData in PySpark (with functioning python example)</a> </p>
<p>But is there any way to do this just by pyspark ? </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 |
Ubuntu 13.04 locks up in VLC. <p>Since I installed 13.04, I've had occasional lockups that sometimes relate to VLC player (could be something else). I can sometimes <kbd>Ctrl</kbd><kbd>Alt</kbd><kbd>F1</kbd> to a different terminal to <code>sigkill</code> VLC, but sometimes it looks up to a point where I can't click buttons and can't execute any keyboard commands and I need to power cycle. </p>
<p>Does anyone have any recommendations for how I should troubleshoot this issue? Should I hunt through <code>/var/log</code> after it happens etc?</p>
| 0non-cybersec
| Stackexchange |
Question: Are there any mods out that could make it so vanilla pistons break blocks? (ie; cobblestone factory). Or anyone know how I might be able to mod that myself? Thanks! | 0non-cybersec
| Reddit |
How to give the new files rising numeric names in bash?. <p>i have a script </p>
<pre><code>file=$(ls `pwd`/ | grep .mp4)
i=$(($i+1))
while read -r start end; do
ffmpeg -i $file -ss "$start" -to "$end" -c copy "$i".mp4
done < cuts.txt
</code></pre>
<p>So $i do not work, script stop whit "File '1.mp4' already exists. Overwrite ? [y/N] Not overwriting - exiting"</p>
| 0non-cybersec
| Stackexchange |
Difference between --rbind and --bind in mounting. <p>I am confused. Linux filesystem is a tree structure, with the root node(starting node) as the root directory.
Now let's suppose I have a folder <code>abc</code> at location <code>/home/abc</code> and another folder <code>xyz</code> at location <code>/home/xyz</code> </p>
<p>Folder <code>xyz</code> consists of some other folders and files inside it. (ex <code>def</code> and <code>mno</code> are folders inside it)</p>
<pre><code>/
├── home/
│ ├── abc
│ └── xyz
│ ├── def
│ └── mno
</code></pre>
<p>When I run the command </p>
<pre><code>mount --rbind /home/xyz /home/abc
</code></pre>
<p>(rbind is recursively bind)
I see all the contents of the folder <code>xyz</code> in <code>abc</code>.
Now, when I just run the command </p>
<pre><code>mount --bind /home/xyz /home/abc
</code></pre>
<p>I still see all the contents of <code>xyz</code> in <code>abc</code>. </p>
<p>Why is that? </p>
<p><code>--bind</code> to work just as similarly to <code>--rbind</code>.</p>
| 0non-cybersec
| Stackexchange |
div width 100 percent not working in mobile browser. <p>I am trying to do something that, I thought, was very simple. The header of a website I am building is a solid color that needs to span the entire width of the screen regardless of which browser it is veiwed in. What I have created so far works wonderful on desktops and laptops, but when I test it on a tablet or a mobile phone, the header does not span all the way to the right. The content inside of the header does span all the way however, which is really confusing to me. The only way I can get the header bar to span the entire width is by setting the position property to static, which is not what I need for this site, so that doesn't do me any good. Below is the CSS and HTML I am using. Could someone take a look at it and let me know what I am missing.</p>
<p>HTML:</p>
<pre><code><div class="header">
<div class="container">
<div class="header-content">
....Some Content goes in here....
</div> <!-- /.header-container -->
</div> <!-- /.container -->
</div> <!-- /.header -->
</code></pre>
<p>CSS:</p>
<pre><code>html, body {
background-color: #949494;
width: 100%;
margin: 0px;
padding: 0px;
}
.header {
width: 100%;
min-width: 100%;
height: 200px;
background-color: #ffffff;
padding-top: 8px;
}
.container {
width: 1200px;
margin: 0 auto;
text-align: center;
}
</code></pre>
| 0non-cybersec
| Stackexchange |
Parameter on $\mathrm{SU}(4)$ and $\mathrm{SU}(2)$. <p>From my reading, $\mathrm{SU}(4)$ has 15 parameters and $\mathrm{SU}(2)$ has 3 paramaters that range differently with certain parameter (rotation angle). And all the parameter is linearly independent to each other.</p>
<p>My question are:</p>
<ol>
<li>What the characteristic of each of the parameter? </li>
<li>If I choose two of them, what is the reason behind the theory? </li>
<li>Can anyone explain to me or suggest any book/paper to me to understand the parameter itself.</li>
</ol>
| 0non-cybersec
| Stackexchange |
Bastion's New Sit Emote. | 0non-cybersec
| Reddit |
hardlinks seem to take several hundred bytes just for the link itself (not file data). <h2>Additional Info</h2>
<p>Firstly, thank you for all the answers.</p>
<p>So I re-ran the tests again to test the answer below that a directory/folder entry takes up 4KB and this was skewing my numbers, so this time by placing 20,000 files in a single directory and doing the cp -al to another directory. The results were very different, after taking off the length of the filenames, the hardlinks worked out to about 13 bytes per hardlink, much better than 600. Ok, so then for completeness working on the answer given below that this is due to each entry for a directory/folder taking up 4KB I did the test again, but this time I created thousands of directories and placed one file in each directory. The result after the maths (increased space taken on hd / by number of files (ignoring directories) was almost exactly 4KB for each file, showing that a hardlink does only take up a few bytes but that an entry for an actual directory/folder takes 4KB.</p>
<hr>
<p>So I was thinking of implementing the rsync / hardlink /snapshot backup strategy and was wondering how much data a hardlink took up, like it has to put an entry for the extra link as a directory entry etc. Anyway I couldn't seem to find any information on this and I guess it is file system dependent. The only info I could find was suggestions they took no space (probably meaning they take no space for file contents), to the space they take is negligible to they only take a few bytes to store the hardlink.</p>
<p>So I took a couple of systems (one a vm and one on real hardware) and did the following in the root directory as root:</p>
<pre><code>mkdir link
cp -al usr link
</code></pre>
<p>The <code>usr</code> directory had about 54,000 files. The space used on the hd increased by about 34MB. So this works out around 600 bytes per hardlink, or am I doing something wrong?</p>
<hr>
<p>I am using LVM on both systems, formatted as ext4.</p>
<p>The file name size is about 1.5MB altogether (I got that by doing ls -R and redirecting it to a file).</p>
<p>To be honest, the rsync with hardlinks works so well I was planning on using it for daily backup on a couple of the work servers. I also thought it would be easy to make incremental backups / snapshots like this for a considerable period of time. However, after ten days 30mb is 300mb and so on. In addition if there have only been a few changes to the actual file data/contents, say a few hundred KB then storing 30+ MB of hardlinks per day seemed excessive, but I take your point about the size of modern disks. It was simply that I had not seen this hardlink size mentioned anywhere that I thought I may be doing something wrong. Is 600 bytes normal for a hardlink on a Linux OS?</p>
<p>To calculate the space used I did a <code>df</code> before and after the <code>cp -al</code>.</p>
| 0non-cybersec
| Stackexchange |
Changing date format in Phpstorm/Intellij. <p>That question is not about the code produced by the IDE, it is about IDE itself.</p>
<p>Phpstorm/Intellij always shows dates in "Month/DayOfMonth/Year Hour:Minute" format like 4/16/14 11:40 AM</p>
<p>You can check version control view, local history view or changes view. Is it possible to change the Phpstorm/Intellij date format via GUI or some setting file.</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 |
Chive Turkey...........mmmmm lunch. | 0non-cybersec
| Reddit |
I've got thick skin and need a laugh.. | 0non-cybersec
| Reddit |
Youtube comment gold... Checkmate theist.. http://i.imgur.com/tNldtTN.png | 0non-cybersec
| Reddit |
5 Amazing Inventions You Need To See #22. | 0non-cybersec
| Reddit |
Cyber paper and pencil. <p>Imagine that you would like to write down your passwords or other critical information into a sheet of paper. </p>
<p>Could an algorithms <strong>without using a computer</strong> be so good as to avoid people of cracking it? There seems to exists some secret code messages that weren't discovered for centuries. So, theoretically it sound plausible, but how would I proceed?</p>
| 0non-cybersec
| Stackexchange |
Kenyan student kills his roomate then eats parts of brain and WHOLE heart.. | 0non-cybersec
| Reddit |
"Differentiate without color" setting in Accessibility System Preferences. <p>In the <strong>Accessibility</strong> preference pane of <strong>El Capitan</strong>'s <strong>System Preferences</strong>, I've noticed a "<em>Differentiate without color</em>" setting that I didn't notice before.</p>
<p><a href="https://i.stack.imgur.com/0V4RY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0V4RY.png" alt="enter image description here"></a></p>
<p>Does anyone know to what extent this setting will change the experience of <strong>Finder</strong>?</p>
<p>I couldn't find much in the help and <a href="http://forums.macrumors.com/threads/differentiate-without-color.1784161/" rel="nofollow noreferrer">the only link I found about this</a> was very succinct (I can't believe this setting only acts on the dots of this exemple).</p>
<p>I would love to know exactly how toggling this setting would affect the Mac's OS display, and its apps.</p>
| 0non-cybersec
| Stackexchange |
TIL: Which players have the highest 3 salaries going into next season... (before FA begins). | 0non-cybersec
| Reddit |
Can Amazon Elastic Beanstalk auto-scale Amazon RDS?. <p>I'm planning to run a PHP/MySQL application using Amazon Elastic Beanstalk. In the settings I can define when it should launch new instances automatically (Auto-Scaling).</p>
<p>However, as I understand this, this only creates new EC2-Instances and does not touch the RDS-Data-Layer (which I also configured in the settings).</p>
<p>Is there any way to auto-scale this RDS, with automated Read-Replicas or database size upgrade, or do I have to do this manually in some way?</p>
| 0non-cybersec
| Stackexchange |
I feel that Bill Cunningham was the Fred Rodgers of the fashion world. | 0non-cybersec
| Reddit |
Plesk 11 preview site with hosts file. <p>I want to preview my website by manipulating the hosts file, linking to the server's URL but it's not working - My browser always tells me "the connection has been reset during page load".</p>
<p>What am I doing wrong? I edited my hosts file like many tutorials out there suggest and I checked (wireshark) that the browser connects to the correct IP (that of my server).</p>
<p>Yet, I can't see anything of my website...?</p>
| 0non-cybersec
| Stackexchange |
Google's new wallpaper app is available now. | 0non-cybersec
| Reddit |
SonarQube: Mutable members should not be stored or returned directly. <p>This is my code so far:</p>
<pre><code>public class RestApplication extends Application {
private final Set<Class<?>> resourceSet;
public RestApplication() {
this.resourceSet = new HashSet<Class<?>>();
resourceSet.add(PCardController.class);
resourceSet.add(PricingController.class);
resourceSet.add(TransactionFeedController.class);
initializeMaps();
}
@Override
public Set<Class<?>> getClasses() {
return resourceSet;
// ...
} // Added by edit!
// ...
} // Added by edit!
</code></pre>
<p>SonarQube says that the return of a copy is a resource set.<br>
How can I do that?</p>
| 0non-cybersec
| Stackexchange |
Name of a "normalized" second moment. <p>I am asking myself how this second moment would be referred to in English:</p>
<p><span class="math-container">$$ \frac{E(X^2)} {(EX)^2} $$</span></p>
<p>I would have called it standardized for instance, but for example <a href="https://en.wikipedia.org/wiki/Standardized_moment" rel="nofollow noreferrer">Wikipedia</a> refers to standardized moments as something different. Sorry, not a native speaker...</p>
| 0non-cybersec
| Stackexchange |
What are these ip adresses my computer is connected and how do I block them if they are malicious?. <p>When I execute a netstat command i see several ip-adresses that have connection to my pc and I don't what they are for. These are the ip's. </p>
<pre><code> TCP 192.168.1.20:1042 fa-in-f125:5222 HERGESTELLT
TCP 192.168.1.20:1238 we-in-f100:http HERGESTELLT
TCP 192.168.1.20:1281 bru01m01-in-f82:http HERGESTELLT
TCP 192.168.1.20:1282 bru01m01-in-f82:http HERGESTELLT
TCP 192.168.1.20:1283 bru01m01-in-f82:http HERGESTELLT
TCP 192.168.1.20:1284 bru01m01-in-f82:http HERGESTELLT
TCP 192.168.1.20:1285 bru01m01-in-f82:http HERGESTELLT
TCP 192.168.1.20:1289 bru01m01-in-f138:https HERGESTELLT
TCP 192.168.1.20:1294 bru01m01-in-f101:http HERGESTELLT
TCP 192.168.1.20:1295 bru01m01-in-f138:http HERGESTELLT
TCP 192.168.1.20:1296 bru01m01-in-f101:http HERGESTELLT
TCP 192.168.1.20:1297 ww-in-f132:http HERGESTELLT
TCP 192.168.1.20:1298 bru01m01-in-f191:http HERGESTELLT
TCP 192.168.1.20:1299 bru01m01-in-f191:http HERGESTELLT
TCP 192.168.1.20:1300 bru01m01-in-f191:http HERGESTELLT
TCP 192.168.1.20:1301 bru01m01-in-f191:http HERGESTELLT
TCP 192.168.1.20:1302 bru01m01-in-f191:http HERGESTELLT
TCP 192.168.1.20:1303 fra07s07-in-f113:http HERGESTELLT
TCP 192.168.1.20:1304 bru01m01-in-f191:http HERGESTELLT
TCP 192.168.1.20:1310 mil01s16-in-f18:http HERGESTELLT
TCP 192.168.1.20:1316 mil01s16-in-f18:http HERGESTELLT
TCP 192.168.1.20:1318 193.247.193.85:https HERGESTELLT
TCP 192.168.1.20:1334 server-216-137-61-177:http HERGEST
TCP 192.168.1.20:1381 46.105.131.100:http HERGESTELLT
TCP 192.168.1.20:1410 87.252.216.36:https HERGESTELLT
TCP 192.168.1.20:1412 87.252.210.40:http HERGESTELLT
TCP 192.168.1.20:1425 mil01s16-in-f18:http HERGESTELLT
</code></pre>
<p>How do I find out if they are malicious, for example a connection opened by a troyaner. And
how do I block them?</p>
| 1cybersec
| Stackexchange |
Me having to work on Smash Bros release day.. | 0non-cybersec
| Reddit |
Top 10 Zero Star Reviews by Roger Ebert. | 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 |
Second sitting for the Xwing (tattoo). | 0non-cybersec
| Reddit |
Introducing Auto Awesome Photobombs with David Hasselhoff. | 0non-cybersec
| Reddit |
UFD, prime and Irreducible. <p>I am taking following definitions and calling algebraic structure U1 and U2 definition as: </p>
<p>U1 is A ring R with unity and properties properties</p>
<ol>
<li><p>Every element of R is neither 0 nor a unit can be factored into a product of finite no. of <strong>primes</strong></p></li>
<li><p>And factorization unique upto associates.</p></li>
</ol>
<p>U2 is A ring R with unity and properties properties</p>
<ol>
<li><p>Every element of R is neither 0 nor a unit can be factored into a product of finite no. of <strong>irreducible</strong></p></li>
<li><p>And factorization unique upto associates.</p></li>
</ol>
<p>Are U1 and U2 equivalent?
What if I include commutative condition also?
Does there exist structure like this?
What is example of U2 which is not UFD?(if possible)</p>
<p>Note: a and b Associate means if a=ub or a = bv then u and v are unit</p>
| 0non-cybersec
| Stackexchange |
Bootstrap 4 - Change breakpoint navbar?. <p>This question was already asked <a href="https://stackoverflow.com/questions/36329305/bootstrap-4-responsive-navbar">here</a> but this don't work because of the Javascript. So in the provided answer only the CSS was changed but not the JS, which means the content of the nav bar is still visible while the toggler is not. Any solution?</p>
<p>Edit:</p>
<p>My question is how to change the breakpoint of the nav bar in Bootstrap 4.xx</p>
| 0non-cybersec
| Stackexchange |
I shot a time lapse of the Amazon from my hotel window. Watch what happens when the storm hits at 0:20.. | 0non-cybersec
| Reddit |
How to get out of this indetermination $\lim\limits_{x\to -1} \frac{\ln(2+x)}{x+1}$?. <p>Well, is just that, I can't remember a way to get out of this indetermination (with logarithm), can someone help me?</p>
<p>I'm studying for my calculus test and this question is taking me some time.</p>
<p>$$\lim\limits_{x\to -1} \frac{\ln(2+x)}{x+1}$$</p>
| 0non-cybersec
| Stackexchange |
React Native pass function to child component as prop. <p>I'm new to React Native (and React), and I'm trying to pass a function as a prop to a component.</p>
<p>My goal is to create a component where its onPress functionality can be set by the instantiator of the component, so that it is more reusable.</p>
<p>Here is my code so far.</p>
<p>App.js</p>
<pre><code>import React, { Component } from 'react';
import { View } from 'react-native';
import TouchableButton from './components/touchable-button';
export default class App extends Component<Props> {
constructor () {
super();
}
handlePress () {
// this should be called when my custom component is clicked
}
render () {
return (
<View>
<TouchableButton handlePress={this.handlePress.bind(this)}/>
</View>
);
}
}
</code></pre>
<p>TouchableButton.js</p>
<pre><code>import React, { Component } from 'react';
import { TouchableHighlight } from 'react-native';
import AppButton from "./app-button";
export default class TouchableButton extends Component {
handlePress;
constructor(props){
super(props);
}
render () {
return (
<TouchableHighlight onPress={
this.props.handlePress
}>
<AppButton/>
</TouchableHighlight>
);
}
}
</code></pre>
<p>I am passing the handlePress function as the prop handlePress. I would expect the TouchableButton's props to contain that function, however it isn't there.</p>
| 0non-cybersec
| Stackexchange |
Is a map $G$ composed with a local diffeomorphism smooth iff $G$ is smooth?. <p>Suppose <span class="math-container">$F: M \to N$</span> is a local diffeomorphism between smooth manifolds. </p>
<p><span class="math-container">$(a)$</span> Let <span class="math-container">$G: P \to M$</span> be a continuous map between smooth manifolds. Then <span class="math-container">$G$</span> is smooth if and only if <span class="math-container">$F \circ G$</span> is smooth.</p>
<p><span class="math-container">$(b)$</span> Let <span class="math-container">$H: N \to P$</span> be any map between smooth manifolds and in addition assume <span class="math-container">$F$</span> is surjective. Then <span class="math-container">$H$</span> is smooth if and only if <span class="math-container">$H\circ F$</span> is smooth.</p>
<p>Is it possible to strengthen this result? Perhaps by dropping the requirement that <span class="math-container">$G$</span> is continuous in <span class="math-container">$(a)$</span> or <span class="math-container">$F$</span> surjective in <span class="math-container">$(b)$</span>?</p>
| 0non-cybersec
| Stackexchange |
Implicit/Explicit Assertions. <p>During code review, a minor suggestion was presented that some implicit behavior be made explicit. The reviewer had skimmed over the code in question, became confused after mistakenly interpreting the code's purpose, and only discovered the cause after some careful analysis. Below are the implicit practice and suggested practice, in that order:</p>
<pre><code>stuffLookup = {--[[functions in here]]}
function doStuff(stuffType, ...)
assert(stuffLookup[stuffType], "stuffType is not a valid stuff!")(...)
end
function doStuff2(stuffType, ...)
if stuffLookup[stuffType] then stuffLookup[stuffType](...) else error("stuffType is not a valid stuff") end
end
</code></pre>
<p><code>assert</code> is frequently used without invoking another function as in this case, so at first glance the reviewer did not see such a small invocation at the end of assert, and assumed the line served no purpose past a sanity check.</p>
<p>The argument in favor of practice 1 was that it's syntactically correct, that it's used in Lua docs, that it's faster, and that if someone didn't anticipate assert being used like that it was their own fault. The argument in favor of practice 2 was that the nature of practice 1 could easily be misunderstood, that it was an implicit idiosyncrasy that wasn't legible enough, and that considering performance was premature optimization (code was not designed to be used frequently and table lookup time was negligible).</p>
<p>Are there any merits to the concerns and viewpoints of either party?</p>
| 0non-cybersec
| Stackexchange |
Looking for a snowy destination for December for a family from SoCal. My family is considering going on a vacation for winter break this year. We are from Southern Califonia, so we'd like to go to a place that has some snow. We like some outdoor activities, hiking, snowboarding, fishing, stuff like that. My mom and sister would also prefer some shopping, though I personally would like to see one of the national parks. We're hoping to be able to rent some sort of cabin. We used to live in Portland, OR (and have thus been to Seattle often), so we'd like to stay away from there and see other places.
Any suggestions or ideas for a location? Is what we're looking for too unrealistic? Thanks
Edit: Forgot to say we'd like to stay stateside | 0non-cybersec
| Reddit |
Is this free book a good way to learn Python?. http://inventwithpython.com/chapters/ I found this guide which helps you design a basic game. I'm not sure whether it is a little too simple though.
edit: would I be better off using Udacity? | 0non-cybersec
| Reddit |
Copy a directory with special character. <p>I have directory on my <strong>External hard disk</strong> with name like this <strong>$recycle.bin</strong> which was copied from a PC running windows OS.This folder was hidden on windows PC and is still invisible on my computer . Now i wanted to copy this folder on my computer via command prompt so that i can make it visible , however when i copy the same via command prompt it says directory not found </p>
| 0non-cybersec
| Stackexchange |
Lost j. | 0non-cybersec
| Reddit |
Azure Graph API C# Client - Unable to get user's Manager object. <p>User's manager object is always null when i try to retrieve a user. But i get "objectId", which is the corresponding manager(user) GUID.
I can use this GUID to get Manager from API calls or from <a href="https://graphexplorer.cloudapp.net" rel="noreferrer">https://graphexplorer.cloudapp.net</a> but not from Graph Client using C# (even with 2.1.0 version: <a href="https://www.nuget.org/packages/Microsoft.Azure.ActiveDirectory.GraphClient" rel="noreferrer">https://www.nuget.org/packages/Microsoft.Azure.ActiveDirectory.GraphClient</a>).</p>
<p>Can someone guide me on this? Thanks in advance.</p>
| 0non-cybersec
| Stackexchange |
Running computations on a remote server using 2 possible methods. Which is ideal?. <p>So, this is more of a general question than a specific problem. I'm using AWS and I have my main web server on an m1.medium instance but there are some computationally intensive tasks that I want to run so I created an high compute (multicore, high speed) c1.medium instance as well. </p>
<p>I was thinking of putting all the scripts I want to run in the compute server. These are obviously separate volumes but I wanted to know which would be a better approach.</p>
<ol>
<li>SSH + call the script on the compute server or</li>
<li>NFS mount the compute server and call the script</li>
</ol>
<p>I'm fairly sure I know the behavior of #1 but I'm not sure about #2. If I did that would it use the CPU on the compute instance? Because that's the whole point in splitting them</p>
| 0non-cybersec
| Stackexchange |
Run Wpf application from CMD/Run like calc?. <p>I want to provide my WPF application a custom command so I can start up it from command prompt by not writing it's name but by writing specific command like calc or appwiz.cpl. I have searched google for the same but it is taking me wrong like almost concepts are of command line argument but I am not looking for the same. Is there any possibility to start a custom application from command line or run utility.
Thanks in advance.</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 |
[WP] You have the power of total time manipulation. However, every time you activate your powers it alerts a top assassin to the threat you pose to the time line. Unaware of this, you have already used your powers 5 times.. | 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 |
So am I supposed to be paid for buying these games or something?. | 0non-cybersec
| Reddit |
$\frac{f(x_1)}{f(x_2)} = \log(\frac{x_1}{x_2}) \implies f(x)=\;?$. <p>If $$\frac{f(x_1)}{f(x_2)} = \log\left(\frac{x_1}{x_2}\right),$$</p>
<p>what is $f(x)$? I mean the simplest form of $f(x)$, and what math technique you use to solve this problem? Thanks.</p>
| 0non-cybersec
| Stackexchange |
gedit color HTML file. <p>I have a file that I don't want to put <code>.html</code> in its name. However, I still want gedit to color it like an HTML file. Is there a way that I can tell gedit to color it as an HTML file? Like putting some header at the top.</p>
| 0non-cybersec
| Stackexchange |
In GIMP, how do I make part of image transparent manually?. <p>How can I make part of the image transparent? I tried the "Color to alpha" option in GIMP, but it's not working.</p>
<p>I know in Photoshop you can erase the part you don't like, and make it transparent. Does GIMP support that?</p>
| 0non-cybersec
| Stackexchange |
HOW CAN THIS BE BUILT? - Single operating system for 950 sqft., 2 bedroom apartment. Access points are 3 touchscreens (one in each room), at least 24"; they will be wall-mounted and can autorotate (like a mobile device).. This is for an in-house command center. Somehow this build needs to be controlled by a tablet that I can use as a free screen for the home OS. *This is a redux of an old deleted post. My "dream-wall PC" concept is attached [here.](http://imgur.com/NCd0NOB)*
EDIT*I want my own JARVIS, even if it's the "dumbest" kind that I have to build myself. Ideally, I'd like to walk into any room with a tablet and throw the screen contents onto the nearest display (one might call this "Minority Report-style). My research led me to one possibility, via WiFi-based screen-linking software called Pinch (Verge article link [here,](https://www.theverge.com/2012/11/1/3584632/pinch-smartphone-tablet-synchronized-display-link-interface-app) 2nd video [here.](https://www.youtube.com/watch?v=d8JvZTHh8Xs)) I hope someday to be able to control some of the software I'm running via voice control, but that's assuming that Amazon, Google or Apple end up building out their assistants to be compatible with a wider range of products to allow the level of deep customization that I'd ultimately want to have.
Realistically, this will just be running Windows, with the option of a VM running stock Android. :)
My budget is around $10K USD. If I can come in lower than that, hooray. If it needs to go higher, I'm flexible.
...I don't want to see any wires, at all. In order of preference, it would be
1) wall-mounted screen with sheathed power cord running down the wall, and the signal coming in via wireless HDMI transmitters, -or-
2) somehow having each monitor attached to a client PC, with a central server in a closet connected via ethernet.
In my research, I've found no "plug-and-play" options to bring this vision together. I've been brainstorming this for over a year now, either trying to rearrange/ reconfigure my plans or looking around for some new tech development that would make my vision easier to implement. I've listed my journey below:
* 1) There are no touchscreen monitors below 40" that have both a high-resolution display and multitouch capability, which *also* has a rotation detection/ accelerometer built into it.
* 2) I haven't found anything besides REMIX OS that would allow me to run a full window version of Android on an Intel or AMD based PC, not to mention that REMIX doesn't yet support touchscreen.
* 3) I've considered building a powerful PC with multiple monitor support, then attaching wireless HD transmitters to flat screens in each room. But this doesn't solve the touchscreen problem.
* 4) I've considered "making" my own touch screens by purchasing aftermarket touch screen panels, then mounting them to flat screens, but the sizes are much larger than I want for my desired application, and this still doesn't solve the auto-rotate issue.
* 5) I've looked into rotation scripts that would detect a wall mounted screen being swiveled, and even found a company that "almost" does what I want [Potrait - Screen Rotation](http://www.portrait.com/technology/screen-rotation.html); it's the closest I've found to solving the issue, but I want to make sure the system I want can support multiple monitors before I sink cash into software.
I would like to find a way to make this seamless, grand vision happen, but I'm at a loss and I'm reaching out to those with fresh eyes and ideas. | 0non-cybersec
| Reddit |
Check string content of response before retrying with Polly. <p>I'm working with a very flaky API. Sometimes I get <code>500 Server Error</code> with <code>Timeout</code>, some other time I also get <code>500 Server Error</code> because I gave it input that it can't handle <code>SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM.</code>.</p>
<p>Both of these cases give me <code>HttpRequestException</code> but I can look into the reply message from the server and determine the cause of the exception. If it is a timeout error, I should try again. If it is a bad input I should re-throw the exception, because no amount of retries will fix the problem of bad data.</p>
<p>What I'd like to do with Polly is to check on response message before attempting to retry. But all the samples I've seen so far only included type of exception.</p>
<p>I've come up with this so far:</p>
<pre><code> HttpResponseMessage response = null;
String stringContent = null;
Policy.Handle<FlakyApiException>()
.WaitAndRetry(5, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)),
async (exception, timeSpan, context) =>
{
response = await client.PostAsync(requestUri, new StringContent(serialisedParameters, Encoding.UTF8, "application/json"));
stringContent = await response.Content.ReadAsStringAsync();
if (response.StatusCode == HttpStatusCode.InternalServerError && stringContent.Contains("Timeout"))
{
throw new FlakyApiException(stringContent);
}
});
</code></pre>
<p>Is there a better way to do this kind of checking?</p>
| 0non-cybersec
| Stackexchange |
How to draw a smooth continuous line with mouse using html canvas and javascript. <p>I'm attempting to create a simple draw/paint programme using html5 canvas and plain javascript. I've got it working ok, but when drawing and moving the mouse too fast the line disconnects and I just end up with a line of dots - how can I make this a smooth continuous line?</p>
<p>Advice would be much appreciated! I'm quite new to JS so code examples would be really useful, thanks in advance.</p>
<p>Current JS is:</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var canvas, ctx
var mouseX, mouseY, mouseDown = 0
function draw(ctx,x,y,size) {
ctx.fillStyle = "#000000"
ctx.beginPath()
ctx.arc(x, y, size, 0, Math.PI*2, true)
ctx.closePath()
ctx.fill()
}
function clearCanvas(canvas,ctx) {
ctx.clearRect(0, 0, canvas.width, canvas.height)
}
function onMouseDown() {
mouseDown = 1
draw(ctx, mouseX, mouseY, 2)
}
function onMouseUp() {
mouseDown = 0
}
function onMouseMove(e) {
getMousePos(e)
if (mouseDown == 1) {
draw(ctx, mouseX, mouseY, 2)
}
}
function getMousePos(e) {
if (!e)
var e = event
if (e.offsetX) {
mouseX = e.offsetX
mouseY = e.offsetY
}
else if (e.layerX) {
mouseX = e.layerX
mouseY = e.layerY
}
}
function init() {
canvas = document.getElementById('sketchpad')
ctx = canvas.getContext('2d')
canvas.addEventListener('mousedown', onMouseDown, false)
canvas.addEventListener('mousemove', onMouseMove, false)
window.addEventListener('mouseup', onMouseUp, false)
}
init();</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code><canvas id="sketchpad" width="500" height="500"></canvas></code></pre>
</div>
</div>
</p>
| 0non-cybersec
| Stackexchange |
don't need that engram? bank it!. if you find a green engram on a character or class that doesn't need it, before identifying it:
-bank it in the vault
-Swap Characters
-Profit.
just picked up a green chest armor on my hunter, and turned it into a titan chest | 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 |
We are all dormantly insane until something triggers 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 |
Lexicographically order matrix into a vector. <p>I am trying to implement the algorithm contained in <a href="https://ieeexplore.ieee.org/abstract/document/995059" rel="nofollow noreferrer">this article here</a>. It is about solving a 2 and 2.5D Fredholm integral, focused on bidimensional NMR experiments. I've made significant progress, despite this being my very first time doing any computational science. The output I get is clearly wrong, but seems shifted from what would be ideal. I am trying to stamp out problematic areas, and am wondering if I interpreted this passage wrong:</p>
<blockquote>
<p>In principle, the 2-D problem in (2) can be reduced to a 1-D problem <span class="math-container">$m_r = K_0f_r + \epsilon_r \quad r=1,...,R$</span>. Here, the vectors <span class="math-container">$m_r$</span>, <span class="math-container">$f_r$</span> and <span class="math-container">$e_r$</span> are obtained by lexicographically ordering matrices <span class="math-container">$M_r$</span>, <span class="math-container">$F_r$</span>, <span class="math-container">$E_r$</span>.</p>
</blockquote>
<p>For reference, eq (2) that they mention is the Fredholm integral we are trying to solve, which relates the measured data <span class="math-container">$M_r$</span> and the joint probability distribution <span class="math-container">$\mathcal{F}_r$</span> of the relaxation times (x, y):</p>
<p><span class="math-container">$$M_r(\tau_1,\tau_2) = \int \int k_1(x, \tau_1)k_2(y, \tau_2)\mathcal{F}_r(x,y)dxdy + \epsilon_r(\tau_1,\tau_2) \quad r=1,...,R$$</span></p>
<p>According to the text, the shape of <span class="math-container">$M_r$</span> is <span class="math-container">$N_1\times N_2$</span> and <span class="math-container">$m_r$</span> is <span class="math-container">$(N_1N_2\times 1)$</span>. I thought I could use a simple reshape, but looking at definitions of <em>lexicographic</em>, there seems to be a sort involved. So, which one of these two python snippets is right? Or is it something else entirely?</p>
<ul>
<li><code>m_r = np.sort(M_r, axis=None)[:, np.newaxis]</code> or</li>
<li><code>m_r = M_r.reshape((N1*N2, 1))</code>?</li>
</ul>
<p>Later, they also state that</p>
<blockquote>
<p>The matrix <span class="math-container">$F_r$</span> is estimated by reordering <span class="math-container">$f_r$</span> into the matrix notation.</p>
</blockquote>
<p>So, I could do a simple <code>reshape</code> back. But if I have to unsort <span class="math-container">$F_r$</span>, which has the shape <span class="math-container">$N_x \times N_y$</span>, I am lost.</p>
| 0non-cybersec
| Stackexchange |
The Kingdom of the Netherlands and its Nations, Special Public Entities/Provinces and Municipalities (x-post /r/thenetherlands). | 0non-cybersec
| Reddit |
accessing data using datatool when headers aren't available. <p>I have a series of <code>csv</code> files I'm expecting to receive on a regular basis, and there are two problems with these files. </p>
<ol>
<li>I am not guaranteed to have headers.</li>
<li>I cannot rely on how many data entries there will be per row (sometimes there may be 50 or so, sometimes more)</li>
</ol>
<p>What I am guaranteed is that, let's say, the 1st, 10th, and 30th column have the data I want. Up until now I've been using a perl script to <em>collapse</em> these <code>csv</code> files to something where the rows have only the elements I'm interested in.</p>
<p>Is there a way in <code>datatool</code> to tell it to create headers for certain columns and ignore the rest?</p>
<p>For example, it would be nice to be able to do something like the following:</p>
<pre><code>\DTLloaddb[noheader,headers={modelname=1,serialnumber=10,weight=30}]{itemweights}{somefile.csv}
</code></pre>
<p>which would mean that <code>modelname</code> is in the first column, <code>serialnumber</code> is in the 10th column and <code>weight</code> is in column 30.</p>
<p>Here is an extremely simplified example of a <code>csv</code> file I might work with.</p>
<pre><code> "toaster", "", "", "", "234-02015-23-948", "", "", "", "", "", "1255", "", ""
"blender", "junk", "", "", "753-20842-46-824", "", "", "junk", "", "", "1567", ""
"microwave", "", "", "stuff", "376-73178-68-487", "", "", "", "junk", "", "2434", "", "", ""
"radio", "", "stuff", "junk", "724-86499-61-446", "", "", "", "junk", "", "2343"
"tv", "", "", "", "423-90219-60-149", "", "junk", "", "", "", "3023", "", "", ""
</code></pre>
<p>A solution that creates a header for every column is completely infeasible because I have upwards of 50 columns only 3 or 4 of which I'm interested in. </p>
<p>What I'd like to be able to do is write:</p>
<pre><code>\DTLloaddb[noheader,headers={appliance=1,serialnumber=5,detailnumber=11}]{itemweights}{somefile.csv}
</code></pre>
| 0non-cybersec
| Stackexchange |
How do I disable Hibernate foreign key constraint on a bidirectional association?. <p>I am trying to disable the foreign key constraint being generated on my bidirectional association. I have managed to do this for all my unidirectional associations, but for some reason it is not working here.</p>
<p>I do know about the bug with <em>ContraintMode.NO_CONSTRAINT</em> that was recently fixed in Hibernate 5.x, and I am running the latest Hibernate 5.2.6.</p>
<p>My annotations presently look like this:</p>
<pre><code>class Parent {
@OneToMany(mappedBy="parent", cascade=CascadeType.ALL, orphanRemoval=true)
@OrderColumn(name="childIndex")
public List<Child> getChildren() {
return children;
}
}
class Child {
@ManyToOne(optional=false)
@JoinColumn(name="parent", foreignKey = @ForeignKey(value = ConstraintMode.NO_CONSTRAINT))
public Parent getParent() {
return parent;
}
}
</code></pre>
<p>But despite NO_CONSTRAINT, Hibernate is still creating the foreign key constraint on child.parent -> parent.id.</p>
<p>Is there something additional I need to do to suppress the foreign key for the bidirectional case?</p>
<p>Thanks!</p>
| 0non-cybersec
| Stackexchange |
$\int_{\mathbb R} |f(x)| dx < \infty \implies \sum_{n\in \mathbb Z} |f(n)| < \infty $?. <p>Put, $C_{0} (\mathbb R)=\{f:\mathbb R \to \mathbb C: f \text { is continuous on} \ \mathbb R \ \text {and } \lim_{|x|\to \pm \infty}f(x)=0 \}$(= Continuous functions on $\mathbb R$ vanishing at $\infty$) </p>
<p>Let $f\in C_{0} (\mathbb R)$ such that $\int_{\mathbb R} |f(x)| dx < \infty $.</p>
<p><strong>My Question</strong>: Can we expect $\sum_{n\in \mathbb Z} |f(n)| < \infty$; Or, we get a counter example, that is, $\sum_{n\in \mathbb Z} |f(n)| = \infty $ ?</p>
| 0non-cybersec
| Stackexchange |
Probability that hamming distance is d.. <p>Two '$n$' bit binary strings $S_1$ and $S_2$ are chosen randomly with uniform probability. The probability that the hamming distance between these strings (the number of bit positions where the two strings differ) is equal to $d$ is ?</p>
<hr>
<p><strong>My approach</strong></p>
<p>We can choose 2 random strings out of $2^n$ strings possible in $2^n C 2$ ways. </p>
<p>Now the probability of 2 bits being different is $0.5$</p>
<p>Applying binomial distribution we get,</p>
<p>$2^n C 2 * (0.5)^d * (0.5)^{n-d}$ .</p>
<p>Here $(0.5)^d$ means probability of 'd' bits being different in 2 strings which were chosen.</p>
<p>Why is this approach wrong ?</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 |
Semigroups with no morphisms between them. <p>Given two monoids we always have a morphism from one to the other thanks to the presence of the identity element.</p>
<p>Are there examples of non-empty semigroups that have no morphisms from one to the other? The destination semigroup can't be finite, because if we have an idempotent present, we just map everything to it and get a constant morphism. Apparently, it can't contain an idempotent, period.</p>
<p>Put another way, the subcategory of finite semigroups is clearly strongly connected. Is the same true of the category of all semigroups?</p>
<hr>
<p>Are there two such non-empty semigroups that don't have a morphism in either direction?</p>
| 0non-cybersec
| Stackexchange |
unknown cc payment to my account, help!.
(Bank of America cc, tied to BOA checking account... I know its bad, please feel free to mock me)
Last evening my wife and I were reviewing our budget and cc statements and spotted a payment to one of our cc accounts. The amount was larger than typical for us and because we keep track of our expenses and payments carefully it jumped out at us as abnormal.
We immediately called the number on the back of our card and the representative we spoke to was unable to give us any information about the payment.
He claimed it was unknown and unknowable where the payment came from and that it would likely "get denied" the next day and disappear.
This didnt sit well with me so I urged him to make a note on our account that we were aware of the payment, that we did not make it, and that should any fees or penalties result from this issue we would like them dismissed.
He did so.
Today, after checking again, the payment did not "get denied" and has processed successfully............
I know there's no such thing as a free lunch, ESPECIALLY FROM BANK OF AMERICA.
What do I do to figure this out? I'm terrified that we're about to get smashed with some kind of charge or fee due to their error but no one can tell us what to do about this mysterious payment.
Any help is appreciated, thank you for reading. | 0non-cybersec
| Reddit |
I'm a large, dark-complexioned guy and I need to buy a suit or sports coat. HELP ME!!!. Hey all, so long story short, I have some grad school interviews coming up and I would really appreciate some help. I'm a 6'4, muscular-athletic (240 lbs) build black guy, dark complexion (think Wesley Snipes) and I need to buy a suit. Could you guys give me some ideas/ tips for buying a suit. I really only have a few hundred dollars so I'm trying to get a quality suit in terms of color, style and fit. Anyone have suggestions on what colors would work best with a complexion like mines? Also, like I said, I'm a bigger guy, 6'4, 240 lbs, about 16% bf, so my waist is about 38. I'm trying to cut that down quite a bit, but help would be appreciated. Also, considering my size and height, what/ where should I really pay attention in terms of fit. I realize that because I don't have a lot to drop on a custom suit, I'll probably have to get it tailored so it fits really nice. | 0non-cybersec
| Reddit |
ITAP of Lake Louise, catching the sunrise at 4:00am. | 0non-cybersec
| Reddit |
How can I record part of an HLS-streamed audio and upload it to YouTube as an audio podcast. <p>I will be posting a how-to guide as an answer to this question.
It will demonstrate how to accomplish the above task, while meeting five requirements that at first seemed difficult to achieve:</p>
<ol>
<li><p>I needed to do this with a minimal set of software tools, preferably free and even better if open source. The ones I used are listed below.</p></li>
<li><p>I wanted to convert the audio file from m4a to mp3.</p></li>
<li><p>I wanted to edit the audio to trim it at both ends and possibly to also remove some bits in between.</p></li>
<li><p>It is possible to create a video (e.g. mp4) file with only an audio track and no video track, but YouTube will not accept such a file. At a bare minimum, YouTube requires at least a single, still image to accompany the audio track.</p></li>
<li><p>Saving the audio stream to a file is fairly easy, but the file would need to undergo some subsequent processing for steps 2 to 4, and just loading a 2.5-hour audio file into an editor can be quite time-consuming, so ideally it would be preferable to just download the half-hour segment in the middle that I wanted. That segment commences at time ~1:34:00.</p></li>
</ol>
| 0non-cybersec
| Stackexchange |
How Blurs & Filters Work - Computerphile. | 0non-cybersec
| Reddit |
Next stop, the moon!. | 0non-cybersec
| Reddit |
ECHOINE Women's Elegant Pencil Midi Dress Short Sleeve. | 0non-cybersec
| Reddit |
REVELADOS 4 MÉTODOS para ACABAR COM O ACÚMULO DE GORDURA SEM GASTOS EXTRAS E SEM DOR DE CABEÇA. | 0non-cybersec
| Reddit |
Sleep does not work. <p>When I choose sleep in the start menu. My PC simply does not go into sleep. I went through the device manager and did all the steps described <a href="http://support.microsoft.com/kb/976877" rel="nofollow noreferrer">here</a>. So far this had no effect.</p>
<p>I've also installed Ubuntu 10.10 but I have the same problem (and in addition I don't know weather the kernel is configured correctly to support sleep) The mainboard is a Gigabyte P55A-UD4.</p>
| 0non-cybersec
| Stackexchange |
How can I get wine to support outputting to pulseaudio (through ALSA compatibility layer) with 32 bit Windows programs on Slackware64?. <p>So, I have a working multilib setup as per the <a href="http://alien.slackbook.org/dokuwiki/doku.php?id=slackware:multilib" rel="nofollow noreferrer">slackbook</a> instructions. I have wine successfully working with 32 bit Windows programs (namely Skyrim and Deus Ex: Human Revolution). And I have pulseaudio successfully installed and configured for native 64 bit programs. Normally, I kill pulseaudio with <code>pulseaudio --kill</code> prior to using wine, as when I run something without doing so, this pops up in the terminal I start it from:</p>
<pre><code>fixme:win:EnumDisplayDevicesW ((null),0,0x33f7d8,0x00000000), stub!
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
ALSA lib pulse.c:243:(pulse_connect) PulseAudio: Unable to connect: Connection refused
</code></pre>
<p>This following part I've since solved by adding <code>export ARCH=i486</code> after the <code>. /etc/profile.d/32dev.sh</code> as I noticed was required on the multilib page in Slackbook. The fix allowed me to at least get json-c and speex (specified dependencies for pulseaudio on slackbuilds.org) compiled as i486 packages which I then converted to compat32 packages with convertpkg-compat32 and installed.</p>
<blockquote>
<p>I've tried the recommended </p>
<p># . /etc/profile.d/32dev.sh</p>
<p>prior to running <code>sbopkg -b pulseaudio</code>, but the resulting package ends up still being an x86-64, rather than i486, package. And since Slackware doesn't natively have pulseaudio included in the distribution, and nor does Alienbob have a compiled version up for it on his slackbuilds repository, I haven't been able to come across a 32 bit binary package to run <code>converpkg-compat32</code> on.</p>
</blockquote>
<p>The remaining problem, however, is that when I go to compile pulseaudio using the same method used to compile those dependencies, I get this:</p>
<pre><code>daemon/pulseaudio-caps.o: In function `pa_drop_caps':
/tmp/SBo/pulseaudio-5.0/src/daemon/caps.c:85: undefined reference to `cap_init'
/tmp/SBo/pulseaudio-5.0/src/daemon/caps.c:86: undefined reference to `cap_clear'
/tmp/SBo/pulseaudio-5.0/src/daemon/caps.c:87: undefined reference to `cap_set_proc'
/tmp/SBo/pulseaudio-5.0/src/daemon/caps.c:88: undefined reference to `cap_free'
collect2: error: ld returned 1 exit status
make[3]: *** [pulseaudio] Error 1
</code></pre>
<p>This following issue I fixed by installing libcap and GConf as compat32 packages, followed by re-running the pulseaudio.Slackbuild script (again, in the 32dev environment as with the above packages). </p>
<blockquote>
<p>Is this a matter of a missing library I still need to install as a dependency, not mentioned on Slackbuilds.org? It certainly wouldn't be the first time I've encountered that situation, but usually my errors are a little more helpful when it comes to hunting down the library I need.</p>
</blockquote>
<p>Having gotten pulseaudio thus installed, I went to run <code>winecfg</code> to test sound (Note: I tried doing this both with <code>/usr/bin/pulseaudio --start</code>, and when that didn't work, killed the server and tried with <code>/usr/bin/32/pulseaudio --start</code>. Both yielded the same result). The resulting error message followed:</p>
<pre><code>ALSA lib dlmisc.c:252:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib64/alsa-lib/libasound_module_pcm_pulse.so
ALSA lib dlmisc.c:252:(snd1_dlobj_cache_get) Cannot open shared library /usr/lib64/alsa-lib/libasound_module_pcm_pulse.so
libgcc_s.so.1 must be installed for pthread_cancel to work
</code></pre>
<p>I tried backing up the /usr/lib64/alsa-lib/libasound_module_pcm_pulse.so and making a symlink at that location to /usr/lib/alsa-lib/libasound_module_pcm_pulse.so, as well as copying the file, neither of which had any effect whatsoever on the error message that came out. Also, I tried setting the environment variable <code>ALSA_MIXER_SIMPLE_MODULES</code> to <code>/usr/lib/alsa-lib</code>, still to no avail. Starting to run out of ideas.</p>
<p>I know this is pretty uncharted territory with Slackware, as the majority of users seem to have no interest in using it, but there being no reason why it wouldn't be workable, I'm just curious if anyone has any sage advice on getting this package compiled so I can get it installed. If anyone has direct experience with this situation, so much the better.</p>
| 0non-cybersec
| Stackexchange |
George HW Bush, 94, has passed away. | 0non-cybersec
| Reddit |
Number of nuclear weapons per country 1945-2015 (updated) [OC]. | 0non-cybersec
| Reddit |
This is Sophie, she is a siamese-tortie. | 0non-cybersec
| Reddit |
Owl always love you kitty. | 0non-cybersec
| Reddit |
Finding the smallest positive integer $n$ such that $S_n$ contains an element of order 12. <p>My attempt:</p>
<p>Suppose <span class="math-container">$\sigma \in S_{n}$</span> such that <span class="math-container">$|\sigma|$</span>. We know that every element of <span class="math-container">$S_{n}$</span> can be written as a product of disjoint cycles, that is:</p>
<p><span class="math-container">$\sigma = \theta_{1}... \theta_{i}$</span>
.</p>
<p>Now we know that the order of any element in <span class="math-container">$S_{n}$</span> will be the least common multiple of the disjoint sets, that is:</p>
<p>Order(<span class="math-container">$\sigma$</span>)<span class="math-container">$=12=lcm{|\theta_{1}|...|\theta_{i}|}$</span>.</p>
<p>Note, the prime factorization of 12 would be 2*2*3. As we know <span class="math-container">$lcm(4,3)=12$</span>, therefore the following permutation would have order 12,</p>
<p><span class="math-container">$(1234)(567)\in S_{7}$</span>.</p>
<p>Here is where my problem arises, I know that 7 will be the answer but I don't know how to properly justify it. I know I need to show that any other set of numbers with an LCM of 12 can't have a sum of less than 7, I just don't know how to do it. </p>
| 0non-cybersec
| Stackexchange |
How many vertices/nodes are too many in a graph and stop being beneficial?. <p><strong>Background</strong></p>
<p>I'm working on a project that requires me to keep track of transactions as well as the flow of items in a game.
In order to do that, I'm storing those transaction in a graph db (Orient-DB).</p>
<p>A Shop in the game can have zero or more basekts each of which can hold one type of item. So when a Player sells something, the sold items (if any) will be placed into the respective basket and the transaction is complete.</p>
<p><strong>Question</strong></p>
<p>I'm not entirely sure how to model that behavior properly though. I can think of two more or less sane ways to represent this, but don't know which representation is best for this scenario.</p>
<p><em>Things I need to know at any given time</em></p>
<ul>
<li>how did item x end up in basket y
<ul>
<li>which transaction was responsible for that?</li>
<li>which Player sold that item?</li>
</ul></li>
<li>which shops/players did item x pass through previously</li>
<li>which Player did business with shop x (and the reverse)?</li>
</ul>
<p><em>Option A:</em></p>
<p><a href="https://i.stack.imgur.com/OH4yz.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OH4yz.png" alt="Option A"></a></p>
<p>I create a transaction vertex and create edges between that, any and all <code>Items</code>, the <code>Basket</code> and the <code>Player</code> in question.
Downside is, I have to add data to the <code>contains</code> edges, to specify which item went into which <code>Basket</code> (here in light blue).</p>
<p><em>Option B:</em></p>
<p><a href="https://i.stack.imgur.com/1YKEN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1YKEN.png" alt="Option B"></a></p>
<p>I add additional nodes, to link transactions with <code>Baskets</code> and <code>Items</code>.
Here I get to represent all data in the graph in the form of vertices and edges but I'm introducing yet more hops to get from <code>Shop</code> to <code>Player</code>.</p>
<hr>
<p>The downside of <em>A</em> that could see is that when I want to get the items of a given transaction, I have to do additional queries if I want to know how an <code>Item</code> ended up in that specific <code>Basket</code>.</p>
<p>Which way should I go? Is there a better option?</p>
<p>Would adding a direct edge between Player and Shop be benefitial (with a reference to the transaction as property) to reduce unnecessary hops when all I want to know is, who went to a Shop?</p>
<p>I think this question boils down to, how many vertices are too many and when do I separate this into different queries (basically like a <code>JOIN</code> in relational databases)?</p>
<p>I did consider a transaction log for this, but some requirements that need to be queried would make this a hell to <code>JOIN</code></p>
| 0non-cybersec
| Stackexchange |
Second order homogeneous linear differential equation. <p>The differential equation of the form </p>
<p>$x^2\frac{d^2y}{dx^2}+p_1\frac{dy}{dx}+p_2y=Q$ where $p_1$ ,$p_2$ are constants and Q the function of x is called Second order homogeneous linear equation.</p>
<p>How can we prove that above equation is second order homogeneous linear differential equation.And also help me to understand the significance of above equation in engineering field.</p>
| 0non-cybersec
| Stackexchange |
How can I see when the computer rebooted? Remotely. <p>I need a way to remotely see when a computer rebooted. I have its hostname and am able to browse its file structure.</p>
<p>Would love to do this on Windows XP, Vista and 7 machines.</p>
| 0non-cybersec
| Stackexchange |
She really likes cooked green beans. | 0non-cybersec
| Reddit |
Syntax highlighting for Dockerfile in Sublime Text?. <p>Is it possible to get syntax highlighting for a Dockerfile in Sublime Text?</p>
| 0non-cybersec
| Stackexchange |
Subsets and Splits