I installed Ubuntu on a 2008 MacBook Pro yesterday and can't get any display or x server booted. I can boot from the CD into rescue mode, so I can see that:    The syslog has an error, GdmLocalDisplayFactory: maximum number of X display failures reached: check X server log for errors In /var/log/Xorg.1.log (and the other Xorg logs) I see "Fatal server error: [27.266] (EE) no screens found(EE)"  Earlier in the log out also says "screen 0 deleted because of no matching config section." several times. It also says "Screen(s) found, but none have a usable configuration."    I'm guessing there's a ... screen configuration issue? But I don't know where to start troubleshooting it.  Note: I did discover  which I walked through, but holding down right-shift doesn't do anything. It just lands me in a silver screen (light grey, I guess) with an arrow cursor and nothing else.   I can boot to rescue mode from the CD,

I know that editing the boot options line and adding 'nomodeset' solves the problem of my laptop during LiveCD mode, what I don't know is how to set it at boot up through Grub2 after I've installed Ubuntu.  So, my question is; how do I set nomodeset before I boot into Ubuntu?


I've installed the Ubuntu Artful (17.10) --- ubuntu-17.10.1-server-amd64.iso on my X86 server.  Now I need the desktop environment so I try to install the desktop:  apt update && apt install ubuntu-desktop && reboot   However, I get an interface as below:   In fact, it seems to work. I think this is the login interface... Besides, when I get such an interface, I have been able to ssh on the server, which means that the system has booted successfully.  How to fix this issue? I executed the same commands as above to install the desktop for Ubuntu 16.04 and it worked.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I recently added an alias to my .bash_aliases file:   alias runhole="perfect && cd data_series_test && doa=$(ls -1 | wc -l) && a=$(expr $doa / 2 ) && perfect && cd data_series_train && dob=$(ls -1 | wc -l) && b=$(expr $dob / 2 ) && perfect && python3 train.py > results_$b'_'$a"   and now when I open my terminal I have the error echoed twice:  expr: syntax error: unexpected argument ‘2’ expr: syntax error: unexpected argument ‘2’   I wanted to output a file called results_a_b where a and b are values defined in counting the files in folders defined in the alias, but instead the command outputs results__

I've created a command to count the number of sessions each user on our server has. It is:  who | awk '{ print $1}' | sort | uniq -c | sort   which works fine, but when I move this into an alias on the server I'm only get the return of who,  alias who_con="who | awk '{ print $1}' | sort | uniq -c | sort";   I thought it might have been the double quotes so I tried single quotes for the encapsulation but I have the same behavior,  alias who_con='who | awk "{ print $1}" | sort | uniq -c | sort';


I am confused with access specifiers in Java.. I have a code with 2 different packages in Java.. But it displays an error every time I run it.. Here's is the code for the class which is calling the class using import from another package..   package p2;  import p1.Testing;  class Pqr extends Testing{ // extending the class      void hey(){         System.out.println("Something");     } }  class Xyz{     public static void main(String args[]){     Pqr t1 = new Pqr(); // Class from another package.     System.out.println(t1.find("Mississippi","p"));     t1.hey();     } }   Code for class which is being subclassed from package p1..  package p1; class Testing{     protected static boolean find(String a,String b){ // Protected specifier         boolean ans = false;         for(int i=0;i<a.length();i++){             String m = a.charAt(i) + "";             if( m.equals(b)){                 ans = true;             }         }          return ans; }      public static void main(String args[]){      // Main Class      }  }   But when I run the code i get an error "Testing is not public in p1; cannot be accessed from outside package"..  I learned in this thread that we can use protected method between different packages but by extending it by another class..   Thanks in advance.

In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?


On all questions  (at least on SO and MSE), I'm no longer seeing badge counts or reputation numbers on user badges on posts (both answers and questions):    Is this intended? Part of testing going on? Or just a bug?

I cannot see reputation of any questioner or answerer on their user cards, but editors' rep & badges are still shown. Questions tab with any filter(new, active) is unaffected. Mobile sites are unaffected. It appears to be a network-wide issue.     New contributor banner expands.


I'd like to remove from a given column ($2 in the example) the duplicate fields (comma separated).  Input file:   A    1,2,3,4    B    4,5,6,3 C    2,15   Expected output:  A    1,2,3,4 B    5,6 C    15

I'd like to remove from a given column ($2 in the example) the duplicate fields (comma separated), but only if the ID column ($1 in the example) is the same.  Input:  A    1,2,3,4 A    8,9,10,11 A    2,3,4,11,12 B    4,5,6,7 B    6,8,9,10   Expected output:   A    1,2,3,4 A    8,9,10,11 A    12 B    4,5,6,7 B    8,9,10


I recently installed Ubuntu 18.04 and realized that when I click the poweroff button (most upper right) there is no option for sleep/suspend? I only have restart and poweroff (and cancal) options. In 16.04 that I have in my laptop I have also suspend option.

In 17.04 I could suspend\hibernate from the power off menu button.  I can't find how to do this in Ubuntu 17.10 GNOME Shell.


I recently bought a medical marijuana stock at its lowest point.  It  is estimated that it will reach a high price by 2023.   How can I know for sure when to sell out?

I’m buying diverse sized stocks for growth (aka, I don’t want a short-term return, if not, keep them for a while).  I would like some advice in relation to when I should sell a stock.  I read several posts however I did not find valuable advice. Most of them  say that I should sell once it reaches a loss of between 10% and 20%. But, if we check, for example...  Apple (market value)   It lost 15% of its value the last month  It lost 10% of its value the last year  It increased 90% of its value the last 5 years   Everything is timing and I do understand that. However, Let's say that I bought Apple stocks 2 months ago. At present I have a lost of aprox 15%, but, probably Apple will recover. In this case, when would "be logic" to sell...?  Now, other example: smaller cap and more riskier   CVRS: Corindus Vascular Robotics   It lost 7% today It lost 7% last week It increased 9% the last month It increased 220% the last year It lost 24% the last 5 years   Here he fluctuations are more marked and so the possible trust of growth of even recover.  In this case, when would be "logic" to sell...?


My blender system tab shows CAICOS in compute drop down...when i render with graphics processing unit compute.my render screen. is blank.but with CPU its rendering.I do not n have any error messages in console window.I have ATI 6490m graphics card with memory 1gb

So I don't have an option to turn on GPU rendering in settings. I only have the option for CPU rendering. Here's my specs:   ATI Radeon HD 7770 1GB  GDDR5 1GH AMD Phenom II 4x 960T 3GHz 4Gb DDR3 1600MHz RAM   My GPU driver is version 13.9. I see people running fine with this GPU, but for some reason I don't have an option to turn it on.  I need to deliver my design tomorrow so I need this fast and CPU just can't render it that fast.  I'm running Blender 2.69 on Windows 8.1.


Can I get my Minecraft Bedrock Edition worlds onto my PC to play in regular Minecraft? If so how? I have used iExplorer to transfer files from my iPad but that was no help. Any suggestions?

My son has been playing Minecraft on our home computer for a couple of years now.  He just got an iPad Mini 2 for his birthday. Is it possible to transfer his game and his saves onto his iPad Mini 2?


I am hoping those with more experience in number theory than me can help me out on this question.  After learning that $\gcd(a^m - 1, a^n - 1) = a^{\gcd(m, n)} - 1$, I questioned what is $\gcd(a^m + 1, a^n + 1)$ ($m$ not equal to $n$).  I assumed WLOG that $m > n$ and then used the Euclidean Algorithm to get $\gcd(a^m + 1, a^n + 1) = \gcd(a^{m-n} - 1, a^n + 1)$. However, I am now stuck.  Please explain if the parity of $x$ and $y$ matter.  QUESTION: Calculate $\gcd(a^x + 1, a^y + 1)$

Let $p$ be a prime number and $n, m$ positive integers. I want to find    $\gcd(p^n+1, p^m+1)$  $\gcd(p^n-1, p^m+1)$   I know that  $$\gcd(p^n-1, p^m-1)=p^{\gcd(n,m)}-1,$$ and it seems that if I can solve the first one, then the second one can be solved too, since (assume that $n>m$) $$\gcd(p^n+1, p^m+1)=\gcd(p^n-p^m, p^m+1)=\gcd(p^m(p^{n-m}-1), p^m+1).$$  At last I have  $$\gcd(p^n+1, p^m+1)=\gcd(p^{n-m}-1, p^m+1).$$  So, my problem is     Find $\gcd(p^n-1, p^m+1)$.   It seems to me that it should have some formula which appears in some where, but I can't remember it.


Haven't found answer to this question, but I'm probably not looking in the right place.  Scenario:   Question is asked 2 Answers are posted Question is marked: "on-hold"   Can the OP accept one of the already-submitted answers?

Questions can be closed or marked as duplicates.  What does it mean for a question to be "closed"? What does it mean for a question to be marked as a "duplicate"? Who can close a question? What are the reasons for closing a question ? Is closure the end of the road for a question? When are closed questions eligible for deletion?   Related        For more information, see "" in the .


I would like to know a software which helps in post-production to calculate the general color/tone difference of 2 images. The images contain the same object, but arn't shot from the same position. One image might be sunny, the other cloudy, so one is more orange/yellow, the other more grey/blue, but the same object.  How would you align the tone of the image?  Background info: i shoot a couple of hundreds of images to produce textures for my models, the objects are outside, so weather conditions can change at any time, shooting must continue. I do photogrammetry, so I use the images to project them on the geometry and bake them in a UV Map. So in general I have a chunk of images made in sunny condition and another in cloudy. I would like to apply a tone to all cloudy images, having similar tone like in the sunny images.  It's not about HDR. It should be computable, not manually.

Imagine how photos with a bad blue filter look. I can recolor those pictures with the color filters from any image manipulation program like gimp.  Now my question is: can I "grab" the right settings from a "good" picture and apply these colors to the pictures that have that blue filter.


I'm trying to install Ubuntu on a Acer Aspire V6 laptop with Intel(R) HD Graphics 4000 using a USB drive from Kingston. Booting from the USB I can see the purple screen for a few seconds then the screen goes black. I can still hear the Ubuntu login sound just no display.  Version trying to install: Ubuntu 13.10  What can be causing this/how can I fix it?  Thank You.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I've got a zip file in which is presente a folder containing another subfolder containing the executable.  I would like to create a link to the executable but links take only absolute path..  So I need a workaround.

I can't figure out how to create shortcuts that don't care where they are mounted.  For example, on my flash drive, I want to run CCleaner or Notepad++ in my college classroom.  The problem is, a shortcut (at least with default settings) doesn't work reliably because it is tied to the same drive it was created on.  Is there a way to do something like in HTML?    Example:  Here is where the actual program is:  Root\Portable Applications\Program Data\CCleaner\ccleaner.exe   Here is where I want the shortcut to be:  Root\Portable Applications\CCleaner.lnk   U3/Portable Apps/etc is not the solution I am looking for  Edit: The Versions of Windows will be XP 32 bit, Vista 64 bit, and Vista 32 bit


Is there a general discussion section? I'd like to post a few off-topic things as just a general chat with a whole community and wondered if there's a place to do so?

Stuff like polls, recommendations based on subjective constraints, puzzles, webcomics etc. do not belong on the serious main SE sites, where professionals should be considered at work and having just a few spare minutes ("code's compiling") to answer questions, so they should not be distracted by such things. However, I'd also like to have a home for these things still using the SE engine. For the reason I mentioned before, this needs to be a separate place though. Let's call it four.[sitename-here].com.


Teaching English for adults we were reading a story. In the story of a man appears this sentence " He dies when he is 102 years old" An ESL adult asked me: Shouldn't be that sentence in the past,... when he was 102? I said No, it's OK the way it is;but I struggled to give him the reason. Could somebody help?  There are some questions about the use of would with the historical present on this site:       But this question is about why it is possible to use the present simple in this particular example. It does not ask about the use of would with the present simple.  I wasn't born here so English is my second language too!!!

Possible Duplicate:    When we tell a joke or narrate a story in simple present can we use 'would' in some cases? For example:  He goes up to this man and punches him in the face. The man looks straight into his eyes and tells him that he will take revenge He goes up to this man and punches him in the face. The man looks straight into his eyes and tells him that he would take revenge


Here I asked how to prove that a ring is local iff the set of non-units is an ideal:     Now we are supposed to show in our homework that if $R$ is local (i.e., it contains exactly one maximal ideal) and $I\subsetneq R$ is an ideal, then $R/I$ is local. I found this previous post:   Now, I read through the marked answer and showed that $\pi(M)$ is an ideal (easy exercise). [I use the notation $\pi: R\rightarrow R/I, r\mapsto r+I$ instead of $f$.]  So it remains to be shown that $\pi(M)$ is maximal. I thought of using the fact that $I$ is maximal iff $R/I$ is a field.  Would I then - in this task - have to show that $(R/I)/I$ is a field in this task, or am I misunderstanding it? However, how could we show that $(R/I)/I$ is a field?   Kind regards, MathIsFun

I want to show: If $R$ is local and $I\neq R$ an ideal, then $R/I$ is also local.  We already know: A Ring $R$ is local if and only if $R-R^{\times} = \{r\in R \, | r \notin R^\times \}$ is an ideal. We also know that if $I$ is an maximal Ideal, $R/I$ is a field.  I have no idea how to show that other than using the above Lemma.


I have a directory with the following files and a .git directory, e.g.  . ├── .git │   ├── branches │   ├── COMMIT_EDITMSG │   ├── packed-refs │   └── refs ├── readme.md ├── server_build.sh └── tags   If I run GNU find command with the -prune test, find prints the directory which is prune'd:  % find . -name '.git' -prune ./.git   If add another OR option, then the directory which is pruned not longer appears in the output:  % find . -name '.git' -prune -o -name '*.md' -print ./readme.md   In this case, both -name '.git' and -name '*.md' tests must be returning true, it can't be possible that adding another OR test suddenly makes the -name '.git' -prune test untrue. Is there some implicit switch being added to the first statement? In other words is find turning  find . -name '.git' -prune   into   find . -name '.git' -prune -print   at run time? and the implicit -print is taken away  when the next test when is added? Why doesn't find print the -prune'd directory when another "-or" test is applied?

When I'm using  find . -type f -name "*.htm*" -o -name "*.js*" -o -name "*.txt"  it finds all the types of file. But when I add -exec at the end:  find . -type f -name "*.htm*" -o -name "*.js*" -o -name "*.txt" -exec sh -c 'echo "$0"' {} \;  it seems it only prints .txt files. What am I doing wrong?  Note: using MINGW (Git Bash)


I bought a Lenovo PC model ThinkCentre M710t.  It says The CPU is Pentium G4600.  Is it OK to install Ubuntu 17.10 amd64?

What is the difference between 32-bit and 64-bit Ubuntu? I've heard the 64-bit platform performs better and can detect more than 4GB of RAM. Also, while some apps haven't ported to 64-bit yet, ia32-libs lets a 64-bit machine run them.  If so, why not promote 64-bit over 32-bit?


Campagnolo Triple T rear derailleur 9 Speed  Campagnolo Athena 3x11 speed crank and front derailleur  Chain KMC X11 with missing link.    The new chain jumps on the sprocket, it goes very fast and I can really see where it happens, but think it does not jump to an other sprocket but somehow on the spocket itself. It only occurs when I pedal with a lot of power and only on the smaller sized sprocket.  Edit:

I have a Lappierre Zesty 314  (2012). I'm running XT rear mech, an SLX front mech, my crank is XT, rear cassette is XT and XT chain. I went to the Forest of Dean and after the day was over I snapped my chain! I picked up a SRAM chain for my bike and now when I pedal hard it slips with a big bang. I have new Eastern Havens so my hub is fine. Can you help with any ideas to help me solve this? Shall I get a new rear cassette?


How to prove that if $x$ and $y$ are real numbers greater than $0$, then $\sqrt{x}+ \sqrt{y}>\sqrt{x+y}$?  Here is my attempt: To show that $A>B$, we need to show that $A-B>0$. This implies that we need to show that $$\sqrt{x}+\sqrt{y}-\sqrt{x+y}>0.$$ I'm now stuck in this portion.

How do I prove $\sqrt{x + y} \le \sqrt{x} + \sqrt{y}$? for $x, y$ positive?  This should be easy, but I'm not seeing how.  A hint would be appreciated.


for some weird reason after adding animation the hair of my character, freestyle is now ahead a frame. I don't have Motion Blur on, I tried using just my CPU, and rendering at different freestyle value. Here is an example of the problem:  Has anyone else run into this problem and does anyone know how to fix it? I tried looking for other posts, but it doesn't look like there are any definitive answers.

When rendering my scene as an animation, on particular frames (in this instance, 17), I often get a delay in the outlining, like it's trying to outline the next/previous frame.    This doesn't happen when rendering the frame normally - as in not an animation.  It looks like this:           It's like the actual render is delayed by a frame, but only when animated. Is this a known bug?


Your situation   You have successfully installed Ubuntu.  You have just downloaded and booted Ubuntu live media.  The latest LTS (see also ) or latest non-LTS release are preferred. See the list of  that are currently supported.) You upgraded your Ubuntu installation to the latest release that the software updater offered you. WiFi worked before, but not now on the new release. You  to new hardware.   Your problem   The wireless of your laptop or desktop is not working. You tried switching the wireless switch off and on and you tried rebooting several times, but you don't see any WiFi access points. You can see your wireless access point, but you cannot establish a connection. You want to analyze the problem, but you don't know where to start or what information you can provide.   This question and answer was written to give people the wireless script that will provide the information needed in most cases to diagnose their wireless issue's.   Related questions

I am trying to ask a question about getting my hardware to work but I don't know what information to add to my question to get help, what do I need to do?  Related if you don't have access to a GUI:


I am trying to display rotated grid data from NetCDF in Leaflet. When I try to use the "WMS angle parameter" () I got some strange results like this:   Any idea why this happens? I already have seen that there is the possibility to create a custom projection which allows to add rotation parameters, but I could not figure out how the correct usage is with using my own projection. Currently I am using (EPSG:25832) ()  Would be nice to find a solution to display the rotation without manipulating the raw NetCDF data.

I am using GeoServer and have a layer in EPSG:900913 ("Google Mercator").  I need to "rotate" the map around certain point (say, 1500000, 7000000) by certain degree (say, 30 degrees clockwise). How could I define such a coordinate system based on EPSG:900913?  GeoServer's  does not work for my purposes as I need to tile the map later on.  As far as I understand this, my only option is to define an own coordinate system. For GeoServer I'd need to . The configuration seems to be straightforward, but I have a difficulty defining my rotated CRS in .  I am wondering how to apply a rotation around certain point onto a CRS like Google Mercator:  PROJCS["WGS84 / Google Mercator",    GEOGCS["WGS 84",      DATUM["World Geodetic System 1984",        SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],        AUTHORITY["EPSG","6326"]],      PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],      UNIT["degree", 0.017453292519943295],      AXIS["Longitude", EAST],      AXIS["Latitude", NORTH],      AUTHORITY["EPSG","4326"]],    PROJECTION["Mercator_1SP"],    PARAMETER["semi_minor", 6378137.0],    PARAMETER["latitude_of_origin", 0.0],    PARAMETER["central_meridian", 0.0],    PARAMETER["scale_factor", 1.0],    PARAMETER["false_easting", 0.0],    PARAMETER["false_northing", 0.0],    UNIT["m", 1.0],    AXIS["x", EAST],    AXIS["y", NORTH],    AUTHORITY["EPSG","900913"]]   My questions, specifically:   How to write a WKT which transform an existing CRS? My guess would be that I need a new PROJCS wrapping an existing one and adding a PROJECTION clause. How would I found out the projection id (like Mercator_1SP above) and the required parameters (the PARAMETER clauses)? Can I "reference" EPSG:900913 in CRS WKT instead of copy-pasting the whole PROJCS clause?


The references appear only in one frame in beamer, meaning that the list of references is incomplete.  How can I create the necessary number of frames?  Here is the .tex exported from LyX:  %% LyX 2.3.0 created this file.  For more info, see http://www.lyx.org/. %% Do not edit unless you really know what you are doing. \documentclass[english]{beamer} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \setcounter{secnumdepth}{3} \setcounter{tocdepth}{1} \usepackage[authoryear]{natbib}  \makeatletter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands. % this default might be overridden by plain title style \newcommand\makebeamertitle{\frame{\maketitle}}% % (ERT) argument for the TOC \AtBeginDocument{%   \let\origtableofcontents=\tableofcontents   \def\tableofcontents{\@ifnextchar[{\origtableofcontents}{\gobbletableofcontents}}   \def\gobbletableofcontents#1{\origtableofcontents} } % plain title style, override default \renewcommand\makebeamertitle{\frame[plain]{\maketitle}}%  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. \usepackage{url} %\usepackage{hyperref} \usepackage{tabularx} %\usepackage[super,sort&compress]{natbib} \usetheme{Warsaw} % for beamer version >= 3.5 only %\setbeamertemplate{page number in head/foot}[totalframenumber] \usepackage{dsfont} %\usepackage[table]{xcolor} %\usepackage{dcolumn} \addtobeamertemplate{footline}{\insertframenumber/\inserttotalframenumber} \renewcommand{\bibsection}{}  \makeatother  \usepackage{babel} \begin{document}  \title{Template beamer} \makebeamertitle \begin{frame}{}  \citet{king_matrix_2014,king_comparing_2015-1,khindanova_location_2011,kishita_estimation_2012,koskinen_energy_2016,kok_measuring_2006,krausmann_growth_2009,le_boulzec_impacts_nodate,lambert_eroi_2012} \end{frame} % \begin{frame}{}  \bibliographystyle{plainnatnourl_clean} \bibliography{\string"C:/Users/a.fabre/Google Drive/Economie/Articles/Environment\string",\string"C:/Users/a.fabre/Google Drive/Economie/Articles/test\string"} \end{frame}  \end{document}

I have several citations in a beamer-based presentation.  Is it possible to split the bibliography across two slides?  I'm using natbib / bibtex.  And I currently just have:  \begin{frame}  \tiny  \bibliographystyle{apalike} \bibliography{Biblio-Database}  \end{frame}   But we're to the point where even tiny won't cut it.  Is there anyway to do this?  I'd really prefer to not create the bibliography by hand because I once had it 'stuck to me' that I omitted an entry in the bibliography (which I'd created by hand)... nothing quite like ending on a clerical omission...


I saw  got  from , but the question was put on hold and the user got one downvote from it. How could he get ten reputation from it?

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.


I am using QGIS 1.8.0 I would like to densify a polyline according to a particular length of segment (ex. 200 m). I know it is possible with other GIS software.   Is it possible to do this in QGIS?

I've made a vector grid using lines; the grid coverage is 100 km x 100 km and the lines are at vertical and horizontal intervals of 1000 metres. Each line in the grid is defined by two vertices, one at each end, and each line has an ordinate attribute for labelling.  My wish is to to add vertices to the lines, so that each line will have vertices at intervals of (say) 500 metres. Does anyone know how to do this?  The background to this is that the grid will be displayed on OpenLayers and given the strangeness of Google Mercator the lines need to be pegged to the ground with vertices at frequent intervals. One other obvious use for the ability to add vertices to grid lines would also be to make nicely curved lat/lon graticules for projected maps.


I have a trigonometric function $g(x)$ and I'm interested in how its frequency changes as $|x|$ increases. When I plot the function I can see that the frequency increases with $|x|$, but is there a way to show this formally?  This is the function:  $$g(x) = \sin(2\pi(x-a)b \ \cos(2\pi(x-a)c)) + d.$$  [Edit] In a previous question I asked about he periodicity of this function and accepted an answer. However, knowing that the function is not periodic does not really tell me anything about the frequency. Just that the function values don't repeat. I am interested in the behaviour of the frequency, because I use this function in an application in swarm intelligence (known as ) to generate potential solutions to binary problems. Basically, the function is sampled at regular intervals $x = (0, 1, ..., n)$. At each sample position, the function value is mapped to a binary bit as follows: if $g(x) > 0 \rightarrow 1$, else if $g(x) \leq 0 \rightarrow 0$. Now, if the frequency increases indefinitely as $x$ increases, this has implications for the algorithm when $n$ is large, because of the way a search is carried out in PSO. So, although this question is closely related to my previous question, there are other implications.

I have a trigonometric function and I'm interested to know whether or not it has a period. At this stage I'm fairly certain that it is not periodic. However, I don't know how to prove it. Can anyone help?  This is the function:  $$g(x) = \sin(2 \pi (x-a) \times b \times \cos(2 \pi (x - a) \times c)) + d$$  Thanks


A person who says that everything in this life is not permanent / is a lie. A person who believes in things only after he has seen/experienced them.

What's a word or phrase that could be used to describe a person who needs to see the evidence for a claim in-person before believing it?


I have created a view in Drupal 7 using views 3 and it is throwing some sql error in preview and the error message is not complete showing here. How can I check this sql complete error message? Is there any option to see SQL generated by view so that I can test the same on mysql client?  Thanks in advance for your help. Umar

I need to find out the SQL query that is executed by a certain query. Views module can show the SQL when configuring the view but apparently . I am aware that the Devel module can show the database queries, but .  How can I find out the actual query that the view executes? The view is displayed as a block.


I have tried 2 ways to code length of an array one works the other not and I just don't understand what's the problem. First one works, secon not. This works: #include<stdio.h>    int main(void)   {     char array[] = {'r', 'o', 'c', 'k', 'n', 'r', 'o', 'l', 'l'};      int length = sizeof(array) / sizeof(array[0]);     printf("Length is %d\n", length);     return 0; }  This doesn't work, it always gives me 4. #include<stdio.h>   unsigned int arraylen(const char *array) {      unsigned int length = sizeof(array) / sizeof(array[0]);     return length; }  int main(void) {     const char array[] = {'r', 'o', 'c', 'k', 'n', 'r', 'o', 'l', 'l'};     unsigned int length = arraylen(array);     printf("Length is %d\n", length);      return 0; }

First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?


choudhary@jiten:~$ sudo apt update [sudo] password for choudhary:  Get:1 http:/ /in.archive.ubuntu.com/ubuntu focal InRelease [265 kB] Ign:2 http:/ /ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu focal InRelease Hit:3 http:/ /dl.google.com/linux/chrome/deb stable InRelease                    Hit:4 http: //security.ubuntu.com/ubuntu focal-security InRelease                Ign:5 http: //ppa.launchpad.net/gencfsm/ppa/ubuntu focal InRelease               Hit:6 http:/ /in.archive.ubuntu.com/ubuntu focal-updates InRelease Hit:7 http:/ /in.archive.ubuntu.com/ubuntu focal-backports InRelease Err:8 http: //ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu focal Release   404  Not Found [IP: 91.189.95.83 80] Err:9 http://ppa.launchpad.net/gencfsm/ppa/ubuntu focal Release   404  Not Found [IP: 91.189.95.83 80] Reading package lists... Done                       E: The repository 'http: //ppa.launchpad.net/danielrichter2007/grub-customizer/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http: //ppa.launchpad.net/gencfsm/ppa/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


I've tried a lot. I was trying to install it using a flash card (two different cards), then with CD's (two) and DVD (one), but my computer just load windows (i've tuned BIOS, like it had to be). I've tried Wubi, but there was an exeption "Could not retrieve the required installation files" (Kubuntu), and "undefined error with disk D" (with Ubuntu). I think that the problem is in my OS - it is 32-bit, when my processor is 64-bit, can it be so? I just don't know what to do, plese, help me.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I'm working on a big project, but for this question I write a simple example of the problem. I have 2 classes.  public class Main {     public static void main(String[] args)     {         CustomType[] customType = new CustomType[3];          for(int i = 0; i < 3; i++)         {             customType[i] = new CustomType(i);         }          for(int i = 0; i < 3; i++)         {             System.out.println("Main " + customType[i].integer);         }     } }   and  public class CustomType {     public static int integer;      public CustomType(int input)     {         integer = input;         System.out.println("CustomType: " + integer);     } }   I get the following output:  CustomType: 0 CustomType: 1 CustomType: 2 Main 2 Main 2 Main 2   but I want to get this:  CustomType: 0 CustomType: 1 CustomType: 2 Main: 0 Main: 1 Main: 2

To be specific, I was trying this code:  package hello;  public class Hello {      Clock clock = new Clock();      public static void main(String args[]) {         clock.sayTime();     } }   But it gave the error      Cannot access non-static field in static method main   So I changed the declaration of clock to this:  static Clock clock = new Clock();   And it worked. What does it mean to put that keyword before the declaration? What exactly will it do and/or restrict in terms of what can be done to that object?


I'm currently studying about Dynamics in my physics class. I was looking up where the normal force comes from, and I thought that the normal force comes from Newton's third law. However, going through the internet I've seen that Newton's third law actually doesn't apply to the normal force, and it actually is caused by the Pauli exclusion principle. I was wondering if the Pauli exclusion principle is the only cause for normal force? And why is it the cause of normal force?

There is this famous example about the order difference between gravitational force and EM force. All the gravitational force of Earth is just countered by the electromagnetic force between the electrons on the surface of my feet and the ground.  But also wave-function of electrons(fermions) do not overlap each other due to Pauli exclusion principle.  So which one is the true reason of me not flopping inside the earth forever? Is it only one of them(my guess is Pauli exclusion) or is it both?


I'm attending a course in Advanced Statistics and I want to find materials and exercises (like the MIT Open Courses) which cover the syllabus. We're using the book Stochastic Modeling and Mathematical Statistics.  The topics are:   Review of discrete and continuous random variables. Random vectors. Transformations of random variables and of random vectors. Simulation of random variables. Strong laws of large numbers and the central limit theorem. Parametric statistical models. Parameter estimation: maximum likelihood and Bayesian methods. Hypothesis testing. Regression models.

There are several threads on this site for book recommendations on  and  but I am looking for a text on advanced statistics including, in order of priority: maximum likelihood, generalized linear models, principal component analysis, non-linear models. I've tried  by A.C. Davison but frankly I had to put it down after 2 chapters. The text is encyclopedic in its coverage and mathematical treats but, as a practitioner, I like to approach subjects by understanding the intuition first, and then delve into the mathematical background.   These are some texts that I consider outstanding for their pedagogical value. I would like to find an equivalent for the more advanced subjects I mentioned.   , D. Freedman, R. Pisani, R. Purves. , R. Hyndman et al. , T. Z. Keith , Rand R. Wilcox , Gareth James, Daniela Witten, Trevor Hastie and Robert Tibshirani , Hastie, Tibshirani and Friedman (2009)


I have a problem with one of my virtualhost.  My config: a reverse proxy with Centos 7 + apache 2.4 and a backend with Microsoft IIS 6.0.  When I do a curl from the proxy to the virtualhost (curl -k ) I get a proxy error:  <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">  <title>500 Proxy Error</title>
Proxy Error
 The proxy server could not handle the request GET&nbsp;/.
 Reason: Error during SSL Handshake with remote server

    When I look at the packets it is what I get:  1) Client sends [SYN] to server. 2) Server sends [SYN,ACK] to client. 3) Client sends [ACK] to server. 4) Client sends the message “Client Hello” to the server. 5) Server sends its public key with the message “Server Hello, Certificate, Server Hello Done” 6) Client sends its public key with the message “Client Key Exchange, Change Cipher Spec, Encrypted Handshake Message” 7) Server sends encrypted handshake message with the message “Change Cipher Spec, Encrypted Handshake Message” 8) Client sends [FIN,ACK] 9) Server sends RST   The cypher the server wants to use is tls_rsa_with_3des_ede_cbc_sha.  I do not have access to the backend server.  But when I do the same but from the proxy to the real IP of the backend (e.g. curl -k ), it works perfectly. It is just when passing by the proxy that it does not work.  Do you know what is going wrong?

I have a server that acts as a front-end for a cPanel mailserver in a network. The apache proxy on the front-end server ran for 152 days without fault then suddenly I now get 500/502 errors when using it to access the webmail clients of the mailserver.  The front-end server uses a signed SSL cert, the cPanel sever is using a self signed cert. Here is the error log output from the front-end server when it first started happening:   [Tue Sep 10 18:22:52.959291 2013] [proxy:error] [pid 19531] (502)Unknown error 502: [client 173.xx.xx.xx:9558] AH01084: pass request body failed to 184.xx.xx.xx:2096 (184.xx.xx.xx), referer:   [Tue Sep 10 18:22:52.959469 2013] [proxy:error] [pid 19531] [client 173.xx.xx.xx:9558] AH00898: Error during SSL Handshake with remote server returned by /cpsess12385596/3rdparty/roundcube/, referer:    The front-end server is an EC2 instance running Apache/2.4.6 (Amazon) My VirtualHost setup for the proxy on this server is as follows:   < VirtualHost *:2096>     ServerName domain.com  SSLEngine on SSLProxyEngine on SSLProxyVerify none SSLProxyCheckPeerCN off  SSLCertificateFile /x/x/x/domain.com.crt SSLCertificateKeyFile /x/x/x/domain.com.key SSLCACertificateFile /x/x/x/domain.com.cabundle  ProxyPass / https://184.xx.xx.xx:2096/ ProxyPassReverse / https://184.xx.xx.xx:2096/ ProxyPassReverseCookieDomain 184.xx.xx.xx:2096 domain.com ProxyPassReverseCookiePath / /  SetOutputFilter INFLATE;proxy-html;DEFLATE ProxyHTMLURLMap https://184.xx.xx.xx:2096 /   < /VirtualHost>   As far as I can think nothing has changed on the front-end server, I didn't do an update or anything, once noticing this problem and fiddling with no success I tried a restart on both servers but it did nothing to fix this.  Any suggestions?


I have a very high level and complicated script which I basically need to debug with set -e on (because I'd like it not to run expensive operations in a loop as I work out the logic), but it is becoming difficult (even with set -x) to figure out exactly where the scripts are exiting due to an unexpected result.   I have about 3 scripts calling each other in various ways (combined with inotifywatch) so you can see how this gets a bit hairy.   I'm looking for something like "Script x.sh exited at line 4" rather than the uninformative [exited]

What is your favorite method to handle errors in Bash?  The best example of handling errors I have found on the web was written by William Shotts, Jr at .   He suggests using the following function for error handling in Bash:  #!/bin/bash  # A slicker error handling routine  # I put a variable in my scripts named PROGNAME which # holds the name of the program being run.  You can get this # value from the first item on the command line ($0).  # Reference: This was copied from <http://www.linuxcommand.org/wss0150.php>  PROGNAME=$(basename $0)  function error_exit {  #   ---------------------------------------------------------------- #   Function for exit due to fatal program error #       Accepts 1 argument: #           string containing descriptive error message #   ----------------------------------------------------------------       echo "${PROGNAME}: ${1:-"Unknown Error"}" 1>&2     exit 1 }  # Example call of the error_exit function.  Note the inclusion # of the LINENO environment variable.  It contains the current # line number.  echo "Example of error with line number and message" error_exit "$LINENO: An error has occurred."   Do you have a better error handling routine that you use in Bash scripts?


Prove that if two linear functionals $ p[h] $and  $ g[h] $ defined on the same space vanish on the same set of elements, then $$ p[h] = \lambda g[h] $$, where $ \lambda $ is a constant. I am not sure how to start it...

Let $V$ be a vector space with $\dim V=n$ . If $\ker f\subset \ker g$ where $f,g $ are non-zero linear functionals then show that $f=cg$ for some $c\in F$.  Now let $\mathcal B=\{v_1,v_2,\ldots ,v_n\}$ be a basis of $V$, since $f,g$ are non-zero linear functionals then $\exists v_i\in \mathcal B $ such that $g(v_i)\neq 0\implies f(v_i)\neq 0$ Take $i=1$ without any loss of generality so take $g(v_1)\neq 0,f(v_1)\neq 0$. Now take $c=\dfrac{f(v_1)}{g(v_1)}$ Then we need to show that $(f-cg)(v_i)=0\forall i$ Now $(f-cg)(v_1)=0$ How to show that $(f-cg)(v_i)=0\forall i\ge 2$ Can someone please help? Note::Another Question Why do we need the dimension of the vector space to be finite?


My server runs a number of cron jobs at midnight. Each job creates a backup of something, by creating a tarball and compressing it with xz.  Since xz is a CPU and memory pig, I added a random delay to each job, so they "should not" clobber each other. But from time to time that does happen, and heavily loads the server.  Assumptions:   Based on my traffic, midnight is best time to do backups - but there still is traffic (which is why I want to avoid excessive load) Each public-facing app is associated with its own backup job, and these are decoupled (they don't know of each other) - so I can't merge the backup cron jobs into a single job, as I need that granularity I can't hardcode the starting time for each one, as that would increase maintenance - to add an app to the server (via ansible), I just deploy it and drop a backup cron job (scheduled for midnight) into /etc/cron.d/, and the random delay before the job starts usually is good enough I throttle the jobs a bit via tar ... | pv --rate-limit ... | xz ... - but although that reduces load per-job, it also slows down every job and so increases the probability of multiple jobs running concurrently (which when added together may eat 100% cpu)   A possible solution is for each job to create a temporary file that signals it is busy, then delete it afterwards. The problem is if a job detects this file, what does it do? Sleep? For how long? I could make it sleep for a random period using at, but if something goes wrong with my backup scripts I could have a huge queue of jobs competing with each other. Another maintenance headache.  So, how does one typically solve this problem? Basically, a simple way to schedule related cron jobs, without letting them clobber each other, and without the need for fine-tuning starting times.

I have scheduled a cron job to run every minute but sometimes the script takes more than a minute to finish and I don't want the jobs to start "stacking up" over each other. I guess this is a concurrency problem - i.e. the script execution needs to be mutually exclusive.  To solve the problem I made the script look for the existence of a particular file ("lockfile.txt") and exit if it exists or touch it if it doesn't. But this is a pretty lousy semaphore! Is there a best practice that I should know about? Should I have written a daemon instead?


I can't remove a keyboard language and sometimes it changes with no reason, but I can't find any place where it's shown to be removed.

I have just updated to Windows 10 April 2018 Update (1803 / 17134.1)  I had my laptop configured completely as UK with only a UK keyboard layout  Since the update, a US keyboard has been added so I now see the switch icon in my task bar    It appears that all the keyboard language settings are now migrated to the new Settings app and no longer in the old Control Panel    However, as can be seen from the screenshot above, the Remove button under the newly added US layout is greyed out (as is the UK one)  How can I remove the US layout?  UPDATE 1: I just updated my desktop and it hasn't added a US keyboard!  UPDATE 2: I added a third language (French) and was able to remove it, the button was enabled. The US remove button remained disabled both after adding French and after removing it.  UPDATE 3: I added another English language (Australian) and this cannot be removed! Button is disabled  UPDATE 4: I followed this  except I removed the values from the keys for all users and also the values under the Substitutions key. The task bar switch icon is gone but I still have all 3 languages in Settings still


I would like to run a script to get all network interfaces and their IP addresses of a standalone PC, such that the command line can print out, for example:  <interface1>    <IP address>   and so forth This device is installed with RedHat Enterprise Linux 7.0. I have tried the following command but it only showed me one interface and the loopback address. The command was:      hostname --ip-address   There are 2 network interfaces in this PC, but I could only view the interface for the loopback, not the other interface. How can I get an output in the following manner?   <interface1> <non loopback ip address1> <interface2> <ip address 2>

I want to show the IP address like below  lo : 127.0.0.1  eth0 : 192.168.5.123 eth1 : 192.172.0.212 wlan0 : 10.1.0.124   I'm able to print all IP address by ifconfig | awk '/inet addr/{print substr($2,6)}'. But it is only printing the IPs. Every system have their own interface names and addresses. So my script has to show their interfaces with respect to IP addresses.


I use below command to empty a file  > file.txt   It works perfectly fine! But there are some files with root user permissions. So I tried   sudo > different-file.txt   and I got below verbose  usage: sudo [-D level] -h | -K | -k | -V usage: sudo -v [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] usage: sudo -l[l] [-AknS] [-D level] [-g groupname|#gid] [-p prompt] [-U user name] [-u user name|#uid] [-g groupname|#gid] [command] usage: sudo [-AbEHknPS] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] [-g groupname|#gid] [VAR=value] [-i|-s]         [<command>] usage: sudo -e [-AknS] [-C fd] [-D level] [-g groupname|#gid] [-p prompt] [-u user name|#uid] file ...   This suggests that there is some syntax error in my command.  What is wrong?

When you attempt to modify a file without having write permissions on it, you get an error:  > touch /tmp/foo && sudo chown root /tmp/foo > echo test > /tmp/foo zsh: permission denied: /tmp/foo   Sudoing doesn't help, because it runs the command as root, but the shell handles redirecting stdout and opens the file as you anyway:  > sudo echo test > /tmp/foo zsh: permission denied: /tmp/foo   Is there an easy way to redirect stdout to a file you don't have permission to write to, besides opening a shell as root and manipulating the file that way?  > sudo su # echo test > /tmp/foo


I reused some old code to have the editor names printed before the parent title of a source, however it gives me the parent title twice now. I can't spot the cause of it.  How can I provide the editor names before the collectiontitle/booktitle, i.e. only once?  Picture    MWE  \documentclass[ a4paper, 12pt, ]{scrartcl}  \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{lmodern}  \usepackage[ language=english, style=authoryear-ibid, backend=biber, hyperref=true, dashed=false, isbn=false, doi=false, maxcitenames=2, maxbibnames=99, sorting=nyt, firstinits=true, uniquename=init, uniquelist=false, autocite=footnote, ibidtracker=true, date=comp, mincrossrefs=1, ]{biblatex} \usepackage{xpatch}  \renewbibmacro*{byeditor+others}{%     \ifnameundef{editor}     {}     {\printnames[byeditor]{editor}%         \setunit{\addspace}%         \usebibmacro{byeditor+othersstrg}%         \clearname{editor}%         \newunit}%     \usebibmacro{byeditorx}%     \usebibmacro{bytranslator+others}     \setunit{\addcolon\space}     \usebibmacro{booktitle}} \xpatchbibmacro{byeditor+othersstrg}{\printtext}{\printtext[parens]}{}{}  \begin{filecontents}{\jobname.bib} @incollection{abc, Title                    = {Stuff}, Author                   = {Lamp, Jones}, Date                     = {2011}, Crossref ={ddd} } @collection{ddd,     Title= {Words},     Editor={Smith, John and Doe, Jane},     Date={2012},     Location={Towntown} } \end{filecontents}  \addbibresource{\jobname.bib} \nocite{*}  \listfiles  \begin{document} Words.  \printbibliography \end{document}

I'm trying to cite a chapter from a book using biblatex:  @inbook{ ,    crossref{X} }    @book{X, }.   This produces a citation in this layout:      Authors. Title. [...] In: Title. Authors. [...]   I need to swap the Title and Authors in the "In:" reference, i.e. to get      Authors. Title. [...] In: Authors. Title. [...]   Any idea? Thanks.


I'm trying to establish an Oracle database connection. It throws the following exception:  ORA-04031: unable to allocate 4048 bytes of shared memory    ("shared pool","unknown object","sga heap(1,0)","kglsim heap")   I have tried connecting the database through JDBC as well as  SQL Developer, however it throws the exception in both case.  How can I fix this?

I am receiving this error in a development database. It happens on some specific queries (simple inserts and deletes via .NET application). The database is used by one user, and error happens regardless for how long the database was running.  The only memory related parameter which is set is: MEMORY_TARGET=1.2G  Oracle 11.2 x64 Standard Edition One Windows Server 2008 R2


$Problem$  Suppose that a and b belong to a commutative ring $R$ with unity. If $a$ is the unit of $R$ and $b^2 = 0$; Show that $a+b$ is a unit of $R$.  $ Attempt$  $(a+b)(a-b) a^{-2}= (a^2-b^2)a^{-2}= 1$.   How to show that $a+b$ is a unit if we replace $b^2$ with $b^n$  I have just started ring theory after finishing Group theory.  Any hint or suggestion will be appreciated.

If $ua = au$, where $u$ is a unit and $a$ is a nilpotent, show that $u+a$ is a unit.   I've been working on this problem for an hour that I tried to construct an element $x \in R$ such that $x(u+a) = 1 = (u+a)x$. After tried several elements and manipulated $ua = au$, I still couldn't find any clue. Can anybody give me a hint?


Following the thought process in this , it mentions that typical  (which lose their properties over time) are created with a Disillusionment charm.  How then, could  be made?

I know the tale of the three brothers but does anyone know any convincing theories on how Ignotus Peverell created it?


Any suggestions on how to achieve a look for a code as seen in the picture?  Maybe with "listings" or do I need to do it manualy?  Thanks in advance!

I found this page with some examples:   I'm wondering which one to use. Any suggestions? I'm using other packages too so whichever is less likely to interfere with them is better for me.


This is my assumption: Is this function $F(h)$ continuous? $$F(h):=\sup_{x\in [a, h]} f(x)$$  where $f(x)$ is continuous in $[a, b]$ and $h\in[a,b]$.  I think this function is continuous. But I don't know how to prove.

$f(x)$ is continuous on $[a,b]$. Now we define a new function $M(t)$, for every $t\in[a,b]$   $$M(t) = \sup_{a \leq x \leq t} f(x).$$  Prove formally that $M(t)$ is continuous on $[a,b]$. (sup = supremum)   $M(t)$ is monotonically increasing function, but I don't see how to continue from here.   Also I would like to know what are the standard strategy for proving a function is continuous on a given interval (not a point) except showing its a sum/product/composition of another continuous functions.


I am using SQL Server v18.0  I have the folowing table:   The table represents the time use for the test equipment.  The character C_ represents connect operation and the D_ represents disconnect operation   How can I create query that return the time use for range of dates of specific device name?

I have a table, showing the status (healthy, broken) for each device at a given timestamp. I need to get the total amount of time of a whole breakdown.  So the data is stored like this:  device_owner   device_id    timestamp          status owner1         device_1     2001-01-01 09:00   0 owner1         device_2     2001-01-01 09:15   0 owner1         device_1     2001-01-01 09:30   1 owner1         device_2     2001-01-01 09:45   1   and so on.  The example above shows    device_1 was down from 09:00 to 09:30 (total 30 mins),   device_2 was down from 09:15 to 09:45 (total 30 mins)   What I need  Need to calculate the total amount of time for the whole breakdown for owner_1 will be 45 mins (from 09:00 to 09:45) instead of 60 mins (30 + 30).  device_owner   total_breakdown_min owner_1        45   What I've done  Currently I can define a breakdown time for each device separately (device_1 = 30mins, device_2 = 30mins). For this I transformed the table using LEAD over partition by device_owner, device_id and date part from timestamp:  device_owner  device_id     timestamp        status lead_timestamp   lead_status owner1        device_1     2001-01-01 09:00   0     2001-01-01 09:30     1 owner1        device_1     2001-01-01 09:30   1     NULL                 NULL owner1        device_2     2001-01-01 09:15   0     2001-01-01 09:45     1 owner1        device_2     2001-01-01 09:45   1     NULL                 NULL   So the datetime difference between timestamp and lead_timestamp in sum gives me the total breakdown time for a device.  ;WITH LeadStatus AS (     SELECT         D.*,         lead_status = LEAD(D.status) OVER (PARTITION BY D.device_owner, D.device_id, D.date ORDER BY D.datetime ASC),         lead_timestamp = LEAD(D.datetime) OVER (PARTITION BY D.device_owner, D.device_id, D.date ORDER BY D.datetime ASC)     FROM         #DeviceStatus AS D ) SELECT * FROM LeadStatus   It is the same device list for any owner. The data snapshot is to be taken between 2 dates (StartDate, EndDate). The records are written to a DB each n seconds and also when the device status changes.


Let's say I have two measurements  $$x_1 \pm \Delta x_1$$ $$x_2 \pm \Delta x_2$$  where $x_i$ are indirect measurements and $\Delta x_i$ come from error propagation and might differ from one another.  I can estimate $x$ with the mean  $$\bar x = \frac{x_1 + x_2}{2}$$  But how do I handle the errors? Applying simple rules of error propagation to the above formula I could say  $$ \Delta \bar x = \frac{1}{2} \left(\Delta x_1 + \Delta x_2\right)$$  So the error on the mean goes down as $1/N$... but shouldn't it be $1/\sqrt{N}$?  Also this way all the measurements have the same weight. Should I take into a bigger account more precise measurements with some kind of weighted mean?

I have a number of measurements of the same quantity (in this case, the speed of sound in a material). Each of these measurements has their own uncertainty.  $$ v_{1} \pm \Delta v_{1} $$ $$ v_{2} \pm \Delta v_{2} $$ $$ v_{3} \pm \Delta v_{3} $$ $$ \vdots $$ $$ v_{N} \pm \Delta v_{N} $$  Since they're measurements of the same quantity, all the values of $v$ are roughly equal. I can, of course, calculate the mean:  $$ v = \frac{\sum_{i=1}^N v_{i}}{N}$$  What would the uncertainty in $v$ be? In the limit that all the $\Delta v_i$ are small, then $\Delta v$ should be the standard deviation of the $v_i$. If the $\Delta v_i$ are large, then $\Delta v$ should be something like $\sqrt{\frac{\sum_i \Delta v_i^2}{N}}$, right?  So what is the formula for combining these uncertainties? I don't think it's the one given in  (though I may be wrong) because it doesn't look like it behaves like I'd expect in the above limits (specifically, if the $\Delta v_i$ are zero then that formula gives $\Delta v = 0$, not the standard deviation of the $v_i$).


W: Failed to fetch   Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)  E: Some index files failed to download. They have been ignored, or old ones used instead.

I am using Google Chrome 48.0 32-bit. Today when I launched Google Chrome, I got this message:    This computer will soon stop receiving Google Chrome updates because this Linux system will no longer be supported   I thought Ubuntu 14.04 is supported for five years, what's exactly happening here?  And on 64-bit Ubuntu, I get an error from Update Manager and apt-get update:  Failed to fetch http://dl.google.com/linux/chrome/deb/dists/stable/Release  Unable to find expected entry 'main/binary-i386/Packages' in Release file (Wrong sources.list entry or malformed file)   Some index files failed to download.   They have been ignored, or old ones used instead.


I have to photograph 15cm high printed text from 500 meters away. The text has to be human readable in the result.   What kind of focal length do I need? Can i compromise, and get a camera with less optical and more digital zoom? Can you guys give me the process for working this out as well as the answer? What is the minimum price that I can do this for?

I am thinking about buying a new lens specifically to take photos of distant targets (birds, bears, etc). I currently own the Canon 70-300 IS USM, which is a nice lens, but I find that if I want to take a photo of anything further away than about 10 meters, the target does not fill a large amount of the frame (meaning I have to significantly crop in post production).  I am currently looking at the Canon prime 400mm, however I would like to determine at what distance an object will fill a reasonable proportion of the frame.  Is there a formula or rule of thumb I can apply that will help me in this situation? I realise the size of the target I am shooting will play a role here, so if we need to make an assumption about the size of the target please let me know.


So, let me try to explain what I need. I have two different workbooks of data. I need to match info from "WB1 Column B" to "WB2 Column A". If there is a match, I need to pull the info from the same row as the matched data in "WB2 Column A" but from "WB2 Column D" and plug that info into the the original row in "WB1 Column C".   Does that make sense? If so, is there a way to do this?

I need to find a way to compare two spreadsheets and if there is a match on specific cells, pull data from one sheet to another.  Say the two spreadsheets contain a value that identifies a piece of equipment:  spreadsheet 1       spreadsheet 2 Server              Server        Serial # 123abc              123abc        123-xx-456   There are of course many, many records/rows in each sheet.  I need to look at the first cell in the server column of sheet 1 and then search a range of cells in the sever column of sheet 2 for a match.   If there is a match, I need to pull the serial # value from the cell in the matching row an put it into the serial # cell of the matching row in sheet 1 (all of the "serial #" cells in sheet 1 are presently empty.)  If that description explaination is too convoluted I can explain by answering any questions you may have.     My deadline for this task is Noon tomorrow, 30 Aug 2012.  Yes, I got the task today at noon....  I am not an Excel user and just get thrust into it on occassion...  Any help would be a huge assist.


I've been trying to connect to multiplayer servers, which I could connect to just fine just a few hours ago, but now I'm getting the error message "Failed to login: Invalid session (Try restarting your game.)" I've restarted my game multiple times, and even restarted my PC, but still the same error. I need help.

When I try to connect to servers or join up on lan worlds in Minecraft it says "Failed to Login : Invalid session (Try restarting your game)". Multiplayer used to work fine but now keeps coming up with this error. Can anybody help?


I'm producing a small document where only unnumbered subsections and levels below are used, and would like PDF bookmarks to be created for them.  I tried  and  packages and did not find any option for this. How do I make it automatically generate such bookmarks? What's the most elegant way of doing this?  Update: corrected inaccurate question statement. Sorry.

I have a document that has many sections. I don't want section numbers to show up in the document, but I do want the sections to show up automagically as bookmarks in the PDF using the hyperref package.  I know I can use the \section* command to eliminate section numbers in the document, but this also removes the bookmark. Is there some sort of compromise?


In QGIS 2.18 I draw polygons on a certain grassland-type on aereal imagery. Sometimes, there are other landcover-types within the patches of interest, so I'd like to draw polygons with holes.  In the example, I want to exclude the small forest-patches within the grassland. Is there any procedure other than creating a new layer for everything I want to exclude and then clip my grassland-layer?

I'm trying to use the tool "delete ring" in order to create a hole in a polygon. The geometry of the hole is another feature of the same shapefile   I cannot manage to delete the part of the polygone. Does someone have a tutorial or some explanation?


in this video they measure the same event at different times does that tell you the speed of light in that direction? Since the event doesn’t appear to happen at the same time instantaneously does that mean that the speed of light isn’t infinite in that direction? Can you measure the speed of light by looking at similar events and in different directions?

Is there any way (practical or theoretical) to measure the one-way speed of light?    The two methods that come to mind are:   Stellar aberration, and Using adiabatic clocks: synchronize clocks, then slowly move them apart   I think 2 is not really measuring one-way speed, although I can't work out exactly why.    Is 1 measuring one-way speed?  In particular, if the one-way speed was not isotropic, would there be a different amount of stellar aberration if the telescope is pointed at stars that lie in exactly opposite directions?


The notion of an unbalanced force seems to contradict Newton's third law, entirely.  For instance, apparently, if you push a rock, then an unequal force is being applied in the opposite direction with respects to friction, in your pushing of the rock. To me, this makes complete sense, though then I was taught Newton's third law, which made no sense until I got deeper into the intuition behind that. For instance, the reason why it's hard to push, in particular a heavy rock, is because of this equal and opposite force, otherwise you could push it effortlessly, literally. So, I've gone from my initial intuition being shattered, to internalizing Newton's ideas, and now nothing makes sense anymore, because my initial intuition and my newfound insight is just battling out.

Given Newton's third law, why is there motion at all? Should not all forces even themselves out, so nothing moves at all? When I push a table using my finger, the table applies the same force onto my finger like my finger does on the table just with an opposing direction, nothing happens except that I feel the opposing force. But why can I push a box on a table by applying force ($F=ma$) on one side, obviously outbalancing the force the box has on my finger and at the same time outbalancing the friction the box has on the table? I obviously have the greater mass and acceleration as for example the matchbox on the table and thusly I can move it, but shouldn't the third law prevent that from even happening? Shouldn't the matchbox just accommodate to said force and applying the same force to me in opposing direction?


Just curious as to why do non volatile memories like EEPROM in an AVR have a write limit ?  Also is this limit per location/adress in the memory or on the memory as a whole ?

I've read that flash memories can "only" be reprogrammed 100000 to 1000000 times, until the memory storage "deteriorates"  Why exactly does this happen with flash and not other memory types, and what does "deteriorate" refer to, internally?  EDIT: Since it's not only flash that this happens, I'd like to generalize a bit and inquire about the memories that have this problem. Also, does the wearing out between these memory types occur due to the same phenomenon?


I have a doubt, I do not know if my method of solving this problem is correct. I have to count how many isomorphic subgroups to $ \mathbb{Z}_3\times \mathbb{Z}_3$ there are in $ S_6 $. being abelian I have to find two generators that switch between them, so I think you can choose a three cycle and then I have 40 choices, having the second generator forced (the other three cycle, and its power) then in all 80 choices, dividing by the number of elements of order 3 I have that ultimately there are 20 in the subgroups searched for.

In , people discussed that there cannot be cyclics subgroups of order 9 in $S_6$.   How does one reason that the subgroups isomorphic to $C_3 \times C_3$ (the other candidates to be subgroups of order 9) are precisely the ones given by two disjoint permutations $\langle (123),(456) \rangle$


I'm using the Android client. I've posted a picture which I would like to rotate (say, clockwise 90 degrees). How can I accomplish this without editing my original picture and reuploading?

Is there a way to quickly rotate a picture in the SE editor without saving it on disk and rotating it in some image tool and reuploading it?  E.g. consider the picture below, assume I would like to quickly rotate it 90 degrees and wanted to do it expressly in the editor without the drudgery of saving it on disk, is there a shortcut in the stack exchange "markup language"?  If this feature is not available, I would like to nominate it for implementation.


Im trying to test command line arguments in Java.  I am typing the name of my program then -c, like below  java myprogram -c   here is my code      System.out.println(args[0]);     System.out.println(args.length);     if (args[0]== "-c")         System.out.println("YES");   when I run the program I get:  -c 1   but not the YES.... can anyone tell me why?

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


A long while ago (at university) I learned the following (fairly standard) method for evaluating $I:=\int_{-\infty}^{\infty}e^{-z^2}dz$ by squaring $I$ then using polar coordinates:  $$ \begin{align} I^2 &= \int_{-\infty}^{\infty}e^{-z^2}dz \int_{-\infty}^{\infty}e^{-z^2}dz \\ &= 4\int_{0}^{\infty}e^{-x^2}dx \int_{0}^{\infty}e^{-y^2}dy \\ &= 4\int_{0}^{\infty}\int_{0}^{\infty}e^{-x^2}e^{-y^2}dxdy \\ &= 4\int_{0}^{\infty}\int_{0}^{\infty}e^{-(x^2+y^2)}dxdy \\ &= 4\int_{0}^{\frac{\pi}{2}}\int_{0}^{\infty}e^{-r^2}rdrd\theta \\ &= 2\pi\int_{0}^{\infty}re^{-r^2}dr \\ &= \pi \left[ -e^{-r^2} \right]_{0}^{\infty} \\ &= \pi \end{align} \\ \\ \implies I=\sqrt{\pi} $$  I remember being amazed at the ingenuity of that first line: squaring $I$ in order to turn the single integral into a double integral.  I am curious whether any other methods are known for evaluating $I$. Especially methods that do not begin by squaring $I$.  I have not been able to do anything worthwhile with it myself. My research has yielded  method that does not require polar coordinates but still begins by squaring $I$. I have also considered complex integration using a clever contour but have not managed to complete a method.  Does anybody know of any other methods?

We know that the integral $$ I = \int_{-\infty}^{\infty}  e^{-x^2}\ \mathrm{d} x $$ can be calculated by first squaring it and then treat it as a $2$-dimensional integral in the plane and integrate it in polar coordinates. Are there any other ways to calculate it?  I know that we may use the relation $$\Gamma(x)\, \Gamma(1-x) = \frac{\pi}{\sin{\pi x}}$$ but this, in effect, is still taking the square. Well, after I write down the above text, I figure that maybe there is no way to calculate it without squaring, since, after all, the result contains a square root, and it seems no elementary function can "naturally" produce a square root of $\pi$ starting from natural numbers (though I don't know how to describe this more concretely; you are also welcome to comment on this point).  Nevertheless I still post this question in case there are some other ideas. EDIT: the Fourier transformation method at  appears kind of cheat to me, since the very proof of the Fourier transformation formula actually makes use of the value of the Gauss integral (at least in this wiki page ). Thank you.


I've been playing around with the Matasano crypto challenges (cryptopals.com). I had a couple false-starts on the challenge that has you creating a program to calculate the key size of a XOR encrypted file using Hamming Distance of the bits (Index of Coincidence). After some head banging and pen and paper work on graph paper, I arrived at a working solution.  I've been playing around with my new toy script with different ciphertexts and key lengths and I noticed that for key sizes greater than 12 bytes, it works well (in my limited testing) and will accurately return the correct key size. For shorter key sizes, the most probable key length returned is a multiple of the correct key size. In fact the first few most probable key sizes are multiples of the correct key size and then the correct key size will appear further down in the results but with a higher probability ranking (based on Hamming Distance), than smaller, incorrect values.  Here's some examples that demonstrate what I'm talking about:  key = "eatoin shrdlu"  key.length  13  Let's XOR encrypt our plaintext with the key and get cipherText:  cipherText = XOR-Encrypt -String data -key key  cipherText (line breaks added) 21041a01001d003501010c090745151503021d000401060c4c31040f54240803491d1b191d4c14 070e011b491a4816482421223a2841161a0e4200070017441a140914114f060800050100101914 0941190e0a06491d0d52011f160411111c454e571b1152011a1017181b010c4e57120606174c01 0a41190e020b00161e171615550714134f1d0645531f1d161f01450e1a0a49014653091e084c01 0c0c114f061c00191d01104c14450301010a06001c0e520c1505004115010d4e571b090644181d 004135190c0047161a014404141304541b064e441c48050d181d45170103070b52120a1b080501 1c4110061a0d4c1c1b0716095b  Let's run this through the XOR brute forcer to see what it says about the key size:  XOR-Brutr -MaxKeySize 40 -String cipherText -Encoding base16 | Sort-Object AvgDist  KeySize          AvgDist -------          ------- 13               2.74660633484163 39               2.78461538461538 26               2.81730769230769 33               2.8989898989899 40               2.905 25               2.93 38               2.94210526315789 ...    Beautiful! The result correctly calculates that the key size is 13 bytes, but with smaller keys....  key = "eatoin shrdl"  key.length  12  cipherText = XOR-Encrypt -String data -key key  XOR-Brutr -MaxKeySize 40 -String cipherText -Encoding base16 | Sort-Object AvgDist  KeySize          AvgDist -------          ------- 24               2.58333333333333 36               2.66111111111111 38               2.85789473684211 40               2.915 19               2.95215311004785 29               2.97536945812808 22               3.00909090909091 16               3.02232142857143 23               3.03381642512077 18               3.03703703703704 37               3.03783783783784 14               3.05357142857143 30               3.05714285714286 32               3.0625 27               3.06481481481481 12               3.06578947368421 28               3.06632653061224 ...   Our top result is not 12, though 12 is the greatest common denominator of the top two results.  If we set the MaxKeySize to a higher value and use a 26 byte key:  key = "eatoin shrdluuldrhs niotae"  ciphertext = XOR-Encrypt -String data -key key  XOR-Brutr -MaxKeySize 104 -String CipherText -Encoding base16 | sort avgdist | select -First 10  KeySize          AvgDist -------          ------- 52               2.59615384615385 78               2.62179487179487 104              2.64423076923077 81               2.66666666666667 26               2.66826923076923 84               2.67857142857143 ...   Again, a multiple of the actual key rises to the top.  Question: Why does this pattern emerge? Why does the Hamming Distance favor multiples of the actual key size? Should my script determine the gcd of the first few results and weight the gcd more heavily and return it as the probable key?


So I have this old ZTE and I can't find a way to bypass the frp I looked all over online and nothing for the touchscreen hard button model like this I just bypassed a galaxy s7 running oreo for a friend so I thought for sure this phone would have a bypass that you can do using the phone itself

I won a Samsung Galaxy S6 Edge, signed into it with my Google account, played around with it, wiped it, and sold it.  Now the person can't get past setup because it's saying he must login with an account previously synced to the phone.   Is there anything I can do from my side to remove this lock?


Every individual has two parents, four grand-parents and so on. This would yield an astronomical number of ancestors even after a small number of generations, e.g. 235 ∼ 34 billions. The solution to this paradox is called  which takes into account that some of the ancestors in the binary  are identical, i.e. one and the same subject. This leads to a decrease of the number of ancestors of a given generation.     Are there any empirical statistics about the average number of ancestors of   generation -1, -2, -3, etc. in a given population.   The average number of parents is exactly 2, the average number of grand-parents is slightly less than 4, and so on.  Which mathematical model might yield sensible numbers? Does anyone know a reference?

I was thinking about something the other day (that is probably stupid), and thought this would be a good place to talk about it.  If someone wanted to draw its family tree over the last 1000 years, he'd write a binary tree with a depth of about 40 (counting 25 years on average between each generations). This tree would have 240 leaves, or about 1012 ancestors on the deeper level. That is obviously much more than the total world population and a stupid figure when you think about it.  The only explanation that I can think of is that a real genealogy tree must have "linked" branches at several levels that change the actual number of ancestors. Anyway, for an average person, how many ancestors would that make? Could one assume that all or nearly all of the persons that lived in its country or world region a 1000 years ago would be part of its ancestors?


I'm one of these people who tends to leave a comment when I downvote and every now and then, the OP edits their post and pings me back they did and then I remove my downvote most of the time and even upvote every once in a blue moon...  :-)  However, I noticed that one of my comments on one of my downvotes was upvoted 3 times and the answer was downvoted for the same amount of times but now it's actually a good answer. (and I have no way of contacting the additional 3 downvoters)  Can we have an additional option¹ to be pinged whenever an edit was made on one of our downvotes for the few times that I don't leave a comment?  Note¹: Optional because there might be people who don't want any extra pings because they get too many already. Note²: It would be more welcoming to new users who generally don't know how the SE network works and get downvotes because of semantics and not because of their actual question or answer... Note³:  and highly upvoted, but that one is asking to make it mandatory, whereas this is broader and optional.

Problem: A lot of the time I downvote something that clearly shows lack of research or effort on OP's part, and when they edit to improve it, I usually find out pretty late, because there are no notifications to help with that.  Proposition: add a Get notified when this post is edited button/checkbox under a post which you have downvoted (per post, not just all posts ever), so that if there is a significant improvement, you could remove your downvote or even change it to an upvote to show you recognize the improvement.  I believe this would improve public thinking about votes, and make people (who choose to participate like this on the SE sites more often) vote more freely and more often, and everybody else would not think of a <0 post score as a death sentence for their contribution.  I'm not asking to enable this on SO (for a number of obvious reasons), and that's why I propose an opt-in subscription. This would be most useful on lower activity sites like the SE, in my opinion, but who knows.    I want to know if someone has improved their post after a downvote to reinforce the positive behavior and I get -4 on my good intentions? What kind of culture are you trying to cultivate? Please, explain why you disagree without silently downvoting. If you think there's a better way, yes, I want to know your thoughts.


After reading the following blog post and YouTube video:       I would like to try out GNOME 3.12. How do I install it on my saucy(amd64)?

I followed the instructions for compiling GNOME Shell and it did compile with a few errors here and there but it didn't run. I installed GNOME Shell using sudo apt-get install gnome-shell but I got version 2.31.x, while the latest is 2.91.5 or something. So is there a way for me to install the latest build?   Is there some repository available for the latest build?


I am using minion math font to change the operator as minion math.  I successfully changed display math operator like \sum, \int etc.,  But I am unable to change the Minion Math font "Math Delimiter" like   \big( \big), \Big( \Big), \bigg( \bigg), \Bigg( \Bigg) \big[ \big], \Big[ \Big], \bigg[ \bigg], \Bigg[ \Bigg] \left( \right) \left[ \right]   MWE:  \documentclass{book}  \usepackage{amsmath} \usepackage{amssymb}  \makeatletter \DeclareFontEncoding{MXP}{}{} \DeclareFontSubstitution{MXP}{minionmath}{m}{n} \DeclareSymbolFont{operators}{OT1}{minionmath}{m}{n} \DeclareSymbolFont{MMlargesymbols}{MXP}{minionmath}{d}{n} \let\sum\relax \let\intop\relax \DeclareMathSymbol{\sum}{\mathop}{MMlargesymbols}{"48} \DeclareMathSymbol{\intop}{\mathop}{MMlargesymbols}{"50}     \def\int{\intop\nolimits}  \DeclareMathDelimiter{\lgroup} % extensible ( with sharper tips      {\mathopen}{MMlargesymbols}{"3A}{largesymbols}{"3A} \DeclareMathDelimiter{\rgroup} % extensible ) with sharper tips      {\mathclose}{MMlargesymbols}{"3B}{largesymbols}{"3B} \makeatother  \begin{document}    I need to fix the minion math font below mentioned Math Delimiters  \begin{align*} &\big(\sum\frac{a}{b} \big), \Big(\int \frac{a}{b}\Big), \bigg(\frac{a}{b} \bigg), \Bigg(\frac{a}{b} \Bigg)\\ &\big[ \frac{a}{b}\big], \Big[\frac{a}{b} \Big], \bigg[\frac{a}{b} \bigg], \Bigg[\frac{a}{b} \Bigg]\\ &\left( \frac{a}{b}\right)\\ &\left[ \frac{a}{b}\right] \end{align*}   \end{document}   Current Output:  Now I change the \sum, \int symbols in my current output.  But I am unable to change the font "Math Delimiter". How to fix this issue  Please advise.

Is there a general way to change the font of a particular symbol without switching packages?  For example, suppose I'm using Computer Modern for my entire document, but I want the "subset" operator to look as it does in mathabx.  How can I redefine it to appear in this way?


I have an application running on my desktop which uses TCP sockets to establish connection with another card reader . a rough description of how the devices are connected is as shown below  Desktop - (hosting the application) connected to an external connector | card reader also connected to the same connector  Each time application wants to connect to  the card reader it establishes a TCP/IP socket connection and sends data to a particular port.  how can a utility in c#,be written which keeps track of the card reader and intimates my application as soon the card reader is disconnected or out of network

What is the best way to determine if there is a network connection available?


I am creating a new environment. At the moment it uses tabular and I want to port it to tabularx.  An isolated tabularx table works, but the same table used as an environment fails to compile.  \documentclass{article} \usepackage{tabularx} \begin{document}  \newenvironment{asidex}% {%     \begin{tabularx}{0.5\textwidth}{|l|} }% {%     \end{tabularx}% }  \newenvironment{aside}% {%     \begin{tabular}{|l|} }% {%     \end{tabular}% }  \begin{aside}  % <------------------------ change this to asidex     xxx \end{aside}    % <------------------------ change this to asidex  \begin{tabularx}{0.5\textwidth}{|l|} % <-- this plain table works foo \end{tabularx}  \end{document}   In the above, aside works, but if you change the envionment to use asidex, it fails to compile with  ! Missing } inserted. <inserted text>                  } l.27 \end{tabularx}   What's odd is that the begin...end seems like it should be reproducing the "plain table" at the bottom. The plain table compiles, but the same table when produced for the asidex environment doesn't.  What's happening here?

Why can't I define an environment, that encloses another tabularx environment inside it?  For example, why can't I do this:  \newenvironment{customTabular}{     % This is the begin code     \begin{tabularx}{\linewidth}{l l X} } {     % This is the end code     \end{customTabular} }   and then use it like:  \begin{customTabular}         Blah & Blah & Blah\\ \end{customeTabular}


Sometimes an entity's (be it a person, company, or a government) predictions/choices/decisions seem to be completely arbitrary (based on no evidence or observation).  A very colorful example of this is . When learning that a bank is going bankrupt, a board of judges or whatever decapitate a chicken, and throws its beheaded body into a pit divided into different areas with actions written on them, such as "Bail out", "Do nothing", "Pay $10000", "Sue", etc. The headless chicken runs around for a while until it finally drops motionless on one of the areas in the pit. The judges' verdict is based on where the dead chicken lands.   In Armenian we have an idiom "մատից հոտ քաշել", which literally means "to smell one's finger". Smelling one's finger, of course, does not give one any useful informations, so basing one's forecasts/choices on the "results" of smelling one's finger is completely random and arbitrary. For example, in Armenian one could say:     You can't trust the weather forecast. I think they simply smell their finger and come up with a prediction.   or     How does he know all this?   He doesn't, he just smelled his finger. (i.e. his claims are based on nothing)   or (in a maths class)     Teacher: Can a rational number raised to the power of an irrational number be a rational number?   Student: Yes.   Teacher: See, you have to prove it, you don't get to just smell your finger and answer yes or no.   Hopefully the South Park example and the մատից հոտ քաշել examples fully convey what situations I am talking about. So what idioms are there in English that can describe the arbitrary decision-making/choices?

I want to compare two things, one of which is random and the other is not, in favor of the latter. I'd like to do it in a more sophisticated way than simply using the word "random".  Like, for example,     In this case, your pay will not depend on the roll of the dice.   But Google Ngrams doesn't find a single occurrence of "depend on the roll of the dice", so I guess there's something wrong with this particular phrase. What would be a better substitute?


So I have an animated scene where the camera goes through a window into a house. The only issue is that the ceiling of the house is white (EDIT: it's actually not the ceiling, but the area lamp that's inside — see edit log at the bottom) while the camera looks into it from outside and I have no idea why. On top of that, a character's head is partially cut off, too - only when rendered through the glass.  PROBLEM:    [Rendered looking THROUGH the window]      [Rendered from INSIDE]    SCENE:    [This is what the scene looks like with the window plane hidden via "H"]      [These are the material properties of the glass. It's also been extruded.]      [And these are the materials of the house. Regular image textures UV unwrapped and assigned to the necessary faces.]    RENDER SETTINGS:  GPU rendering Cycles 1080*1920/25 Clamp direct: 1.11 Clamp indirect: 1.17 100 samples Bounces: between 5 and 0; Diffuse: 2; Glossy: 2; Transmission: 12 1/50 motion blur 256*256 spiral  The rest is set to default.    If you have any idea on how to solve this, please share it with me.  EDIT: So I just realised that the whiteness might not be the house itself, but the AREA LAMP that's inside!! And the guy's head is cut off, since that part is in the physical area of the lamp object! Now the only thing I don't know is what to change. If I simply rised the lamp, it would cure the problem with the guy's head, but the whiteness would still be there.  The lamp is - as I already said - an aerial light, its size is 3.433 , max bounces: 1024 , streght: 30

I did setup an easy scene with an area light behind a window. In the glass (simple plane) which is in front the area light is visible - how can I turn this off so that the background is shining throgh?


I just noticed that they messed up my place of birth and I need to have that corrected.  My issue is that I have to apply (quickly) for a business visa to India but now it seems I'll have to wait until I get the correction back.  Will my passport number change if it's a print error that they need to correct or will it stay the same and I can apply for my visa while I wait for my corrected passport to return?

I'm travelling soon but need to renew my passport.  Given that I have to provide my passport number to the airline to book a flight, I was wondering if my passport number would change if I renew it.  Or would the number stay the same and the expiry date just change?  I'm asking specifically as an Australian citizen, although I suspect a 'common' answer (if there is a general way this works) might be useful too.


I just hooked my Samsung Galaxy S3 up to my PC via USB to transfer some photos from one folder to another on the device itself.  Well, the USB cable got accidentally unplugged during the process, and I lost all the photos that didn't have a chance to transfer before the device got unplugged.  Is there a way to retrieve these photos as I cannot get a drive letter when I plug it in, and Samsung does not offer a Mass Storage Device option for this phone.  I really need to recover these photos. Any help would be greatly appreciated!

I just deleted a file on my Nexus S that I really need back. (It was actually part of an app using a sqlite database that did a drop table when upgrading to a new version.)  Presumably I need to root the phone first (which I hear is easy on Nexus phones) but am I in a catch-22 here? Namely, does rooting the phone mean wiping/overwriting the partition where the data lives?  If not, what do you recommend for data recovery tools? Presumably the file was just unlinked and not actively overwritten (per usual when "deleting" a file) so technically the data must be there...


This is the problem in the book 'Classical and multilinear harmonic analysis, volume 1'  Let $f(x)=\sum_{n=0}^{N}[a_{n}\cos{2\pi nx}+b_{n}\sin{2\pi nx}]$ be a nonnegative function defiend on $[0,1]$. Show that there exists an complex sequence $\{c_{n} \}_{n=0}^{N}$ such that $$f(x)=|\sum_{n=0}^{N}c_{n}e^{2\pi inx}|^2$$  I have no idea. How can we use the property that $f$ is a positive function?

I'm trying to solve exercise 5 in chapter 14 of Rudin's Real & Complex Analysis:     Suppose $f$ is a trigonometric polynomial,   $$f(\theta) = \sum_{k=-n}^n a_k e^{ik\theta}$$   and $f(\theta) > 0$ for all real $\theta$. Prove that there is a polynomial $P(z) = c_0 + c_1z + ... + c_nz^n$ such that $f(\theta)= |P(e^{i\theta})|^2$ ($\theta$ real).   I've made good progress but I can not finish it. My thoughts:  Define $F(z) = \sum_{k=-n}^n a_k z^k$. This is a rational function that is positive on the unit circle so it must be of the form: $$F(z) = c \prod_{j=1}^n\frac{(z-\beta_j)(1-\overline\beta_j z)}{(z-\gamma_j)(1-\overline\gamma_j z)}$$  where $c > 0$. $\beta_j$ are zeros of $F$. $\gamma_j$ are poles.  On the unit circle $$f(\theta) = F(e^{i\theta}) = c \prod_{j=1}^n\frac{(e^{i\theta}-\beta_j)(1-\overline\beta_j e^{i\theta})}{(e^{i\theta}-\gamma_j)(1-\overline\gamma_j e^{i\theta})}$$  The terms in the product simplify to $$\left| \frac{e^{i\theta} - \beta_j}{e^{i\theta} - \gamma_j} \right|^2$$  If I can show that this is a polynomial, I'll solve the exercise, but it doesn't look like a polynomial to me.  Is there a better way?


Sometime faces have vertices that not aligned in one plane.  For example if I have this (face should be flat here):    It rather should be like that:

Let's take a non-planar quad here for a simple example, how to only move one vertex on it, to finally make it planar while keeping the other three vertices still?


For example,   list = [0, 1, 2]   I want a list of all possible 2-combinations:  combinations = [(0,0), (0,1), (0,2), (1,0), (1,1), (1,2), (2,0), (2,1), (2,2)]   It seems to me that all the tools in itertools in Python only make one of (1,0) and (0,1), not both, I need both. Any suggestions, other than entering them by hand?

How can I get the Cartesian product (every possible combination of values) from a group of lists?  Input:   somelists = [    [1, 2, 3],    ['a', 'b'],    [4, 5] ]   Desired output:  [(1, 'a', 4), (1, 'a', 5), (1, 'b', 4), (1, 'b', 5), (2, 'a', 4), (2, 'a', 5) ...]


Here is the situation.  I have a directory which contains many files with different extensions. I want to delete all files except one with a specific name.  This could be easily done using the GUI by selecting all and pressing ctrl and deselecting the file in question.  That is exactly what I want to, but how can I do it from the command line?  For example:  dirA contains the following files:  a.txt b.txt c.php d.html a.db b.db e.html   I want to delete all files keeping only the file named a.txt.

I have a directory that contains the following:  x.pdf y.zip z.mp3 a.pdf   I want to delete all files apart from x.pdf and a.pdf. How do I do this from the terminal? There are no subdirectories so no need for any recursion.


I have recently installed ubuntu. And I am facing an issue of Wifi that is not working since installation. On running:  sudo lshw -c network   I get the following message on wireless network:  *-network UNCLAIMED    description: Network controller    product: Intel Corporation    vendor: Intel Corporation    physical id: 0    bus info: pci@0000:05:00.0    version: 10    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress cap_list    configuration: latency=0    resources: memory:b4000000-b4001fff   and on running   iwconfig   I get:  lo        no wireless extensions.  enp0s20f0u2  no wireless extensions.  eno1      no wireless extensions.   and lspci -nnk | grep A2 Network gives:  05:00.0 Network controller [0280]: Intel Corporation Device [8086:24fb] (rev 10) DeviceName: Intel Dual BandWireless-AC 3168 802.11 ac 1x1 WiFi + BT 4.0  Combo Adapter     Subsystem: Intel Corporation Device [8086:2110]   I am new to Ubuntu please help me.

I searched many solutions on this site but most of them were referring to Broadcom Wifi drivers while mine has Intel one.   Output of lspci -knn | grep Net -A2  arijit@HP-AU134TX:~$ lspci -knn | grep Net -A2  05:00.0 Network controller [0280]: Intel Corporation Device [8086:24fb] (rev 10) DeviceName: Intel Dual BandWireless-AC 3168 802.11 ac 1x1 WiFi + BT 4.0 Combo Adapter Subsystem: Intel Corporation Device [8086:2110]   Output of rfkill list  arijit@HP-AU134TX:~$ rfkill list  arijit@HP-AU134TX:~$    i.e No Output  Output of uname -a; dmesg | grep iwl  arijit@HP-AU134TX:~$ uname -a; dmesg | grep iwl  Linux HP-AU134TX 4.4.0-31-generic #50-Ubuntu SMP Wed Jul 13 00:07:12 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux


Safari's Show All Tabs view is pretty useless, it only shows one tab at a time and is fairly easy to trigger with an accidental pinch gesture. How do I turn it off (as least for the pinch gesture)?

When looking at a PDF document I often want to zoom-out to scroll quickly to its contents and get an overview.  However, when I zoom-out past a certain threshold (it seems to differ per PDF) Safari thinks I want to see the tab overview:    I have never found a use for this function, so it only causes annoyance.  Can I turn this tab overview off somehow? A solution that uncouples the pinch-to-zoom gesture from the functionality would also work.  I'm on Mountain Lion 10.8.5 with Safari 6.1.3.


Let $f,g\in C(\mathbb{R},\mathbb{R})$ where $g(x+1)=g(x) \; \forall x\in \mathbb{R}$. Prove that \begin{equation} \lim_{n\rightarrow\infty} \int_0^1 f(x)g(nx)dx=\int_0^1f(x)dx \int_0^1g(x)dx . \end{equation}

Let $f:[0,1] \longrightarrow \mathbb R$ be a continuous function, and let $g:\mathbb R \longrightarrow \mathbb R$ be a continuous and periodic function with period $1$. Prove that   $\displaystyle\lim_{n\to \infty}\int_0^1f(x)g(nx)dx=\left(\int_0^1f(x)dx\right)\left(\int_0^1g(x)dx\right)$.  any Ideas?


I have created a Debian package say a-1.0 which copies some files to a location. now that if the files copied have changed, should i create a new package with new files? or is there any way we can do a upgrade to the package as a-1.1 which replaces the old files with new one?  Is there any perfect tutorial which can say about Debian packaging which also include how we can perform a major and minor upgrade to created .deb package.

I created a .deb which installs some features and copies some library to /usr/lib/ location.  Now that if I have changed  one of the .so file in the package and want to update the same to Debian package, what could be the scenario.   Simply how can i update files after installing the package. In windows the same is achieved by .MSP files to corresponding .MSI . How can I do the same in ubuntu?  Any help is appreciated.Thanks in advance.


My problem is to integrate this expression:  $$\int_0^{2\pi}\log(1-2r\cos x +r^2)dx.$$ where $r$ is any constant in $[0,1]$.  I know the answer is zero. Can you explain you idea to me or just prove that? Maybe you will use the "Cauchy integral theorem ".

For $a\ge 0$ let's define $$I(a)=\int_{0}^{\pi}\ln\left(1-2a\cos x+a^2\right)dx.$$ Find explicit formula for $I(a)$.   My attempt: Let  $$\begin{align*} f_n(x) &= \frac{\ln\left(1-2 \left(a+\frac{1}{n}\right)\cos x+\left(a+\frac{1}{n}\right)^2\right)-\ln\left(1-2a\cos x+a^2\right)}{\frac{1}{n}}\\ &=\frac{\ln\left(\displaystyle\frac{1-2 \left(a+\frac{1}{n}\right)\cos x+\left(a+\frac{1}{n}\right)^2}{1-2a\cos x+a^2}\right)}{\frac{1}{n}}\\ &=\frac{\ln\left(1+\dfrac{1}{n}\left(\displaystyle\frac{2a-2\cos x+\frac{1}{n}}{1-2a\cos x+a^2}\right)\right)}{\frac{1}{n}}. \end{align*}$$ Now it is easy to see that $f_n(x) \to \frac{2a-2\cos x}{1-2a\cos x+a^2}$ as $n \to \infty$. $|f_n(x)|\le \frac{2a+2}{(1-a)^2}$ RHS is integrable so $\lim_{n\to\infty}\int_0^\pi f_n(x)dx = \int_0^\pi \frac{2a-2\cos x}{1-2a\cos x+a^2} dx=I'(a)$. But  $$\int_0^\pi \frac{2a-2\cos x}{1-2a\cos x+a^2}=\int_0^\pi\left(1-\frac{(1-a)^2}{1-2a\cos x+a^2}\right)dx.$$ Consider $$\int_0^\pi\frac{dx}{1-2a\cos x+a^2}=\int_0^\infty\frac{\frac{dy}{1+t^2}}{1-2a\frac{1-t^2}{1+t^2}+a^2}=\int_0^\infty\frac{dt}{1+t^2-2a(1-t^2)+a^2(1+t^2)}=\int_0^\infty\frac{dt}{(1-a)^2+\left((1+a)t\right)^2}\stackrel{(*)}{=}\frac{1}{(1-a)^2}\int_0^\infty\frac{dt}{1+\left(\frac{1+a}{1-a}t\right)^2}=\frac{1}{(1-a)(1+a)}\int_0^\infty\frac{du}{1+u^2}=\frac{1}{(1-a)(1+a)}\frac{\pi}{2}.$$ So $$I'(a)=\frac{\pi}{2}\left(2-\frac{1-a}{1+a}\right)\Rightarrow I(a)=\frac{\pi}{2}\left(3a-2\ln\left(a+1\right)\right).$$  It looks too easy, is there any crucial lack?  $(*)$ — we have to check $a=1$ here by hand and actually consider $[0,1), (1,\infty)$ but result on these two intervals may differ only by constant - it may be important but in my opinion not crucial for this proof.


I want to convert 240V AC 50hz to 12V DC without transformer.I want the output (12V) to drive 25 white LEDs.The circuit is giving an output of ~14V DC.But the problem is that it is also giving out ~30V AC.Is it OK to use this for my task or is it harmful (for LED's).What should be done to eliminate the AC component?I even tried using an extra 1N4007 diode at the O/P but no use. Following is the circuit diagram.   EDIT: My Multimeter shows 0V AC for a 12V 1A power source.So that means my Multimeter is working fine.Is it not?

I just got my first multimeter and when I measured a 12V 1.2ah lead-acid battery I get AC 28.8V and DC 13.4V. Is this normal?  In addition I tested an AA 1.5V battery and I got 2.9V (AC setting 200) and 1.58V (DC setting 20).  Is my multimeter broken?   The meter is a  and the lowest AC range is 200V.  LATE UPDATE I went to the store and tested another UT33C and it also displayed an AC voltage. I asked to try a different model (UT39A) and it correctly displayed 0VAC when I tested an AA battery, so I exchanged my multimeter for the other model. Thanks.


Along the coast of northern California grow huge, towering trees. Why the comma is between huge and towering?

Example:  A tall(,) green pole.   says that cumulative adjectives don't need comma. In my example, "tall" describes shape, and "green" describes color. So they are cumulative adjectives. But  says that "tall" and "green" are equivalent and coordinate adjectives ... I'm confused. Should there be a comma or not?