text
stringlengths
3
1.74M
label
class label
2 classes
source
stringclasses
3 values
Going back to the end of the previous paragraph. <p>Is there a way to define a TeX command that checks if the current position in the text is at the beginning of a paragraph, and if true, then to go back to the end of the previous paragraph?</p> <p><strong>Edit:</strong> The aim is to solve the following problem. I have a bunch of files that contain several multiple choice questions, in the following format:</p> <pre><code>\begin{problem} ... the statement of the question ... \choices \end{problem} </code></pre> <p>where <code>\choices</code> is some command that I defined to display the choices for the answer. The problem is that now I want to have the choices displayed in the last line of the previous paragraph (separated by <code>\hfill</code> from the statement of the question) in order to gain some space; instead, now the choices for the answer start a new paragraph. I want to modify <code>\choices</code> such that it automatically clears the previous empty line(s), if there is one (or more), so I don't have to do it manually (which would be quite painful).</p>
0non-cybersec
Stackexchange
VBoxSVGA vs VMSVGA Resolution Issues on Linux guest. <p>I'm trying to install LMDE (Linux Mint Debian Edition) 3 on a Windows 10 host. I'm having some trouble with the graphics adapters and resolution settings. I read <a href="https://superuser.com/questions/1403123/what-are-differences-between-vboxvga-vmsvga-and-vboxsvga-in-virtualbox">this SU question</a>, and specifically Mokubai's answer, which helped me. However, I'm running into some issues that neither the VirtualBox user manual nor Mokubai's answer resolves. I'm still at the stage of running the LMDE Live CD and then trying to run the graphical installer.</p> <p>So, I initially tried using the VMSVGA adapter because as the <a href="https://www.virtualbox.org/manual/UserManual.html#settings-display" rel="nofollow noreferrer">current user manual</a> seems to indicate, this is the default adapter for Linux guests and (by inference) should be the one to use. However, when using it I could only get a max resolution of 800 x 600, even with trying to use Hint in Global Settings > Display. I did have 3D Acceleration checked and that seemed fine. The problem with the low resolution was that when I ran the installer, on the first screen alone I couldn't see the whole window and no amount of moving or resizing the window helped. As a result, I just couldn't see enough to click on the Next button.</p> <p>I finally tried using VBoxSVGA and it did let me use a max resolution of 1024 x 768. This resolution let me see the full installer window, allowing me to click on Next. However, when LMDE Live CD starts, I get a message once I get to the desktop screen that "Cinnamon is currently running without hardware acceleration" and instead "running in software rendering mode".</p> <p>Any ideas on why this might be? Is VBoxSVGA only supposed to be used for Windows 7+ guests, while even modern Linux guests are supposed to use VMSVGA? If so, then how can I get my resolution higher? And if VBoxSVGA can be used for Linux guests, then how do I get hardware acceleration to be enabled?</p> <p>Thanks in advance!</p> <p>Edit: This question is NOT a duplicate of a previous question. My question is not simply about differences between VBoxSVA and VMSVGA but specifically resolution issues I'm having with those two graphics adapters on a Linux guest. In my question, I even reference the other question that Mokubai thought mine was a duplicate of. I edited my question title to hopefully show the difference.</p>
0non-cybersec
Stackexchange
Multiroom Airplay audio from Apple TV HD and Apple TV 2. <p>Is it possible to have an Apple TV HD (touch pad remote, airplay 2) airplay audio to an Apple TV 2nd generation (airplay 1) while also playing audio locally?</p>
0non-cybersec
Stackexchange
Tupac Shakur's mother, Afeni Shakur, dies at age 69.
0non-cybersec
Reddit
Recover files from gedit. <p>I suspended my laptop while writing some files in gedit. When I opened my laptop, it suddenly went off and lost the files I had open in the text editor. How can I recover those files?</p> <p><a href="https://i.stack.imgur.com/wWrkA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wWrkA.png" alt="enter image description here"></a></p> <p>I have tried using the terminal, and I have tried Nautilus, but I can't even access Nautilus on my Ubuntu 14.04.</p>
0non-cybersec
Stackexchange
How did the art of carpet weaving develop - did it originate in one place or many places separately? Why do carpets play such an important cultural and economic role throughout Central Asia and the Middle East?. I’ve travelled a fair bit through Central Asia and the Middle East (and parts of North Africa) and am always interested to see the different styles of carpets. Two things that always seem common though are (1) that they appear to be a highly sought after item (and I’m never sure if this is due for functional or status/cultural reasons) and (2) it also seems like carpets/rugs are seen as a good method of storing wealth, I assume because they are always tradeable/sellable and in many cases increase in value in time. I am interested to understand how this developed and whether it was coordinated eg through Ottoman influence or arose more organically in different places.
0non-cybersec
Reddit
My first car!!! An e30!!!. I finally bought my first, own,all mine, car. A 1989 325ix for $200, bought a dodge Dakota off of a cousin for $200 then traded it right away for this e30. Fairly good domestically, small rust on one of the quarter panels and on the rocker but that will be fixed too. Needs a radiator that I will have soon and needs a heater core right away.156,000 on the dash and is the rare x awd version. Sadly it is an automatic but shifts through every gear just fine. I plan on making it a daily/track car with a quick release, mild bucket seats on driver and passenger, a spring set, and exhaust and I take smoothing for better flow. https://imgur.com/gallery/7rOR3 needs a headlight though. Rides good with no noises.
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
This must have disturbed the mailman.
0non-cybersec
Reddit
How can I access a variable defined in a Ruby file I required in IRB?. <p>The file <code>welcome.rb</code> contains:</p> <pre><code>welcome_message = "hi there" </code></pre> <p>But in IRB, I can't access the variable I just created:</p> <pre><code>require './welcome.rb' puts welcome_message # =&gt; undefined local variable or method `welcome_message' for main:Object </code></pre> <p>What is the best way to bring in predefined variables and have initialization work done when you <code>require</code> something into your IRB session? Global variables don't seem like the right path.</p>
0non-cybersec
Stackexchange
Tried to take the poetry route with this match.
0non-cybersec
Reddit
Hallstatt, Austria on a Perfect Spring Day [OC].
0non-cybersec
Reddit
WAYWT - June 20th. WAYWT = What Are You Wearing Today (or a different day, whatever). Think of this as your chance to share your personal taste in fashion with the community. Most users enjoy knowing where you bought your pieces, so please consider including those in your post. Want to know how to take better WAYWT pictures? Read the guide [here](http://www.reddit.com/r/malefashionadvice/comments/16rwft/how_to_take_better_self_pics_for_mfa/). If you're looking for feedback on an outfit instead of just looking to share, consider using Outfit Feedback & Fit Check thread instead. **Important: Downvotes are strongly discouraged in this thread. Sorting by new is strongly encouraged.**
0non-cybersec
Reddit
My Little Sister Just Told Me I'm Going to be an Aunt. Sure..I'm supposed to be elated. A new precious beautiful little life... joining our big ol loving family. I get to be an aunt. A kid that I can dress and take pictures of and then send back to its mother. Sweet, right? OH WAIT. My sister is 21. She JUST got her shit together. She just started in the program she has been dreaming of at FSU this fall! She had her whole life in front of her.. And what's that you say.. oh, right.. she's leaving FSU..to move to the hometown of her boyfriend... who she met this past summer. Who doesn't live close to our family. And maybe they are in love.. but they hardly even know each other. Who is she going to have there for her besides him .. no one. what happens when they are around each other more than a weekend at a time and they hate each other (yeah.. they met this summer at a bar while she was at the beach..) I am so sad for her. And embarassed that my little sister has joined the ranks of the other girls in our little small home town that secured their fate when they got pregnant by some fool that won't be there for them. And angry she could be so irresponsible. And I can't even tell her all this..because I'm sure she knows she has been an idiot, And im sure she is scared. and I know she needs me to be there for her..but DAMN why is she so ignorant! And why uproot all of her plans to move to be with him... away from everyone who she can be sure to depend on to be there for her..
0non-cybersec
Reddit
[ART] Had my character commissioned.
0non-cybersec
Reddit
four-disk md raid10-far can be assembled and ran as &quot;clean, degraded&quot; with only 2 disks. Bug or i&#39;m missing something?. <p>Today i was solving raid failure on raid10-far with four disks. One disk failed and another wasn't re-added after a hard reboot. The mdadm -D was reporting it's clean and running with only two out of four disks. When i tried to read the md array using dd if=/dev/md1 of=/dev/null, the reading failed exactly after 1.5MB with "Buffer I/O error on device md1, logical block XXX" in dmesg. Assuming I use default 512KB chunks, the inevitable thing happened: every fourth chunk, which is located on one of that two missing disks, was unavailable, according to chunk distribution in raid10-FAR <a href="http://goo.gl/5Xl7k" rel="nofollow noreferrer">http://goo.gl/5Xl7k</a>.</p> <p>Does it have some purpose, that the array can be assembled in such a bad way, or is it a bug in md-raid10-far implementation? Raid10-near can be assembled in some cases in this way, so maybe developers forgot to modify the code that decides whether it can or can't be asembled?</p> <p>I use Ubuntu Server 12.04, kernel 3.2.0-26-generic, mdadm v3.2.3</p>
0non-cybersec
Stackexchange
Equivalence of norms in $C^1[0,1]$. <p>i have the following problem/questions: I have to prove that $\lVert \cdot \rVert_1 \sim \lVert \cdot \rVert_{*} $ in $C^1[0,1]$; Where $\lVert \cdot \rVert_1$ is the usual $C^1[0,1]$ norm and $\lVert f \rVert_{*} =\lvert f(0)\rvert + \sup_{t\in[0,1]}\, \lvert f'(t) \rvert $. It's easy to show that $\lVert f \rVert_1 \geq \lVert f \rVert_{*} $. I have have some problem to check the other inequality. My first idea was to create a functional $T(f)=f(0)+f'(t)$ and to apply in some way the Banach-Steinhaus theorem. My second idea produces the following question: if i show that 2 different norms coincide on the norm-null function, are they equivalent? [$\lVert f \rVert_1 =0] \Rightarrow [\lVert f \rVert_{*}=0] $ and [$\lVert f \rVert_* =0] \Rightarrow [\lVert f \rVert_{1}=0$] implies that $\lVert \cdot \rVert_1 \sim \lVert \cdot \rVert_{*} $? Which idea do you suggest? </p>
0non-cybersec
Stackexchange
How to Get People to Do Anything You Want. I enjoyed [this](https://www.youtube.com/watch?v=UCBH7aaw5hs&feature=youtu.be) video and created some cliff notes: 1. Study people, listen to them and find what drives them: power? Visibility? Expiation of guilt? Prestige? Feeling good about themselves? Building something for the future? 2. Values drive all behavior 3. Values drive behavior through perceptions (not truth) 4. Most people take zero responsibility for their effectiveness. 5. McCabe's Law: We don't have to do anything. All humans know this at age 3. 6. Do not talk to people about what you want from them in terms of attitudes, dispositions, personality characteristics, or qualities. People want these things because it validates and drives their ego. 7. People don't do what you want them to do because they don't know what you want them to do. 8. Ask for things from people in the frame of behaviors and performance (these need to be measurable, observable, and quantifiable) 9. Humans from a young age are way over focused on the negative. Which is why the news captivates us. 10. Things that do not influence people: Skill, knowledge, experience, authority, position 11. Things that influence people: FLUFF STYLE SPIN PACKAGING: what we say, how when where, gestures timing tone, language rhythm, mode of communication. 11. Con artists understand it's not what "is" it's what's "perceived to be." 12. People aren't going to do it for your reasons their going to do it for theirs. 13. People are a third more likely to say yes when you use the words "because" and you make them "imagine"(Use stories, they bring emotions to bare on the decision process) 14. If you want more power with people you need to encourage people to engage in things that are good for them but don't necessarily make them feel good. We need to find ways to make things others need to do an attractive package. 15. Peoples purpose in life: to serve their own intrinsic values (things that are important to them) we use our behavior in the service of our values. 16. Asking for help is a positive way to influence people. As adults we think this shows weakness. 17. When given the choice of "being told what to do or help another person." Kids and people will choose help another person. 18. People are starving for recognition and appreciation. This is why thank you notes work. They specify the particular behavior you want to see repeated. 19. Bosses won't accept ownership of an idea you try to feed them if they don't think it's going to work. New Strategy: make it clear that if it works they get the credit and if it doesn't you get the blame. 20. When people don't listen, misinterpret something you said. You say, "I must not have said that very well; let me try it again" They weren't listening because you weren’t interesting enough, they didn't understand because you weren’t clear enough, they didn't buy in because you weren’t persuasive enough. 100% you zero percent them. **EDIT:** Addressing the title and it's manipulation vibe. I just used the title from the video. I don't really see this as manipulation per say. The ideas discussed could be used to manipulate but if you watched the video he specifically says at 7:58 that "it's a sad truth, but if the truth counted we wouldn't have any liars or cheats or con artists in the world." But unfortunately perception is reality. I'm not proposing social engineering at all. It's more about understanding what motivates people including yourself. If you want to take it further the truths that the speaker is addressing can help you **avoid** manipulation by others which is a core social skill.
0non-cybersec
Reddit
windows shortcut key with out ctrl-alt. <p>I was using AutoHotKey, and its a powerful tool, but it seems to sometimes send false keys (aka ones I'm not pressing during a game). So I decided to simply stop using it because the only thing I was using in my ahk script was the keyboard short cut win-z to start the screen saver.</p> <p>So I got a .bat file to run the screen saver. But when I was setting the keyboard shortcut in the shortcut I made for it, I couldn't use win-z anymore, it had to be ctrl-alt-z.</p> <p>so I'm wondering if I can have a shortcut that uses a letter, but not ctrl-alt, (preferable the windows key). If this isn't possible, then I'll just have to use ctrl-alt-z.</p>
0non-cybersec
Stackexchange
How to get Deluge to run as a service and show in tray?. <p>New to Deluge; I'm trying to get Deluge to run either as a Windows service or a Windows Task (to make sure it stays running at all times) while <strong>also</strong> running in the Tray.</p> <p>Deluge is weird ... if I double-click either it's shortcut or deluge.exe, it'll load the GUI and minimize to the tray (I set that setting), but if you add deluge.exe or deluge-gtk.exe as either a service or task, when it runs it'll just show deluge/gtk.exe running in the process list, but not in the tray.</p> <p>I want it this way because I want access to the webUI while also having the GUI running in tray, while also having some sort of check to make sure it's running all the time. It's a server machine, so most of the time I'll be remoting into the webui, but at times I'll also be in front of the machine and want to use the regular GUI.</p> <p>Anyone?</p>
0non-cybersec
Stackexchange
Have Total Commander notice file changes when using FTP. <p>I'm using Total Commander to copy compiled files to a server with FTP, but Total Commander often misses changed files during comparing if the file sizes haven't changed. Since I'm using FTP I can't compare files by content. Also, the time on the server is inconsistent with my system time, so comparing by time and date is out, as well. Is there a way to "mark" my files so Total Commander knows/thinks they have changed?</p>
0non-cybersec
Stackexchange
Prove $\sum_{k=1}^r\frac{1}{k+r}=\sum_{k=1}^{2r}\frac{(-1)^{k-1}}{k}$. <p>How to prove that </p> <blockquote> <p><span class="math-container">$$\sum_{k=1}^r\frac{1}{k+r}=\sum_{k=1}^{2r}\frac{(-1)^{k-1}}{k}\tag1$$</span></p> </blockquote> <p>We know that both sides are equal to <span class="math-container">$H_{2r}-H_r$</span> but I am trying to convert the left side to the right side using <strong>only series manipulations and without going through <span class="math-container">$H_{2r}-H_r$</span></strong></p> <p>There is nothing I could try but we know that <span class="math-container">$$\sum_{k=1}^r\frac{1}{k+r}=\sum_{k=1+r}^{2r}\frac{1}{k}$$</span></p> <p>What next? Thank you.</p> <hr> <p>By the way, its easy to prove it using integration,</p> <p><span class="math-container">$$\sum_{k=1}^r\frac{1}{k+r}=\int_0^1\sum_{k=1}^r x^{k+r-1}\ dx=\int_0^1\frac{x^r-x^{2r}}{1-x}\ dx$$</span></p> <p><span class="math-container">$$=\int_0^1\frac{1-x^{2n}-(1-x^r)}{1-x}\ dx=H_{2r}-H_r\tag2$$</span></p> <p>and we proved <a href="https://math.stackexchange.com/q/3550444">here</a></p> <p><span class="math-container">$$\overline{H}_{2r}=\sum_{k=1}^{2r}\frac{(-1)^{k-1}}{k}=H_{2r}-H_r\tag3$$</span></p> <p>Hence by <span class="math-container">$(2)$</span> and <span class="math-container">$(3)$</span> , <span class="math-container">$(1)$</span> is proved</p>
0non-cybersec
Stackexchange
restrict a user&#39;s directories. <p>I have some running project with logging directories. I wish to create a user that has only read access to those directories so that he will be used by a third party to investigate deployment problems.</p> <p>The directory tree is like this:</p> <pre><code>- project dir a -logging dirs - dir 1 - dir2 </code></pre> <p>I have 3 other users in a group called <code>h1</code> that have access to all of the directories and the wished user will be granted with read rights on <code>dir2</code> only.</p> <p>Can you please help me with that </p>
0non-cybersec
Stackexchange
What is the default background color for HTML elements? White or Transparent?. <p>I just got stuck with a simple problem to figure it out. What is the default background color of HTML elements? Is it white or transparent?</p>
0non-cybersec
Stackexchange
What’s the deal with Slazo?. https://www.youtube.com/user/Slazo567
0non-cybersec
Reddit
How did you make your computer more programming friendly?. Both hardware and software. What did you buy/download? What should every programmer have on his computer?
0non-cybersec
Reddit
Still another diophantine equation. <p>Can any of you guys provide a hint for thew following exercise?</p> <p><em>Exercise.</em> There is no $3$-tuple $(x,y,z) \in \mathbb{Z}^{3}$ such that $x^{10}+y^{10} = z^{10}+23$.</p> <p>Thanks a lot for your insightful replies.</p>
0non-cybersec
Stackexchange
Easy access to those food packages without pouring it into a container.
0non-cybersec
Reddit
What is the solution for the N+1 issue in JPA and Hibernate?. <p>I understand that the N+1 problem is where one query is executed to fetch N records and N queries to fetch some relational records.</p> <p>But how can it be avoided in Hibernate?</p>
0non-cybersec
Stackexchange
pip3 installs inside virtual environment with python3.6 failing due to ssl module not available. <blockquote> <p><strong>(py36venv) vagrant@pvagrant-dev-vm:/vagrant/venvs$ pip3 install pep8</strong></p> <p><em>pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.</em></p> <p>Collecting pep8 Could not fetch URL <a href="https://pypi.python.org/simple/pep8/" rel="noreferrer">https://pypi.python.org/simple/pep8/</a>: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping</p> <p>Could not find a version that satisfies the requirement pep8 (from versions: ) No matching distribution found for pep8</p> </blockquote> <p><strong>Background information</strong> - Trying to move to python 3.6. </p> <p>Installed python3.6 using the below commands:</p> <blockquote> <p>wget <a href="https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz" rel="noreferrer">https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz</a></p> <p>tar -xvf Python-3.6.0.tgz</p> <p>cd Python-3.6.0<br> ./configure --enable-optimizations<br> make -j8 sudo make altinstall python3.6</p> </blockquote> <p>Created virtualenv by:</p> <blockquote> <p>python3.6 -m venv py36venv</p> <p>source py36venv/bin/activate</p> </blockquote> <p>Tried to install pep8</p> <blockquote> <p>(py36venv) pip3 install pep8</p> <p>pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting pep8 </p> <p>Could not fetch URL <a href="https://pypi.python.org/simple/pep8/" rel="noreferrer">https://pypi.python.org/simple/pep8/</a>: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the</p> <p>SSL module is not available. - skipping Could not find a version that satisfies the requirement pep8 (from versions: ) No matching distribution found for pep8</p> </blockquote>
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
AITA for getting mad about this NYE mishap. my gf and I are on vacation in florida along with a lot of my family. for new years eve she wanted to go to a party/show in miami with an old high school friend of hers. the party sounds cool and much better than anything that my family is doing so I buy the tickets. when we get to miami she tells me that some of her family friends are also in miami and she wants to invite them along. the two guys she invites are older than 18 but under 21, so we weren't sure if they could get in, but no one is IDing so we tell them to come. I buy them a drink which are like $10 each which they balk at but hey, it's new years eve, it's a trendy bar, what are you gonna do? well after midnight my gf says she wants to go with these kids to a liquor store to buy them booze. I tell her not to, I can buy them drinks if they pay for them, and I really don't want her to leave, she'll miss some of the live music, etc. my gf is kind of a people-pleaser and she says these guys are like her little brothers, and she wants to show them a good time. they say they'll get an uber to the liquor store so they won't even be gone long. I ask her one more time not to go but I don't wanna be the controlling bf. so they leave, turns out they got in the wrong uber, went to some random hotel on the other side of town, got stuck in traffic (fucking pitbull) on the way back, and were gone for about two hours. while I'm wondering where my gf is, her friend says, "you guys have been dating for two years, you must be used to this stuff by now, right?" I just wish she would've listened to me, she missed a good chunk of the live music and didn't really get to hang out with her friend that she rarely sees (the guys live in the same town as us in the midwest). I don't like bringing it up because she feels bad about the whole thing, like she ruined our NYE, and I know it was an accident. today I showed her a selfie her friend took of us and a few people we met, and she got sad and asked my not to post it on social media since she's not in it. and I feel like I can't get upset about it because she's sad about how it all turned out too. tl:dr my gf went on a liquor run on NYE for her underage friends which took 4x as long as expected, after I pleaded her not to go. I'm upset about it and she is sad that she missed most of an awesome party.
0non-cybersec
Reddit
Obama Urges Republicans to Work Harder for All Americans.
0non-cybersec
Reddit
Tried getting him to give me a cute picture, this is what I got instead..
0non-cybersec
Reddit
Ti4 game 3. 5 of us gathered for a game of Ti4 this weekend. This is my groups 3rd game but 2 of us couldn't make it so we had a new player on Aborec, also playing were Letnev, Winnu, Yin, and Yssaril. We played the standard 5 player map to 10 vp. Yin was squished with +4 trade goods , Winnu and Yssaril @ +2. Map ended up being fairly balanced and wasn't as bad as I remember from 3rd edition. Winnu grabbed Rex turn 1 and held it all game. 3 large fleets smashed against their defenses over the course of the game but no one took it back, despite plagues and a vote that could have destroyed Rex. Despite all that, the Winnu they almost didn't win but got secret objectives scored to put them over the top on the last turn. Yssaril and Yin ended up with 8, Letnev 7 , Arborec 4. Everyone had a blast, was a slow game at first as no one wanted to attack Rex as heavily defended as it got. All the level 2 objectives were hold 11 planets, 6 planets of same type, and 5 tech planets, which no one could get to or hold. Game ended on turn 7 our longest game yet playing to 10. Time wise it took us 5 hours to play (even with a new player) and another hour to setup and take down. The new edition is amazing, going to sell off my 3rd edition with expansions and never look back. If you've never played Ti before now is the time to try it out. 4th edition is a lot of fun with good meaty decisions. Actions are very tight since command counters are very limited and fleets stay naturally smaller. This really makes the engine shine despite it being dated. It just feels really balanced though I'm sure there will be a tier list of factions once we've tried them all several times. Combat is luck based, now that it's hard to get more than a small advantage when attacking fleet on fleet. This still leaves room for clever plays or taking advantage of mistakes people make. I've played one game at 4, 5, and 6 players. I really didn't care for how all the tactics cards come out every round in 4 player. 6 player is more balanced, but 5 player isn't bad either. Definitely only play with 5 or 6 if you can help it.
0non-cybersec
Reddit
C# Console : How to make the console stop scrolling automatically?. <p>I made an infinity donkey and i want console to stop scrolling to the end automatically so people can scroll to end by themselves.</p> <p>I tried <code>Console.SetCurserPosition(5 , 5);</code> Didn't help.</p> <p>Here is my code : </p> <pre><code>using System; using System.Threading; namespace Infinite_Donkey { class Program { public static void Main(string[] args) { Console.WriteLine("Press 'Enter' and wait to see the magic!"); Console.ReadLine(); Console.WriteLine(" ^__^"); Console.WriteLine(" (oo)_______"); Console.WriteLine(" (__) )\\"); Console.WriteLine(" ||---|| "); Console.WriteLine(" || || "); Thread.Sleep (2000); do { Console.WriteLine(" || ||"); }while(true); } } } </code></pre> <blockquote> <p>Note : Program works kind of fine but i just want it to stop scrolling down automatically.</p> </blockquote>
0non-cybersec
Stackexchange
I had my very last law school final today.
0non-cybersec
Reddit
Windows 7 and Program Files Protection. <p>I'm developing software on a Windows 7 machine, and struggling with the security permissions. Something I do quite often is to install our software from the installer to c:\program files and then change config files inside it using notepad.</p> <p>If I try and save the file after doing this, it won't let me and prompts me to save it to another location.</p> <p>My workaround is to drag and drop the file to the desktop, edit it there, then drag and drop it back, which is getting tedious. I am admin, so I do have permission to edit the file and save it back, yet something about the fact that is is in c:\Program Files is stopping me.</p> <p>Is there a way around this, or do I have to change how I work?</p>
0non-cybersec
Stackexchange
Almost instant. This is a test..
0non-cybersec
Reddit
Why can&#39;t I make a failover cluster using iSCSI for shared storage?. <p>I’m trying to build a 2-node failover cluster (sqlnode-1, sqlnode-02) using Server 2016 guest VMs in my Hyper-V-based lab.</p> <p>The problem I have is that the cluster wizard doesn’t recognise my shared storage.</p> <p>I’m trying to use iSCSI for the shared storage. I’ve attached a new VHD to a third VM, mounted as Z:, and setup the following virtual disks on it to use for the quorum and shared storage:</p> <p><img src="https://i.stack.imgur.com/trJLH.png" alt="img iSCSI Virtual Disks"></p> <p>I can connect this this from sqlnode-01:</p> <p><img src="https://i.stack.imgur.com/KYHnf.png" alt="iSCSI Initiator Properties"></p> <p>I can only connect to it from sqlnode-02 if I first disconnect from sqlnode-01. </p> <p><strong>Is this expected behaviour or should I be able to connect from both at the same time? – And see the storage from Computer Management on both servers at the same time?</strong></p> <p>If I use the validation checker from Failover Cluster Manager I see the following:</p> <p><img src="https://i.stack.imgur.com/FoQ24.png" alt="Validation check"></p> <p>All following tests are Not Applicable – presumably as it hasn’t found any disks to be validated. I get the same results whether I’ve left the disks offline or brought them online.</p> <p><strong>Is there something obvious I might have missed when setting up the iSCSI target?</strong></p> <p>The validation report states:</p> <blockquote> <p>Physical disk {82996b53-d867-4086-993c-7813c8f5e154} is visible from only one node and will not be tested. Validation requires that the disk be visible from at least two nodes. The disk is reported as visible at node: sqlnode-01.corp.local</p> </blockquote> <p><img src="https://i.stack.imgur.com/7O4tY.png" alt="Validation report"></p>
0non-cybersec
Stackexchange
Use of binary variables in LP problems. <p>I can't figure out how to write the following condition to an LP.</p> <p>I have four nonnegative variables: $X_A$, $X_B$, $X_C$, and $X_D$.</p> <p>The condition which should be satisfied is this:</p> <p>If $X_A$ and $X_B$ have positive coefficients in the optimal solution then, $X_C$ shoud have $0$ coefficient in the optimum.</p> <p>I guess, I should introduce binary variables, but I'm not sure how.</p>
0non-cybersec
Stackexchange
Calculating adjacency matrix of platonic solids. <p>I need to devise a algorithm (in Python) that calculates adjacency matrices for the platonic solids. Inputted into the algorythm needs to be the number of polygons meeting at each vertex and the regular polygon on which they are based. Any ideas are welcome as I've tried a few avenues and haven't come up with anything remotely successful.</p> <p>Let the number of sides <code>n</code> and let the number of vertexes connected to any particular vertex be <code>m</code>.</p> <p>Take a tetrahedron, it has <code>n = 3</code> and <code>m = 3</code>. My problem is then going from this to establishing the following adjacency matrix.</p> <pre><code>0 1 1 1 1 0 1 1 1 1 0 1 1 1 1 0 </code></pre> <p>This is therefore the adjacency matrix for a tetrahedron. With a cube, it becomes more complicated</p> <pre><code>0 1 1 0 1 0 0 0 1 0 0 1 0 1 0 0 1 0 0 1 0 0 1 0 0 1 1 0 0 0 0 1 1 0 0 0 0 1 1 0 0 1 0 0 1 0 0 1 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 0 </code></pre> <p>etc. </p> <p>So i need to take the values of n, and m and calculate these matrices. Clearly there are many possible solutions depending on how the algorithm labels the vertexes. Any ideas?</p>
0non-cybersec
Stackexchange
Mouse scroll sometimes doesn&#39;t work in MS Word in wine. <p>I have MS Office 2007 in wine 3.6 on Kubuntu 18.04. If I launch several Word documents, sometimes the mouse scroll stops working when switching to another document. Sometimes this issue can be solved by pressing <kbd>Alt</kbd> twice or by minimizing and maximizing the window, but it works until the next window switch. I've noticed that sometimes the mouse scroll affects the background window, as if <kbd>Ctrl</kbd> has been pressed, i.e. changes the font size. Is there a way to solve this problem?</p> <p>It doesn't work at other my machine as well, so I think there is something with <code>wine</code> or <code>Plasma</code> rather than system configuration.</p>
0non-cybersec
Stackexchange
Incredible high-resolution video of Jupiter.
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 not be the "spectator" in a conversation?. Sometimes, I'll be in a group of friends, maybe only 3 people (including me) and they'll end up talking and talking and I'll only be there giving a couple of comments here and there, as if I were watching them talk and I was just a "spectator". I'm not part of the conversation at all and it bugs me, especially since I want to talk but I have absolutely nothing to say about what they are talking about because I kinda don't even know what they are talking about. So really I have two problems, one which is that I'm not part of the conversation because I have nothing to say, so I only give a few comments here and there, and two is that I don't even know what they are talking about (because these people have known each other longer). Any tips for someone who is going out of their way to try and be more social?
0non-cybersec
Reddit
These 5 Persons who were called Disabled, became World Famous Celebrities and Inspire us Everyday!.
0non-cybersec
Reddit
TIFU by jumping to conclusions. I had to drop something off at my best friend's apartment. I was just planning on leaving it on his doorstep, since I knew he and his wife would be at work since it was the middle of a weekday. I didn't even bother knocking. Then I heard a crashing noise. Now in my defense, there had been break-ins in his neighborhood before, and he and I both have jobs that involve working with criminals, so that kind of stuff is never far from my mind. So I throw upon the unlocked door. And no, it wasn't a burglar. It was my best friend and his wife. Having sex. On the kitchen table. At 11am on a Thursday. He just kind of looked shell-shocked, but she called me a fucking moron and a dickwad who should use the fucking bell. But as she's my sister, I felt justified in calling her a bitch who obviously needed to get laid. And then I left. And I'm never going to be able to eat dinner at their place again. And I've seen both of them naked. And I can no longer pretend that they live a life of celibacy.
0non-cybersec
Reddit
A local gym's solution to feeling fat and ugly.
0non-cybersec
Reddit
How to set up a reminder like every fourth Wednesday?. <p>How to set up a reminder like every fourth Wednesday? Preferably in Outlook or Google Calendar?</p>
0non-cybersec
Stackexchange
Java: is there a map function?. <p>I need a <a href="http://docs.python.org/library/functions.html#map">map</a> function. Is there something like this in Java already?</p> <p>(For those who wonder: I of course know how to implement this trivial function myself...)</p>
0non-cybersec
Stackexchange
PsBattle: Greek Prime Minister inspecting the construction..
0non-cybersec
Reddit
File renaming and it&#39;s effects on file system. (Windows). <p>My question is about what happens within a file structure in Windows when a file is renamed.</p> <p>For example, when I delete a file, I understand that the data itself is essentially still there and can be recovered until some or all of the memory blocks it occupied is overwritten.</p> <p>However, I cannot find any real answer about file renaming and how it affects the file system. If I have a file named 'superuser.jpg' and say for the sake of simplicity it occupies blocks 1, 2 and 3 on the hard drive, does it still occupy blocks 1, 2 and 3 if I rename it to 'usersuper.jpg'? Or is it deleted from blocks 1, 2 and 3 and moved to, say, 4, 5 and 6 leaving the original 'superuser.jpg' in the original location until it's overwritten?</p> <p>Apologies for the possibly remedial question, but an hour of googling couldn't provide an answer. Or I wasn't searching for the right thing, I don't know. I'd appreciate any insight into it.</p> <p>ETA: I would like to thank those who answered the question. I know the proper procedure is to choose an answer via a little checkbox but for some reason, I see no checkboxes. Perhaps because I am new. The question has been answered.</p>
0non-cybersec
Stackexchange
My Favourite Look From the Past Six Months - CCW.
0non-cybersec
Reddit
Russian court convicts man of ‘falsifying history’ for saying the USSR shares responsibility for starting WWII.
0non-cybersec
Reddit
Logging Verbosity in Keepalived.conf?. <p>My keepalived VIP on one of my routers stopped responding. I still saw it on the primary router and not the secondary router as I would expect, and I could ping the regular IPs. As soon as I restarted keepalived the problem was resolved. </p> <p>I am not really sure what is causing this issue, are there any log level directives I could add to my keepalived that might give me some information if this happens again?</p> <hr> <p>I do see:</p> <blockquote> <p>keepalived -f /usr/local/etc/keepalived.conf --dont-fork --log-console --log-detail These options will stop keepalived from fork'ing, and will provide additional logging data. Using these options is especially useful when you are testing out new configuration directives, or debugging an issue with an existing configuration file.</p> </blockquote> <p>So maybe I just need to edit my init file? Seems like it should be a config file option though.</p>
0non-cybersec
Stackexchange
Shoes for a short 17 year old. I'm 17 and really short (5'4''). I'm looking for shoes that will give me some height but also look cool. Nothing formal. They should also be comfortable, easy to run/walk in, and not too expensive (under 70 bucks would be preferable).
0non-cybersec
Reddit
Fox News sees biggest ratings slump in 17 years as Donald Trump contradictions go unreported.
0non-cybersec
Reddit
An &quot;independence&quot; condition on two algebraic elements over $K$.. <p>Let $K$ be a field and let $a,b\in \overline K$ be algebraic elements.</p> <p>I've stumbled upon a certain condition on $a,b$, which I feel could be considered an "independence" condition. I would like to know more about it. </p> <p>Let's say that $a,b$ are weakly independent when $$\deg_K(a)=\deg_{K(b)}(a)$$</p> <p>and $$\deg_K(b)=\deg_{K(a)}(b).$$</p> <p>A condition weaker than algebraic independence implies this condition:</p> <p><strong>Fact.</strong> Suppose that for $g\in K[x,y],$ we have that $g(a,b)=0$ implies $g\in K[x]$ or $g\in K[y].$ Then $a,b$ are weakly independent.</p> <p><em>Proof.</em> Suppose $$\deg_K(a)&gt;\deg_{K(b)}(a)$$ ($\geq$ always holds). Let $f(x)=x^n+a_{n-1}x^{n-1}+\ldots+a_0$ be the minimal (monic) polynomial of $a$ over $K(b).$ We have $$f\in K(b)[x]\setminus K[x]$$ because monic minimal polynomials are unique. For each $i=0,1,\ldots,n-1,$ there exists $g_i\in K[x]$ such that $g_i(b)=a_i,$ and a least one $g_i$ isn't constant because otherwise $f\in K[x].$ Thus $$f=x^n+g_{n-1}(b)x^{n-1}+\ldots+g_0(b).$$</p> <p>Let $g\in K[x,y]$ be defined by $$g(x,y)=x^n+g_{n-1}(y)x^{n-1}++\ldots+g_0(y).$$ Clearly $g(a,b)=0.$ But also, since $g_j(y)=b_my^m+\ldots+b_0$ is non-constant, there is $1\leq k\leq m$ such that $b_k\neq 0.$ Therefore, the $x^jy^k$-coefficient of $g$ is non-zero, and so $g\not\in K[x]$. It is clear that $g\not\in K[y].$ The symmetric case is proved symmetrically. $\square$</p> <p>The converse doesn't hold. For example, $\sqrt 2,\sqrt 3$ are weakly independent over $\mathbb Q$ but $g(x,y)=x^2y-2y$ annihilates $(\sqrt 2,\sqrt 3)$. Something weaker does hold, but I won't post it here because I don't understand it very well and I don't want to make this question too long.</p> <p>I would like to know if this "weak independence" has any real name and if it's equivalent to anything interesting. I've been having different ideas as to what it could be equivalent to but nothing seemed to work. Most of my ideas have been somewhere around the fact above.</p>
0non-cybersec
Stackexchange
How to make HTTP PUT the inverse of GET?. <p>I would like to tell Apache to treat a HTTP PUT as the inverse of GET. The server should store the file sent with PUT at that place, where a file would be read by a GET request containing the same location.</p> <p>I found only <a href="http://www.apacheweek.com/features/put" rel="nofollow noreferrer">examples</a> for HTTP PUT, which require CGI or PHP scripts and <a href="http://mail-archives.apache.org/mod_mbox/httpd-modules-dev/200610.mbox/%[email protected]%3E" rel="nofollow noreferrer">mod_put</a> seems to be dead. First I would like to avoid scripts: CGI because of <a href="https://en.wikipedia.org/wiki/Shellshock_%28software_bug%29" rel="nofollow noreferrer">Shellshock</a> and PHP because of <a href="http://www.cvedetails.com/vulnerability-list/vendor_id-74/product_id-128/PHP-PHP.html" rel="nofollow noreferrer">PHP</a>. And second even if I would try to write some CGI I am not aware of Apache's location-directory mapping in the CGI. I would not know how to map the location from the URL to a path in the file system in that way, that Apache would perform the inverse during a GET.</p> <p>How to implement a HTTP PUT being exactly the inverse of a GET without any CGI or script engine?</p>
0non-cybersec
Stackexchange
1912 photo of Pavel Yakovlevich Tolstoguzov, born in 1798, who fought in the Russian Army against Napoleon..
0non-cybersec
Reddit
IAmA Juggler. I'm out of practice, but I used to be quite good, and respected in the community.... ... Yes. Community. There's a "scene" of technical jugglers, largely on college campuses. They tend to reject the clown stereotype, and the notion of performance. It's more about pushing the limit of what tricks can be done. And I was a member of that community. I used to know basically every street performer in a major US city, and was technically better than all of them (except one). Same thing with another smaller city that I lived in for a while. I've done a number of performances, but they were technical in nature and I wouldn't want to "be" a performer. But enough about me. Juggling was an amazing hobby for me, as it could be very meditative. I don't do it much anymore, but my brain is still changed as a result of it. Then there's the satisfaction of learning new tricks. - So yeah. Most of the time, the general public only sees juggling as a performance art, and it is usually presented very dishonestly.
0non-cybersec
Reddit
Allegations against Elmo puppeteer Kevin Clash withdrawn.
0non-cybersec
Reddit
Q: Commutator subgroup of free group of infinite rank. <p>I know that $\ F_n$/[$\ F_n$,$\ F_n$] is isomorphic to $\Bbb Z^n$, but I do not know what happens if the rank is infinite. In particular, if the rank is countable, is the resulting group isomorphic to the direct sum or product of countable many $\Bbb Z$s? And what happens if the rank is uncountable?</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
Isn't 2020 the best year!.
0non-cybersec
Reddit
[Red Dead Redemption 2] [Screenshot] Guthrie Farm..
0non-cybersec
Reddit
How to prove a certain integral is convergent, but not absolutely convergent?. <p>Been struggling with this problem for quite some time now and can't seem to be able to find the solution by myself.</p> <p>The said integral is</p> <p>$$ \int\limits_{0}^{+\infty} \sin(x\ln^{1/3}(x))\ \mathrm{d}x $$</p> <p>I managed to proof it's only convergent using Abel - Dirichlet's test but that's pretty much everything. Cannot prove it's not absolutely convergent. Any suggestions are welcomed.</p>
0non-cybersec
Stackexchange
Original Penguin - extra 60% off Sale items + Free Shipping. Original Penguin is offering an extra 60% off sale items with promo code "LABOR60". Shipping is free with code "OPSHIP". Deal ends 9/2. [https://www.originalpenguin.com/sale/all-sale/](https://www.originalpenguin.com/sale/all-sale/)
0non-cybersec
Reddit
How to create a &#39;headline&#39; theme in beamer which occupies only a portion of the sidebar?. <p>The <code>headline</code> in beamer which spans the width of the top or height of the side in most examples I have seen displays the section/subsection/subsubsection labels. Can I produce a header/headline which is a specified portion/percentage of the slide size or length depending if it was placed along a particular edge?</p> <p>I have in mind placing the headline as a stunted/shortened rectangle along the top, and beside it to have another 'rectangle' to display the frame title with a logo.</p> <pre><code> \setbeamertemplate{frametitle} {\vskip 0.25pt \leavevmode \hbox{% \begin{beamercolorbox}[wd=\paperwidth,ht=1.8ex,dp=1ex]{frametitle}% \insertsection\insertsubsection\\ \raggedright\hspace*{5em}\Large\insertframetitle \end{beamercolorbox} }% \vspace{-25pt} \hfill \includegraphics[width=1cm]{UCFLOGO} \hspace*{0.0cm} \vskip0pt %{\color{ucfBlack}\rule{\textwidth}{0.4mm}} } %footer \setbeamertemplate{footline} { \leavevmode% \hbox{% \begin{beamercolorbox}[wd=.4\paperwidth,ht=2.25ex,dp=1ex,center]{author in head/foot}% \usebeamerfont{author in head/foot}\insertshortauthor \end{beamercolorbox}% \begin{beamercolorbox}[wd=.6\paperwidth,ht=2.25ex,dp=1ex,center]{title in head/foot}% \usebeamerfont{title in head/foot}\insertshorttitle\hspace*{3em} \insertframenumber{} / \inserttotalframenumber\hspace*{1ex} \end{beamercolorbox}}% \vskip0pt% } </code></pre>
0non-cybersec
Stackexchange
My first triple monitor setup.
0non-cybersec
Reddit
Is there an infinite sequence of positive integers $a_n$ s.t. $\sum_{n=1}^\infty{\frac{1}{a_n}}$ converges and $a_n$ contains arbitrary long arithmetic progressions?. <p>This is somewhat related to <a href="http://en.wikipedia.org/wiki/Erd%C5%91s_conjecture_on_arithmetic_progressions" rel="nofollow">Erdős conjecture on arithmetic progressions</a> </p> <blockquote> <p>Is there an infinite sequence of positive integers $a_n$ s.t. $\sum_{n=1}^\infty{\frac{1}{a_n}}$ converges and $a_n$ contains arbitrary long arithmetic progressions?</p> </blockquote> <p>If one allows negative integers a solution is $a_n=(-1)^n n$</p>
0non-cybersec
Stackexchange
Foster&#39;s Theorem for Recurrence in Markov Chains. <p>I am having trouble reaching the final conclusion of Foster's theorem regarding a sufficient condition for recurrence in discrete time Markov chains.</p> <p>Theorem: Let <span class="math-container">$X$</span> be an irreducible discrete time Markov chain with transition matrix <span class="math-container">$P$</span> and state space <span class="math-container">$S$</span>. If there exists a finite set <span class="math-container">$F \subset S$</span> and a non negative function <span class="math-container">$h:S \to \mathbb{R}$</span> such that for all <span class="math-container">$x \notin F$</span> the following hold:</p> <p><span class="math-container">$h(x) \ge \sum_{y \in S}{P(x,y)h(y)}$</span></p> <p>for all <span class="math-container">$r\in \mathbb{R} $</span> the set <span class="math-container">$A_r := \{x\in S | h(x) \le r \} $</span> is finite</p> <p>then <span class="math-container">$X$</span> is recurrent.</p> <p>Proof:</p> <p>Assume <span class="math-container">$X_0 \notin F$</span></p> <p>Define <span class="math-container">$T_F := \inf\{n \ge 0 |X_n \in F \}$</span> and define <span class="math-container">$Y_n := h(X_{\min(n,T_F)})$</span></p> <p>Then <span class="math-container">$Y$</span> is a non negative supermartingale and hence converges almost surely to a finite limit. By the property regarding the sets <span class="math-container">$A_r$</span> we have that <span class="math-container">$Y_n$</span> achieves at most a finite number of values.</p> <p>This can happen in one of two ways. Either <span class="math-container">$T_F &lt; \infty$</span> implying that <span class="math-container">$Y_n := h(X_{\min(n,T_F)})$</span> is constant for <span class="math-container">$n \ge T_F$</span>, or <span class="math-container">$T_F = \infty$</span> and <span class="math-container">$ X_n$</span> achieves only a finite number of values.</p> <p>I was able to prove that <span class="math-container">$T_F &lt; \infty $</span> implies <span class="math-container">$X$</span> is recurrent by a pigeonhole principle argument. I understand that i am supposed to show that the second way in which <span class="math-container">$Y_n$</span> can converge is impossible, but i am stuck.</p> <p>Any help on how to approach this is appreciated, Thanks!</p>
0non-cybersec
Stackexchange
The Transcension Hypothesis.
0non-cybersec
Reddit
Python: how to slice a dictionary based on the values of its keys?. <p>Say I have a dictionary built like this:</p> <p><code>d={0:1, 1:2, 2:3, 10:4, 11:5, 12:6, 100:7, 101:8, 102:9, 200:10, 201:11, 202:12}</code></p> <p>and I want to create a subdictionary <code>d1</code> by slicing <code>d</code> in such a way that <code>d1</code> contains the following keys: <code>0, 1, 2, 100, 101, 102</code>. The final output should be:</p> <p><code>d1={0:1, 1:2, 2:3, 100:7, 101:8, 102:9}</code> </p> <p><strong>Is there an efficient Pythonic way of doing this, given that my real dictionary contains over 2,000,000 items?</strong></p> <p>I think this question applies to all cases where keys are integers, when the slicing needs to follow certain <em>inequality rules</em>, and when the final result needs to be a bunch of slices put together in the same dictionary.</p>
0non-cybersec
Stackexchange
Accidentally went through my SOs phone.... Please let me preface this by saying we know each other’s passwords, we leave our phones lying around, we’re not sneaky. Well the other day my phone had died and SO was in the shower and I wanted to tell my BFF something. So I unlocked his phone and opened their message thread And found him asking her advice on rings and how to find out my size. I’m so conflicted - my heart feels like it could burst but at the same time I feel like an incredible surprise-spoiling snoop!
0non-cybersec
Reddit
The Book Thief is a gem!. I am trying to develop the habit of reading and looked up on goodreads for suggestions, and noticed great reviews written about The Book Thief. I never expected a book to affect me in a way this book did. The way the characters evolved, the narration and the sheer power of the words shook me. It made me think about my late father and remisce my days with him. I am grateful for reading this book and am happy to say that I have found a new hobby. Edit: This is the first novel I have ever read, all I ever read is sports biographies. I tried to read books as self improvement but lost interest very soon. Luckily, I did not expect this book to make me a better person and I had very low expectations. I feel that made all the difference, had I read this book with that agenda, I would not have lasted 20 pages. This book is not a page turner but in a sadistic way, I wanted to see how much see suffers and how she handles it. It was not completely sad though, the joys of childhood and the innocence of the characters were well portrayed. Even when death is the narrator, it was not gloomy and dark throughout. All those who feel that it is clichéd, it is perfectly fine to feel that way since reading is very personal and everybody has a different opinion.
0non-cybersec
Reddit
Consumer Reports cuts ratings for Tesla over brake software issue.
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
Non-Americans, what would happen in your country if someone was refused service at a café for not wearing a mask, and then they attacked the proprietor? Let's say they body-slammed the door multiple times and then licked the window... What sort of action would likely result?.
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
Limiting distribution about Poisson. <p>Let <span class="math-container">$X_1,X_2...X_n \sim U(0,1)$</span> be <span class="math-container">$i.i.d $</span>, <span class="math-container">$S_n=\sum_{m=1}^{n}X_m$</span>, please find the limiting distribution of <span class="math-container">$\sum_{m=1}^{n} \mathbb I_{X_m S_n\leq1}$</span>.</p> <p>I guess that might be Poisson distribution. And Let <span class="math-container">$Y_{m,n}= \mathbb I_{X_m S_n\leq1}$</span> and want to verify the two conditions for Possion convergence theorem. The first condition is that we need <span class="math-container">$\sum_{m=1}^{n}p_{m,n} \to \lambda.$</span> Actually <span class="math-container">$p_{m,n} \leq P(X_m\leq \frac{1}{(\frac{1}{2}-\delta)n})+P(\frac{S_n}{n}\leq \frac{1}{2}-\delta)$</span>, when summation, I have no idea how to control the second term. Can you give me some hint or another method? </p>
0non-cybersec
Stackexchange
[AMA Request] The Montana man who was attacked by a bear and posted a viral video of him bloodied after the attack.. 5 Questions: 1. What were you doing before the attack? 2. Did the mother bear attack because she felt you threatened the cubs? 3. Can you describe the attack? 4. Was there a point where you thought you wouldn't survive, even with the mace? 5. What are the extent of your injuries?
0non-cybersec
Reddit
9.5 months into my journey: 6'1 27M 335 -> 176. **Background**: I've been overweight/obese for about the last 19 years of my life. It got pretty bad about after I wound up moving for work, mostly spending money on eating out every day, as well as getting pizza and wings every Friday and eating it all by Saturday evening. I smoked a pack of cigarettes every few days, was completely inactive other than going to work/doing chores, sleeping in my free time for ridiculous amounts of time. Basically, killing myself at an extremely fast pace. I worked out for a bit in my late teens, so a lot of concepts weren't entirely unfamiliar to me as far as exercise/macros go, which has helped a small bit. **The spark:** On 8/5/15, something changed in me. I'm not sure what, or why, but I realized and accepted that I needed to change. Now, one thing about me, I can't do small changes. I thrive on drastic overhauls. On 8/6/15, I began my journey. I revamped my entire diet, set myself to a 1500-1700 kcal/day limit (I recognize at this point this was entirely too low at my starting weight, but I pushed on due to not suffering any lack of energy), eating clean and healthier foods. I utilized a low carb, moderate fat, moderate protein model, which I would change at this point if I could to incorporate more protein. I got a gym membership that day, and walked 5+ miles right around two hours. I left with blisters on both feet and drenched in sweat, but it was the beginning of a long journey and I had no intention of looking back. **Nutrition:** My food intake consisted of the usual items for cutting, chicken breast, greek yogurt, nuts, lean proteins, a ton of vegetables, whole wheat breads, fish, and fruits. I did not have a single cheat meal for 6 months. As I progressed, I re-evaluated my caloric needs, and increased accordingly. As of today, I typically consume between 2300-2800 kcal/day while I continue to shed the remaining fat. I'm a lot more lenient with my diet, but I still shoot for a 40/40/20 macro split, with at least 140-160g of protein. I still go to Subway and Chik fil a at least once a week, and allow myself to splurge (heathily, if that's even possible) with 3500-4000 kcal days on my long run days. **Exercise and progression:** I started out with cardio 6 days a week, usually between 90-105 minutes. I'd walk on the treadmill for about an hour, starting at 2.7mph with a small incline, and stationary cycling for 30-45 minutes. I designed a basic 3 day lifting focused on limiting muscle loss, especially at such a huge deficit. It wasn't perfect, but it did allow me to add a small amount of muscle. It follows something similar to this: Day 1: Back/biceps Assisted chin-ups/pullups 4x6-10 or until failure Shrugs 5x12 Dumbbell rows 3x8 Misc lat accessory work Neck pulls (face pull variant focusing on the lower traps) 4x15 Good mornings 4x8-12 Concentration/Hammer curls 5x10-12 Day 2: Chest/Shoulder/Tricep Dumbbell bench 4x6-10 Cable flys 4x12-15 Machine press 4x10 Military press 4x3-5 Seated OHP 4x6-10 Lateral/front raises 4x10-12 Close grip bench 3-4x10-12 Misc tri work Day 3: Legs I will get hate here, but I don't squat. I'm not a fan of it, as much as I know I should. GHR 4x6-8 Leg Press 5x8-12 Hamstring curls/Leg extensions/Hip ab+adduction 4x10-15 I got a lot of leg workouts from the increasing intensity of cycling, which played a big part in my leg development. **Cardio/Running:** At about the 4-5 month mark of walking progressing to 3.8mph at a 5 incline, I decided to try jogging. I jogged my first mile, possibly ever, in 12m30s. After that, I was hooked. I began, and finished the C25k program, then with the advice of /r/running, developed my own plan. I went from not being able to jog for 20 seconds, to doing a 2h15m long run as of last Sunday, as well as breaking into the 22:xx 5k time. I fell in love with jogging/running, and plan to continue and pursue it as much as possible. I enjoy it much more than any other activity, and the benefits are ridiculously awesome (except being hungry all the time). **Current/Future:** I plan to continue shedding the last extra pounds at a very slow pace, eating only slightly under my TDEE, while continuing to run and lift. Lifting has begun to take a back seat to running at this point, as I just can't enjoy it as much as being outside with music on and the world around me. I still plan to continue with my split, modifying it as needed, and re-evaluating it once I reach about 12% body fat. I attribute the lack of a large amount of loose skin to lifting, and believe it's definitely a huge benefit in body composition during weight loss. My big goal currently is to run a half marathon in under 1h50m without having to push too hard. **Conclusion/TLDR:** Was morbidly obese, a smoker, entirely inactive with little muscle mass. Dropped 159 lbs in 9.5 months, added a little bit of muscle, can now run 14+ miles. My BP dropped from 140/95 to 110/70, RHR dropped from 95-98 to 54. I didn't do anything fancy, just followed the idea of CICO, being more active, and exercising to limit muscle loss during this process. There's a lot I feel like I've left out or not gone in depth on, and I apologize ahead of time. If there are any questions I can answer, I definitely will. Onto to the pictures: [ALBUM](http://imgur.com/a/Yk4IC)
0non-cybersec
Reddit
My New Year's resolution to keep my cats better organized is going well so far.
0non-cybersec
Reddit
Gap Cash: 2 $25 off $50 codes. I posted the first in /r/mfa, last I checked it wasn't used. PPLTGTJC9C7T BGCFJPDRJV13
0non-cybersec
Reddit
Use a boolean property to show that the following statements about sets X and Y are logically equivalent. <p>I am working on a question that references a previous assignment where we proved that if $p \Rightarrow q, q \Rightarrow r, r \Rightarrow s,s \Rightarrow p$, then p,q,r,s are all logically equivalent. This question asks to prove the following statements about any sets X and Y are all logically equivalent:</p> <p>$X \subseteq Y$</p> <p>$X \cap Y = X$</p> <p>$X \cup Y = Y$</p> <p>$!Y \subseteq !X$ (was unsure of how to format set compliment)</p> <p>I attempted to solve the problem by letting a = $x \in X$ and b = $x \in Y$</p> <p>Then $a \Rightarrow b$, and $a \land b = a$, and $a \lor b = b$</p> <p>However that isn't really getting me there. I guess my main point of confusion is how I can translate these sets into logical expressions so I can use that first rule? I was under the impression boolean logic and sets were different, so I am finding this question very confusing.</p>
0non-cybersec
Stackexchange
iCloud issues on my new iPhone. <p>So I recently lost an iPhone 6s Plus, and ordered a new iPhone 7 plus through the insurance, once the 7 arrived, I restored it via iTunes from a previous backup, now here's the issue. It is logged into my current Apple ID and iCloud accounts, and it is asking me to sign into the accounts to confirm, but they have a two way authentication that sends a 6 digit code to your main device, so essentially it should be getting sent to the new 7, but I receive no message</p>
0non-cybersec
Stackexchange
Cloud Functions deploy error during lint on Windows: &quot;enoent ENOENT: no such file or directory&quot;. <p>Following the <a href="https://firebase.google.com/docs/functions/get-started" rel="noreferrer">firebase function getting started guide</a> and getting a seemingly simple error once trying to deploy with:</p> <pre><code>firebase deploy --only functions i deploying functions Running command: npm --prefix $RESOURCE_DIR run lint npm ERR! path C:\Users\Beat\leginformant\$RESOURCE_DIR\package.json npm ERR! code ENOENT npm ERR! errno -4058 npm ERR! syscall open npm ERR! enoent ENOENT: no such file or directory, open 'C:\Users\Beat\leginformant\$RESOURCE_DIR\package.json' npm ERR! enoent This is related to npm not being able to find a file. npm ERR! enoent </code></pre> <p>The package.json file does exist just as the tutorial shows in my project/functions/package.json. Have tried changing or printing out the RESOURCE_DIR env with no success. Assuming it would be scoped inside of the NPM shell environment.</p> <p>npm version: 5.6.0</p> <p>node version: 8.9.0</p>
0non-cybersec
Stackexchange
TIL that Robert Downey Jr considered retiring as Iron Man in 2013 after receiving an on-set injury, believing that he was too old to continue playing the role of Tony Stark..
0non-cybersec
Reddit
Do all hosts and nodes in a Broadcast domain have to have the same MTU value?. <p>Some documents on the Internet say that all interfaces in a broadcast domain ( ie Router boundaries ) have to have the same MTU value. Is that an inflexible rule ? But what about my roaming laptop that is using IPsec and needs a lower MTU ? I won't change the wifi hotspot's MTU value ... I don't even wish to change my Home Router'Switch MTU value ... Maybe I'm getting confused here ...</p>
0non-cybersec
Stackexchange
Predicting physiological developments from human gait using smartphone sensor data Umair Ahmed, Muhammad Faizyab Ali, Kashif Javed, Haroon Atique Babri* University of Engineering and Technology Lahore, Pakistan Abstract Coronary artery disease, heart failure, angina pectoris and diabetes are among the leading causes of morbidity and mortality over the globe. Susceptibility to such disorders is compounded by changing lifestyles, poor dietary routines, aging and obesity. Besides, conventional diagnostics are limited in their capa- bility to detect such pathologies at an early stage. This generates demand for automatic recommender systems that could effectively monitor and predict pathogenic behaviors in the body. To this end, we propose human gait anal- ysis for predicting two important physiological parameters associated with different diseases, body mass index and age. Predicting age and body mass index by actively profiling the gait samples, could be further used for provid- ing suitable healthcare recommendations. Existing strategies for predicting age and body mass index, however, necessitate stringent experimental set- tings for achieving appropriate performance. For instance, precisely recorded speech signals were recently used for predicting body mass indices of differ- ent subjects. Similarly, age groups were predicted by recording gait samples from on-body and wearable sensors. Such specialized methods limit active and convenient profiling of human age and body mass indices. We address these issues, by introducing smartphone sensors as a means for recording gait signals. Using on-board accelerometer and gyroscope helps in develop- ing easy-to-use and accessible systems for predicting body mass index and age. To empirically show the effectiveness of our proposed methodology, we collected gait samples from sixty-three different subjects that were classified in body mass index and age groups using six well-known machine learning classifiers. We evaluated our system using two different windowing operations for feature extraction, namely Gaussian and Square. Preprint submitted to Artificial Intelligence in Medicine December 22, 2017 ar X iv :1 71 2. 07 95 8v 1 [ ee ss .S P ] 1 3 D ec 2 01 7 Keywords: Human gait, Body mass index prediction, Age prediction, Machine learning 1. Introduction Human body mass index (BMI) is a key indicator of physiological devel- opments within the body. Commonly known as a measure of lipid content in an individual, it serves as a diagnostic marker for gauging tendencies towards various pathologies [1]. A seminal study, involving 310,000 partici- pants, from 33 different cohorts, reported a compelling correlation between persistently elevated BMIs and cardiovascular diseases [2]. In another inves- tigation, Narayan et al. [3] suggested an elevated risk of diabetes in obese and overweight youth. More importantly, an association between BMI and cancer was also implied by an epidemiological study conducted by Renehan et al. [4]. All such studies, signal the importance of an optimal BMI neces- sary for preserving physiological balance within the body. Moreover, BMI is not a static measurement of body physiology, rather, it is subject to change with aging – another essential determinant of human health. With aging, the obesity tendencies are known to increase, thereby altering BMIs over time [5, 6]. To better understand and predict the association of BMI with various diseases, it becomes necessary to profile it more frequently and automati- cally. This could help monitor any abormal or pathogenic variations in hu- man BMI. Since BMI changes with progressing age, its age-sensitive nature remains relevant. Therefore, autonomous systems for predicting both age and BMI become indispensible. Estimates from such recommender systems could then be used for early detection and diagnosis of various pathologies including diabetes, coronary artery disease (CAD) and angina (Fig. ??). Towards developing a system for predicting BMI and age groups, several methods have been developed. Traditionally, BMI is computed by its con- ventional definition [7, 8] that utilizes body height (m) and mass (kg) of an individual: BMI = mass height2 (1) To automate BMI estimation, Lee et al. [9] developed a machine learning strategy wherein, they utilized carefully recorded speech signals, for predict- ing human BMI. These voice signals, otherwise prone to noise, were sampled 2 under specialized experimental settings which hinder instantaneous monitor- ing of BMI. Moreover, common ailments like flu and fever are also known to alter human voice [10]. Therefore, using speech signals for actively predicting BMI, appears less tractable. Similarly, age group prediction was carried out by Qaiser et al [11]. In their approach, they utilized on-body, inertial sen- sors (accelerometers and gyroscopes) for evaluating age, gender and height of 26 different subjects [11]. The use of on-body sensors for recording the limb kinetics however, requires a specific setup. This again impedes auto- mated profiling of BMI and age of the subject. These problems with existing strategies call for a convenient, easy-to-use and accessible methodology for predicting BMI and age of different subjects. In this paper, we propose human gait as a suitable candidate for pre- dicting both, BMI and age groups. This is because walking patterns in hu- man beings are governed by multiple factors such as aging, body height and body mass [12, 13]. These physical and physiological components contribute towards uniquely defining the overall human gait [13, 14, 15]. This gait pattern, inherently recurrent in nature [16], gives rise to a personalized walk- ing signal which is a charactersitic manifestation of body parameters (age and BMI). Thereupon, towards eliciting tendencies towards various diseases, gait signals present a valuable resource for predicting BMI and age groups. Towards harnessing this meaningful information from gait patterns, several techniques have been developed [17, 18, 19, 20]. Conventionally, these meth- ods attempt to analyze gait for identifying and recognizing different activities such as walking, running and climbing. For instance, Lee et al. processed a video sample for extracting useful gait features and devised support vector machines (SVMs) for classifying gender of various subjects [17]. Alongwith the image-based methods, sensor-based gait analysis also find its utility in recognizing ambient human activities. These methods make use of various wearable and integrated sensors (accelerometers and gyroscopes) for record- ing gait samples. As an example, Yang et al. classified static and dynamic activities based on the readings from triaxial accelerometer using neural clas- sifiers [19]. Recently, on-board smartphone sensors have emerged as simpler tools for recording gait signals thereby allowing for instantaneous and acce- sible recording of gait patterns. Using these smartphone sensors, Kwon et al. [20] proposed an unsupervised learning gait analysis approach for monitoring patient activities in a room. To the best of our knowledge, gait analysis methods for predicting BMI and age groups have not been devised. In our proposed methodology, we 3 Figure 1: General theme of the proposed methodology employ, on-board smartphone sensors for conveniently sampling the natural gait signals of various subjects (Fig. ??). We use tri-axial accelerometer to recorded linear acceleration of the body. Additionally, to capture the angular momentum during limb activity [21], gyroscope was also leveraged. The use of tri-axial gyroscope alongwith accelerometer, provided better coverage for the angular components of limb kinetics. Towards developing and testing the performance of our proposed technique, we recorded gait samples from 63 different subjects. Signals from the sensors were then pre-processed and tested on six well-known machine learning classifiers. The remainder of this paper has been organized into five sections. The second section provides a review on contemporary approaches for predicting age and BMI groups. Furthermore, it highlights different methods commonly used for gait pattern analysis. In the third section, a detailed description of the proposed methodology has been described. The fourth section details experimental test-bed devised for BMI and age group classification. The fifth section presents classification results and discusses them. In the last section, we conclude the manuscript by briefly highlighting future prospects of the proposed method. 2. Related Work In this section, we review various strategies commonly employed for ana- lyzing human gait patterns. First, we present image processing based meth- ods used for investigating different intra-limb activities. Secondly, we high- light gait analysis strategies that utilize samples from on-body inertial sen- sors. Next, we discuss how smartphone sensor based methods serve as more simplistic tools for not only recording gait patterns but also for active tem- poral profiling of BMI and age. 4 2.1. Image-based Gait Pattern Analysis Strategies In an earlier attempt, Shapiro et al. [22] used structural pattern recog- nition for studying human gait. For that, they recorded video samples from five different runners, that were utilized for analyzing patterns of intra-limb kinetics. Similarly, Mah et al. devised principal component and distortion analysis to quantitatively analyze gait under different conditions such as walking and stepping over obstacles. This helped them resolve fine differ- ences between gait patterns in different settings. However, instead of video samples, they recorded three-dimensional joint movement data using ELITE a digital motion analysis system [23, 24]. Next, Lee et al. [17] used silhouettes of gait images and trained Support Vector Machines (SVM) for classifying different persons. Noticeably, they preprocessed a video sample to extract silhouettes for further analysis. A year later, Wang et al. [18] proposed a spatiotemporal gait image analysis for human identification. They employed temporally acquired silhouettes for recognition purposes. On the same lines, Xu et al. [25] proposed an extension to Marginal Fisher Analysis (MFA) towards processing gait images. In another important study, Yu et al. [26] employed image silhouettes for classifying gender of human subjects. All aforementioned contributions indicate the utility of computer vision strategies towards recognizing human activities from patterns of their gait. Despite presence of literature highlighting image-guided gait analysis, to the best of our knowledge age and BMI prediction has not been previously un- dertaken. 2.2. Wearable Inertial Sensors and Gait Pattern Analysis Image-based gait analyses are limited, when it comes to revealing subtle physiological states of the body. This is because images present an outward representation of the gait, hence, being unable to capture fine details un- derpinning inherent gait conformation. Recognizing that, wearable inertial sensors have been employed for recognizing and predicting human activity. For instance, Sabatini et al. [27] developed a gait monitoring system by recording gait samples using an integrated inertial measurement unit (IMU) including a bi-axial accelerometer and a gyroscope. They evaluated different activities such as walking, inclination and velocity from foot inertial signals [27]. Later, Mannini et al. [28] performed a comparative analysis between Hidden Markov Models (HMMs) and Gaussian Mixture Models (GMMs) for classifying human activities. Importantly, they made use of on-body ac- celerometers for recording gait signals [28]. Recently, Ellis et al. [29] made 5 use of accelerometers for wrists and hips to measure physical activities in humans. In an important study, Qaiser et al. [11] used data from wearable, tri-axial accelerometer and gyroscope for predicting age, gender and height of 26 different subjects. An important setting in their study was that IMU units were attached at four different positions on the body including chest, lower back, right wrist and left ankle [11]. In such strategies, the use of wearable sensors however, makes the ex- periment less conducive to active monitoring of BMI and age. To this end, integrated smartphone sensors have been utilized for convenient recording gait samples. Next, we highlight these simplistic strategies that make use of smartphone sensors. 2.3. Gait Pattern Analysis using Smartphone Sensor Data Smartphones, growing ubiquitous, have emerged as convenient tools for sampling ambulatory signals. As an example, Kwapisz et al. [30] used cell phone accelerometers for recognizing different human activities such as walk- ing, jogging, ascending stairs, standing and sitting. In this context, Hynes et al. [31] surveyed various mobile phone environments for recording gait signals using accelerometers. In another example, Kwon et al. [20] proposed a simplified unsupervised learning approach for monitoring patient motion using smartphones. In all such studies, smartphone based methods have mostly been used for detecting ambient human activity. We propose use of on-board accelerome- ters and gyroscopes from smartphones to record gait samples for predicting BMI and age groups. 3. Methodology for Predicting Physiological Developments Towards developing a personalized, easy-to-use BMI monitoring system, we devised a gait pattern analysis scheme using smartphone sensor data. For that, we leveraged on-board gyroscopes and accelerometers to record gait samples of sixty-three different subjects. The first step involved in developing methods for predicting BMI and age group was dataset development. Gait samples from 63 different subjects were recorded using smartphone sensors (Gyroscope and Accelerometer). We used an android application (AndroSen- sor) for sampling the data at 180 Hz. The raw time series data thus obtained was then pre-processed before utilizing it towards classification purposes. 6 Figure 2: General workflow for predicting human BMI and age groups using smartphone sensor data Data from each subject was processed to eliminate any unwanted signals recorded during the ambulatory motion. After requisite pre-processing, we extracted statistical features using two different time-series segmentation strategies. The first is Gaussian window- ing operation and the second is Square or Box filter. Both of these strategies are commonly employed in literature. In our work, we utilize both of the windowing operations for comparing the performance of the these methods. Therefore, 14 statistical features were extracted from each time series seg- ment obtained after both Gaussian and square windowing. These 14 fea- tures were then used for training six different classifiers. To maximize the performance of each classifier, we employed different window sizes for each classification algorithm and computed the true positive rate (TPR) against each window size. Accuracies for both Gaussian and square windows were then observed for different window sizes. This helped optimize the window parameters for different classifiers. Next, to highlight the performance of two windowing strategies, we per- formed principal component analysis (PCA) and observed the change in true positive rates as a result of change in number of principal components. Do- ing so, also helped us understand the differences in the performance of two windowing operations. Lastly, we develop a rationale for the differences in performance of the two aformentioned strategies. Figure 2 illustrates the general methodology employed towards developing classification models for predicting BMI and human age groups. 4. Experimental Testbed In this section, we describe the experimental settings that have been designed for performing the experiment. 7 4.1. Dataset Development As a first step towards constructing the dataset, we recorded gait samples from eighty different subjects. For that, we devised a simplistic data logging strategy. Instead of using wearable instruments, we leveraged two different smartphone sensors (accelerometer and gyroscope) for recording gait signals. These signals were then sampled at 180 Hz using an off-the-shelf android application, namely AndroSensor. Traditionally, accelerometers have been employed for recording human physical activity [28, 30]. However, we make use of gyroscope as well. This is because, it provides coverage for rotational component of limb activity, thereby broadening the set of recorded signals. For consistency, gait samples were recorded by placing the same smartphone in right pocket of each subject, who was instructed to walk over 50ft. Read- ings from tri-axial accelerometer and gyroscope were then logged to make up raw time-series data (Supplementary Data). Body mass, height and age for every subject was recorded in addition (Supplementary Data). The next important step in developing the dataset involved assignment of class variables to each data instance. For calculating this class information, we used the recorded height and mass of each subject. This was done by utilizing the standard definition of BMI or Quetelet Index [7, 8] which states: BMI = Mass Height2 (2) The calculated BMIs were then leveraged to group data subjects into various classes, as shown in Table 1. We utilized obesity classification system devised by the World Health Organization [32] that yielded five different categories for BMI classification in Table 1. These categorical descriptions formed the basis for labeling each data record. On the same lines, we categorized sixty-three subjects into four different age groups (Table 2). Twenty participants with ages from 10 to 20 were considered young. Similarly, 20 young adults had ages from 21 to 30 while participants with ages from 31 to 40 were categorized as adults (20 in num- ber). Above that, 20 aged participants with ages between 41 to 60 years, Table 2. As a whole, dataset development generated labeled, raw, time-series data from tri-axial accelerometer and gyroscopes, which was further treated before utilizing it towards developing predictive BMI and age monitoring models. 8 Table 1: Categorical Description of BMI Groups Category Class Interval (BMI) Severely Underweight <15 Underweight 15 - 18.5 Normal 18.5 - 25 Overweight 25 - 30 Severely Overweight >30 Table 2: Categorical Description of Age Groups Category Class Interval (Age) Young 10-20 Young Adult 21-30 Adult 31-40 Aged 41-60 4.2. Preprocessing Gait signals from tri-axial sensors can’t be utilized directly for predict- ing BMI and age groups, since they contain extraneous values, irrelevant for analysis. To minmize the impact of such quantities, dataset was preprocessed to eliminate these superfluous factors. For that, signals were uniformly trun- cated to eliminate any irrelevant signal generated while placing or removing smartphone from the pocket. By doing so, we retained signal only from the gait, making it a better representative of a subject’s walking pattern. The raw time-series measurements from tri-axial gyroscope ~ψt, at any time instant t are generally modeled as follows: ~Ψt = ~ωt + ~εG (3) where, ~Ψt is three-dimensional measurement from the gyroscopes, ~ωt is measured angular velocity and ~εG is the additive Gaussian white noise, in- troduced as a result of inherent sensor fluctuations and electronic interfer- 9 ences. Similarly, three-dimensional acceleration readings from the tri-axial accelerometer ~at at any time t is expressed as follows. ~at = ~gt + ~al + ~εA (4) where, ~at is the accelerometer reading constituted by gravitational ac- celeration ~gt, linear acceleration of the limb ~al and additive Gaussian white noise ~εA. The aforementioned phase of data processing, thus yielded six raw time- series signals including, ~atx , ~aty , ~atz , from accelerometer and ~ψtx , ~ψty , ~ψtz from the gyroscope. Before utilizing this dataset for gait pattern analysis, we eliminated noise by extracting several useful features from the data. The next section, highlights utility of feature extraction towards developing clas- sifcation schemes using gait samples. 4.3. Feature Extraction The raw dataset, owing to its inherent stochasticity and additive white noise, is non-compliant with different classification schemes. For this reason, it becomes imperative to extract suitable features, representative of the gait signal. Statistical time-series analysis of these signals, was therefore con- ducted for feature extraction. We employed sliding window operation [33] to divide the time-series signal into a sequence of segments. Each segment was then utilized towards extracting several statistical features. The stochastic, non-stationary nature of gait signal makes it well-suited towards windowing operation. To avoid discontinuity in sample information, we used overlapping windows for our analysis. A suitable overlap of 50% was utilized, as suggested in various literature [34, 35, 36]. We use two commonly used windowing op- erations, namely, Gaussian and Square windows. We extract features using these two different strategies to determine the most suitable for classifying BMI and age groups. Using two different sliding windows, we extracted 14 statistical features from each of the six time-series signals. This yielded a total of eighty-four (84 = 6×14) features for each type of filter employed. Different window sizes for both filters were tested to identify optimal width and standard deviation (SD) for extracting the features. This was done by varying the width (in case of Box filter) and SD (in case of Gaussian Filter). Next, we discuss Box and Gaussian filter, in relation to the sampled signals. 10 4.3.1. Box (Rectangular) Windowing Operation Accelerometer and gyroscope generated six (6) different raw time-series signals, that were sampled at 180Hz. Each of these signals was individually treated for extracting 14 statistical features. Below, we discuss rectangular windowing operation leveraged to extract these features. For simplicity, let ~δ[n] represent raw signal obtained from the sensor. If ~Π[n] denotes the rect- angular window function, then each time-series segment ~x[n] obtained after windowing can be expressed mathematically as: ~x[n] = ~δ(n)~Π(n− k W 2 ) (5) where, the rectangular window function, ~Π[n] with maximum window size of W is defined as: ~Π(n) = { 1 1 ≤ n ≤ W 0 otherwise (6) In Equation 5, W is the size of square window, measured in seconds and k = 0, 1, 2, .... 4.3.2. Gaussian Windowing Operation For Gaussian filtering of the dataset, a Gaussian function, ~N [n] is defined as: ~N [n] = 1 σ √ 2π e −n 2σ2 (7) This Gaussian function was employed to segment the time-series. There- fore, if ~δ[n] is raw time-series signal, the the segmented signal ~x[n] is obtained using Gaussian function, ~N [n] can be stated as: ~x[n] = ~δ[n] ~N [n] (8) 4.3.3. Statistical Features for Classification Both the aforementioned windowing strategies were independently em- ployed for extracting 14 statistical features. These features preserve the temporal information of the raw data by eliminating random noise wihtin the recorded signals. Such statistical features of windowing segments have been shown to provide a low-rank description of the dataset while preserving 11 the temporal information. Therefore, they also don’t incur high computa- tional costs [37]. Table 3 lists and explains all the statistical features used for classification purposes. Table 3: Set of 14 statistical features extracted from each segment of the time-series Feature Mathematical Definition Description Mean µ = n∑ i=1 x[i] n Average value of the data points within a window segment Standard Deviation σ = √ n∑ i=1 (x[i]−µ) n Quantitative measure of spread of the data within a sampled window frame. Variance σ2 = n∑ i=1 (x[i]−µ) n Measure of dispersion of data in a window, obtained by squaring the Standard deviation. Minimum Value min(S) = x ∈ S | x ≤ y Minimum value in a given window frame. ∀y ∈ S Maximum Value max(S) = x ∈ S | x ≥ y Maximum value in a given window frame. ∀y ∈ S Jitter J̄ = N∑ t=1 ‖x[t]−x[t−1]‖ N−1 Average amount of variation between adjacent samples of the data within a window frame. Mean Crossing Rate Xn = N∑ t=1 ‖I(x[t]>X̄)−I(x[t−1]>X̄)‖ N Rate at which adjacent data points cross the mean value of their respective windows. where, I(x) = { 1 if x is true 0 otherwise Auto Correlation Mean Rxx[K] = N−K∑ n=1 x[n]x[n+K] N−K∑ n=1 x[N ]2 Measure of degree of relation between current sensor values and the future sensor values. and, R̄xx = N∑ k=1 Rxx[K] N Auto Correlation SD σR = √ N∑ k=1 (Rxx[K]−R̄xx)2 N−1 Measure of the variation in the auto correlation values obtained by taking all possible lags of the raw data in the window currently being processed. Auto Covariance Mean Cxx[k] = N−K∑ n=1 (x[n]− X̄)(x[n+K]− X̄) Measure of relationship between the current and the future values of the time series. and, C̄xx = N∑ k=1 Cxx[K] N Auto Covariance SD σC = √ N∑ k=1 (Cxx[k]−C̄xx)2 N−1 Measure of dispersion between the Auto Covariance values for different lags. Skewness SKp = n (n−1)(n−2) N∑ i=1 (Xi−X̄)3 σ3 Measure of amount of Symmetry in the data within a focused window. Kurtosis Kurt = N∑ i=1 (Xi−X̄)4 nσ4 Feature used to provide description of tails of the distribution of data. Root Mean Squared Error RMSE = √ 1 N N∑ i=1 (Xi − X̄)2 Measure of error of individual data points relative to the average value within a window. 4.4. Classification Algorithms After feature extraction, we employed these features for training both BMI and age classifiers independently. We used WEKA [38] for training and testing six different classifiers. In our experiments, we use 10− fold testing 12 for computing the true positive rates of all the classifiers. Below, we briefly highlight the classifiers used in BMI and age prediction experiments. 4.4.1. J48 Decision Tree A J48 decision tree acts like a decision support system. It constructs a univariate decision tree from a dataset predicated upon the information gain by entropy of each attribute of the dataset [39]. C4.5 algorithm [40] was used as a kernel for constructing a J48 tree. J48 decision tree has previously been proved to be useful for human activity classification from raw inertial sensor data in various studies [41, 42, 43, 44] where Kundra et al. [45] have shown its utility in classifying electroencephalography (EEG) data. 4.4.2. Multilayer Perceptron Multilayer Perceptron (MLP) belongs to the class of feedforward neural networks. MLP constructs a map between the inputs and output classes [46]. An MLP consists of three different types of layers i.e. An Input, Output and at least a single hidden layer where each layer in the network is fully connected to next. Each perceptron in any layer is activated according to sigmoid activation function given by: y(vi) = (1 + e −vi)−1 (9) MLP trains the network using a supervised learning technique called Back Propagation. The weights on each perceptron are adjusted to minimize the error in the entire output, given by: ε(n) = 1 2 ∑ j e2j(n) (10) The weights in the network are then adjusted to optimize the error, ac- cording to gradient descent algorithm as follows: ∆wji(n) = −η δε(n) δvj(n) yi(n) (11) Where η is the learning rate selected to be 0.3 in our analysis and the total number of layers in the MLP for each experiment were selected according to: Nlayers = 1 2 (Nattributes +Nclasses) (12) 13 Because of MLPs popularity in classifying nonlinear data and its previous satisfactory results shown by [47, 48] in mining the raw inertial sensor data. MLP is particularly suited for our analyses. 4.4.3. SVM The third classifier used was an SVM classifier using a polynomial kernel of degree 3. The SVM is a supervised learning classifier that classifies objects based on the support vectors of a dataset or points lie closest to the decision boundary. SVM maximize the distance between support vectors and the decision boundary [49]. The objective function of SVM is given by: miny,w,b 1 2 ‖w‖2 + C m∑ i=1 ξi (13) s.t. y(i)(wTx(i) + b) ≥ 1− ξi, i = 1, 2, ...,m ξi ≥ 0, i = 1, 2, ...,m SVM has been found to be an outstanding classifier in cases having low training data instances and high dimensional features [50, 51]. We demon- strate the accuracy of SVM on our dataset as the dimension of the feature vectors is increased. 4.4.4. Random Forest A Random Forest classifier trains an ensemble of decision tree predictors on the training data and then uses a majority voting strategy on the results of each tree to classify the testing data. According to [52], at each stage k of the Random Forest Classifier, a random vector Θkis generated representing the random choices we make while generating the kth tree. The tree at stage k is then a function of both the random data x chosen for its generation and the random vector Θk as: h(x,Θk) (14) The Random Forest classifier is then represented mathematically by the notation: {h(x,Θk) k = 1, 2, ...} (15) 14 4.4.5. k-NN k-Nearest Neighbor or k-NN classifier belongs to the class of instance- based learning where each testing instance is compared with the training instances stored in memory rather than forming a general model of the whole data. This gives an additional advantage of classifying previously unseen data during training. Given training data (x1, y1), (x2, y2), ..., (xn, yn), k-NN optimizes the Ob- jective functions given as: J = k∑ j=1 n∑ i=1 ‖x(j)i − cj‖ 2 (16) 4.4.6. Logistic Regression Because of more than two classes, we employ multinomial logistic regres- sion in our prediction towards Age and BMI classes. Multinomial regression extends the basic binary logistic regression by using a One vs All approach. The One vs All approach is as follows: • Train a Logistic regression classifier h(θi)(x) for each class to predict the probability that y = i • On a new input x, to make a prediction, pick the class i that maximizes i.e. maxih (i) θ (x) 5. Results and Discussion In this section, we present the analysis results from six different clas- sification models, constructed for predicting human age and BMI. Prior to developing these schemes for conducting analyses, the dataset was sub- jected to preprocessing and feature selection (discussed earlier). The process of extracting suitable, noise-free features, involved two different windowing functions–Gaussian and Box (or Square) filters. Here, we present prediction results for both operations and hence compare their utility in classifying var- ious subjects into age and BMI groups. In the end, we propose the most 15 Table 4: Changes in Classifier Accuracies (%) owing to different Square Window sizes Width (s) J48 Multilayer Perceptron SVM Random Forest KNN Logistic Regression 0.17 73.41 76.72 83.48 85.68 86.84 66.00 0.33 81.74 89.28 89.10 92.24 93.90 71.58 0.50 81.29 91.03 91.42 92.58 93.48 72.19 BMI 0.67 79.80 91.51 91.85 91.43 92.28 72.16 0.83 81.18 94.62 91.94 93.76 92.37 74.84 1.00 76.30 91.07 88.96 90.69 89.95 72.46 1.17 79.47 93.26 89.15 92.23 90.18 74.49 0.17 74.61 74.19 81.67 88.23 86.66 61.12 0.33 80.34 86.62 89.06 93.46 92.42 68.74 0.50 79.35 89.16 90.13 92.90 92.13 71.74 AGE 0.67 80.65 90.66 89.90 93.80 91.68 72.58 0.83 80.97 93.76 92.04 94.84 90.86 78.60 1.00 79.53 89.95 89.95 91.69 87.59 75.19 1.11 84.75 96.19 94.72 94.87 90.18 81.38 suitable model that could be leveraged for accurately predicting and classi- fying BMI and age from gait samples. Such schemes could then be used for monitoring physiological changes within the body. We selected the most optimal parameters (Width and SD respectively) for both Square and Gaussian filters by empirically computing True Posi- tive Rates (RTPR) of each classifier against different values of width and SD (σ).Table 4 lists the sizes (in seconds) for different square windows, used for feature extraction. We varied the square window sizes from 0.17s to 1.17s. The resulting features computed against these parameters were then used to compute classifier accuracies, tabulated against their respective window sizes (Table 4). Doing so, helped us identify optimal width parameter for designing the square window function. It can be observed that classifier ac- curacies increased with increasing the window size. In case of BMI prediction however, the classifiers performed optimally for a window size of 0.83s. For age classification, a similar behavior was observed at a window size of 1.11s (Table 4). On the same lines, different values of SD (0.06s to 0.56s) were employed towards determining optimal SD value for tailoring the Gaussian window 16 function (Table 5). Classifier accuracies increased with an increase in SD (Table IV). For BMI classification the classifiers performed most accuractely at σ = 0.36s At σ = 0.5s and σ = 0.56s, the accuracies of all the classifiers tend to maximize for age classification, as can be seen in Table 5. Taken together, the aforementioned analysis helped us identify optimal parameters for designing the window operations. These parameters were then employed for constructing accurate models for predicting BMI and age groups. Table 5: Changes in Classifier Accuracies (%) owing to different Standard Deviations of Gaussian Filter Width (s) J48 Multilayer Perceptron SVM Random Forest KNN Logistic Regression 0.06 54.99 65.67 71.43 69.20 74.04 59.22 0.14 69.35 82.03 85.02 82.41 89.63 64.36 0.22 74.04 89.32 89.32 86.87 92.24 66.90 BMI 0.31 84.64 93.16 92.17 93.93 95.78 77.11 0.36 85.02 92.70 93.01 94.24 96.08 77.42 0.44 83.72 92.93 93.32 94.62 96.54 76.88 0.56 80.57 92.40 93.63 94.32 96.39 76.04 0.08 73.35 80.26 81.95 86.64 85.71 65.21 0.17 83.56 88.94 91.09 95.01 92.70 72.58 0.25 83.33 91.40 94.16 95.93 96.39 76.04 AGE 0.33 83.64 89.78 94.39 96.24 97.31 78.42 0.42 82.33 89.86 94.24 96.47 97.31 77.50 0.50 83.56 91.17 94.32 96.62 97.24 79.72 0.56 81.64 91.47 95.01 96.62 97.31 79.26 Box and Gaussian filters are common pre-processing filters employed for time-series segmentation in non-stationary signal analysis. Box filter allows complete passage of information, inherently being an ideal filer. Gaussian windowing, on the other hand, is an important white Gaussian noise reduc- tion filter. Therefore, to reveal the impact of these strategies on classifier accuracies, we performed a comparative analysis between Gaussian and Box filtering towards each classification task (Fig. 1 and 2, Fig. 3 and 4). Fig. 1 highlights the performance of different classifiers for classifying the subjects into various BMI groups. The dataset was processed using σ = 0.36s. From Fig.3, it can be seen that k-Nearest neighbour (KNN) 17 5 10 15 20 25 30 60 70 80 90 Number of Principal Components T ru e P o si ti v e R a te , T P R (% ) BMI Classification (σ = 0.36s) KNN LR J48 SVM RF MLP 1 Figure 3: Gaussian BMI Prediction performed the best with a RTPR of 94.47%. Moreover, random forest (RF), SVM and multilayer perceptron (MLP) performed with high accuracies of 89.89%, 89.94% and 89.01% respectively. Next, J48 decision trees performed with a RTPR of 80.64% and logistic regression (LR) with a relatively low RTPR of 69.43%. Similarly, in case of square windowing operation we used width = 0.83s (Fig.2). Here, KNN performed with the highest accuracy of 91.61% followed by SVM (90.86%), RF (90.10%) and MLP (89.24%) respec- tively. All the classification tasks were performed at 10-fold testing to assure statistical significance of the results. Fig. 1 and 2 illustrate that 30 principal components sufficed for attaining optimum classifier TPR. A similar protocol was repeated for classifying gait samples into various age groups (Fig. 3 and 4). The classifiers performed accurately for age clas- 18 5 10 15 20 25 30 50 60 70 80 90 Number of Principal Components T ru e P o si ti v e R a te , T P R (% ) BMI Classification (Width = 0.83s) KNN LR J48 SVM RF MLP 1 Figure 4: Square BMI Prediction sification as well. The dataset was processed at σ = 0.5s and the classifier performance can be visualized in Fig.3. KNN performed most accurately (95.9%) followed by random forest (93.01%), SVM (92.93%), MLP (89.04%) and J48 (76.11%). Logistic regression performed sub-optimally with a RTPR of 69.04%. For predicting age groups, we used square window size of 1.11s for extrating features. Performance assesment of Box filter has been high- lighted in Fig. 6. The classification models performed suitably well for the age prediction task as well (Fig. 4). In this case, SVM classified subjects into various age groups with the highest accuracy of 94.28%. Multilayer per- ceptron (MLP ) and KNN, performed with an almost equivalent RTPR of 93.84% and 93.69% respectively. Random forest also performed well with an accuracy of 90.62%. J48 and logistic regression, however performed with low 19 5 10 15 20 25 30 60 70 80 90 100 Number of Principal Components T ru e P o si ti v e R a te , T P R (% ) AGE Classification (σ = 0.5s) KNN LR J48 SVM RF MLP 1 Figure 5: Gaussian Age Prediction accuracies of 76.98% and 73.167% respectively. We now try to develop a mathematical intuition towards the enhanced performance of Gaussian filter over Square filter as the SD of Gaussian Filter is increased above a point, in our case, equal to 0.31s for BMI and 0.56s for Age classification. Figure () shows the Fourier transform of a typical square function, taking the shape of Sinc function. The Sinc function in frequency domain exhibits a continuum of lobes at various neighboring fre- quencies to the center frequency. This essentially means that sampling the non-stationary sensor data with a square filter has a undesired effect of sam- pling a spectrum of unwanted adjacent frequencies. In case of a Gaussian Filter, as we see from Figure (), the frequency com- ponents are also of the Gaussian nature. However, on increasing the Standard deviation or informally, the spread of the Gaussian filter, the Gaussian Fre- 20 5 10 15 20 25 30 50 60 70 80 90 Number of Principal Components T ru e P o si ti v e R a te , T P R (% ) AGE Classification (Width = 1.11s) KNN LR J48 SVM RF MLP 1 Figure 6: Square Age Prediction quency response shrinks down, ultimately converging to a single peak in the frequency domain. At this Standard deviation, we presume that only one frequency component of the sensor data is being sampled by the Gaussian Filter. The features resulting from a single-frequency sampling of the raw data are hence less prone to noise and do not tend to over-fit the classifier with irrelevant information captured from adjacent frequencies as is the case with square filter. This explains the sudden rise in the accuracy of Gaussian Filter when the SD is increased above a point where its frequency response takes the form of a single point in frequency domain. 21 6. Conclusions In this paper we have presented the first ever protocol to classify the Age and BMI of smart phone users using the raw Accelerometer and Gyroscope sensor data. We have also presented 14 statistical features extracted from the non-stationary smart phone sensor time-series and shared the performance of six common machine learning classifiers on these features. Furthermore, we described the use of two pre-processing filters to segment the raw time series into distinct frames and devised an empirical experiment to select the most optimal parameters of the two. In the end, we elaborate on the performance of each of the two sampling filters. References [1] R. Wolk, P. Berger, R. J. Lennon, E. S. Brilakis, V. K. Somers, Body mass index, Circulation 108 (2003) 2206–2211. [2] A. P. C. S. Collaboration, et al., Body mass index and cardiovascular disease in the asia-pacific region: an overview of 33 cohorts involving 310 000 participants, International journal of epidemiology 33 (2004) 751–758. [3] K. V. Narayan, J. P. Boyle, T. J. Thompson, E. W. Gregg, D. F. Williamson, Effect of bmi on lifetime risk for diabetes in the us, Diabetes care 30 (2007) 1562–1566. [4] A. G. Renehan, M. Tyson, M. Egger, R. F. Heller, M. Zwahlen, Body- mass index and incidence of cancer: a systematic review and meta- analysis of prospective observational studies, The Lancet 371 (2008) 569–578. [5] Y. C. Wang, G. A. Colditz, K. M. Kuntz, Forecasting the obesity epi- demic in the aging us population, Obesity 15 (2007) 2855–2865. [6] M.-P. St-Onge, D. Gallagher, Body composition changes with aging: the cause or the result of alterations in metabolic rate and macronutrient oxidation?, Nutrition 26 (2010) 152–155. [7] L. Quetelet, Physique sociale, vols. 1–2, Brussels, Belgium: Muquardt (1869). 22 [8] J. S. Garrow, J. Webster, Quetelet’s index (w/h2) as a measure of fatness., International journal of obesity 9 (1985) 147–153. [9] B. J. Lee, K. H. Kim, B. Ku, J.-S. Jang, J. Y. Kim, Prediction of body mass index status from voice signals based on machine learning for automated medical applications, Artificial intelligence in medicine 58 (2013) 51–61. [10] M. M. Abaza, S. Levy, M. J. Hawkshaw, R. T. Sataloff, Effects of medications on the voice, Otolaryngologic Clinics of North America 40 (2007) 1081–1090. [11] Q. Riaz, A. Vögele, B. Krüger, A. Weber, One small step for a man: estimation of gender, age and height from recordings of one step by a single inertial sensor, Sensors 15 (2015) 31999–32019. [12] M. P. Murray, R. C. Kory, B. H. Clarkson, Walking patterns in healthy old men, Journal of gerontology 24 (1969) 169–178. [13] D. A. Winter, Biomechanics and motor control of human gait: normal, elderly and pathological, 1991. [14] G. Johansson, Visual perception of biological motion and a model for its analysis, Perception & psychophysics 14 (1973) 201–211. [15] M. P. Murray, A. B. Drought, R. C. Kory, Walking patterns of normal men., JBJS 46 (1964) 335–360. [16] M. Kadaba, H. Ramakrishnan, M. Wootten, J. Gainey, G. Gorton, G. Cochran, Repeatability of kinematic, kinetic, and electromyographic data in normal adult gait, Journal of Orthopaedic Research 7 (1989) 849–860. [17] L. Lee, W. E. L. Grimson, Gait analysis for recognition and classifica- tion, in: Automatic Face and Gesture Recognition, 2002. Proceedings. Fifth IEEE International Conference on, IEEE, pp. 155–162. [18] L. Wang, T. Tan, H. Ning, W. Hu, Silhouette analysis-based gait recog- nition for human identification, IEEE transactions on pattern analysis and machine intelligence 25 (2003) 1505–1518. 23 [19] J.-Y. Yang, J.-S. Wang, Y.-P. Chen, Using acceleration measurements for activity recognition: An effective learning algorithm for constructing neural classifiers, Pattern recognition letters 29 (2008) 2213–2220. [20] Y. Kwon, K. Kang, C. Bae, Unsupervised learning for human activity recognition using smartphone sensors, Expert Systems with Applica- tions 41 (2014) 6067–6074. [21] H. Herr, M. Popovic, Angular momentum in human walking, Journal of Experimental Biology 211 (2008) 467–481. [22] D. C. Shapiro, R. F. Zernicke, R. J. Gregor, J. D. Diestel, Evidence for generalized motor programs using gait pattern analysis, Journal of Motor behavior 13 (1981) 33–47. [23] C. D. Mah, M. Hulliger, R. G. Lee, I. S. O’Callaghan, Quantitative analysis of human movement synergies: constructive pattern analysis for gait, Journal of motor behavior 26 (1994) 83–102. [24] G. Ferrigno, A. Pedotti, Elite: a digital dedicated hardware system for movement analysis via real-time tv signal processing, IEEE Transactions on Biomedical Engineering (1985) 943–950. [25] D. Xu, S. Yan, D. Tao, S. Lin, H.-J. Zhang, Marginal fisher analysis and its variants for human gait recognition and content-based image retrieval, IEEE transactions on image processing 16 (2007) 2811–2821. [26] S. Yu, T. Tan, K. Huang, K. Jia, X. Wu, A study on gait-based gender classification, IEEE Transactions on image processing 18 (2009) 1905– 1910. [27] A. M. Sabatini, C. Martelloni, S. Scapellato, F. Cavallo, Assessment of walking features from foot inertial sensing, IEEE Transactions on biomedical engineering 52 (2005) 486–494. [28] A. Mannini, A. M. Sabatini, Accelerometry-based classification of hu- man activities using markov modeling, Computational intelligence and neuroscience 2011 (2011) 4. [29] K. Ellis, J. Kerr, S. Godbole, J. Staudenmayer, G. Lanckriet, Hip and wrist accelerometer algorithms for free-living behavior classification, Medicine and science in sports and exercise 48 (2016) 933. 24 [30] J. R. Kwapisz, G. M. Weiss, S. A. Moore, Activity recognition using cell phone accelerometers, ACM SigKDD Explorations Newsletter 12 (2011) 74–82. [31] M. Hynes, H. Wang, L. Kilmartin, Off-the-shelf mobile handset envi- ronments for deploying accelerometer based gait and activity analysis algorithms, in: Engineering in Medicine and Biology Society, 2009. EMBC 2009. Annual International Conference of the IEEE, IEEE, pp. 5187–5190. [32] W. H. Organization, Obesity: preventing and managing the global epi- demic, 894, World Health Organization, 2000. [33] A. Antoniou, Digital signal processing, McGraw-Hill, 2016. [34] L. Bao, S. Intille, Activity recognition from user-annotated acceleration data, Pervasive computing (2004) 1–17. [35] S. Hemminki, P. Nurmi, S. Tarkoma, Accelerometer-based transporta- tion mode detection on smartphones, in: Proceedings of the 11th ACM Conference on Embedded Networked Sensor Systems, ACM, p. 13. [36] K. Van Laerhoven, O. Cakmakci, What shall we teach our pants?, in: Wearable Computers, The Fourth International Symposium on, IEEE, pp. 77–83. [37] X. Wang, K. A. Smith, R. Hyndman, D. Alahakoon, A scalable method for time series clustering, Technical Report, Monash University (2004). [38] M. Hall, E. Frank, G. Holmes, B. Pfahringer, P. Reutemann, I. H. Wit- ten, The weka data mining software: an update, ACM SIGKDD explo- rations newsletter 11 (2009) 10–18. [39] N. Bhargava, G. Sharma, R. Bhargava, M. Mathuria, Decision tree analysis on j48 algorithm for data mining, Proceedings of International Journal of Advanced Research in Computer Science and Software Engi- neering 3 (2013). [40] J. R. Quinlan, C4. 5: programs for machine learning, Elsevier, 2014. 25 [41] K. H. Walse, R. V. Dharaskar, V. M. Thakare, A study of human activity recognition using adaboost classifiers on wisdm dataset, The Institute of Integrative Omics and Applied Biotechnology Journal 7 (2016) 68–76. [42] W. Wu, S. Dasgupta, E. E. Ramirez, C. Peterson, G. J. Norman, Clas- sification accuracies of physical activities using smartphone motion sen- sors, Journal of medical Internet research 14 (2012). [43] M. C. Yuksek, B. Barshan, Human activity classification with miniature inertial and magnetic sensor signals, in: 2011 19th European Signal Processing Conference, pp. 956–960. [44] M. Shoaib, Human activity recognition using heterogeneous sensors (2013). [45] D. Kundra, B. Pandey, Classification of eeg based diseases using data mining, International Journal of Computer Applications 90 (2014). [46] N. R. M. LakshmikanthaK.S, M. V. Achutha, Human activity recog- nition through accelerometer sensor using data mining, International Journal for Research in Applied Science and Engineering Technology 3 (2015). [47] Y. Li, D. Xue, E. Forrister, G. Lee, B. Garner, Y. Kim, Human activity classification based on dynamic time warping of an on-body creeping wave signal, IEEE Transactions on Antennas and Propagation 64 (2016) 4901–4905. [48] K. Goh, K. Lim, A. Gopalai, Y. Chong, Multilayer perceptron neural network classification for human vertical ground reaction forces, in: Biomedical Engineering and Sciences (IECBES), 2014 IEEE Conference on, IEEE, pp. 536–540. [49] Z. Wu, S. Zhang, C. Zhang, Human activity recognition using wearable devices sensor data (????). [50] N. H. Ruparel, N. M. Shahane, D. P. Bhamare, Learning from small data set to build classification model: A survey, in: Proc. IJCA Int. Conf. Recent Trends Eng. Technol.(ICRTET), pp. 23–26. 26 [51] G. Forman, An extensive empirical study of feature selection metrics for text classification, Journal of machine learning research 3 (2003) 1289–1305. [52] L. Breiman, Random forests, Machine Learning 45 (2001) 5–32. 27 1 Introduction 2 Related Work 2.1 Image-based Gait Pattern Analysis Strategies 2.2 Wearable Inertial Sensors and Gait Pattern Analysis 2.3 Gait Pattern Analysis using Smartphone Sensor Data 3 Methodology for Predicting Physiological Developments 4 Experimental Testbed 4.1 Dataset Development 4.2 Preprocessing 4.3 Feature Extraction 4.3.1 Box (Rectangular) Windowing Operation 4.3.2 Gaussian Windowing Operation 4.3.3 Statistical Features for Classification 4.4 Classification Algorithms 4.4.1 J48 Decision Tree 4.4.2 Multilayer Perceptron 4.4.3 SVM 4.4.4 Random Forest 4.4.5 k-NN 4.4.6 Logistic Regression 5 Results and Discussion 6 Conclusions
0non-cybersec
arXiv
Finding most frequent combinations. <p>I have a data frame with 2 columns, ID number and brand: </p> <pre><code>X1 X2 1234 A89 1234 A87 1234 A87 1234 A32 1234 A27 1234 A27 1235 A12 1235 A14 1235 A14 1236 A32 1236 A32 1236 A27 1236 A12 1236 A12 1236 A14 1236 A89 1236 A87 1237 A99 1237 A98 </code></pre> <p>I want to find the top 3 brand combinations that occur together most frequently with regard to id number:</p> <pre><code>A89, A87 A32, A27 A12, A14 </code></pre> <p>I tried: library(dplyr)</p> <pre><code> df %&gt;% group_by(X1,X2) %&gt;% mutate(n = n()) %&gt;% group_by(X1) %&gt;% slice(which.max(n)) %&gt;% select(-n) </code></pre> <p>But it doesn't work correctly. I would appreciate any thoughts or ideas!</p>
0non-cybersec
Stackexchange
Not all heroes wear capes.
0non-cybersec
Reddit
How to implement decodeObjectOfClasses in Swift. <p>I'm having trouble finding the correct way to conform the the <code>NSSecureCoding</code> protocol in <strong>Swift</strong>, specifically when decoding objects that is an array of other objects.</p> <p>I can't create an <code>NSSet</code> of class types in swift.</p> <p>In Objective-C I would use</p> <pre><code>self.books = [aDecoder decodeObjectOfClasses:[NSSet setWithObjects:[NSArray class], [Book class], nil] forKey:@"books"]; </code></pre> <p>in Swift I'm having issues creating the <code>NSSet</code> like this : </p> <pre><code>self.books = aDecoder.decodeObjectOfClasses(NSSet().setByAddingObject(NSArray.self).setByAddingObject(Book.self), forKey:"books") </code></pre> <p>Here's the error:</p> <pre><code>Type 'NSArray.Type' does not conform to protocol 'AnyObject' </code></pre>
0non-cybersec
Stackexchange
My other kid is an honor student.
0non-cybersec
Reddit
Proof that one large number is larger than another large number. <p>Let $a = (10^n - 1)^{(10^n)}$ and $b=(10^n)^{(10^n - 1)}$</p> <p>Which of these numbers is greater as n gets large?</p> <p>I believe it is $a$ after looking at some smaller special cases, but I'm not sure how to prove it.</p>
0non-cybersec
Stackexchange
Google Stadia free tier, player limit, YouTube streaming reportedly coming soon.
0non-cybersec
Reddit
How do I limit a LEFT JOIN to the 1st result in SQL Server?. <p>I have a bit of SQL that is almost doing what I want it to do. I'm working with three tables, a Users, UserPhoneNumbers and UserPhoneNumberTypes. I'm trying to get a list of users with their phone numbers for an export. </p> <p>The database itself is old and has some integrity issues. My issue is that there should only ever be 1 type of each phone number in the database but thats not the case. When I run this I get multi-line results for each person if they contain, for example, two "Home" numbers.</p> <p>How can I modify the SQL to take the first phone number listed and ignore the remaining numbers? I'm in SQL Server and I know about the TOP statement. But if I add 'TOP 1' to the LEFT JOIN select statement its just giving me the 1st entry in the database, not the 1st entry for each User.</p> <p>This is for SQL Server 2000.</p> <p>Thanks,</p> <pre><code>SELECT Users.UserID, Users.FirstName, Users.LastName, HomePhone, WorkPhone, FaxNumber FROM Users LEFT JOIN (SELECT UserID, PhoneNumber AS HomePhone FROM UserPhoneNumbers LEFT JOIN UserPhoneNumberTypes ON UserPhoneNumbers.UserPhoneNumberTypeID=UserPhoneNumberTypes.UserPhoneNumberTypeID WHERE UserPhoneNumberTypes.PhoneNumberType='Home') AS tmpHomePhone ON tmpHomePhone.UserID = Users.UserID LEFT JOIN (SELECT UserID, PhoneNumber AS WorkPhone FROM UserPhoneNumbers LEFT JOIN UserPhoneNumberTypes ON UserPhoneNumbers.UserPhoneNumberTypeID=UserPhoneNumberTypes.UserPhoneNumberTypeID WHERE UserPhoneNumberTypes.PhoneNumberType='Work') AS tmpWorkPhone ON tmpWorkPhone.UserID = Users.UserID LEFT JOIN (SELECT UserID, PhoneNumber AS FaxNumber FROM UserPhoneNumbers LEFT JOIN UserPhoneNumberTypes ON UserPhoneNumbers.UserPhoneNumberTypeID=UserPhoneNumberTypes.UserPhoneNumberTypeID WHERE UserPhoneNumberTypes.PhoneNumberType='Fax') AS tmpFaxNumber ON tmpFaxNumber.UserID = Users.UserID </code></pre>
0non-cybersec
Stackexchange
Linux Shell - Display system information in upper part of the screen. <p>out of curiosity:<br> Is there a way to display system information in the upper third of a linux shell that stays there and updates automatically?</p> <p>In my humble understanding this would maybe require something like a curses program which displays two windows, the upper containing the respective information and the lower displaying a regular shell.</p> <p>I didn't find anything alike which is why I'm asking here.<br> If nothing alike already exists I am (like any good linux user should be :D) motivated to write my own, but yeah, maybe there's no need to reinvent the wheel...</p> <p>Thanks in advance!</p>
0non-cybersec
Stackexchange