text
stringlengths 36
35k
| label
class label 2
classes | source
stringclasses 3
values | tokens_length
int64 128
4.1k
| text_length
int64 36
35k
|
---|---|---|---|---|
Spanning tree in the unit square with low diameter and low degree. <p>Given a finite set of $n$ points in the unit square, I would like to find a spanning tree on these points such that the (Euclidean) distance within the tree between any pair of points is at most a constant, not dependent on $n$.</p>
<p>Any star graph clearly has this property, with maximum diameter $2 \sqrt 2$. However, the maximum degree of this graph is $n-1$. I would like to find such a spanning tree with smaller maximum degree.</p>
<p>If the spanning tree must be a line graph (degree 2), then the minimum diameter may grow as $O(\sqrt n)$, for instance on the grid graph.</p>
<p>If the points are not restricted to the plane, then a n-simplex requires degree $\Theta(n)$ to achieve constant diameter.</p>
<p>For any set of $n$ points in the unit square, does a spanning tree with constant diameter always exist with degree $o(n)$? $O(\log n)$? $O(1)$? $3$?</p>
<p>I would also be interested in hearing about any related research on the area of spanning trees with bounded degree in metric spaces.</p>
| 0non-cybersec
| Stackexchange | 289 | 1,085 |
What is the path of an object under constant acceleration in two directions?. <p>I.e., what is the set of solutions to this system of differential equations:</p>
<p><span class="math-container">$\frac{dx}{dt} = a_x t + v_{ox}$</span></p>
<p><span class="math-container">$\frac{dy}{dt} = a_y t + v_{oy}$</span></p>
<p>which corresponds to the path of an object under constant acceleration in both the <span class="math-container">$x$</span> and <span class="math-container">$y$</span> directions, with initial velocities <span class="math-container">$v_{ox}$</span> and <span class="math-container">$v_{oy}$</span>.</p>
<p>By integrating both then solving one equation to find <span class="math-container">$t = \pm \sqrt{\frac{a_x t^2}{2}}$</span> and plugging that into the other,
I have found that when <span class="math-container">$v_{ox}=x_o=0$</span>, the solution set is:</p>
<p><span class="math-container">$y = \frac{a_y}{a_x}x \pm v_{oy}\sqrt{\frac{2 x}{a_x}} + y_o$</span></p>
<p>where <span class="math-container">$x_o$</span> and <span class="math-container">$y_o$</span> are the initial <span class="math-container">$x$</span> and $$ positions, respectively.</p>
<p>How can I solve this for the general case, i.e. when <span class="math-container">$v_{ox}$</span> and <span class="math-container">$x_o$</span> are not constrained to be zero?</p>
| 0non-cybersec
| Stackexchange | 464 | 1,365 |
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 |
Remove stretch and shrink (glue) from existing length. <p>Suppose I have a length <code>\mylength</code>, defined to be </p>
<pre><code>\setlength{\mylength}{5pt plus 1pt minus 2pt}
</code></pre>
<p>I'd like to make <code>\mylength</code> a fixed length, but keep the default length. In this example, I'd like </p>
<pre><code>\setlength{\mylength}{5pt}
</code></pre>
<p>But what if I didn't know the definition of <code>\mylength</code>? I know I can use <code>\the\mylength</code> to have it printed in the document, which I then can inspect, but I was wondering whether there is a simple way to strip out the glue of a length. </p>
| 0non-cybersec
| Stackexchange | 204 | 638 |
Splitting a XeLaTeX script into separate character files. <p>Not sure what an MWE would be for this question. Basically I have a script written in XeLaTeX, one that includes dialogue, stage directions, and a lot of additional information. What I would like is some way to produce just a dialogue output for each of the main characters (there are 4). I am open to any method, either within XeLaTeX or in post-processing after a PDF is produced.</p>
<p>I have tried doing this with the <a href="https://ctan.org/pkg/ifthen?lang=en" rel="nofollow noreferrer">ifthenelse</a> package, but the logic gets convoluted very quickly. I have searched for a way to just send selected text to separate files, but I haven't located anything that will do that.</p>
| 0non-cybersec
| Stackexchange | 195 | 750 |
Remove items from QListWidget in PyQt5. <p>I am trying to make a refresh button in pyqt5. I am building a desktop app. I wrote the code that scans particular folder and saves filenames and their paths as an array.</p>
<p>Array values are added to QListWidget as items</p>
<pre><code>self.sampleChoose_list.addItems(sample_directory[0])
</code></pre>
<p>I am trying to make a function that refreshes values of the array and passes it to QListWidget.</p>
<p>Something like this</p>
<pre><code>self.refreshSamples.clicked.connect(self.refreshSample)
def refreshSample(self):
sample_directory = []
sample_files = []
for (dirpath, dirnames, filenames) in walk('./Samples'):
filenames = [f for f in filenames if not f[0] == '.']
sample_files.extend(filenames)
break
the_dir = "Samples"
paths = [os.path.abspath(os.path.join(the_dir,filename)) for filename in os.listdir(the_dir) if not filename.startswith('.')]
sample_directory.append(sample_files)
sample_directory.append(paths)
self.sampleChoose_list.addItems(sample_directory[0])
</code></pre>
<p>The problem that I struggle with is: when I push refresh button, new items get added, but the old ones are not deleted. How to remove items from QListWidget?</p>
| 0non-cybersec
| Stackexchange | 395 | 1,277 |
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 |
Powershell script to delete oldest files (not relative to current date). <p>I <strong>DO NOT</strong> want to "delete files older than X days." If I wanted to do this, I'd just pick one of the thousands of scripts out there that have already been written for that purpose, and I wouldn't bother asking such a trivial question on ServerFault.</p>
<p>I <strong>DO</strong> want to delete all but the most recent N files in a particular folder.</p>
<p>Background: a remote system is configured to dump a periodic archive files to a share on a Windows server. These files have a naming convention of YYYYMMDD-hhmm.ext. Should the archive process fail, I don't want the purge script to delete the files just because they are older than so-many-days. There is no way to configure the remote system to purge the files as part of the archive process.</p>
<p>So for example, when the script runs there may be 10 files, there may be 7 files, there may be 5 files in the folder. I need to always keep at least the most recent 5, regardless of how old they are.</p>
<p>Can this be done with PowerShell?</p>
<p>EDIT: it would be desirable to ignore files or folders not matching the naming convention. Other files and folders shouldn't be deleted, nor should they confuse the script (resulting in the retention of fewer than 5 archive files).</p>
| 0non-cybersec
| Stackexchange | 334 | 1,339 |
RE4B challenge 65: how to determine the first dimension of the array?. <p><a href="https://challenges.re/65/" rel="nofollow noreferrer">Challenge 65</a>: Try to determine the dimensions of the array, at least partially. </p>
<pre><code>_array$ = 8
_x$ = 12
_y$ = 16
_z$ = 20
_f PROC
mov eax, DWORD PTR _x$[esp-4]
mov edx, DWORD PTR _y$[esp-4]
mov ecx, eax
shl ecx, 4
sub ecx, eax
lea eax, DWORD PTR [edx+ecx*4]
mov ecx, DWORD PTR _array$[esp-4]
lea eax, DWORD PTR [eax+eax*4]
shl eax, 4
add eax, DWORD PTR _z$[esp-4]
mov eax, DWORD PTR [ecx+eax*4]
ret 0
_f ENDP
</code></pre>
<p>In this challenge, I can only determine the last two dimensions as 60 and 80, so how to determine the first dimension?</p>
<p>I determined: </p>
<pre><code>array[?][60][80]
</code></pre>
<p>Progress to determine last two dimensions:</p>
<pre><code>return: array + 5*16*(4*(16*X-X)+Y)+Z
↓
return: array + 80*(60*X+Y)+Z
↓
The second dimension is 60 and the third dimension is 80.
</code></pre>
<p>.</p>
<p>Answers from Chinese-published version of RE4B, ISBN:9787115434456, Page 944
<a href="https://i.stack.imgur.com/9YW2A.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9YW2A.png" alt="answer"></a></p>
| 0non-cybersec
| Stackexchange | 520 | 1,316 |
Prepopulate database with empty / null values [mysql]. <p>What would be the best way to pre-populate a database with 100 empty fields and then begin the Auto_Increment?</p>
<p>What I mean to say, I want to reserve the first 100 userfields (ie UIDs which are auto_increment) 0 - 100 for "special users" and have the AUTO_INCREMENT start at 101 (as an example).</p>
<p>Obviously I can't set Auto_Increment to 101 as then it will start the UID at 101. And, I don't know beforehand how many special users there will be, however 100 sounds like a reasonable number to reserve.</p>
<p>What kind of null data can I insert and how would you go about this?</p>
| 0non-cybersec
| Stackexchange | 184 | 655 |
Expression Body VS Block Body. <p>While coding, a discrepancy surfaced. Normally while coding simple methods or constructors I often utilize the expression body technique. However, when I produce the following:</p>
<pre><code>public class Sample : ISample
{
private readonly IConfigurationRoot configuration;
public Sample(IConfigurationRoot configuration) => this.configuration = configuration;
}
</code></pre>
<p>The code appears to be valid, Visual Studio and compile both work. The issue though comes if inside that same class, I go to use the <code>configuration</code> variable. It produces <em>"A field initializer cannot reference a non static field initializer."</em></p>
<p>That syntax usage that produced:</p>
<pre><code>var example = configuration.GetSection("Settings:Key").Value;
</code></pre>
<p>However, if I leave the snippet above this and modify to a block body. Visual Studio no longer freaks out, why would an expression body cause such a peculiar error? While the block body works correctly with snippet above?</p>
<pre><code>public class Sample : ISample
{
private readonly IConfigurationRoot configuration;
public Sample(IConfigurationRoot configuration)
{
this.configuration = configuration;
}
}
</code></pre>
<hr>
<pre><code>public class ApplicationProvider
{
public IConfigurationRoot Configuration { get; } = CreateConfiguration();
public IServiceProvider BuildProvider()
{
var services = new ServiceCollection();
DependencyRegistration(services);
return services.AddLogging().BuildServiceProvider();
}
private IConfigurationRoot CreateConfiguration() => new ConfigurationBuilder()
.SetBasePath(AppContext.BaseDirectory)
.AddJsonFile("appsettings.json")
.Build();
private void DependencyRegistration(this IServiceCollection services)
{
services.AddSingleton(_ => Configuration);
// All other dependency registration would also go here.
}
}
public static IServiceProvider ServiceProvider { get; } = new ApplicationProvider().BuildProvider();
</code></pre>
<p>I would have an interface for class, then instantiate by pulling from the provider. </p>
<pre><code>ISample sample = ServiceProvider.GetServices<ISample>();
</code></pre>
| 0non-cybersec
| Stackexchange | 573 | 2,340 |
The existence of an elliptic curve with a specific Galois representation induced by a character. <p>In Kevin Buzzard's <a href="http://www2.imperial.ac.uk/~buzzard/maths/research/papers/survey.pdf" rel="nofollow">survey article on potential modularity</a> Buzzard writes:</p>
<blockquote>
<p>Let us say that we have an elliptic
curve $E$ over a totally real field $F$,
and we want to prove that $E$ is
potentially modular (that is, that $E$
becomes modular over a finite extension
field $F^{′}$ of $F$, also assumed totally
real). Here is a strategy. Say $p$ is
a large prime such that $E[p]$ is
irreducible. Let us write down a
random odd $2$-dimensional mod $ℓ$
Galois representation $\rho_{ℓ} :
> Gal(\overline{F}/F) → GL(2,\mathbf{F}_ℓ )$ which is
induced from a character; because this
representation is induced it is known
to be modular. Now let us consider the
moduli space parametrising elliptic
curves $A$ equipped with </p>
<ol>
<li>An isomorphism $A[p] \cong E[p] $</li>
<li>An isomorphism $A[ℓ]\cong ρ_ℓ$</li>
</ol>
<p>This moduli problem will be
represented by some modular curve,
whose connected components will be
twists of $X(pℓ)$ and hence, if $p$
and $ℓ$ are large, will typically have
large genus. However, such a curve may
well still have lots of rational
points, as long as I am allowed to
look for such things over an arbitrary
finite extension $F^{′}$ of $F$ !</p>
</blockquote>
<p>It's not immediately obvious to me that there's an elliptic curve $A$ over some $F^{′}$ satisfying the second condition alone (never mind satisfying both conditions simultaneously). Is there a simple explanation for why there should be such an $A$? Did Professor Buzzard mean "consider the set of A such that $A[ℓ]\cong ρ_ℓ$ for <em>some</em> representation induced by a character" (as opposed to a particular one)?</p>
| 0non-cybersec
| Stackexchange | 599 | 1,894 |
To prove f(0) = 0 and hence f is a bijection. <p>let $ f:\mathbf{D}\rightarrow \mathbf{D}$ be a holomorphic function. And suppose that it is <strong>Bijective on ${D}\setminus \left \{ 0 \right \}\rightarrow \mathbf{D}\setminus \left \{ 0 \right \} $</strong>. Can we conclude that<br>
f(0) = 0? </p>
<p>I can conclude that $\begin{vmatrix}f(0)\end{vmatrix} < 1$ because other wise if $\begin{vmatrix}f(0)\end{vmatrix} = 1$ then by maximum modulus principle f(z) is constant but that cannot happen because the function is a bijection. but from this is it possible to deduce that f(0)=0 ?</p>
<p>I'm referring the correct answer of <a href="https://math.stackexchange.com/questions/265396/how-to-prove-conformal-self-map-of-punctured-disk-0z1-is-rotation">conformal self maps on punctured disk</a> </p>
| 0non-cybersec
| Stackexchange | 269 | 810 |
Filter table with checkboxes. <p>I am filtering a table with checkboxes.
The code I have works fine, in some aspects.</p>
<p>I want it to filter results if they meet all the checks, not one.</p>
<p>based on: <a href="https://stackoverflow.com/questions/17622103/how-can-i-add-to-my-table-filter-to-allow-for-multiple-checkbox-selections-as-w">How can I add to my table filter to allow for multiple checkbox selections, as well as filtering from a dropdown?</a></p>
<p>My <a href="http://lorencook.com/example/table.html" rel="nofollow noreferrer">Example</a></p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>$("input[name='filterStatus'], select.filter").change(function() {
var classes = [];
var stateClass = ""
$("input[name='filterStatus']").each(function() {
if ($(this).is(":checked")) {
classes.push('.' + $(this).val());
}
});
if (classes == "" && stateClass == "") {
// if no filters selected, show all items
$("#StatusTable tbody tr").show();
} else {
// otherwise, hide everything...
$("#StatusTable tbody tr").hide();
// then show only the matching items
rows = $("#StatusTable tr" + stateClass).filter(classes.length ? classes.join(',') : '*');
if (rows.size() > 0) {
rows.show();
}
}
});</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code><html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
</head>
<body>
<form name="FilterForm" id="FilterForm" action="" method="">
<input type="checkbox" name="filterStatus" value="ISO " />
<label for="filter_1">ISO</label>
<input type="checkbox" name="filterStatus" value="AMCA" />
<label for="filter_2">AMCA</label>
<input type="checkbox" name="filterStatus" value="UL" />
<label for="filter_3">UL</label>
</form>
<table border="1" id="StatusTable">
<thead>
<tr>
<th>Name</th>
<th>ISO</th>
<th>AMCA</th>
<th>UL</th>
</tr>
<tbody>
<tr class="ISO">
<td class="Name">Name1</td>
<td class="ISO">&#x2713;</td>
<td class="AMCA">&nbsp;</td>
<td class="UL">&nbsp;</td>
</tr>
<tr class="ISO AMCA">
<td class="Name">Name2</td>
<td class="ISO">&#x2713;</td>
<td class="AMCA">&#x2713;</td>
<td class="UL">&nbsp;</td>
</tr>
<tr class="ISO AMCA UL">
<td class="Name">Name3</td>
<td class="ISO">&#x2713;</td>
<td class="AMCA">&#x2713;</td>
<td class="UL">&#x2713;</td>
</tr>
</tbody>
</table>
<script></script>
</body>
</html></code></pre>
</div>
</div>
</p>
| 0non-cybersec
| Stackexchange | 1,295 | 3,386 |
Having trouble wrapping functions in the linux kernel. <p>I've written a LKM that implements Trusted Path Execution (TPE) into your kernel:</p>
<p><a href="https://github.com/cormander/tpe-lkm" rel="noreferrer">https://github.com/cormander/tpe-lkm</a></p>
<p>I run into an occasional kernel OOPS (describe at the end of this question) when I define <strong>WRAP_SYSCALLS</strong> to 1, and am at my wit's end trying to track it down.</p>
<p>A little background:</p>
<p>Since the LSM framework doesn't export its symbols, I had to get creative with how I insert the TPE checking into the running kernel. I wrote a find_symbol_address() function that gives me the address of any function I need, and it works very well. I can call functions like this:</p>
<pre><code>int (*my_printk)(const char *fmt, ...);
my_printk = find_symbol_address("printk");
(*my_printk)("Hello, world!\n");
</code></pre>
<p>And it works fine. I use this method to locate the <strong>security_file_mmap</strong>, <strong>security_file_mprotect</strong>, and <strong>security_bprm_check</strong> functions.</p>
<p>I then overwrite those functions with an <em>asm</em> jump to my function to do the TPE check. The problem is, the currently loaded LSM will no longer execute the code for it's hook to that function, because it's been totally hijacked.</p>
<p>Here is an example of what I do:</p>
<pre><code>int tpe_security_bprm_check(struct linux_binprm *bprm) {
int ret = 0;
if (bprm->file) {
ret = tpe_allow_file(bprm->file);
if (IS_ERR(ret))
goto out;
}
#if WRAP_SYSCALLS
stop_my_code(&cs_security_bprm_check);
ret = cs_security_bprm_check.ptr(bprm);
start_my_code(&cs_security_bprm_check);
#endif
out:
return ret;
}
</code></pre>
<p>Notice the section between the <strong>#if WRAP_SYSCALLS</strong> section (it's defined as 0 by default). If set to 1, the LSM's hook is called because I write the original code back over the <em>asm</em> jump and call that function, but I run into an occasional kernel OOPS with an "invalid opcode":</p>
<pre><code>invalid opcode: 0000 [#1] SMP
RIP: 0010:[<ffffffff8117b006>] [<ffffffff8117b006>] security_bprm_check+0x6/0x310
</code></pre>
<p>I don't know what the issue is. I've tried several different types of locking methods (see the inside of <strong>start/stop_my_code</strong> for details) to no avail. To trigger the kernel OOPS, write a simple bash while loop that endlessly starts a backgrounded "ls" command. After a minute or so, it'll happen.</p>
<p>I'm testing this on a RHEL6 kernel, also works on Ubuntu 10.04 LTS (2.6.32 x86_64).</p>
<p>While this method has been the most successful so far, I have tried another method of simply copying the kernel function to a pointer I created with <strong>kmalloc</strong> but when I try to execute it, I get: <em>kernel tried to execute NX-protected page - exploit attempt? (uid: 0)</em>. If anyone can tell me how to kmalloc space and have it marked as executable, that would also help me solve the above problem.</p>
<p>Any help is appreciated!</p>
| 0non-cybersec
| Stackexchange | 997 | 3,143 |
Getting locked out of FTP account. <p>For the past few months, I have had recurring problems being locked out of the FTP account I use. If I open the user account and look at properties, it shows that the account is locked out. If I uncheck the "locked out" checkbox, OK it, and open it up immediately, the vast majority of the time it is locked out again!</p>
<p>My model for what was going on was that some entity was trying madly to log into the FTP account, and so was locked out after 5 failed tries. The group policy for the server is set up so that after 5 failed attempts, the user is locked out for 15 minutes. I thought that there must be scads of attacks occurring many times a second, and that was what was happening.</p>
<p>However, after downloading the FTP logs and looking at them, I found that there is NO activity on that FTP IP address, except for the few occasions where I attempt to log in (occasionally succeeding).</p>
<p>I'm at a loss as to what to do. This has only happened in the last few months -- for years, I had no problems logging onto this account.</p>
<p>This is a Windows Server 2008 R2.</p>
<p>Note: I'm primarily a software developer specializing in web applications using the .NET framework. However, as a service to my ex-boss, for whom I wrote software and for whom I update one of my programs every year, I "maintain" the dedicated server that she rents. Basically, I install updates, maintain a database backup scheme that I set up, and once a month I zip up the database backups and download them to my hard drive using FTP.</p>
<p>(I say all this to let you know that server administration is not my area of expertise!)</p>
| 0non-cybersec
| Stackexchange | 417 | 1,674 |
Save and restore UINavigation stacks to reconnect. <p>I am currently having a hard time understanding what I should use to save and restore my app state.</p>
<p>I am using a storyboard and I have quite some ViewControllers, and I want to save all my navigation stacks when the app is terminated to be able to restore all the navigation when the user relaunch the application.</p>
<p>I am using a <code>UINavigationController</code> with another UINavigationController inside it just for information.</p>
<p>I found this and read this over and over :
<a href="https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/PreservingandRestoringState.html#//apple_ref/doc/uid/TP40007457-CH28-SW34" rel="noreferrer">https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/PreservingandRestoringState.html#//apple_ref/doc/uid/TP40007457-CH28-SW34</a></p>
<blockquote>
<p>(Required) Assign restoration identifiers to the view controllers whose configuration you want to preserve; see Tagging View Controllers for Preservation.</p>
<p>(Required) Tell iOS how to create or locate new view controller objects at launch time; see Restoring View Controllers at Launch Time.</p>
</blockquote>
<p>Then I added a <code>RestorationId</code> on all my ViewControllers but I don't understand what I should do for the second part as when I add <code>viewControllerWithRestorationIdentifierPath</code> methods I don't pass inside.</p>
<p>I also tried to save the <code>navigation.viewcontrollers</code> into the NSUserDefaults in order to use them again when the user restart the app
using the code :</p>
<pre><code>+(NSArray *) getNavStatus
{
NSUserDefaults *preferences = [NSUserDefaults standardUserDefaults];
id objectSaved;
if( (objectSaved = [preferences objectForKey:navStatusKey]) != nil)
return [NSKeyedUnarchiver unarchiveObjectWithData:objectSaved];
else
return nil;
}
+(BOOL) saveNavStatus:(UINavigationController *) nav
{
NSUserDefaults *preferences = [NSUserDefaults standardUserDefaults];
NSData *encodedObject = [NSKeyedArchiver archivedDataWithRootObject:nav.viewControllers];
[preferences setObject:encodedObject forKey:navStatusKey];
// Save to disk
return [preferences synchronize];
}
</code></pre>
<p>But when I get back in the app apple stats to tell me that the constraint ain't respected and that the app will crash and then when I add the viewControllers in the stack of my navigation it does crash :)</p>
<p>Any tips or help would be much appreciated.
Thanks a lot</p>
| 0non-cybersec
| Stackexchange | 717 | 2,593 |
obfuscating keystore password in JBoss 4.2.2 GA. <p>I've setup my jboss app-server to use SSL. The relevant extract from my config is below. Everything is working ok, however some people have expressed concern over the <code>keystorePass</code> attribute being in plain text. Is there any way to obfuscate / encrypt this value?</p>
<p>I'm using JBoss 4.2.2.GA (on Red Hat Enterprise Edition, if that makes any difference)</p>
<pre><code><Connector port="8080"
protocol="HTTP/1.1"
SSLEnabled="true"
maxThreads="150"
scheme="https"
secure="true"
clientAuth="false"
sslProtocol="TLS"
keystoreFile="/somewhere/some.keystore"
keystorePass="somePassword"
keyAlias="tomcat"/>
</code></pre>
<p>Edit, To get away from the security by obscurity approach, an alternative to obfuscating this would be to not supply it at all and have tomcat prompt for the p/w on startup. However as far as I know this isn't supported. Can anyone confirm or deny this?</p>
| 0non-cybersec
| Stackexchange | 307 | 1,004 |
Connecting switches together. <p>I've gotten confused about connecting the switches together. I have L2 switches which will be daisy chained together (yes I know, daisy chaining isn't great, but anyway..) The L2 switches will then link to a L3 switch.</p>
<p>Both the L2 and L3 switches have x4 10GbE SFP+ ports. Would I be able to daisy chain the L2 switches together using the SFP+ port with an Ethernet cable?</p>
<p>Also I was going to link the L2 switches to the L3 switches via Fiber using the SFP+ ports. However in some cases, that maxes out the L3 switch, and I need at least 8 SFP+ on the L3 switch, so is this just a case of adding extra SFP+ modules to the L3 switch?</p>
<p>I also have two different servers, one which have 10Gbe port and one with 10Gb port, would I be able to connect these to the L3 SFP+ via fiber?</p>
| 0non-cybersec
| Stackexchange | 242 | 835 |
vertical centering in longtable. <p>I am typesetting some fraction introduction and have the following as a cell within a longtable:</p>
<pre><code> $\vcenter{
\begin{tikzpicture}[scale=0.5, .style={fontsize=\footnotesize}]
\filldraw[fill=black!10!white, draw=black!70!white]
(0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
\filldraw[fill=white, draw=black!70!white, rotate=120]
(0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
\filldraw[fill=white, draw=black!70!white, rotate=240]
(0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
\end{tikzpicture}
+
\begin{tikzpicture}[scale=0.5, .style={fontsize=\footnotesize}]
\filldraw[fill=white, draw=black!70!white]
(0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
\filldraw[fill=black!10!white, draw=black!70!white, rotate=120]
(0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
\filldraw[fill=black!10!white, draw=black!70!white, rotate=240]
(0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
\end{tikzpicture}
=
\begin{tikzpicture}[scale=0.5, .style={fontsize=\footnotesize}]
\filldraw[fill=black!10!white, draw=black!70!white]
(0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
\filldraw[fill=black!10!white, draw=black!70!white, rotate=120]
(0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
\filldraw[fill=black!10!white, draw=black!70!white, rotate=240]
(0,0) -- (7.5mm, 0) arc (0:120:7.5mm) -- cycle;
\end{tikzpicture}
}$
</code></pre>
<p>I hoped that the "+" and "=" would be vertically centered relative to (with) the TikZ-Pictures. They are not and I do not get why.</p>
| 0non-cybersec
| Stackexchange | 683 | 1,836 |
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 |
I'm Sam Lake, the creator/writer of Max Payne and Alan Wake, AMAA!. *"It's not a lake. It's an ocean."*
…but this time it really is Lake, Sam Lake that is ([proof](https://twitter.com/SamLakeRMD/status/337622274947563520)). I'm the Creative Director at Remedy Entertainment, the game studio that created *Alan Wake* and *Max Payne*. I can't reveal details of our next big thing, *Quantum Break*, yet, but I'd love to discuss anything related to our previous games, how we make games, our history and anything else crazy you can think of… so you can Ask Me *Almost* Anything.
**[Alan Wake Humble Bundle is out now.](http://www.humblebundle.com/weekly)**
Pay what you want and support charities! You can also check out my video announcement to you guys on [the Humble Bundle page](http://www.humblebundle.com/weekly).
*Edit:* This was great, guys, thanks a lot for all the great questions. This was fun. Let's do this again! | 0non-cybersec
| Reddit | 254 | 927 |
Edit email address in Google Form. <p>Here's the steps I took:</p>
<ul>
<li>Made a quiz in Google Forms.</li>
<li>Enabled email address collection.</li>
<li>Sent out the quiz to twenty-five email addresses.</li>
<li>Stopped accepting responses.</li>
<li>Released the scores.</li>
</ul>
<p>However, on the last step, I was surprised to receive two "Delivery Status Notification (Failure)" messages with a DNS error (responded with code NXDOMAIN, domain name not found). While the local-part is correct, two of the the domain names were recorded incorrectly. One has two letters transposed and another has an <code>i</code> replaced with a <code>t</code>.</p>
<p>How can I fix the domain of the recorded email addresses?</p>
| 0non-cybersec
| Stackexchange | 208 | 726 |
Am I spending too much for what I need?. ###Build Help/Ready:
**Have you read the sidebar and [rules](http://www.reddit.com/r/buildapc/wiki/rules)? (Please do)**
yes
**What is your intended use for this build? The more details the better.**
Play games at 144hz mainly fortnite, league, csgo, and modern games like witcher and new games coming out.
**If gaming, what kind of performance are you looking for? (Screen resolution, framerate, game settings)**
1080p + 144hz on competitive games (on other games less fps graphic quality if ok)
**What is your budget (ballpark is okay)?**
1000 usd
**In what country are you purchasing your parts?**
Hawaii USA
**Post a draft of your potential build here (specific parts please). [Consider formatting your parts list.](http://www.reddit.com/r/buildapc/wiki/pcpp) Don't ask to be spoonfed a build (read the rules!)**.
https://pcpartpicker.com/list/JxqxfH
**Provide any additional details you wish below.**
I'll probably end up using a different monitor since the one in the list is curved.
| 0non-cybersec
| Reddit | 299 | 1,047 |
QML ui-toolkit on Ubuntu 12.04. <blockquote>
<p><strong>Possible Duplicate:</strong><br>
<a href="https://askubuntu.com/questions/235440/how-do-i-install-the-qml-toolkit-on-12-04">How do I install the QML toolkit on 12.04?</a> </p>
</blockquote>
<p>I am using Ubuntu 12.04 and I prefer to keep on an LTS distribution. I tried to install the QML ui-toolkit and the ppa doesn't work on my current install of Ubuntu. Will I be able to install it? Will you port the repository?</p>
<p>I don't think I will update since I work with my computer and I prefer to stick to an LTS.</p>
<p>Thank you.</p>
| 0non-cybersec
| Stackexchange | 208 | 605 |
cycle through one command's output and use in another command. <p>How can I use the output of one command - line-by-line - into another command? I know how to do this with the <code>|</code> pipe symbol, but this uses the entire output in one command. I would like to go line by line... I think I need to combine the <code>|</code> and <code>xargs</code> but not sure.</p>
<pre><code>redis-cli keys \* | redis-cli get [key would go here]
</code></pre>
| 0non-cybersec
| Stackexchange | 138 | 457 |
Rg.Plugins.Popup nuget package(1.2.0.223) giving crash for Xamarin UWP Project. <p>I have added Rg.Plugins.Popup package latest version 1.2.0.223 for Xamarin Uwp project and Init that PopUp control in App.xaml.cs file of Uwp solution.</p>
<p>Then I have create one Popup page Xaml and called it from Mainpage.xaml.cs file using method,By calling Its giving crash and debugger.Break() has been called.</p>
<pre><code>/*App.xaml.cs this file Init Popup Control*/
protected override void OnLaunched(LaunchActivatedEventArgs e)
{
Frame rootFrame = Window.Current.Content as Frame;
// Do not repeat app initialization when the Window already has content,
// just ensure that the window is active
if (rootFrame == null)
{
// Create a Frame to act as the navigation context and navigate to the first page
rootFrame = new Frame();
rootFrame.NavigationFailed += OnNavigationFailed;
Rg.Plugins.Popup.Popup.Init();
Xamarin.Forms.Forms.Init(e);
if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
//TODO: Load state from previously suspended application
}
// Place the frame in the current Window
Window.Current.Content = rootFrame;
}
if (rootFrame.Content == null)
{
// When the navigation stack isn't restored navigate to the first page,
// configuring the new page by passing required information as a navigation
// parameter
rootFrame.Navigate(typeof(MainPage), e.Arguments);
}
// Ensure the current window is active
Window.Current.Activate();
}
/*PopUp Control Xaml code*/
<?xml version="1.0" encoding="utf-8" ?>
<pages:PopupPage
x:Class="ProjectName.DashboardBrush.DashbordDistrictPage"
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:pages="clr-namespace:Rg.Plugins.Popup.Pages;assembly=Rg.Plugins.Popup"
xmlns:prism="clr-namespace:Prism.Mvvm;assembly=Prism.Forms"
prism:ViewModelLocator.AutowireViewModel="True">
<StackLayout
Margin="5,50,0,0"
Padding="1"
BackgroundColor="White"
HeightRequest="420"
HorizontalOptions="StartAndExpand"
VerticalOptions="Start"
WidthRequest="200">
<Frame BorderColor="Black">
<ListView
x:Name="districtListView"
CachingStrategy="RecycleElement"
ItemTapped="Handle_ItemTapped"
ItemsSource="{Binding Items, Mode=TwoWay}"
RowHeight="50"
SeparatorColor="Black"
VerticalScrollBarVisibility="Never">
<!-- Built in Cells -->
<ListView.ItemTemplate>
<DataTemplate>
<TextCell Text="{Binding .}" />
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</Frame>
</StackLayout>
</pages:PopupPage>
/*Method From which Popup page is calling*/
async void FilterOptionClicked(object sender, EventArgs e)
{
var dashboardFilterView = new DashboardBrushFilter(dashboardViewModel.selectedFilters.ToArray());
await PopupNavigation.Instance.PushAsync(dashboardFilterView);
}
</code></pre>
| 0non-cybersec
| Stackexchange | 986 | 3,963 |
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 |
Ubuntu 10.10 MySQL. <p>I have installed MySQL on my Ubuntu Server 10.10, all fine, database is running, I can login via mysql -uroot -ppassword or via mysql administrator from another cmoputer etc.</p>
<p>But</p>
<p>When I do :<br>
<code>chkconfig mysql --list</code><br>
<code>mysql 0:off 1:off 2:off 3:off 4:off 5:off 6:off</code> </p>
<pre><code>chkconfig mysql --list
mysql off
</code></pre>
<p>If I do :</p>
<pre><code>service mysql status
mysql start/running, process 665
</code></pre>
<p>I am confused as I thought chkconfig would be used to see what is running at what run levels and it is showing mysql as off. </p>
<p>Also, when I checked the run-level by <code>who -r</code> it was showing as <code>runlevel 2</code> (Ubuntu Server 10.10), i had to do a <code>init 3</code> and then it displayed run-level 3 </p>
<p>Any suggestions would be helpful<br>
Kind Regards </p>
| 0non-cybersec
| Stackexchange | 323 | 920 |
Rails 4.2 DEPRECATION WARNING: `serialized_attributes` is deprecated without replacement,. <p>This warning shows up for me (for everyone) in the majority of controller tests. I know its just a warning...for now...until 5 is released. I am unsure what I need to change to comply with this deprecation. What has changed with serialized_attributes? Id like to make this warning go away and improve my code in prep for 5.0...but unsure how to proceed. Thanks.</p>
<h1>update</h1>
<p>When hitting a standard update action from a controller test...I get the error:</p>
<pre><code>@document.update_attributes(document_params)
</code></pre>
<p>in the test (condensed for this example):</p>
<pre><code> before do
@document = documents(:drivers_license)
end
def valid_params
{ name: 'Passport' }
end
it "must update document" do
put :update, id: @document, document: valid_params
assert_redirected_to documents_path
end
</code></pre>
<p>This test passes, but now in rails 4.2 puts the error: DEPRECATION WARNING: <code>serialized_attributes</code> is deprecated without replacement, and will be removed in Rails 5.0."</p>
<p>So, in this example...are the serialized_attributes "{ name: 'Passport' }"?</p>
| 0non-cybersec
| Stackexchange | 367 | 1,257 |
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 |
I'm getting a popping noise and read errors from the hard drive during a partitioning work with GParted. <p>I'm trying to move a partition from a GParted live disk, but two things started happening:</p>
<ol>
<li>The disk is making a popping/cracking noise, almost like a Geiger counter.</li>
<li>GParted says <code>Read error on /dev/sda</code>, and offers to ignore, cancel, or retry. Hitting any of the options just makes the message pop up again. In addition, Cancel and Retry cause the progress bar to advance.</li>
</ol>
<p>GParted already finished shrinking another partition without issues; if I force-reboot, will that partition still be fine?</p>
<p>What can I do to minimize data loss and (hopefully) recover from this? Is the data a lost cause, or is there hope?</p>
| 0non-cybersec
| Stackexchange | 220 | 785 |
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 tan(a+b) identity. <p>How do I prove the addition formula for <span class="math-container">$\tan(a+b)$</span>?</p>
<p>I have <span class="math-container">$$\displaystyle \frac{\sin(a+b)}{\cos(a+b)}=\frac{\sin(a)\cos(b)+\cos(a)\sin(b)}{\cos(a)\cos(b)-\sin(a)\sin(b)}$$</span> but that's way more complicated than the result I need, which is <span class="math-container">$$\displaystyle \frac{\tan(a)+\tan(b)}{1-\tan(a)\tan(b)}$$</span></p>
<p>Am I on the right track? What should I do next? </p>
| 0non-cybersec
| Stackexchange | 185 | 503 |
New Itunes connect : Submitting app for review. <p>I am trying to submit a new version of my existing app in itunes connect but I am having difficulties. So I uploaded my build like usual and upload done. I went into pre-release and saw the status processing. This was 12 hours ago, now though it has changed from processing to inactive. I ignored that and went and chose the build anyways and clicked on "Submit for Review"</p>
<p>I get an error saying <strong>You must submit your builds using Xcode 5.1.1 or later, or Application Loader 2.9.1 or later. After you’ve submitted a build, select it in the Builds section below.</strong></p>
<p>But I did submit a build using Xcode 6 seed version. I also tried to upload the build again but I get an error saying that a buid already exists. I figured I will try to delete the build, from the pre-release tab and try to upload a new build but I cant find a way to do this. </p>
<p>Makes me think it has something to do with the <strong>inactive</strong> status of the build. Is anybody else having this issue?</p>
| 0non-cybersec
| Stackexchange | 274 | 1,064 |
Infer signs of generalized eigenvalues of $(A,B)$ for real $PSD$ $ A$ and real symmetric $B$. <p>Let $A \in \mathbb{R}^{n\times n}$ be a symmetric positive semi-definite matrix with exactly one zero eigenvalue and $B \in \mathbb{R}^{n\times n}$ be a symmetric matrix having $k$ positive eigenvalues.</p>
<p>Is it possible to infer the number of positive eigenvalues of the GEP </p>
<p>$Av = \lambda B v$ </p>
<p>given the above information? Or some bounds on the number of positive eigenvalues?</p>
<p>I assume that the generalized eigenvalues will be real in this case, but I'm not sure about the proof. Following the <a href="http://www.doc.ic.ac.uk/~ae/papers/lecture05.pdf" rel="nofollow noreferrer">classic proof</a> for the basic eigenvalue problem results in </p>
<p>$u^{*T}Bu(\lambda^* - \lambda) = 0$</p>
<p>with $u^{*T}Bu$ not necessarily being nonzero if $B$ is just a real symmetric matrix.</p>
<p>A <a href="https://math.stackexchange.com/questions/498082/consequences-of-the-properties-of-b-on-the-results-of-a-generalized-eigenvalue">similar question</a> assumes a general matrix $A$, not a real PSD one.</p>
<p>Another <a href="https://math.stackexchange.com/questions/171612/generalized-eigenvalue-problem-with-one-matrix-having-low-rank?rq=1">related question</a> points out, that the number of generalized eigenvalues equal to zero will be the same as the number of such eigenvalues of $A$, but I don't understand the argumentation.</p>
| 0non-cybersec
| Stackexchange | 458 | 1,465 |
Android: Intended use of fragments with services, dialogs etc. <p>I've been creating android apps for a few months now and I'm having trouble with the intended use of <code>Fragments</code>.</p>
<p><code>Fragments</code> are supposed to be reusable UI components but how far do you make them stand alone?</p>
<p>One of the <code>Fragments</code> I've created is a <code>ListFragment</code> of downloadable videos. At the moment I've implemented all the methods inside the <code>Fragment</code> with little or none of the methods calling the host <code>Activity</code>. The <code>Fragment</code> calls the <code>Activity</code> for a few minor things but everything like downloading files and finding them on external storage is done by the <code>Fragment</code>.</p>
<p>90% of the time I find it's the easiest way of implementing it but there's some times it just doesn't work.</p>
<p>An example is a confirmation dialog for deleting a video in my <code>ListFragment</code>. The dialog is a <code>DialogFragment</code> so is attached to the <code>Activity</code> but all the UI update and deletion methods are inside the <code>ListFragment</code>. So I end up with the <code>DialogFragment</code> calling the <code>Activity</code> just to call the <code>ListFragment</code>.</p>
<p>Another example is binding to a <code>Service</code>. Do I bind the <code>Activity</code> to the <code>Service</code> or just the <code>Fragment</code>? The <code>Activity</code> has no use for the <code>Service</code> but is a <code>Fragment</code> supposed to be doing all the work of starting and maintaining a <code>Service</code>? If not it means all the <code>Fragments</code> calls to the <code>Service</code> have to go through the <code>Activity</code> so the <code>Fragment</code> is no longer stand alone.</p>
<p>I'm wondering if I'm taking the stand alone idea too far, is a <code>Fragment</code> instead supposed to be minimally self-contained and actually rely on the <code>Activity</code> hosting it for all the heavy lifting?</p>
<p>Thanks for any help.</p>
| 0non-cybersec
| Stackexchange | 567 | 2,063 |
AdView - Missing adActivity with android:configChanges in AndroidManifest.xml. <p>I just set up my app with the Google Play library method of adding adds (AdMob). When I run the emulator the add has the error message:</p>
<pre><code>Missing adActivity with android:configChanges in AndroidManifest.xml
</code></pre>
<p>I located a fix at:</p>
<p><a href="https://stackoverflow.com/questions/20276027/missing-adactivity-with-androidconfigchanges-in-androidmanifest-xml">Missing adActivity with android:configChanges in AndroidManifest.xml</a></p>
<p>The fix stated to do the following:</p>
<blockquote>
<p>"com.google.ads.AdActivity" is declared when using the admob sdk jar in the "libs" folder. >It seems you're using admob via the google play services library so change:</p>
<p>activity android:name="com.google.ads.AdActivity"</p>
<p>To</p>
<p>activity android:name="com.google.android.gms.ads.AdActivity"</p>
<p>Also make sure you add the meta-data tag:</p>
<p>
</blockquote>
<p>I tried this and the CatLog said to change the meta tag back to:</p>
<pre><code> <meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
</code></pre>
<p>My LogCat:</p>
<pre><code>02-23 14:30:27.091: E/AndroidRuntime(1278): FATAL EXCEPTION: main
02-23 14:30:27.091: E/AndroidRuntime(1278): Process: biz.midl.debtcalculator, PID: 1278
02-23 14:30:27.091: E/AndroidRuntime(1278): java.lang.RuntimeException: Unable to start activity ComponentInfo{biz.midl.debtcalculator/biz.midl.debtcalculator.MainActivity}: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4242000 but found 0. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
02-23 14:30:27.091: E/AndroidRuntime(1278): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2195)
02-23 14:30:27.091: E/AndroidRuntime(1278): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2245)
02-23 14:30:27.091: E/AndroidRuntime(1278): at android.app.ActivityThread.access$800(ActivityThread.java:135)
02-23 14:30:27.091: E/AndroidRuntime(1278): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
02-23 14:30:27.091: E/AndroidRuntime(1278): at android.os.Handler.dispatchMessage(Handler.java:102)
02-23 14:30:27.091: E/AndroidRuntime(1278): at android.os.Looper.loop(Looper.java:136)
02-23 14:30:27.091: E/AndroidRuntime(1278): at android.app.ActivityThread.main(ActivityThread.java:5017)
02-23 14:30:27.091: E/AndroidRuntime(1278): at java.lang.reflect.Method.invokeNative(Native Method)
02-23 14:30:27.091: E/AndroidRuntime(1278): at java.lang.reflect.Method.invoke(Method.java:515)
02-23 14:30:27.091: E/AndroidRuntime(1278): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
02-23 14:30:27.091: E/AndroidRuntime(1278): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
02-23 14:30:27.091: E/AndroidRuntime(1278): at dalvik.system.NativeStart.main(Native Method)
02-23 14:30:27.091: E/AndroidRuntime(1278): Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value. Expected 4242000 but found 0. You must have the following declaration within the <application> element: <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
02-23 14:30:27.091: E/AndroidRuntime(1278): at com.google.android.gms.common.GooglePlayServicesUtil.n(Unknown Source)
02-23 14:30:27.091: E/AndroidRuntime(1278): at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
02-23 14:30:27.091: E/AndroidRuntime(1278): at com.google.android.gms.internal.u.a(Unknown Source)
02-23 14:30:27.091: E/AndroidRuntime(1278): at com.google.android.gms.internal.ag.U(Unknown Source)
02-23 14:30:27.091: E/AndroidRuntime(1278): at com.google.android.gms.internal.ag.a(Unknown Source)
02-23 14:30:27.091: E/AndroidRuntime(1278): at com.google.android.gms.ads.AdView.loadAd(Unknown Source)
02-23 14:30:27.091: E/AndroidRuntime(1278): at biz.midl.debtcalculator.MainActivity.onCreate(MainActivity.java:41)
02-23 14:30:27.091: E/AndroidRuntime(1278): at android.app.Activity.performCreate(Activity.java:5231)
02-23 14:30:27.091: E/AndroidRuntime(1278): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
02-23 14:30:27.091: E/AndroidRuntime(1278): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
02-23 14:30:27.091: E/AndroidRuntime(1278): ... 11 more
</code></pre>
<p>Here is my .java:</p>
<pre><code>import java.text.DecimalFormat;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdSize;
import com.google.android.gms.ads.AdView;
public class MainActivity extends Activity {
private AdView adView;
double interestRate;
double r, r1;
int nRemaining, nStarting, nDifference, originalBalance,
outstandingBalance, originalTerm;
double minPayment, additionalPayment, newPmt;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
adView = new AdView(this);
adView.setAdUnitId("xxxxxxxxxxxxxxxxxxxxxxxxxxxx"); //edited out my unitID
adView.setAdSize(AdSize.BANNER);
LinearLayout layout = (LinearLayout) findViewById(R.id.ll);
layout.addView(adView);
AdRequest adRequest = new AdRequest.Builder().build();
adView.loadAd(adRequest);
</code></pre>
<p>Here is my Layout:</p>
<pre><code><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:id="@+id/ll"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:weightSum="1" >
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
ads:adSize="BANNER"
ads:adUnitId="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
</code></pre>
<p>I also have my Manifest:</p>
<pre><code> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="biz.midl.debtcalculator"
android:versionCode="1"
android:versionName="1" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="19" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<meta-data
android:name="com.google.android.gms.version"
android:value="@integer/google_play_services_version" />
<activity
android:name="com.google.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<activity
android:name="biz.midl.debtcalculator.MainActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.DeviceDefault.Light.NoActionBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="biz.midl.debtcalculator.About"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.DeviceDefault.Light.NoActionBar.Fullscreen" >
<intent-filter>
<action android:name="android.intent.action.ABOUT" />
</intent-filter>
</activity>
</application>
</manifest>
</code></pre>
| 0non-cybersec
| Stackexchange | 2,824 | 8,741 |
Risks of running my own java code on a production server. <p>I work as an operation engineer in a telecom company, i have several servers under my responsibility, and my main task is to perform the "daily health check" for those, part of that is to compare some values with the previous ones, i am considering different options to plot the data, i need your help to evaluate the risks of running my own small java program on those servers considering that i am far from being the best developer out there, for example if i somehow start an endless loop or i don't free the resources that i allocate.</p>
<p>Thanks in advance.</p>
| 0non-cybersec
| Stackexchange | 142 | 631 |
Account Settings Action required. <p>I don't think this has anything to do with gtag.js because it's the same for all my properties. I think it has something to do with my account itself. But I can't tell what action is required.</p>
<p><a href="https://i.stack.imgur.com/NNG0T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NNG0T.png" alt="enter image description here"></a></p>
<p>Here's what the code looks like:</p>
<pre><code><ga-action-required ng-if="ctrl.isActionRequired" class="ng-scope ng-isolate-scope">
<div class="admin-action-required">
<md-chips class="ng-isolate-scope md-ga-theme" tabindex="-1">
<md-chips-wrap id="_md-chips-wrapper-320" tabindex="-1"
ng-keydown="$mdChipsCtrl.chipKeydown($event)"
ng-class="{ 'md-focused': $mdChipsCtrl.hasFocus(),
'md-readonly': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly, 'md-removable': $mdChipsCtrl.isRemovable() }" class="md-chips md-readonly" aria-label="Chips input." role="list">
<md-chip class="ng-scope md-ga-theme" role="listitem" aria-setsize="1">
<md-icon md-font-set="material-icons-extended" aria-hidden="true"
ng-bind="::'warning'"
class="ng-binding md-ga-theme material-icons-extended" role="img">
warning
</md-icon>
<div class="text-container"> Action required </div>
</md-chip>
<!-- ngRepeat: $chip in $mdChipsCtrl.items -->
<!-- ngIf: !$mdChipsCtrl.readonly && $mdChipsCtrl.ngModelCtrl -->
</md-chips-wrap>
</md-chips>
</div>
</code></pre>
<p></p>
| 0non-cybersec
| Stackexchange | 614 | 1,808 |
Help! My university is trying to DOS my router!. First, some background. I am a student at a university right now, living in student housing. My wife and I have been living here for about 7 months, and we will be leaving in a month. Since we've been here, we've had access to the university network through one single wired ethernet port in our living room. We've hooked that port up to a Linksys E2000 router running dd-wrt so that we can have wireless access.
My university for reasons I can't comprehend is deciding to do away with the wired connections in the student housing buildings, and installing a wireless only network. Seems like they will be installing wireless routers throughout the stairwells, and converting the current wired connection to only stream their IPTV. Essentially everyone in the building will be on the exact same network. Obviously this is a terrible idea, but it's going to happen, no matter what the students say.
I recently found out that technically they can't pull my wired connection yet, as I'm entitled to one in my contract that I signed. They will be updating the contract in June, but I'll be gone by then so I won't have to re-sign. However, it seems like they are still going to try and take down my own personal network. I've talked to a friend of mine who works for the University's network division, and he told me that the routers they are installing have some sort of search and destroy feature. From what he told me, it seems like it will scan for rogue access points, and DOS them with login requests until the signal is no longer available.
I have my own wireless router, so I'm worried about this. My first question, what is the legality of this? I understand that it is their network, but there is no rule against having your own router, and is necessary if you want wireless in your apartment. Secondly, I thought DOS actions were a criminal act, this somehow has to have an effect here.
My second question, is there anything I can do to defend against this? I am running dd-wrt so I do have access to more tools than a standard's router firmware. I'm considering blocking the mac address of the router trying to dos me, but to be honest I don't even know if this is possible or if it is, if it has any effect.
Any help with either of these questions is greatly appreciated.
**TL; DR My university is trying to DOS my wireless router on their network, even though it's allowed. Is this legal, and can I prevent it?** | 1cybersec
| Reddit | 550 | 2,480 |
Project <PROJECT NAME> is not up to date. Missing input file 'netframework,version=v4.0,profile=client.assemblyattributes.cs. <p>I have a sln with > 50 projects, and recently, when I moved to VS2013, every time I press F5 for a build, it will rebuild all the projects, even though I have just performed a build. The diagnostics show, that each project is marked as not up to date with the following error:</p>
<pre><code>Project <PROJECT NAME> is not up to date. Missing input file 'c:\users\USER\appdata\local\temp\2\.netframework,version=v4.0,profile=client.assemblyattributes.cs
</code></pre>
<p>I have read these threads: </p>
<ul>
<li><p><a href="https://stackoverflow.com/questions/3104356/in-visual-studio-2010-why-is-the-netframework-version-v4-0-assemblyattributes-c">In Visual Studio 2010 why is the .NETFramework,Version=v4.0.AssemblyAttributes.cpp file created, and can I disable this?</a></p></li>
<li><p><a href="https://social.msdn.microsoft.com/Forums/vstudio/en-US/15d65667-ac47-4234-9285-32a2cb397e32/migration-from-vs2008-to-vs2010-and-netframeworkversionv40assemblyattributescpp?forum=vcgeneral" rel="noreferrer">https://social.msdn.microsoft.com/Forums/vstudio/en-US/15d65667-ac47-4234-9285-32a2cb397e32/migration-from-vs2008-to-vs2010-and-netframeworkversionv40assemblyattributescpp?forum=vcgeneral</a></p></li>
</ul>
<p>but the suggestion there is to add the following line to the proj file:</p>
<pre><code> <Target Name="GenerateTargetFrameworkMonikerAttribute" />
</code></pre>
<p>I did and it did not work. Suppressing the warning as MS suggestion will also not work as the project will remain "not up to date".</p>
<p>I am using VS2013, C# and VB projects. <strong>With the very same project and VS2012, such error is not raised and the projects are up to date.</strong></p>
<p>Any suggestions?</p>
<p><strong>UPDATE</strong>
Perhaps it is worth mentioning that I do have a few build definitions in the solution, where all of the projects are building for AnyCPU except one: <a href="http://screencast.com/t/fuw9k4IubN" rel="noreferrer">http://screencast.com/t/fuw9k4IubN</a></p>
| 0non-cybersec
| Stackexchange | 703 | 2,139 |
Best Notation for Introducing Finite Numbers of Elements. <p>What is the best way to quantify over a finite number of elements of a set? For instance, suppose that one wished to quantify over $n$ real numbers $a_1,\ldots,a_n$ in order to state a property of their sum. In such a case, I often see authors quantify over the upper bound of the sum. For instance:
$$ \phi_1 \equiv \forall n \in \mathbb{N}~.~\sum_{i = 1}^n \ln a_i = \ln \left ( \prod_{i = 1}^n a_i \right ) $$
If an author wishes to be explicit, he or she will sometimes quantify over the $a_i$ using ellipses:
$$ \phi_2 \equiv \forall n \in \mathbb{N}\forall a_1,\ldots,a_n \in \mathbb{R}~.~\sum_{i = 1}^n \ln a_i = \ln \left ( \prod_{i = 1}^n a_i \right ) $$
Sometimes, I see authors use index notation with a suitable data type. For instance, if $A^*_n$ denotes the set of multisets of size $n$ of elements of $A$, then one could introduce elements more precisely. Otherwise, one could sum or multiply over the elements of the multiset in the following way:
$$ \phi_3 \equiv \forall n \in \mathbb{N}\forall \alpha \in \mathbb{R}^*_n~.~\sum_{a \in \alpha} \ln a = \ln \left ( \prod_{a \in \alpha} a \right ) $$
Of course, a multiset is usually defined in terms of a family of elements. If we are given a function indexing the elements of a set, then we can write:
$$ \phi_4 \equiv \forall n \in \mathbb{N}\forall f : n + 1 \rightarrow \mathbb{R}~.~\sum_{i = 1}^n \ln f(i) = \ln \left ( \prod_{i = 1}^n f(i) \right ) $$
If none of the $\phi_i$ contain ideal notations for introducing a finite number of elements, what is the most ideal notation? For brevity, I would usually opt for the first, but I feel that it's incomplete. I hope this isn't a completely trivial question.</p>
| 0non-cybersec
| Stackexchange | 542 | 1,753 |
Showing a decomposition of a topological space is upper semicontinuous. <p><strong>In the section on quotient spaces,</strong> my text (Willard) defines a decomposition $\mathscr{D}$ of X as a collection of disjoint subsets of X whose union is X. (I consider this to be synonymous with "partition.")</p>
<p>The topology of the decomposition is derived from the topology of X, in that a subset of the decomposition is open iff the union of its elements in X is open. </p>
<p>Additionally, the term "upper semicontinuous" is used to describe a decomposition if, for all open sets U containing an element of $\mathscr{D}$, there is an open set $V\subseteq U$ such that V is a union of elements of $\mathscr{D}$</p>
<p><strong>I'm supposed to "directly" (presumably, by the definition) show that "the decomposition of the plane into concentric circles about the origin" is upper semicontinuous.</strong> </p>
<p>I should be able to show, that for any open set U containing F (a closed circle centered at the origin, an element of D), there is some $\epsilon_0 > 0$ such that $\bigcup B_{\epsilon_{0}}(x)$ for $x \in F$ (the "open annulus of radius epsilon" around F" must be contained in U. (This would also be the union of elements of D, which I have established earlier and don't wish to write up here since it is obvious.)</p>
<p>If there were no such $\epsilon_0$ then I feel that there would necessarily be some $x \in F$ where, for all $\epsilon > 0$, $B_\epsilon(x) \notin U$. However, I know this is expressly not a correct line of reasoning, since it would not work if the set F were a copy of the real line...</p>
<p>My problem: My topology text has not yet covered limits or compactness, and I feel that one or the other of these theories would be necessary to actually establish the claim in the paragraph above. I feel it should establish the existence of such an x on the circle, since the circle is compact. </p>
<p>Is there a different way to show that the open annulus must be contained in U, without resorting to compactness? Hints are fine.</p>
| 0non-cybersec
| Stackexchange | 541 | 2,073 |
XeLaTeX with fontspec gives “Undefined control sequence” error after MiKTeX update - volume 2. <p>I have the very same problem as in <a href="https://tex.stackexchange.com/questions/295126">https://tex.stackexchange.com/questions/295126</a>. But in my case, repeatedly running the two MiKTeX updaters does not solve the problem. I also tried running both package managers, synchronizing the database, and running both updaters again. I can see in the log that my LaTeX3 packages are outdated but then why doesn't the updater update them?</p>
<p>MWE:</p>
<pre><code>\documentclass{article}
\usepackage{fontspec}
\begin{document}
Hi
\end{document}
</code></pre>
<p>Log:</p>
<pre><code>This is XeTeX, Version 3.14159265-2.6-0.99992 (MiKTeX 2.9) (preloaded format=xelatex 2016.4.25) 25 APR 2016 13:39
entering extended mode
**"D:/Marci/Google Drive/tex/nodecolon.tex"
("D:/Marci/Google Drive/tex/nodecolon.tex"
LaTeX2e <2016/03/31>
Babel <3.9q> and hyphenation patterns for 70 language(s) loaded.
("C:\Program Files\MiKTeX\tex\latex\base\article.cls"
Document Class: article 2014/09/29 v1.4h Standard LaTeX document class
("C:\Program Files\MiKTeX\tex\latex\base\size10.clo"
File: size10.clo 2014/09/29 v1.4h Standard LaTeX file (size option)
)
\c@part=\count79
\c@section=\count80
\c@subsection=\count81
\c@subsubsection=\count82
\c@paragraph=\count83
\c@subparagraph=\count84
\c@figure=\count85
\c@table=\count86
\abovecaptionskip=\skip41
\belowcaptionskip=\skip42
\bibindent=\dimen102
)
("C:\Program Files\MiKTeX\tex\latex\fontspec\fontspec.sty"
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\expl3.sty
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3names.sty
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3bootstrap.sty
Package: l3bootstrap 2013/07/28 v4581 L3 Experimental bootstrap code
)
Package: l3names 2012/12/07 v4346 L3 Namespace for primitives
) (C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\misc\etex.sty
Package: etex 2016/01/11 v2.6 eTeX basic definition package (PEB,DPC)
\et@xins=\count87
)
Package: expl3 2013/10/13 v4597 L3 Experimental code bundle wrapper
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3basics.sty
Package: l3basics 2013/07/28 v4581 L3 Basic definitions
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3expan.sty
Package: l3expan 2013/08/17 v4584 L3 Argument expansion
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3tl.sty
Package: l3tl 2013/09/16 v4592 L3 Token lists
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3seq.sty
Package: l3seq 2013/07/28 v4581 L3 Sequences and stacks
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3int.sty
Package: l3int 2013/08/02 v4583 L3 Integers
\c_max_int=\count88
\l_tmpa_int=\count89
\l_tmpb_int=\count90
\g_tmpa_int=\count91
\g_tmpb_int=\count92
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3quark.sty
Package: l3quark 2013/07/21 v4564 L3 Quarks
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3prg.sty
Package: l3prg 2013/08/25 v4587 L3 Control structures
\g__prg_map_int=\count93
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3clist.sty
Package: l3clist 2013/07/28 v4581 L3 Comma separated lists
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3token.sty
Package: l3token 2013/08/25 v4587 L3 Experimental token manipulation
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3prop.sty
Package: l3prop 2013/07/28 v4581 L3 Property lists
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3msg.sty
Package: l3msg 2013/07/28 v4581 L3 Messages
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3file.sty
Package: l3file 2013/10/13 v4596 L3 File and I/O operations
\l_iow_line_count_int=\count94
\l__iow_target_count_int=\count95
\l__iow_current_line_int=\count96
\l__iow_current_word_int=\count97
\l__iow_current_indentation_int=\count98
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3skip.sty
Package: l3skip 2013/07/28 v4581 L3 Dimensions and skips
\c_zero_dim=\dimen103
\c_max_dim=\dimen104
\l_tmpa_dim=\dimen105
\l_tmpb_dim=\dimen106
\g_tmpa_dim=\dimen107
\g_tmpb_dim=\dimen108
\c_zero_skip=\skip43
\c_max_skip=\skip44
\l_tmpa_skip=\skip45
\l_tmpb_skip=\skip46
\g_tmpa_skip=\skip47
\g_tmpb_skip=\skip48
\c_zero_muskip=\muskip10
\c_max_muskip=\muskip11
\l_tmpa_muskip=\muskip12
\l_tmpb_muskip=\muskip13
\g_tmpa_muskip=\muskip14
\g_tmpb_muskip=\muskip15
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3keys.sty
Package: l3keys 2013/07/28 v4581 L3 Experimental key-value interfaces
\g__keyval_level_int=\count99
\l_keys_choice_int=\count100
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3fp.sty
Package: l3fp 2013/07/09 v4521 L3 Floating points
\c__fp_leading_shift_int=\count101
\c__fp_middle_shift_int=\count102
\c__fp_trailing_shift_int=\count103
\c__fp_big_leading_shift_int=\count104
\c__fp_big_middle_shift_int=\count105
\c__fp_big_trailing_shift_int=\count106
\c__fp_Bigg_leading_shift_int=\count107
\c__fp_Bigg_middle_shift_int=\count108
\c__fp_Bigg_trailing_shift_int=\count109
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3box.sty
Package: l3box 2013/07/28 v4581 L3 Experimental boxes
\c_empty_box=\box26
\l_tmpa_box=\box27
\l_tmpb_box=\box28
\g_tmpa_box=\box29
\g_tmpb_box=\box30
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3coffins.sty
Package: l3coffins 2012/09/09 v4212 L3 Coffin code layer
\l__coffin_internal_box=\box31
\l__coffin_internal_dim=\dimen109
\l__coffin_offset_x_dim=\dimen110
\l__coffin_offset_y_dim=\dimen111
\l__coffin_x_dim=\dimen112
\l__coffin_y_dim=\dimen113
\l__coffin_x_prime_dim=\dimen114
\l__coffin_y_prime_dim=\dimen115
\c_empty_coffin=\box32
\l__coffin_aligned_coffin=\box33
\l__coffin_aligned_internal_coffin=\box34
\l_tmpa_coffin=\box35
\l_tmpb_coffin=\box36
\l__coffin_display_coffin=\box37
\l__coffin_display_coord_coffin=\box38
\l__coffin_display_pole_coffin=\box39
\l__coffin_display_offset_dim=\dimen116
\l__coffin_display_x_dim=\dimen117
\l__coffin_display_y_dim=\dimen118
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3color.sty
Package: l3color 2012/08/29 v4156 L3 Experimental color support
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3luatex.sty
Package: l3luatex 2013/07/28 v4581 L3 Experimental LuaTeX-specific functions
\g__cctab_allocate_int=\count110
\g__cctab_stack_int=\count111
)
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3kernel\l3candidates.sty
Package: l3candidates 2013/07/24 v4576 L3 Experimental additions to l3kernel
\l__box_top_dim=\dimen119
\l__box_bottom_dim=\dimen120
\l__box_left_dim=\dimen121
\l__box_right_dim=\dimen122
\l__box_top_new_dim=\dimen123
\l__box_bottom_new_dim=\dimen124
\l__box_left_new_dim=\dimen125
\l__box_right_new_dim=\dimen126
\l__box_internal_box=\box40
\l__coffin_bounding_shift_dim=\dimen127
\l__coffin_left_corner_dim=\dimen128
\l__coffin_right_corner_dim=\dimen129
\l__coffin_bottom_corner_dim=\dimen130
\l__coffin_top_corner_dim=\dimen131
\l__coffin_scaled_total_height_dim=\dimen132
\l__coffin_scaled_width_dim=\dimen133
) ("C:\Program Files\MiKTeX\tex\generic\oberdiek\ifpdf.sty"
Package: ifpdf 2011/01/30 v2.3 Provides the ifpdf switch (HO)
Package ifpdf Info: pdfTeX in PDF mode is not detected.
))
(C:\Users\Marci\AppData\Roaming\MiKTeX\2.9\tex\latex\l3packages\xparse\xparse.s
ty
Package: xparse 2013/10/13 v4597 L3 Experimental document command parser
\l__xparse_current_arg_int=\count112
\l__xparse_m_args_int=\count113
\l__xparse_mandatory_args_int=\count114
\l__xparse_processor_int=\count115
\l__xparse_v_nesting_int=\count116
)
Package: fontspec 2016/02/01 v2.5a Font selection for XeLaTeX and LuaLaTeX
! Undefined control sequence.
l.17 \sys_if_engine_luatex:T
</code></pre>
| 0non-cybersec
| Stackexchange | 3,363 | 7,886 |
how to run openssl dhparam quietly?. <p>I'm writing an install script including generating a Diffie Hellman file with the command</p>
<pre><code>openssl dhparam -out /tmp/dhparam.pem 2048
</code></pre>
<p>As it can take some time and it isn't required for the following steps, I was thinking to make it run in the background but I can't find a way to make it run quietly, it keeps logging in the terminal where the script is running. Here are some failed attempts:</p>
<pre><code>openssl dhparam -out /tmp/dhparam.pem 2048 > /dev/null &
openssl dhparam -out /tmp/dhparam.pem -quiet 2048 &
</code></pre>
<p>It doesn't seem to be writing to stdout, (but rather directly on /dev/tty ?) so I'm out of idea on how to make it quiet: any clue?</p>
| 0non-cybersec
| Stackexchange | 232 | 756 |
How to say if Eigenvectors of A are orthogonal or not? without computing eigenvectors. <p>I am give matrix :
$$A=\begin{bmatrix} 0&-1 & 2 \\ -1 & -1 & 1 \\ 2 & 1 &0
\end{bmatrix}
$$
<li>1. Without finding the eigenvalues and eigenvectors, determine whether the eigenvectors are orthogonal or not. Justify your answer
<li>2. Express matrix $A$ in the form $A=UDU^T$ where $D$ is a diagonal matrix and $U$ is an orthogonal matrix. What are $U$ and $D$ ?</p>
<p><li>I can check if a vectors are orthogonal or not, by dot product = 0
<li>I know that if $B^T=B^{-1}$ so that $B$ be can be said orthogonal, and $B^TB=I$
<li> I also can find the eigenvalues and eigenvectors, but the question asks without finding them..</p>
<p>How to check whether eigenvalues are orthogonal or not without finding?
and how to express $A=UDU^T$?</p>
| 0non-cybersec
| Stackexchange | 275 | 857 |
How to copy Timeshift file into usb Linux Mint. <p>I have recently upgraded from "python 3.6.8" to "python 3.7.3" . I have also installed sublime text editor. When I open my laptop, it is booting fine ("LinuxMint19.2"). The problem is when I type my password to enter my computer and I am logging in to my Desktop, there is no GUI. There isn't a toolbar, a background image. It just shows me the desktop icons. When I open the "Computer" folder it doesn't have the (Close, Minimize) buttons. The C+Alt+T command to open Terminal doesn't work. I cannot open Terminal.
I want to go back the time using timeshift, but because I can't open any program without GUI or Terminal, I can't open the timeshift program. I want to copy the date file I want to boot my pc to my usb. But I can't. It keeps showing me an error that I don't have the permission.
What should I do?</p>
<p><strong>Thank you</strong></p>
<p>That's how it looks: <a href="https://i.stack.imgur.com/9qcIl.jpg" rel="nofollow noreferrer">enter image
description here</a> ,
<a href="https://i.stack.imgur.com/gP8a9.jpg" rel="nofollow noreferrer">enter image description
here</a></p>
| 0non-cybersec
| Stackexchange | 341 | 1,213 |
Generalization of Schur polynomials. <p><em>EDIT (2018-11-05)</em> I am slowly making a list of symmetric functions, and generalizations available online <a href="https://www.math.upenn.edu/~peal/polynomials/polynomialindex.htm" rel="nofollow noreferrer">here</a>. PDFs with overviews are available there for download.</p>
<p>I am making a list of generalizations of Schur polynomials and other closely related polynomials that appear in representation theory. My motivation is to eventually make a nice poster of specializations/relations between all these, and which ones have say a Cauchy identity, positive multiplicative structure constants, constitute a basis, have determinant formulation, combinatorial interpretation, etc.</p>
<p>So far, these are (more or less) the ones I know about,
and I would like to know what more I have missed.</p>
<ul>
<li>Hall–Littlewood polynomials</li>
<li>Shifted Schur polynomials</li>
<li>LLT polynomials</li>
<li>Quasi-symmetric Schur polynomials </li>
<li>Factorial Schur polynomials</li>
<li>Flagged Schur polynomials</li>
<li>Double Schur polynomials</li>
<li>Schubert polynomials (and double Schubert)</li>
<li>Stanley symmetric functions (also known as stable Schubert polynomials)</li>
<li>Key polynomials (also known as Demazure characters)</li>
<li>Jack polynomials</li>
<li>Macdonald polynomials (where there are non-symmetric and non-homogeneous variants)</li>
<li>Schur polynomials for the symplectic and orthogonal group.</li>
<li><span class="math-container">$k$</span>-Schur functions (defined via cores)</li>
<li>Loop Schur functions</li>
<li>Grothendieck polynomials (<span class="math-container">$K$</span>-theoretical analogue of Schur polynomials)</li>
</ul>
<p>This should be a community wiki, I guess.</p>
<p>EDIT: I have started making an overview but I get the feeling it should be split into two posets, (specializes/is superset of and expands positively in) since these two relations usually go in the opposite order.</p>
<p><a href="https://i.stack.imgur.com/g5925.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/g5925.png" alt="polynomials"></a></p>
| 0non-cybersec
| Stackexchange | 604 | 2,145 |
Diophantine impossibility and irrationality (or similar). <p>The Diophantine equation $$a^2 = 2 b^2$$ having no solutions is the same as $\sqrt{2}$ being irrational.</p>
<p>Are there any Diophantine equations which are related to the irrationality of a number that is not algebraic?</p>
<hr>
<p>For a similar question with broader scope, the Diophantine equation $$x^n + y^n = z^n$$ implies a certain elliptic curves is "ir"-modular.</p>
<p>Are there more examples of this phenomenon?</p>
| 0non-cybersec
| Stackexchange | 146 | 493 |
WAYWT - February 22. WAYWT = What Are You Wearing Today (or a different day, whatever). Think of this as your chance to share your personal taste in fashion with the community. Most users enjoy knowing where you bought your pieces, so please consider including those in your post. Want to know how to take better WAYWT pictures? Read the guide [here](http://www.reddit.com/r/malefashionadvice/comments/16rwft/how_to_take_better_self_pics_for_mfa/).
If you're looking for feedback on an outfit instead of just looking to share, consider using Outfit Feedback & Fit Check thread instead.
**Important: Downvotes are strongly discouraged in this thread. Sorting by new is strongly encouraged.**
| 0non-cybersec
| Reddit | 176 | 693 |
Do utilization of bridges and/or Pluggable Transports bridges hinder anonymity?. <p>In consideration of recent article by <a href="http://daserste.ndr.de/panorama/aktuell/NSA-targets-the-privacy-conscious,nsa230.html" rel="nofollow">Das Erste</a> publication, do bridges, and Pluggable Transports bridges utilization hinder anonymity and are essentially circumvention tools?</p>
<p>Following, please find an excerpt from Das Erste:</p>
<blockquote>
<p>This code demonstrates the ease with which an XKeyscore rule can analyze the full content of intercepted connections. The fingerprint first checks every message using the "email_address" function to see if the message is to or from "[email protected]". Next, if the address matched, it uses the "email_body" function to search the full content of the email for a particular piece of text - in this case, "<a href="https://bridges.torproject.org/" rel="nofollow">https://bridges.torproject.org/</a>". If the "email_body" function finds what it is looking for, it passes the full email text to a C++ program which extracts the bridge addresses and stores them in a database. The full content of the email must already be intercepted before this code can analyze it.</p>
</blockquote>
| 0non-cybersec
| Stackexchange | 319 | 1,243 |
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 |
USB ports charge but do not recognize anything I plug in / Windows 7 64. <p>So I've been having this issue for some time. I have 1 port that recognizes only my keyboard and mouse (Logitech). The other ports charge items but does not recognize them. I have done the following:
Flashed the Bios (Acer Predator G3610)
Used both USBDeview and USBOblivion
Reinstalled the chipset software
unplugged devices and restarted the computer
unplugged the USB ports from the motherboard
Everything that I could find online to do I have tried and it's making me a little crazy.
It's running Windows 7 x64.
Crazy part is when I plug in a wired keyboard to the one port that works, the keyboard works. If I plug in anything else (ie printer, iphone, tablet, thumb drive) it doesn't recognize it. Any ideas on how to fix this would be great. Thanks</p>
| 0non-cybersec
| Stackexchange | 216 | 838 |
Functoriality of a standard integral domain construction.. <p>The evident forgetful functor from fields to integral domains has a left adjoint, namely the construction of the quotient field for a given integral domain. Another standard construction is taking the group of divisibility of an integral domain, which involves taking the quotient of the group of units of the quotient field by the group of units of the original ring. </p>
<p>That is to say $G(R) := qf(R)^*/U(R)$. </p>
<p>This is a partially ordered abelian group under the ordering $aU(R)\leq bU(R)$ if and only if $\frac{b}{a}\in R^*$. </p>
<p>Does anyone know a functor from integral domains to partially ordered abelian groups that adequately describes this operation. I do not think that you can get away with the full category of integral domains however. I have described a functor when restricting the morphisms to the monomorphisms of integral domains. </p>
| 0non-cybersec
| Stackexchange | 223 | 934 |
AndroidRuntime: FATAL EXCEPTION: main. <p><a href="https://i.stack.imgur.com/CYi0A.png" rel="nofollow noreferrer">enter image description here</a></p>
<p>E/AndroidRuntime: FATAL EXCEPTION: main
Process: human.app.human2, PID: 26512
java.lang.RuntimeException: Uncaught exception in Firebase Database runloop (3.0.0). Please report to [email protected]
at com.google.android.gms.internal.firebase_database.zzs.run(Unknown Source:6)
at android.os.Handler.handleCallback(Handler.java:790)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6548)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/firebase/FirebaseApp$IdTokenListener;
at com.google.android.gms.internal.firebase_database.zzq.zza(Unknown Source:0)
at com.google.android.gms.internal.firebase_database.zzbz.zzba(Unknown Source:119)
at com.google.android.gms.internal.firebase_database.zzdo.zzb(Unknown Source:0)
at com.google.android.gms.internal.firebase_database.zzdo.zza(Unknown Source:2)
at com.google.firebase.database.FirebaseDatabase.zzc(Unknown Source:9)
at com.google.firebase.database.FirebaseDatabase.getReference(Unknown Source:0)
at human.app.human2.MainActivity.inicializarFirebase(MainActivity.java:50)
at human.app.human2.MainActivity.onCreate(MainActivity.java:41)
at android.app.Activity.performCreate(Activity.java:7023)
at android.app.Activity.performCreate(Activity.java:7014)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2772)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2897)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1623)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6548)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857)
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.firebase.FirebaseApp$IdTokenListener" on path: DexPathList[[zip file "/data/app/human.app.human2-OKHxI4_I3exU6PfCLeH9yQ==/base.apk"],nativeLibraryDirectories=[/data/app/human.app.human2-OKHxI4_I3exU6PfCLeH9yQ==/lib/arm, /system/lib, /vendor/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
at com.google.android.gms.internal.firebase_database.zzq.zza(Unknown Source:0)
at com.google.android.gms.internal.firebase_database.zzbz.zzba(Unknown Source:119)
at com.google.android.gms.internal.firebase_database.zzdo.zzb(Unknown Source:0)
at com.google.android.gms.internal.firebase_database.zzdo.zza(Unknown Source:2)
at com.google.firebase.database.FirebaseDatabase.zzc(Unknown Source:9)
at com.google.firebase.database.FirebaseDatabase.getReference(Unknown Source:0)
at human.app.human2.MainActivity.inicializarFirebase(MainActivity.java:50)
at human.app.human2.MainActivity.onCreate(MainActivity.java:41)
at android.app.Activity.performCreate(Activity.java:7023)
at android.app.Activity.performCreate(Activity.java:7014)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2772)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2897)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1623)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6548)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857) </p>
| 0non-cybersec
| Stackexchange | 1,503 | 4,859 |
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 |
Apple Pay: is card holder name stored on Apple servers?. <p>For Apple Pay, is the card holder name of a debit card stored on Apple servers?</p>
<blockquote>
<p>After you authenticate your transaction, the Secure Element provides
your Device Account Number and a transaction-specific dynamic security
code to the store’s point of sale terminal along with <strong>additional
information</strong> needed to complete the transaction. Again, neither Apple
nor your device sends your actual payment card number.</p>
</blockquote>
<p><a href="https://support.apple.com/en-us/ht203027" rel="nofollow noreferrer">https://support.apple.com/en-us/ht203027</a></p>
<p>What is the <strong>additional information</strong> referred to here?</p>
| 0non-cybersec
| Stackexchange | 206 | 743 |
Update of /etc/resolve.conf needs restart of application. <p>I am working with an embedded linux Target (ARM) and have the following problem:
When /etc/resolv.conf is updated, while a process is running (e.g. C Program using gethostbyname()) the running process does not take care about the new nameserver entry until it is restarted.</p>
<p>The DNS entry has been made with systemd-resolve -i eth0 --set-dns="ipaddr"</p>
<p>If I try the same with my desktop linux any change to /etc/resolv.conf is used immediately by a running processes without restart.</p>
<p>How can I see whats happening (or not happening) in the background when /etc/resolv.conf is beeing modified? What service could be missing on the embedded target?
Why does it work after restart of the application?</p>
| 0non-cybersec
| Stackexchange | 215 | 784 |
Can't fix Nvidia errors after updating to 18.04. <p>I upgraded from 16.04 to 18.04 Mate. When I try to do this: apt --fix-broken install. I get this:</p>
<pre><code> error: mismatch on package
when removing 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 by libnvidia-gl-390'
found 'diversion of /usr/lib/x86_64-linux-gnu/libGL.so.1 to /usr/lib/x86_64- linux-gnu/libGL.so.1.distrib by nvidia-340'
dpkg: error processing archive /var/cache/apt/archives/libnvidia-gl- 390_390.87- 0ubuntu0~gpu18.04.1_amd64.deb (--unpack):
new libnvidia-gl-390:amd64 package pre-installation script subprocess returned error exit status 2
Errors were encountered while processing:
/var/cache/apt/archives/libnvidia-gl-390_390.87-0ubuntu0~gpu18.04.1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
</code></pre>
<p>When I try to purge any with nvidia I get a similar error. So needless to say I can't download any updates. What can I try. PS I hate Nvidia with a passion.</p>
| 0non-cybersec
| Stackexchange | 364 | 1,050 |
Do you make yourself cry on purpose? What do you imagine to get you crying?. Sometimes as a kid and still now I would imagine bad things happening to someone I know so I could make myself cry. Here's an example. I am an atheist so I imagine a scenario in which my two little brothers are dieing and they ask me what heaven is like. This scenario really gets me sobbing. I don't go into detail on why they're dieing I just imagine my 6 year old asking me if Jesus is nice and what heaven is like, and if God would like him.(I'm tearing up now.)Then I just take it from there and start weeping. I like the feeling after I cry. I feel tired yet relieved like I got rid of built up tension.so does anyone make themselves cry? | 0non-cybersec
| Reddit | 167 | 721 |
What motivates discrepancies between the definitions of "continuous" and "limit"?. <p>I am working from Munkres' Analysis, and I've converted his definitions slightly to make them easier to compare. In the table below, you can fill in the blanks in the top row with words from the lower rows to form either definition:</p>
<p><img src="https://i.stack.imgur.com/D6V7w.png" alt="enter image description here"></p>
<p>It is not clear to me what motivates some of the choices when it comes to 'filling in the blanks'. My biggest concern is the last two blanks. The 2nd blank is essentially discussed in my old question here:</p>
<p><a href="https://math.stackexchange.com/questions/27429/why-not-define-limit-to-include-isolated-points">Why not define 'limits' to include isolated points?</a></p>
<p>And while I roughly understand the response there (letting in isolated points means that functions can approach infinitely many limits at isolated points), when I consider changes to the last two columns, I find myself also considering changes to the 2nd.</p>
<p>My hope is that someone can construct simple examples for each column (in as few dimensions as possible!) which motivate the choice, while somehow dealing with the interconnection problem wherein choice in one column affects choice in another...</p>
| 0non-cybersec
| Stackexchange | 342 | 1,346 |
How to save a tensor to a file in TensorFlow using the low level (C) interface?. <p>Using the low level Operations in TensorFlow, I try to save a Tensor (its actual value) to a disk, but cannot find how to.
If the data is e.g. a UInt8 matrix representing an image then I can easily do EncodeJpeg to create the Content and then use WriteFile to write the generated Content to a file with a given name. Similarly EncodeWav works the same way.
On the other hand, if I just want to save a matrix with numbers, there is no "EncodeData", "TensorToContent" or similar Operation to convert the Tensor into a Content, what can be saved with WriteFile.
I can get the Tensor as an output from my Graph and then save it outside the Graph, but my purpose is to do it inside.</p>
| 0non-cybersec
| Stackexchange | 193 | 766 |
Fixing lost administrator permissions on a NAS in a Windows environment. <p>This is in a Windows environment. I have an issue on a NAS volume where the Administrator has lost all access to various folders and files. I can find the offending folders and files and have been using batch files to grant ownership to the administrator account and then granting the access, but have a problem with nested folders. So if we have -</p>
<p>"h:\folder1\folder2\folder3\folder4" where EACH folder is not accessible or owned by Administrator</p>
<p>I list the folders into a txt file and then edit to run the commands to grant ownership in a batch file thus -</p>
<p>fileacl h:\folder1 /O Administrator:F<br/>
fileacl h:\folder1\folder2 /O Administrator:F<br/>
fileacl h:\folder1\folder2\folder3 /O Administrator:F<br/>
fileacl h:\folder1\folder2\folder3\folder4 /O Administrator:F<br/></p>
<p>then I edit to create the following to grant access -<br/>
fileacl h:\folder1 /G Administrator:F<br/>
fileacl h:\folder1\folder2 /G Administrator:F<br/>
fileacl h:\folder1\folder2\folder3 /G Administrator:F<br/>
fileacl h:\folder1\folder2\folder3\folder4 /G Administrator:F<br/></p>
<p>The problem is that only folder1 will be fixed as I won't have access UNTIL the second command is completed to touch folder2. Same for 3 & 4.</p>
<p>My question is - is it possible to execute two commands per line of the created text file listing so that it would execute both commands for folder1 before moving on to folder 2 and so on? Manually copying a& organizing this all would take forever as I have several thousand nested folders. A FOR loop in DOS/CMD prompt?<br/>
Thx!</p>
| 0non-cybersec
| Stackexchange | 475 | 1,675 |
Accessing a custom class in database.yml. <p>I have the following class in my rails application:</p>
<pre><code>class Global
class << self
def method_missing(message)
ENV[message.to_s]
end
def SOME_ENV_VAR
ENV['SOME_ENV_VAR'].present? ? ENV['SOME_ENV_VAR'].to_i * 5 : nil
end
end
</code></pre>
<p>Then I access all of my environment variables through this class which allows me to wrap any logic around an environment variable in one place. Is there a way I can access my Global class in the database.yml like so?</p>
<pre><code>development:
<<: *default
url: <%= Global.DATABASE_URL || "the_database" %>
</code></pre>
| 0non-cybersec
| Stackexchange | 221 | 677 |
Material-UI: Adding Badge to a Tab in material-ui Tabbar (Tabs). <p>I have <a href="http://www.material-ui.com/#/" rel="noreferrer">Material-UI</a> <a href="http://www.material-ui.com/#/components/tabs" rel="noreferrer">Tabs</a> component with 5 Tab components as children. I would like to display a <a href="http://www.material-ui.com/#/components/badge" rel="noreferrer">Badge</a> on the Tab. Badge would display unread items under each tab.</p>
<p>I have two versions of tab bar. One for desktop with icon and text and one for mobile containing just icon. How could I position Badge so that it places properly on both versions. Also Badge should be visible even if tab is not selected (if I set Badge as a child to a Tab it will be hidden when tab is not selected).</p>
| 0non-cybersec
| Stackexchange | 227 | 774 |
table.unpack() only returns the first element. <p>Could somebody explain to me why <code>table.unpack()</code> returns the first table element only when it is used in a function call with additional parameters after <code>table.unpack()</code>?</p>
<p>Here is some demo code:</p>
<pre><code>local a = {1,2,3,4,5}
print("Test", table.unpack(a)) -- prints "Test 1 2 3 4 5"
print(table.unpack(a), "Test") -- prints "1 Test"
</code></pre>
<p>I don't understand why the second line just prints <code>1 Test</code>. I'd expect it to print <code>1 2 3 4 5 Test</code>. Can somebody explain this behaviour? I'd also be interested in how I can make the second call to print <code>1 2 3 4 5 Test</code>.</p>
| 0non-cybersec
| Stackexchange | 225 | 705 |
Issues accessing CIFS share directories. <p><strong>Disclaimer 1:</strong> <em><a href="https://serverfault.com/questions/538227/issues-accessing-cifs-share-directories">Crossposted from Serverfault</a> because there was no activity over there.</em></p>
<p><strong>Disclaimer 2:</strong> <em>This question is similar to <a href="https://unix.stackexchange.com/questions/18103/automounting-not-working-correctly-for-cifs-shares-weird-results">Automounting not working correctly for CIFS shares; weird results</a> but not exactly the same.</em></p>
<p><strong>The Setup:</strong></p>
<p>Running CentOS most recent stable (6.4) connecting to CIFS share from EMC VNXe SAN.</p>
<p>Using AutoFS configured using this method: <a href="http://www.fedoraforum.org/forum/showthread.php?t=240811" rel="nofollow noreferrer">http://www.fedoraforum.org/forum/showthread.php?t=240811</a></p>
<p>Synopsis of config:</p>
<blockquote>
<ol>
<li><p>Install autofs</p></li>
<li><p>Comment out entire /etc/auto.master</p></li>
<li><p>Create new /etc/auto.cifs file with contents similar to auto.smb (full contents at link above)</p></li>
<li><p><em>chmod 755 /etc/auto.cifs</em></p></li>
<li><p>Add line /etc/auto.master: <em>/mnt /etc/auto.cifs --timeout=0</em></p></li>
<li><p>Create file /etc/auto.smb.fileserver01 with credentials: username=domain/username password=password (also tried without domain,
exact same symptoms)</p></li>
<li><p><em>chmod 400 /etc/auto.smb.fileserver01</em></p></li>
<li><p>Add fileserver01 to /etc/hosts</p></li>
</ol>
</blockquote>
<p>I have supplied AutoFS with a full Domain Admin account for initial build and testing.</p>
<p><strong>The Problem</strong></p>
<p>The CIFS share mounts in <em>/mnt/fileserver01</em> and I can see the contents of the share's root directory, but when I try to navigate inside any of the directories I receive the message:</p>
<blockquote>
<p>bash: cd: /mnt/fileserver01/sharename: No such file or directory</p>
</blockquote>
<p>There aren't any particular errors showing up inside <em>/var/log/messages</em>.</p>
<p><em>Note: I'm new to Linux server administration, dusting off 10-year-old weekend classes in Debian CLI, so for answers and questions please be explicit in what I need to enter into the terminal.</em></p>
| 0non-cybersec
| Stackexchange | 773 | 2,302 |
Exporting to excel from OPENROWSET with cell formatting. <p>I am trying to generate a report from SSMS to Excel, using OpenRowSet. </p>
<p>All is working fine, still I have to export a specific column with a barcode font.
I already have the column calculated from SSMS, and being exported to Excel. I also have installed the right font and I can easily use it in Excel. </p>
<p>I am using a template that I have designed and the designated column in Excel is already set to be using the needed barcode font, but when the export is done, the column is showing the barcode value, but not the barcode itself.</p>
<p>Any idea?</p>
| 0non-cybersec
| Stackexchange | 169 | 632 |
Help me understand the following probability concept.. <p>Let $X$ and $Y$ denote the number of red and white balls, respectively, obtained in drawing two balls from a bag containing two red, two white, and two black balls. The joint frequency is given by $f(X,Y)=\dfrac{\dbinom{2}{x} \dbinom{2}{y} \dbinom{2}{2-x-y}}{\dbinom{6}{2}}$.</p>
<p>My question: Where is $\dbinom{2}{2-x-y}$ coming from? What does it represent? If possible, can someone explain the numerator came out to be? Thank you.</p>
| 0non-cybersec
| Stackexchange | 154 | 499 |
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 |
[HP] A Prompt about World War 2. Alright guys, after hovering over the subreddit seeing the skills you guys have, create a story using this picture [This Picture](http://3.bp.blogspot.com/-BnK2VxfZ5G4/UGn9uPR-LZI/AAAAAAAABrI/gj9tHHMIaGY/s320/world-war+2-soldiers+%2828%29.jpg) Now It has to have one main character and be a general short story. Have fun!
**Edit**: My God... You guys are amazing writers! It's hard to choose my favorite one! | 0non-cybersec
| Reddit | 146 | 442 |
complex contour line Integral. <p>I am trying to calculate this Integral where Z is an element of the Complex number. I
think I need to find the residue because there is a singularity (the center of the contour is actually the singularity $z = -1 + i$) So I Believe I should find the residue. Is this all correct? and if it is, how do I find the residue?</p>
<p>$$c = -1 + i + e^{it} $$</p>
<p>$$ 0 < t \leq 2\pi$$</p>
<p>$$\int_c \frac1{(z^4 + 4)} dz$$</p>
| 0non-cybersec
| Stackexchange | 157 | 466 |
Bad Dreams (part 2)(also posted to /r/writebooks). *continued from Bad Dreams (part 1)
A few years later, I was twelve. I had all but forgotten about the person in the night. I didn't have as many nightmares, and I was sleeping pretty well. Until I began sleepwalking.
I never walked very far, usually only to the hallway or kitchen. But one night, I woke up in a room that I didn't recognize. It was cozy, with two chairs facing a blazing fireplace. I looked around. The room was empty, save the two chairs. I still remember the dark red walls, a shade that made me think of blood. I glanced back at the other chair, and there was another person there. No, person wasn't the right word. He looked like a person. His presence felt human. But he wasn't. His pupils a little too big, his smile a little too wide, his skin a little too pale, his nose a little too small. He looked like a human skin stretched over a robot frame. He wasn't a man. He was a mistake. People don't look like he did. People don't stare at you with empty, dark eyes. I blinked, and there was a glass of something in his hand. A dark liquid. He raised it to his thin lips and took a sip. When he lowered it, his lips had been stained the same color as the walls. I tried to speak, but I couldn't. I tried to shift positions, but was held in place by an invisible force. Couldn't move, couldn't speak, could barely breathe. Suddenly, I heard it.
Scratch.
It was behind me.
Scratch.
The mistake's smile widened, revealing a mouth filled with a few too many teeth.
Scratch.
I squeezed my eyes shut as I felt something press into me, and a familiar sound filled my ears. That ragged breathing. The same breathing that had haunted me so long ago. I felt something prick the side of my neck, and I let out a scream. My eyes flew open, and I was in my room. I was breathing hard, eyes refusing to close as I scanned the room.
"What is it?" hissed Sarah loudly from the top bunk, which she had moved to since I had started sleepwalking.
"Nothing," I gasped. "Just a nightmare. I'm fine."
The door swung open. "What happened?" asked my father.
"Nightmare," I replied. "I'm fine. Probably a symptom of the sleepwalking." The lie felt heavy on my tongue. I could still feel the chair's velvet under my fingers, the weight of the breathing creature on my shoulders, the mistake's twisted smile. No way my mind could fabricate that.
Okay. Maybe we should take you to the doctor tomorrow," he suggested.
"Maybe," I sighed. I knew it wouldn't help. The light turned off, and I heard the door close. I knew doctors couldn't get rid of the ragged breathing, the mistake. I knew it wasn't a nightmare as I ran my fingers over the tiny pinprick in the side of my neck. | 0non-cybersec
| Reddit | 676 | 2,722 |
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 |
Stem cell treatments for COPD - what is the state of affairs?. First things first: I'm not asking for medical advice. I know that this is not the place for that and while the topic does concern my health, I won't bring my specific situation to the table.
My questions are those:
* Is there any indication that COPD can be treated with stem cell treatment?
* How "durable"/effective would this treatment be?
* If so, is it available right now? Or how far into the future is it?
* How would the treatment look like exactly? I've seen talk of IV injections ... shouldn't the injections go into the lungs rather than the bloodstream?
* What would the risks be?
* Would those treatments fit for other COPD-like ailments too, such as silicosis?
If you have an educated guess for some of my questions, I'd be glad to hear them too, but please indicate how much speculation is involved. Also, if you know of specific papers on the subject that you judge credible, please link them, so I can read them myself.
The reason I'm asking science is, that I did google around a bit, but most (all?) of the material that turns up, seems to be either about rats or "reports" of "patients" that were treated in "clinics" that offer cure-all-stemcell treatments. I have no idea how to dig through to the truth here. And I don't want to put my hope into snake oil. | 0non-cybersec
| Reddit | 322 | 1,347 |
EXPTIME-complete propositional satisfiability problem. <p>SAT is NP-complete, QBF is PSPACE-complete, DQBF is NEXPTIME-complete. Is there any extension of QBF or restriction of DQBF that is EXPTIME-complete?</p>
<p>Added later: a definition of DQBF can be found here: <a href="https://www.react.uni-saarland.de/publications/sat14.pdf">https://www.react.uni-saarland.de/publications/sat14.pdf</a></p>
| 0non-cybersec
| Stackexchange | 137 | 401 |
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 |
Inequality "A la Rozenberg". <p>Hello I want to solve <a href="https://math.stackexchange.com/questions/2131374/if-a3b3c3-3-so-fraca3ab-fracb3bc-fracc3ca-geq-frac">this</a></p>
<p>The inequality is equivalent to this :</p>
<p>$$\frac{a^2}{b^2}cos(arctan(\sqrt{\frac{b}{a}}))^2+\cos(\arctan(\sqrt{\frac{c}{b}}))^2+\frac{c^2}{b^2}\cos(\arctan(\sqrt{\frac{a}{c}}))^2\geq \frac{3}{2b^2}$$</p>
<p>We put :</p>
<p>$\sqrt{\frac{b}{a}}=\frac{x+y}{1-xy}$</p>
<p>$\sqrt{\frac{c}{b}}=\frac{z+y}{1-yz}$</p>
<p>$\sqrt{\frac{a}{c}}=\frac{x+z}{1-xz}$</p>
<p>Where $x$,$y$,$z$ are positive real numbers with the condition </p>
<p>$1>xy$,$1>xz$,$1>zy$.</p>
<p>We get :</p>
<p>$$(\frac{1-xy}{x+y})^4\cos(\arctan(\frac{x+y}{1-xy}))^2+\cos(\arctan(\frac{z+y}{1-yz}))^2+(\frac{z+y}{1-yz})^4\cos(\arctan(\frac{x+z}{1-xz}))^2\geq \frac{3^{\frac{1}{3}}}{2}(1+(\frac{1-xy}{x+y})^6+(\frac{z+y}{1-yz})^6)^{\frac{2}{3}}$$</p>
<p>Wich is equivalent to : </p>
<p>$$(\frac{1-xy}{x+y})^4(\frac{1}{(\frac{x+y}{1-xy})^2+1})+\frac{1}{(\frac{z+y}{1-yz})^2+1}+(\frac{z+y}{1-yz})^4\frac{1}{(\frac{x+z}{1-xz})^2+1}\geq \frac{3^{\frac{1}{3}}}{2}(1+(\frac{1-xy}{x+y})^6+(\frac{z+y}{1-yz})^6)^{\frac{2}{3}}$$</p>
<p>And if we make a substitution like this :</p>
<p>$A=\frac{1-xy}{x+y}$</p>
<p>$B=\frac{z+y}{1-yz}$</p>
<p>$C=\frac{x+z}{1-xz}$</p>
<p>We get :</p>
<p>$$A^4(\frac{1}{(\frac{1}{A})^2+1})+\frac{1}{(B)^2+1}+B^4\frac{1}{(C)^2+1}\geq \frac{3^{\frac{1}{3}}}{2}(1+(A)^6+(B)^6)^{\frac{2}{3}}$$</p>
<p>With the condition :</p>
<p>$(\frac{\frac{1}{A^6}+1+B^6}{3})^{-1}+(\frac{C^6+1+\frac{1}{B^6}}{3})^{-1}+(\frac{\frac{1}{C^6}+1+A^6}{3})^{-1}=3$</p>
<p>Wich is equivalent to :</p>
<p>$(\frac{3A^6}{A^6B^6+1+A^6})+(\frac{3B^6}{C^6B^6+1+B^6})+(\frac{3C^6}{A^6C^6+1+C^6})=3$</p>
<p>After that I can't continue.</p>
<p>Thanks.</p>
| 0non-cybersec
| Stackexchange | 1,009 | 1,833 |
Pgfplots labels jump between beamer slides. <p>Below is a MWE that demonstrates my problem. The problem is how the labels move through each slide. It seems as though they are first right aligned and then become centered for the next slide. How can I have each label centered under the tick mark on every slide so that the diagram doesn't move between slides.</p>
<pre><code>\documentclass{beamer}
\usepackage{pgfplots}
\begin{document}
\begin{frame}{Minimal Example}
\begin{tikzpicture}
\begin{axis}[
font=\tiny,
% enlarge y limits={value=0.2,upper},
% scaled ticks=false,
xticklabels={,
\only<4>{\phantom{$\mu-3\sigma$}} \only<4->{$\mu-3\sigma$},
\only<3>{\phantom{$\mu-2\sigma$}} \only<3->{$\mu-2\sigma$},
\only<2>{\phantom{$\mu-\sigma$}} \only<2->{$\mu-\sigma$},
$\mu$,
\only<2>{\phantom{$\mu+\sigma$}} \only<2->{$\mu+\sigma$},
\only<3>{\phantom{$\mu+2\sigma$}} \only<3->{$\mu+2\sigma$},
\only<4>{\phantom{$\mu+3\sigma$}} \only<4->{$\mu+3\sigma$},
},
yticklabels={,},
]
\addplot[blue] coordinates {(0,0) (0,1) (6,1) (6,0)};
\addplot[red] coordinates {(1,0) (1,2) (5,2) (5,0)};
\addplot[green] coordinates {(2,0) (2,3) (4,3) (4,0)};
\end{axis}
\end{tikzpicture}
\end{frame}
\end{document}
</code></pre>
<p>The construction of showing labels between slides I took from this <a href="https://tex.stackexchange.com/a/44166/11162">solution</a>.</p>
| 0non-cybersec
| Stackexchange | 581 | 1,565 |
SQL Server Management Studio (SSMS) is way too slow in its GUI. <p>I know this question has been asked before <a href="https://dba.stackexchange.com/questions/20725/sql-server-management-studio-slow-opening-new-windows">here</a> and <a href="https://superuser.com/questions/7247/why-does-it-take-so-long-for-sql-management-studio-to-connect">here</a>. But none of them could sovle my problem. I have this environment:</p>
<ol>
<li>Windows 10, build 1903 (freshly installed)</li>
<li>Microsoft SQL Server 2016 (SP2) (KB4052908) - 13.0.5026.0 (X64) Mar 18 2018 09:11:49 Copyright (c) Microsoft Corporation Enterprise Edition (64-bit) on Windows 10 Enterprise 10.0 (Build 18362: )</li>
<li>SSMS v17.3 (14.0.17199.0)</li>
</ol>
<p>Any activity I want to do in it, from opening, to connecting to a database engine, to right-clicking on a database, to creating a new database, to opening up a new query window, to browsing tables, any activity that is not query takes like 5 to 10 seconds to perform. It's clearly apparent that SSMS is doing something for each activity, and it gets stuck somewhere.</p>
<p>Here are the things I've done so far, without effect:</p>
<ol>
<li>Blocked Microsoft's certificate URL (adding 127.0.0.1 crl.microsoft.com to hosts file)</li>
<li>Downloading certificate and installing it from <a href="http://crl.microsoft.com/pki/crl/products/MicrosoftRootAuthority.crl" rel="nofollow noreferrer">http://crl.microsoft.com/pki/crl/products/MicrosoftRootAuthority.crl</a></li>
<li>Connecting to "local" instead of "."</li>
<li>Resetting user-defined settings in "C:\Users\user\AppData\Roaming\Microsoft\SQL Server Management Studio"</li>
<li>No antivirus is installed (only Windows Defender, the default of Windows)</li>
</ol>
<p>It's a shame that a program from such a reputable company can't work smooth out of the box, and troubleshooting it is sooooooooooooooo difficult.</p>
<p>Could you please help. How can I diagnose what's wrong with SSMS.</p>
<p>Update: This problem exists even with SSMS v18.2 (15.0.18142.0)</p>
| 0non-cybersec
| Stackexchange | 650 | 2,057 |
How to start with automated theorem proving?. <p>I'm interested in this question, but I'm not going to list my knowledge/demands but rather gear it to more general purpose; so the first thing concerns the prerequisites, i.e. </p>
<blockquote>
<p>How much theoretical knowledge (mathematical logic, programming and other) should one have prior to engaging with automated theorem proving (ATP)? Are there any fields of mathematical logic that aren't necessary prerequisites but still provide a deeper insight into ATP?</p>
</blockquote>
<p>After the prerequisities are done, one just needs to dive in:</p>
<blockquote>
<p>How does one start with ATP? Are there any books, lecture notes, which explain the crucial concepts? After one is done with the general idea of ATP, how does one proceed to <em>do</em> it?</p>
</blockquote>
<p>However, one might be concerned (at least that's what my main concern is) about the many different theorem-provers; how does one choose, and is there a chance that if one chooses the wrong one, they are going to be stuck with obsolete knowledge (even in terms of pure mathematics). In other words</p>
<blockquote>
<p>How concerned should one be with "aging" of the theorem-provers? Are there any language-agnostic approaches?</p>
</blockquote>
| 0non-cybersec
| Stackexchange | 329 | 1,285 |
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 |
confused about cisco firewall configuration when allowing all other traffic on certain ports (src dst). <p>I am trying to practice some scenarios on a GNS3 lab that i am doing on my spare time (just doing a very very basic firewall for now since this is new to me)</p>
<p>currently my scenerios I am trying to accomplish is </p>
<pre><code>1. Allow SSH (tcp destined to port 22) from
10.0.0.0/8
131.11.11.11/32 (fake ip)
into my entire network (10.25.0.0/16).
2 Disallow all other SSH (tcp destined to port 22) to MY network.
3 Allow all other traffic inbound to my network.
and I am implementing this on my border routers
</code></pre>
<p>so in my cisco switch (my ABR is called R2)
I am using this format for firewall that i found online</p>
<p><code>#SEQUENCENUM (permit/deny) PROTO SRCIPADDRESS SRCWILDCARD [OPERATOR] [PORT] DESTIPADDRESS DESTNETMASK [OPERATOR] [PORT]</code></p>
<p>I have in my 'show access-list'</p>
<p>Extended IP access list 100</p>
<pre><code>100 permit tcp 10.0.0.0 0.255.255.255 host 10.25.0.0 eq 22
200 permit tcp host 131.11.11.11 host 10.25.0.0 eq 22
300 deny tcp any host 10.25.0.0 eq 22
400 permit ip any host 10.25.0.0
999 permit ip any 10.25.0.0 0.0.255.255
</code></pre>
<p>for 400 - would this be correct syntax to allow all other traffic inbound to my network?</p>
<p>and for 999 - I want to permit all other traffic (that is not tcp to port 22 to your network) is this correct?</p>
<p>thanks a bunch guys</p>
| 0non-cybersec
| Stackexchange | 507 | 1,482 |
Installing just the JRE for Java 13. <p>I'm trying to run some software that relies on Java. Currently I have:</p>
<pre><code>~ » java --version jpage@LMDP-PJacob
java 9.0.4
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)
</code></pre>
<p>I'm getting a runtime error for the application (Cassandra):</p>
<blockquote>
<p>Improperly specified VM option 'ThreadPriorityPolicy=42'</p>
</blockquote>
<p>...so figured I may need to upgrade to a newer version of Java. I see there's a Java 13, but I seem to only be able to download the entire <em>JDK</em> from <a href="https://www.oracle.com/technetwork/java/javase/downloads/index.html" rel="nofollow noreferrer">Oracle's download page</a>. Since I do not plan on doing any Java <em>development</em>, I'd rather not clutter up my HD with a bunch of development crap.</p>
<p>Does the world of Java still have the concept of a distinct JRE versus JDK? If so, why can't I find the download for just the JRE? Or am I getting some stuff confused? Java versioning has long been confusing to me.</p>
| 0non-cybersec
| Stackexchange | 357 | 1,246 |
Support Function and Mean Curvature. <p>I am working with surfaces in Euclidean 3-space. If we let $X = X(u,v)$ denote a parameterization of such a surface, then the mean curvature, $H = H(u,v)$, can be computed in terms of the coefficients for the first and second fundamental forms. </p>
<p>My question is this: Is it possible to express the mean curvature, $H(u,v)$, in terms of the support function for this surface? The support function is defined to be $h = h(u,v) = \langle X, N\rangle$ where $N$ is a unit normal. (This function measures the oriented distance from a tangent plane to the origin.)</p>
<p>For curves in the plane there is a nifty result along these lines. If the curve has non-vanishing curvature its unit normal can be used for a parameterization, and in this situation the curvature satisfies $1/k = \pm (h''+ h)$ where, again, $h$ is the support function for the curve.</p>
<p>I'm hoping there is a similar result for convex surfaces in space, but, sadly, have been unable to find such a relationship. Any help would be greatly appreciated.</p>
| 0non-cybersec
| Stackexchange | 290 | 1,078 |
Minimizing distance fails?. <p>This may seem like a stupid question. Let's say I want to minimize the distance from $\left(0,0\right)$ to the function $f\left(x\right)=\sqrt{x^2-4}$. </p>
<p>I know how to do this using Calculus, but it always fails: $d=\sqrt{\left(x-0\right)^2+\left(y-0\right)^2}=\sqrt{x^2+\left(\sqrt{x^2-4}\right)^2}=\sqrt{2x^2-4}$. </p>
<p>When I minimize the resulting function, I receive $x=0$, which isn't even in the domain of $f$, and it even yields an imaginary distance of $2i$.</p>
<p>Obviously, the answers are $x=-2,2$, and the points are $\left(-2,0\right)$ and $\left(2,0\right)$ yielding a distance of $2$. </p>
<p>Is the reason why this is failing due to the fact that my point(s) in need is an endpoint of the function?</p>
<p>I've realized that similar functions do the same thing. For instance, if I want to find the minimum distance from $\left(0,0\right)$ to $f\left(x\right)=\sqrt{x-1}$ it fails, but if I choose a point like $\left(4,0\right)$, it works fine. Any rationale for this?</p>
<p>Thanks.</p>
| 0non-cybersec
| Stackexchange | 361 | 1,051 |
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 |
Compare Two Audio(locally stored pre-recorded voice command and recorded from microphone in app) in iOS. <p>In-app, I have to compare live recording from previously locally stored voice command if it matches(not only text but also identified person's voice) then perform necessary action.</p>
<p><strong>1-match voice commands from the same person.</strong></p>
<p><strong>2-match command 's text.</strong></p>
<p>I applied many ways but none are working as per my expectation.</p>
<p><strong><em>First:</em></strong>
use Speech to text Library like <a href="http://www.politepix.com/openears/">OpenEars</a>,<a href="https://developer.nuance.com/public/index.php?task=relNotes">SpeechKit</a> but these libraries convert only text from speech.</p>
<p><strong>Result: Failed As My expectation</strong></p>
<p><strong><em>Second:(Audio Finger printing)</em></strong></p>
<p><strong><a href="https://www.acrcloud.com/">acrcloud Library</a> :</strong> in this library, I record a command and stored that mp3file on acrcloud server and match with live recording(spoken by me) it doesn't match but when I play the same recording(recorded MP3 file of my voice ) which is uploaded to the acrcloud server then it matches.
<strong>Result: Failed As My expectation</strong></p>
<p><strong><a href="https://api.ai/">API.AI</a> :</strong> in this library,it is like speech to text ,I stored some text command on his server and then anyone speaks the same command the result get success.
<strong>Result: Failed As My expectation</strong></p>
<p>Please Suggest me how to solve this problem for iOS Application</p>
| 0non-cybersec
| Stackexchange | 453 | 1,609 |
Maven and eclipse: a reliable way to add non-Maven or external jars to a project?. <p>Maven is great. It mostly keeps me out of jar dependency hell by specifying versions of dependent packages in the <code>pom</code> configuration, and applies them automatically. It also has great integration with Eclipse via m2e, so that things work seamlessly in an IDE.</p>
<p>This is all great for dependencies that are globally known to Maven. However, sometimes, there are libraries that need to be included in a project that is not available in the Maven repos. In this case, I usually add them to a <code>lib/</code> directory in my project. As long as they are in the classpath then things compile.</p>
<p>However, the problem is getting them to be included automatically when importing a project. I've been tolerating this problem with half-baked fixes and hacks for far too long. Every time someone installs this project, I have to tell them to manually add the jars in <code>lib/</code> to their Eclipse build path so that all the errors go away. Something like the following:</p>
<p><img src="https://i.stack.imgur.com/wyBh8.png" alt="enter image description here"></p>
<p>I'm searching for a way to automate this process in a way that works with both the <code>mvn</code> command line program and Eclipse: more an emphasis on Eclipse, because it's nice to have projects that just compile when you import them.</p>
<p><strong>I don't want to set up a repo server for this, nor do I have any in-house proprietary components that would warrant setting up anything locally. I just have some jar files where the developers don't use Maven; and I want to compile with them...I should just be able to include them in the distribution of my software, right?</strong></p>
<p>I'm really looking for a reasonable way to implement this that will also work in Eclipse with no fuss. <a href="http://charlie.cu.cc/2012/06/how-add-external-libraries-maven/" rel="noreferrer">This is one solution</a> I've found promising, but
there definitely doesn't seem to be an authoritative solution to this problem. The only other thing that comes close is the <a href="http://code.google.com/p/addjars-maven-plugin/" rel="noreferrer">maven-addjars-plugin</a>, which works okay but only on the commandline. This plugin is not bad, and has a pretty reasonable configuration: </p>
<pre><code><plugin>
<groupId>com.googlecode.addjars-maven-plugin</groupId>
<artifactId>addjars-maven-plugin</artifactId>
<version>1.0.5</version>
<executions>
<execution>
<goals>
<goal>add-jars</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${project.basedir}/lib/java-aws-mturk</directory>
</resource>
<resource>
<directory>${project.basedir}/lib/not-in-maven</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</code></pre>
<p>However, trying to get it to run in Eclipse involves adding the following mess about lifecycle mapping to your <code>pom.xml</code>, which I have never gotten to work; I don't even think it is configured to actually add anything to the Eclipse build path.</p>
<pre><code><pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>
com.googlecode.addjars-maven-plugin
</groupId>
<artifactId>
addjars-maven-plugin
</artifactId>
<versionRange>
[1.0.5,)
</versionRange>
<goals>
<goal>add-jars</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</code></pre>
| 0non-cybersec
| Stackexchange | 1,416 | 5,274 |
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 would I implement a "self-destruct" feature into the free trial version of my software?. <p>There is the ongoing argument of free trial versus a freemium model (that is, a free-for-life version of their software with restricted and/or stripped down features) for allowing potential customers and users to test run their product. Upon my research, I can conclude that the free trial is the way to go on both for the benefit of the user experience of the individual using the software and for the benefit of the vendor in both aspect of sales and maximizing usage. There are many factors for a free trial software that can greatly maximize user usage like the length of the free trial.</p>
<p>One keyword that reoccurs on my research for "freemium" is "frustrating". Many individuals chose to uninstall the software instead of having to use a piece of software where some features were unavailable to them. At the same time, these users never had the chance to use the "paid" features. Unbeknownst to them, and hidden by the very own vendors who are selling the software, they don't know and cannot know what benefits the Pro features will bring. Without first having to use them, a user will not know they have the feeling of "needing" something. Which brings me onto my next point of a free trial model.</p>
<p>Some opinions of a free trial user is "I cannot imagine using this software without the Pro features." This goes back to the point of "the user not knowing they need something until they first understanding the feeling of have." Those that have had 14 days to use a the "full" version features said they cannot imagine not having or using the features provided there. So when fourteen days were over, they were more likely to dish out money than someone who's never experienced the full features. The length of the free trial is also an important factor is creating a lasting impression on users. In an experiment conducted by Visual Website Optimizer, they noticed that for a 14 day free trial versus a 30 day free trial, while the number of sign ups and installs were the same, the usage for the 14 day trial increased 102%. This, of course, in turn increased their revenue as well.</p>
<p>Another very important point to mention is that "offering a useful and fully functional free version of the product" is VERY IMPORTANT. Fully functional free trials are effective in getting media coverage, and this publicity for new software and/or software vendors are fairly crucial.</p>
<p>One other relevant aspect is the importance for users to give feedback. Consider, in the fully functional time-limited free trial, the ability for users to give feedback.</p>
<p>One other feature important for our software is the need for telemetric data, that is, quantitative and comprehensive data on how a user uses our software. Some of usage statistics may fall into a legal grey area, as laws are different depending on the location in the United States, and the world. One way to combat this legal issue is to have an opt-in feature for gathering anonymous usage statistics. An opt-in feature would mean giving the user an option to turn off statistics gathering and at the same time, the user must be very well aware of what the gathering of anonymous usage information does. It is important to make it CLEAR to the user what data will be collected, what "we" will be doing with it, and make it easy to turn off any time, including allowing them to change their mind for turning it on or off. For more detailed statistics, like tracking individual activities of users, it could lead to legal issues. The Eclipse IDE logs detailed usage statistics, but it does it by the full consent of the user. We may have to potentially prepare a consent form with our legal team. </p>
<p>The Eclipse Usage Information Collection collects this information:
1. Plug-ins that are started by the system.
2. Commands accessed via the keyboard shortcuts and actions invoked via menus or toolbars.
3. When the "view" of the editor is given focus.
4. System information like the version of the software being used, the operating system being used.
5. Description of internal errors.</p>
<p>Kill Switch</p>
<p>A kill switch for our software can be managed logging the initial data, encrypting it with a salt, and whenever it's an invalid date, that is, the user tried to change it, it would disable the software. Another option is to have internet authentication on install, log that date to a central web database, and check the date every time the application is opened.</p>
<p>On disabling the software, we can delete vital DLLs. The option of having to pay to generate a report cannot be considered.</p>
<hr>
<p>I am interested in implementing a free trial version to my existing software. I plan on having the trial last 14 days. Upon the 14th day, my software would prompt the user to either pay for the paid version, or have the consequence of not being able to use it. The free trial version is entirely unlocked, meaning all paid features are there.</p>
<p>However, my dilemma is about the "best" way to implement what to do for an end-of-trial solution. Do I delete vital DLLs? Have a user authentication system upon installation or use? Encrypt the initial time and date of use with a salt, and if it's an invalid date (AKA they try to change their initial date), disable the software?</p>
<p>I am interested in knowing what are some effective measures of disabling software.</p>
| 0non-cybersec
| Stackexchange | 1,219 | 5,501 |
Alexa Intent Schema: Random input being identified as intents. <p>I have two intents that use the same slot types. However, if the input is a random string, Alexa automatically identifies an intent in its JSON request even though it is not part of the utterances. For example, in the example below, if the user input was 'bla bla bla', <code>GetAccountBalance</code> is identified as the intent with no slot value even though it is not part of provided utterances.</p>
<p>What is the way to error-check for these cases and what is the best practice to avoid cases like this when developing the intent schema? Is there a way to create an intent that can handle all random inputs?</p>
<p>Example Schema:</p>
<pre><code>{
"intents": [
{
"intent": "GetAccountBalance",
"slots": [
{
"name": "AccountType",
"type": "ACCOUNT_TYPE"
}
]
},
{
"intent": "GetAccountNumber",
"slots": [
{
"name": "AccountType",
"type": "ACCOUNT_TYPE"
}
]
}
]
}
</code></pre>
<p>Utterances:</p>
<pre><code>GetAccountBalance what is my account balance for {AccountType} Account
GetAccountBalance what is my balance for {AccountType} Account
GetAccountBalance what is the balance for my {AccountType} Account
GetAccountBalance what is {AccountType} account balance
GetAccountBalance what is my account balance
GetAccountBalance what is account balance
GetAccountBalance what is the account balance
GetAccountBalance what is account balance
GetAccountNumber what is my account number for {AccountType} Account
GetAccountNumber what is my number for {AccountType} Account
GetAccountNumber what is the number for my {AccountType} Account
GetAccountNumber what is {AccountType} account number
GetAccountNumber what is my account number
GetAccountNumber what is account number
GetAccountNumber what is the account number
GetAccountNumber what is account number
</code></pre>
| 0non-cybersec
| Stackexchange | 516 | 1,972 |
Why isn't my Bash script returning the correct answer to this Project Euler?. <p>I'm trying to use Bash to complete <a href="https://projecteuler.net/problem=13" rel="nofollow noreferrer">Project Euler 13</a>. Below is my code that I just cannot figure out what's wrong with.</p>
<pre><code>#!/bin/bash
sum=0
while read -r -d $'\r' line; do
sum=$(echo $sum + $line | bc)
done <<< "$(curl -s http://pastebin.com/raw/uHZ0PZjm)"
echo "${sum:0:10}"
exit
</code></pre>
<p>It used to result in two errors,</p>
<pre><code>(standard_in) 1: syntax error
</code></pre>
<p>and</p>
<pre><code>(standard_in) 1: illegal character: ^M
</code></pre>
<p>After some research, it seemed to be an issue with the EOF terminators. I then ran dos2unix on it and it no longer gives the second error, but is still giving the first repeatedly. It seems to be some issue with how I'm piping the data into bc, but I've no clue what or how to fix it.</p>
<p>The correct answer is 5537376230.
Thank you much for anything you can help with!</p>
<p>System info is</p>
<blockquote>
<p>GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu)</p>
</blockquote>
<p>I'm using cmder on Windows 10.</p>
| 0non-cybersec
| Stackexchange | 433 | 1,437 |
Using C++ Boost memory mapped files to create disk-back data structures. <p>I have been looking into using Boost.Interprocess to create a disk-backed data structure. The examples on Boost Documentation (<a href="http://www.boost.org/doc/libs/1_41_0/doc/html/interprocess.html" rel="nofollow noreferrer">http://www.boost.org/doc/libs/1_41_0/doc/html/interprocess.html</a>) are all for using shared memory even though they mention that memory mapped files can also be used. I am wondering whether anyone here has used memory mapped files? Any publicly available code samples to get started (say, a memory mapped file backed map or set)?</p>
| 0non-cybersec
| Stackexchange | 170 | 639 |
How to create a choropleth of the world using d3?. <p><a href="http://mbostock.github.com/d3/ex/choropleth.html">This tutorial</a> is a great intro to creating choropleths with d3, but it's data is US-centric. Where do I get the corresponding data for a world map?</p>
<p>I'm sure it's in the docs somewhere, but I can't find it. <a href="https://github.com/mbostock/d3/wiki/Geo-Projections">This</a> is the closest I've found, but the one world map on there specifically says it's not recommended for choropleths. Also, </p>
| 0non-cybersec
| Stackexchange | 167 | 527 |
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 |
Rcpp Parallel or openmp for matrixvector product. <p>I am trying to program the naive parallel version of Conjugate gradient, so I started with the simple Wikipedia algorithm, and I want to change the <code>dot-products</code> and <code>MatrixVector</code> products by their appropriate parallel version, The Rcppparallel documentation has the code for the <code>dot-product</code> using parallelReduce; I think I'm gonna use that version for my code, but I'm trying to make the <code>MatrixVector</code> multiplication, but I haven't achieved good results compared to R base (no parallel) </p>
<p>Some versions of parallel matrix multiplication: using OpenMP, Rcppparallel, serial version, a serial version with Armadillo, and the benchmark</p>
<pre><code>// [[Rcpp::depends(RcppParallel)]]
#include <Rcpp.h>
#include <RcppParallel.h>
#include <numeric>
// #include <cstddef>
// #include <cstdio>
#include <iostream>
using namespace RcppParallel;
using namespace Rcpp;
struct InnerProduct : public Worker
{
// source vectors
const RVector<double> x;
const RVector<double> y;
// product that I have accumulated
double product;
// constructors
InnerProduct(const NumericVector x, const NumericVector y)
: x(x), y(y), product(0) {}
InnerProduct(const InnerProduct& innerProduct, Split)
: x(innerProduct.x), y(innerProduct.y), product(0) {}
// process just the elements of the range I've been asked to
void operator()(std::size_t begin, std::size_t end) {
product += std::inner_product(x.begin() + begin,
x.begin() + end,
y.begin() + begin,
0.0);
}
// join my value with that of another InnerProduct
void join(const InnerProduct& rhs) {
product += rhs.product;
}
};
struct MatrixMultiplication : public Worker
{
// source matrix
const RMatrix<double> A;
//source vector
const RVector<double> x;
// destination matrix
RMatrix<double> out;
// initialize with source and destination
MatrixMultiplication(const NumericMatrix A, const NumericVector x, NumericMatrix out)
: A(A), x(x), out(out) {}
// take the square root of the range of elements requested
void operator()(std::size_t begin, std::size_t end) {
for (std::size_t i = begin; i < end; i++) {
// rows we will operate on
//RMatrix<double>::Row rowi = A.row(i);
RMatrix<double>::Row rowi = A.row(i);
//double res = std::inner_product(rowi.begin(), rowi.end(), x.begin(), 0.0);
//Rcout << "res" << res << std::endl;
out(i,1) = std::inner_product(rowi.begin(), rowi.end(), x.begin(), 0.0);
//Rcout << "res" << out(i,1) << std::endl;
}
}
};
// [[Rcpp::export]]
double parallelInnerProduct(NumericVector x, NumericVector y) {
// declare the InnerProduct instance that takes a pointer to the vector data
InnerProduct innerProduct(x, y);
// call paralleReduce to start the work
parallelReduce(0, x.length(), innerProduct);
// return the computed product
return innerProduct.product;
}
//librar(Rbenchmark)
// [[Rcpp::export]]
NumericVector matrixXvectorRcppParallel(NumericMatrix A, NumericVector x) {
// // declare the InnerProduct instance that takes a pointer to the vector data
// InnerProduct innerProduct(x, y);
int nrows = A.nrow();
NumericVector out(nrows);
for(int i = 0; i< nrows;i++ )
{
out(i) = parallelInnerProduct(A(i,_),x);
}
// return the computed product
return out;
}
// [[Rcpp::export]]
arma::rowvec matrixXvectorParallel(arma::mat A, arma::colvec x){
arma::rowvec y = A.row(0)*0;
int filas = A.n_rows;
int columnas = A.n_cols;
#pragma omp parallel for
for(int j=0;j<columnas;j++)
{
//y(j) = A.row(j)*x(j))
y(j) = dotproduct(A.row(j),x);
}
return y;
}
arma::mat matrixXvector2(arma::mat A, arma::mat x){
//arma::rowvec y = A.row(0)*0;
//y=A*x;
return A*x;
}
arma::rowvec matrixXvectorParallel2(arma::mat A, arma::colvec x){
arma::rowvec y = A.row(0)*0;
int filas = A.n_rows;
int columnas = A.n_cols;
#pragma omp parallel for
for(int j = 0; j < columnas ; j++){
double result = 0;
for(int i = 0; i < filas; i++){
result += x(i)*A(j,i);
}
y(j) = result;
}
return y;
}
</code></pre>
<p><strong>Benchmark</strong></p>
<pre><code> test replications elapsed relative user.self sys.self user.child sys.child
1 M %*% a 20 0.026 1.000 0.140 0.060 0 0
2 matrixXvector2(M, as.matrix(a)) 20 0.040 1.538 0.101 0.217 0 0
4 matrixXvectorParallel2(M, a) 20 0.063 2.423 0.481 0.000 0 0
3 matrixXvectorParallel(M, a) 20 0.146 5.615 0.745 0.398 0 0
5 matrixXvectorRcppParallel(M, a) 20 0.335 12.885 2.305 0.079 0 0
</code></pre>
<p>My last trial at the moment was using parallefor with Rcppparallel, but I'm getting memory errors and I dont have idea where the problem is </p>
<pre><code>// [[Rcpp::export]]
NumericVector matrixXvectorRcppParallel2(NumericMatrix A, NumericVector x) {
// // declare the InnerProduct instance that takes a pointer to the vector data
int nrows = A.nrow();
NumericMatrix out(nrows,1); //allocar mempria de vector de salida
//crear worker
MatrixMultiplication matrixMultiplication(A, x, out);
parallelFor(0,A.nrow(),matrixMultiplication);
// return the computed product
return out;
}
</code></pre>
<p>What I notice is that when I check in my terminal using htop how the processors are working, I see in htop when I apply the conventional Matrix vector multiplication using R-base, that is using all the processors, so Does the matrix multiplication perform parallel by default? because in theory, only one processor should be working if is the serial version.</p>
<p><a href="https://i.stack.imgur.com/0mfdn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0mfdn.png" alt="Processors usage"></a></p>
<p>If someone knows which is the better path, OpenMP or Rcppparallel, or another way, that gives me better performance than the apparently serial version of R-base.</p>
<p>The serial code for conjugte gradient at the moment</p>
<pre><code>// [[Rcpp::export]]
arma::colvec ConjugateGradient(arma::mat A, arma::colvec xini, arma::colvec b, int num_iteraciones){
//arma::colvec xnew = xini*0 //inicializar en 0's
arma::colvec x= xini; //inicializar en 0's
arma::colvec rkold = b - A*xini;
arma::colvec rknew = b*0;
arma::colvec pk = rkold;
int k=0;
double alpha_k=0;
double betak=0;
double normak = 0.0;
for(k=0; k<num_iteraciones;k++){
Rcout << "iteracion numero " << k << std::endl;
alpha_k = sum(rkold.t() * rkold) / sum(pk.t()*A*pk); //sum de un elemento para realizar casting
(pk.t()*A*pk);
x = x+ alpha_k * pk;
rknew = rkold - alpha_k*A*pk;
normak = sum(rknew.t()*rknew);
if( normak < 0.000001){
break;
}
betak = sum(rknew.t()*rknew) / sum( rkold.t() * rkold );
//actualizar valores para siguiente iteracion
pk = rknew + betak*pk;
rkold = rknew;
}
return x;
}
</code></pre>
<p>I wasn't aware of the use of BLAS in R, thanks Hong Ooi and tim18, so the new benchmark using option(matprod="internal") and option(matprod="blas")</p>
<pre><code>options(matprod = "internal")
res<-benchmark(M%*%a,matrixXvector2(M,as.matrix(a)),matrixXvectorParallel(M,a),matrixXvectorParallel2(M,a),matrixXvectorRcppParallel(M,a),order="relative",replications = 20)
res
test replications elapsed relative user.self sys.self user.child sys.child
2 matrixXvector2(M, as.matrix(a)) 20 0.043 1.000 0.107 0.228 0 0
4 matrixXvectorParallel2(M, a) 20 0.069 1.605 0.530 0.000 0 0
1 M %*% a 20 0.072 1.674 0.071 0.000 0 0
3 matrixXvectorParallel(M, a) 20 0.140 3.256 0.746 0.346 0 0
5 matrixXvectorRcppParallel(M, a) 20 0.343 7.977 2.272 0.175 0 0
</code></pre>
<p>options(matprod="blas")</p>
<pre><code>options(matprod = "blas")
res<-benchmark(M%*%a,matrixXvector2(M,as.matrix(a)),matrixXvectorParallel(M,a),matrixXvectorParallel2(M,a),matrixXvectorRcppParallel(M,a),order="relative",replications = 20)
res
test replications elapsed relative user.self sys.self user.child sys.child
1 M %*% a 20 0.021 1.000 0.093 0.054 0 0
2 matrixXvector2(M, as.matrix(a)) 20 0.092 4.381 0.177 0.464 0 0
5 matrixXvectorRcppParallel(M, a) 20 0.328 15.619 2.143 0.109 0 0
4 matrixXvectorParallel2(M, a) 20 0.438 20.857 3.036 0.000 0 0
3 matrixXvectorParallel(M, a) 20 0.546 26.000 3.667 0.127 0 0
</code></pre>
| 0non-cybersec
| Stackexchange | 3,182 | 9,624 |
I cannot reach the website www.github.com. <p>Whatever i tried to open github . com in my browser (tried with chrome and firefox), i failed to load web site</p>
<ul>
<li>i can reach every other web addresses except github . com</li>
<li>i cannot take projec source codes from console via "git clone git:\..."</li>
<li><p>i can ping the site
<code>
kursat@kursat:~$ ping github . com
PING github.com (192.30.252.128) 56(84) bytes of data.
64 bytes from github.com (192.30.252.128): icmp_seq=1 ttl=49 time=125 ms
64 bytes from github.com (192.30.252.128): icmp_seq=2 ttl=49 time=131 ms
</code></p></li>
<li><p>when i check nslookup output was like this
<code>
kursat@kursat:~$ nslookup github.com
Server: 127.0.1.1
Address: 127.0.1.1#53
Non-authoritative answer:
Name: github.com
Address: 192.30.252.129
</code></p></li>
<li><p>when i try to make wget
<code>
kursat@kursat:~$ wget github .com
--2015-02-12 15:32:14-- http:// github .com/
Resolving github.com (github.com)... 192.30.252.128
Connecting to github.com (github.com)|192.30.252.128|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: <a href="https://github" rel="nofollow noreferrer">https://github</a> .com/ [following]
--2015-02-12 15:32:14-- https:// github.com/
Connecting to github.com (github.com)|192.30.252.128|:443... connected.
HTTP request sent, awaiting response...
</code></p></li>
<li><p>when i make eth1 interface down and connect to the site via wlan0,i can connect the github.com</p></li>
</ul>
<p>So i am really wondering what stops my eth1 to reach github.com ?</p>
| 0non-cybersec
| Stackexchange | 577 | 1,599 |
Javascript frameworks for large development teams. <p>My company is reevaluating what kind of web framework we want to use. We are currently using the Ext 4.0 framework but there are questions being raised that it may not be the right framework to use. I like what Ext has to offer (rich GUIs, data package and class system) are there other frameworks out there that are similar? Are there frameworks out there tailored to medium/large software companies? </p>
<p>Info:
Potentially 100's of developers converting thick client screens to the web. Data modeling is important and well as rich GUI support. Maintainability and uniformity across multiple products important as well.</p>
<p>Any info is greatly appreciated.</p>
| 0non-cybersec
| Stackexchange | 168 | 730 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.