text
stringlengths 36
35k
| label
class label 2
classes | source
stringclasses 3
values | tokens_length
int64 128
4.1k
| text_length
int64 36
35k
|
---|---|---|---|---|
Windows Vista: Folder options not working. <p>I'm running Windows Vista Service Pack 2. </p>
<p>I have the Folder Options set to "Open each folder in the same window."<br>
(Organize | Folder Options | General).</p>
<p>Each time I open a folder, it opens in a new window.</p>
<p>How do I get it to open each folder in the same window?</p>
<p>I have tried the following techniques with no success: </p>
<ol>
<li>Expand number of MBAG entries in Registry. (The number is 40,000 now.) </li>
<li>Delete Bags and MBAG entries in Registry. (Rebooted machine after, still no success). </li>
<li>Change to "Open each folder in its own window". Saved, then changed back. </li>
<li>Under View tab, changed "Remember each folder's view settings":<br>
unchecked, Apply to Folders, checked, Apply to folders. </li>
<li>Applied application from Annoyances.org. Still no success. </li>
<li>Clicked on Reset Default Options, then OK. (Opening in same fold is a default option!)<br>
Still unsucessful.</li>
</ol>
<p>I want the folders to open in the same window, just like the options say.</p>
| 0non-cybersec
| Stackexchange | 343 | 1,092 |
Should C# enums end with a semi-colon?. <p>In C#, it appears that defining an enum works with or without a semi-colon at the end:</p>
<pre><code>public enum DaysOfWeek
{ Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday} ; //Optional Semicolon?
</code></pre>
<p>This <a href="http://msdn.microsoft.com/en-us/library/sbbt4032.aspx" rel="noreferrer">C# page from MSDN</a> shows enums ending with semicolons, except for the <code>CarOptions</code>.</p>
<p>I haven't found any definitive reference, and both ways appear to work without compiler warnings.</p>
<p>So should there be a final semicolon or not?</p>
| 0non-cybersec
| Stackexchange | 198 | 624 |
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 | 349 | 1,234 |
Prove that $(ab+ac+bc)\sum\limits_{cyc}\frac{1}{(a-7b)^2}\geq\frac{1}{4}$. <blockquote>
<p>Let $a$, $b$ and $c$ be non-negative numbers such that $\prod\limits_{cyc}(a-7b)\neq0$. Prove that:
$$(ab+ac+bc)\left(\frac{1}{(a-7b)^2}+\frac{1}{(b-7c)^2}+\frac{1}{(c-7a)^2}\right)\geq\frac{1}{4}$$</p>
</blockquote>
<p>I think this inequality is very interesting </p>
<p>because it's similar to the known Ji Chen's inequality (Iran 1996):
$$(ab+ac+bc)\left(\frac{1}{(a+b)^2}+\frac{1}{(b+c)^2}+\frac{1}{(c+a)^2}\right)\geq\frac{9}{4}$$</p>
<p>Example of my trying.</p>
<p>BW does not help:</p>
<p>Let $a=\min\{a,b,c\}$, $b=a+u$ and $c=a+v$.</p>
<p>Hence, we need to prove that:</p>
<p>$$44064(u^2-uv+v^2)a^4+864(38u^3+17u^2v+73uv^2+38v^3)a^3-$$
$$-24(217u^4-1478u^3v-2157u^2v^2-3494uv^3+217v^4)a^2+$$
$$+4(98u^5-1631u^4v+3938u^3v^2+15698u^2v^3-1463uv^4+98v^5)a+$$
$$+uv(196u^4-2793u^3v+10490u^2v^2-2457uv^3+196v^4)\geq0,$$
which is nothing. </p>
<p>Thank you!</p>
| 0non-cybersec
| Stackexchange | 513 | 967 |
Stripe: webhook events order. <p>How should you handle the fact that events received via webhooks can be received in random order ?</p>
<p>For instance, given the following ordered event:</p>
<ul>
<li>A: invoiceitem.created (with quantity of 1)</li>
<li>B: invoiceitem.updated (with quantity going from 1 to 3)</li>
<li>C: invoiceitem.updated (with quantity going from 3 to 2)</li>
</ul>
<p>How do you make sure receiving C-A-B does not result in corrupted data (ie with a quantity of 2 instead of 3)?</p>
<p>You could <strong>reject the webhook if the previous_attributes in Event#data do not correspond to the current state</strong>, but then you are stuck if your local model was updated already, as you will never find yourself in the state expected by the webhook.</p>
<p>Or you can just use <strong>treat any webhook as a hint to retrieve and update an object</strong>. You just disregard the data sent by the webhook and always retrieve it.
Even if you receive events ordered as update/delete/create it should work, as update would in fact create the object, delete would delete it, and create would fail to retrieve the object and do nothing.
But it feels like a waste of resources to retrieve data each time when the webhook offers it as event data.</p>
<p>This question was <a href="https://stackoverflow.com/questions/31775335/stripe-webhooks-events-order">asked before</a> but the answers don't cover the above solutions.</p>
<p>Thanks</p>
| 0non-cybersec
| Stackexchange | 398 | 1,459 |
What specific algebraic properties are broken at each Cayley-Dickson stage beyond octonions?. <p>I'm starting to come around to an understanding of hypercomplex numbers, and I'm particularly fascinated by the fact that certain algebraic properties are broken as we move through each of the $2^n$ dimensions. I think I understand the first $n<4$ instances:</p>
<ul>
<li>As we move from $\mathbb{R}$ to $\mathbb{C}$ we lose ordering</li>
<li>From $\mathbb{C}$ to $\mathbb{H}$ we lose the commutative property</li>
<li>From $\mathbb{H}$ to $\mathbb{O}$ we lose the associative property (in the form of $(xy)z \neq x(yz)$, but apparently it's still alternative and $(xx)y = x(xy)$. Is that right?)</li>
<li>The move from $\mathbb{O}$ to $\mathbb{S}$ is where I start to get fuzzy. From what I've read, the alternative property is broken now, such that even $(xx)y \neq x(xy)$ but that also zero divisors come into play, thus making sedenion algebra non-division.</li>
</ul>
<p>My first major question is: Does the loss of the alternative property cause the emergence of zero divisors (or vice versa) or are these unrelated breakages?</p>
<p>My bigger question is: What specific algebraic properties break as we move into 32 dimensions, then into 64, 128, 256? I've "read" the de Marrais/Smith paper where they coin the terms pathions, chingons, routons and voudons. At my low level, any initial "reading" of such a paper is mostly just intent skimming, but I'm fairly certain they don't address my question and are focused on the nature and patterns of zero divisors in these higher dimensions. If the breakages are too complicated to simply explicate in an answer here, I'm happy to do the work and read journal articles that might help me understand, but I'd appreciate a pointer to specific papers that, given enough study, will actually address the point of my specific interest--something I can't necessarily tell with an initial glance, and might need a proper mathematician to point me in the right direction.</p>
<p>Thank you!</p>
<p>UPDATE: If the consensus is that this is a repeat, then ok, but I don't see how the answers to the other question about <em>why</em> algebraic properties break answers my questions about <em>what</em> algebraic properties break. Actually, the response marked as an answer in that other question doesn't actually answer that question either. It provides a helpful description of how to construct a multiplication table for higher dimension Cayley-Dickson structures, but explicitly doesn't answer the question as to why the properties break. </p>
<p>The Baez article many people suggest in responses to all hyper-complex number questions like mine is truly excellent, but is mostly restricted to octonions, and, in the few mentions it makes of higher dimension Cayley-Dickson algebras, does not refer to what properties are broken. </p>
<p>Perhaps the question isn't answerable, but in any case it hasn't been answered in this forum. </p>
<p>UPDATE 2: I should add that the sub question in this post about whether the loss of the alternative property specifically leads to the presence of zero divisors in sedenion algebra is definitely unique to my question. However, perhaps I should pose that as a separate question? Sorry, I'm not sure about that aspect of forum etiquette here. </p>
| 0non-cybersec
| Stackexchange | 816 | 3,336 |
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 | 349 | 1,234 |
Isn't Inactive memory a waste of resources?. <p>I'm looking for explanation of memory usage on my machine especially in light of the example in this screenshot below:</p>
<p><img src="https://i.stack.imgur.com/3WIAq.png" alt="Memory Usage"></p>
<p>I understand what is <code>Free</code> and <code>Active</code> means<br>
But what are the meanings of <code>Wired</code> and <code>Inactive</code>?</p>
<p>Especially <code>inactive</code>, why does it use so much memory for something that we do not use?</p>
| 0non-cybersec
| Stackexchange | 164 | 513 |
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 | 349 | 1,234 |
Installing a package program ubuntu 14.04. <p>I want to install an engineering program (<code>spring_free</code>) on linux ( <a href="http://spring.delta-h.de/index.php/en/download-support" rel="nofollow noreferrer">http://spring.delta-h.de/index.php/en/download-support</a>), but I don't know how to do that.</p>
<p>There is an install file in the folder, although I am not familiar how to run it. In the installation there are some batch files, but I don't know how to use them. I would be grateful if you help me in this regards.</p>
<p><img src="https://i.stack.imgur.com/h8PPc.png" alt="Installation files in the folder"></p>
| 0non-cybersec
| Stackexchange | 197 | 633 |
Who done ya wrong? Who was that person who screwed you over and you can never forgive?. What did they do to you that will last in your memory forever? Maybe you have forgiven them, maybe you haven't, maybe you can't.
Bonus points if you can tell us how you tried to get them back.
My story to start us off: After 7.5 years dating and supporting a woman with 3 kids, spending well over $100,000 paying for food, mortgage, rehabilitating her credit, helping her refinance her house, she walks in one evening and tells me we are incompatible, it is over and she walks away with all of it. Six weeks later, she tells me she's in a new relationship. | 0non-cybersec
| Reddit | 160 | 650 |
Are there existing extensions to behavior trees that fascilitate node communication?. <p>I've been looking into behavior trees, but I cannot find a lot about them. The Wikipedia page pretty much only mentions sequence and selector nodes.</p>
<p>I have found implementations that also provide memory selector, memory sequence, and parallel sequence, as well as some decorators like inversion and repetition.</p>
<p>I found some papers that discuss some form of a "weighted" selector/sequence that queries its children for their utility/probability. This can also be used in machine learning to dynamically adjust those weights.</p>
<p>What I have not yet found much about is communication between nodes.
Some implementations use a shared "blackboard" where nodes can write values, but this seems rather clumsy, as it creates a huge lookup table that tightly couples different nodes.</p>
<p>I've been thinking more in terms of sending messages to the next node.
I think the bulk of the shared state is a condition/action providing a specific value to the next action (rather than just success).</p>
<p>Has there been any research in this area? I was not able to find anything.
I'm also curious to hear about other useful extensions.</p>
| 0non-cybersec
| Stackexchange | 278 | 1,240 |
How does Keras load_data() know what part of the data is the train and test set?. <p>I'm quite new to Keras and I wanted to begin with a <a href="https://elitedatascience.com/keras-tutorial-deep-learning-in-python" rel="nofollow noreferrer">tutorial</a>. There, let's say almost at the beginning, the code lines</p>
<blockquote>
<p>Load pre-shuffled MNIST data into train and test sets </p>
<p>(X_train, y_train), (X_test, y_test) = mnist.load_data()</p>
</blockquote>
<p>emerge. I wonder how Keras knows what of the data is part of the training and what is part of the testing? Though it's quite a basic question I'm not able to see the certain definition in the Keras documentation (the searching even does not provide any result there).
Therefore, I appreciate any help as I often cannot find any command definitions in <a href="http://faroit.com/keras-docs/1.2.0/search.html?q=load_data" rel="nofollow noreferrer">Keras</a>. For other languages, like C++, R, Python and so on it is quite easy to find some definitions. But for Keras, even google doesn't provide me useful searching results (at least not in the first 2 pages).</p>
<p>TL;DR: How does load_data() know what is train and test of the data set?</p>
| 0non-cybersec
| Stackexchange | 371 | 1,225 |
how can i do angular routing to child to component. <p>i am trying to navigate to my child defined component but my router is not recognizing the given route.</p>
<p>route is like as follow :</p>
<p></p>
<p>in Router file i have defined something like this:</p>
<pre><code>const routes: Routes = [
{
path: "",
redirectTo: "products",
component: StandardproductsComponent,
pathMatch: "full",
canActivate: [AuthorizedGuardService],
},
{
path: "products",
component: StandardproductsComponent,
resolve: {
loaded: StandardsResolver
},
children: [
{
path: ":productId/types",
component: StandardtypesComponent,
// resolve: {
// loaded: StandardTypesResolver
// },
// canActivate: [AuthorizedGuardService]
}
]
}];
</code></pre>
<p>i won't able to do so like this way can anyone help me with this how can make my route workable.
i want to have route like this : v3/products/{productId}/types</p>
| 0non-cybersec
| Stackexchange | 292 | 1,040 |
Homebrew asked me to move macports now it does not work. <p>I'm using HomeBrew for my usual mac stuff but I need to do some experiments with other package managers. So I installed MacPorts. everything seems alright but brew doctor asks me to move it:</p>
<blockquote>
<p>warning: You have MacPorts or Fink installed:</p>
<p>This can cause trouble. You don't have to uninstall them, but you may want to </p>
<p>temporarily move them out of the way, e.g. sudo mv /opt/local ~/macports</p>
</blockquote>
<p>So I listened and moved it. And then in my bash profile I changed </p>
<p><code>export PATH="/opt/local/bin:/opt/local/sbin:$PATH"</code></p>
<p>to </p>
<p><code>export PATH="~/macports/bin:~/macports/sbin:$PATH"</code></p>
<p>and now when I when run <code>port ...</code> it gives me this error:</p>
<blockquote>
<p>-bash: /Users/foobar/macports/bin/port: /opt/local/libexec/macports/bin/tclsh8.5: bad interpreter: No such file or directory</p>
</blockquote>
<p>What am I doing wrong and how can I solve it?</p>
<p><strong>P.S.1.</strong> </p>
<p>I edited the <code>/Users/foobar/macports/bin/port</code> file as the admin and edited the first line from
<code>#!/opt/local/libexec/macports/bin/tclsh8.5</code></p>
<p>to</p>
<p><code>#!/Users/foobar/macports/libexec/macports/bin/tclsh8.5</code></p>
<p>now I get this new error:</p>
<blockquote>
<p>sources_conf must be set in /opt/local/etc/macports/macports.conf or in your /Users/foobar/.macports/macports.conf file
while executing
"mportinit ui_options global_options global_variations"
Error: /Users/foobar/macports/bin/port: Failed to initialize MacPorts, sources_conf must be set in /opt/local/etc/macports/macports.conf or in your /Users/foobar/.macports/macports.conf file</p>
</blockquote>
<p><strong>P.S.2.</strong> </p>
<p>changed all the <code>/opt/local</code>s to <code>~/macports</code>s in </p>
<p><code>/Users/foobar/macports/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/_ci/bootstrap.sh</code> </p>
<p>and </p>
<p><code>/Users/foobar/macports/etc/macports/macports.conf</code></p>
<p>nothing changed!</p>
<p><strong>P.S.3.</strong></p>
<p>I see some of the guys here try to guid me towards removing/uninstalling MacPorts or HomeBrew. That's not what I'm asking for. I am able to revert all I did and make the MacPorts work again (in fact I just did that). My question is why HomeBrew Is saying that? what I happens If I don't do what it is asking for? What if I want the MacPorts too? and most importantly how make the MacPorts keep working after moving?</p>
| 0non-cybersec
| Stackexchange | 922 | 2,608 |
Using a struct in a header file "unknown type" error. <p>I am using Kdevelop in Kubuntu.
I have declared a structure in my datasetup.h file:</p>
<pre><code>#ifndef A_H
#define A_H
struct georeg_val {
int p;
double h;
double hfov;
double vfov;
};
#endif
</code></pre>
<p>Now when I use it in my main.c file</p>
<pre><code>int main()
{
georeg_val gval;
read_data(gval); //this is in a .cpp file
}
</code></pre>
<p>I get the following error:</p>
<blockquote>
<p>georeg_chain.c:7:3: error: unknown type name 'georeg_val'</p>
</blockquote>
<p>(This is in the <code>georeg_val gval;</code> line)</p>
<p>I would appreciate if anyone could help me resolve this error.</p>
| 0non-cybersec
| Stackexchange | 279 | 712 |
Mac OS X Network Issue. <p>I have a OS X Server application that is running on one of my servers. </p>
<p>It has Chat enabled and it works just fine, but it disconnects me and other clients often. </p>
<p>I assume that the issue comes from the network, but I can't be sure until I test it. </p>
<p>Any ideas for an application that give me a report of network crashes?</p>
<p>Beside that I am willing for any advices. </p>
<p>Thank you in advance! </p>
| 0non-cybersec
| Stackexchange | 143 | 458 |
Missing field in Apollo GraphQL Query. <p>I'm using react with Apollo and a F# backend. </p>
<p>When i make a query i get an error similar to this but i'm not sure why as it seems like stories is present in the response. </p>
<pre><code>Missing field stories in "{\"stories\":[{\"name\":\"Story1\",\"__typename\":\"Story\"},{\"name\":\"Story2\",\"__typename\":\
</code></pre>
<p>My code for making the query is: </p>
<pre class="lang-js prettyprint-override"><code>const client = new ApolloClient({
uri: '/graphql',
});
client
.query({
query: gql`
query testStoryQuery
{
stories
{
name
}
}
`
})
.then(result => console.log(result));
</code></pre>
<p>Finally the raw response returned by the server is:</p>
<pre><code>
{"data":"{\"stories\":[{\"name\":\"Story1\",\"__typename\":\"Story\"},{\"name\":\"Story2\",\"__typename\":\"Story\"},{\"name\":\"Story3\",\"__typename\":\"Story\"}]}"}
</code></pre>
<p>The only thing I've tried so far is jsonifying the response (i.e. the ") around fields, but it doesn't seem to find the field either way. </p>
<p>Update (extra info) </p>
<p>The full stack trace </p>
<p><a href="https://i.stack.imgur.com/cyAJh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cyAJh.png" alt="Stack trace of the browser error"></a></p>
<p>Any help would be appreciated, i'll continue working on it in the meantime. </p>
<p>Thank you :)</p>
| 0non-cybersec
| Stackexchange | 494 | 1,476 |
I need a resource for self-studying c*algebras.. <p>I have just started my phd program this semester, I have not worked before on $C^*-$algebras, my master was on Geometry. In my university only reading courses are offered. I have to learn $C^*-$algebras. I have not taken any courses on functional analysis too. I am studying the book " $C^*-$algebras and their automorphism groups" by Pedersen, I usually google each topic and take a look at Book by Murphy too. But I could not find a good resource that give me a good prospective, for example how should I use Gelfand representation in problems. I mean I am learning topics, but I cannot learn with deep depth that I can use stuff like tools in my work. And Also I undestood that Functional analysis is a priority for $C^*-$algebras, but I cannot find a good book for understanding deeply materials like weak and weak$^*$ topology. When I read theorems I understand them, but I could not understand these topics as well as I give ideas for solving theorems on my own, and I cannot enjoy studying. I would appreciate if you recommend me some good books for self studying both Functional analysis and $C^*-$algebras.</p>
| 0non-cybersec
| Stackexchange | 264 | 1,172 |
Prove the set [a, b] is perfect. <p>How can I prove (by definition) that, if <span class="math-container">$a, b \in \mathbb{R}$</span> and <span class="math-container">$a<b$</span>, then <span class="math-container">$[a, b]$</span> is equal to the set of accumulation (limit) points?</p>
<p>Let <span class="math-container">$(E, d)$</span> a metric space and <span class="math-container">$S \subseteq E$</span>.
<span class="math-container">$x \in E$</span> is a limit point if <span class="math-container">$(B_\varepsilon(x)-\lbrace x \rbrace ) \cap S \neq \emptyset$</span> for all <span class="math-container">$\varepsilon >0$</span></p>
| 0non-cybersec
| Stackexchange | 223 | 649 |
Win RT - universal app with barcode scanner. <p>I am developing a universal app for both Windows 8.1 and Windows Phone 8.1 which I want to be able to scan barcodes. For Windows 8.1, there exists a native class BarcodeScanner which is unfortunately inaccessible for Windows Phone 8.1 (I really don't understand what led Microsoft to do it this way). I found a 3rd party solution called zxing, but <a href="https://stackoverflow.com/questions/23472248/how-to-adjust-zxing-on-windows-phone-store-app-8-1-camera-mediacapture-preview">here</a> I have read that it works terribly for universal apps. What is the best way to implement barcode scanning functionality in universal apps?</p>
<p>Thank you!</p>
| 0non-cybersec
| Stackexchange | 194 | 701 |
X.Org vs. XQuartz - MacPorts. <p>After installing MacPorts and some software through that way, I noticed that MacPorts installed X.Org.
I've already installed XQuartz years ago and I'm really fine with it.</p>
<p>My 1. question is:
Do I need the installed X.Org from MacPorts to run software like KeepNote or Gedit, which was installed automatically by MacPorts, or <strong>am I free to uninstall X.Org</strong> and leave XQuartz instead?</p>
<p>My 2. question is: What about the other way round? Keeping the automatically installed X.Org and remove XQuartz?</p>
<p>edit: changed the question and added a second one.</p>
| 0non-cybersec
| Stackexchange | 187 | 624 |
How to join group in Telegram group based on an invite code. <p>Someone provide this: tg://join?invite=EaEnSUPktgfoI-xxxxxxxx</p>
<ol>
<li>How do I join that group in web based version of Telegram? </li>
<li>I tried that link in my Chrome browser but it just did a Google search. </li>
</ol>
<p>These are the menu options in the web-based Telegram. </p>
<p><a href="https://i.stack.imgur.com/TOrCG.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TOrCG.jpg" alt="enter image description here"></a></p>
| 0non-cybersec
| Stackexchange | 184 | 523 |
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 | 349 | 1,234 |
Sphinx Autodoc vs. Coverage: Am I missing something here?. <p>I'm trying to use Sphinx to document a Python package which contains various sub-packages and sub-modules. I followed the stock Sphinx quickstart script which produced various files with <code>autodoc</code> directives that, in turn, with the <code>html</code> generator, produced a mostly-as-expected first-pass of the docs based on existing docstrings in the code. Cool.</p>
<p>Now enter <code>sphinx.ext.coverage</code>. With the project existing as it does after the "quickstart" script, running <code>sphinx-build -b coverage <other args></code> doesn't produce any meaningful output at all, just:</p>
<pre><code>Undocumented Python objects
===========================
</code></pre>
<p>...with nothing at all below it. I deliberately remove some docstrings to make sure, and sure enough, no warnings.</p>
<p>I thrashed around for a while and eventually tried using the non-<code>autodoc</code> directives, and lo and behold, <code>coverage</code> suddenly appears to work. Sadly, the <code>autodoc</code> functionality is a large part of what makes Sphinx appealing in the first place. But OK, putting in a <code>.. py:module::</code> directive for each of the modules helps; it appears to make the <code>coverage</code> extension aware of my modules, and from there I start to get entries in my <code>python.txt</code> about members within those modules that don't have docstrings. That's great, but it appears to mean that for <code>coverage</code> to report on a module, that module has to be explicitly, manually declared in the doc files, which kinda reduces the value of a <code>coverage</code> tool (i.e. if I add a new module to the package, it appears it won't be included in the coverage report until I specifically add a directive for it.) So, what I'm seeing is that <code>autodoc</code> seems capable of automatically traversing sub-modules/packages, but <code>coverage</code> does not. </p>
<p><strong>Question</strong>: Am I missing something? The inability to automatically discover new code appearing in a project seems like a pretty <strong>glaring fault</strong> for a "coverage" tool. It seems to me like a standard coverage tool ought to be opt-out, not opt-in.</p>
<p>As I pushed further, I found even yet more evidence that <code>coverage</code> and <code>autodoc</code> aren't friends. For instance, even when declaring modules manually with <code>.. py:module::</code> directives (as described above), I find that <code>coverage</code> is not picking up on things like <code>autodoc</code>'s <code>exclude-members</code> directive. This directive, as expected, elides matching members from the generated output when building HTML, but <code>coverage</code> still reports those members as undocumented in its coverage report. From my reading </p>
<p><strong>Question</strong>: Is this incompatibility between <code>coverage</code> and <code>autodoc</code> noted somewhere in the docs that I've not been able to find? Or, again, am I missing something?</p>
| 0non-cybersec
| Stackexchange | 804 | 3,060 |
Mechanical Keyboard (Aukey KM-G9) doesn't work after suspend. Ubuntu Gnome 17.04. <p>When I put on sleep my desktop computer, when I resume my keyboard (Aukey KM-G9) doesn't work. If I unplug and than plug it again, then it works.
I'm currently using Ubuntu Gnome 17.04 but I've got the same problem with 16.04. </p>
<p>Edit: I've tried my old keyboard and It does work after suspend. I don't know why with my new I've got this strange issue. The new one is a mechanical keyboard. </p>
<hr>
<p>Here's the <code>lsusb</code> output:</p>
<pre><code>Bus 002 Device 003: ID 046d:c246 Logitech, Inc. Gaming Mouse G300
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 002: ID 04d9:a0cd Holtek Semiconductor, Inc.
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 04e8:6124 Samsung Electronics Co., Ltd D3 Station External Hard Drive
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
</code></pre>
<hr>
<p>Here's <code>dmesg</code></p>
<pre><code>[ 504.725733] PM: Restoring platform NVS memory
[ 504.726015] Suspended for 3.327 seconds
[ 504.726588] Enabling non-boot CPUs ...
[ 504.737759] x86: Booting SMP configuration:
[ 504.737760] smpboot: Booting Node 0 Processor 1 APIC 0x2
[ 504.740110] cache: parent cpu1 should not be sleeping
[ 504.740186] microcode: sig=0x306a9, pf=0x2, revision=0x15
[ 504.740448] microcode: updated to revision 0x1c, date = 2015-02-26
[ 504.740515] CPU1 is up
[ 504.749709] smpboot: Booting Node 0 Processor 2 APIC 0x4
[ 504.752082] cache: parent cpu2 should not be sleeping
[ 504.752502] CPU2 is up
[ 504.765719] smpboot: Booting Node 0 Processor 3 APIC 0x6
[ 504.768096] cache: parent cpu3 should not be sleeping
[ 504.768917] CPU3 is up
[ 504.771282] ACPI: Waking up from system sleep state S3
[ 504.790007] ehci-pci 0000:00:1a.0: System wakeup disabled by ACPI
[ 504.790055] pcieport 0000:00:1c.7: System wakeup disabled by ACPI
[ 504.790097] ehci-pci 0000:00:1d.0: System wakeup disabled by ACPI
[ 504.790130] xhci_hcd 0000:00:14.0: System wakeup disabled by ACPI
[ 504.790158] PM: noirq resume of devices complete after 18.442 msecs
[ 504.790438] PM: early resume of devices complete after 0.248 msecs
[ 504.790626] pcieport 0000:00:1c.4: System wakeup disabled by ACPI
[ 504.790677] usb usb5: root hub lost power or was reset
[ 504.790678] usb usb6: root hub lost power or was reset
[ 504.792657] tg3 0000:03:00.0 enp3s0: Link is down
[ 504.853346] rtc_cmos 00:02: System wakeup disabled by ACPI
[ 504.853865] serial 00:06: activated
[ 504.855289] sd 2:0:0:0: [sda] Starting disk
[ 504.855304] sd 3:0:0:0: [sdb] Starting disk
[ 505.167929] ata7: SATA link down (SStatus 0 SControl 300)
[ 505.168077] ata8: SATA link down (SStatus 0 SControl 300)
[ 505.227852] ata5: SATA link down (SStatus 0 SControl 300)
[ 505.227868] ata6: SATA link down (SStatus 0 SControl 300)
[ 505.227885] ata1: SATA link down (SStatus 0 SControl 300)
[ 505.227904] ata2: SATA link down (SStatus 0 SControl 300)
[ 505.227920] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 505.228478] ata3.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[ 505.228480] ata3.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[ 505.228482] ata3.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[ 505.228708] ata3.00: supports DRM functions and may not be fully accessible
[ 505.236331] ata3.00: disabling queued TRIM support
[ 505.240993] ata3.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[ 505.240995] ata3.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[ 505.240996] ata3.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[ 505.241220] ata3.00: supports DRM functions and may not be fully accessible
[ 505.248841] ata3.00: disabling queued TRIM support
[ 505.249738] usb 5-1: reset full-speed USB device number 2 using xhci_hcd
[ 505.253066] ata3.00: configured for UDMA/133
[ 505.253141] ata3.00: Enabling discard_zeroes_data
[ 506.845522] ata4: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[ 506.856069] ata4.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[ 506.856071] ata4.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[ 506.856073] ata4.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[ 506.915860] ata4.00: ACPI cmd ef/10:06:00:00:00:00 (SET FEATURES) succeeded
[ 506.915863] ata4.00: ACPI cmd f5/00:00:00:00:00:00 (SECURITY FREEZE LOCK) filtered out
[ 506.915865] ata4.00: ACPI cmd b1/c1:00:00:00:00:00 (DEVICE CONFIGURATION OVERLAY) filtered out
[ 506.952740] ata4.00: configured for UDMA/133
[ 507.807435] tg3 0000:03:00.0 enp3s0: Link is up at 1000 Mbps, full duplex
[ 507.807436] tg3 0000:03:00.0 enp3s0: Flow control is on for TX and on for RX
[ 507.807438] tg3 0000:03:00.0 enp3s0: EEE is enabled
[ 526.032945] usbhid 5-1:1.2: reset_resume error -110
[ 526.033090] PM: resume of devices complete after 21243.710 msecs
[ 526.033301] PM: Finishing wakeup.
[ 526.033302] Restarting tasks ...
[ 526.033467] pci_bus 0000:05: Allocating resources
[ 526.033487] pci 0000:04:00.0: bridge window [io 0x1000-0x0fff] to [bus 05] add_size 1000
[ 526.033490] pci 0000:04:00.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 05] add_size 200000 add_align 100000
[ 526.033493] pci 0000:04:00.0: bridge window [mem 0x00100000-0x000fffff] to [bus 05] add_size 200000 add_align 100000
[ 526.033497] pci 0000:04:00.0: res[14]=[mem 0x00100000-0x000fffff] res_to_dev_res add_size 200000 min_align 100000
[ 526.033499] pci 0000:04:00.0: res[14]=[mem 0x00100000-0x002fffff] res_to_dev_res add_size 200000 min_align 100000
[ 526.033501] pci 0000:04:00.0: res[15]=[mem 0x00100000-0x000fffff 64bit pref] res_to_dev_res add_size 200000 min_align 100000
[ 526.033503] pci 0000:04:00.0: res[15]=[mem 0x00100000-0x002fffff 64bit pref] res_to_dev_res add_size 200000 min_align 100000
[ 526.033505] pci 0000:04:00.0: res[13]=[io 0x1000-0x0fff] res_to_dev_res add_size 1000 min_align 1000
[ 526.033507] pci 0000:04:00.0: res[13]=[io 0x1000-0x1fff] res_to_dev_res add_size 1000 min_align 1000
[ 526.033510] pci 0000:04:00.0: BAR 14: no space for [mem size 0x00200000]
[ 526.033511] pci 0000:04:00.0: BAR 14: failed to assign [mem size 0x00200000]
[ 526.033514] pci 0000:04:00.0: BAR 15: no space for [mem size 0x00200000 64bit pref]
[ 526.033515] pci 0000:04:00.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
[ 526.033517] pci 0000:04:00.0: BAR 13: no space for [io size 0x1000]
[ 526.033518] pci 0000:04:00.0: BAR 13: failed to assign [io size 0x1000]
[ 526.033521] pci 0000:04:00.0: BAR 14: no space for [mem size 0x00200000]
[ 526.033523] pci 0000:04:00.0: BAR 14: failed to assign [mem size 0x00200000]
[ 526.033525] pci 0000:04:00.0: BAR 15: no space for [mem size 0x00200000 64bit pref]
[ 526.033526] pci 0000:04:00.0: BAR 15: failed to assign [mem size 0x00200000 64bit pref]
[ 526.033529] pci 0000:04:00.0: BAR 13: no space for [io size 0x1000]
[ 526.033530] pci 0000:04:00.0: BAR 13: failed to assign [io size 0x1000]
[ 526.033533] pci 0000:04:00.0: PCI bridge to [bus 05]
[ 526.046611] done.
[ 526.046622] video LNXVIDEO:00: Restoring backlight state
[ 526.203481] IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
[ 526.358290] IPv6: ADDRCONF(NETDEV_UP): enp3s0: link is not ready
[ 529.389918] tg3 0000:03:00.0 enp3s0: Link is up at 1000 Mbps, full duplex
[ 529.389940] tg3 0000:03:00.0 enp3s0: Flow control is on for TX and on for RX
[ 529.389942] tg3 0000:03:00.0 enp3s0: EEE is enabled
[ 529.389961] IPv6: ADDRCONF(NETDEV_CHANGE): enp3s0: link becomes ready
[ 538.107665] usb 5-1: USB disconnect, device number 2
[ 538.109247] hid-generic 0003:04D9:A0CD.0002: usb_submit_urb(ctrl) failed: -19
[ 539.151869] usb 5-1: new full-speed USB device number 3 using xhci_hcd
[ 539.366001] usb 5-1: New USB device found, idVendor=04d9, idProduct=a0cd
[ 539.366003] usb 5-1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 539.366005] usb 5-1: Product: USB Keyboard
[ 539.371653] input: USB Keyboard as /devices/pci0000:00/0000:00:1c.7/0000:06:00.0/usb5/5-1/5-1:1.0/0003:04D9:A0CD.0006/input/input16
[ 539.428241] hid-generic 0003:04D9:A0CD.0006: input,hidraw0: USB HID v1.11 Keyboard [USB Keyboard] on usb-0000:06:00.0-1/input0
[ 549.583676] hid-generic 0003:04D9:A0CD.0007: usb_submit_urb(ctrl) failed: -1
[ 549.583704] hid-generic 0003:04D9:A0CD.0007: timeout initializing reports
[ 549.583903] input: USB Keyboard as /devices/pci0000:00/0000:00:1c.7/0000:06:00.0/usb5/5-1/5-1:1.1/0003:04D9:A0CD.0007/input/input17
[ 549.643667] hid-generic 0003:04D9:A0CD.0007: input,hiddev0,hidraw3: USB HID v1.11 Keyboard [USB Keyboard] on usb-0000:06:00.0-1/input1
[ 549.646826] hid-generic 0003:04D9:A0CD.0008: hiddev0,hidraw4: USB HID v1.11 Device [USB Keyboard] on usb-0000:06:00.0-1/input2
</code></pre>
| 0non-cybersec
| Stackexchange | 3,873 | 9,366 |
ASP.NET - Redis Session State Provider - Session_End. <p>I'm using <a href="https://www.nuget.org/packages/Microsoft.Web.RedisSessionStateProvider/">RedisSessionStateProvider</a> within ASP.NET MVC application.</p>
<p>Everything works fine except that <code>Session_End</code> event never gets called.</p>
<pre><code>protected void Session_End(object sender, EventArgs e)
{
// Do stuff whenever a session ends
}
</code></pre>
<p>Here's my web.config:</p>
<pre><code><sessionState mode="Custom" customProvider="RedisSessionProvider" timeout="1">
<providers>
<add name="RedisSessionProvider" type="Microsoft.Web.Redis.RedisSessionStateProvider" host="localhost:6379"
accessKey="" ssl="false"/>
</providers>
</sessionState>
</code></pre>
<p>Versions:</p>
<ul>
<li>Windows 10 Pro</li>
<li>ASP.NET MVC 5.2.2</li>
<li>Redis 2.8.2104 64-bit</li>
<li>Microsoft.Web.RedisSessionStateProvider 1.6.5</li>
</ul>
<p><strong>What's the proper way to implement custom logic whenever a session ends using RedisSessionStateProvider?</strong></p>
| 0non-cybersec
| Stackexchange | 373 | 1,083 |
How can i use Raspberry PI to count how many times a switch is triggers on machines in a day?. What i need is a set of counting devices that count how many time the machines close/open in a day the machines already have a Switches on them, I've thought about the Raspberry PI to connect to this switch and then count how many times this switch is triggered, and then some way off viewing all the machines numbers in my office so i can see how the machines are running and whats not, and if possible views tables of how the machines have been running weekly/monthly to see what going on, on the factory floor i have about 32 machines on the factory floor. | 0non-cybersec
| Reddit | 142 | 654 |
How to have overlapping under-braces and over-braces. <p>I am trying to typeset an equation that has overlapping over and under braces as per the image below:</p>
<p><img src="https://i.stack.imgur.com/DGtin.png" alt="enter image description here"></p>
<p>I have managed to typeset it using a sort of a hack, by typing the equation twice, once using <code>\phantom</code> commands and then raising it. Is there an easier way, perhaps a macro? MWE for the image above is shown below.</p>
<pre><code>\documentclass[12pt]{article}
\usepackage{amsmath}
\begin{document}
\[a+b+\overbrace{c+d+e+f+g}^{x}+h+i+k+l=e^2\]
\vspace{-35pt}
\[\phantom{+b+c+d+}\underbrace{\phantom{e+f+g+h+i}}_{y}\phantom{+k+=e^2}\]
\end{document}
</code></pre>
| 0non-cybersec
| Stackexchange | 256 | 734 |
Is there a pattern for subscribing to hierarchical property changes with Reactive UI?. <p>Suppose I have the following view models:</p>
<pre><code>public class AddressViewModel : ReactiveObject
{
private string line;
public string Line
{
get { return this.line; }
set { this.RaiseAndSetIfChanged(x => x.Line, ref this.line, value); }
}
}
public class EmployeeViewModel : ReactiveObject
{
private AddressViewModel address;
public AddressViewModel Address
{
get { return this.address; }
set { this.RaiseAndSetIfChanged(x => x.Address, ref this.address, value); }
}
}
</code></pre>
<p>Now suppose that in <code>EmployeeViewModel</code> I want to expose a property with the latest value of <code>Address.Line</code>:</p>
<pre><code>public EmployeeViewModel()
{
this.changes = this.ObservableForProperty(x => x.Address)
.Select(x => x.Value.Line)
.ToProperty(this, x => x.Changes);
}
private readonly ObservableAsPropertyHelper<string> changes;
public string Changes
{
get { return this.changes.Value; }
}
</code></pre>
<p>This will only tick when a change to the <code>Address</code> property is made, but not when a change to <code>Line</code> within <code>Address</code> occurs. If I instead do this:</p>
<pre><code>public EmployeeViewModel()
{
this.changes = this.Address.Changed
.Where(x => x.PropertyName == "Line")
.Select(x => this.Address.Line) // x.Value is null here, for some reason, so I use this.Address.Line instead
.ToProperty(this, x => x.Changes);
}
</code></pre>
<p>This will only tick when a change to <code>Line</code> within the current <code>AddressViewModel</code> occurs, but doesn't take into account setting a new <code>AddressViewModel</code> altogether (nor does it accommodate a <code>null</code> <code>Address</code>).</p>
<p>I'm trying to get my head around the correct approach to solving this problem. I'm new to RxUI so I could be missing something obvious. I <em>could</em> manually hook into address changes and set up a secondary subscription, but this seems ugly and error-prone.</p>
<p><strong>Is there a standard pattern or helper I should be using to achieve this?</strong></p>
<p>Here is some code that can be copy/pasted to try this out:</p>
<p><em>ViewModels.cs</em>:</p>
<pre><code>namespace RxUITest
{
using System;
using System.Reactive.Linq;
using System.Threading;
using System.Windows.Input;
using ReactiveUI;
using ReactiveUI.Xaml;
public class AddressViewModel : ReactiveObject
{
private string line1;
public string Line1
{
get { return this.line1; }
set { this.RaiseAndSetIfChanged(x => x.Line1, ref this.line1, value); }
}
}
public class EmployeeViewModel : ReactiveObject
{
private readonly ReactiveCommand changeAddressCommand;
private readonly ReactiveCommand changeAddressLineCommand;
private readonly ObservableAsPropertyHelper<string> changes;
private AddressViewModel address;
private int changeCount;
public EmployeeViewModel()
{
this.changeAddressCommand = new ReactiveCommand();
this.changeAddressLineCommand = new ReactiveCommand();
this.changeAddressCommand.Subscribe(x => this.Address = new AddressViewModel() { Line1 = "Line " + Interlocked.Increment(ref this.changeCount) });
this.changeAddressLineCommand.Subscribe(x => this.Address.Line1 = "Line " + Interlocked.Increment(ref this.changeCount));
this.Address = new AddressViewModel() { Line1 = "Default" };
// Address-only changes
this.changes = this.ObservableForProperty(x => x.Address)
.Select(x => x.Value.Line1 + " CHANGE")
.ToProperty(this, x => x.Changes);
// Address.Line1-only changes
//this.changes = this.Address.Changed
// .Where(x => x.PropertyName == "Line1")
// .Select(x => this.Address.Line1 + " CHANGE") // x.Value is null here, for some reason, so I use this.Address.Line1 instead
// .ToProperty(this, x => x.Changes);
}
public ICommand ChangeAddressCommand
{
get { return this.changeAddressCommand; }
}
public ICommand ChangeAddressLineCommand
{
get { return this.changeAddressLineCommand; }
}
public AddressViewModel Address
{
get { return this.address; }
set { this.RaiseAndSetIfChanged(x => x.Address, ref this.address, value); }
}
public string Changes
{
get { return this.changes.Value; }
}
}
}
</code></pre>
<p><em>MainWindow.cs</em>:</p>
<pre><code>using System.Windows;
namespace RxUITest
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
this.DataContext = new EmployeeViewModel();
}
}
}
</code></pre>
<p><em>MainWindow.xaml</em>:</p>
<pre><code><Window x:Class="RxUITest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<StackPanel>
<TextBlock Text="{Binding Changes}"/>
<Button Command="{Binding ChangeAddressCommand}">Change Address</Button>
<Button Command="{Binding ChangeAddressLineCommand}">Change Address.Line1</Button>
</StackPanel>
</Window>
</code></pre>
| 0non-cybersec
| Stackexchange | 1,652 | 5,789 |
An analysis problem about convergence. <p>Suppose that $f$ is a continuous function from $[a,b]$ to $[a,b]$. Let $x_0\in [a,b]$, and define by induction that $x_{n+1}=f(x_n)$. Show that $$\lim_{n \rightarrow \infty} (x_{n+1}-x_n)=0$$ implies $$\lim_{n \rightarrow \infty}x_n$$ exists.
(This problem is from a analysis book, and the author tells us the answer can be found in American Mathematical Monthly, volume 83(1976), page 273, which I have no access to, so you can either offer the reference or give the sketch of the proof. Thanks!)</p>
| 0non-cybersec
| Stackexchange | 164 | 544 |
Travel Photography/VLOG: 18-135 stm & 50mm f1.8 vs Sigma 18-35 f1.8. Dear reddit,
I'm travelling soon and would like to add some lenses to my collection before travelling.
I have an 80D with me, as well as a 10-18mm wide angle lens.
However, this is not enough and i'm currently considering the lenses i mentioned in the title, namely:
18-135mm stm kit lens
50mm f1.8
vs
Sigma 18-35mm f1.8
Do you think the 18-135 & 50mm is a good combo along with my wide angle lens?
Or
Should I get the Sigma instead?
I'll be taking photos of my gf, taking vlogs, photos of scenery as well as timelapses.
Or do you have any recommendations?
Any help is greatly appreciated!
ps: budget is around £500
**EDIT: Thanks for all the replies, however, im at work now. I'll read them later when i get home! :)**
| 0non-cybersec
| Reddit | 246 | 812 |
Algorithm for fast tag search. <p>The problem is the following.</p>
<ul>
<li>There's a set of simple entities E, each one having a set of tags T attached.
Each entity might have an arbitrary number of tags.
Total number of entities is near 100 million, and the total number of tags is about 5000.</li>
</ul>
<p>So the initial data is something like this:</p>
<pre><code>E1 - T1, T2, T3, ... Tn
E2 - T1, T5, T100, ... Tk
..
Ez - T10, T12, ... Tl
</code></pre>
<p>This initial data is quite rarely updated.</p>
<ul>
<li><p>Somehow my app generates a logical expression on tags like this:</p>
<p>T1&T2&T3 | (T5&!T6)</p></li>
<li><p>What I need to is to calculate a number of entities matching given expression (note - not the entities, but just the number). This one might be not totally accurate, of course. </p></li>
</ul>
<p>What I've got now is a simple in-memory table lookup, giving me a 5-10 seconds execution time on a single thread. </p>
<p>I'm curious, is there any efficient way to handle this stuff? What approach would you recommend? Is there some common algorithms or data structures for this?</p>
<p><strong>Update</strong></p>
<p>A bit of clarification as requested.</p>
<ol>
<li><code>T</code> objects are actually relatively short constant strings. But it doesn't actually matter - we can always assign some IDs and operate on integers.</li>
<li>We definitely can sort them.</li>
</ol>
| 0non-cybersec
| Stackexchange | 447 | 1,425 |
Why is there an "age limit" on trick or treating?. I was listening to the radio this morning and lots of communities won't hand out candy to teenagers.
I feel like anyone, regardless of age should be able to trick or treat as long as they wear a costume. You are enganging with your community, neighbors, and people you normally wouldn't talk to. You have a fun time with friends dressing up, and if there wasn't a stigma that teenagers shouldn't trick or treat then they would be more likely to stay out of trouble.
I remember being 16-18 and dressing up with my friends and we all wanted to go trick or treat but felt emberrassed. We ended up driving around at night, running through yards, playing pranks, and smoking.
I recently started trick or treating with my brother and my niece, and we all dress up for her. It's really fun walking around and just exchanging a few words with neighbors, and checking out their costumes and decorations. | 0non-cybersec
| Reddit | 210 | 949 |
What does "the choice of open in the right" in Durrett's book mean?. <p>I am reading Rick Durrett's Probability: Theory and Examples 5th Ed.<br>
In <a href="https://services.math.duke.edu/~rtd/PTE/PTE5_011119.pdf" rel="nofollow noreferrer">page 3 of the book</a>, Durrett says that the choice of “closed on the right” in <span class="math-container">$(a, b]$</span> is dictated by the fact that if <span class="math-container">$b_n \downarrow b$</span> then
we have
<span class="math-container">$$\bigcap_n (a, b_n] = (a, b].$$</span>
And he says that the next definition will explain the choice of “open on the left.” The next definition is a definition of semialgebra (when I interpreted literary "next").</p>
<p>I have two questions;<br>
1) what he did want to say "the choice of closed on the right"? Did he just want to say that you can write <span class="math-container">$(a, b]$</span> as an intersection of a half-open intervals?<br>
2) Why "the next definition" gives the definition(meaning) of the choice open on the left?</p>
<p>A picture of the book in question:
<a href="https://i.stack.imgur.com/HDo2j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/HDo2j.png" alt="enter image description here"></a></p>
| 0non-cybersec
| Stackexchange | 402 | 1,254 |
Seeing only local variables debugging C++ in VSCode. <p>I am using Visual Studio Code and when I debug (I am debugging C++ code compiled with Clang) I see only local variables.
I do not see any global variables list.</p>
<p>How can I see all variables?</p>
<p><a href="https://i.stack.imgur.com/MU22r.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MU22r.png" alt="enter image description here"></a></p>
<p>In this case I am inside a loop and I see only all the variables defined inside the loop, not the one defined outside.</p>
| 0non-cybersec
| Stackexchange | 167 | 543 |
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 | 349 | 1,234 |
Horror Movie Tournament - need more votes!. Hey fellow horror fans! A bunch of people from work and I are doing a horror movie tournament, and we need your help! Down below is a link to a google form where you can vote between your favorite horror movies. We’re doing this tournament to see if we can predict what the majority think the best horror movie is! The form doesn’t show the seeding, but I composed the brackets based on the time period and the seeding based on Letterboxd and Rotten Tomatoes scores. If you all have time, I would greatly appreciate it! And if it’s okay, I’ll post the rest of the rounds here too! Thank you all and have a fantastic day!
EDIT: All movies listed are the original first films! No sequels, remakes, or reboots! Thank you to u/diceman89 for bringing this up (except for The Fly)
https://docs.google.com/forms/d/1cHhajJmyZ-Wp_rI93YwgxDY1CoZcf8cWrhE29GP-92w/edit
VOTING IS CLOSED FOR ROUND 1
Thank you to everyone who voted! We got a whopping 468 votes! I cannot believe the turn out this got. You all are wonderful people and this is such a great community. I’ll have the results and next poll by this weekend (hopefully by today, Saturday, if I can). | 0non-cybersec
| Reddit | 321 | 1,193 |
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 | 349 | 1,234 |
df and lvdisplay huge difference. <p>I have a partition /dev/mapper/datavg-lv_data.</p>
<p>df -h results shows</p>
<p><a href="https://i.stack.imgur.com/WxvHv.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WxvHv.jpg" alt="enter image description here"></a></p>
<p>while lvdisplay shows</p>
<p><a href="https://i.stack.imgur.com/0jl09.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0jl09.jpg" alt="enter image description here"></a></p>
<p>why is there a huge difference between lv size, filesystem size and available size while there is no data on mount point? where does the space go?</p>
| 0non-cybersec
| Stackexchange | 230 | 635 |
Different background images in Conemu tabs. <p>Is it possible to assign different background images to tabs in Conemu?</p>
<p>Console2 supports custom backgrounds per tab, and I'd like something similar to the functionality it provides.</p>
<p>Perhaps I can set this in <em>Startup -> Tasks</em> or via the command line of a running tab, but I can't find any information on it.</p>
<p>e.g.</p>
<pre><code>Tab1 cmd "cmd.png"
Tab2 powershell "ps.png"
Tab3 Visual Studio Command Prompt "vs.png"
Tab4 Admin:cmd "warning.png"
</code></pre>
| 0non-cybersec
| Stackexchange | 168 | 539 |
Path-connected and locally connected space that is not locally path-connected. <p>I'm trying to classify the various topological concepts about connectedness. According to 3 assertions ((Locally) path-connectedness implies (locally) connectedness. Connectedness together with locally path-connectedness implies path-connectedness.), we can draw this diagram:</p>
<pre><code>+--------------------------+
|Connected |
| 1 +-----+----------------------------+
| | 3 | Locally connected|
| +----------------+-----+ 6 |
| |Path-connected | 4 | |
| | +-----+------------------------+ |
| | 2 | 5 | Locally path-connected| |
+---+----------------+-----+ | |
8 | 7 | |
+------------------------------+---|
</code></pre>
<p>So, I want to find examples of all these 8 categories, but I can't find an example for 4.</p>
<ol>
<li><a href="http://en.wikipedia.org/wiki/Topologist%27s_sine_curve" rel="noreferrer">The topologist's sine curve</a></li>
<li><a href="http://en.wikipedia.org/wiki/Comb_space" rel="noreferrer">The comb space</a></li>
<li><a href="http://en.wikipedia.org/wiki/Lexicographic_order_topology_on_the_unit_square" rel="noreferrer">The ordered square</a></li>
<li>See below</li>
<li>The real line</li>
<li>The <a href="http://en.wikipedia.org/wiki/Disjoint_union_%28topology%29" rel="noreferrer">disjoint union</a> of two spaces of the 3rd type</li>
<li>$[0,1] \cup [2,3]$</li>
<li>The rationals</li>
</ol>
<p>Actually there is an <a href="https://math.stackexchange.com/questions/588677/does-locally-connected-and-path-connected-imply-locally-path-connected#answer-588698">answer</a> that gives an example of type 4, but there isn't any explanation. Can anyone please explain it (why it is not locally path-connected, to be specific) or give another example?</p>
| 0non-cybersec
| Stackexchange | 586 | 2,032 |
How can I track outbound links with Google Analytics?. <p>I currently have a WordPress website, where I would like to be able to create an Event which tracks when visitors click through to a 3rd party web page (outbound link).</p>
<p>At present, my website has 3 Google Analytics Tracking Codes. Each Tracking Code looks as follows:</p>
<pre><code><script async src="https://www.googletagmanager.com/gtag/js?id=UA-xxxxxxxx-x"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-xxxxxxxx-x');
setTimeout("gtag('event', 'adjusted bounce rate', {'event_label':'more than 30 sec'})",30000 );
</script>
</code></pre>
<p>As you can see, I already have an Event integrated as to track visitors who spend at least 30 seconds on the page. </p>
<p>I have read through this <a href="https://support.google.com/analytics/answer/1136920?hl=en" rel="nofollow noreferrer">Google Support</a> page, where I can see that I would need to paste in:</p>
<pre><code><script>
var trackOutboundLink = function(url) {
ga('send', 'event', 'outbound', 'click', url, {
'transport': 'beacon',
'hitCallback': function(){document.location = url;}
});
}
</script>
</code></pre>
<p>and ...</p>
<pre><code><a href="http://www.example.com" onclick="trackOutboundLink('http://www.example.com'); return false;">Check out example.com</a>
</code></pre>
<p>Now I know I would need to insert the above snippets into the <code>header.php</code> files but where I am uncertain, is:</p>
<ol>
<li>How could I integrate the above snippets so that they are 'assigned' to each of the 3 Google Analytics Tracking Accounts?</li>
<li>Have I understood that the <code>onclick</code> attribute is only for use with the links we want to track on the page and not part of the Analytics Snippet, within the <code>header.php</code> file?</li>
</ol>
| 0non-cybersec
| Stackexchange | 626 | 1,964 |
Is our use case suitable for a NoSQL Database solution?. <p>We are currently running a Python web app querying a SQL MariaDB (through SQLAlchemy). Unfortunately we have run into some hard limitations of MariaDB (number of joins are <a href="https://dev.mysql.com/doc/refman/5.7/en/joins-limits.html" rel="nofollow noreferrer">limited to 61</a>) and are looking for alternatives. Our database is not very large (generally under 2GB and growing slowly) and the entries could actually very well be broken down to simple json objects, which made us look at a NoSQL solution.</p>
<p>Initially this seemed like a great solution. Queries were super fast (as the DB fit into RAM) and we were happy (for a few days).</p>
<p><strong>I came here to seek advice if the NoSQL DB is a recommended solution for our needs, though.</strong> So let's talk about the data:</p>
<p>The nature of our data is that multiple group of entries / rows generally reference back to the same object, pretty much as if you had multiple versions that relate to a single object.</p>
<p>Assume a document entry could look like this:</p>
<pre><code>_id: 5a31...
description: Object
location: "XYZ"
name: "ABC"
status: "A"
m_nr: null
k_nr: null
city: "QWE"
high_value: 17
right_value: 71
more_data: Object
number: 101
interval: 1
next_date: "2016-01-16T00:00:00Z"
last_date: null
status: null
classification: Object
priority_value: "?"
redundancy_value: "?"
active_value: "0"
</code></pre>
<p>Imagine the <code>description.location</code> will often need to be grouped and sorted so that I can only display the <code>$last</code> entry for each of these grouped entries. A common query may look like this (in <code>MongoDB</code>):</p>
<pre><code>db.getCollection('a').aggregate(
[{ $sort:
{"description.location": 1}
},
{ $group:
{_id: "$description.location"}
}]
)
</code></pre>
<p>I have unfortunately found that this particular query takes very long, when the DB does not fit into memory - even <strong>with an index</strong> for <code>description.location</code> present in the MongoDB. (For some reason the <code>$group</code> aggregation operation never appears to be using the available index, while <code>$sort</code> actually does use it).</p>
<p>Either way, is this data / layout / query strategy something that resonates well with a NoSQL DB ?</p>
| 0non-cybersec
| Stackexchange | 700 | 2,432 |
How is the $H^{1/2}$ norm of function defined on a subset of the boundary?. <p>Let $\Omega\subset \Omega^d$, $d\in \{2,3\}$, be a bounded $d$-polyhedron with $n$ faces. Denote the faces of $\partial\Omega$ as $\{e_i\}_{i=1}^n$. Let $u\in H^{1/2}(\partial\Omega)$ Taking the definition of the $H^{1/2}$ norm as</p>
<p>$$\| v\|_{H^{1/2}(\partial\Omega)} = \inf_{p\in H^1(\Omega)} \|p\|_{H^1(\Omega)}, $$ where in the infinum we require $p\big|_{x\in \partial\Omega} = v$. </p>
<p>How does one extend this definition to $\|v\|_{H^{1/2}(e_i)}$? A seemingly natural way would be to define a new function that is the value of $v$ on $e_i$ and the value of zero everywhere else. And define the norm of $v$ on $e_i$ to be the norm of this new function over all of $\partial\Omega$. Unfortunately we have no guarantees that this new function is in $H^{1/2}(\partial\Omega)$. </p>
<p>So my question is, how do we define the $H^{1/2}(e_i)$ norm. I know that we can use the Fourier Transform definition of this norm but I am wondering if there is way analogous to the above.</p>
| 0non-cybersec
| Stackexchange | 362 | 1,082 |
How to add an import to the file with Babel. <p>Say you have a file with:</p>
<pre><code>AddReactImport();
</code></pre>
<p>And the plugin:</p>
<pre><code>export default function ({types: t }) {
return {
visitor: {
CallExpression(p) {
if (p.node.callee.name === "AddReactImport") {
// add import if it's not there
}
}
}
};
}
</code></pre>
<p>How do you add <code>import React from 'react';</code> at the top of the file/tree if it's not there already.</p>
<p>I think more important than the answer is how you find out how to do it. Please tell me because I'm having a hard time finding info sources on how to develop Babel plugins. My sources right now are: <a href="https://github.com/thejameskyle/babel-handbook/blob/master/translations/en/plugin-handbook.md" rel="noreferrer">Plugin Handbook</a>,<a href="https://github.com/babel/babel/tree/master/packages/babel-types" rel="noreferrer">Babel Types</a>, <a href="https://github.com/babel/babel/blob/master/doc/ast/spec.md" rel="noreferrer">AST Spec</a>, <a href="http://shuheikagawa.com/blog/2015/09/13/lets-create-a-babel-plugin/" rel="noreferrer">this blog post</a>, and the <a href="https://astexplorer.net/" rel="noreferrer">AST explorer</a>. It feels like using an English-German dictionary to try to speak German.</p>
| 0non-cybersec
| Stackexchange | 436 | 1,332 |
Is $\dfrac{1}{2}$ in the set of real numbers containing the digit 5?. <p>Let <span class="math-container">$F = \{x\in[0,1]: x \text{ does not contain the digit 5}\}$</span></p>
<p>At first it's obvious that <span class="math-container">$1/2=0.5\in F$</span>, but the problem arises when you write <span class="math-container">$1/2=0.499...\notin F$</span>, which leads to a contradiction.</p>
<p>How do you measure such a set <span class="math-container">$F$</span> with this ambiguity? (This can be done as seen in <a href="https://math.stackexchange.com/questions/2154298/measure-of-set-of-numbers-in-0-1-with-their-decimal-expansions-not-containin">this</a> question). Is it because the set of numbers that can be represented in such a non-unique way has measure <span class="math-container">$0$</span>?</p>
| 0non-cybersec
| Stackexchange | 271 | 813 |
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 | 349 | 1,234 |
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 | 349 | 1,234 |
Nightwatch.js without Java. <p>Is it possible to use <a href="http://nightwatchjs.org/" rel="noreferrer">Nightwatch.js</a> without installing Java? There are official Selenium JavaScript bindings (<a href="https://github.com/SeleniumHQ/selenium/wiki/WebDriverJs" rel="noreferrer">WebDriverJS</a>, <a href="https://www.npmjs.com/package/selenium-webdriver" rel="noreferrer">selenium-webdriver</a>). Is there a reason Java is required?</p>
| 0non-cybersec
| Stackexchange | 135 | 438 |
find closed form of integal $\int \frac{a e^{-i(a-2)x}}{2(a+2)(1+e^{2ix})}dx$, where $a\in R$. <p>$$\int \frac{a e^{-i(a-2)x}}{2(a+2)(1+e^{2ix})}dx \text{ and }a\in R$$ </p>
<p>Here is what I done:</p>
<p>$$\int \frac{a e^{-i(a-2)x}}{2(a+2)(1+e^{2ix})}dx = \int \frac{a e^{-i(a-2)x}}{2(a+2)} (1+e^{2ix})^{-1}dx = \int \frac{a e^{-i(a-2)x}}{2(a+2)} \sum_{k=0}^\infty (-1)^ke^{2ikx}dx \\= \int \frac{a }{2(a+2)} \sum_{k=0}^\infty (-1)^ke^{(2k-a+2)xi} dx= \frac{a }{2(a+2)} \sum_{k=0}^\infty \int(-1)^ke^{(2k-a+2)xi}dx \\= \frac{a }{2(a+2)} \sum_{k=0}^\infty\frac{1}{(2k-a+2)i} (-1)^ke^{(2k-a+2)xi}dx$$</p>
<p>Then I do not know how to process the summation. Any help I will sincerely appreciate.</p>
| 0non-cybersec
| Stackexchange | 371 | 702 |
How to compute the mean 2D slice of a 3D set of data in MPI. <p>I have a 3D set of data <code>v(i,j,k)</code>, and I want to compute the mean 2D slice <code>vmean(i,j)</code> summing up the <code>nz</code> slices of the <code>v(i,j,k)</code> set along its third dimension.
I wrote down this piece of FORTRAN90 code but it does not produce the correct results. Anyone can suggest me the solution?
Thanks in advance</p>
<pre><code>gbl_sum = 0.0
do j = mystarty,myendy
do i = mystartx,myendy
lcl_sum = sum(v(i,j,mystartz:myendz))
call MPI_REDUCE(lcl_sum, gbl_sum(i,j), &
1, real, mpi_sum, root,mpi_comm_world,err)
gbl_sum(i,j) = lcl_sum
enddo
enddo
call mpi_BCAST(gbl_sum,gbl_sumSize,real,root,&
mpi_comm_world,err)
do j = mystarty,myendy
do i = mystartx,myendy
vmean(i,j) = gbl_sum(i,j)/real(nz)
enddo
enddo
</code></pre>
| 0non-cybersec
| Stackexchange | 363 | 885 |
Family of large deviation principles. <p>The following question may be a bit imprecise in its formulation, I guess however the problem I have in mind is clear. Although to me it looks like a fairly standard question, I couldn't find any reference approaching it so far and hope someone here can help.<br/></p>
<p>Assume that for every $\epsilon>0$, $\lbrace X^{\epsilon}_{n}\rbrace_{n}$ satisfies a LDP with rate function $I^{\epsilon}$. Also, suppose that for every $n\in\mathbb{N}$ we have tightness for $\lbrace X_{n}^{\epsilon}\rbrace_{\epsilon}$ and let $\lbrace X_{n}\rbrace_{n}$ be a family of limit points. Does convergence of the $I^{\epsilon}$ to some rate function $I$ in a reasonable sense (say $\Gamma$ or Mosco), already imply a LDP for $\lbrace X_{n}\rbrace_{n}$ with rate function $I$? What more is needed?<br/>
Remark: I'm here particularly interested in Schilder-type LDPs.</p>
| 0non-cybersec
| Stackexchange | 241 | 900 |
SQL Server Backups in Parallel. <p>Currently I am using ola hallengren backup and maintenance scripts.</p>
<p>I have a question:</p>
<p>I have 5 big databases in one server. It's taking approximate 10+ hours everyday to complete full backups. Currently it's writing in sequentially into disk. </p>
<p>I want to write all backups parallel to reduce time. Is there any way I can write backups parallel?</p>
<p>I am taking compressed and verify only backups to network location </p>
| 0non-cybersec
| Stackexchange | 134 | 485 |
How to get the logical right binary shift in python. <p>As revealed by the title, in JavaScript there is a specific operator <code>>>></code>. For example, in JavaScript we will have the following result:</p>
<pre><code>(-1000) >>> 3 = 536870787
(-1000) >> 3 = -125
1000 >>> 3 = 125
1000 >> 3 = 125
</code></pre>
<p>So is there a certain method or operator representing this <code>>>></code>?</p>
| 0non-cybersec
| Stackexchange | 152 | 450 |
Trigger Jenkins job from Bitbucket Pull Request. <p>There are various ways to trigger a Jenkins job from an SCM like Bitbucket, but what I want to do specifically is trigger a build using the branch that is the source of the Pull Request.</p>
<p>Up to now, we have used the Bitbucket Pull Request Builder, but it is very flaky and unreliable, and not supported well.</p>
<p><a href="https://wiki.jenkins-ci.org/display/JENKINS/Bitbucket+pullrequest+builder+plugin" rel="nofollow noreferrer">https://wiki.jenkins-ci.org/display/JENKINS/Bitbucket+pullrequest+builder+plugin</a></p>
<p>Bitbucket do supply quite good features in terms of Webhooks, which when used with the Jenkins Git Plugin, do allow for triggering of builds based on various Bitbucket events (eg a Pull Request update).</p>
<p>There is also the Bitbucket Webhook plugin, but again that doesn't offer much in terms of dynamically choosing the branch you want to build.</p>
<p><a href="https://wiki.jenkins-ci.org/display/JENKINS/BitBucket+Plugin" rel="nofollow noreferrer">https://wiki.jenkins-ci.org/display/JENKINS/BitBucket+Plugin</a></p>
<p>However, what this seems to do is trigger a poll of the repo, where is then tries to build any branch that is different from the main branch.</p>
<p>Our use case is that we allow developers create their own branches, for which they then create Pull Requests to the development branch.</p>
<p>There doesn't seem to be any way to trigger a build that uses the developer created branch as the build branch (other than the aforementioned Bitbucket Pull Request Builder).</p>
<p>Am I right or wrong in this?</p>
| 0non-cybersec
| Stackexchange | 452 | 1,626 |
Convert integer of mixed radix to standard positional numeral system and vice versa. <p>I have multiple numbers (e.g. <code>[1, 4, 2]</code>) where each number can be one of a specified range of numbers (e.g. <code>[0-1, 0-5, 0-3]</code>). I think one can represent my so chosen numbers by seeing them as digits of a number in the <a href="https://en.wikipedia.org/wiki/Mixed_radix" rel="nofollow">mixed radix numeral system</a> with different bases for each position. In the above example, the bases would be <code>[2, 6, 4]</code> and the number would be <code>1 4 2</code>.</p>
<p>With the bases given in this example one could specify <code>48</code> different numbers (<code>2 * 6 * 4</code>).
If I know the bases, how can I construct an algorithm that converts such a number to another number in a standard positional numeral system (like e.g. decimal, binary or hexadecimal) without just building a big generated lookup table? The conversion has to be bijective and there should not be any gaps - so for this example the mixed radix numbers should be represented by the integers from <code>0</code> to (inclusive) <code>47</code> in the decimal system.</p>
<p>Actually I want to encode these mixed radix numbers in binary data, so a gapless and bijective conversion to the binary system would be sufficient.</p>
| 0non-cybersec
| Stackexchange | 358 | 1,321 |
Wrong dictionary in spotlight for macOS. <p>I have a 2016 MacBook Pro with macOS 10.12 Sierra. I can hit <code>cmd+space</code> and type a word that I would like to look up in the dictionary. If the word is Danish (my native language) it shows me the Danish definitions—that is fine. When I look up a English word, it shows me the translation from English to Dutch, which is really annoying.</p>
<p>Does anybody have a solution to that?</p>
<p>The dictionary works fine, if I just right click a word, and look it up.</p>
<hr />
<p>I have the following dictionaries enables under the dictionary preferences:
<a href="https://i.stack.imgur.com/v9AG6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/v9AG6.png" alt="Dictionary settings" /></a></p>
<p>And the following Language and Region settings under system preferences:
<a href="https://i.stack.imgur.com/TIBFb.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/TIBFb.png" alt="System settings" /></a></p>
<p>And lastly, my keyboard input language is Danish.</p>
<hr />
<h1>Update</h1>
<p>I don't know what happen but suddenly the spotlight dictionary works again. After reindexing spotlight several times, disable and enable definitions in spotlight preferences several times I gave up, and disabled it for good. However, yesterday I enabled spotlight definitions again to state my point to a friend and it works. Strange, but nice.</p>
| 0non-cybersec
| Stackexchange | 403 | 1,423 |
Search and Tags for robots.txt. <p>After setting up a blog at blogspot.com I added the site to my webmasters tools of google. </p>
<p>I noticed an error: "Restricted by robots.txt" and looked a little into the matter. I found in the robots.txt of blogspot that Google prevents the /search directory by default in order to avoid duplicate entries in their search engine. As tags can be found under /search/label/SOME_TAG, these are not indexed too.</p>
<p>I run different sites, especially one is an important e-commerce site for me. For each product, we use tags. Each tags leads to a separate site like /tags/tag1/ and lists all products that are linked to this tag. </p>
<p>And this leads me to my question:</p>
<p><strong>Should I also block search and/or tag pages on my sites by using robots.txt?</strong></p>
<p>I feel google might punish my pagerank/results for using this "low-quality" content. However I think they are quite useful. We provide a short description of each tag and how the listed products can be used for the problem the tag describes.</p>
<p>Moreover users landing on tags-pages have very high bounce rates (>90%), which is far above the average bounce rate.</p>
<p>So, what is the best practice?</p>
| 0non-cybersec
| Stackexchange | 331 | 1,233 |
Cant insert string to database because of single quote. <p>I am trying to insert this json's content to my database.</p>
<p>But I get null result on Summary because the text is like that:</p>
<pre><code>summary":"One of the oldest cities in the United States, Boston definitely has an \"old city\" feel to it. Home to great architecture and historical buildings, the city is also a great place to visit with younger ones, as it also plays host to LEGOLAND and many more children's attractions."
</code></pre>
<p>I think that this is due to the single quote and my PHP query <code>'{$summary}'</code>.</p>
<pre><code>$url = file_get_contents("urlcontent/api.json");
$arr = json_decode($url, true);
for($i=0;$i < count($arr);$i++){
$id = $arr[$i]['id'];
$location = $arr[$i]['location'];
$summary = $arr[$i]['summary'];
$query = "INSERT INTO [databasename].[dbo].[table]( id , summary, location)";
$query .= "VALUES ('{$id}', '{$summary}', '{$location}' )";
$update_query = sqlsrv_query($con, $query);
if(!$update_query){
die("There was an error" .print_r( sqlsrv_errors($con), true));
}
}
</code></pre>
<p>I tried to fix that with:</p>
<pre><code>$summary = preg_replace("'", "", $arr[$i]['summary']);
$summary = str_replace("'", "", $arr[$i]['summary']);
REPLACE('{$summary}','''','''') //MSSQL Database command
</code></pre>
<p>But still can't insert that text and get NULL result. I can <code>echo</code> it and <code>var_dump</code> and text is OK just cant insert it to my table.</p>
<p>My summary is as <code>text</code> in my database.</p>
<p>Whats the way to make it work? Cheers</p>
| 0non-cybersec
| Stackexchange | 533 | 1,650 |
Fedora 21 - Gem: change EXECUTABLE DIRECTORY. <p>I am using some locally installed gems in my environment and I would like to change the <code>EXECUTABLE DIRECTORY</code> path to <code>~/.gem/bin</code></p>
<p>How could I achieve this?</p>
<pre><code>$gem env
- RUBYGEMS VERSION: 2.2.2
- RUBY VERSION: 2.1.5 (2014-11-13 patchlevel 273) [x86_64-linux]
- INSTALLATION DIRECTORY: /home/flyer/.gem/ruby
- RUBY EXECUTABLE: /usr/bin/ruby
- EXECUTABLE DIRECTORY: /home/flyer/bin
- SPEC CACHE DIRECTORY: /home/flyer/.gem/specs
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-linux
- GEM PATHS:
- /home/flyer/.gem/ruby
- /usr/share/gems
- /usr/local/share/gems
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /usr/local/bin
- /usr/local/sbin
- /usr/bin
- /usr/sbin
- /bin
- /sbin
- /home/flyer/.local/bin
- /home/flyer/bin
- /home/flyer/.local/bin
- /home/flyer/bin
</code></pre>
| 0non-cybersec
| Stackexchange | 445 | 1,120 |
AWS API Gateway endpoint gives CORS error when POST from static site on S3. <p>I have created an API endpoint with Serverless(serverless.com) which I expose through API Gateway. I'm getting following error though I have enabled CORS from the </p>
<blockquote>
<p>XMLHttpRequest cannot load
<a href="https://xxxxxxxxx.execute-api.us-west-2.amazonaws.com/development/signup" rel="noreferrer">https://xxxxxxxxx.execute-api.us-west-2.amazonaws.com/development/signup</a>.
No 'Access-Control-Allow-Origin' header is present on the requested
resource. Origin
'<a href="http://yyyyyyyyy.com.s3-website-us-east-1.amazonaws.com" rel="noreferrer">http://yyyyyyyyy.com.s3-website-us-east-1.amazonaws.com</a>' is therefore
not allowed access.</p>
</blockquote>
<p><a href="https://i.stack.imgur.com/pezUG.png" rel="noreferrer"><img src="https://i.stack.imgur.com/pezUG.png" alt="AWS API Gateway settings for the endpoint"></a></p>
<p>I don't get any errors when I use Postman to make requests, despite I have set <code>origin</code> header or not. How can I fix this problem?</p>
| 0non-cybersec
| Stackexchange | 350 | 1,083 |
Detecting iPhone movement on a flat surface. <p>I'm a coremotion beginner.</p>
<p>I need to detect iPhone movement on a flat surface like table - so far, I made it to detect its sideways movement by accessing the yaw of the gyro, but I can't think of a way to detect the up/down changes. I tried using the accelerometer, but it detects more of a device tilt than movement. Also, there is a counterforce when the movement stops. </p>
<p>Do you have any idea to do it so that it would be possible to have the movement data with fair precision? I need it for something like air-hockey game. </p>
| 0non-cybersec
| Stackexchange | 156 | 595 |
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 | 349 | 1,234 |
vue v-for loop, add class individual. <p>I am using v-for to loop through a list and display that list.</p>
<p>Now after rendering, each list has a title and hidden content, and I want to be able, once I select one title of that list, to have its content to be shown and not all content.</p>
<p>So far I am doing this (thanks to <a href="https://stackoverflow.com/users/2678454/thanksd">@thanksd</a>):</p>
<pre><code><div class="link">
<p @click="show = true"> Click here to show the content </p>
<div v-show="show" class="content">
<p>This is the hidden content</p>
</div>
</div>
<div class="link">
<p @click="show = true"> Click here to show the content </p>
<div v-show="show" class="content">
<p>This is the hidden content</p>
</div>
</div>
data() {
return {
show: false,
};
}
</code></pre>
| 0non-cybersec
| Stackexchange | 353 | 923 |
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 | 349 | 1,234 |
Found these multi-use codes online, I entered them all and they worked. Not exactly sure what they unlock though.... NOTE: these are NOT Beta codes, only in-game bonus codes!
CODE 1: YKA-RJG-MH9 (WARLOCK)
CODE 2: 3DA-P4X-F6A (HUNTER)
CODE 3: MVD-4N3-NKH (TITAN)
CODE 4: TCN-HCD-TGY (RIXIS)
CODE 5: HDX-ALM-V4K (OLD RUSSIA)
CODE 6: 473-MXR-3X9 (HIVE)
CODE 7: JMR-LFN-4A3 (MOON)
CODE 8: HC3-H44-DKC (GJALLARHORN)
CODE 9: 69P-KRM-JJA (Duke MK.44)
CODE 10: 69P-VCH-337 (The Tower)
CODE 11: 69R-CKD-X7L (The Hive)
CODE 12: 69R-DDD-FCP (Valley of the kings, Mars)
CODE 13: 69R-F99-AXG (The Fallen)
CODE 14: 69R-VL7-J6A (Red Death)
CODE 15: 69X-DJN-74V (Los Cabal)
CODE 16: 6A7-7NP-3X7 (La costa devastada, Venus)
CODE 17: 6A9-DTG-YGN (Vex: Minotauro)
Codes are redeemed here:
http://www.bungie.net/en/User/coderedemption
These codes gave me "Destiny Collector's Cards", whatever those may be. Multi-use so they can be used several times by anyone. Don't know how much longer these will be active, so use them while you can! | 0non-cybersec
| Reddit | 446 | 1,035 |
Why do we run into this almost every damn time? Or how two seemingly unrelated events are often actually related. Despite what you tell yourself.. This is a sort-of TIFU, but technically I didn't FU personally but was more of a willing accessory. At least at the beginning...
It's also a bit of a rant.
Anyway:
Last Saturday, my co-worker moved a syslog-server (two actually) to new hardware (the old hardware is well past due-date). Immediately, it begins bombing out (which is apparently/hopefully a firmware issue that I later learned can be fixed with a hardware-update). On Sunday, I get to work with upgrading the OS on those syslog-servers, from home. Immediately drawing ire from my GF.
While doing that, I see that our mail system is also having problems. At about 10:30pm, I get a message that he doesn't know what to do about the mail-system anymore and that it's completely down now.
The servers are just slow, unresponsive and don't work anymore. Even login is slow, which should have really rang a few alarm bells....
So, after a couple of hours of messing with it (which was already too late, with hindsight - again), we open a ticket with the vendor which doesn't actually go anywhere until the next morning. I take a couple of hours sleep to come into Office at about 4 PM and it' still down and nobody is any wiser.
Various VM-restores had been run (each taking way too much time), to no avail.
More Webex-sessions with the vendor follow, we re-install the ldap-server, the vendor suspects a problem with the storage array that the VMs run on. Minute by minute, hour by hour, time passes by.
Still at the office (with my co-worker and somebody from helpdesk), there's a call at about 2 AM with the boss and the project-manager and we mull re-installing more servers.
We can't provision new VMs and the guy who can is not picking up his damn phone.
This is the moment I realize that we are missing something because it was getting more and more absurd. Also, I couldn't really see myself doing another all-nighter with barely no sleep. Not to mention our customers are without email for a good while now. Or make that a bad while.
I had cloned all the VMs about two weeks earlier for preparing a test-environment and we booted up one just for kicks - it was fast at the beginning and then slowed down quickly.
We see that there's something else at play and because the application itself is mostly java (and thus horribly difficult to debug), I settle for the one thing that is also slow and rather easy to troubleshoot: su(1).
I google it a bit and find that this is a common problem, with various reasons and none applies to us.
So, I just decide to strace it.
strace'ing su quickly halts at a point where it wants to write to a socket. I look at the line for about 30 seconds until I realize that is the point where it tries to send a message to the syslog-server (that is still acting up).
I can't believe what I'm seeing. For a short moment, I feel like I'm fainting.
So, I disable remote logging (it was configured to log via TCP) to that server for the platform and bang - everything starts working immediately. Holy moly.
We empty the inbound queue of about 30k mails that get delivered quickly.
After confirming that actually everything works as before, we take a little nap at the office before heading off for breakfast, waiting for the rest of the company coming to work.
We leave at about 10am, I go home and sleep until the evening.
Somewhere along that, we also moved syslog back to the old hardware.
Needless to say that more than one person had suggested that the syslog-server was the culprit pretty much at the beginning. One of them being the boss. But it was dismissed, and I myself also didn't think it was the cause - until I saw it with my own, bleary eyes.
The problem is that once there is such a big problem, often actionism takes over completely and trying to find the root-cause for something then gets almost impossible because you look at the problem from the wrong angle.
Also, going two days with barely any sleep like my co-worker really doesn't help.
| 0non-cybersec
| Reddit | 990 | 4,126 |
Localizing a web-app. <p>I'm just having a debate about the best <em>(future-proof, safe, user-friendly, developer-friendly, technologically nice)</em> approach to localization of a web-application. We are using basically processing on the server, prepare pages there and use some JS, also use Syncfusion (who offer "<a href="http://help.syncfusion.com/js/localization" rel="nofollow">something</a>" with their latest release), but I am having mixed emotions about handling that via JS (<em>on the (possibly thin) client</em>) - I can't exactly name it, but my concerns seem to be about about language/culture-dependencies in the data being presented. And also, this would imply that the client would handle the localization of the UI, whereas otherwise we could deliver an already localized page to the client...</p>
<p>I've read the few questions that I found here, but was wondering if you could share some experiences/comments on the subject: would you rather localize by building localized pages or return generic pages and translate on-the-fly via JS?</p>
| 0non-cybersec
| Stackexchange | 253 | 1,063 |
different fillStyle colors for arc in canvas. <p>I imagine the solution to this is very simple, and apologize in advance if this is painfully obvious, but I can't seem to figure out how to set two different fillStyles for two different arcs ...I just wanna be able to draw different color circles. Below I have how I would normally do it with other shapes/drawing methods in canvas, but for some reason with arcs it sets both arcs to the last fillStyle.</p>
<pre><code>ctx.fillStyle = "#c82124"; //red
ctx.arc(15,15,15,0,Math.PI*2,true);
ctx.fill();
ctx.fillStyle = "#3370d4"; //blue
ctx.arc(580,15,15,0,Math.PI*2,true);
ctx.fill();
</code></pre>
| 0non-cybersec
| Stackexchange | 196 | 649 |
Is the Haar measure on the orthogonal group uniform on preimages of balls in orbits?. <p>Let $G$ be the orthogonal group on $\mathbb{R}^n$. The norm on $G$ is the operator norm. $G$ is a compact (Lie) group, so it has a unique Haar measure $\mu$ of total measure 1 which is both left and right invariant. </p>
<p>Fix a unit vector $x_0 \in \mathbb{R}^n$. The orbit of $x_0$ is $Gx_0 = S^{n-1} \subseteq \mathbb{R}^n$. The map $\alpha: g \mapsto g x_0$ is a surjection from $G$ to $S^{n-1} \subseteq \mathbb{R}^n$. </p>
<p>Cover $S^{n-1}$ by balls $B_i$ in $\mathbb{R}^n$ of radius $r$ whose centers lie on $S^{n-1}$. </p>
<p>I think the preimages $\alpha^{-1}(B_i)$ of the balls should all have the same measure (say up to a constant factor).</p>
<p>How can I prove (or disprove) this?</p>
<p>EDIT: </p>
<p><a href="https://en.wikipedia.org/wiki/Spherical_measure#Relationship_with_other_measures" rel="nofollow noreferrer">https://en.wikipedia.org/wiki/Spherical_measure#Relationship_with_other_measures</a></p>
<p>According to that wikipedia article, the image measure of the Haar measure $\mu$ on $G$ through $\alpha$ is exactly the uniform measure $\sigma$ on the sphere:
$$
\sigma(A)=\mu(\{ g: \alpha(g)=gx_0 \in A\}) = \mu(\alpha^{-1}(A))
$$
In particular,
$$
\sigma(B_i \cap S^{n-1}) = \sigma(B_i) = \mu(\alpha^{-1}(B_i \cap S^{n-1}))
$$
Since $\sigma$ is uniform and since the balls have the same radius with centers on the sphere, $\sigma(B_i \cap S^{n-1})=\sigma(B_j \cap S^{n-1})$ for all $i,j$.</p>
<p>Thus my question <strong>can</strong> be reduced to:</p>
<p>Why is the image measure $\mu(\alpha^{-1}( \; \cdot \; ))$ exactly the uniform measure $\sigma$ on the sphere? </p>
| 0non-cybersec
| Stackexchange | 617 | 1,703 |
Check if MySQL configuration was applied. <p>I'm performing some heavy MySQL operations at my VM and constantly getting the following error:</p>
<blockquote>
<p>SQLSTATE[HY000]: General error: 1206 The total number of locks exceeds the lock table size</p>
</blockquote>
<p>I googled that increasing <code>innodb_buffer_pool_size</code> option in <code>my.cnf</code> may solve the issue. The only <code>my.conf</code> I found at my VM is located at <code>/etc/mysql/my.cnf</code>. There was no <code>innodb_buffer_pool_size</code> setting there at all so I added:</p>
<blockquote>
<p>innodb_buffer_pool_size = 1G</p>
</blockquote>
<p>and then increased it to 2G but still the error is there. After each altering of the <code>my.cnf</code> file I restarted my VM completely.</p>
<p>The question is if there any chance to check if <code>innodb_buffer_pool_size</code> parameter was taken into consideration and I'm modifying correct file?</p>
<p>My <code>my.cnf</code> has <code>root:root</code> owner but permissions are <code>-rw-r--r--</code> so I guess MySQL should be able to read it.</p>
| 0non-cybersec
| Stackexchange | 346 | 1,101 |
Exponential Inequality. <p>I was working on a problem and reduced it to showing the following inequality:</p>
<p>$$2x e^{x^2/6} \ge e^x - e^{-x} \text{ for $x \ge 0$}$$</p>
<p>I tried expanding everything in Taylor series to no avail. I also tried defining the function $f(x):= 2xe^{x^2/6} - e^x + e^{-x}$, showing $f(0) = 0$ and trying to show $f'(x) \ge 0$ for $x \ge 0$, but I couldn't show the last part.</p>
<p>Is there something easy I'm missing?</p>
| 0non-cybersec
| Stackexchange | 171 | 461 |
Is it possible to consider a single optional parameter among three in node declaration?. <p>Please consider the following dummy MWE:</p>
<pre><code>\documentclass[border=3mm,tikz,preview]{standalone}
\usetikzlibrary{arrows,positioning,shadows,shapes}
\tikzset{test/.style = {%
> = angle 90,
YY/.style args = {##1/##2/##3}{
% changed in each use of shape
name=n##1,
% different in each picture
fill=##2,% color
text width=##3,
% common in each picture
shape=rectangle, draw, inner sep=1mm, minimum height=9mm,
align=flush center, drop shadow}, }
}
\begin{document}
\begin{tikzpicture}[test,
node distance = 12mm,
]
\node[YY=1/white/12mm] {node A};
\node[YY=2/white/12mm,right=of n1] {node B};
\draw[->] (n1) -- (n2);
\end{tikzpicture}
\end{document}
</code></pre>
<p>Is it possible to set optional parameters <code>#2</code> and <code>#3</code> as default in some picture and then change only parameter <code>#1</code> on the following way:</p>
<pre><code>\node[YY=1] {node A};
\node[YY=2,right=of n1] {node B};
\draw[->] (n1) -- (n2);
</code></pre>
<p>I'm aware of possibilities of `YY/.default = 1/white/12mm, but it has sense only if the all nodes have the same name (in considered dummy case). Then ones can write:</p>
<pre><code>\node[YY] {node A};
\node[YY,right=of n1] {node B};
</code></pre>
<p>In this case the names can be put in <code>(...)</code> after node declaration, but this in the case, that node has defined <code>node contents</code> is not possible ...</p>
<p><strong>Edit:</strong>
My main intention is to make node description (determining parameters) as well presets in each TikZ picture as short as possible and for one, who aware of defined presets, make it intuitive. In this I wonder, if it is possible to define optional parameters on similar way as can be defined for example <code>\newcommand</code> in LaTeX:</p>
<pre><code>\newcommand{maycomand}[2][optional parameter] {command definition};
</code></pre>
<p>In sense of my (dummy) example in the case, that node use preset parameters, the node declaration is </p>
<pre><code>\node[YY=1] {node content};
</code></pre>
<p>and in the case, when I like to change default optional values, I can simple write:</p>
<pre><code>\node[YY=1/red!20/22mm] {node content};
</code></pre>
<p>So far (for simplified case of given MWE) I can do the following:</p>
<ul>
<li><p>as say @cfr in his comment (and I was not aware before) in node preset determine only option <code>#2</code> and <code>#3</code> and name of node write in braces like:
<code>\node (name) [YY] {node contents};</code> when I use default values for optional parameters, and <code>\node (name) [YY=red!20/22mm] {node contents};</code> when I change default values.</p></li>
<li><p>not use optional arguments in node preset and in each picture add in its preamble <code>YY/.append style = {fill=white, text width=12mm}</code> and in case, that I like to have different color and width, this locally overwrite as <code>\node[YY=name,fill=red!20,text width=22mm] {node content};</code></p></li>
</ul>
| 0non-cybersec
| Stackexchange | 1,021 | 3,240 |
Loading local data google colab. <p>I have a npy file, (largeFIle.npy) saved in the same "colab notebooks" folder on my google drive that I have my google colab notebook saved in. I'm trying to load the data into my notebook with the code below but I'm getting the error below. This code works fine when I run it locally on my laptop with the notebook in the same folder as the file. Is there something different I need to do when loading data with notebooks in google colab? I'm very new to colab.</p>
<pre><code>code:
dataset_name = 'largeFIle.npy'
dataset = np.load(dataset_name, encoding='bytes')
Error:
FileNotFoundError Traceback (most recent call last)
<ipython-input-6-db02a0bfcf1d> in <module>()
----> 1 dataset = np.load(dataset_name, encoding='bytes')
/usr/local/lib/python3.6/dist-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding)
370 own_fid = False
371 if isinstance(file, basestring):
--> 372 fid = open(file, "rb")
373 own_fid = True
374 elif is_pathlib_path(file):
FileNotFoundError: [Errno 2] No such file or directory: 'largeFIle.npy'
</code></pre>
| 0non-cybersec
| Stackexchange | 385 | 1,206 |
Do you ever get off days?. I've been training all summer for an olympic triathlon in September and, until today, thought I was pretty on track for the swim.
Last week I was doing up to 60 laps straight but today I could barely even finish 10. It feels like I've regressed and it's really frustrating.
Was going to post on tri but I wanted to ask for all other fitness types. Do you ever get off days? Is it normal? and how could I prevent them? Gonna get right back to it and work harder but really hope I don't get more of these, especially on the day of the race! | 0non-cybersec
| Reddit | 143 | 571 |
Example of divergent series whose associated "squared" series converges. <p>I am trying to find a non-trivial example of a series with positive terms $a_n$ that satisfies the following two conditions:</p>
<p>$$
\sum_{n = 1}^{+\infty} a_n = +\infty \qquad \text{and} \qquad \sum_{n = 1}^{+\infty} a_n^2 < +\infty.
$$</p>
<p>The obvious example is of course $a_n = \frac{1}{n}$ for all $n \in \mathbb{N}\setminus \{0\}$, but could you help me finding another one? Thank you very much for your answers.</p>
| 0non-cybersec
| Stackexchange | 167 | 519 |
Mendeley is crashing on MacBook Pro. <p>I have a problem starting Mendeley on MacBook Pro (10.13 (High Sierra)). It used to work before, but after the last update, i.e., 1.19.4.OSX.Universal, it pops up the following window every time I start it.<a href="https://i.stack.imgur.com/SgUlo.png" rel="nofollow noreferrer">enter image description here</a></p>
<p>I appreciate your help. In the meantime, I am contacting Mendeley.</p>
<p>Cheers,
/Nas</p>
| 0non-cybersec
| Stackexchange | 152 | 451 |
Jdbi - how to bind a list parameter in Java?. <p>We have an SQL statement which is executed by Jdbi (<code>org.skife.jdbi.v2</code>). For binding parameters we use Jdbi's <code>bind</code> method:</p>
<pre><code>Handle handle = ...
Query<Map<String, Object>> sqlQuery = handle.createQuery(query);
sqlQuery.bind(...)
</code></pre>
<p>However we have a problem with in-lists and currently we are using <code>String.format</code> for this. So our query can look like this:</p>
<pre><code>SELECT DISTINCT
tableOne.columnOne,
tableTwo.columnTwo,
tableTwo.columnThree
FROM tableOne
JOIN tableTwo
ON tableOne.columnOne = tableTwo.columnOne
WHERE tableTwo.columnTwo = :parameterOne
AND tableTwo.columnThree IN (%s)
</code></pre>
<p><code>%s</code> is replaced by <code>String.format</code> so we have to generate a proper string in java code. Then after all <code>%s</code> are replaced we are using jdbi's <code>bind</code> method to replace all other parameters (<code>:parameterOne</code> or <code>?</code>).</p>
<p>Is there a way to replace <code>String.format</code> with jdbi? There is a method <code>bind(String, Object)</code> but it doesn't handle lists/arrays by default. I have found <a href="http://skife.org/jdbi/java/2011/12/21/jdbi_in_clauses.html" rel="noreferrer">this article</a> which explains how to write our own factory for binding custom objects but it looks like a lot of effort, especially for something that should be already supported.</p>
| 0non-cybersec
| Stackexchange | 462 | 1,496 |
missing row if sales did not occur in one year vs other. <p>Given below is the table definition and data:</p>
<pre><code>CREATE TABLE bike
(
id INTEGER,
name VARCHAR(50),
price INTEGER
);
CREATE TABLE country
(
id INTEGER,
country VARCHAR(50)
);
create table bike_sales
(
bike_id int,
country_id int,
quantity int,
sales_date DATE
);
</code></pre>
<pre><code>INSERT INTO bike VALUES(1,'XYZ',50000);
INSERT INTO bike VALUES(2,'ABC',70000);
INSERT INTO bike VALUES(3,'PQR',70000);
INSERT INTO country VALUES(1,'US');
INSERT INTO country VALUES(2,'Canada');
INSERT INTO country VALUES(3,'UK');
INSERT INTO bike_sales VALUES(1, 1, 5, '2018-01-01');
INSERT INTO bike_sales VALUES(1, 2, 10, '2018-02-01');
INSERT INTO bike_sales VALUES(1, 3, 7, '2018-03-01');
INSERT INTO bike_sales VALUES(2, 1, 9, '2018-04-01');
INSERT INTO bike_sales VALUES(2, 2, 8, '2018-05-01');
INSERT INTO bike_sales VALUES(2, 3, 4, '2018-06-01');
INSERT INTO bike_sales VALUES(3, 3, 4, '2019-06-01');
</code></pre>
<p>When I run this query:</p>
<pre><code>SELECT c.country, b.name, (bs.quantity* b.price) as revenue
FROM bike_sales bs
LEFT JOIN country c
ON c.id = bs.country_id
LEFT JOIN bike b
ON b.id = bs.bike_id
WHERE year(bs.sales_date) = '2018'
order by c.country, b.name
</code></pre>
<p>i get this output</p>
<pre><code>+---------+------+---------+
| country | name | revenue |
+---------+------+---------+
| Canada | ABC | 560000 |
| Canada | XYZ | 500000 |
| UK | ABC | 280000 |
| UK | PQR | 280000 |
| UK | XYZ | 350000 |
| US | ABC | 630000 |
| US | XYZ | 250000
+---------+------+---------+
</code></pre>
<p>I am calculating the country wide sales for 2018. I also want my result to display bikes that were sold in 2019 even though they were not sold in 2018.For example : There were no sales for 'PQR' in 'UK' in 2018 although it was sold in UK in 2019 hence I need that row as well in the output with 0 as revenue since there was no sales in 2018. How do I get this missing row ? </p>
<pre><code>| UK | ABC | 0 |
</code></pre>
| 0non-cybersec
| Stackexchange | 734 | 2,106 |
Why am I getting a 422 error code?. <p>I am making a POST request, but unable to get anything besides a 422 response.</p>
<p><strong>Vue.js client code:</strong></p>
<pre><code>new Vue({
el: '#app',
data: {
form: {
companyName: '',
street: '',
city: '',
state: '',
zip: '',
contactName: '',
phone: '',
email: '',
numberOfOffices: 0,
numberOfEmployees: 0,
}
},
methods: {
register: function() {
this.$http.post('/office-depot-register', this.form).then(function (response) {
// success callback
console.log(response);
}, function (response) {
// error callback
console.log(response);
});
}
}
});
</code></pre>
<p><strong>Laravel Routes:</strong></p>
<pre><code>Route::post('/office-depot-register', ['uses' => 'OfficeDepotController@register', 'as' => 'office-depot-register']);
</code></pre>
<p><strong>Laravel Controller:</strong></p>
<pre><code>public function register(Request $request)
{
$this->validate($request, [
'companyName' => 'required',
// ...
]);
// ...
}
</code></pre>
| 0non-cybersec
| Stackexchange | 379 | 1,172 |
Game Thread - Fourth Quarter: Green Bay Packers (12-4) at Seattle Seahawks (12-4). ----
[Green Bay Packers](/r/greenbaypackers#away) [at](#at) [Seattle Seahawks](/r/seahawks#home)
----
* CenturyLink Field
* Seattle, Washington
----
######[](#start-box-score)
| | | | | | | |
| :-- | :-- | :-- | :-- | :-- | :-- | :-- |
| |**First**|**Second**|**Third**|**Fourth**|**Overtime**|**Final**|
|**Packers**|13|3|0|6|0|**22**|
|**Seahawks**|0|0|7|15|6|**28**|
######[](#end-box-score)
----
* General information
*
----
| | | | | | |
| :-- | :-- | :-- | :-- | --: | --: |
| **Coverage** | | | **Game Insight** | | **Odds** |
| FOX | | | [Statmilk](http://www.statmilk.com/NFL/MatchUp/15227/9062/) | | Green Bay O/U |
| |
|:---|
| [48°F/Wind 15mph/Rain showers/1mm precipitation expected](http://www.yr.no/place/United_States/Washington/Seattle/#weather-5 "Weather forecast from yr.no, delivered by the Norwegian Meteorological Institute and the NRK") |
----
| | |
| :-- | --: |
| **Headlines** | **Communities** |
| [Report: Colts planning big-money deal for Andrew Luck](http://profootballtalk.nbcsports.com/2015/01/18/report-colts-planning-big-money-deal-for-luck/) | /r/seahawks |
| [Richard Sherman unhappy with Rodgers avoiding him](http://www.nfl.com/news/story/0ap3000000459879/article/richard-sherman-unhappy-with-rodgers-avoiding-him) | /r/greenbaypackers |
| | |
----
* Game Stats
*
----
######[](#start-game-stats)
| | | | | | |
| :-- | :-- | :-- | :-- | :-- | :-- |
| **Passing** | | **Cmp/Att** | **Yds** | **Ints** | **Tds** |
|R.Wilson|[](/r/seahawks)|14/29|209|4|1|
|A.Rodgers|[](/r/greenbaypackers)|19/34|178|2|1|
| **Rushing** | | **Car** | **Yds** | **Lng** | **Tds** |
|M.Lynch|[](/r/seahawks)|25|157|24|1|
|E.Lacy|[](/r/greenbaypackers)|21|73|13|0|
| **Receiving** | | **Rec** | **Yds** | **Lng** | **Tds** |
|D.Baldwin|[](/r/seahawks)|6|106|35|0|
|J.Nelson|[](/r/greenbaypackers)|5|71|23|0|
######[](#end-game-stats)
----
* Thread Notes
* [Message The Moderators](http://www.reddit.com/message/compose?to=%2Fr%2Fnfl)
----
| |
| :-- |
| Discuss whatever you wish. You can trash talk, but keep it civil. |
| Turning comment sort to ['new'](https://www.reddit.com/r/nfl/comments/2sve04/game_thread_fourth_quarter_green_bay_packers_124/?sort=new) will help you see the newest comments. |
| Try Chrome Refresh or Firefox's ReloadEvery to auto-refresh this tab. |
| Use [reddit-stream.com](http://reddit-stream.com/comments/2sve04) to get an autorefreshing version of this page |
| Check in on the r/nfl chat: **#reddit-nfl** on FreeNode ([open in browser](http://webchat.freenode.net/?channels=reddit-nfl)). |
| Show your team affiliation - pick your team's logo in the sidebar. | | 0non-cybersec
| Reddit | 1,105 | 2,737 |
Switch audio output from tray (headphone or speaker). <p>Installed Ubuntu 18.10 and I'm very happy.</p>
<p>The only function i'm missing is <strong>quick switching audio output profiles</strong> of my soundcard.<br>
In tray menu only <strong><em>volume control</em></strong> is possible, therefore I tried GNOME Shell Extension: <strong><em>Audio output selector,</em></strong> but it only switches between soundcards (internal speakers & USB soundcard) from the tray menu. </p>
<p><strong>I need to switch between the USB soundcard outputs (headphones & 3,5mm audio-out).</strong> These are shown as Output profiles "<strong><em>Speaker</em></strong>" & "<strong><em>Headphone</em></strong>".</p>
<p>How can I enable a quick way to switch between these profiles? It's strange Ubuntu doesn't support any quick way to switch audio output from tray.
:(</p>
<p><img src="https://i.stack.imgur.com/Gmsg7.png" alt="Audio output profile settings ubuntu"></p>
<p>thanks Pappl</p>
| 0non-cybersec
| Stackexchange | 285 | 990 |
Induction with two unknown variables. <p>I have been at this problem for a while now, and I cannot wrap my head around it. Any kind of help would be greatly appreciated!</p>
<p>The runtime for a sorting algorithm can be described by <span class="math-container">$a_{1} = 3$</span> and </p>
<p><a href="https://i.stack.imgur.com/oohno.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/oohno.png" alt="enter image description here"></a></p>
<p>I need to prove, that </p>
<p><a href="https://i.stack.imgur.com/0erOk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0erOk.png" alt="enter image description here"></a></p>
<p>For all <span class="math-container">$n, k \in Z^{+}$</span></p>
<p>I've tried to do the basestep, but even here I'm not sure if it's correct. I hope someone can help with the induction step as well.</p>
<p><strong>Basecase:</strong> </p>
<p><span class="math-container">$n, k = 2$</span></p>
<p><span class="math-container">$a_{2} =a_{2/2} + a_{2/2} + 3*2+1 = 13 $</span></p>
<p><span class="math-container">$3* 2 * 2^2 + 4 * 2^2 -1 = 39$</span></p>
<p><span class="math-container">$a_n \leq 3 * k * 2^k + 4 * 2^k - 1$</span> applies for the basebase, since <span class="math-container">$13 \leq 39$</span> is true. </p>
<p><strong>Inductionstep:</strong></p>
<p>?</p>
| 0non-cybersec
| Stackexchange | 507 | 1,339 |
Show that function $f$ need not be uniformly continuous on $A ∪ B$ If $A∩B=\emptyset$ and $A$ is not compact. <p>Show that function $f$ need not be uniformly continuous on $A ∪ B$</p>
<p>If $A∩B=\emptyset$ and $A$ is not compact and $A$ and $B$ are closed sets.</p>
<p>And $f$ is uniformly continuous on both $A$ and $B$</p>
<p>I believe I need to use the distance between these two sets when trying to solve this question , because I proved a similar one (opposite) using the fact that if $A$ was compact, distance between these two sets would be positive.</p>
<p>Here $A$ is not compact, but both sets are disjoint and closed. I couldn't come up with an argument about their distances this time.</p>
<p>I tried thinking about a subsequence converging. Since neither of $A$ and $B$ are bounded, not all sequences $a_n$ and $b_n$ where $a_n\epsilon A$ for all $n$ and $b_n\epsilon B$ for all $n$ have a limit point. Maybe an argument from here could be derived but couldn't think of any again.</p>
<p>Could someone help me out?
Thanks,</p>
| 0non-cybersec
| Stackexchange | 326 | 1,048 |
How to re-enable Chrome Developer Tools?. <p>I'm on Windows 7 running Google Chrome 41 and somehow my developer tools are disabled. <code>Inspect Element</code> in the context menu is grayed out, all the Developer options under the hamburger and More Tools are also grayed, and there doesn't seem to be anyway around it.</p>
<p>I've found <a href="https://stackoverflow.com/questions/5692006/how-to-uninstall-remove-developer-tools-from-google-chrome">this SO question</a> but I couldn't find <code>"disabled": true</code> in my Preferences file. I've checked and Chrome isn't starting with the <code>--disable-dev-tools</code> flag either. I've wandered through the registry looking for an entry that might be causing this but so far I've found no way to re-enable devtools. I am a developer, I need them.</p>
<p>How can I re-enable Chrome's Developer Tools?</p>
| 0non-cybersec
| Stackexchange | 236 | 867 |
is it a single variable probability density function?. <p>is it a single variable probability density function?
<span class="math-container">$$f(x)=\left\{
\begin{array}{ll}
e^{3x} , &\rm{~~if~~} x \leq 0\\
1 - \frac{2}{3}x ,&\rm{~~if~~} 0 < x \leq 1\\
0, &\rm{~~if~~} x > 1\\
\end{array}\right.$$</span></p>
<p>I checked, the definite integral of f(x) from -infinity to infinity is 0.
<span class="math-container">$f(x)\geq 0$</span></p>
<p>it's limits to infinity and -infinity equal to 0.
It is continuous from left.</p>
<p>There is a 'bump' in the function, because <span class="math-container">$f(1)=1/3$</span> and
<span class="math-container">$f(x>1)=0$</span>
So is it not a problem, because it only has to be continuous from the left, is it correct?</p>
<p>Thank you</p>
| 0non-cybersec
| Stackexchange | 303 | 812 |
Conditional and iterators in ruby. <p>I'm trying to translate the following code into ruby:</p>
<pre><code>public void discardWeapon(Weapon w){
if(!weapons.isEmpty()){
boolean discarded = false;
Iterator<WeaponType> it = weapons.iterator();
while(it.hasNext() && !discarded){
WeaponType wtaux = it.next();
if(wtaux == w.getWeaponType()){
it.remove();
discarded = true;
}
}
}
}
</code></pre>
<p>But, when it comes to the while loop, I can't really find a practical way to do it in ruby. I've got the following structure so far:</p>
<pre><code>def discardWeapon(w)
if([email protected]?)
discarded = false
@weapons.each do |wtaux|
end
end
end
</code></pre>
<p>But, how can I check my condition is met when using the .each iterator?
Thanks in advance.</p>
| 0non-cybersec
| Stackexchange | 283 | 897 |
Prove vector spaces dimensions equality. <blockquote>
<p>Let $V$ a finite vector space over $F$, and $W$ a vector space over $F$ with the dimension of $1$. $S:V\rightarrow V, T:V\rightarrow W$ two linear transformations. It is given that $\ker S$ is not a subset of $\ker T$. Prove $\dim (\ker T \cap \ker S) = \dim (\ker S) - 1$</p>
</blockquote>
<p>My Work:<br>
using the Dimensions Thm we know that: $\def\Im{\operatorname{Im}}\dim V = \dim\ker T + \dim\Im T$. We know that $\ker S$ is not a subset of $\ker T$, Therefore there must be $S(x)=0$ and $T(x)\ne 0$. Therefore, the dimension of $\Im T$ isn't $0$, so it must be that $\dim\Im T=1$. </p>
<p>I tried to develop it further, but without much success.<br>
I'll be glad for help. </p>
<h2>EDIT:</h2>
<p>following Marc guidelines:<br>
$$\begin{array}{l}
U: = \ker S \\
{T_U}:V \to V \\
\dim U = \dim Ker{T_U} + \dim {\mathop{\rm Im}\nolimits} {T_U} \\
\dim U = \dim Ker{T_U} + 1 \\
\dim U - 1 = \dim Ker{T_U} \\
\dim KerS - 1 = \dim Ker{T_U} \\
\dim KerS - 1 = \dim KerT \cap \dim KerS \\
\end{array}$$</p>
| 0non-cybersec
| Stackexchange | 416 | 1,086 |
Prove $f(x)=a*x*a^{-1}$ Group Homomorphism. <p>If $f:(G,*) \to (G,*)$ , $a$ in $G$</p>
<p>Prove that $f$ is a group homomorphism , where </p>
<p>$$f(x)=a*x*a^{-1},\ \ \ \ x\in G.$$</p>
<hr>
<p><strong>My answer:</strong></p>
<p>We should to prove this :</p>
<p>$$f(x*y)=f(x)*f(y).$$</p>
<p>And from definition in the question:</p>
<p>$$\tag{1}f(x*y)=a*x*y*a^{-1}$$
and
$$\tag{2}f(x)=a*x*a^{-1}$$
and
$$\tag{3}f(y)=a*y*a^{-1}.$$</p>
<p>But How can I prove $(1)=(2)*(3)$?</p>
| 0non-cybersec
| Stackexchange | 261 | 486 |
How do I find a file with a name which depends on the current date (and a random component)?. <p>I have to check a particular path every day and find the file with a name of the form:</p>
<pre><code>StaticData_Sets_yyyymmdd-232550.txt
</code></pre>
<p>The date in the name after the string <code>StaticData_Sets_</code> is updated every day depending on the system date. The number after the date is random.</p>
<p>How can I find the file for the current date in Unix?</p>
| 0non-cybersec
| Stackexchange | 144 | 476 |
Define Patterns in Crunch. <p>I am trying to achieve a very specific pattern with crunch. The Wireless Router I use has a very specific Pattern used for the default Password generated by my Provider. I want to create a wordlist or at least Pipe it through to aircrack-ng with the following pattern:</p>
<p>xxxx-xxxx-xxxx-xxxx</p>
<p>The x's represent 4 multialpha-numeric characters spaced by dashes. I read through several help sites and the manpage of Crunch but just can't figure out to get to this pattern. Is it even possible? It is very confusing. </p>
<p>I tried using -t ++++-++++-++++-++++ which gave me one result.</p>
| 1cybersec
| Stackexchange | 173 | 632 |
My Cpu Temperature shows higher temperature than normal. Why?. <p>I built a AMD Ryzen 5 2400g. for first year it works fine. then it starts to create problem. My CPU fan stops working. instead of installing new CPU fan i install my old DC fan. so every time i boot my system it shows CPU fan not running. its ok for me every time time to boot from bios. But there's problem started. During BIOS Login i noticed that, the temperature of the CPU was 75 deg-celcius. but i checked using 3rd part software and Ryzen Master it shows 40-50 deg-celcius. is there any problem in my motherboard, or due to aging factor this problem appears.</p>
<p>so i started to test my CPU with userbench mark. during load my CPU temperature shoots to 99 deg-celcius. Mostly my system crashed during this bench mark test. while rendering also my system continuously crashed. i dont know what to do. can any one suggest me a solution.</p>
<p>Details<br />
CPU : AMD Ryzen 2400g<br />
iGPU: vega 11<br />
Mother Board : Asus B450-a<br />
Ram : corsair 8GBx2</p>
| 0non-cybersec
| Stackexchange | 280 | 1,037 |
power series solutions for ordinary differential equations - references. <p>Hello </p>
<p>I'm having a hard time finding some references on series solutions for "nonlinear" ODE's, the most I could find was a small excert on wikipedia. </p>
<p><a href="http://en.wikipedia.org/wiki/Power_series_solution_of_differential_equations" rel="nofollow">http://en.wikipedia.org/wiki/Power_series_solution_of_differential_equations</a></p>
<p>Most books just say something along the lines of ... and the method is applicable to nonlinear ODE's. But none i've seen go into detail let alone an example. Can anyone suggest me a good book or reference (in particular for 2nd order nonlinear ODEs)?</p>
<p>Thanks </p>
| 0non-cybersec
| Stackexchange | 201 | 707 |
EXCEL: How to jump to first (or next) duplicate value in a sorted column?. <p>I have a sheet with hundreds of thousands of rows. There are a few duplicates on the ID column. The technique to highlight duplicates does not work, as using the scroll bar shoots past them so fast that you can't identify them (it is skipping many hundreds of records at a time).</p>
<p>How do I get Excel to place the cursor on the first, or next, duplicate value in a sorted column?</p>
<p>Windows 10; MS Excel 2016</p>
| 0non-cybersec
| Stackexchange | 134 | 504 |
A question about odd perfect numbers. <p>Edit [in response to a comment from <a href="https://math.stackexchange.com/users/11763/anon">anon</a>]: Hereinafter, $N$ is a positive integer, $\sigma(N)$ is the sum-of-divisors of $N$, $\omega(N)$ is the number of distinct prime factors of $N$, and $\Omega(N)$ is the number of prime factors of $N$ (counting multiplicities).</p>
<p>Thus, $N$ is a perfect number if $\sigma(N) = 2N$.</p>
<p><a href="http://math.byu.edu/~pace/BestBound_web.pdf" rel="nofollow noreferrer">A 2013 preprint by Nielsen</a> claims to have proved that $\omega(N) \geq 10$ if $N$ is an odd perfect number. <a href="http://www2.lirmm.fr/~ochem/opn/opnf.pdf" rel="nofollow noreferrer">A paper by Ochem and Rao</a> containing inequalities relating $\Omega(N)$ and $\omega(N)$ for $N$ an odd perfect number has been recently accepted in the <a href="http://www.ams.org/cgi-bin/mstrack/accepted_papers/mcom" rel="nofollow noreferrer">Mathematics of Computation</a>. The state-of-the-art result for $\Omega(N)$ remains to be <a href="http://www.ams.org/journals/mcom/2007-76-260/S0025-5718-07-02033-9/" rel="nofollow noreferrer">Hare's $\Omega(N) \geq 75$</a>.</p>
<p>[Edit - August 29] The state-of-the-art result for $\Omega(N)$ (where $N$ is an odd perfect number) is now <a href="http://www.lirmm.fr/~ochem/opn/opn.pdf" rel="nofollow noreferrer">Ochem and Rao's $\Omega(N) \geq 101$</a>. [End edit]</p>
<p>[End edit - July 30 2013]</p>
<p>If there exists an $i \in \left[1,\omega(N)\right]$ such that</p>
<p>$$N \leq \frac{3}{2}{p_i}^{\alpha_i}\sigma({p_i}^{\alpha_i}),$$</p>
<p>then $$N = \prod_{i=1}^{\omega(N)}{{p_i}^{\alpha_i}}$$
(where the $p_i$'s are primes ordered in increasing magnitude and the $\alpha_i$'s are all positive)</p>
<p>is ${\it not}$ an odd perfect number. (See Theorem 4.2.5, page 112 in this <a href="http://arxiv.org/pdf/1204.1450v1.pdf" rel="nofollow noreferrer">M.Sc. thesis</a>.)</p>
<p>In particular, suppose $i = 1$. (That is, let $p_1$ be the smallest prime factor of $N$.) Then we have</p>
<p>$${{p_1}^{\alpha_1}}\prod_{i=2}^{\omega(N)}{{p_i}^{\alpha_i}} = N = \prod_{i=1}^{\omega(N)}{{p_i}^{\alpha_i}} \leq \frac{3}{2}{p_i}^{\alpha_i}\sigma({p_i}^{\alpha_i}) < \frac{9}{4}{{p_1}^{2\alpha_1}},$$</p>
<p>from which it follows that</p>
<p>$$\prod_{i=2}^{\omega(N)}{{p_2}^{\alpha_i}} \leq \prod_{i=2}^{\omega(N)}{{p_i}^{\alpha_i}} < \frac{9}{4}{{p_1}^{\alpha_1}}.$$</p>
<p>But we also have</p>
<p>$${p_2}^{\Omega(N) - {\alpha_1}} = \prod_{i=2}^{\omega(N)}{{p_2}^{\alpha_i}} \leq \prod_{i=2}^{\omega(N)}{{p_i}^{\alpha_i}} < \frac{9}{4}{{p_1}^{\alpha_1}} < \frac{9}{4}{{p_2}^{\alpha_1}} < {{p_2}^{\alpha_1 + 1}},$$</p>
<p>from which we obtain</p>
<p>$$\frac{\Omega(N) - 1}{2} < \alpha_1.$$</p>
<p>Note that we have obtained the result:</p>
<p>"If $$N = {p_1}^{2\alpha_1}{q^k}\prod_{i=2}^{\omega(N) - 1}{{p_i}^{\alpha_i}}$$
is an odd (positive integer) with $\frac{\Omega(N) - 1}{2} < \alpha_1,$ then $N$ is ${\it not}$ perfect."</p>
<p>Taking the contrapositive of the result we have obtained, we have: "If
$$N = {p_1}^{2\alpha_1}{q^k}\prod_{i=2}^{\omega(N) - 1}{{p_i}^{\alpha_i}}$$
is an odd perfect number with smallest prime factor $p_1$ and Euler prime $q$, then $\alpha_1 \leq \frac{\Omega(N) - 1}{2}$."</p>
<p>Somebody, please tell me that I ${\it did}$ make a logical error somewhere -- I am finding it increasingly hard to spot my own mistakes these days. =(</p>
<p>Thank you!</p>
| 0non-cybersec
| Stackexchange | 1,400 | 3,485 |
Clicking Notification Center Button Makes Dock Hang. <p>I'm experiencing a very strange issue on my Mid 2012 Retina MacBook Pro with OS X 10.8.5. All of the sudden I discovered that I was unable to command-tab between open applications, the dock would not unhide, I could not open notification center, and I could not three-finger-swipe between desktops. I discovered that force quitting Dock from the Activity Monitor would remedy the problem, but if I click the Notification Center button, the problem returns until I force quit Dock again. The Notification Center does not slide out when I press the button.</p>
<p>I don't click the Notification Center button often, and I know that this problem has started without me clicking the Notification Center button at least twice. However, I did notice that it seemed like this started when I received a Mail notification this morning.</p>
<p>Does anyone know of a solution to this problem?</p>
| 0non-cybersec
| Stackexchange | 216 | 948 |
Mount SMB/CIFS share within a Docker container. <p>I have a web application running in a Docker container. This application needs to access some files on our corporate file server (Windows Server with an Active Directory domain controller). The files I'm trying to access are image files created for our clients and the web application displays them as part of the client's portfolio.</p>
<p>On my development machine I have the appropriate folders mounted via entries in <code>/etc/fstab</code> and the host mount points are mounted in the Docker container via the <code>--volume</code> argument. This works perfectly.</p>
<p>Now I'm trying to put together a production container which will be run on a different server and which doesn't rely on the CIFS share being mounted on the host. So I tried to add the appropriate entries to the <code>/etc/fstab</code> file in the container & mounting them with <code>mount -a</code>. I get <code>mount error(13): Permission denied</code>.</p>
<p>A little research online led me to <a href="http://opensource.com/business/14/9/security-for-docker" rel="noreferrer">this article about Docker security</a>. If I'm reading this correctly, it appears that Docker explicitly denies the ability to mount filesystems within a container. I tried mounting the shares read-only, but this (unsurprisingly) also failed.</p>
<p>So, I have two questions:</p>
<ol>
<li><p>Am I correct in understanding that Docker prevents any use of <code>mount</code> inside containers?</p></li>
<li><p>Can anyone think of another way to accomplish this <strong>without</strong> mounting a CIFS share on the host and then mounting the host folder in the Docker container?</p></li>
</ol>
| 0non-cybersec
| Stackexchange | 430 | 1,709 |
Java toString - ToStringBuilder not sufficient; won't traverse. <p>I need to be able to traverse through my entire object graph and log all contents of all member fields. </p>
<p>For example: Object A has a collection of Object B's which has a collection of Object C's and A, B, C have additional fields on them, etc. </p>
<p>Apache Commons <a href="https://commons.apache.org/lang/api-3.0.1/org/apache/commons/lang3/builder/ToStringBuilder.html" rel="nofollow noreferrer">ToStringBuilder</a> is not sufficient since it won't traverse down an object graph or output contents of a collection.</p>
<p>Does anyone know of another library that will do this or have a code snippet that does this?</p>
| 0non-cybersec
| Stackexchange | 198 | 703 |
How does Facebook notify and instantly shows new comments or how does Stackoverflow do it?. <p>I am a PHP developer and the title basically says it all. However I was hoping on some more in-depth information as I am starting to get confused about how the flow for the project I work on should go.</p>
<p>For an (web) application I need to implement a feature like Facebook does it with notifying users about replies/comments and instantly showing these.</p>
<p>I figured I could use long-polling with ajax requests but this does not seem to be a nice solution as the notifications never really are instant and it is resource heavy.</p>
<p>So I should use some form of sockets if I understand correctly, and Node.Js would be a good choice. So based on the last assumption I now get confused about the work flow.</p>
<p>I thought about two possible solutions:</p>
<p>1) It seems to me, that if I would use Node.Js I could skip using PHP at all and base the application on Node.js only.</p>
<p>2) Or I could use PHP as a base and only use Node.js for notifying users and instantly showing messages but saving the data using PHP and Mysql.</p>
<p>These two possibilities confuse me and I can't make up my mind about what would be the "best" and cleanest way.</p>
<p>I do not have much experience in Node.js, played with it for a while. But managing and saving data seems to be hard in Node.js so that is why I came up with option 2. </p>
<p>I know Facebook is build on PHP so I am assuming that they save the data via PHP and notify / instantly show replies and comments via Node.</p>
<p>Could someone help me out on this? </p>
<p>Thanks in advance!</p>
<p><strong>EDIT:</strong>
I just noticed, Stackoverflow does something similar. I get a notification in the upper left, and below my question a box with "new answer to this question". I am really interested in the technologie(s) used.</p>
| 0non-cybersec
| Stackexchange | 494 | 1,902 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.