What does the TLS 1.2 client finished message contain?

I am implementing TLS 1.2 and I'm stuck on the client finished message.   My question is: what is the size and structure of a clients finished message in TLS 1.2 when using the ECDHE_RSA_AES_128_GCM_SHA256 cipher suite.   I searched for this question and someone somewhere stated its size is 48 bytes; more specifically:   12 byte verify data 1 byte handshake type 3 byte verify data length and 32 byte MAC   Is that really correct?   I mean: according to  finished messages have {verify_data[verify_data_length]} and verify_data = PRF(master_secret, finished_label, hash(handshake_messages). Also, according to RFC 5246 section 5 PRF(secret, label, seed) = P_<hash>(secret, label+seed) and P_hash(secret, seed) = HMAC_hash(secret, A(1) + seed). So, when I compute HMAC using SHA256 for verify_data its size is 32 byte.   As a result, I'm a bit confused in relation to the verify_data size and the finished message structure. Can anyone help me to understand this and/or maybe put me on the right track somehow?


Layer not visible when rendering from Python script in QGIS

I am running a script from the Python console in QGIS. I have stripped the script down to highlight the problem. Basically, when I render and save an image of a shapefile that is displayed with points they do not appear in the saved image. They will appear in the map canvas (see image below). Interestingly, if I have a vector that I fill (e.g., administrative boundaries) they will be visible in rendered image. Here is a screenshot of the map canvas after running script:    and here is my code:  from PyQt4.QtCore import * from PyQt4.QtGui import *  #input Layer lyrPts = QgsVectorLayer("SomeFile.shp", "Qflu", "ogr") QgsMapLayerRegistry.instance().addMapLayer(lyrPts)  # create image img = QImage(QSize(8000, 6000), QImage.Format_ARGB32_Premultiplied)  # set image's background color color = QColor(255, 255, 255) img.fill(color.rgb())  # create painter p = QPainter() p.begin(img) p.setRenderHint(QPainter.Antialiasing) render = QgsMapRenderer()  # set layer set layers = QgsMapLayerRegistry.instance().mapLayers() lst = layers.keys() render.setLayerSet(lst)  # set extent rect = QgsRectangle(lyrPts.extent()) rect.scale(1.1) render.setExtent(rect)  # set output size render.setOutputSize(img.size(), img.logicalDpiX())  # do the rendering render.render(p)  #end rendering p.end()  # save image img.save("image.png","png")


Highlight newly uncovered content in Beamer

I am looking for an effect like the following:  \begin{frame}[fragile]{Highlight new stuff} \begin{itemize}     \item<1-> [{\Large \textbf{Points}}]     \item<1-> Foo1     \item<2-> Foo2 \end{itemize} \end{frame}


Pay Yourself With Credit Card Make Money With Cash Back

Let us say I have a Credit Card that gives 2% cash back on any purchase with Unlimited cash back.   Now let's say I also own a business where I'm charged a small transaction fee say 1% of the total value of the swipe.   Is it illegal for me to just max out my credit card paying myself.  So say in a given month I pay myself $10,000 with this credit card. I lose $100 to credit processing fees, but my rewards program gives me $200 so I net $100.   Any foreseeable problems?


How should I take a potential PhD supervisor's age into account, when planning to follow PhD with habilitation?

I plan to apply for PhD in Finance/Statistics next semester, and hence searched for potential supervisors.  An issue I have is that many interesting candidates are above age 60, and in Germany Professors retire at 65, such that a subsequent post-doc/habilitation would most likely require a different supervisor after PhD. One Professor just started his position at age 40, but so he has not many notable publications and I am unsure whether he might change university soon (he just changed it from another 4 years position).  Could someone advise me on the importance of age for selecting a PhD supervisor in context of a long-term future academic career?  The time for PhD would be 4-5 years, and PostDoc/Habilitation/AssociateProf usually again 4-6 years, with goal of potentially becoming Full Professor in Finance/Statistics.


I am facing a problem with on(). Here is my code:  add this stuff   $(".add").on('click', function() {     $.post("/toto.com/add.php", { trainning: this.id }, function() {});     $(this).html("Remove this stuff");     $(this).removeClass("add").addClass("remove");     //alert($(this).attr("class"));-->give the good class });  $(".remove").on('click', function() {     //doesn't work     $.post("/toto.com/remove.php", { trainning: this.id }, function() {});     $(this).html("add this stuff");     $(this).removeClass("remove").addClass("add"); });   The selector for the class remove doesn't recognize it whereas when I click on the button with the add class, the class is changing. Do you know what the problem is?  Thank you for your help!


I did a silly thing. I changed the permissions of my /etc folder using  sudo chmod -R ugo+rw /etc   After that I did some damage control using the command  pkexec chmod 755 /etc   Then I was able to the sudo commands but every time I use a sudo command a warning comes  sudo: /etc/sudoers.d is world writable   Is there a way to completely reset default permissions for /etc ?


Safari shows blue dot below Dock icon though it's not in process table

Summary:  Safari is running according to the Dock (icon has dot below it, and right-click shows "Force Quit"); however Activity Monitor doesn't show it and ps -ef | grep -i saf returns nothing.  Relaunching the Dock does nothing.  Safari won't open a window, nor will it quit.  Is there anything I can do to repair this short of restarting?    Full details:  I ran into a problem with Safari.  It froze.  So I tried Force Quit.  It seemed to work (blue dot below Dock icon disappeared).  I clicked the icon to restart Safari.  It bounced.  A couple minutes later, I noticed it still bouncing.  I right clicked and Force Quit again.  I clicked Safari and nothing happened.  The blue dot did not appear below the icon.  I right clicked and saw a "Force Quit" option — even though Safari was not running, and there was no blue dot.  I relaunched the Dock.  (Using TinkerTool's button for that purpose.)  The blue dot reappeared under the Safari icon, but clicking the icon didn't accomplish anything.  Right clicking still showed a "Force Quit" option.  I checked the process table and found four processes running with "Safari" in the command name:  $ ps -ef | grep Safari   501  1275     1   0 25Dec17 ??         4:53.91 /System/Library/PrivateFrameworks/SafariSafeBrowsing.framework/com.apple.Safari.SafeBrowsing.Service   501 68080     1   0  3Jan18 ??         0:00.98 /System/Library/PrivateFrameworks/SafariServices.framework/Versions/A/XPCServices/com.apple.SafariServices.xpc/Contents/MacOS/com.apple.SafariServices   501 75536     1   0  4Jan18 ??         0:04.11 /System/Library/PrivateFrameworks/SafariShared.framework/Versions/A/XPCServices/com.apple.Safari.History.xpc/Contents/MacOS/com.apple.Safari.History   501 84790     1   0  8Feb18 ??         0:00.24 /System/Library/PrivateFrameworks/SafariServices.framework/Versions/A/XPCServices/com.apple.SafariServices.xpc/Contents/MacOS/com.apple.SafariServices   501 56333   360   0  7:51PM ttys000    0:00.01 grep Safari   After some more icon clicking, Force Quit-ing and Dock relaunching, I opened Activity Monitor.  I found Safari didn't show in Activity Monitor when view was set to "windowed processes."  I set the view to "all processes" and searched for "saf" and found the same four processes above.  I force quit them with Activity Monitor.  The blue dot remained under the Safari icon on the Dock.  The "Force Quit" option still appears on right-clicking the icon.  Relaunching the Dock doesn't change this.  Clicking on the Safari dock icon doesn't cause it to bounce, nor does anything matching "safari" (case insensitive) appear in the process table.    How do I make the Dock aware that the Safari application is not running?  How can I kill Safari when it's already dead (and not even a zombie process)?  How can I get Safari to start up again?  I'm running Mac OS 10.11.6 and Safari 10.0.    Update: Opening '/Applications/Safari.app/Contents/MacOS/Safari' directly works, but it makes a NEW Dock icon that behaves normally.  The old one is still there.  So, looks like the problem is with a stale Dock icon.  How can I fix that?


How to install the OS with a new Hard drive?

I've just bought my first Mac, a Macbook pro(with an hdd), and I'm thinking in buying an ssd and replace the hdd. But the computer came with no dvd of the OS. I know that in the hdd there is a restore partition, but if I remove the hdd, how can I install the OS?


How to Find $$\zeta(4)=\sum_ {k=1}^{\infty}{\frac{1}{k^4}}$$ the most basic way possible?   I know it's $\pi^4/90$ but to arrive at this figure? Curious, because I need it to solve the integral $\int_{0}^{\infty}x^3\cdot(e^x-1)^{-1}\;dx$.


$C(K)$ is reflexive if and only if $K$ is finite

Let $C(K)$ be the set of all continuous complex valued functions on a compact Hausdorff space $K$. Is it true that $K$ must be finite if $C(K)$ is reflexive? To me it seems true, but I don't know how to prove it. As $C(K)$ is reflexive then we have canonical isometry onto $C(K)^{**}$. How does that help?


Which graphics cards are supported by the new AMDGPU driver in Ubuntu 16.04?

The new open source AMDGPU driver pre-installed in Ubuntu 16.04 should support all the "Volcanic Islands" cards out-of-the-box. This means that AMD Radeon R9 285, R9 380/380X and R9 Fury/FuryX graphics cards will be supported out-of-the-box if Ubuntu 16.04 LTS is installed.  However I read that the open source AMDGPU driver has an experimental support for the "Sea Islands" graphics cards (HD7790, R7 260, R9 290, R7 360, R9 390). Is this support enabled by default on Ubuntu 16.04, or will these graphics cards use the Radeon driver?  Thanks


Is there a canonic term for "the one whose birthday party is being celebrated"?

Something along the lines of 'hero of the occasion', but specifically for birthday? If there isn't, how would you otherwise say that?  ('the subject of birthday party', 'the hero of this birthday party', 'birthday's hero' all sound stupid somehow).


Why is it good practice to remove sheathing from NM wire when going through conduit?

I've been discussing specifics of an electrical job with a licensed electrician and he mentioned that in my area, it's acceptable/recommended to feed 12 gauge NM wire through an outdoor conduit but that the PVC sheathing SHOULD be removed if the wiring is going to travel through more than 6 feet of conduit.   This doesn't make sense to me. How/why would that be better than keeping sheathing on through the conduit run? Condensation?


How to Add Visibility Keyframe on Collection?

I have many animated objects with keyframes. I want to hide/ make visible all objects with one click or one keyframe? How I can do this? In previous versions, I could easily add a keyframe in outliner with shortcut key I but now I can't.


80s (or earlier) YA book: orphan, misfit boy discovers a Pygmy village, gets stabbed by a venomous rattlesnake fang in a trap

Looking for a YA fiction book about a boy who discovers an ancient archeological site, a Pygmy village. I feel like he was orphaned, or being fostered, and attending a new boarding school, where he didn't fit in well. He's befriended by one unusual boy, who notably collected  magazines. Toward the end, he gets stabbed in the finger by a "booby trap" of sorts, at the site - a rattlesnake fang, filled with venom. I read this back in middle school ('85-88), but never have been able to locate the title.


I want to format my Ubuntu and make it as no one used my computer before. Please do not tell me about Disks then format only a portion. Actually I want to format everything and start over again. Please help


How do I create a GUID in Python that is platform independent? I hear there is a method using ActivePython on Windows but it's Windows only because it uses COM. Is there a method using plain Python?


Finding maximum order of element of $A_{12}$ without brute force

I would like to solve this question. I think the answer is 35, but I do not know how to do it without extremely long analysis of possibilities.  Is there a short way to solve this problem? Maybe the fact that $A_{12}$ is simple helps?


Duplicate of this question, as it was not answered to satisfaction.   In virtually the exact same scenario as the original poster, Cholo, I am attempting a simple parameterised Delete statement.  string UIDcsv = "1, 2, 3, 4, 5, 6"; Console.WriteLine(UIDcsv);  var sqlite_DeleteEmployee = new SQLiteCommand(sqlite_Conn); sqlite_DeleteEmployee.CommandText = "DELETE FROM myTable WHERE UID IN (@x);"; sqlite_DeleteEmployee.Parameters.AddWithValue("@x", UIDcsv); sqlite_DeleteEmployee.Prepare(); sqlite_DeleteEmployee.ExecuteNonQuery();   Like Cholo found in the linked 'Accepted Answer', the code runs fine but does not actually execute this statement. This has been frustrating me all evening!  Now I've written this, I'm looking at rest of my code and realising that this C# Sql command generator is more than likely auto-appending quotation marks around @xyz in the command, turning the list of UIDs into a single string. How do I stop this happening?   Output of the WriteLine:  1, 2, 3, 4, 5, 6


What's with this weird design and stars coming out of my mouse pointer?

My Stack Overflow gives me a weird design and stars coming out of my mouse pointer. WTF? How do I get rid of them?


Ubuntu files on different drives and disk space requirements?

I have a SSD and a HDD on my system. I want to install Ubuntu on the SSD (dual boot with win10) and keep all other files, programs etc. on the HDD? How much disk space I need on the SSD and how can I achieve this?


Show That the Series $\frac{1}{n}+ \frac{1}{n+1} +\dots + \frac{1}{2n}$ Converges to a Number Between $\frac{1}{2}$ and $1$

$a_n = \frac{1}{n}+ \frac{1}{n+1} +\dots + \frac{1}{2n}$ converges to a number between $\frac{1}{2}$ and $1$. I know that it converges to Ln(2) but we still haven't learned about integrals in my class,  so calculating its limits kills the purpose of the exercise.  I've been trying for a while, I tried with this theorem that states that if $a_n \leq b_n$ for all n greater or equal to some N, then $\lim_{n\to\infty} a_n \leq \lim_{n\to\infty} b_n$  So my aproach was to find two sequences such that their limits are $\frac{1}{2}$ and $1$, I used these $\frac{n}{2n+1}$ and  $\frac{n}{n+1}$, the limit of the first one is $\frac{1}{2}$ and the limit of the second one  is $1$, and we have that  $$\frac{n}{2n+1} \leq \frac{1}{n}+ \frac{1}{n+1} +\dots + \frac{1}{2n} \leq \frac{n}{n+1}$$ for all $n \geq 6$, I've been trying to prove that with induction but I have been unable to do it. Is there any other way to prove that the limit is between $\frac{1}{2}$ and $1$?, or if someone could give me a hint with the induction proof, I would be very grateful.


How many integer solutions of $x_1$ + $x_2$ + $x_3$ + $x_4$ = 28 are there with  (a) 0 ≤ $x_i$ ≤ 12?  (b) −10 ≤ $x_i$ ≤ 20?  (c) 0 ≤ $x_i$, $x_1$ ≤ 6, $x_2$ ≤ 10, $x_3$ ≤ 15, $x_4$ ≤ 21?  I have tried.  a) To count the compliment value, so (31 choose 3) -  (15 choose 3)  b) Not quite sure where to begin  c) (31 choose 3)-(24 choose 3)-(18 choose 3)- (13 choose 3)- (9 choose 3)


Comments should only persist on questions / answers for 48 hours

OK, this is possibly a controversial suggestion, and I'm not entirely convinced by it myself, but I figure I'll put it out there to see what people think. If we take the standard description for what comments are for, :  Comments are temporary "Post-It" notes left on a question or answer. You should not expect them to be around forever: Once a clarification has been made, an edit added to the post to include new information, or the issue in the comment is otherwise resolved, it is subject to deletion. In reality, many obsolete or chatty comments remain untouched due to the high volume of comments posted, but this does not mean that they can't or shouldn't be deleted in the future. When should I comment? You should submit a comment if you want to: Request clarification from the author; Leave constructive criticism that guides the author in improving the post; Add relevant but minor or transient information to a post (e.g. a link to a related question, or an alert to the author that the question has been updated).  None of these reasons really necessitate a comment existing forever. Requesting clarification and leaving constructive criticism are useful to get the OP to improve their post. Which they may or may not do. And the ability to add relevant, but minor info such as links to other posts can be handled by the 'related questions' in the sidebar. People spend a lot of time concerned with comments.     I could go on. So is there really a reason they should stick around? I propose this idea for discussion: A comment will only be visible for 48 hours. After that point it will be deleted from view. That should be enough time for the OP to see it and act upon the suggestions in the comment. Any comedy comments would have been seen and everyone would have enjoyed them at a the time, but 48 hours is a long time in the digital world, and questions that old are basically consigned to the files where they're of most benefit to people searching via site search and Google, and these people don't really care about the comments - they're there to find the answer to the question they were searching for. (And if you think that, just because there are comments there that means people will actually read them then you're mistaken. ) I'm sure some people may say that there are sometimes useful links, comments, info posted in comments. So perhaps as a compromise we can keep comments persistent that recieved >5 votes. I don't know. But basically, binning off all the comments after 2 days would clean up the sites and potentially stop people being so precious about them and reinforce the idea that they are 'temporary Post-It notes'.


How to include javascript, which is dependent on an external library, to a page rendered by a custom module?

Edited  I want to draw an SVG circle on my page with . I have constructed a skeleton custom module and I am returning the following render array from src/Controller/MyModuleController.php:  namespace Drupal\my_module\Controller;  class MyModuleController {   public function myModule() {     return array(       '#markup' => '

',       '#attached' => array(         'library' =>  array(           'social_statistics/circle',         ),       ),     );   } }   In my libraries.yml (located in the root of my module folder) I have:  circle:   js:     circle.js: {}     dependencies:       - social_statistics/d3  d3:   remote: https://d3js.org   version: 4.x   license:     name: BSD     url: https://opensource.org/licenses/BSD-3-Clause     gpl-compatible: true   js:     https://d3js.org/d3.v4.min.js: { type: external, minified: true }     # d3.min.js: { minified: true }   In circle.js, (also located in the root of my module folder) I have:  d3.select("#data-vis")   .append("svg")   .append("circle")   .attr("cx", 30)   .attr("cy", 30)   .attr("r", 20);   I'm getting the below error in the console, which suggests circle.js is being loaded, but not the d3 library dependency?     Uncaught ReferenceError: d3 is not defined


How does electric field propogate in a wire?

When I say electric field, I'm referring to the electric field that causes the movement of charge in the wire.  I have learnt about currents and resistances, but I have never really had an understanding of how the voltage across a conductor actually causes current to flow.  Well there must be an electric field to cause the motion of the charges, and there must be some mechanism by which the electric field is set up in the wire.   It must be some sort of chain reaction, because we know that the electric field changes direction as the wire changes direction. And it must be quick as we know from practical experience.  So how is the electric field set up in the wire? Could it have something to do with instantaneous accumulation of charge?  p.s: I'm a highschool student and I'm only looking for an intuition.


tests:  1. 'Product: aab bbc; Product: xyz pqr; Junk1: jjkk jjuu; Junk2: nnnkk junk; Junk3: lkie rnier rae' 2. 'Product: Fuasdcsen' 3. 'Product: marlwaw Swwō' 4. 'Product: aab bbc abc xyz; Product: xyz pqr; Junk1: jjkk jjuu; Junk2: nnnkk junk; Junk3: lkie rnier rae'   output:  1. ['aab bbc', 'xyz pqr'] 2. ['Fuasdcsen'] 3. ['marlwaw Swwō'] 4. ['aab bbc abc xyz', 'xyz pqr']   I want list of only Product name. so, far i have came up with r'Product:\s*(.*)(?:;|$)' this regex but it only works with single Products(case 2 and 3). can somebody suggest general solution for all. I am trying to extract details between : and ;(if present).  In [10]: reg_str = 'Product: marlwaw Swwō xyz abc'  In [11]: re.findall(r'Product:\s*(.*)(?:;|$)', reg_str) Out[11]: ['marlwaw Swwō xyz abc']


Screen freezes when going full-screen mode - Ubuntu 16.04 LTS

Ubuntu 16.04 LTS running on i5 6200U and standard integrated intel graphics (driver=i915).  I use evince to view a document, I go full-screen, and sometimes (not always) the screen freezes, which means that I can move the mouse but nothing happens by clicking. I press Ctrl + Alt + F1 and reboot the computer from there.  I thought evince was the problem, but the same issue appears with qpdfview, and I guess with other applications as well.  $ ls /var/crash _usr_bin_evince.1000.crash   _usr_bin_evince.1000.uploaded _usr_bin_evince.1000.upload  _usr_lib_xorg_Xorg.0.crash   I saw many reports of this issue when googling, but most of them suggested that the problem has been sorted out in Ubuntu 16.04, and I could not find any relevant fix.  Any suggestions?  edit://  Solution:  Created a file named "20-modesetting.conf" under directory /usr/share/X11/xorg.conf.d with the following content:  Section "Device"    Identifier  "Intel Graphics"    Driver      "modesetting" EndSection


I am trying to install KVM on Ubuntu 16.04, but I am getting stuck at very beginning. I am unable to find the packages. Can someone help me? I did sudo apt-get update  sudo apt-get install qemu-kvm libvirt-bin  Reading package lists... Done Building dependency tree        Reading state information... Done Package libvirt-bin is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Unable to locate package qemu-kvm E: Package 'libvirt-bin' has no installation candidate


Command `/bin/sh -c ls -lh` doesn't show the output as a list

Running command /bin/sh -c ls, I see: > /bin/sh -c ls  20190816_212056.png                                                Opera_65.0.3467.78_Setup.exe  20190816_212219.png                                                Opera_66.0.3515.27_Setup.exe  20190816_212344.png                                                opera-stable_60.0.3255.95_amd64.rpm  20191112_134658.jpg                                                opera-stable_62.0.3331.99_amd64.rpm  20200201_175524.jpg                                                opera-stable_63.0.3368.107_amd64.rpm  20200201_175602.jpg                                                opera-stable_65.0.3467.48_amd64.rpm  When I run /bin/sh -c ls -lh, I see the exact same output as /bin/sh -c ls. The option -lh is not considered at all. Why is that? Am I missing something? Note /bin/sh is a symbolic link to bash: > ls -lh /bin/sh lrwxrwxrwx 1 root root 4 Sep 20  2019 /bin/sh -> bash


C# Set Windows Form to front but not give it focus

I'm trying to make a notification system using windows forms and when a new notification pops up, I want it to be in front of whatever the current window is but to not have focus. How can I do this?


I have property return variables and economic variables  in natural log form, which are non-stationary in level and stationary in first differences, but are not cointegrated. To my understanding, this rules out the use of the VECM, and so should I estimate the VAR in levels, first differences or something else? Thanks!


Is an arbitrary union of a chain of countable sets countable?

Let $C$ be a chain of countable sets, i.e. $\forall S, T \in C: S \subseteq T \lor T \subseteq S$, and that every $S \in C$ is countable. Then, is $\bigcup C := \{ t \mid \exists S \in C: t \in S\}$ countable?  The answer is no, and a counter-example is $C = \omega_1$, the first uncountable cardinal/ordinal. Is there a more elementary example that doesn't involve, say, cardinals and ordinals?


Proving the congruence $p^{q-1}+q^{p-1} \equiv 1 \pmod{pq}$

If $p$ and $q$ are distinct primes , prove that $$p^{q-1}+q^{p-1} \equiv 1 \pmod {pq}$$     Using Fermat's Theorem we can get $$p^{q-1} \equiv 1 \pmod q, \qquad q^{p-1} \equiv 1 \pmod p.$$  After that I have no idea at all. Can anyone help me please


i'm struggling hard to calculate the CDF in excel without using pre-built formulas.  I have Z score and need to compute CDF of standard Normal distribution.  Let's say i have column A with Z scores  -3 -2 -1 0 1 2  All i can get is non cumulative distribution using: =EXP(-1/2*(A2^2))/SQRT(2*PI())


Can I change which answer I chose to award the bounty to after I've done so?

I offered a bounty to a question and there is a good answer. If I give the bounty to that answer, could I change the bounty to another better answer within the seven days that the bounty is offered?


How to insert a line break in a SQL Server VARCHAR/NVARCHAR string

I didn't see any similar questions asked on this topic, and I had to research this for something I'm working on right now. Thought I would post the answer for it in case anyone else had the same question.


Why do higher level players move between each attack?

I always see players move between every attack, even if they are attacking a stationary target (for instance a tower) and there is no theat close that would make their current position worth changing?  I think this practice is called "kiting".  So why are they doing this, is there any advantage to modifying your position between every attack?


Keyboard-Only navigation between Full-Screen MS Remote Desktop remote system and local system

Using Microsoft Remote Desktop Client in Windows 7 in full screen, is there another way to switch from the remote machine (which captures all input from the keyboard) to the local machine, aside from using the keyboard combination for toggling full screen of the remote desktop session?


Using jq to extract values and format in CSV

I have the below JSON file:  { "data": [     {         "displayName": "First Name",         "rank": 1,         "value": "VALUE"     },     {         "displayName": "Last Name",         "rank": 2,         "value": "VALUE"     },     {         "displayName": "Position",         "rank": 3,         "value": "VALUE"     },     {         "displayName": "Company Name",         "rank": 4,         "value": "VALUE"     },     {         "displayName": "Country",         "rank": 5,         "value": "VALUE"     }, ] }   I would like to have a CSV file in this format:  First Name, Last Name, Position, Company Name, Country VALUE, VALUE, VALUE, VALUE, VALUE, VALUE   Is this possible by using only jq? I don't have any programming skills.


Uninstall Ubuntu from dual boot (separate drives) with Windows 10, fix Windows boot

I currently have a desktop computer with both Windows 10 and Ubuntu 16.04 on it. Windows 10 is on drive C: and Ubuntu is installed on a 100 GB partition on drive D:  I'm not happy with Ubuntu 16.04 on my desktop and have instead fully installed it on my laptop. So I am now looking at uninstalling it off the desktop computer.  However I am having issues doing this as I can't delete the Ubuntu GRUB boot and replace it with my the proper Windows one. I have tried repairing the Windows boot (through the bootrec /fixboot command and bootrec /fixMbr) but it doesn't seem to work and I feel it may be because Ubuntu is on a different drive so therefore so is GRUB.  Can anyone help or suggest how this can be fixed?


Will I get in trouble for sharing my bank account information with a sugar daddy?

A sugar daddy messaged me on Instagram. I was having a hard time so I responded, and he said he would send me money and didn’t expect anything in return.  He then he asked for my bank account info which I stupidly gave him, because I had no money in my account. He deposited 200$ and said I had to withdraw it. I tried a couple times and it didn’t work. Then I got locked out of my account. I blocked the guy because I found out he had transferred the money to some random person. I went to my bank to get my account unlocked. I was embarrassed and acted like I had no idea why I was locked out. They said I had to call fraud, so I did and they said I had to go to my bank and tell them what happened.  I’m terrified to tell them in person, but I have to to get my account back. Also I am 16. Will I get in trouble for accepting money from someone over age? Will they need my parents to come in?


Suggestions website for helping purchase products?

Is there a stackexchange site, or subsection on each site, dedicated to people who need to purchase something, but don't know the best option for their requirements?  I'm thinking of "I want to do a task using a cheap computer, requires living outside so must be waterproof and cannot be bigger than a lunchbox, looking for suggestions?"  Such a system could be used by people to be shown many options which may fit the requirement, each option being able to be up-voted just like the existing sites on stackexchange.  Note to downvoters: Please leave a message as to why. As mentioned in the comments (@Fish Below the ice) such an experiment is already happening with regards to software.


Differentiation of $\sin x$ using Pythagoras theorem:

So, I just tried using Pythagoras theorem to prove: $\frac{d}{dx}\sin x= \cos x$ but it got me nowhere. Here is my work. $$\sin x= p/h.$$; where p and h are lengths of perpendicular and hypotenuse in a right angled triangle. Differentiating w.r.t $x$, we get $$\frac{d}{dx}\sin x= \frac{1}{h^2} \left( h\frac{dp}{dx}-p\frac{dh}{dx}\right)\tag{i}$$ We know $h^2=p^2+b^2$. (Where b is the length of the base of the right angled triangle.) Differentiating w.r.t $x$, $$h\frac{dh}{dx}=p\frac{dp}{dx}$$ (If we put $b$ constant). Substituting in $(i)$, \begin{align} \frac{d}{dx} \sin x&= \frac{1}{h^2} \left(h\frac{dp}{dx}-\frac{p^2}{h}\frac{ dp}{dx}\right)\\        & = \frac{1}{ph^2} \left(b^2\frac{dp}{dx}\right) \tag{ii} \end{align} Now, I lost track here because I didn't know how is that equal to $\cos x$. Can anyone help me continue from here? (Note: I know how to derive this from first principle. I just wanted to try using Pythagoras theorem and trigonometric identities. I kept the base length constant because it appeared to me that if I changed the x, base length won't be effected. But as I can see in the answer, the hypotenuse remains constant. However, can we keep the base constant and end up getting the same result? Maybe not visualising a circle of radius h but just a right angled triangle whose base remains constant w.r.t the reference angle?  Ps: The called duplicate one is out of my understanding. I request a simpler version.


People of different ages who share the same birthday

I'd like to find a word to encompass multiple people who share the same birthday (but were not necessarily born in the same year):     Best wishes to my <birthday-sharing friends> for a wonderful day.


I ran a R console on our server, and the process took much longer time than I expected. Thus I was trying close it by ctrl+z, it didn't work. Finally I just closed the terminal. But the process is still there when I check with top commands. I used kill, but won't kill the process.  The top command output:   PID   USER     PR   NI  VIRT    RES    SHR  S  %CPU %MEM  TIME+ COMMAND      27448 zhenyang  20   0 20.133g 0.020t 3.840g R 100.0 21.3  72:00.06 R    I checked the website and someone says it might be ctrl+z put the process in background, but fg command won't work.   Anyone help?


Using RegEX To Prefix And Append In Notepad++

I have quite a large list of words in a txt file and I'm trying to do a regex find and replace in Notepad++. I need to add a string before each line and after each line.. So that:   wordone wordtwo wordthree   become   able:"wordone" able:"wordtwo" able:"wordthree"   How can I do this?


Given an $n\times n$ sized grid of dots $\forall n>2$, find the minimal value of segments needed to draw through all points, not holding off the hand.

Given is an $n\times n$ square of dots (so $3\times3$ is a $2 \times 2$ square, which means $9$ dots: corners of the squares).  What have I already achieved and proven?  Obviously for $n=1$: The answer is one: Through one point one line is enough and need to touch all points.  For $n=2$, the answer is three.  For $n=3$, it's not five, it's four as known in the popular problem:    Then I decided to check how we got here. I drew the setups for $n=4, 5, 6, 7, 8$ where the value of segments was equivalently $6, 8, 10, 12, 14$ using different strategies to connect the dots. I was stuck there for some hours, but in the end I proved with induction that for $n > 2$ the amount of segments possible is $2(n-1)$  You took the picture above ($^2$) and just continued the diagonal one more, and always added two more lines for one higher n:    Since we arrive in the relative the same position, any $n\times n$ dots grid can be filled with $2n - 2 = 2 (n-1)$ segments, without holding off the pencil. (We originally just draw spirals, which was $2n$, the we started to draw a kind of Z/snake figure which was $2n-1$ for all $n$)  What do I still have to do?  I proved that it's possible, but not that it's the minimum. If it's the minimum, how to prove that the amount of segments needed is actually minimal, and you can't go further? Is the formula below correct (which is simply my hypothesis)? Is the current formula showing the absolute minimum at all right now?  $$ \left\{\begin{array} \\ t_1 = 1 \\ t_2 = 3 \\ \forall n > 2, n \in \mathbb{N}: t_n = 2(n-1) \end{array}\right. $$  Because I have the feeling, that for, e.g. hundred times hundred square, the square will not consist of $2(100-1) = 198$ segments, but perhaps even 195?


In the below code,  function Stack() {     this.stac = new Array();     this.pop = function () {         return this.stac.pop();     }     this.push = function (item) {         this.stac.push(item);     } }   How to decide whether push and pop are instance members of Stack class (shown above) or members of Stack.prototype?


Can I boot a Live USB fully to RAM, allowing me to remove the disk?

I have a live USB made with the standard Ubuntu disk image creator for 16.04 LTS. In the current state, I can boot to this disk, but it still requires the original USB to run properly at all times.  Attempting to pull the drive and use the system generates a large amount of I/O errors, further suggesting that the USB drive is actually needed for things not already loaded into RAM (For example, Firefox worked without the USB, but I used it once before already. apt, on the other hand, did not.)  Is there a way to copy the entire Ubuntu live disk to RAM, so I can remove the drive and free up a USB slot for other things?


How to construct a cross-entropy loss for general regression targets?

It's common short-hand in neural networks literature to refer to categorical cross-entropy loss as simply "cross-entropy." However, this terminology is ambiguous because different probability distributions have different cross-entropy loss functions.  So, in general, how does one move from an assumed probability distribution for the target variable to defining a cross-entropy loss for your network? What does the function require as inputs? (For example, the categorical cross-entropy function for one-hot targets requires a one-hot binary vector and a probability vector as inputs.)  A good answer will discuss the general principles involved, as well as worked examples for   categorical cross-entropy loss for one-hot targets Gaussian-distributed target distribution and how how this reduces to usual MSE loss A less common example such as a gamma distributed target, or a heavy-tailed target Explain the relationship between minimizing cross entropy and maximizing log-likelihood.


The questions are: a) There are $5$ comic books, $3$ cooking books, $2$ grammar books. In how many ways can these books be arranged on a shelf if no two of the $3$ cooking books are together?   b) There are $5$ comic books, $3$ cooking books, $2$ grammar books. In how many ways can these books be arranged on a shelf if one of the grammar books is on the left of all cooking books, and the other grammar book is on the right of all cooking books.  For b) after calculation I got $5!\times2!\times10\times9\times8\times7\times6$. Did I solve it correctly?  For a) I'm kind of confused... Any help will be very much appreciated! Thanks


Best implementation for hashCode method for a collection

How do we decide on the best implementation of hashCode() method for a collection (assuming that equals method has been overridden correctly) ?


How to recover data from a faulty hard drive?

I have a HP laptop with windows 10 on it's hard disk. I clicked on a recently obtained file then:  # windows explorer got stuck  # tried opening task manager to kill windows explorer ; blue screen with qr code appears with message "your pc ran into an error..."  # laptop restarts with BIOS interface saying it can't find Bootable device  # pressed f2 from the displayed options to do a hard drive test ; no hard drive detected.  # removed battery and put it back after pressing the power button.  # a BIOS interface with CMOS battery reset prompt appeared ; PC went on and off.  # Restarts ; OS boots up and gets stuck at user sign in  # shuts down itself and permanently gets all looped between the BIOS interface saying it can't find Bootable device and me pressing the power button.  Here's what I tried:  # googling the problem; learnt the file I clicked on must have had a Trojan and probably deleted OS files even though I had an anti virus that kept mute as it occured.   # opened the device and plugged the hard disk to another machine via a hard drive case adaptor.  # saw my files but could not access my User folder due to permissions. I googled again ; changed  permission properties of the folder to SYSTEM but it failed after a while.  # tried a couple of times but failed ; the last trial had the other machine dieing due to low power  # I suppose the operation couldn't finish ; I got another machine again : this time only the recovery partition of the drive was accessible, the main partition only had its icon displayed with no usage/size tile next to it.  # clicked on it no response but a green loading bar at the top of the file explorer which took to long each time with a prompt suggesting I should format the drive.  # connected the hard disk via the adaptor to my PC externally(via its USB) ; goes on an off while trying to boot from the hard disk.  # Suddenly "fixing drive" appears automatically under the HP boot up icon ; PC looses power upon hard disk repair. battery fell off.  Connected the drive back. Now its not being detected at all, it's light doesn't blink at all but it shows up also it doesn't spin/make any vibrations. I tried connecting it to other machines the sound windows makes when a usb device is connected doesn't even come up. It's as if nothing is connected but the hard drive is on.  Please How do I fix this, I don't want to loose my data.


What books should I buy to play with an average D&D group?

I have already bought all three 4th edition Player's Handbooks, Dungeon Master's Guide, Monster Manual, dice, Dungeon Tiles, Plan escape tile map set, and several tubes of dice, but have recently learned that 4th edition isn't too popular with some subgroups of gamers. While the nearest game store is a state away (and thus will likely play online), I prefer having books to read in my spare time and want to one day join a physical group. My question is, what books I buy so that I could easily join an average group of Dungeons and Dragons players of with few problems and without me inconveniencing people too much?


Can the equation $\ln(x)+ 1- x^2=0$ be solved without the Lambert W function ? (I didn't study Lambert W yet).  By inspection I can see that $x=1$ is a solution. Are there other solutions? And is there a systematic way to find them?  Note: I asked  concerning $\ln(x)-1+x^2$, however, the answer there cannot be used for the function here.


#include <stdio.h>  typedef struct {     int a;     char c;     int d;   }t;   typedef struct  {       int a;       char c;       char d;       char e;       int f;   }t1;  int main() {     printf("sizeof t = %d", sizeof(t));     printf("sizeof t1 = %d", sizeof(t1)); }   Output:  sizeof t = 12 sizeof t = 12   Without using #pragma pack(), sizeof operator is returning same value for two different structure. Could you please explain?


How to read a line from the console in C?

What is the simplest way to read a full line in a C console program The text entered might have a variable length and we can't make any assumption about its content.


I am using qemu by compiling qemu.spec.  I often run the command 'rpmbuild -ba qemu.spec' because I am changing the source frequently, but it seems to take a long time to complete because of the test process.  Is there a way to disable the test process?


Clearing user data for Google Play Services

I am using Samsung Galaxy On7, Android 6.0.1.  My phone internal memory is quite small, 8GB. Moreover, apps like MS Word and Excel, which can be moved to sd card, come inbuilt, as a result of which I cannot move them to sd card. So, I clear user data for apps as much as possible, so that space can be freed up.  Now, I see that Google Play Services is using up 68MB of data. I want to clear this data, but as this is one of the basic apps on which the phone runs, I want to know what might be the ill consequences of clearing this data. Will apps no longer run or I'll face grave troubles if I clear this user data?


Let ABCD be a cyclic quadrilateral. The diagonals AC and BD meet at P, and DA and CB produced meet at Q. The midpoint of AB is E. Prove that if PQ is perpendicular to AC, then PE is perpendicular to BC.


How to retain ubuntu default terminal theme?

I love arc theme but it changes my terminal theme to a white one. I want the default theme of terminal that comes with fresh install.


How can I prove that $\operatorname{adj}(AB) = \operatorname{adj} B \operatorname{adj} A$, if $A$ and $B$ are any two $n\times n$-matrices. Here, $\operatorname{adj} A$ means the  of the matrix $A$.   I know how to prove it for non singular matrices, but I have no idea what to do in this case.


What should happen to a chat account after the parent account was deleted?

We have a few cases of chat accounts remaining without valid parent account:  and  for example. What should mods do when that happens:  delete the chat account notify the SE team so they can reattach or clean it up leave it as is: it's a normal situation


Why are the Davies-Meyer and Miyaguchi-Preneel constructions secure?

The Davies-Meyer compression function $h(H, m) = E_m(H) \oplus H$ is said to be secure.  So too is the Miyaguchi-Preneel compression function $h(H, m) = E_m(H) \oplus m \oplus H$.  Why are these secure?  How do we know that they are secure?  (Here $E$ is a block cipher with $n$-bit key and $n$-bit plaintext; $E_k(x)$ denotes encryption of plaintext $x$ under key $k$.  This question is based upon  by .)


Formated 2TB external harddrive by mistake

I formatted my 2TB external hard-drive thinking it was my memory stick. I lost everything, wedding photos, graduation...a lot of memories, nothing in the cloud.   I have tried a post on , which linked to , which is supposed to be "the best."   Sadly after the scan nothing got detected.  What Did I do / Additional Info?  The HD was formatted, on windows 10. Inside My Computer I right clicked and did a quick format. Which took about 10-seconds to wipe a decade of memories.   The HD was a Western Digital My Book 2TB.   Any help / advice appreciated.


case-insensitive alphabetical sorting of nested lists

i'm trying to sort this nested list by inner's list first element:  ak = [ ['a',1],['E',2],['C',13],['A',11],['b',9] ] ak.sort(cmp=lambda x, y: cmp(x[0], y[0])) for i in ak: {     print i }   by default python considers A > a, hence the output i get is:  ['A', 11] ['C', 13] ['E', 2] ['a', 1] ['b', 9]   i've tried converting all list values to even case during comparison by adding x[0].lower etc. but no use. How do i force python (i'm working on 2.4 version) to do case-insensitive alphabetical sorting?  Edited:     Jarret and Brian, your   assumptions about parenthesis were   right! I did forget to put them in! And Jarret, your suggestions about not using "cmp" works like a charm! Thanks a lot guys!


Please integrate $\frac{1}{\log(x)}$ and illustrate the steps of your method of integration. I have already tried integration by parts following the ILATE rule and otherwise. Eventually it forms a loop that takes me back to the direct or substituted term where I started the process of integration.


I have got a Task List. I want to give rights only one person, to create task. But if any of user choose this task, only he should edit this task. How should I do this. Manager could edit all tasks.


What is the difference between a battery and a charged capacitor?   I can see lot of similarities between capacitor and battery. In both these charges are separated and When not connected in a circuit both can have same Potential difference V.  The only difference is that battery runs for longer time but a capacitor discharges almost instantaneously. Why this difference? What is the exact cause for the difference in the discharge times?


Somebody explain Training, Testing and Validation Test of Artificial Neural Network

What is the procedure of Training, Testing and Validation Test? Explain it thoroughly. Or give some link for related articles


Show that the left ideal $(N_G) \subset F[G]$ is a simple submodule of $F[G]$, where $N_G = {\sum}_{g \in G} {g} \in F[G]$.

I am trying to solve this Representation Theory question:  Let $F$ be a field and $G$ a finite group. Let $N_G = {\sum}_{g \in G} {g} \in F[G]$. Show that the left ideal $(N_G) \subset F[G]$ is a simple submodule of $F[G]$.  Any help would be highly beneficial. Thanks :)


This question is inspired by .     Find all nonnegative integers $m$ and $n$ such that $m!+1=n^2$.   We know that $(m,n)=(4,5)$, $(m,n)=(5,11)$, and $(m,n)=(7,71)$ are solutions.  Are there more solutions?  Are there only finitely solutions?


resolv.conf not working properly with Ethernet in Ubuntu

I have a Lenovo X200 laptop on which I am running Ubuntu 9.10. Recently, (I assume after some updating, but I really don't know) my ethernet port stopped working under Linux. A more tech/linux-savvy friend of mine was able to temporarily fix the problem by manually editing the resolv.conf file with the DNS servers he found through his connection. However, after rebooting, the problem came back and now I am looking for a more permanent solution.


Are there any countable Hausdorff connected spaces?

Do countable Hausdorff connected topological spaces exist?


Automatically add id attributes to headers to enable link targeting

MediaWiki, the software used on Wikipedia, has some cool functionality as part of its header text syntax. It makes a  out of the text, and automatically adds that slug to the id attribute of the header tag.  Example:   It would be great if the header tags here (i.e. ###) did the same thing. Imagine - linking straight to the Copy Editor badge description in ! Or straight to Moderator in the !


if($_SERVER['REQUEST_METHOD'] == 'POST') {     $login = $_POST['login'];     $password = $_POST['password'];      //if(isset($login) && isset($password)) {     if((isset($login) && isset($password)) && preg_match('/^[a-z0-9\-\_]+$/i', $login)) {         if($result = $db->query("SELECT * FROM `users` WHERE `username`='{$login}'")) {             if($count = $result->num_rows) {                 while($row = $result->fetch_object()) {                     $user_name = $row->username;                     $user_password = $row->password;                      if(password_verify($password, $user_password)) {                         setcookie('u_log', $user_name);                         $_COOKIE['u_log'] = $user_name;                         setcookie('u_pass', $user_password);                         $_COOKIE['u_pass'] = $user_password;                          header("Location: /user/$user_name");                     } else { $error = 1; $err_message = 'Неверный логин или пароль.'; }                 }             } else { $error = 1; $err_message = 'Неверный логин или пароль.'; }         } else { $error = 1; $err_message = 'Неверный логин или пароль.'; }     } }   I'm aware I need to escape single and double quotes in user input but don't know if this fully safe solution as there some commands that can be executed anyway. Can somebody analyze my code and describe what I need to do here?  Slightly changed code in the almost top. Now it should be more secure?


Bash - How to vary positional parameters in a case statement depending on command line arguments?

tl;dr summary: In Bash, what is the best way to handle multiple command line arguments with varying positions depending on user input?   I have a script with multiple case statements to handle multiple arguments. However, the position of each argument may vary depending on user input. I have something like this:  case $1 in  -a)      this lists all package tracking info     ;; -u)     this lists only the most recent update     ;; -d)     this runs -u in a loop of intervals of n (secs, mins, or hours)     ;; ... esac  case $2 in -f)     this parses $file (default or user-defined)     ;;     ... esac   The tricky part here is that when the user passes the argument -d, they have the additional option of specifying a time interval for daemon() to run it's loop, such as -d 2h. I also want to give the user the ability to specify a file to parse (the -f flag). When the user specifies -d -f, there's no problem, but when they specify a time and a file, -d 2h -f file.txt, then $2 = 2h and$3 = -f causing -f to get interpreted as something else (a package tracking number) later on in the script.  So, I tried to use a conditional in between case statements 1 and 2 to change the $2 in the 2nd case statement. Something like:  if [[ "$2" =~ ^.[h,m,s] ]];      then          last_flag="/$3"      else          last_flag="/$2" fi  case $last_flag in -f)     check_flag     ;;  esac   But, this doesn't appear to work. when I enter -d 2h -f at the command line,echo $last_flag = $3 as expected, but $last_flag isn't being substituted in the case statement. I don't think the escaped $ is the problem, either (I tried it without that as well).   What am I doing wrong here? Is there a better way to handle multiple input arguments with varying positions in Bash?   I suppose the easiest thing would be to simply change the order of the flags, leaving -d at the end, so it doesn't matter whether the user specifies a time-interval or not. But, there are other circumstances in which input arguments would be shifted, such as if the user passes -f but doesn't supply a file name (in which case a default file is chosen). So, either way, I have to confront this problem. I suspect it will require a re-write of the general flow of the script, but perhaps not.


How do I stop a Java process gracefully in Linux and Windows?  When does Runtime.getRuntime().addShutdownHook get called, and when does it not?  What about finalizers, do they help here?  Can I send some sort of signal to a Java process from a shell?  I am looking for preferably portable solutions.


Is it "Does social media" or "Do social media"?

I am confused as to which way to say the following:  "Does social media benefit people?"  or  "Do social media benefit people?"


Is there any general statement about what kinds of problems can be solved more efficiently using a quantum computer?

Is there a general statement about what kinds of problems can be solved more efficiently using quantum computers (quantum gate model only)? Do the problems for which an algorithm is known today have a common property?  As far as i understand quantum computing helps with the hidden subgroup problem (Shor); Grover's algorithm helps speedup search problems. I have read that quantum algorithms can provide speed-up if you look for a 'global property' of  a function (Grover/Deutsch).   Is there a more concise and correct statement about where quantum computing can help?  Is it possible to give an explanation why quantum physics can help there (preferably something deeper that 'interference can be exploited')? And why it possibly will not help for other problems (e.g. for NP-complete problems)?   Are there relevant papers that discuss just that?  I had asked this question before over on  but it may be more suitable here.


If a balloon bursts, then how should I tell about it to another person right after this event occurred?     the balloon has burst the balloon had burst the balloon has been burst the balloon had been burst the balloon burst (simple past)


Let $X$ uncountable set and let $(X,τ_{cf})$ is a topological space such that $τ_{cf}$: I mean complement finite topology why this topological spaces isn't first countable space ?


Regular expressions inside Angular Validators

The following two regular expressions are valid ones:  Email validation [a-zA-Z0-9!#$%&'*+\/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$…-9])?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?   UK Post code validation ^([Bb][Ff][Pp][Oo] ?[0-9]{1,3})$|^(([Gg][Ii][Rr] 0…hJ-Yj-y][0-9]?[A-Za-z]) ?)))[0-9][A-Za-z]{2} ?))$   However, when putting them into Angular Reactive forms:  address: this.fb.group({                  previousPostCode: ["",                 [                     Validators.required,                     Validators.minLength(5),                     Validators.maxLength(8),                     Validators.pattern(/^([Bb][Ff][Pp][Oo] ?[0-9]{1,3})$|^(([Gg][Ii][Rr] 0…hJ-Yj-y][0-9]?[A-Za-z]) ?)))[0-9][A-Za-z]{2} ?))$/)                 ]             ], })   I am getting the following error: Error parsing regular expression: Invalid regular expression: /^([Bb][Ff][Pp][Oo] ?[0-9]{1,3})$|^(([Gg][Ii][Rr] 0…hJ-Yj-y][0-9]?[A-Za-z]) ?)))[0-9][A-Za-z]{2} ?))$/: Unmatched ')' . I am using VS 2017. Any idea? I am mainly interested in the post code validation.


So I'm a trusted user on . Suddenly I can't protect questions anymore? Bug?    I'm pretty sure this was working yesterday.


I currently have Ubuntu 12.04 but plan to upgrade to the newest version. I have an HP Pavilion a1310n that is about 10 years old. It runs fine and I am hoping to get the last year or two out of it. Does anyone know if I can get an HDMI interface card working with Ubuntu in this PC? What problems am I most likely to run into? I see there have been problems with sound. fyi, I also have a Windows PC and plan to use a KVM switch to connect to my acer H233H monitor, etc.


I have a page that's contents are loaded from another html file using: var url = 'url.to.page'  fetch(url).catch(error => console.log('Authorization failed : ' + error.message)); $('body').load(url + ' #page-cover, .pre-load, header, .container');   Inside those elements are many other elements with ids and classes already assigned. They all show up when I inspect the page, but I can't select any of them without receiving 'null'. I've tried using:   document.getElementById("element");  $('[id^="element"]');  $('#element');   I have bound the function that calls this to wait until .load() sends a trigger that it has finished. Am I missing something, or is there a different way that dynamic elements need to be selected?


How well do Canon EF lens adapters for Sony E-mount perform?

I have been looking into a potential adapter to use Canon EF lenses on the Sony α6000 and a Google search isn't giving a clear example of a quality adapter. I'm looking to use my husband's EF 24-70mm f/2.8 II and EF 70-200mm f/2.8 USM IS II on the Sony α6000.  The question is, has anybody used these adapters and do they hold up in quality?


windows virus on usb will run on ubuntu 16.04?

As the title suggest, is it really possible that a virus/malware/spyware or anything bad that will affect my pc, will be transferable and "AUTO-RUN" from a USB with files copied from a Windows OS(maybe infected/maybe not) to Ubuntu 16.04? As I was doing some reading here in the community, many amongst the users had concluded that there is no use for an AV in Ubuntu OS, hence I followed, since I am a new user and still studying/reading almost everything. Or will it require everytime the user password and "NO AUTOMATIC THINGS" will be installed in my Ubuntu PC" ?


Generate self signed SSL certificate for apache

I want to create self signed certificate for the website. The old certificate expired few days ago. There are more than one NameVirtualHosts hosted on systems. The commands I am using to create certificate are taken from one tutorial website and are:  openssl genrsa -des3 -out server.key 1024 openssl req -new -key server.key -out server.csr  cp server.key server.key.org openssl rsa -in server.key.org -out server.key openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt   After this in ssl.conf file I have specified under VirtualHost section along with old settings done by other admin  SSLEngine on SSLCertificateFile <full_path>/server.crt SSLCertificateKeyFile <full_path>/server.key   On starting the server I am getting following messages in log file and server fails to start.  In error_log file messages are   [Mon Jun 01 23:52:46 2009] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)   In ssl_error_log file messages are   [Mon Jun 01 23:52:46 2009] [error] Init: Private key not found  [Mon Jun 01 23:52:46 2009] [error] SSL Library Error: 218710120 error:0D094068:asn1 encoding routines:d2i_ASN1_SET:bad tag  [Mon Jun 01 23:52:46 2009] [error] SSL Library Error: 218529960 error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag  [Mon Jun 01 23:52:46 2009] [error] SSL Library Error: 218595386 error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error  [Mon Jun 01 23:52:46 2009] [error] SSL Library Error: 218734605 error:0D09A00D:asn1 encoding routines:d2i_PrivateKey:ASN1 lib   I would really appreciate if some one can explain how to solve this. I have tried a few other tutorial website on self signed SSL certificates but none of the steps they mention are working.


I keep getting this exception:  Exception in thread "Thread-1" java.lang.NullPointerException         at Info.<init>(Info.java:168)         at Rcon.data(Rcon.java:130)         at Rcon$1.run(Rcon.java:105)   Line 168 is at bot.redScore = Integer.parseInt(matcher.group(2));      else if(str.indexOf("current score") != -1) {         pattern = "Team \\\"(\\w+)\\\" current score \\\"(\\d+)\\\"";         p = Pattern.compile(pattern);         matcher = p.matcher(str);         if(matcher.find()) {             if(matcher.group(1).equalsIgnoreCase("Red")) {                 bot.redScore = Integer.parseInt(matcher.group(2));              }             else if(matcher.group(1).equalsIgnoreCase("Blue")) {                 bot.blueScore = Integer.parseInt(matcher.group(2));             }             cmd = "score";         }     }   I have no clue why I keep getting this error. The str that is being parsed using regex is:  Processing: Team "Red" current score "1" with "1" players   When I am running only this part by itself, it works fine. But when I am running the whole program I get this exception.  bot.blueScore and bot.redScore are being declared in another class as follows:  int redScore = 0; int blueScore = 0;   Also I have checked the contents of matcher.group(2), and it returns an integer, anywhere from 0 to 10. Any ideas? I have been struggling with this for hours now.  Thanks!


Phrase 'next December' means 'nearest December' or 'December of the next year'?

If somebody says 'Next December I'm gonna do something', and we have, let's say, April of 2016, does he mean December of 2016 or December of 2017?


So I working on a programming assignment that uses multiple algorithms to solve the floodit game. I have taken some of my data that I have collected thus far. I did a shapiro test:     shapiro.test(x[1:5000])     Shapiro-Wilk normality test     data:  x[1:5000]    W = 0.9806, p-value < 2.2e-16    To my understanding, I must reject the null hypothesis, which means my data is not normal. I then used the hist function in R:   Does this Hist show a normal distributed data? if so does that mean i reject my results from the shapiro test? and If so, why do reject the shapiro test?


How do I find the current machine's full hostname in C (hostname and domain information)?

In a C project (POSIX), how do I get the fully qualified name for the current system?  For example, I can get just the hostname of my machine by doing gethostname() from unistd.h. This might give me machine3 in return, but I'm actually looking for machine3.somedomain.com for example.  How do I go about getting this information? I do not want to use a call to system() to do this, if possible.


I'd like to insert the same table in my document multiple times, however I don't want different numbering or labels.


I have the code to graph a rational function f(x)=(3x^{2}+5x)/(2x-3) with a vertical asymptote and a slant asymptote. The equation for the vertical asymptote is x=3/2. I decided to have two parts to the domain: one on the interval [-15, 1.4] and one on the interval [1.6, 22]. f(1.4)=-64.4 and f(1.6)=78.4.  Near the vertical asymptote, the smallest and biggest the function gets is about -17 and 34.5, respectively.  I use the commands ymin=-23,ymax=40 and restrict y to domain=-23:40 though. Why isn't the graph drawn down to -23 and up to 40?  (I understand that part of the graph near 3/2 would be missing.)  Points on the graph are plotted with coordinates less than -17 or more than 35; these points are far from the vertical asymptote.  By the way, the command ymin=-23,ymax=40 instructs TikZ to only plot those points (on the graph of the rational function and the two lines) with coordinates between -23 and 40. Doesn't the command restrict y to domain=-23:40 do the same thing?  \documentclass{amsart} \usepackage{tikz} \usepackage{pgfplots} \pgfplotsset{compat=1.11}  \pgfkeys{/pgfplots/Axis Labels At Tip/.style={         xlabel style={at={(current axis.right of origin)},xshift=1.5ex,yshift=-1.5ex, anchor=center},         ylabel style={at={(current axis.above origin)},xshift=1.5ex,yshift=1.5ex, anchor=center}         }         }   \begin{document}   \begin{tikzpicture} \begin{axis}[width=7in,axis equal image,clip=false,     axis lines=middle,     xmin=-20,xmax=25,     domain=-20:25, samples=101,     xlabel=$x$,ylabel=$y$,     ymin=-23,ymax=40,     restrict y to domain=-23:40,     enlargelimits={abs=1cm},     axis line style={latex-latex},     ticklabel style={font=\tiny,fill=white}, %    xtick={\empty},ytick={\empty}     Axis Labels At Tip ] \addplot[samples=251,domain=-15:1.4] {(3*x^2+5*x)/(2*x-3)} node[left,pos=0.15]{$\scriptstyle{y}=\frac{3x^{2}+5x}{2x-3}$}; \addplot[samples=251,domain=1.6:22] {(3*x^2+5*x)/(2*x-3)}; \addplot [dashed, latex-latex,domain=-17:25] {(3/2)*x+5/2} node [pos=0.95, anchor=north, font=\footnotesize, sloped] {$y=\frac{3}{2}x+\frac{5}{2}$}; \addplot [dashed, latex-latex,domain=-23:40] (1.5,x) node [pos=0.05, anchor=north, font=\footnotesize, sloped] {$x=\frac{3}{2}$}; \end{axis} \end{tikzpicture}  \end{document}


What external flash can I buy for my Panasonic lumix DMC-FZ200 camera?

I never used external flash. Please tell me what to look for in an external flash for my Panasonic DMC-FZ200 camera.


How to find a point on a line at a given distance from a given point on the same line (given the equation of the line)?

You are given a point P(x,y) on a line of equation ax + by + c = 0. I want another point, Q(a,b) on the same line which is at a distance d from P. There will be two points. I want to find both and know which side of P each one lies.  There are related questions in this forum, but I didn't get what I am exactly looking for. Sorry for beating around the bush, and thanks for any help... Please give me an elaborate explanation. Thanks once again!!!


Is there a place where the different updates to StackExchange are documented?   I've found some annoucements in the blog and in different posts but I don't want to miss something important and so a condensed timeline or a log that has it all in the same place without too much chit-chat would be amazing. Iterations like adding chatrooms, badges, privileges, etc.


Is there a single word "synonym" for "synonym"?

It appears that there is not a single word that is the equivalent word for "synonym" in general usage. Is this the case?


No video driver with Ubuntu 14.04 LTS with Asus Eee PC x101ch

Driver is missing, it could be easily tell apart that the relevent Intel IGP accelerated driver is not loaded in that specific device because windows move choppily and YouTube playback is dropping frames 80% the time, I have a number of configurations none exhibit such.  Ubuntu 14.04 LTS in Live Trial running on a desktop Atom/Intel GMA; Xubuntu 13.10 running on that desktop; Xubuntu 13.10 running on a Pentium M/Intel GMA; Ubuntu 14.04 LTS in Live trial on that notebook; Xubuntu 13.10 on Asus Eee PC x101ch;  They all load up relevant Intel IGP driver and have smooth video, only Ubuntu 14.04 LTS Live or installed on Eee PC x101ch failed, so all I can figure so far is auto-detection is not working in this particular case, then if I am allowed to manually tune it up I have no idea where the relevant xorg.conf (or even the file itself) should be.


How to fetch serialized data from wordpress options

I have the following serialized data in a wp option a:2:{s:5:"Title";s:11:"your title";s:7:"Message";s:20:"Hola testing testing";}  I would like to return it to be used in a form, and show it also in the front end, I tried   <?php echo get_option('notice_data[Message]'); ?>   this is the array  $notice_data = array(     'Title' => '',     'Message' => '' ); add_option("notice_data", 'Default', '', 'yes');   I am creating a plugin that have a settings page with two forms that save the data in the wp option in order to be used by the jquery function inside a js file, here is part of the settings page;  <textarea name="notice_data[Title]" id="notice_data" /> <?php echo get_option('notice_data[Title]'); ?> </textarea>

 Body Message	  <textarea name="notice_data[Message]" id="notice_data" cols="40" rows="10" /> <?php echo get_option('notice_data[Message]'); ?> </textarea>   I am also localizing the script to fetch the data saved in the wp option to be used inside a jquery function that shows the messages when certain conditions are met, so how do I fetch the serialized data?


I'm trying to update MySQL to the latest version, actually I have the version 5.7, what I did is the following:  1. Downloaded the package:  wget https://repo.mysql.com//mysql-apt-config_0.8.10-1_all.deb sudo dpkg -i mysql-apt-config_0.8.10-1_all.deb   then I choosed this:    later I seelcted MySQL 8.0 and finally this:    2.Update  Then I run the following commands:  sudo apt-get update sudo apt-get install mysql-server   3. Version Checking:  So I checked the current version using apt policy mysql-server  and this return:    These are some logs during the update:    What I did wrong?  Output of cat /etc/apt/sources.list.d/mysql.list:  deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-apt-config deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-8.0 deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-tools #deb http://repo.mysql.com/apt/ubuntu/ bionic mysql-tools-preview deb-src http://repo.mysql.com/apt/ubuntu/ bionic mysql-8.0


Is "Black" correct, incorrect, or could it be used as either "Black" or "black"?

I was reading an article that I was assigned by my professor, and I came across the following:  “We’re the ones getting killed,” Los Angeles Clippers coach Doc Rivers, who is Black, said in an emotional postgame speech Tuesday night.  Is the usage of the capital B in "black" correct, is it incorrect, or does it fall into a completely different category altogether? Also, is it racist to say "black" with a capital B, but not for example, 'the white man' not using a capital W as I have seen in the past? And this is not a typo because it also turned up earlier in the article:  Taylor, a 26-year-old Black woman, was fatally shot when police officers burst into her Louisville, Kentucky apartment using a no- knock warrant during a narcotics investigation on March 13.  Here is a link to the article:


Why we say 'the mountains' with definite article

There are rules for zero/definite/indefinite article. And I don't get why we use 'the' with word 'mountains' in the next sentence: I like to spend holidays in the mountains. As for me the correct rule for this case is speaking about things in general, which states that we should use no article (zero article), like in 'I afraid of spiders.' So why we use 'the' + 'mountains' ?


What is a word for giving an answer that's not incorrect, but leaves out a bunch of information?

So in my story a girl is hitchhiking east to live with her boyfriend. One of the drivers she's hitching a ride with is asking her why she's going east.  "Willow decided she didn’t want to tell him that she was going to live with her dorky boyfriend, so she decided on something more ___ / she decided to give a more __ answer" 'Moving,' she answered tersely.  I'm thinking "general" or "vague", but I don't know if they're exactly describing what I'm looking for. I'm not 100% sure a phrase would work here, but I could always rework the sentence if it fits the best. I need an adjective.


How to bake to vertex colors in blender cycles?

The long way I do this is:   have cycles render selected   setup the materials of a mesh   create it's UV coordinates   create a new image and assign it to the mesh   bake   change from cycles to blender render   if in cycles you were using nodes for materials setup, disable it   setup the material as shadeless   go to the textures of the object and set the baked texture   go to object data->vertex colors and add a new one if there wasn't   go to bake options change bake mode to texture and bake to vertex color and finally bake it     This takes a lot of time to do and the final vertex colors bake will always have some vertex that are colored incorrectly because the UV projection was not perfect. Is there any way to bake in cycles directly to vertex colors?


How can travelling at light speed affect light itself?

~Hypothetical Scenario:  Your driving in a car (with the headlights on high beam) and you gradually get faster until you reach the speed of light.  Raised Assumptions:   You can see in and out of the car whilst moving at the speed of light. Ignore air resistance. Ignore all biological affects. The headlights on the car still work at the speed of light. Bystanders can see objects move at the speed of light. The car can physically make it to the speed of light.   Questions   Would the driver be able to see the high beam on in front of the car and be travelling twice as fast as the speed of light? Or will the photons produced pool up within the light bulb itself? Would there be no light produced even though the light bulb is on? If a bystander saw the car drive by would they see the light from the headlights?   Note: For those who think this is a duplicate question, I cannot find sufficient information from the previous not-so-related questions to get a full understanding.  Thankyou in advance.


Pulling variable from one method to use in another

I am currently trying to pull a string variable, tableChoice, from the determineTable method to use it in exactWordMatch.   My code:   public class DynamicQueryHandler {      static String tableChoice;      public static void determineTable() {          String[] choices = { "Customer", "Department", "Employee", "Vehicle", "Works In" };         String input = (String) JOptionPane.showInputDialog(null, "Choose the table to search from",                 "Dealership Database", JOptionPane.QUESTION_MESSAGE, null, choices, choices[0]);         if (input == choices[0])             tableChoice = "CUSTOMER";         if (input == choices[1])             tableChoice = "DEPARTMENT";         if (input == choices[2])             tableChoice = "EMPLOYEE";         if (input == choices[3])             tableChoice = "VEHICLE";         if (input == choices[4])             tableChoice = "WORKS_IN";     }      public static void exactWordMatch() throws SQLException {         DriverManager.registerDriver(new oracle.jdbc.OracleDriver());          String serverName = "server";         String portNumber = "port";         String sid = "sid";         String url = "url" + serverName + ":" + portNumber + ":" + sid;         String Result = "";         String Header = "test header";          Connection connection = DriverManager.getConnection(url, "user", "pass");         Statement statemet = connection.createStatement();         System.out.println(tableChoice);         ResultSet resultSet = statemet.executeQuery("SELECT * FROM " + tableChoice);         resultSet.close();         statemet.close();         connection.close();     } }   When I run the program, tableChoice is coming back as "null". I've tried making the determineTable function return the string tableChoice and that didn't work. I made the variable class-wide and that didn't work either. I'm not sure where to go from here.  I want it to return the name of my SQL tables, so I can use it for an SQL query.  Changing it to:   public class DynamicQueryHandler {      static String tableChoice;      public static void determineTable() {          String[] choices = { "Customer", "Department", "Employee", "Vehicle", "Works In" };         String input = (String) JOptionPane.showInputDialog(null, "Choose the table to search from",                 "Dealership Database", JOptionPane.QUESTION_MESSAGE, null, choices, choices[0]);         if (input.equals(choices[0]))             tableChoice = "CUSTOMER";         if (input.equals(choices[1]))             tableChoice = "DEPARTMENT";         if (input.equals(choices[2]))             tableChoice = "EMPLOYEE";         if (input.equals(choices[3]))             tableChoice = "VEHICLE";         if (input.equals(choices[4]))             tableChoice = "WORKS_IN";     }    Still makes tableChoice null when calling it from exactWordMatch()


Speed of light constant for all observers

General relativity has been proven many times over to be correct. In my meager understanding of things, they are all premised on the fact that the speed of light is constant to all observers. I would like a greater understanding of this phenomena. All explainations i have seen thus far (laser beam  bounce etc.) triumphantly show the end result and conveniently skip over the "innards". To help me understand the inner workings of light and time (gravity's another story) i have the following question.... if jack and jill are are the only objects in existance and jack accerates away his clock slows down. The only change in forces jack experiences are his own enertial changes and the effects of jills gravity. Assuming time is a measurement if atomic activity (is this a wrong assumption?), which of these two forces is slowing his clock?


This question  , with very detailed answers.  After reading those answers, I am left with one more question: what is color charge?  It has nothing to do with colored light, it's a property possessed by quarks and gluons in analogy to electric charge, relates to mediation of strong force through gluon exchange, has to be confined, is necessary for quarks to satisfy Heisenberg principle, and one of the answers provided a great colored Feynman diagram of its interaction, clearly detailing how gluon-exchane leads to the inter-nucleon force.  But what is it?  To see where I'm coming from, in Newton's equation for gravity, the "charge" is mass, and is always positive, hence the interaction between masses is always attractive. In electric fields the "charge" is electric charge, and is positive or negative. (++)=+, (--)=+, so like charges repel (+-)=(-+)=-, so opposite charges attract. In dipole fields, the "charge" is the dipole moment, which is a vector.  It interacts with other dipole moments through dot and cross products, resulting in attraction, repulsion, and torque. In General Relativity, the "charge" is the stress-energy tensor that induces a curved metric field, in turn felt by objects with stress-energy through a more complicated process.  So what is color charge?  The closest that I've gotten is describing it through quaternions ($\mbox{red}\to i$, $\mbox{blue}\to j$, $\mbox{green}\to-k$, $\mbox{white}\to1$  , "anti"s negative), but that leads to weird results that don't entirely make sense (to me), being non-abelian.  Since $SU(3)$ is implicated, what part of $SU(3)$ corresponds to, for instance, "red" or "antigreen"?  (Like "positive charge" is $+e$, "negative charge" is $-e$).  What is the mathematical interaction of red and antired (like positive and negative is $(+e)(-e)=-e^2$), and what happens when you apply that interaction to red and antiblue?  (Like how electric charges interact with magnetic dipoles through their relative velocities).  If I had to point to a thing on paper and say "this here represents the red color charge", what would that thing be?  Does such a thing even exist?  In short, what is color charge?  I've had abstract algebra and group theory and some intro courses on field theory and QED, but I don't know a lot of jargon, or really a lot of algebra.  Sorry the question's so long.  Thanks for the future clarification!


Integral Representation of Brownian Motion

B is a Brownian motion with values in $\mathbb{R}$. I have to find a process $(F_t)_{t\in[0,T]}$ such that $X=E[X]+\int_0^T F_s dB_s$, for $X=B_T$, $X=\int_0^T B_tdt$, $X=B^2_T$, $X=B^3_T$ and find a stochastic process $(F_t)_{t\in[0,T]}$ for the random variable $X=cos B_T$ such that the equation is hold.  I have already shown that $B^2_T=2\int_0^T B_sdB_s+T$. So i thought $F_s=2B_s$ might be a good choice for that case. For $X=B_T$ i took $F_s=1$. I determined $B_T^3$with Ito's Formula. My result was $B_T^3=3\int_0^T B_T^2 dB_T+3\int_0^T B_T ds$, but i cannot see how my $F$ looks like. Could you please help me with the rest?


Do I need a UK transit visa for traveling from denmark to Bangladesh via Heathrow Airport

I want to travel to Bangladesh from Denmark via Heathrow Airport, so do I need a transit visa from the UK? My onward flight from Heathrow Airport within 2 hours and same as when I will return to Denmark. I am a Bangladeshi National with having danish permanent residence permit and my wife with a dependent visa from Denmark. Do I need to get UK transit visa? or I am ok to fly without a transit visa? Thanks!


Prove that $(a + b + c)^{13}$ is divisible by $abc$ if $b|a^3$, $c|b^3$ and $a|c^3$.

From the Leningrad Mathematical Olympiads:     The natural numbers $a$, $b$ and $c$ have the property   that $a^3$ is divisible by $b$, $b^3$ is divisible by $c$ and $c^3$ is divisible by $a$. Prove that $(a + b + c)^{13}$ is   divisible by $abc$.   I thought about analyzing binomial expansion, but it's not being productive. I didn't find similar question in the search.


SQL Server stored procedure producing data related to months between two dates

I'm stuck on the following problem.  I have a start range date and end range date calculated by a query and I have three columns also produced by another query, the outcome of the last query is:  PRJ_ID | START_DATE | END_DATE   I want to produce an output using a stored procedure that considering all the months between start range date and end range date produces an output like this:  PRJ_ID | MONTHS1-YEAR | MONTHS2-YEAR | ... | MONTHSN-YEAR XXXX   | YES     | YES     | ... | NO   The yes or no is obtained checking if the current month is in between the start_date and end_date of the project (table obtained above).  I'm able to produce all the months between two dates with this code:  DECLARE @StartDate  DATETIME,         @EndDate    DATETIME;  SELECT   @StartDate = '20110501'                 ,@EndDate   = '20110801';  SELECT       DATENAME(MONTH, DATEADD(MONTH, x.number, @StartDate)) AS MonthName FROM         master.dbo.spt_values x WHERE        x.type = 'P'             AND x.number <= DATEDIFF(MONTH, @StartDate, @EndDate);   But I'm stuck on producing the last result.  Here is my try, but I'm getting an error on @prjdates format that is not datetime:  DECLARE @StartDate  DATETIME,         @EndDate    DATETIME,         @minStart    DATETIME,         @orig_estimated_MaxEnd    DATETIME,         @maxEnd    DATETIME,         @curr_planned_MaxEnd         DATETIME;   SELECT   @StartDate = '20110501'                 ,@EndDate   = '20150801';  SET @minStart = (SELECT MIN(start_date)                  FROM [PPM].[dbo].[prj_details]                  WHERE start_date IS NOT NULL                     AND start_date <> '1900-01-01') ;  SET @orig_estimated_MaxEnd = (SELECT MAX( DATEADD(day,orig_estimated_duration*7, start_date)) As FinishDate                               FROM [PPM].[dbo].[prj_details]                               WHERE start_date IS NOT NULL);  SET @curr_planned_MaxEnd = (SELECT MAX(curr_planned_LF)                             FROM [PPM].[dbo].[status_and_updates]                              WHERE curr_planned_LF IS NOT NULL);  SET @maxEnd = (SELECT                    CASE                        WHEN @orig_estimated_MaxEnd > @curr_planned_MaxEnd                          THEN @orig_estimated_MaxEnd                        ELSE @curr_planned_MaxEnd                     END AS MinValue);                  print @minStart; print @orig_estimated_MaxEnd; print @curr_planned_MaxEnd; print @maxEnd;  DECLARE @prjDates VARCHAR(MAX);  DECLARE @prjDatesTable TABLE (     [prjDate] DATETIME );  DECLARE  @from datetime, @to datetime;  SET @from = '20110501'; SET @to = '20150501';  ;WITH Numbers (Number) AS (     SELECT           row_number() over (order by object_id)     FROM          sys.all_objects) INSERT INTO @prjDatesTable      SELECT          dateadd(month, number, @from) AS months     FROM Numbers     WHERE number <= datediff(month, @from, @to);  SELECT @prjDates = COALESCE(@prjDates + '],[', '') +       (LEFT(CONVERT(VARCHAR, [prjDate], 101),6) + RIGHT(YEAR([prjDate]),2)) FROM @prjDatesTable ORDER BY [prjDate] DESC;  DECLARE @projects TABLE(PRJ_ID varchar(200),  START_DATE DATEtime, END_DATE datetime) INSERT INTO @projects      SELECT p.id,start_date,curr_planned_LF as END_DATE     from [PPM].[dbo].[prj_details]as p     left join [PPM].[dbo].[status_and_updates] as s      on p.id=s.id     where curr_planned_LF is not null      and start_date IS NOT NULL;  --select * from @projects; select * from     @projects pivot (   count(prj_id)   for start_date in  ([' + @prjDates + ']) ) piv;


Should be able to ssh from one VM to another or more other machines, but should not prompt for public key authentication.  How to cover the prompt in automation using a shell script.


What does the Heisenberg principle actually mean?

As far as I can understand, the Heisenberg principle limits the possibility of calculating the exact position and momentum of electrons, as the light we use to observe it changes it's velocity.   But isn't this just our inability to calculate the position and momentum? Doesn't an electron exactly exist at one place at a given time? So why the concept of "probability of finding an electron" or "electron clouds"? Doesn't the electron have a clear path around the nucleus every time similar to the Bohr model? Isn't it just that we do not know where or what that path is?  So what is the flaw in my argument? ('cause I know there has to be something,😀)


How to create table with multiple multirows and multi columns

I try to create a table like to one here:    I tried many options with \multirow and \multicolumn, however, after few hours I'm not even close to the final result.  Any ideas how could I achieve this?


Evaluate the sum $\sum ^{\infty}_{n=1} \frac{1}{n^2+a^4}$  I don't to know how to processed this problem. Can any one help with problem please. thanks


I purchased a 15 inch Unibody Macbook Pro today. I was wondering if I can do a harddrive upgrade up to 1TB or 2TB on it. I need that space because I want to store all my junk on it.  What is the maximum capacity I can upgrade the hard drive to? If so, where can I find those hard drives?


this problem occurred before and somehow got fixed automatically.No partition is mounting. I have ubuntu16.04 dual boot with windows 8.1


print in awk works as a command, but not in .bashrc

I am running the command online | awk '{$2=$3=$4=$5=$6=$7=$8=$10=$11=$12=""; print $0}' and this command is working perfectly when I run it in the command line.  However, when I add it to my .bashrc file as an alias running the exact same command, upon reloading my .bashrc, I get the output:   If 'print' is not a typo you can run the following command to lookup the package that contains the binary:     command-not-found print -bash: print: command not found  I would really like to use an alias for this command instead of running that long line every time.  Any help would be appreciated.  I have tried changing the print in the .bashrc to echo and printf but those changes do not fix the problem.  EDIT:  this is the corresponding line in my .bashrc: alias online="ps aux | grep -i -E "(rename|StrictHost)" | grep -v "grep" | sort -k9 -n | awk '{$2=$3=$4=$5=$6=$7=$8=$10=$11=$12=""; print $0}'"


Associate a File Type with a Specific Program

How do you associate a specific file type to an application on a Windows (Vista) PC?


NullReferenceException: Object reference not set to an instance of an object on boolean variable from separate class

I'm trying to develop game scenario that able to trigger the alarm with alarm light and siren audio to play. For the testing purpose I set it that to boolean value as "alarmOn" in AlarmLight class.   **AlarmLight.cs** public class AlarmLight : MonoBehaviour {  public float fadeSpeed = 2f; public float highIntensity = 2f; public float lowIntensity = 0.5f; public float changeMargin = 0.2f; public bool alarmOn = false;  private float targetIntensity; public Light light;   //add alarm lights // tag as siren void Awake() {     light.intensity = 0f;     targetIntensity = highIntensity; }  void Update() {     if (alarmOn==true)     {         light.intensity = Mathf.Lerp(light.intensity, targetIntensity,fadeSpeed * Time.deltaTime);         ChecktargetIntensity();     }     else     {         light.intensity = Mathf.Lerp(light.intensity, 0f, fadeSpeed * Time.deltaTime);      }  }  void ChecktargetIntensity() {     if (Mathf.Abs(targetIntensity - light.intensity) < changeMargin)     {         if (targetIntensity==highIntensity)         {             targetIntensity = lowIntensity;         }         else         {             targetIntensity = highIntensity;         }     } }   }  Then I  tried to access that value with LastPlayerSight class and for the testing purpose i was trying to return false as below.  alarm.alarmOn = (playerPosition != resetPlayerPosition);   Then I tried to play my scene, and I got the error which is the problem with above line of code.    This is my LastPlayerSight.cs class  public class LastPlayerSight : MonoBehaviour {  public Vector3 playerPosition = new Vector3(1000f, 1000f, 1000f); public Vector3 resetPlayerPosition = new Vector3(1000f, 1000f, 1000f);  public float lightHighIntensity = 0.25f; public float lightLowIntensity = 0f; public float fadeSpeed =7f;  public float musicFadeSpeed = 1f;  //directional alarmlight ref private AlarmLight alarm;  //main directional light ref private Light mainLight;  private AudioSource panicAudio;  //siren audio private AudioSource[] sirens;  void Awake() {     alarm = GameObject.FindGameObjectWithTag(Tags.alarms).GetComponent<AlarmLight>();     mainLight = GameObject.FindGameObjectWithTag(Tags.mainLight).GetComponent<Light>();      GameObject[] sirenAttachedGameObjects = GameObject.FindGameObjectsWithTag(Tags.siren);     sirens = new AudioSource[sirenAttachedGameObjects.Length];        for(int i = 0; i<sirens.Length; i++)     {         sirens[i] = sirenAttachedGameObjects[i].GetComponent<AudioSource>();     } }  void Update() {     SwitchAlarms();     MusicFading(); }  void SwitchAlarms() {     alarm.alarmOn = (playerPosition != resetPlayerPosition);      float newIntensity;      if(playerPosition != resetPlayerPosition)     {         newIntensity = lightLowIntensity;     }     else     {         newIntensity = lightHighIntensity;     }      mainLight.intensity = Mathf.Lerp(mainLight.intensity, newIntensity,fadeSpeed*Time.deltaTime);      for (int i = 0; i < sirens.Length; i++)     {         if (playerPosition != resetPlayerPosition)         {             sirens[i].Play();         }         else         {             sirens[i].Stop();         }     } }  void MusicFading() {    //AudioSource audioTemp = audio.GetComponent<AudioSource>();      if (playerPosition != resetPlayerPosition)     {         //audio.GetComponent<AudioSource>().volume = Mathf.Lerp(audio.volume, 0f, musicFadeSpeed * Time.deltaTime);          panicAudio.volume = Mathf.Lerp(panicAudio.volume, 0.8f, musicFadeSpeed * Time.deltaTime);      }     else     {         panicAudio.volume = Mathf.Lerp(panicAudio.volume, 0.0f, musicFadeSpeed * Time.deltaTime);      } }   }  I'm beginner of developing such things and can anyone guide me to correct the problem?


I recently tried to recompile my thesis that I wrote 5 years ago, but my figures and some biblatex prevent it. Here is an MWE for one of them:  \documentclass{standalone} \usepackage{tikz,ifthen,xcomment,amsmath,amsfonts} \usetikzlibrary{decorations.pathmorphing,decorations.pathreplacing,arrows,automata,patterns,positioning} \newcommand{\NN}{\mathbb{N}} \begin{document}  \begin{align*}      Y &= X\\  X &= \left\{    \tikz[scale=0.3,baseline={([yshift=-3pt]current bounding box.center)}]{     \draw[color=gray!30,fill=green](0,0) rectangle +(1,1);    },  \right\}\cup\bigcup_{n\in\NN}\left\{  \tikz[scale=0.3,baseline={([yshift=1pt]current bounding box.center)}]{   \draw[color=gray!30,fill=green] (0,0) rectangle (1,1);   \draw[decorate,decoration={brace}] (4,0) -- (1,0) node[midway,below=2pt] {$n$};   },  \right\}  \end{align*}  \end{document}   The error I get is the following:  ! Missing \endgroup inserted. <inserted text>                  \endgroup  l.18  \end{align*}   I managed to make a lot of other figures compile by adding [tikz] to the standalone class, but for this one which is sort of a hybrid it does not work.  Lastly, my version of texlive is 2017 and I'm pretty sure things were ok with 2015.


Activity button in user profiles hidden or blocked by large hats

When users wear a large hat above the border of their profile picture, it sometimes hides the Activity tab button, which makes it impossible to visit their profile activity page directly. Here are a couple of example using my own profile:   In the example on the left, the "Activity" button is completely hidden, and cannot be clicked. In the example on the right, the "Activity" button is still partially visible, but it's impossible to click it. When I visit other people's profiles wearing such hats, I can't go to their activity page directly. I have to use some alternative link (such as the links to view all the questions or answers).


I have read many places that the access token session length is controlled by the client application and will expire "from time to time", but I cannot find a way for my application to calculate the expiration date/time.  I have used other non-Salesforce systems and they pass along an expires_in value to help determine the expiration.  Salesforce does pass along an issued_at value, which doesn't help me much.  Is there a way to determine when the access token will expire, or is it only based on trial and error?


What is the due process for the appeal of moderator actions on the stack exchange network?

In the U.S. at least, due process is considered a right that is so important that it is guaranteed by the Bill of Rights.      Due process balances the power of law of the land and protects the individual person from it. When a government harms a person without following the exact course of the law, this constitutes a due process violation, which offends the rule of law.   -Wikipedia  It is important that the Stack Exchange network ensure that there is a due process for appealing all moderator actions on every Stack Exchange site. The federal powers of the SEN reign supreme over the individuals statehoods of the individual SE sites. The SEN must enable due process to appeal the unfair timed bans on individual SE sites because an appeal is not possible when a person is banned. There is no way for a banned user to post a meta question or to request an appeal in any way on the site that banned him.  Due Process is not something limited to huge governments, nations, or courtrooms. It is what is simply the standardization of a system of conflict resolution. This standardization helps to prevent abuse by individuals entrusted with authority.  You have heard the saying 'power corrupts--absolute power corrupts absolutely.' People who enjoy abusing other people tend to seek out positions of authority. No, we cannot legislate morality, but in the immortal words of Martin Luther King, “Morality cannot be legislated, but behavior can be regulated. Judicial decrees may not change the heart, but they can restrain the heartless.”      The utility of internal organizational systems of conflict resolution, or “due process,” rests on the formulation of specific objectives and values, a high degree of decision-maker independence, balanced formality of procedures, and matching types of conflict with means of resolution.    Please incorporate this new feature. Do it for MLK. Do it for the dream.


Which type of data are answers to this question, and which test should I use?

Which type of data are answers to this scale?  How is your sleep quality?   Very bad     -    Very good   1, 2, 3, 4, 5, 6, 7  Would answers to this question be ordinal / nominal / interval / or ratio data?   If I want to test the statistical difference in the means for paired samples before and after taking a medicine that is supposed to improve sleep quality, should I use paired samples t-test or Wilcoxon Signed-Ranks Test?    Thanks!


How can we measure that in a given period, what window was on the top? (active one)  I already tried based on "wmctrl", but I can't show the currently active window.. in the second example I tried with ":ACTIVE:", it showed ALL again, but only the terminal was the active then..  $ wmctrl -l | awk '$2 != "-1"' 0x044006a3  8 notebook Mozilla Firefox 0x0456fb4c  0 notebook How to measure that how much time is the active window opened? - Unix & Linux Stack Exchange - Mozilla Firefox 0x03000004  0 notebook Terminal $  $ wmctrl -l :ACTIVE: | awk '$2 != "-1"' 0x044006a3  8 notebook Mozilla Firefox 0x0456fb4c  0 notebook How to measure that how much time is the active window opened? - Unix & Linux Stack Exchange - Mozilla Firefox 0x03000004  0 notebook Terminal $    Purpose: The output would be something like this (from an example 8 hour shift, so 480 minutes):   MINUTE  TASK 195 Mozilla Firefox 165 Terminal 74  Thunderbird 36  Idle (was away, machine locked, no app was on top..) 10  Unknown (the machine wasn't powered on)   With the awk '$2 != "-1"' I just excluded the "Bottom Expanded Edge Panel".   Question: I only need the part that how can I show the currently active window. I can do the part where I run a script in ex.: every 10 seconds and gather the time information.   p.s.: I'm using Ubuntu 12.04 or CentOS 6 both with GNOME.


I've made a texture that contains dots I'd like to use as a puddle texture on a sidewalk. One thing I've noticed is that if you look at the puddles closest to the camera, you can clearly see the low-resolution:    Is there a node or node setup I could make that would allow me to blur this texture? Or, more specifically, the alpha of the texture? The puddles image is Black and white, and I have the alpha of that image feed as a factor into my node composition:    I'd prefer not to have to do this in an external program, because I have 399 images that I am going to put into an image sequence for this node.


Analytic function with only one fixed point in the unit disk.

Let $f(z)$ be analytic on $|z|\le 1$ and satisfy $|f(z)|<1$ if $|z|=1$. Show that $f$ has a unique fixed point on $|z|<1$, namely a unique point $z_0$ in the disk $|z|<1$ such that $f(z_0)=z_0$.     My solution:  Since $f$ is an analytic, hence continuous function from the closed disk to itself (), then $f$ has at least one fixed point according to the . Now it leaves us to check that there is only one fixed point.  Whereas, we have known that  contradicting the condition that $|f(z)|<1$ if $|z|=1$. And we are done.    My question is, can we avoid the Brouwer fixed-point theorem here? Thank you.


How do I include eps files using TexWorks

I am trying to add some EPS  files in text but I got the following error message  ! LaTeX Error: Unknown graphics extension: .eps.   Does anyone knows how to fix it?  I installed MikTex 2.9


if $f(x)$ is summable square function, then...

I have a question. If a normed function, that is to say  $$ \int_{-\infty}^{\infty}|f(x)|^2dx<\infty~~~\text{(summable square function)}$$  then,   $$\underset{\begin{array}{c} x\rightarrow+\infty\\ x\rightarrow-\infty \end{array}}{lim}f(x)=0$$  It is true, why?  thanks


How can I find all the combinations of elements in a set of arrays?

I'm simplifying a larger complex problem with the following...  Given three arrays of integers, what's the most efficient way to return all the possible combinations of each of the elements? Note that each value from each array will always be given in the same position so [A,B,C] would be the same as [C,B,A]. My desired result is an array of arrays with each hash containing a single combination. For example:  Given:  var array1 = [1,2] var array2 = [a,b] var array3 = [foo,bar]   The result would be:  [   [1,a,foo],   [2,a,foo],   [1,b,foo],   [2,b,foo],   [1,a,bar],   [2,a,bar],   [1,b,bar],   [2,b,bar] ]