text
stringlengths 3
1.74M
| label
class label 2
classes | source
stringclasses 3
values |
---|---|---|
Java Android room alter table java.lang.IllegalStateException: Migration didn't properly handle. <p>I want to add column to existing table I do this :</p>
<pre><code> static final Migration MIGRATION_33_35 = new Migration(33, 35) {
@Override
public void migrate(SupportSQLiteDatabase database) {
database.execSQL("ALTER TABLE 'Orders' " + " ADD COLUMN 'lats' REAL ");
}
};
private static DbManager buildDatabaseInstance(Context context) {
return Room.databaseBuilder(context,
DbManager.class,
DB_NAME)
.addMigrations(MIGRATION_31_32,MIGRATION_33_35)//nazwa powinna byc 32_33
.allowMainThreadQueries().build();
}
</code></pre>
<p>And I do not want to lose my data in which I have rows.
Now I have this :</p>
<pre><code>java.lang.IllegalStateException: Migration didn't properly handle table
</code></pre>
| 0non-cybersec
| Stackexchange |
Just finished building PC, video card overheats during video games. My computer is at 50 degrees celsius when I just have things running in windowed mode (Itunes/Chrome/Magic:the gathering online etc) but if I try to play a full screen game even like Magicka, my temp goes to 80-90 degrees, even though I still only have 1% cpu usage, so im guessing its my video card.
My computer:
Intel I7-960 processor (using its heat sink)
ASUS Sabertooth X58 motherboard
Gefoce GTX560Ti Videocard
Corsair GS600 Power Supply
[Corsair Graphite Series 600T Black Steel / Plastic ATX Mid Tower Computer Case](http://www.newegg.com/Product/Product.aspx?Item=N82E16811139003)
edit: fixed, explained in comments section | 0non-cybersec
| Reddit |
[Everything] so my roommate got a new puppy. | 0non-cybersec
| Reddit |
Kawhi Leonard in 35 minutes in today’s blowout loss to the Grizzlies: 24 points on 8/24 shooting with 5 TOs and a -21. His -21 was the second lowest in the team. Shit looked flat and overall did not look good. For some reason doc played played him 35 minutes in a blowout lose, although he most likely won’t play in tomorrow’s game so that’s not too bad from a rest point of view. | 0non-cybersec
| Reddit |
Find solutions $12x=3$ in $\mathbb{Z}/93\mathbb{Z}$. <p>Does anybody have any idea of how to find all the solutions to
$12x=3$ in $\frac{\mathbb{Z}}{93\mathbb{Z}}$</p>
<p>Edit: I was able to reduce it to $4x=1 \pmod {31}$ and was able to find to $x$ using Euclid's extended algorithm. i.e. $x=8$, but I am still not able to get other 2 values that are $39$ and $70$ with some suitable method. I got these values by trying all possibilities from $0$ till $92$.</p>
| 0non-cybersec
| Stackexchange |
What does MSCK REPAIR TABLE do behind the scenes and why it's so slow?. <p>I know that <code>MSCK REPAIR TABLE</code> updates the metastore with the current partitions of an external table.</p>
<p>To do that, you only need to do <code>ls</code> on the root folder of the table (given the table is partitioned by only one column), and get all its partitions, clearly a < 1s operation. </p>
<p>But in practice, the operation can take a <strong>very long</strong> time to execute (or even <a href="https://docs.aws.amazon.com/athena/latest/ug/msck-repair-table.html" rel="noreferrer">timeout if ran on AWS Athena</a>).</p>
<p>So my question is, what does <code>MSCK REPAIR TABLE</code> actually do behind the scenes and why? </p>
<p>How does MSCK REPAIR TABLE find the partitions?</p>
<hr>
<p>Additional data in case it's relevant:</p>
<p><sub>Our data is all on S3, it's both slow when running on EMR (Hive) or Athena (Presto), there are ~450 partitions in the table, every partition has on avg 90 files, overall 3 Gigabytes for a partition, files are in Apache parquet format</sub></p>
| 0non-cybersec
| Stackexchange |
As the trade war intensifies and as factories slow in major industrial nations, world commerce has deteriorated rapidly in recent months, a perilous development that threatens the global economy with a pronounced downturn.. | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
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 |
Have you noticed iTunes sometimes doesn't download album art, even with perfect tags? Or have you ever wanted a special edition album art, available nowhere else, that iTunes won't download? Here's how to hack it from the iTunes Preview site.. 1. Since you can't search the iTunes Preview site, head over to Google. Searching there will search all regional stores. Your search should read: site:itunes.apple.com search terms here
2. For this example, we'll be using Ilse DeLange's best-of album 'Here I Am', for which a high quality album art image is not available anywhere else: http://itunes.apple.com/be/album/here-i-am/id39278491 (Notice in the link that it's previewing the Belgium store's listing. iTunes won't download artwork for albums that aren't in your regional store, so this trick is also handy for foreign music!)
3. Open the preview album art image in its own tab: http://a4.mzstatic.com/us/r1000/059/Music/y2004/m12/d15/h22/s06.cjowwapl.170x170-75.jpg
4. Notice the file name says 170x170-75. The first two numbers denote the resolution, and the last number denotes the .jpg quality constraint (note that editing the quality doesn't work for everything, and some files that say 75 will actually be unconstrained). The standard artwork resolution for the iTunes Store is 600x600, so edit the resolution part of the file name to read 600x600. Also, in this case, changing the quality to 100 will give a higher quality image. Our result: [http://a4.mzstatic.com/us/r1000/059/Music/y2004/m12/d15/h22/s06.cjowwapl.600x600-100.jpg](http://a4.mzstatic.com/us/r1000/059/Music/y2004/m12/d15/h22/s06.cjowwapl.600x600-100.jpg)
And that's it! I just worked this out last night and figured I would share it with you good people.
Also, the 600x600 link works for all art, not just art whose dimensions are exactly 600x600—that is, non-square images are linked in the same way. | 0non-cybersec
| Reddit |
apt-get upgrade to exclude some updates. <p>I want to exclude some package(s) when choosing to <code>apt-get upgrade</code>. I'm thinking an edit to source.list probably? For example, maybe a package that updates often with minor point releases, or minor issues to attend to manually first. I'm thinking of <em>percona</em> specifically.</p>
<pre><code>libmysqlclient16 libmysqlclient18 percona-server-client
percona-server-client-5.5 percona-server-common-5.5 percona-server-server
percona-server-server-5.5
</code></pre>
<p>I still want to run <code>apt-get upgrade</code> and have it update everything it finds normally, except what I've asked to be held back or <strong>libmysql*</strong> and <strong>percona*</strong> if possible.</p>
<p>Then I'm not sure yet how I'll upgrade these others manually.</p>
| 0non-cybersec
| Stackexchange |
Black Vultures are highly social birds with strong family bonds. Even after fledging, family groups of black vultures remain in close contact by feeding and roosting together, and they will aggressively chase off non-family members.. | 0non-cybersec
| Reddit |
Godaddy .htaccess and mod_url. <p>I'm an experienced full stack developer and freshly minted webmaster. Recently my client asked me to create a redirect from one url to an outside page. I know how to make a page redirect and I'm pretty sure doing it requires me to work on the .htaccess file or mod_url or both.</p>
<p>The site is hosted at Godaddy on the "Economy Web Hosting Linux" plan. The UI is not very friendly. It's an Apache server. What I need to know is where do I find the .htaccess file to edit it? I also probably need to know where to find the mod_url settings. I can probably do the needful from there.</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
How to use .htaccess with exclusions. <p>I want all requests on a domain to be redirected to <code>https</code>, with the exception of just one particular file. I'm not sure how to accomplish this with .htaccess </p>
<pre><code>-bash-3.2# cat .htaccess
ErrorDocument 404 http://www.example.com
RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.example.com/$1 [R,L]
-bash-3.2#
</code></pre>
<p>The above code redirects everything perfectly, however, I need the <code>robots.txt</code> file to be accessible via <code>http://</code> vs the <code>https://</code> only.</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
What should my fire starter be based on?. I'm making a rom hack with some fakemon. I have the water starter drawn and the grass starter planned out, but I can figure out what my fire starter should be based on. The starters typings are water/poison, grass/rock, and fire/electric. | 0non-cybersec
| Reddit |
Defining the sum on the set $\mathbb N$. <p>Suppose we have a set $\mathbb N$, $0\in \mathbb N$ and $\sigma\colon \mathbb N \to \mathbb N$ satisfying <a href="https://en.wikipedia.org/wiki/Peano_axioms#Formulation" rel="nofollow noreferrer">Peano axioms</a> of natural numbers. </p>
<p>Inside ZF (or ZFC if needed) how do we define the "addition" function i.e. a function $+ \colon \mathbb N \times \mathbb N \to \mathbb N$ satisfying for all $n,m \in \mathbb N$
$$
n + 0 = n\\
n + \sigma(m) = \sigma(n+m).
$$</p>
<p>I have tried to consider all relations satisfying these properties and taking their intersection $R$. I would like to prove that what I get is a function. I have proved that its domain is $\mathbb N \times \mathbb N$ but I am not able to prove that such relation is univoque. To get the result I would need to prove that $\le$ is a well ordering. But to define $\le$ I would like to have already defined $+$... so I'm not sure which one should be defined first and how to proceed.</p>
<p>A reference to a book would be also appreciated.</p>
| 0non-cybersec
| Stackexchange |
I am a 15-year-old high school student who wants to pursue computer science/programming. What should I do now to prepare?. I am taking an AP Java class currently. Should I take other computer classes next year like C # and C++ or should I learn on my own. What else can I do to get into a good college also. Im quite clueless on this, so any help ir tips at all are appreciated. | 0non-cybersec
| Reddit |
How to compute a smooth-degree isogeny given a generator point of its kernel?. <p>I need to compute an isogeny from $E: y^2 = x^3 + ax + b$, given a generator point for its kernel subgroup, using Python.
The point has smooth order.</p>
<p>I need both the parameters for the curve and polynomials for point mappings.</p>
<p>I have already read about Vélu's formulas, but it seems it will take a lot of time to compute each point in the subgroup, and more time to evaluate the curve parameters.</p>
<p>I know PARI and MAGMA provide an algorithm for that, but I need to understand the algorithm to write it on my own.</p>
<p>I am trying to use this for computing SIDH.</p>
| 0non-cybersec
| Stackexchange |
Can we conclude that this matrix is definite positive?. <p>Let $A$ be a $n\text{-by-}m$ matrix. Suppose that columns of $A$ are linearly independent. Can we conclude that $A^TA$ is definite positive? Could you help me with proof?</p>
<p>Thanks.</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
A strange man handed this to me in the library today and I can't stop laughing. | 0non-cybersec
| Reddit |
Laravel table: there can be only one auto column and it must be defined as a key. <p>I have made all integers unsigned but I still get the error. What do I need to change?</p>
<pre><code><?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateFacebook extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('facebook', function($table)
{
$table->increments('id');
$table->integer('user_id')->unsigned();
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade')->onUpdate('cascade');
$table->timestamps();
$table->string('username', 255);
$table->bigInteger('uid', 20)->unsigned();
$table->string('access_token', 255);
$table->string('access_token_secret', 255);
$table->string('photoURL', 255);
$table->string('profileURL', 255);
$table->string('firstName', 255);
$table->string('lastName', 255);
$table->string('gender', 255);
$table->string('age', 20);
$table->integer('birthDay')->unsigned();
$table->integer('birthMonth')->unsigned();
$table->integer('birthYear')->unsigned();
$table->string('email', 255);
$table->string('phone', 30);
$table->string('address', 255);
$table->string('country', 100);
$table->string('region', 100);
$table->string('city', 100);
$table->string('zip', 20);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('facebook');
}
}
</code></pre>
<p>SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be de fined as a key </p>
<p>Thank you.</p>
| 0non-cybersec
| Stackexchange |
Altruist Prod - Instrumentox 1.5 Instrumental [underground french hiphop instrumental]. | 0non-cybersec
| Reddit |
Southwest Airlines' first black pilot takes final ride of 36-year career. | 0non-cybersec
| Reddit |
Limit-Illidan FIRST US MYTHIC ARCHIMONDE!. | 0non-cybersec
| Reddit |
Postgres group by timestamp into 6 hourly buckets. <p>I have the following simple table:</p>
<pre><code>ID TIMESTAMP VALUE
4 2011-05-27 15:50:04 1253
5 2011-05-27 15:55:02 1304
6 2011-05-27 16:00:02 1322
7 2011-05-27 16:05:01 1364
</code></pre>
<p>I would like to average the <code>VALUES</code>, and <code>GROUP</code> each <code>TIMESTAMP</code> day into 6 hourly buckets. e.g 00:00 to 06:00, 06:00 to 12:00, 12:00 to 18:00 & 18:00 to 00:00.</p>
<p>I am able to group by year, month, day & hour using the following query:</p>
<pre><code>select avg(VALUE),
EXTRACT(year from TIMESTAMP) AS year,
EXTRACT(month from TIMESTAMP) AS month,
EXTRACT(day from TIMESTAMP) as day
from TABLE
group by year,month,day
</code></pre>
<p>But I am unable to group each day into 4 periods as defined above, any help is most welcome.</p>
| 0non-cybersec
| Stackexchange |
please, no more!!!. | 0non-cybersec
| Reddit |
Let’s appreciate that our body actually tries to repair itself. | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Dutch government introduces disclosure guidelines for white hat hackers. | 1cybersec
| Reddit |
How to create or import a bilingual table from Word in LaTeX?. <p>Short story: How can I recreate <a href="https://www.dropbox.com/s/ap85xfeekfau1qh/Snippet.docx?dl=0" rel="nofollow noreferrer">this</a> table in LaTeX, I am currently experimenting with the <code>parallel</code> and <code>parcolumns</code> packages, but the results are not similar.</p>
<p>Long story: I am trying to make a bilingual booklet for Gregorian chant, and I have a setup on Word that I like the aesthetic of. But getting proper chant notation is easier with LaTeX, so I would like to recreate <a href="https://www.dropbox.com/s/ap85xfeekfau1qh/Snippet.docx?dl=0" rel="nofollow noreferrer">this</a> table from Word. I am not sure how to proceed as I am completely green when it comes to typesetting.</p>
<p>Edit by me, including my pitiful minimal attempt</p>
<pre><code> \begin{Parallel}[v]{0.4\textwidth}{0.51\textwidth}
\tolerance=1000
\ParallelLText{Examen conscientiæ vel Pater Noster totum secreto}
\ParallelRText{Enten ransager man sin samvittighed eller beder Fader vor i stilhed.}
\ParallelPar
\ParallelLText{Pater noster, qui es in cælis, sanctificétur nomen tuum: advéniat regnum tuum: fiat volúntas tua, sicut in cælo et in terra. Panem nostrum quotidiánum da nobis hódie: et dimítte nobis débita nostra, sicut et nos dimíttimus debitóribus nostris: et ne nos indúcas in tentatiónem: sed líbera nos a malo. Amen.}
\ParallelRText{Fader vor, du som er i Himlen. Helliget vorde dit navn, komme dit rige. Ske din vilje, som i Himlen så og på jorden. Giv os i dag vort daglige brød og forlad os vor skyld, som og vi forlader vore skyldnere, og led os ikke i fristelse, men frels os fra det onde. Amen.}
\end{Parallel}
</code></pre>
<hr>
<p>Edit by naph: embedded image of example.</p>
<p><a href="https://i.stack.imgur.com/m8dNa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m8dNa.png" alt="enter image description here"></a></p>
| 0non-cybersec
| Stackexchange |
unable to load certificate 6300:error:0906D06C:PEM routines:PEM_read_bio:no start line. <p>When I run the command below to check my private-key PEM file, an error pops up</p>
<p><code>unable to load certificate 6300:error:0906D06C:PEM routines:PEM_read_bio:no start line:.\crypto\pem\pem_lib.c:703:Expecting: TRUSTED CERTIFICATE</code></p>
<p><code>command : C:\>openssl x509 -in C:\private-key.pem -text -noout</code></p>
<p>any idea?</p>
| 0non-cybersec
| Stackexchange |
How do I create a class in Javascript?. <p>This is what I got so far, and it's not working at all :( all the variables are null in my player class and update never gets called.</p>
<p>I mean a programming class, not a css class. I.E. not (.movingdiv{color: #ff0000;})</p>
<pre><code><!DOCTYPE html>
<html lang="en">
<head>
<title>Class Test</title>
<meta charset="utf-8" />
<style>
body { text-align: center; background-color: #ffffff;}
#box { position: absolute; left: 610px; top: 80px; height: 50px; width: 50px; background-color: #ff0000; color: #000000;}
</style>
<script type="text/javascript">
document.onkeydown=function(event){keyDown(event)};
document.onkeyup=function(event){keyUp(event)};
var box = 0;
function Player () {
var speed = 5;
var x = 50;
var y = 50;
}
function update() {
box.style.left = this.x + "px";
box.style.top = this.y + "px";
box.innerHTML = "<h6 style=\"margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;\">X: "+ this.x + "<br /> Y: " + this.y + "</h6>";
}
var player = new Player();
var keys = new Array(256);
var i = 0;
for (i = 0;i <= 256; i++){
keys[i] = false;
}
function keyDown(event){
keys[event.keyCode] = true;
}
function keyUp(event){
keys[event.keyCode] = false;
}
function update(){
if(keys[37]) player.x -= player.speed;
if(keys[39]) player.x += player.speed;
player.update();
}
setInterval(update, 1000/60);
</script>
</head>
<body>
<div id="box" ></div>
<script type="text/javascript">
box = document.getElementById('box');
box.innerHTML = "<h6 style=\"margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px;\">X: "+ player.x + "<br /> Y: " + player.y + "</h6>";
</script>
</body>
</html>
</code></pre>
<hr>
<p>Edit: alright, I think I messed up here. The first time I tried to make a class I seem to have messed up. After retrying I seem to be able to now using the "1 Using a function" in Meders post.</p>
<p>the real problem seems to be that javascript doesn't know what to do when it gets to this line in my real code: </p>
<pre><code>box.style.background-position = "" + -(this.frame * this.width) + "px " + -(this.state * this.height) + "px";
</code></pre>
<p>It also seems to choke anytime I put </p>
<p><code>box.style.background-color</code></p>
<p>So the question I need answered now is how do I set a value to style variables in javascript that have a "-" in the name. I'll post a test in a second</p>
| 0non-cybersec
| Stackexchange |
Jesus More Important Than Child's Health Apparently. | 0non-cybersec
| Reddit |
Best use of RAM for multiple SQL instances?. <p>I have a new Windows Server 2016 box with 32GB of RAM, it will be used for dev testing by one or two users max. There will be occasional use of VM/Hyper-V instances and a couple of IIS test sites running from time to time.</p>
<p>I also need to install <em>all</em> versions of SQL Server from 2008 through to 2016. These will each have many databases attached but very few will actually be active at a time unless testing calls for it.</p>
<p>Assuming there is no practical issue with installing several different SQL Server installations on the same box, what options do I have to configure the best use of RAM? I know that on a standard installation, SQL will try to hog all available RAM but I want to try to avoid this leaving around 12GB for other services and allocate a maximum of 24GB for <em>all</em> the SQL instances to share equally without fighting with each other over resources.</p>
<p>Is there a good way to achieve this?</p>
<p>PS I'm not an experienced DBA just a humble developer</p>
| 0non-cybersec
| Stackexchange |
"I found four rolls of film shot in 1991 in Mexico. Any chance the twitterverse can help me find this woman so I can send her these pictures?". | 0non-cybersec
| Reddit |
Mum left her candle too close to the fireplace. | 0non-cybersec
| Reddit |
Splitting of the tangent bundle of a vector bundle and connections. <p>Let $\pi:E\to M$ be a smooth vector bundle. Then we have the following exact sequence of vector bundles over $E$:</p>
<p>$$
0\to VE\xrightarrow{} TE\xrightarrow{\mathrm{d}\pi}\pi^*TM\to 0
$$</p>
<p>Here $VE$ is the vertical bundle, that is kernel of the bunble map $\mathrm{d}\pi$. This sequence splits, so there is a bundle morphism $\sigma:\pi^*TM\to TE$ such that $\mathrm{d}\pi\circ\sigma=\mathrm{Id}$. It can be shown that the data of such a $\sigma$ is equivalent to a connection (covariant derivative) $\nabla$ on $E\to M$ (see for instance the volume 2 of Greub-Halperin-Vanstone). Also we know that $VE\cong\pi^*E$ so that we can write the following decomposition:</p>
<p>$$
TE\cong\pi^*E\oplus\pi^*TM
$$</p>
<p>My question is the following: considering $E$ as a manifold, I would like to consider differential forms on $E$, that is $\Gamma(\Lambda T^*E)$; is the De Rham differential linked to $\nabla$ in some way?</p>
<p>Thank you for your help. Any reference would be very useful.</p>
| 0non-cybersec
| Stackexchange |
Judge Napolitano - Medical Marijuana is a godsend for those suffering from horrible diseases like Glaucoma and yet there are self righteous ignorant control freaks in the Govt. who want to keep these people in perpetual pain. . | 0non-cybersec
| Reddit |
DeVos University grad. | 0non-cybersec
| Reddit |
Initialize empty matrix in Python. <p>I am trying to convert a MATLAB code in Python. I don't know how to initialize empty matrix in Python.</p>
<p>MATLAB Code:</p>
<pre><code>demod4(1) = [];
</code></pre>
<p>I tried in Python </p>
<pre><code>demod4[0] = array([])
</code></pre>
<p>but it gives error: </p>
<pre><code>only length-1 arrays can be converted to Python scalars
</code></pre>
| 0non-cybersec
| Stackexchange |
Monita Secreta Societatis Jesu (open ebook pdf link comments). | 0non-cybersec
| Reddit |
Question on limit of power of rational functions. <p>Let $k$ be a fixed number and suppose that $q_k$ is a polynomial with rational coefficients. In other words $$q_k(y) = \sum_{i=0}^{k}b_i y^i$$ where $b_i, \quad 0 \le i \le k$ are rationals.</p>
<p>Here is my question: I need want to show that either $$\lim_{n \rightarrow \infty} \displaystyle \frac{2^n}{\displaystyle e^{q_k(n)}} = 0$$ or $$\lim_{n \rightarrow \infty} \displaystyle \frac{\displaystyle e^{q_k(n)}}{2^n} = 0.$$</p>
<p>I know that $$ \lim_{n \rightarrow \infty} \frac{1}{2^n} = 0$$ so the first thing that comes to my mind is that $$\lim_{n \rightarrow \infty} \displaystyle \frac{\displaystyle e^{q_k(n)}}{2^n}$$ has to be zero if the $\lim_{n \rightarrow \infty}\displaystyle e^{q_k(n)}$ is finite which I think is infinty. How can I approach this question? Any help on this will be great.</p>
| 0non-cybersec
| Stackexchange |
After having a complicated return from Zappos, finding this in my mailbox made me smile!. | 0non-cybersec
| Reddit |
Question about Real Representations. <p>I am stuck on a problem in Fulton's <em>Representation Theory: A First Course</em>. Exercise 3.39 states:</p>
<p>Let $V_0$ be a real vector space on which $G$ acts irreducibly, $V=V_0 \otimes \Bbb C$ the corresponding real representation of $G$. Show that if $V$ is not irreducible, then it has exactly two irreducible factors, and they are conjugate complex representations of $G$.</p>
<p>I had originally misread the problem and taken $V_0$ to be not only a real $G$-invariant vector space, but a representation of $G$ itself. Proceeding from there, I showed that $V= V_0 \oplus iV_0$, but this is clearly wrong, as these $V_0$ is not complex and these two representations are not conjugate. However, given that $V_0$ is only a real $G$-invariant vector space, I'm not sure how to proceed.</p>
| 0non-cybersec
| Stackexchange |
Reason to not use chmod -R 777 on internal server for project source code?. <p>From my days of amateur web development <a href="https://kb.iu.edu/d/amsv" rel="noreferrer">the principle of least privilege</a> has beaten into me not to use <code>chmod -R 777 dir</code>. I have personally never needed it, so I've never used it.</p>
<p>I now work on a development team professionally, and we recently moved executable code to a shared internal server. Only people from the company can access the server and we trust everyone at our company. The code isn't particularly sensitive, anyway.</p>
<p>Trying to run a script<sup>†</sup> that another team member wrote into the shared folder caused a permissions error, so <em>"just to check if it would otherwise work"</em> a coworker ran <code>chmod -R 777 /opt/path/to/shared/folder</code> on the project. Once it did work the coworker said it's fine to leave it as is instead of switching to a more controlled <code>groups</code> solution for us.</p>
<p>Because I am <a href="https://security.stackexchange.com/a/33471/90486">a chimpanzee</a> I want to speak up and say this is bad practice and we should change it to a <code>groups</code> solution. However, after putting some thought into it I can't come up with a reason why shared executable code on an internal server shouldn't have <code>777</code> permissions.</p>
<p>From a security standpoint, is there any reason to change our project folder's permissions from <code>777</code> to something tied down a little tighter with <code>groups</code>?</p>
<hr>
<p>† We can't change this scripts' permission requirements.</p>
| 0non-cybersec
| Stackexchange |
A ferocious jaguar cub.. | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Microsoft Word - pyruvate in stroke_Brain Res 2003.doc
Published in FINAL edited form as:
BRAIN RESEARCH 990(1-2):1-7 (2003)
Effects of pyruvate administration on infarct volume and neurological
deficits following permanent focal cerebral ischemia in rats
Authors: Armando González-Falcón ‡, Eduardo Candelario-Jalil ‡ *, Michel García-Cabrera and
Olga Sonia León
Affiliation: Department of Pharmacology, University of Havana (CIEB-IFAL), Apartado Postal
6079, Havana City 10600, Cuba.
‡ These authors contributed equally to this report.
*Author to whom all correspondence should be addressed:
Eduardo Candelario-Jalil, Ph.D.
Department of Pharmacology
University of Havana (CIEB-IFAL)
Apartado Postal 6079
Havana City 10600
CUBA
Tel.: +53-7-271-9534
Fax: +53-7-336-811
E-mail: [email protected]
Acknowledgements: The authors are greatly indebted to Dr. Stefano L. Sensi (Department of
Neurology, University of California, Irvine, CA, USA) for his critical comments on the manuscript.
Gonzalez-Falcon et al., 2003 Brain Res. 990: 1-7 (2003)
2
ABSTRACT
Recent experimental evidences indicate that pyruvate, the final metabolite of glycolysis, has a
remarkable protective effect against different types of brain injury. The purpose of this study was to
assess the neuroprotective effect and the neurological outcome after pyruvate administration in a model
of ischemic stroke induced by permanent middle cerebral artery occlusion (pMCAO) in rats. Three
doses of pyruvate (250, 500 and 1000 mg/kg; i.p.) or vehicle were administered intraperitoneally 30 min
after pMCAO. In other set of experiments, pyruvate was given either before, immediately after ischemia
or in a long-term administration paradigm. Functional outcome, mortality and infarct volume were
determined 24 h after stroke. Even when the lowest doses of pyruvate reduced mortality and
neurological deficits, no concomitant reduction in infarct volume was observed. The highest dose of
pyruvate increased cortical infarction by 27 % when administered 30 min after pMCAO. In addition,
when pyruvate was given before pMCAO, a significant increase in neurological deficits was noticed.
Surprisingly, on the contrary of what was found in the case of transient global ischemia, present findings
do not support a great neuroprotective role for pyruvate in permanent focal cerebral ischemia,
suggesting two distinct mechanisms involved in the effects of this glycolytic metabolite in the ischemic
brain.
Theme: Disorders of the nervous system
Topic: Ischemia
Key words: pyruvate; middle cerebral artery occlusion; neuroprotection; stroke
Gonzalez-Falcon et al., 2003 Brain Res. 990: 1-7 (2003)
3
1. INTRODUCTION
Stroke is the second most frequent cause of death and only heart disease causes higher mortality. Stroke
is most commonly the result of an obstruction of blood flow in a major cerebral vessel (e.g., the middle
cerebral artery), which, if not resolved within a short period of time, will lead to an infarcted tissue that
may not be therapeutically salvaged [16,35,36].
Development of an effective therapeutic strategy for stroke has been a priority of neuroscientists for
decades. Although some clinical benefits have been obtained with the antioxidants ebselen and
edaravone [11,39], no neuroprotective agents has been shown conclusively to be clinically effective to
prevent or restrict acute neuronal damage after stroke [6,12].
Ischemia-induced neuronal loss is associated with numerous biochemical events initially triggered by
the extracellular accumulation of glutamate. In turn, excitotoxicity leads to membrane depolarization,
increased concentrations of intracellular calcium, overproduction of reactive oxygen species,
inflammation and activation of apoptotic pathways contributing to the progression of tissue damage
[2,4,5,7,25,38]. Recent evidences indicate that, in addition to calcium, endogenous zinc may play a role
as an ionic mediator of neuronal death, activating various cell death cascades, such as free radical
generation and caspase activation [3,21,26,41,48,53,56].
Interestingly, pyruvate, the end metabolite of the glycolytic pathway, protects striatal neurons against
excitotoxicity induced by a 30-min exposure to N-methyl-D-aspartate [29,47], prevents neuronal death
induced by exogenous and endogenous H2O2 in cultured neurons [8,30,31], protects almost completely
against zinc neurotoxicity [23,49] and prevents H2O2-induced apoptosis [43]. In addition, results from a
very recent report indicate that administration of pyruvate provides spectacular protection against
hippocampal CA1 neuronal injury following transient global cerebral ischemia in rats [23].
In the light of all these evidences, the present study was conducted to assess whether pyruvate would
show neuroprotective efficacy on the cerebral infarction induced by permanent middle cerebral artery
occlusion (pMCAO), a clinically-relevant model of stroke.
2. METHODS
2.1. Animals
Male Sprague-Dawley rats (CENPALAB, Havana, Cuba) weighing 280-340 g at the time of surgery
were used in the present study. Our institutional animal care and use committee approved the
experimental protocol (No. 03/12). The animals were quarantined for at least 7 days before the
experiment. Animals were housed in groups in a room whose environment was maintained at 21-25 ºC,
45-50 % humidity and 12-h light/dark cycle. They had free access to pellet chow and water. Animal
housing, care, and application of experimental procedures were in accordance with institutional
guidelines under approved protocols.
2.2. Permanent focal ischemia model
Rats were anesthetized with chloral hydrate (300 mg/kg body weight, i.p.). Once surgical levels of
anesthesia were attained (assessed by absence of hind leg withdrawal to pinch), ischemia was induced
by using an occluding intraluminal suture [9,22,24]. Briefly, the right common carotid artery (CCA) was
exposed by a ventral midline neck incision and ligated with a 3-0 silk suture. The pterygopalatine branch
Gonzalez-Falcon et al., 2003 Brain Res. 990: 1-7 (2003)
4
of the internal carotid artery was clipped to prevent incorrect insertion of the occluder filament.
Arteriotomy was performed in the CCA approximately 3 mm proximal to the bifurcation and a 3-0
monofilament nylon suture, whose tip had been rounded by being heated near a flame was introduced
into the internal carotid artery (ICA) until a mild resistance was felt (18-19 mm). Mild resistance to this
advancement indicated that the intraluminal occluder had entered the anterior cerebral artery and
occluded the origin of the anterior cerebral artery, the middle cerebral artery (MCA) and posterior
communicating arteries [22]. After the advancement of the nylon suture, the ICA was firmly ligated with
a 3-0 silk suture. The incision was closed and the occluding suture was left in place until sacrificing the
animals. The animals were allowed to recover from anesthesia on an electrical heated blanket and to eat
and drink freely.
To allow for better postoperative recovery, we chose not to monitor physiological parameters in the
present study because additional surgical procedures are needed for this monitoring. Nevertheless, we
performed a separate experiment to investigate the effects of pyruvate on major physiological variables
in ischemic rats (see Results section).
2.3. Neurological Evaluation
Neurological evaluations were performed according to a six-point scale: 0= no neurological deficits, 1=
failure to extend left forepaw fully, 2= circling to the left, 3= falling to left, 4= no spontaneous walking
with a depressed level of consciousness, 5= death [27,32]. The investigator performing the neurological
evaluation did not know the identity of the experimental groups until completion of data analysis.
2.4. Quantification of brain infarct volume
The method for quantification of infarct volume was performed exactly as previously reported [50,55].
Briefly, after completing the neurological evaluation at 24 h after permanent focal cerebral ischemia, the
animals were sacrificed under deep anesthesia and brains were removed, frozen and coronally sectioned
into six 2-mm-thick slices (from rostral to caudal, first to sixth). The brain slices were incubated for 30
min in a 2% solution of 2,3,5-triphenyltetrazolium chloride (TTC) (Sigma Chemical Co.) at 37 °C and
fixed by immersion in a 10% phosphate-buffered formalin solution. Six TTC-stained brain sections per
animal were placed directly on the scanning screen of a color flatbed scanner (Hewlett Packard HP
Scanjet 5370 C) within 7 days. Following image acquisition, the image were analyzed blindly using a
commercial image processing software program (Photoshop, version 7.0, Adobe Systems; Mountain
View, CA). Measurements were made by manually outlining the margins of infarcted areas. The
unstained area of the fixed brain section was defined as infarcted. Cortical and subcortical uncorrected
infarcted areas and total hemispheric areas were calculated separately for each coronal slices. Total
cortical and subcortical uncorrected infarct volumes were calculated by multiplying the infarcted area by
the slice thickness and summing the volume of the six slices. A corrected infarct volume was calculated
to compensate for the effect of brain edema. An edema index was calculated by dividing the total
volume of the hemisphere ipsilateral to pMCAO by the total volume of the contralateral hemisphere.
The actual infarct volume adjusted for edema was calculated by dividing the infarct volume by the
edema index [37,45,54].
2.5. Evaluation of pyruvate action
In order to evaluate the effect of exogenous pyruvate administration on rat focal cerebral ischemia, three
different doses of sodium pyruvate (250, 500 and 1000 mg/kg) were given to rats by intraperitoneal
administration 30 min after the onset of pMCAO (n=9-13 animals per group). This treatment schedule
and dosage range were based on a previous study in which pyruvate showed maximal neuroprotective
Gonzalez-Falcon et al., 2003 Brain Res. 990: 1-7 (2003)
5
effects in a rat model of global cerebral ischemia using these doses and treatment paradigm [23]. Rats
were injected intraperitoneally with different volumes (0.75-3 mL) of a stock solution of sodium
pyruvate (100 mg/mL) depending on the doses and body weight of the animals.
After investigating the dose-response relationship, we studied the effect of pyruvate (1000 mg/kg; i.p.)
when administered 30 min before ischemia (n=26) and immediately after pMCAO (n=12). Moreover,
we evaluated the effects of 500 and 1000 mg/kg of pyruvate when administered in a long-term
administration regime (30 min, 6 h, 12 h and 18 h after pMCAO, n=13-14). In all cases pyruvate was
dissolved in distilled water. As control, osmolarity-matched NaCl (209 mg/kg) solution was injected
intraperitoneally. Results from our pilot studies indicated that there were no differences in infarct
volume, mortality or neurological deficits among groups of rats that underwent pMCAO, when the
vehicle was administered 30 min before, immediately after pMCAO, after 30 min of pMCAO or long-
term administration.
2.6. Data analysis
Data are presented as means ± S.D. Values were compared using t-test, one way ANOVA with post-hoc
Student-Newman-Keuls test and Mann-Whitney test for nonparametric variables (neurological scores).
Differences were considered significant when p<0.05.
3. RESULTS
In this model of proximal pMCAO using an intraluminal nylon filament, TTC staining showed well-
demarcated infarct areas in the temporoparietal cortex and in the laterocaudal part of the caudate
putamen in all operated animals. High-grade neurological deficits (more than 2, see Methods section)
were presented in all animals when tested at 24 h of pMCAO. Thus, no animals required exclusion on
the basis of an inadequate degree of cerebral ischemia.
The effect of pyruvate on neurological deficits and mortality following pMCAO is shown in Table 1.
Pyruvate administration at doses of 250 and 500 mg/kg after 30 min of pMCAO slightly reduced
mortality and neurological deficits, but failed to significantly reduce infarct volume (Fig. 1). However,
the highest dose of pyruvate (1000 mg/kg) did not reduce the neurological deficits or mortality
compared with vehicle. On the contrary, treatment with this dose of pyruvate significantly increased
total (cortical + subcortical) infarct volume compared to the vehicle group (Fig. 1). When considered
separately, mean cortical infarct volume was increased by 27% by treatment with pyruvate when
administered 30 min after pMCAO compared to vehicle rats (237.3 ± 23.9 and 186.8 ± 41.9 mm3,
respectively; p=0.025). Mean subcortical infarct volume was not modified by pyruvate treatment. Then,
the significant increased in cortical infarct volume accounts for the significant increased in total brain
infarct observed in pyruvate-treated animals.
The rostrocaudal distribution of cortical (Fig. 2A) and subcortical (Fig. 2B) infarct areas in the vehicle
and pyruvate 1000 mg/kg groups is depicted in Fig. 2. Infarct areas were significantly greater (p<0.05)
in pyruvate-treated rats than in the vehicle group at coronal levels 5 and 6, but in general there was a
marked trend towards a greater cortical infarct areas in sections 2, 3 and 4, although these differences
did not reach statistical significance (Fig. 2A). No changes in the rostrocaudal distribution of subcortical
infarct areas were observed between vehicle and pyruvate-treated groups (Fig. 2B).
Gonzalez-Falcon et al., 2003 Brain Res. 990: 1-7 (2003)
6
On the other hand, when pyruvate was administered 30 min before or immediately after pMCAO, no
significant effect was noticed in infarct volume (Table 2). However, a significant increased in
neurological deficits in pyruvate-pretreated rats as compared with vehicle was observed as shown in
Table 1. Long-term administration of pyruvate failed to modify any of the evaluated parameters when
compared to vehicle-treated rats (Tables 1 and 2).
The effects observed with pyruvate in the present study were not related to modification of physiological
variables since these parameters (mean arterial blood pressure, pO2, pCO2, blood pH, rectal temperature,
plasma glucose, hematocrit) were monitored in a separate experiment and did not differ between
pyruvate-treated and vehicle-treated animals (data not shown). These findings are in agreement with
those obtained by others [33,34], suggesting that exogenous administration of pyruvate does not
significantly change physiological variables.
4. DISCUSSION
The core findings of this study are: i) pyruvate administration failed to confer protection against
permanent focal cerebral ischemia in rats and ii) the highest dose of pyruvate increased infarct volume in
rats subjected to pMCAO when treatment is given 30 min after the onset of ischemia.
This study was prompted by the encouraging results obtained by Lee et al [23], which showed that
systemic administration of sodium pyruvate (500-1000 mg/kg) was remarkably neuroprotective in rats
against global cerebral ischemia, a type of injury that mimics the clinical situation of cardio-respiratory
arrest.
We decided to explore the effects of pyruvate at the exact dose range and similar treatment schedule of
those tested by Lee et al [23] in rats subjected to pMCAO, because most cases of human ischemic stroke
are caused by permanent occlusion of cerebral arteries. Since in stroke patients a very early spontaneous
recanalization of an obstructed brain vessel is only rarely found, experimental models of pMCAO may
be more relevant to the clinical situation [13,15,20,40].
Apparent discrepancies between our present results and those of Lee et al [23] may be due to differences
in the pathophysiological mechanisms between the two models of cerebral ischemia. It is important to
emphasize that in global cerebral ischemia, delayed neuronal death occurs in selective vulnerable
regions of brain, specifically in CA1 region of hippocampus through a myriad of biochemical
mechanisms that predominantly lead to apoptosis of damaged neurons [17,44,57]. In pMCAO models,
most of the ischemic tissue dies through a rapid necrotic mechanism, which is accompanied by a
dramatic inflammatory response [19,25,58]. Probably, the mechanism of neuronal death prevailing in
each model is playing a key role, since pyruvate has been proven to limit apoptotic cell death in both
non-neuronal cells [43] and in hippocampal and cortical neurons following forebrain ischemia, but does
not reduce necrotic neuronal death induced by a 24-h exposure to NMDA, glutamate or ionomycin
(calcium-overload toxicity) [23].
According to our results, the lowest doses of pyruvate reduced mortality and neurological deficits, but
this favorable effects were not accompanied by a significant reduction in infarct volume (Table 1 and
Gonzalez-Falcon et al., 2003 Brain Res. 990: 1-7 (2003)
7
Fig. 1). This might reflect the fact that unlike ischemic injury to many other tissues, the severity of
disability is not predicted well by the amount of brain tissue lost. For example, damage to a small area in
the medial temporal lobe may lead to severe disability, while damage to a greater volume elsewhere has
little effect of function [10]. The majority of studies directed toward determining neuroprotective
efficacy have used reduction of infarct volume as a measure of a drug’s efficacy in animals subjected to
focal ischemia. Although it is presumed that reduced lesion size will translate to improved functional
outcome, a direct correlation is not always observed in animals models [18] or in stroke patients [52].
For that reason, it is very important to emphasize that even when the lowest doses of pyruvate did not
reduce infarct volume in pMCAO, one can not minimize the beneficial effects of these doses since a
significant reduction in mortality (by 80 %) and improvement of neurological deficits were observed in
the present study. Thus, further studies would be required to better characterize the effects of the lowest
doses of pyruvate in models of cerebral ischemia to increase predictive outcome in the clinic.
On the other hand, there seems to be a threshold for the detrimental effects observed with pyruvate in
focal ischemia and the time of administration also plays an important role. When the dose of pyruvate
was increased to 1000 mg/kg (given 30 min after pMCAO), infarct volume was significantly increased
by 27 %. Similarly, the detrimental effects of pyruvate in rats subjected to pMCAO are also observed
when this glycolytic metabolite is administered before or immediately after pMCAO (Table 1), although
no significant changes were noticed in infarct volumes (Table 2).
These observations suggest that high concentrations of pyruvate could counteract its neuroprotective
effects probably by inducing an intracellular acidification. Pyruvate, as lactate, is transported across the
plasma membrane by the H+-monocarboxylate cotransporter [42], resulting in a cytosolic acidification
[8]. The intracellular acidification is able to enhance the neurotoxic effect of H2O2 [8] and to induce the
release of active iron from ferritin [1,14], a process that leads to enhanced production of hydroxyl
radicals [46,51].
Most reports showing protective effects of pyruvate against cellular damage in different neuronal and
non-neuronal cells, explain the protective properties of this metabolite through a mechanism involving
H2O2 scavenging ability and not to an improvement of energy metabolism [8,30,31,43]. Unlike transient
cerebral ischemia, oxidative damaging events do not seem to play a determining role in brain injury in
permanent (no reperfusion) models of stroke [28]. This probably helps to explain our present results
with pyruvate in a model of pMCAO.
In summary, the present study has evaluated by the first time the effects of pyruvate in permanent focal
cerebral ischemia showing modest positive effects at low doses and detrimental effects when given at
high doses. On the contrary of what was found in the case of transient global ischemia [23], present
findings do not support a great neuroprotective role for pyruvate in permanent focal ischemia. We
believe that it is very important to perform thorough, multifactorial and well-designed pre-clinical
studies before assuming definitive conclusions on the neuroprotective effect of a given compound. In
this particular case, our results and those by Lee et al [23] suggest that pyruvate could be tested in
clinical trials with patients suffering from global cerebral damage but not in those with permanent
stroke. Although success in animal studies does not guarantee success in clinical trials, the absence of
neuroprotection or modest positive effects in animal studies indicate a lower likelihood of success in
humans.
Gonzalez-Falcon et al., 2003 Brain Res. 990: 1-7 (2003)
8
References
[1] J.M. Braughler, E.D. Hall, Central nervous system trauma and stroke. I. Biochemical considerations for oxygen
radical formation and lipid peroxidation. Free Radic. Biol. Med. 6 (1989) 289-301.
[2] D.W. Choi, Calcium: still center-stage in hypoxic-ischemic neuronal death, Trends Neurosci. 18 (1995) 58-60.
[3] D.W. Choi, J.Y. Koh, Zinc and brain injury, Annu. Rev. Neurosci. 21 (1998) 347-375.
[4] D.W. Choi, S.M. Rothman, The role of glutamate neurotoxicity in hypoxic-ischemic neuronal death, Annu. Rev.
Neurosci. 13 (1990) 171-182.
[5] W. Danysz, A.C. Parsons, Glycine and N-methyl-D-aspartate receptors: physiological significance and possible
therapeutic applications, Pharmacol. Rev. 50 (1998) 597-664.
[6] R. Davenport, M. Dennis, Neurological emergencies: acute stroke, J. Neurol. Neurosurg. Psychiatry 68 (2000) 277-
288.
[7] G. del Zoppo, I. Ginis, J.M. Hallenbeck, C. Iadecola, X.Wang, G.Z. Feuerstein, Inflammation and stroke: putative
role for cytokines, adhesion molecules and iNOS in brain response to ischemia, Brain Pathol. 10 (2000) 95-112.
[8] S. Desagher, J. Glowinski, J. Premont, Pyruvate protects neurons against hydrogen peroxide-induced toxicity, J.
Neurosci. 17 (1997) 9060-9067.
[9] A. Doerfler, S. Schwab, T.T. Hoffmann, T. Engelhorn, M. Forsting, Combination of decompressive craniectomy and
mild hypothermia ameliorates infarction volume after permanent focal ischemia in rats, Stroke 32 (2001) 2675-
2681.
[10] L.L. Dugan, D.W. Choi, Hypoxic-ischemic brain injury and oxidative stress. In: G.J. Siegel, B.W. Agranoff, R.W.
Albers, S.K. Fisher, M.D. Uhler (Eds.), Basic Neurochemistry: Molecular, Cellular and Medical Aspects.
Lippincott-Raven Publishers, Philadelphia, 1999, pp. 711-729.
[11] Edaravone Acute Infarction Study Group, Effect of a novel free radical scavenger, edaravone (MCI-186), on acute
brain infarction. Randomized, placebo-controlled, double-blind study at multicenters, Cerebrovasc. Dis. 15 (2003)
222-229.
[12] M. Fisher, Neuroprotection of acute ischemic stroke: where are we?, Neuroscientist 5 (1999) 392-401.
[13] M. Fisher, Stroke Therapy. 2nd Edition. Butterworth Heineman, 2001.
[14] F. Funk, J.P. Lenders, R.R. Crichton, W. Schneider, Reductive mobilisation of ferritin iron, Eur. J. Biochem. 152
(1985)167-172.
[15] W. Hacke, S. Schwab, M Horn, M. Spranger, M. De Georgia, R. von Kummer, The “malignant” middle cerebral
artery territory infarction: clinical course and prognostic signs, Arch. Neurol. 53 (1996) 309-315.
[16] G.J. Hankey, Stroke: how large a public health problem, and how can the neurologist help?, Arch. Neurol. 56 (1999)
748-754.
[17] J. Honkaniemi, S.M. Massa, M. Breckinridge, F.R. Sharp, Global ischemia induces apoptosis-associated genes in
hippocampus, Brain Res. Mol. Brain Res. 42 (1996) 79-88.
[18] A.J. Hunter, K.B. Mackay, D.C. Rogers, To what extent have functional studies of ischaemia in animals been useful
in the assessment of potential neuroprotective agents?, Trends Pharmacol. Sci. 19 (1998) 59-66.
Gonzalez-Falcon et al., 2003 Brain Res. 990: 1-7 (2003)
9
[19] C. Iadecola, M. Alexander, Cerebral ischemia and inflammation, Curr. Opin. Neurol. 14 (2001) 89-94.
[20] H. Kassem-Moussa, C. Graffagnino, Nonocclusion and spontaneous recanalization rates in acute ischemic stroke: a
review of cerebral angiography studies, Arch. Neurol. 59 (2002) 1870-1873.
[21] Y. H. Kim, E.Y. Kim, B.J. Gwag, S. Sohn, J.Y. Koh, Zinc-induced cortical neuronal death with features of apoptosis
and necrosis: mediation by free radicals, Neuroscience 89 (1999) 175-182.
[22] J. Koizumi, Y. Yoshida, T. Nakazawa, G. Ooneda, Experimental studies of ischemic brain edema. 1. A new
experimental model of cerebral embolism in rats in which recirculation can be introduced in the ischemic area, Jpn.
J. Stroke 8 (1986) 1-8.
[23] J.Y. Lee, Y.H. Kim, J.Y. Koh, Protection by pyruvate against transient forebrain ischemia in rats, J. Neurosci. 21
(2001) RC171.
[24] Q. Li, D. Stephenson, Postischemic administration of basic fibroblast growth factor improves sensorimotor function
and reduces infarct size following permanent focal cerebral ischemia in the rat, Exp. Neurol. 177 (2002) 531-537.
[25] Y. Liu, L. Belayev, W. Zhao, R. Busto, M.D. Ginsberg, MRZ 2/579, a novel uncompetitive N-methyl-D-aspartate
antagonist, reduces infarct volume and brain swelling and improves neurological deficits after focal cerebral
ischemia in rats, Brain Res. 862 (2000) 111-119.
[26] D. Lobner, L.M. Canzoniero, P. Mancera, F. Gottron, H. Ying, M. Knudson, M. Tian, L.L. Dugan, G.A. Kerchner,
C.T. Sheline, S.J. Korsmeyer, D.W. Choi, Zinc-induced neuronal death in cortical neurons, Cell. Mol. Biol. 46
(2000) 797-806.
[27] E.Z. Longa, P.R. Weinstein, S. Carlson, R. Cummins, Reversible middle cerebral artery occlusion without
craniectomy in rats, Stroke 20 (1989) 84-91.
[28] S. Love, Oxidative stress in brain ischemia, Brain Pathol 9 (1999) 119-131.
[29] M. Maus, P. Marin, M. Israel, J. Glowinski, J. Premont, Pyruvate and lactate protect striatal neurons against N-
methyl-D-aspartate-induced neurotoxicity, Eur. J. Neurosci. 11 (1999) 3215-3224.
[30] E. Mazzio, K.F. Soliman, Pyruvic acid cytoprotection against 1-methyl-4-phenylpyridinium, 6- hydroxydopamine
and hydrogen peroxide toxicities in vitro, Neurosci. Lett. 337 (2003) 77-80.
[31] E. Mazzio, K.F. Soliman, Cytoprotection of pyruvic acid and reduced beta-nicotinamide adenine dinucleotide
against hydrogen peroxide toxicity in neuroblastoma cells, Neurochem. Res. 28 (2003) 733-741.
[32] K. Minematsu, L. Li, C.H. Sotak, M.A. Davis, M. Fisher, Reversible focal ischemic injury demonstrated by
diffusion-weighted magnetic resonance imaging in rats, Stroke 23 (1992) 1304-1310.
[33] P.D. Mongan, J.L. Fontana, R. Chen, R. Bünger, Intravenous pyruvate prolongs survival during hemorrhagic shock
in swine, Am. J. Physiol. Heart Circ. Physiol. 277 (1999) H2253–H2263.
[34] P.D. Mongan, J. Capacchione, J.L. Fontana, S. West, R. Bünger, Pyruvate improves cerebral metabolism during
hemorrhagic shock. Am. J. Physiol. Heart Circ. Physiol. 281 (2001) H854–H864.
[35] P. Muntner, E. Garrett, M.J. Klag, J. Coresh, Trends in stroke prevalence between 1973 and 1991 in the US
population 25 to 74 years of age, Stroke 33 (2002) 1209-1213.
[36] C.J. Murray, A.D. López, Mortality by cause for eight regions of the world: Global burden of Disease Study, Lancet
349 (1997) 1269-1276.
Gonzalez-Falcon et al., 2003 Brain Res. 990: 1-7 (2003)
10
[37] N. Nagai, M. De Mol, B. Van Hoef, M. Verstreken, D. Collen, Depletion of circulating alpha(2)-antiplasmin by
intravenous plasmin or immunoneutralization reduces focal cerebral ischemic injury in the absence of arterial
recanalization, Blood 97 (2001) 3086-3092.
[38] S. Namura, J. Zhu, K. Fink, M. Endres, A. Srinivasan, K.J. Tomaselli, J. Yuan, M.A. Moskowitz, Activation and
cleavage of caspase-3 in apoptosis induced by experimental cerebral ischemia, J. Neurosci. 18 (1998) 3659-3668.
[39] A. Ogawa, T. Yoshimoto, H. Kikuchi, K. Sano, I. Saito, T. Yamaguchi, H. Yasuhara, Ebselen in acute middle
cerebral artery occlusion: a placebo-controlled, double blind clinical trial. Cerebrovasc. Dis. 9 (1999) 112-118.
[40] P. Pantano, F. Caramia, L. Bozzao, C. Dieler, R. von Kummer, Delayed increase in infarct volume after cerebral
ischemia: correlation with thrombolytic treatment and clinical outcome, Stroke 30 (1999) 502-507.
[41] J.A. Park, J.Y. Lee, T.A. Sato, J.Y. Koh, Co-induction of p75NTR and p75NTR- associated death executor in
neurons after zinc exposure in cortical culture or transient ischemia in the rat, J. Neurosci. 20 (2000) 9096-9103.
[42] R.C. Poole, A.P. Halestrap, Transport of lactate and other monocarboxylates across mammalian plasma membranes.
Am. J. Physiol. 264 (1993) C761-C782.
[43] N. Ramakrishnan, R. Chen, D.E. McClain, R. Bunger, Pyruvate prevents hydrogen peroxide-induced apoptosis, Free
Radic. Res. 29 (1998) 283-295.
[44] A. Rami, R. Agarwal, G. Botez, J. Winckler, mu-Calpain activation, DNA fragmentation, and synergistic effects of
caspase and calpain inhibitors in protecting hippocampal neurons from ischemic damage, Brain Res. 866 (2000)
299-312.
[45] D. Reglodi, A. Somogyvari-Vigh, S. Vigh, T. Kozicz, A. Arimura, Delayed systemic administration of PACAP38 is
neuroprotective in transient middle cerebral artery occlusion in the rat, Stroke 31 (2000) 1411-1417.
[46] S. Rehncrona, H.N. Hauge, B.K. Siesjo, Enhancement of iron-catalyzed free radical formation by acidosis in brain
homogenates: differences in effect by lactic acid and CO2, J. Cereb. Blood Flow Metab. 9 (1989) 65-70.
[47] F. Ruiz, G. Alvarez, R. Pereira, M. Hernandez, M. Villalba, F. Cruz, S. Cerdan, E. Bogonez, J. Satrustegui,
Protection by pyruvate and malate against glutamate-mediated neurotoxicity, Neuroreport 9 (1998) 1277-1282.
[48] S.L. Sensi, H.Z. Yin, J.H. Weiss, AMPA/kainate receptor-triggered Zn2+ entry into cortical neurons induces
mitochondrial Zn2+ uptake and persistent mitochondrial dysfunction, Eur. J. Neurosci. 12 (2000) 3813-3818.
[49] C.T. Sheline, M.M. Behrens, D.W. Choi, Zinc-induced cortical neuronal death: contribution of energy failure
attributable to loss of NAD(+) and inhibition of glycolysis, J. Neurosci. 20 (2000) 3139-3146.
[50] A. Shuaib, C. Xu Wang, T. Yang, R. Noor, Effects of nonpeptide V(1) vasopressin receptor antagonist SR-49059 on
infarction volume and recovery of function in a focal embolic stroke model, Stroke 33 (2002) 3033-3037.
[51] B. K. Siesjo, G. Bendek, T. Koide, E. Westerberg, T. Wieloch, Influence of acidosis on lipid peroxidation in brain
tissues in vitro, J. Cereb. Blood Flow Metab. 5 (1985) 253-258.
[52] Stroke Therapy Academy Industry Roundtable (STAIR II), Recommendation for clinical trial evaluation of acute
stroke therapies, Stroke 32 (2001) 1598-1606.
[53] J. H. Weiss, S.L. Sensi, J.K. Koh, Zn(2+): a novel ionic mediator of neural injury in brain disease, Trends
Pharmacol. Sci. 21 (2000) 395-401.
[54] Y. Yang, Q. Li, H. Miyashita, W. Howlett, M. Siddiqui, A. Shuaib, Usefulness of postischemic thrombolysis with or
without neuroprotection in a focal embolic model of cerebral ischemia, J. Neurosurg. 92 (2000) 841-847.
Gonzalez-Falcon et al., 2003 Brain Res. 990: 1-7 (2003)
11
[55] Y. Yang, A. Shuaib, Q. Li, Quantification of infarct size on focal cerebral ischemia model of rats using a simple and
economical method, J. Neurosci. Methods 84 (1998) 9-16.
[56] H.Z. Yin, S.L. Sensi, F. Ogoshi, J.H. Weiss, Blockade of Ca2+-permeable AMPA/kainate channels decreases
oxygen-glucose deprivation- induced Zn2+ accumulation and neuronal loss in hippocampal pyramidal neurons, J.
Neurosci. 22 (2002) 1273-1279.
[57] Q. Zhang, G. Zhang, F. Meng, H. Tian, Biphasic activation of apoptosis signal-regulating kinase 1-stress-activated
protein kinase 1-c-Jun N-terminal protein kinase pathway is selectively mediated by Ca2+-permeable alpha-amino-3-
hydroxy-5-methyl-4-isoxazolepropionate receptors involving oxidative stress following brain ischemia in rat
hippocampus, Neurosci. Lett. 337 (2003) 51-55.
[58] Z. Zhao, M. Cheng, K.R. Maples, J.Y. Ma, A.M. Buchan, NXY-059, a novel free radical trapping compound,
reduces cortical infarction after permanent focal cerebral ischemia in the rat, Brain Res. 909 (2001) 46-50.
Gonzalez-Falcon et al., 2003 Brain Res. 990: 1-7 (2003)
12
Table 1. Summary of mortality and neurological score of rats subjected to permanent middle
cerebral artery occlusion (pMCAO) and effects of sodium pyruvate.
Groups Mortality Neurological Score
Vehicle 12 of 28 (42.8%) 3.84 ± 1.02
Pyruvate 250 mg/kg
30 min after pMCAO
0 of 9 (0%) 3.11 ± 0.73
Pyruvate 500 mg/kg
30 min after pMCAO
1 of 12 (8.3%) 2.83 ± 0.79 *
Pyruvate 1000 mg/kg
30 min after pMCAO
5 of 13 (38.5%) 3.76 ± 1.12
Pyruvate 1000 mg/kg
Immediately after pMCAO
4 of 12 (33.3%) 4.3 ± 0.46
Pyruvate 1000 mg/kg
30 min before pMCAO
17 of 26 (65.4%) 4.6 ± 0.63 **
Repeated treatments
Pyruvate 500 mg/kg
Repeated doses starting
30 min after pMCAO
2 of 13 (15 %) 3.47 ± 0.96
Pyruvate 1000 mg/kg
Repeated doses starting
30 min after pMCAO
8 of 14 (57%) 4.14 ± 1.06
A total of 127 adult rats were used for experiments. Neurological evaluation was performed as
previously described [27,32] before sacrificing the animals at 24 h after pMCAO. *P<0.05 and
**P<0.01 with respect to vehicle.
Gonzalez-Falcon et al., 2003 Brain Res. 990: 1-7 (2003)
13
Table 2. Total infarct volumes of rats subjected to permanent middle cerebral artery occlusion
(pMCAO) and treated with sodium pyruvate (1000 mg/kg) at the indicated time.
Groups Infarct Volume (mm3)
Vehicle 256.65 ± 48.77
Pyruvate 1000 mg/kg,
immediately after pMCAO 275.12 ± 46.69
Pyruvate 1000 mg/kg,
30 min before pMCAO 305.9 ± 46.43
Repeated treatments
Pyruvate 500 mg/kg, repeated
doses 268.34 ± 45.32
Pyruvate 1000 mg/kg, repeated
doses 271.05 ± 59.24
Values are mean ± S.D. for all groups. There were no statistically significant
differences among groups.
Gonzalez-Falcon et al., 2003 Brain Res. 990: 1-7 (2003)
14
Fig. 1. Total, cortical and subcortical infarct volumes after permanent focal cerebral ischemia
in rats. The animals received either pyruvate or vehicle 30 min after the onset of ischemia
and were euthanized 24 h after stroke. There was a significant increase (*P<0.05) in total and
cortical volumes in the group treated with pyruvate 1000 mg/kg.
Gonzalez-Falcon et al., 2003 Brain Res. 990: 1-7 (2003)
15
1 2 3 4 5 6
-10
-8
-6
-4
-2
0
2
4
6
8
10
12
14
16
18
20
22
24
26
28
Vehicle
Pyruvate
S
ub
co
rt
ic
al
In
fa
rc
t A
re
a
(m
m
2 )
Sections
1 2 3 4 5 6
0
5
10
15
20
25
30
35
40
45
Vehicle
Pyruvate
C
or
tic
al
In
fa
rc
t A
re
a
(m
m
2 )
Sections
*
*
A
B
Vehicle Pyruvate
C
Fig. 2. Rostrocaudal distribution of areas of subcortical (A) and cortical infarction (B) at six
coronal levels in pyruvate-treated (1000 mg/kg; 30 min after stroke) and vehicle-treated rats. Panel
C: Representative 2,3,5-triphenyltetrazolium chloride-stained sections of vehicle and pyruvate-
treated animals (1000 mg/kg; i.p.; 30 min after permanent middle cerebral artery occlusion). In
panel B, *P<0.05 compared with the vehicle. Bar= 1 cm in panel C.
| 0non-cybersec
| arXiv |
Oh how the times have changed. | 0non-cybersec
| Reddit |
Find number of divisors upto $10^9$. <p>I am new to number theory, I have to find the number of divisors up to $10^9$, but i dont know how to do it efficiently and store it in an array in 'c'.
I am using sieve algo to find the number of divisors, here is what I am doing</p>
<pre><code>#include<stdio.h>
#define N 100000
int div[N+1];
void divisors() {
int i,len,j;
for(i=2;i<=N;i++) {
for(j=i;j<N;j+=i)
div[j]++;
}
}
int main(){
int i;
divisors();
for(i=1;i<N;i++) printf("%d\n",div[i]+1);
return 0;
}
</code></pre>
<p>Thank You</p>
| 0non-cybersec
| Stackexchange |
How to make focus() work before the DOM element shown. <p><strong>UPDATE: it turns out there is no way to directly apply focus to textbox before DOM rendering finished</strong></p>
<hr>
<p>I wonder why the focus() function does not work on hidden element.</p>
<p>For example( I am using Vue.js ):</p>
<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="true">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>var vm = new Vue({
el: "#app",
data:{
showtext: false
},
methods: {
showTxt(ev){
this.showtext = true
var vm = this;
// if I uncomment setTimeout, then the textbox can set focus
//setTimeout(function(){
vm.$refs.textbox.focus()
//}, 0)
}
}
})</code></pre>
<pre class="snippet-code-html lang-html prettyprint-override"><code><script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<div id="app">
<button @click="showTxt">
Show Textbox and SetFocus on it
</button>
<div v-show="showtext">
<input ref="textbox" type="text" />
</div>
</div></code></pre>
</div>
</div>
</p>
<p>What I am trying to do is to click that button and show textbox and put focus in textbox, but currently, the textbox can not get focus if I directly call .focus(). It only works when I wrap a setTimeout around it(which I guess run on the next event loop). I wonder if there is any way to make the focus working without setTimeout?</p>
<p>Thanks</p>
| 0non-cybersec
| Stackexchange |
Openvpn server conf route. <p>Here is my openvpn server conf - </p>
<pre><code>server 192.168.255.0 255.255.255.0
verb 3
key /etc/openvpn/pki/private/VPN.SERVERNAME.COM.key
ca /etc/openvpn/pki/ca.crt
cert /etc/openvpn/pki/issued/VPN.SERVERNAME.COM.crt
dh /etc/openvpn/pki/dh.pem
tls-auth /etc/openvpn/pki/ta.key
key-direction 0
keepalive 10 60
persist-key
persist-tun
proto udp
# Rely on Docker to do port mapping, internally always 1194
port 1194
dev tun0
status /tmp/openvpn-status.log
user nobody
group nogroup
### Route Configurations Below
route 192.168.254.0 255.255.255.0
</code></pre>
<p>I'm trying to understand what does the "route" configuration do? I checked the ip addr of the host where my openvpn is running but its ip address is different.</p>
| 0non-cybersec
| Stackexchange |
All the supportive and funny comments on this cute post made my day!. | 0non-cybersec
| Reddit |
How to Save Money With Steam. | 0non-cybersec
| Reddit |
Look into my crystal ball, again.. | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Bob Marley would be so proud. | 0non-cybersec
| Reddit |
2Pac - Check Out Time. | 0non-cybersec
| Reddit |
Touchpad and touchscreen stopped working on dell XPS 13 9360 with ubuntu 16.04.1 They work on liveUSB. <p>Tried different guides like <a href="https://askubuntu.com/questions/586420/touchpad-not-working-suddenly-in-ubuntu-14-04">touchpad not working suddenly in Ubuntu 14.04</a></p>
<pre><code>$ xinput
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ Logitech USB Optical Mouse id=10 [slave pointer (2)]
⎜ ↳ SynPS/2 Synaptics TouchPad id=12 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ Power Button id=6 [slave keyboard (3)]
↳ Video Bus id=7 [slave keyboard (3)]
↳ Power Button id=8 [slave keyboard (3)]
↳ Sleep Button id=9 [slave keyboard (3)]
↳ AT Translated Set 2 keyboard id=11 [slave keyboard (3)]
↳ Dell WMI hotkeys id=13 [slave keyboard (3)]
↳ Integrated_Webcam_HD id=14 [slave keyboard (3)]
</code></pre>
<p>As you can see on xinput comes up only the touchpad but are both shown in the input devices</p>
<pre><code>$ cat /proc/bus/input/devices
I: Bus=0019 Vendor=0000 Product=0005 Version=0000
N: Name="Lid Switch"
P: Phys=PNP0C0D/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input0
U: Uniq=
H: Handlers=event0
B: PROP=0
B: EV=21
B: SW=1
I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
U: Uniq=
H: Handlers=kbd event1
B: PROP=0
B: EV=3
B: KEY=10000000000000 0
I: Bus=0019 Vendor=0000 Product=0003 Version=0000
N: Name="Sleep Button"
P: Phys=PNP0C0E/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input2
U: Uniq=
H: Handlers=kbd event2
B: PROP=0
B: EV=3
B: KEY=4000 0 0
I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=LNXPWRBN/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input3
U: Uniq=
H: Handlers=kbd event3
B: PROP=0
B: EV=3
B: KEY=10000000000000 0
I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input4
U: Uniq=
H: Handlers=sysrq kbd event4 leds
B: PROP=0
B: EV=120013
B: KEY=1100f02902000 8380307cf910f001 feffffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=7
I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input7
U: Uniq=
H: Handlers=kbd event5
B: PROP=0
B: EV=3
B: KEY=3e000b00000000 0 0 0
I: Bus=0011 Vendor=0002 Product=0007 Version=01a1
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio1/input0
S: Sysfs=/devices/platform/i8042/serio1/input/input6
U: Uniq=
H: Handlers=mouse0 event6
B: PROP=5
B: EV=b
B: KEY=e520 10000 0 0 0 0
B: ABS=660800011000003
I: Bus=0003 Vendor=046d Product=c05a Version=0111
N: Name="Logitech USB Optical Mouse"
P: Phys=usb-0000:00:14.0-2/input0
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.0/0003:046D:C05A.0001/input/input8
U: Uniq=
H: Handlers=mouse1 event7
B: PROP=0
B: EV=17
B: KEY=70000 0 0 0 0
B: REL=103
B: MSC=10
I: Bus=0019 Vendor=0000 Product=0000 Version=0000
N: Name="Dell WMI hotkeys"
P: Phys=wmi/input0
S: Sysfs=/devices/virtual/input/input9
U: Uniq=
H: Handlers=kbd event8
B: PROP=0
B: EV=13
B: KEY=101000b00000400 100000 e000000000000 0
B: MSC=10
I: Bus=0003 Vendor=0bda Product=568b Version=6318
N: Name="Integrated_Webcam_HD"
P: Phys=usb-0000:00:14.0-5/button
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/input/input10
U: Uniq=
H: Handlers=kbd event9
B: PROP=0
B: EV=3
B: KEY=100000 0 0 0
</code></pre>
<p>Booting via liveusb they work fine.</p>
<p>Any clues?</p>
<p>edit: here the same commands that I did run from the live usb:</p>
<pre><code>xinput list --long
⎡ Virtual core pointer id=2 [master pointer (3)]
Reporting 8 classes:
Class originated from: 12. Type: XIButtonClass
Buttons supported: 12
Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" None None None None None
Button state:
Class originated from: 12. Type: XIValuatorClass
Detail for Valuator 0:
Label: Rel X
Range: 0.000000 - 1216.000000
Resolution: 12000 units/m
Mode: relative
Class originated from: 12. Type: XIValuatorClass
Detail for Valuator 1:
Label: Rel Y
Range: 0.000000 - 680.000000
Resolution: 12000 units/m
Mode: relative
Class originated from: 12. Type: XIValuatorClass
Detail for Valuator 2:
Label: Rel Horiz Scroll
Range: 0.000000 - -1.000000
Resolution: 0 units/m
Mode: relative
Class originated from: 12. Type: XIValuatorClass
Detail for Valuator 3:
Label: Rel Vert Scroll
Range: 0.000000 - -1.000000
Resolution: 0 units/m
Mode: relative
Class originated from: 12. Type: XIScrollClass
Scroll info for Valuator 2
type: 2 (horizontal)
increment: 27.000000
flags: 0x0
Class originated from: 12. Type: XIScrollClass
Scroll info for Valuator 3
type: 1 (vertical)
increment: 27.000000
flags: 0x0
Class originated from: 12. Type: XITouchClass
Touch mode: dependent
Max number of touches: 5
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
Reporting 3 classes:
Class originated from: 4. Type: XIButtonClass
Buttons supported: 10
Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" None None None
Button state:
Class originated from: 4. Type: XIValuatorClass
Detail for Valuator 0:
Label: Rel X
Range: -1.000000 - -1.000000
Resolution: 0 units/m
Mode: relative
Class originated from: 4. Type: XIValuatorClass
Detail for Valuator 1:
Label: Rel Y
Range: -1.000000 - -1.000000
Resolution: 0 units/m
Mode: relative
⎜ ↳ ELAN Touchscreen id=10 [slave pointer (2)]
Reporting 9 classes:
Class originated from: 10. Type: XIButtonClass
Buttons supported: 5
Button labels: "Button Unknown" "Button Unknown" "Button Unknown" "Button Wheel Up" "Button Wheel Down"
Button state:
Class originated from: 10. Type: XIValuatorClass
Detail for Valuator 0:
Label: Abs MT Position X
Range: 0.000000 - 3360.000000
Resolution: 11000 units/m
Mode: absolute
Current value: 29.000000
Class originated from: 10. Type: XIValuatorClass
Detail for Valuator 1:
Label: Abs MT Position Y
Range: 0.000000 - 1872.000000
Resolution: 11000 units/m
Mode: absolute
Current value: 185.000000
Class originated from: 10. Type: XIValuatorClass
Detail for Valuator 2:
Label: Abs MT Touch Major
Range: 0.000000 - 255.000000
Resolution: 0 units/m
Mode: absolute
Current value: 1.000000
Class originated from: 10. Type: XIValuatorClass
Detail for Valuator 3:
Label: Abs MT Touch Minor
Range: 0.000000 - 255.000000
Resolution: 0 units/m
Mode: absolute
Current value: 1.000000
Class originated from: 10. Type: XIValuatorClass
Detail for Valuator 4:
Label: Abs MT Orientation
Range: 0.000000 - 1.000000
Resolution: 0 units/m
Mode: absolute
Current value: 0.000000
Class originated from: 10. Type: XIValuatorClass
Detail for Valuator 5:
Label: Abs MT Tool X
Range: 0.000000 - 3360.000000
Resolution: 11000 units/m
Mode: absolute
Current value: 29.000000
Class originated from: 10. Type: XIValuatorClass
Detail for Valuator 6:
Label: Abs MT Tool Y
Range: 0.000000 - 1872.000000
Resolution: 11000 units/m
Mode: absolute
Current value: 186.000000
Class originated from: 10. Type: XITouchClass
Touch mode: direct
Max number of touches: 10
⎜ ↳ DLL075B:01 06CB:76AF Touchpad id=12 [slave pointer (2)]
Reporting 8 classes:
Class originated from: 12. Type: XIButtonClass
Buttons supported: 12
Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" None None None None None
Button state:
Class originated from: 12. Type: XIValuatorClass
Detail for Valuator 0:
Label: Rel X
Range: 0.000000 - 1216.000000
Resolution: 12000 units/m
Mode: relative
Class originated from: 12. Type: XIValuatorClass
Detail for Valuator 1:
Label: Rel Y
Range: 0.000000 - 680.000000
Resolution: 12000 units/m
Mode: relative
Class originated from: 12. Type: XIValuatorClass
Detail for Valuator 2:
Label: Rel Horiz Scroll
Range: 0.000000 - -1.000000
Resolution: 0 units/m
Mode: relative
Class originated from: 12. Type: XIValuatorClass
Detail for Valuator 3:
Label: Rel Vert Scroll
Range: 0.000000 - -1.000000
Resolution: 0 units/m
Mode: relative
Class originated from: 12. Type: XIScrollClass
Scroll info for Valuator 2
type: 2 (horizontal)
increment: 27.000000
flags: 0x0
Class originated from: 12. Type: XIScrollClass
Scroll info for Valuator 3
type: 1 (vertical)
increment: 27.000000
flags: 0x0
Class originated from: 12. Type: XITouchClass
Touch mode: dependent
Max number of touches: 5
⎜ ↳ SynPS/2 Synaptics TouchPad id=15 [slave pointer (2)]
Reporting 9 classes:
Class originated from: 15. Type: XIButtonClass
Buttons supported: 12
Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" None None None None None
Button state:
Class originated from: 15. Type: XIValuatorClass
Detail for Valuator 0:
Label: Rel X
Range: 1276.000000 - 5666.000000
Resolution: 0 units/m
Mode: relative
Class originated from: 15. Type: XIValuatorClass
Detail for Valuator 1:
Label: Rel Y
Range: 1118.000000 - 4734.000000
Resolution: 0 units/m
Mode: relative
Class originated from: 15. Type: XIValuatorClass
Detail for Valuator 2:
Label: Rel Horiz Scroll
Range: 0.000000 - -1.000000
Resolution: 0 units/m
Mode: relative
Class originated from: 15. Type: XIValuatorClass
Detail for Valuator 3:
Label: Rel Vert Scroll
Range: 0.000000 - -1.000000
Resolution: 0 units/m
Mode: relative
Class originated from: 15. Type: XIValuatorClass
Detail for Valuator 4:
Label: Abs MT Pressure
Range: 0.000000 - 255.000000
Resolution: 0 units/m
Mode: absolute
Current value: 0.000000
Class originated from: 15. Type: XIScrollClass
Scroll info for Valuator 2
type: 2 (horizontal)
increment: 113.000000
flags: 0x0
Class originated from: 15. Type: XIScrollClass
Scroll info for Valuator 3
type: 1 (vertical)
increment: 113.000000
flags: 0x0
Class originated from: 15. Type: XITouchClass
Touch mode: dependent
Max number of touches: 2
⎣ Virtual core keyboard id=3 [master keyboard (2)]
Reporting 1 classes:
Class originated from: 14. Type: XIKeyClass
Keycodes supported: 248
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
Reporting 1 classes:
Class originated from: 5. Type: XIKeyClass
Keycodes supported: 248
↳ Power Button id=6 [slave keyboard (3)]
Reporting 1 classes:
Class originated from: 6. Type: XIKeyClass
Keycodes supported: 248
↳ Video Bus id=7 [slave keyboard (3)]
Reporting 1 classes:
Class originated from: 7. Type: XIKeyClass
Keycodes supported: 248
↳ Power Button id=8 [slave keyboard (3)]
Reporting 1 classes:
Class originated from: 8. Type: XIKeyClass
Keycodes supported: 248
↳ Sleep Button id=9 [slave keyboard (3)]
Reporting 1 classes:
Class originated from: 9. Type: XIKeyClass
Keycodes supported: 248
↳ Integrated_Webcam_HD id=11 [slave keyboard (3)]
Reporting 1 classes:
Class originated from: 11. Type: XIKeyClass
Keycodes supported: 248
↳ Intel HID events id=13 [slave keyboard (3)]
Reporting 1 classes:
Class originated from: 13. Type: XIKeyClass
Keycodes supported: 248
↳ AT Translated Set 2 keyboard id=14 [slave keyboard (3)]
Reporting 1 classes:
Class originated from: 14. Type: XIKeyClass
Keycodes supported: 248
↳ Dell WMI hotkeys id=16 [slave keyboard (3)]
Reporting 1 classes:
Class originated from: 16. Type: XIKeyClass
Keycodes supported: 248
$ cat /proc/
I: Bus=0019 Vendor=0000 Product=0005 Version=0000
N: Name="Lid Switch"
P: Phys=PNP0C0D/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input0
U: Uniq=
H: Handlers=event0
B: PROP=0
B: EV=21
B: SW=1
I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0C:00/input/input1
U: Uniq=
H: Handlers=kbd event1
B: PROP=0
B: EV=3
B: KEY=10000000000000 0
I: Bus=0019 Vendor=0000 Product=0003 Version=0000
N: Name="Sleep Button"
P: Phys=PNP0C0E/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input2
U: Uniq=
H: Handlers=kbd event2
B: PROP=0
B: EV=3
B: KEY=4000 0 0
I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button"
P: Phys=LNXPWRBN/button/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXPWRBN:00/input/input3
U: Uniq=
H: Handlers=kbd event3
B: PROP=0
B: EV=3
B: KEY=10000000000000 0
I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/devices/platform/i8042/serio0/input/input4
U: Uniq=
H: Handlers=sysrq kbd event4 leds
B: PROP=0
B: EV=120013
B: KEY=1100f02902000 8380307cf910f001 feffffdfffefffff fffffffffffffffe
B: MSC=10
B: LED=7
I: Bus=0019 Vendor=0000 Product=0006 Version=0000
N: Name="Video Bus"
P: Phys=LNXVIDEO/video/input0
S: Sysfs=/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input7
U: Uniq=
H: Handlers=kbd event5
B: PROP=0
B: EV=3
B: KEY=3e000b00000000 0 0 0
I: Bus=0011 Vendor=0002 Product=0007 Version=01a1
N: Name="SynPS/2 Synaptics TouchPad"
P: Phys=isa0060/serio1/input0
S: Sysfs=/devices/platform/i8042/serio1/input/input6
U: Uniq=
H: Handlers=mouse0 event6
B: PROP=5
B: EV=b
B: KEY=e520 10000 0 0 0 0
B: ABS=660800011000003
I: Bus=0019 Vendor=0000 Product=0000 Version=0000
N: Name="Intel HID events"
P: Phys=
S: Sysfs=/devices/platform/INT33D5:00/input/input8
U: Uniq=
H: Handlers=rfkill kbd event7
B: PROP=0
B: EV=13
B: KEY=81000300000000 5000004000 1e294000000020 0
B: MSC=10
I: Bus=0003 Vendor=04f3 Product=20d0 Version=0110
N: Name="ELAN Touchscreen"
P: Phys=usb-0000:00:14.0-4/input0
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-4/1-4:1.0/0003:04F3:20D0.0001/input/input9
U: Uniq=
H: Handlers=mouse1 event8
B: PROP=2
B: EV=b
B: KEY=400 0 0 0 0 0
B: ABS=3273800000000003
I: Bus=0003 Vendor=0bda Product=568b Version=6318
N: Name="Integrated_Webcam_HD"
P: Phys=usb-0000:00:14.0-5/button
S: Sysfs=/devices/pci0000:00/0000:00:14.0/usb1/1-5/1-5:1.0/input/input11
U: Uniq=
H: Handlers=kbd event9
B: PROP=0
B: EV=3
B: KEY=100000 0 0 0
I: Bus=0019 Vendor=0000 Product=0000 Version=0000
N: Name="Dell WMI hotkeys"
P: Phys=wmi/input0
S: Sysfs=/devices/virtual/input/input12
U: Uniq=
H: Handlers=kbd event10
B: PROP=0
B: EV=13
B: KEY=101000b00000400 100000 e000000000000 0
B: MSC=10
I: Bus=0018 Vendor=06cb Product=76af Version=0100
N: Name="DLL075B:01 06CB:76AF Touchpad"
P: Phys=i2c-DLL075B:01
S: Sysfs=/devices/pci0000:00/0000:00:15.1/i2c_designware.1/i2c-7/i2c-DLL075B:01/0018:06CB:76AF.0002/input/input13
U: Uniq=
H: Handlers=mouse2 event11
B: PROP=5
B: EV=b
B: KEY=e520 10000 0 0 0 0
B: ABS=260800000000003
</code></pre>
<p>at this link <a href="https://www.dropbox.com/s/fp68dhp6ty1g6d7/Xorg.0.log?dl=0" rel="nofollow noreferrer">the complete xorg log on the live cd</a>
here instead <a href="https://www.dropbox.com/s/231w5nizkgr3arb/Xorg.0.log-normal?dl=0" rel="nofollow noreferrer">the complete xorg log on the "normal" install</a></p>
| 0non-cybersec
| Stackexchange |
Guidance for company investigation into porn on employee machine. An employee at my company left his BitTorrent software running on his corporate machine when he connected to the corporate network, which triggered an alert on my security logging tools (SIEM.) I connected to his machine to investigate and found that he was torrenting porn - LOTS of it (100+ gigs). I had to rat him out to HR, and now they want to investigate to see if any of it was CP.
Based on the names of files, most of which the movie titles and the name(s) of the actresses, and a spot check of a few, I really don't think that ANY of the files will be CP, but I was hoping you folks could give me (and my HR department some guidance.)
There are 750+ files - do we need to review each one in order to cover ourselves from a CP / legal perspective? Or does a sampling of the most likely titles (e.g. "Young Teens XXX.mp4") sufficient? I was planning on dumping all of the files to an Excel spreadsheet to help with that. I've never seen CP before (nor do I want to) but I'm not even sure what to look for. Is it a "you'll know it when you see it" type of thing?
Is the a publicly available md5 dump that I can compare the files against? I'm (ahem) not against reviewing the files myself, but I feel like it's a lot to ask the two nice old ladies in HR to view hours upon hours of video without some kind of strategy for knowing when to apply Occam's Razor (the guy is just into 'normal' porn, stuff he'll get fired over but not throw in jail for.)
Thanks! | 1cybersec
| Reddit |
Check if a child is React.Fragment. <p>As I see <code>React.isFragment</code> is only a proposal for the moment: <a href="https://github.com/facebook/react/issues/12038" rel="noreferrer">https://github.com/facebook/react/issues/12038</a></p>
<p>Is there a workaround to do something like</p>
<pre><code>if (child instanceof React.Fragment) {
...
}
</code></pre>
<p>until that API is available.</p>
<p>Temporary solution that works for me:</p>
<pre><code>const isReactFragment = child => {
try {
return child.type.toString() === React.Fragment.toString();
} catch (e) {
return false;
}
};
</code></pre>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Fertility rate of Africa and Middle East [OC]. | 0non-cybersec
| Reddit |
Windows 10 Sleep mode causes unsafe shutdown. <p>Recently, when I leave my computer (desktop, not laptop) alone for half an hour or so, I will come back to find that rather than enter sleep or hibernate, the computer has shut down completely. While Windows 10 normally reuses boot information to make the Windows logo breeze past during startup, I'm usually staring at it for 2 minutes or more, even though the system OS is on a Solid State Drive.</p>
<p>What's more, when I start up the computer, a few programs offer clues that it was an unsafe shutdown. Firefox says it couldn't open the tabs I had up, and Steam asks me for my password (normally remembered).</p>
<p>I've looked in the Windows event logs, but nothing of interest appears at the time of the shutdown; there is one recurring event that stands out; a warning that says "The IO operation at logical block address 0x13f9b8 for Disk 0 (PDO name: \Device\00000031) was retried." It happens every few minutes, not just during a power event, so I'm not sure it's related.</p>
<p>EDIT: Assuming I ran smartctl (smartmontools) correctly, here is its output for C:.</p>
<pre><code>SMART Attributes Data Structure revision number: 1
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
5 Reallocated_Sector_Ct 0x0033 100 100 010 Pre-fail Always - 0
9 Power_On_Hours 0x0032 098 098 000 Old_age Always - 6863
12 Power_Cycle_Count 0x0032 097 097 000 Old_age Always - 2181
177 Wear_Leveling_Count 0x0013 087 087 000 Pre-fail Always - 469
179 Used_Rsvd_Blk_Cnt_Tot 0x0013 100 100 010 Pre-fail Always - 0
181 Program_Fail_Cnt_Total 0x0032 100 100 010 Old_age Always - 0
182 Erase_Fail_Count_Total 0x0032 100 100 010 Old_age Always - 0
183 Runtime_Bad_Block 0x0013 100 100 010 Pre-fail Always - 0
187 Uncorrectable_Error_Cnt 0x0032 100 100 000 Old_age Always - 0
190 Airflow_Temperature_Cel 0x0032 063 047 000 Old_age Always - 37
195 ECC_Error_Rate 0x001a 200 200 000 Old_age Always - 0
199 CRC_Error_Count 0x003e 001 001 000 Old_age Always - 529334
235 POR_Recovery_Count 0x0012 099 099 000 Old_age Always - 134
241 Total_LBAs_Written 0x0032 099 099 000 Old_age Always - 56049724571
</code></pre>
| 0non-cybersec
| Stackexchange |
Boyfriend of 4.5 wants to "take a break" because he wants to know what else is out there. Please help.. I've been with my boyfriend since our Junior year in high school; we were 16 when we started dating and are both 21 now. We've been through so much, and I can't blame him for wanting to know, but at the same time it's killing me. Here's a little back story:
After our senior year, he moved to Texas with his family. This was so hard because neither of us new what would happen. We spent 7 months apart before he ended up moving back to our hometown so he could be with me, and also go to school at the community college. A year later we both move to a town an hour away to attend the state college. We got apartments in the same complex and spent all of our time together.
I've never doubted that he loves me. Never. But in the past, I could tell he wasn't 100% happy, so I initiated a deep talk about it and asked if he wished he was single. He cried and told me that as much as he loved me, he couldn't help but wonder what else is out there and whether or not I was 100% perfect for him. I tried to be very understanding, even though it broke my heart, and told him that I have never wanted anything more than for him to be happy. His happiness means more to me than anything. We talked for a long time and openly discussed the things we needed to change. We were honest and at the end of the conversation, he told me he wanted to stay together and that he wanted to live his life with me by his side. Since then, I've tried to hold up my end of the bargain and make the changes we discussed.
Fast forward to today. We were discussing through texts (he is out of town) what was going to happen after graduation. I said I thought he'd want to go to Texas, and I don't want to live there. I told him I felt like he'd choose moving there over me, to which he said "We'll see." This hurt my feelings and I told him that if it were me, I'd be telling him how much I love him and how we would work it out because I want to be with him no matter what. He replied with a 12-page text saying that he loves me, he's love me more than anything, I'm the only girl he's ever loved, and he'll always love me no matter what happens. He said sometimes he wonders if I'm really 100% perfect for him, and that sometimes he doesn't think I am, but he knows that what he has is damn good and that he's been happy for 4.5 years with me. He said sometimes he wants to know what else there is, but he also doesn't want to throw away such a good thing just to find out. He said it's really tough for him. He said I'm his first serious girlfriend and he's got no other experience to compare this to. He said sometimes he doesn't know how he feels. He said I'm an amazing person and that he doesn't want to hurt me. I'm the last person he'd ever want to hurt, but this is big. It's life changing, but he doesn't want to grow up in regret that he just went with the first thing he found. He said that was the hardest thing he's ever had to say to me, and he asked if I've ever felt the same way. I told him that if it were up to me, and I had to choose right now, I'd be with him forever. He told me that it's not that I'm not good enough, or that he's unhappy, or that he doesn't love me because none of that is true.
I just don't know what to do. I'm at a total loss. Is it normal for people to feel this way? Especially after 4.5 years? What do I do. I'm so hurt...I'm breaking. He's my whole world. I know that we're young, but I love him. I want him to be happy, and I'm prepared to let him go. I just don't get it. What do I do.
TL;DR Boyfriend of 4.5 years wants to take a break to see other people, even though he still loves me. | 0non-cybersec
| Reddit |
Naked guy on drugs in Philadelphia steals cab, drives it through a park, crashes, does an insane burnout, and is dragged from the vehicle by bystanders. | 0non-cybersec
| Reddit |
I wish to install Skype and other downloaded programs on Linux, specifically Debian, AMD64 LXDE. <p>With Linux I have functioned up to now just using apt-get and modifying /etc/apt/sources.list . I followed the instructions in <a href="http://www.debianadmin.com/install-skype-instant-messanger-in-debian-and-ubuntu.html" rel="nofollow noreferrer">this blog</a>. I added "<code>deb h ttp://download.skype.com/linux/repos/debian/ stable non-free</code>" to sources.list, then updated, then tried apt-get install skype</p>
<pre><code>Package skype is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
</code></pre>
<p>This is probably what I get for using 5 year old blog found on google, but if you all share the right repository I can at least get skype to work. But this is part of a bigger problem I have.</p>
<p>I don't actually know how to install packages I download myself, rather than through apt. For instance, I got <a href="http://www.skype.com/intl/en-us/get-skype/on-your-computer/linux/" rel="nofollow noreferrer">official skype site's</a> package downloaded, but I don't know how or where to unpack it, and if I have to do something to ensure my computer uses it. I also have a few other applications and games sitting on my hard drive untouched.</p>
| 0non-cybersec
| Stackexchange |
Ubuntu 20.04 Battery drains even after the laptop is shut down after changing from Windows. <p>I recently switched from windows to Ubuntu 20.04 LTS on my Lenovo e560. Whenever I press shutdown, everything shuts and the screen goes black. Pressing neither of keys other than a power key wakes it up. However battery drains overnight and sometimes its dead.</p>
<p>The unusual behavior I noticed is whenever my PC shuts, the red indicator used to blink three times before but now it blinks for a single time. I tried a hard shutdown by long pressing the power button for the confirmation and it shutdowns with 3 blinks as usual.</p>
<p>I believe the shutdown is not happening properly. Also, the performance of battery is fine and its a giving a good backup when I am working.
Can anyone help me with this please?</p>
| 0non-cybersec
| Stackexchange |
Happy new years from Sweden! Our dog and our friends boy watching the fireworks outside ☺. | 0non-cybersec
| Reddit |
Microsoft SQL: dealing with invalidated databases. <p>I created a Microsoft SQL Server database that has now changed location. (The details are probably unimportant, but for the curious, I originally created it in a folder on an external drive mapped to a particular drive letter, but this mapping no longer exists.)</p>
<p>How can I fix the entry in the Databases list to point to the new MDF file location? I would expect to be able to do this using SQL Server Management Studio Express, but it seems that I can't get the database properties, detach, or even delete the database without a valid connection.</p>
<p>Version info:
I <em>think</em> the database was created using SQL Server Express 2005, but I also have SQL Server 2008 and SQL Server 2012 installed, if that matters. The version of SQL Server Management Studio Express I installed is for SQL Server 2005, but I think I can install a different version if I need to. I'm running 64-bit Win 7.</p>
<p>Disclaimer: I know essentially nothing about SQL servers in general, much less MS SQL Server.</p>
<p><strong>EDIT:</strong> The invalid database entry eventually disappeared from the management studio, and I'm not sure why. I was able to attach it again using the correct file path, and now it works.</p>
| 0non-cybersec
| Stackexchange |
How can i use orbot in my college??its not working. <p>i have a tor application called orbot and it does not function well in our college..how do i configure orbot so i can access tor serviceses in our college networks??
My college has a server based on isa server..it has a [email protected] and port@8080....
so can anyone tell me specifically how to configure orbot..oh and my college blocks most websites including facebook,twiiter,and watsapp and anything like that...sorry for the bad english...so please help
This is the log </p>
<hr>
<pre><code>Orbot is starting…
Orbot is starting…
updating settings in Tor service
updating torrc custom configuration...
success.
Orbot is starting…
Tor (1): Mar 18 20:48:26.600 [notice] Tor v0.2.7.6 running on Linux with Libevent 2.0.22-stable, OpenSSL 1.0.1q and Zlib 1.2.8.
Mar 18 20:48:26.601 [notice] Tor can't help you if you use it wrong! Learn how to be safe at https://www.torproject.org/download/download#warning
Mar 18 20:48:26.601 [notice] Read configuration file "/data/data/org.torproject.android/app_bin/torrc".
Mar 18 20:48:26.601 [notice] Read configuration file "/data/data/org.torproject.android/app_bin/torrc.custom".
Mar 18 20:48:26.624 [notice] Opening Socks listener on 127.0.0.1:0
Mar 18 20:48:26.625 [notice] Socks listener listening on port 33324.
Mar 18 20:48:26.625 [notice] Opening DNS listener on 127.0.0.1:5400
Mar 18 20:48:26.626 [notice] Opening Transparent pf/netfilter listener on 127.0.0.1:9040
Mar 18 20:48:26.626 [warn] Could not bind to 127.0.0.1:9040: Address already in use. Is Tor already running?
Mar 18 20:48:26.626 [notice] Opening Control listener on 127.0.0.1:0
Mar 18 20:48:26.626 [notice] Control listener listening on port 60999.
Mar 18 20:48:26.626 [notice] Closing partially-constructed Socks listener on 127.0.0.1:33324
Mar 18 20:48:26.627 [notice] Closing partially-constructed DNS listener on 127.0.0.1:5400
Mar 18 20:48:26.627 [notice] Closing partially-constructed Control listener on 127.0.0.1:60999
Mar 18 20:48:26.627 [warn] Failed to parse/validate config: Failed to bind one of the listener ports.
Mar 18 20:48:26.627 [err] Reading config failed--see warnings above.
</code></pre>
| 0non-cybersec
| Stackexchange |
PCMR Computer Club!. | 0non-cybersec
| Reddit |
[Pro Football Talk] Zach Brown is signing a one-year, $3 million deal with the Eagles, per his agents the Katz brothers.. | 0non-cybersec
| Reddit |
Man-in-the-middle Blue Coat proxy SSL or what?. <p>I have just discovered that my workplace has enabled some new features in the Blue Coat network proxy. It seems like all HTTPS certificates in Chrome on Windows are being issued by this internal server. Under connection I only see: "The identity of this website has been verified by" this is an internal IP and not the "The identity of this website has been verified by Google Internet Authority". As I do when not running the on the corporate network or on my Ubuntu VM.</p>
<p>As Chrome allows this proxy as CA, everything seems okay, but this also makes me worry a bit. Are they actually doing a man-in-middle where they can look into my communication?</p>
<p>How can I eventually set which CA I want to use? Can I use more than one?</p>
| 0non-cybersec
| Stackexchange |
How GCC compiles C source files.. | 0non-cybersec
| Reddit |
Parents filed tax refund early February and I haven't received it. When do I start getting worried and what do I do?. I'm not sure if this is necessarily personal finance, but this is the most populous reddit where I'm comfortable asking this.
My parents used FreeTaxUSA.com to file my taxes, the first time they did not declare me as dependent. According to the website, the e-filed tax return was accepted 2/7. On the IRS website it says electronically filing cuts the wait time from six weeks to three, but it's been 8 weeks now. It's been listed as "processing" for a while now.
I'm a little concerned, and my parents agree that I should've received it already. How much longer should I wait for it to get deposited? I've tried calling various IRS numbers with no human response. | 0non-cybersec
| Reddit |
Connect MySQL using SSL only with the --ssl-ca option. <p>I copied the <code>ca.pem</code> from server (Percona default 5.7 Ubuntu deb) able to make a secure connection with</p>
<pre><code>mysql --ssl-ca=/var/lib/mysql/ca.pem -u root
</code></pre>
<p>I find that the options <code>--ssl-cert</code> and <code>--ssl-key</code> are actually no needed.</p>
<p>What are the drawbacks in doing so?</p>
| 0non-cybersec
| Stackexchange |
Get input of switch control via headphone jack on iOS. <p>As a little holiday project I want to control an app via an accessibility switch which is connected via 3,5mm headphone jack to the iOS device.</p>
<p>This is the switch and the plug:<a href="https://i.stack.imgur.com/63hTl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/63hTl.png" alt="enter image description here"></a></p>
<p>My problem is that I don't have any clue what kind of signal is fired when I press the button - I assumed that it acts similar to a headphone's remote control.</p>
<p>Is there a way to measure the input of this or does anybody know how to get the input of the button on iOS?</p>
| 0non-cybersec
| Stackexchange |
Dont Allow to update attributes in laravel. <p>In laravel when adding an attribute to <code>$fillable</code> then we can mass assignment in both Create/Update but I want to allow an attribute to mass assignment in create but not allow for update. Now I use Updating Event to achieve this. Is there a better way?</p>
<pre><code>protected static function boot()
{
static::updating(function ($product) {
$product->price = $product->getOriginal('price');
}
}
</code></pre>
| 0non-cybersec
| Stackexchange |
Hey Kids! Have sex with someone in case they plan on killing you!. | 0non-cybersec
| Reddit |
Found this fun little site. Try to create a stable orbit around a black hole.. | 0non-cybersec
| Reddit |
redirect to url on clicking in td space . <p>is there any way when to go to URL when user click in <code><td></code>.</p>
| 0non-cybersec
| Stackexchange |
This is what I did during my final year of Art School. | 0non-cybersec
| Reddit |
He did his best. | 0non-cybersec
| Reddit |
runas when you already are administrator. <p>Something escapes me when trying to use runas to elevage privilege. Simple Win10 machine with single user who already has admin rights. I need to write in a specific registry key via script, but I get "access denied" when I try with the reg command directly.</p>
<pre><code>> reg ...
ERROR: Access is denied.
</code></pre>
<p>If I try:</p>
<pre><code>> runas /user:Administrator Command
Enter the password for Administrator:
1326: The user name or password is incorrect.
</code></pre>
<p>It refuses my user password. I don't think there's a specific administrator password on a local machine, right ? There's no other account.
Trying:</p>
<pre><code>> runas /user:MyUser Command
Enter the password for MyUser:
740: The requested operation requires elevation
</code></pre>
<p>So how do I elevate privileges from the command line ?!?
Why can't I see that I have admin rights here:</p>
<pre><code>>runas /showtrustlevels
The following trust levels are available on your system:
0x20000 (Basic User)
</code></pre>
<p>EDIT:
Maybe I should be more clear about what I want to do. From a C program I want to make a change to WT_KEY_HKLM, "Software\Microsoft\Windows\CurrentVersion\Run". I could do this directly in XP, but in more recent versions of Windows, it has no effect. And indeed, running "reg" on this key from the command line gives access denied. I don't want to run my program with elevated privileges, so muy idea was to do something like system("runas reg ...") where it would ask for the password and make the registry change. But I can't even get the command to work from the command line. Maybe someone can suggest the proper way to do that ?</p>
| 0non-cybersec
| Stackexchange |
basic white girl, avid bernie sanders supporter, pescatarian, devout athiest. Destroy her. | 0non-cybersec
| Reddit |
This Week on PlayStation 4 - North America (Week 169: 2017.01.31). *****
####GAMES
Title|Price
:-|-:
[Adventure Pop](https://store.playstation.com/#!/en-us/games/adventure-pop/cid=UP4040-CUSA05985_00-ADVENTUREPOPGAME)|Free
[Dexed](https://store.playstation.com/#!/en-us/games/dexed/cid=UP3064-CUSA06891_00-DEXED2016NT001EN)|$9.99
[Digimon World: Next Order](https://store.playstation.com/#!/en-us/games/digimon-world-next-order/cid=UP0700-CUSA05469_00-DIGIMONWORLDNE0A)|$59.99
[Divide](https://store.playstation.com/#!/en-us/games/divide/cid=UP0880-CUSA03088_00-ETSTUDIOS1DIVIDE)|$24.99
[Double Dragon IV](https://store.playstation.com/#!/en-us/games/double-dragon-iv/cid=UP0036-CUSA07236_00-DD4MASTERNA00000) (Out 01.30)|$6.99
[Dynasty Warriors: Godseekers](https://store.playstation.com/#!/en-us/games/dynasty-warriors-godseekers-with-bonus/cid=UP4108-CUSA06586_00-DWGODSEEKERSWB00)|$59.99
[Kill the Bad Guy](https://store.playstation.com/#!/en-us/games/kill-the-bad-guy/cid=UP1309-CUSA05109_00-KILLTHEBADGUYEXK)|$6.99
[Knee Deep](https://store.playstation.com/#!/en-us/games/knee-deep/cid=UP4459-CUSA06056_00-KNEEDEEPGAMEPS40)|$14.99
[Linelight](https://store.playstation.com/#!/en-us/games/linelight/cid=UP2401-CUSA07216_00-LINELIGHTPS40000)|$9.99
[Naruto Shippuden: Ultimate Ninja Storm 4](https://store.playstation.com/#!/en-us/games/naruto-shippuden-ultimate-ninja-storm-4-road-to-boruto/cid=UP0700-CUSA06381_00-NARUTOUNS4RTB000) (Out 02.03)|$59.99
*****
####BUNDLES
Title|Price
:-|-:
[Eagle Flight & Werewolves Within PSVR Bundle](https://store.playstation.com/#!/en-us/games/eagle-flight-werewolves-within-psvr-bundle/cid=UP0001-CUSA04900_00-EAGLEWEREWOLVES1)|$54.99
[Hand of Fate: Deluxe Edition](https://store.playstation.com/#!/en-us/games/hand-of-fate-deluxe-edition/cid=UP2182-CUSA01503_00-HOFDELUXEEDITION)|$21.99
[Letter Quest/Three Foruths Home/Paranautical Activity Bundle](https://store.playstation.com/#!/en-us/games/letter-quest-three-fourths-home-paranautical-activity-bundle/cid=UP2187-CUSA03867_00-LQRPATFHBUNDLE00)|$19.99
[Madden NFL 17: Super Bowl Edition](https://store.playstation.com/#!/en-us/games/madden-nfl-17-super-bowl-edition/cid=UP0006-CUSA02095_00-SUPERBOWLBUNDLE1)|$59.99
[Table Top Racing: Swag Bag](https://store.playstation.com/#!/en-us/games/table-top-racing-swag-bag/cid=UP2336-CUSA04838_00-VALUEBUNDLE00001)|$18.99
*****
####DLC
Call of Duty: Infinite Warfare
* Sabotage | $14.99
Dynasty Warriors: Godseekers
* Lixia Yukata Costume | $0.99
Hitman
* Bonus Episode | $9.99
Minecraft: PlayStation 4 Edition
* Villains Skin Pack | $1.99
Resident Evil VII: Biohazard
* Banned Footge Vol. 1 | $9.99
Rocksmith 2014 Edition
* Evanescence - Everybody's Fool | $2.99
* Evanescence - Going Under | $2.99
* Evanescence - My Immortal | $2.99
Tales of Berseria
* Adventure Item Pack 2 | Free
* Attachment Set | $7.99
* Catalog 2 | Free
* Summer Holiday Costume Pack | $11.99
Tom Clancy's Rainbow Six Siege
* Pulse Bushido Set | $7.99
World of Tanks
* British Bulldog Churchill VII Loaded | $34.99
* British Bulldog Chruchill VII Ultimate | $37.99
Zen Pinball 2
* Star Wars Pinball: Rogue One | $3.99
*****
####DEMOS
* [Bound](https://store.playstation.com/#!/en-us/games/bound-demo/cid=UP9000-CUSA07114_00-BOUNDVRDEMO00001)
*****
**[](#ps+) PS+ OFFERINGS** (exp. Feb 07)
* [Azkend 2: The World Beneath](https://store.playstation.com/#!/en-us/games/azkend-2-the-world-beneath/cid=UP4403-CUSA04407_00-AZKEND2000000000)
* [Day of the Tentacle Remastered](https://store.playstation.com/#!/en-us/games/day-of-the-tentacle-remastered/cid=UP2154-CUSA01991_00-DAYOFTHETENTACLE)
* [The Swindle](https://store.playstation.com/#!/en-us/games/the-swindle/cid=UP4395-CUSA02329_00-THESWINDLEUSAPS4)
* [Titan Souls](https://store.playstation.com/#!/en-us/games/titan-souls/cid=UP3643-CUSA01598_00-DEVOTITANSOULS01)
* [This War of Mine: The Little Ones](https://store.playstation.com/#!/en-us/games/this-war-of-mine-the-little-ones/cid=UP2047-CUSA02696_00-THISWAROFMINEG01)
*****
Last week's update: [2016.01.24](https://www.reddit.com/r/PS4/comments/5q05hl/this_week_on_playstation_4_north_america_week_168/)
| 0non-cybersec
| Reddit |
Do pool operators usually set block version numbers before their clients hash?. <p>I know that pool operators have the power to modify the actual transactions in a block. I also know that pool operators can decide on block transaction orderings and even commit double spends pretty easily. I know that pool operators send the merkle root hash of this block to miners. The miner then provides the nonce, which is the hard work of mining.</p>
<p>But, there's another part to mining, which is the block version number. Do most pool operators set this, for e.g. voting, and which bits are able to be set for votes? </p>
| 0non-cybersec
| Stackexchange |
Kenworth cab over with N14. | 0non-cybersec
| Reddit |
The way this vacuum fits.. | 0non-cybersec
| Reddit |
I only gave sweets to children who self-identified as Democrats or independents.... ...I told junior Republicans and tiny Tea Baggers that they shouldn't be coming around looking for socialized candy handouts. | 0non-cybersec
| Reddit |
Why doesn’t my phone update apps even though I have automatic downloads on and it’s almost always on wifi?. | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
The amount of peanut oil in this bottle. | 0non-cybersec
| Reddit |
Let’s avoid that. | 0non-cybersec
| Reddit |
I swatched my entire lipstick collection!. | 0non-cybersec
| Reddit |
Tanker truck fire - Alberta, Canada near Fort McMurray. | 0non-cybersec
| Reddit |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.