paste url into terminal(urxvt, zsh) failed, some characters get escaped

In recent months, I find that if I copy the url in chrome and then Shift Insert in the urxvt, the pasted url is escaped.  For example, the original url is:  http://example.com/?a=c   the pasted content is:  http://example.com/\?a\=c   But if I paste it into other places, such as in the web browser or in the vim, there is no escape.  What I use is arch linux, urxvt, zsh, oh-my-zsh.


How to automatically commit only src folder (and its content) of each projects with SVN

I have a repository called "Random_Projects". Under it, I have small Java mini-projects.  Let's say it look something like this:  Random_Projects         |__ Some_project         |       |         |       |__ build         |       |   |__ <some files>         |       |         |       |__ lib         |       |   |__ <some files>         |       |         |       |__ src         |           |__ source_code_1.java         |           |__ another_source.java         |         |__ Different_Project         |       |         |       |__ build         |       |   |__ <some files>         |       |         |       |__ lib         |       |   |__ <some files>         |       |         |       |__ src         |           |__ different_source.java         |           |__ source_different.java         |         |__ <more projects with same structure>   The only things I need to be sync between my machine (via SVN) is the src folder and the content inside it.  How should I configure my SVN to ignore everything except for the src folder of each java mini-projects in my _Random_Projects_ repository?    EDIT #1  So the  shows that sparse checkouts might solve the issue. However, from what I read, it is used only when the repo has all the files and you want to only retrieve (update) specific files/directories.  My case is different because I have to download everything except for the source folder from a different source. To top it off, my targeted directory is under a directory of unknown name (so what I want to be versioned is: repo/*/src/*)  In short:  Is there a way to have SVN automatically version files in this pattern: ./*/src/*?


I updated my MiKTeX today. Now, I do not get any error without packages but it can not compile my latex files with packages.  Uninstalling and reinstalling both Texmaker and Miktex did not work. I could not find l3regex.sty file on internet.     LaTeX Error: File `l3regex.sty' not found.   My packages:  \usepackage[colorlinks=true, linkcolor = blue, urlcolor  = blue, citecolor = blue, anchorcolor = red]{hyperref}   \usepackage[utf8]{inputenc}   \usepackage[top=1cm, bottom=2cm, left=1.5cm, right=1.5cm]{geometry}   \usepackage{amsfonts}   \usepackage{amsmath}   \usepackage{amssymb}   \usepackage{graphicx}   \usepackage{microtype}   \DisableLigatures{encoding = *, family = * }   \usepackage{coloring}   \pagenumbering{gobble}


Is it possible to symlink file to system folders?

Let's say there is a script in my home folder I would like to use in /etc/cron.* folder or in other system folders. Is there any way how to do it without copying the file to the target location?  Would symlink or hardlink do the job? I tried that out and it seems it's not working. Why not? Permission of symlink and the script seems to be OK.  Thank you for you explanation.


Is it true that $ U \oplus W_1 = U \oplus W_2 \implies W_1 = W_2 $?

Is it true that if $ U \oplus W_1 = U \oplus W_2 $, then $ W_1 = W_2 $? I think that if $ U \oplus W_1 = U \oplus W_2 $, then u+w1=u+w2, so W1=W2. But did I make any mistakes?


Does Find My Mac stop working after the system has been wiped?

Possible Duplicate:          I lost my Macbook Pro recently. I had activated iCloud on the computer, so Find My Mac is operable.   If the thief wipes the hard drive, and installs a fresh operating system, OSX Lion or Leopard, for example, then will I still be able to locate my device? In particular if the thief installs Leopard (which obviously doesn't support Find my Mac) will Find My Mac still work?


Is it possible to get the ip address of the user (visitor of my website) without using server side language like PHP?  I have a problem while using the server language (PHP) because of load balancer for my server. I tried http_x_forwared_for that is also not retrieving the perfect ip address.


Dissolving creates fragments in the middle

When dissolving a polygon shapefile I get fragments in the middle (see pictures) in Qgis and R using the functions from rgeos. Has anybody an idea where this comes from and what can be done to deal with this?   original data set showing municipalities   dissolved dataset showing fragments in the middle    I would like to have only the contour of all municipalities without the fragments...


Preserving the "find what" when doing "replace with" in notepad++

I have a list of many ids, and I want to append a character at the end of each one of them in notepad++ Let's assume I have this list:  sometextsometext 123456 321456772 654789 sometextsomemoretext 12347848 988422 135476446 548843 4911232 randomtexttexttext 666654 randomtextoftherandomvariety 88946   Now I would like to find those codes and replace them with themselves followed by a character. Something like find what: [0-9]+ replace with: "$0,' -'" My desired output is:  sometextsometext 123456 - 321456772 - 654789 - sometextsomemoretext 12347848 - 988422 - 135476446 - 548843 - 4911232 - randomtexttexttext 666654 - randomtextoftherandomvariety 88946 -


Why do the rail tracks seem to converge and vanish?

Why do railway tracks seem to converge at a far away point?   Can this phenomenon occur with a very far away tall wall (considering I stand on a flat plane, not the curved surface of earth).   Isn't this the same phenomenon that explains why sun looks so small?  Aren't the light Rays reflected from the object parallel?  (NOT A DUPLICATE OF PREVIOUS QUESTION BECAUSE THE MAIN QUESTION IS THE SECOND ONE. THE PRECEEDING QUESTION SETS THE CONTEXT OF THE NEXT.)


Why does using `yes` on bash pipelines *not* cause infinite loops?

According to its documentation, bash waits until all commands in a pipeline have finished running before continuing     The shell waits for all commands in the pipeline to terminate before returning a value.   So why does the command yes | true finish immediately? Shouldn't the yes loop forever and cause the pipeline to never return?    And a subquestion: according to the , shell pipelines may choose to either return after the last command finishes or wait until all the commands finish. Do common shells have different behavior in this sense? Are there any shells where yes | true will loop forever?


LWJGL—How to Animate Sprites from a Sprite Sheet Using Certain Keys?

I'm talking here about walking animations and such for a 16-bit RPG. I have a simple sprite sheet that contains walking animations for all directions (up, left, down, and right), but I'm having trouble getting LWJGL to animate them—how would I do it?


Show tilde in footnote, with correct text formatting

I need to show a unix url in a footnote of my article document. Some of the posts such as  have been very helpful, but I still have some questions.  I am using URL package. In my footnote I tried something like     \url{http://www.site1.ext/~hello}   to show the unix URL, my questions are:  1- This changes the font of footnote. How can I ensure it is using the default footnote text similar to my other footnotes?   2- When I click on the address, it does not generate the correct url.  I have to adhere to some specific packages and guidelines so I may not be able to use certain packages. Any help is highly appreciated to guide me resolve this with simplest solutions.


Linearity of convergence in distribution of random variables

if $X_n$ converges to $X$ and $Y_n$ converges to $Y$ in distribution, what about $X_n + Y_n $ would that converge to $X+Y$ in distribution ? any ideas how i could prove or disprove this


$\sqrt{X}$ where $X$ is a positive definite matrix is smooth $C^{\infty}$

I'm trying to prove the following statement.  Let $P_n \subset Mat_{nxn}(\mathbb R)$ be the set of all symmetric positive definite matrices with real entries of size $n$x$n$.  Let $\sqrt{}:P_n \to P_n$ such that $\sqrt{A}=B$ where $B^2=A$ (From Linear Algebra 2, we know that there is such a matrix and there is only one, so this function is well defined).  Show that $\sqrt{}$ is smooth $C^{\infty}$, meaning, it is differentiable $\infty$ times and each differential (which can be seen as a linear transformation) is continuous.  Would appreciate any push in the right direction. This is not homework, I am preparing for an exam.


Why does a rainbow only form with a 42° angle?

Why do rainbows only form with a 42° angle? Is there something special about this angle?


I purchased a "Y-hibiscus starter" from the tropical island's shop today.  After some research I discovered that this would grow into a new class of plants -- bushes.  Do bushes have the same growing patterns and restrictions as trees?  For example, can they be planted near structures?  Can they be planted next to each other?


Why does Sentinel limit a character to attacking only creatures that target characters without Sentinel?

The third bullet of the sentinel feat text reads:     When a creature makes an attack   against a target other than you (and that target doesn't   have this feat), you can use your reaction to make a   melee weapon attack against the attacking creature.   This reads to me as saying if both I and the target of the original attack have sentinel, then I can't take the reaction attack.  Is this correct?  If so, does anyone have insight into why?  I could maybe understand if the text is actually in error and meant to say "and the attacking creature doesn't have this feat," but it pretty clearly doesn't actually say that.


While trying to install Docker with the command sudo apt install docker.io, I got the following error: $ sudo apt install docker.io  Reading package lists... Done Building dependency tree        Reading state information... Done The following additional packages will be installed:   cgroupfs-mount containerd pigz runc ubuntu-fan Suggested packages:   aufs-tools btrfs-progs debootstrap docker-doc rinse zfs-fuse | zfsutils The following NEW packages will be installed:   cgroupfs-mount containerd docker.io pigz runc ubuntu-fan 0 upgraded, 6 newly installed, 0 to remove and 49 not upgraded. 2 not fully installed or removed. Need to get 0 B/63.7 MB of archives. After this operation, 319 MB of additional disk space will be used. Do you want to continue? [Y/n]  debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable Setting up libpam0g:amd64 (1.1.8-3.6ubuntu2.18.04.2) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing package libpam0g:amd64 (--configure):  installed libpam0g:amd64 package post-installation script subprocess returned error exit status 1 Errors were encountered while processing:  libpam0g:amd64 E: Sub-process /usr/bin/dpkg returned an error code (1)  How can I fix this and install Docker?


Can I use SE after deactivating Facebook account?

Can I use StackExchange services if I deactivate my facebook account which I used for signing up to StackExchange? Can I change my SE nickname, or am I stuck to my Facebook login name?


Holding voltage high, for monostable 555 timer pulse

I want to know if there is a simple (and cheap) way to make a momentary button (for which we cannot control the time it holds when pressed!) press to virtually hold for about 1-2 seconds.  More precisely, I want to implement a low power consuming solution for a monostable-"mode" 555 timer. Thus when the button is "hit", the 555 Vcc pin will go HIGH for at least the amount of time required for one pulse to be sent out. After that the circuit will go back to stable 0V, until next hit.  Even more precisely - The pulse is used to move a small servo to a certain, constant, predetermined position.


need to find sum of $\sum_{k=1}^n \frac{(k-1)2^k}{k(k+1)}$

need to find sum of $$\sum_{k=1}^n \frac{(k-1)2^k}{k(k+1)}$$ this is much harder as I see. Or maybe it's my eyes, because I'm new in studying sums. I tried this one using differences , factorial  powers, didn't help.


How do I achieve a long shadow effect with Photoshop?

I've seen this kind of divider all over the web, how do I make this with Photoshop?


Is it necessary to store purchased sealed Coffee powder in freezer? Why?

I purchased few packets of 100 gms freshly ground and roasted Coffee powder. These packets do NOT have air filled in them like the chips packets.  Is it necessary to store purchased sealed roasted Coffee powder in freezer? Why?


What is a portfolio, and what should it consist of? Please include details such as the format, use of, number of items, types of items, etc.


How to speed up System Time programmatically?

I need to speed up PC System Time by adding a random number of seconds for each (for example) 200 milliseconds. I tried to solve this problem by looking at  thread.  using System; using System.Runtime.InteropServices; using System.Threading;  namespace TimeSpeedUp {     struct SystemTime     {         public ushort Year;         public ushort Month;         public ushort DayOfWeek;         public ushort Day;         public ushort Hour;         public ushort Minute;         public ushort Second;         public ushort Millisecond;     }     class Program     {         [DllImport("kernel32.dll", EntryPoint = "GetSystemTime", SetLastError = true)]         public extern static void Win32GetSystemTime(ref SystemTime sysTime);          [DllImport("kernel32.dll", EntryPoint = "SetSystemTime", SetLastError = true)]         public extern static bool Win32SetSystemTime(ref SystemTime sysTime);         public static Random Random = new Random();          static void Main(string[] args)         {             Timer timer = new Timer(SetTime);             timer.Change(0, 200);             while (true)             {                 ConsoleKeyInfo keyInfo = Console.ReadKey(true);                 if (keyInfo.Key == ConsoleKey.Escape)                 {                     break;                 }             }         }          public static void SetTime(object obj)         {             // Current time             SystemTime currentTime = new SystemTime();             Win32GetSystemTime(ref currentTime);             // Set system date and time             SystemTime updatedTime = new SystemTime();             updatedTime.Year = (ushort)currentTime.Year;             updatedTime.Month = (ushort)currentTime.Month;             updatedTime.Day = (ushort)currentTime.Day;             updatedTime.Hour = (ushort)currentTime.Hour;             updatedTime.Minute = (ushort)currentTime.Minute;             updatedTime.Second = (ushort)(currentTime.Second + Random.Next(1, 3));             // Call the unmanaged function that sets the new date and time instantly             Win32SetSystemTime(ref updatedTime);         }     } }


How can I safely compile other people's LaTeX documents?

I am a programmer and as part of a website I need to be able to take LaTeX source files and compile them, then return the pdf to the user. This seems dangerous since a malicious user could e.g. read and write files on server this way. Is it possible to 'clean' a LaTeX file so it's safe to compile or is it too complicated?


Installing Ubuntu 12.04LTS on WD Hard-drive: \ubuntu\winboot\wubildr.mbr Missing Error?

I've tried installing Ubuntu on my 1TB WD Hard-Drive. I've done this using EasyBCD, and on a Windows 7 PC. Problem is, after restarting my PC (and booting from the G:\ hard-drive), I get this error:  \ubuntu\winboot\wubildr.mbr   I checked the G:\ubuntu\winboot\wubildr.mbr and the file exists.    I've searched around for hours and the problem still persists. I can't understand what the solution is.  How to fix this?  P.S. I'm a beginner in Ubuntu, though I have used it as a production server and desktop environment for a week.


Prove that $\operatorname{rank}(A) + \operatorname{rank}(B) \ge \operatorname{rank}(A + B)$

Let $A,B$ be matrices $m\times n$ $(A, B \in M_{m\times n}(R))$. How can we prove that $$\operatorname{rank}(A+ B) \le \operatorname{rank}(A) + \operatorname{rank}(B)\ ?$$


Integrating NTv2-transformation in QGIS?

I am wondering what's the correct way to integrate a NTv2-transformation in QGIS.  I have successfully integrated a NTv2-transformation in QGIS but I am not sure if it's done the way it's meant to be.  For integrating NTV2-grids in QGIS I found several information that the name of the grid should be stored in the p1 column of the table tbl_datum_transform of the srs.db:            (Screenshot of  (german) )  What makes me doubt if that's correct is the fact that the column seems to  have a numeric field type:    Isn't the first parameter of a seven-parameter transformation stored in the p1 column of QGIS's tbl_datum_transform table?  According to the sqlite FAQ it's possible to store a string into a numeric column in sqlite (  ) but it seems to me like a hack or workaround to store a string into a numeric column. Is this really the way it's meant to be done?  tl;dr: What's the correct way to integrate a NTv2-transformation in QGIS?


Installing Wi-Fi driver for Realtek Semiconductor RTL8723DE Device [10ec:d723]

How do I install Wi-Fi drivers for Realtek RTL8723DE device in Ubuntu 16.04?  lspci -v | grep -i network 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device d723


How to compress entire drive C in Windows including locked files?

If I just set checkbox for compressing drive C in Windows Explorer, I will get numerous file sharing errors, because many files are opened when Windows is running.  Is it possible to compress drive in monopole mode somehow, so that it compress all files>


Why do color of things fade and where it goes?

Suddenly this question comes to mind when i saw a sticky-label faded, when compared to comparatively new one. So question here is does it simply fades away like physical particles or is there anything complex associated with it.


How to solve this NullPointerException? I it should avoid that

I'm building an app that uses json data from a server that changes everyday. Yesterday it worked perfectly. Today, however, i get the following error:     java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference   at this line(s) of code:  if(!endDate.equals("") && !endDate.equals(null) && !endDate.equals("null")) {       dates.append(" t/m ").append(endDate); }   To me it seems that the if statement should avoid the nullpointer exception... Do i miss something?


Jquery doesn't identify the class as a selector

I have two Jquery functions where one will insert a new dynamic row to a form on a button click and other function will validate the cell in that row.  var currentItem = 11; $('#addnew').click(function(){   currentItem++;   $('#items').val(currentItem);   var strToAdd = '
<select class="form-control select2 productSelect" name="product'+currentItem+'" id="product'+currentItem+'" style="width: 100%"> <option disabled selected value> -- select a Product -- </option>'+ <?php foreach ($productData as $product) { echo "'<option value=" . $product->product_id . ">" . $product->product_name . "</option>'+";}?> '</select> 	<input class="form-control quantitySelect" name="quantity'+currentItem+'" id ="quantity'+currentItem+'"type="text" />	<input class="form-control"  name="freeIssue'+currentItem+'" id="freeIssue'+currentItem+'" type="text" />	 <button  class="btn btn-danger" name="close" id="close" onclick="SomeDeleteRowFunction(this)"></button>
';    $('#data').append(strToAdd);   });   Here I take the class name productSelect as the identifier for the second function to make validation. But it didn't recognize the class and  the validation is not working for the rows which I add to the form by the above function.    $('.productSelect').change(function () {    var elementID = $(this).attr("id");   var numberPart = elementID.split("t", 2);    if ($(this).val() != null ) {     $('#quantity'+ numberPart[1]).prop('required',true);   } });   This is how the entire code looks like


When does `isn't ...` expand to "is ... not" and "is not ..."

Recently I have been writing a chatbot, and in part of the process it expands contractions. While doing this, I have found odd behavior for the contraction "isn't". There are two different way to expand this contraction:     isn't this great → is this not great?   or:     what isn't great → what is not great   Essentially, in some cases the "not" goes after the following word (the word following the contraction); in others it doesn't. I can't seem to nail down in which cases this happens and in which cases it doesn't. Is there some rule to specify how it expands?


How to check if the relativistic Lagrangian of a free particle is Lorentz invariant?

I am struggling with a concept in Classical Mechanics/Special Relativity.  I want to find the relativistic Lagrangian of a free particle, the method for which I have found in a few dfferent places, but I specifically want my Lagrangian to be Lorentz invariant. The only source that I could find provided this as a relativistic Lorentz invariant Lagrangian of a free particle:  $$ L = -mc \sqrt{-g_{\mu\nu}\dot x^{\mu}\dot x^{\nu}}  $$  My real question, I suppose, is "How do I know that the Lagrangian is/isn't Lorentz invariant?"  Edit: I do not think the suggested link answers my question. I may not have expressed myself very well, but what I really don't understand is how we can check if the Lagrangian is Lorentz invariant, as I have read in one or two different places that just because the acton is invariant, this does not necessarily mean the Lagrangian is.


Can I develop a custom action workflow for sharepoint online?

Can I develop a custom action workflow for SharePoint online?


How can I restore a sticky note in Windows 7. It is important. I was typing on it and the yellow square suddenly just went blank. I scrolled up and down but the entire thing was blank. The note remained but it was blank. How could this happen? And can I restore it?   It is a song someone wrote for me.It is very important, because I am producing a album. I have tried to follow instructions posted by someone already, but no info opens up. I posted:   %AppData%\Microsoft\Sticky Notes\StickyNotes.snt  as someone suggested, but it did not work. It said there is no program to open it.


When should you use XML attributes and when should you use XML elements?  e.g.  <customData>   <records>     <record name="foo" description="bar" />   </records> </customData>   or  <customData>   <records>     <record>       <name>foo</name>       <description>bar</description>     </record>   </records> </customData>


Upgrade to Kubuntu 18.04 from Kubuntu 17.10

Running Kubuntu 17.10.  And wanted to upgrade to Kubuntu 18.04.  But  it says:     Note: Upgrades from 17.10 will not be enabled until a few days after   18.04's release. Upgrades from 16.04 LTS may not be enabled until a few days after the 18.04.1 release expected in late July.   This is pretty vague --- 'until a few days' part.  So, can I upgrade now?


Windows 7 doesn't generate wake event in system log

I set up a scheduled task to run with this event as a trigger:  Log: System Source:Power-Troubleshooter Event ID: 1   But I don't see any event in the system log.  The only event which time is nearest to wake is:     Log: System     Source: Kernel-General     Event ID: 1   But this event occurs many times a day after system start so it's not sutable.  Is there any way to allow Windows generate wake event in system log?


Right now I have a network server that I frequently have to SSH into. Instead of typing:  ssh fox@192.168.2.24   I want to be able to say:  ssh fox@srv   And that it would SSH into the server at 192.168.2.24.  Is this possible, and if yes, how do I do that?


Fundamental group of a topological group

Given $(G,\cdot)$ a topological group with identity $e$, is it always true that $\pi_1(G,e)$ is abelian?  For what it's worth: I have already shown that if $f,g\in\Omega(X,e)$, then $[f \times g]=[f\cdot g]$, where "$\times$" is the ordinary path multiplication (left to right), "$\cdot$" is the group multiplication (that's to say, $f\cdot g(t)=f(t)g(t)$) and $[\cdot]$ is the homotopy class. So in view of this property, if $G$ is abelian itself then $\pi_1(X,e)$ is trivially abelian too. However, I have no clue how to proceed when $G$ is nonabelian.


Is it possible to extend the C: drive to the left?

I read that if I extend the C: drive partition to the left, the boot will get corrupted. Is there any way to do it without hurting the boot?  Here is a screenshot of my Disk Management screen for clarification:


International connection at US airport with US re-entry issue

I need to get to the Caribbean from Europe but had overstayed in the US about 7 years back and am supposedly denied re-entry fr 10 years... since all reasonable flight scenarios I find involved going through a US Airport (like Miami), am I correct that I cannot connect from an international inbound to an international outbound without going through US Immigration and they can thus stop me from doing the connection?  Likewise on the return?


In many cities, neighborhood Crime Watch groups are formed in an attempt to reduce the amount of criminal activity. Suppose one neighborhood that has experienced an average of 10 crimes per year organizes a Crime Watch group. During the first year following the creation of the group, 3 crimes are committed in the neighborhood  Use the Poisson distribution to calculate the probability the 3 or fewer crimes are committed in a year, assuming that the average number is still 10 times per year  Average = 10 x = 3 Answer would be  P(X < 3) = 0.00277?   Do you think this event provides some evidence that the Crime watch group has been effective in this neighborhood? Justify your answer below. Im lost at this one, any help would be appreciated.


However, the Greek prefix hyper- means . So why do we call a hyperplane a hyperplane, while it actually has less dimensions than the original space? Shouldn't it be called hypoplane rather?


Bluetooth not working on XPS 13 9360 running 16.04.1

I have an XPS13 9360 running Ubuntu 16.04.1 equipped with an Intel 8265 Dual Band wireless card.  The card was not recognized at first, but after installing linux-generic-hwe-edge package WiFi started working flawlessly, but unfortunately I was not able to get bluetooth working.  If i navigate to system settings -> bluetooth, the bluetooth switch is set to off, but even if I set it to on, nothing changes.  $ lspci -nn 3a:00.0 Network controller [0280]: Intel Corporation Device [8086:24fd] (rev 78)  $ rfkill list all     0: hci0: Bluetooth         Soft blocked: no         Hard blocked: no     1: phy0: Wireless LAN         Soft blocked: no         Hard blocked: no  $ uname -r 4.8.0-34-generic   Can you help me please?  EDIT  $ dmesg | grep -i blue [    8.311057] Bluetooth: Core ver 2.21 [    8.311070] Bluetooth: HCI device and connection manager initialized [    8.311072] Bluetooth: HCI socket layer initialized [    8.311074] Bluetooth: L2CAP socket layer initialized [    8.311078] Bluetooth: SCO socket layer initialized [    8.323674] Bluetooth: HCI UART driver ver 2.3 [    8.323675] Bluetooth: HCI UART protocol H4 registered [    8.323676] Bluetooth: HCI UART protocol BCSP registered [    8.323676] Bluetooth: HCI UART protocol LL registered [    8.323676] Bluetooth: HCI UART protocol ATH3K registered [    8.323677] Bluetooth: HCI UART protocol Three-wire (H5) registered [    8.323702] Bluetooth: HCI UART protocol Intel registered [    8.323711] Bluetooth: HCI UART protocol BCM registered [    8.323711] Bluetooth: HCI UART protocol QCA registered [    8.323711] Bluetooth: HCI UART protocol AG6XX registered [    8.439889] Bluetooth: hci0: Bootloader revision 0.0 build 26 week 38 2015 [    8.441167] Bluetooth: hci0: Device revision is 16 [    8.441168] Bluetooth: hci0: Secure boot is enabled [    8.441168] Bluetooth: hci0: OTP lock is enabled [    8.441169] Bluetooth: hci0: API lock is enabled [    8.441169] Bluetooth: hci0: Debug lock is disabled [    8.441170] Bluetooth: hci0: Minimum firmware build 1 week 10 2014 [    8.441475] bluetooth hci0: Direct firmware load for intel/ibt-12-16.sfi failed with error -2 [    8.441476] Bluetooth: hci0: Failed to load Intel firmware file (-2) [    8.628714] Bluetooth: hci0: Bootloader revision 0.0 build 26 week 38 2015 [    8.631223] Bluetooth: hci0: Device revision is 16 [    8.631224] Bluetooth: hci0: Secure boot is enabled [    8.631225] Bluetooth: hci0: OTP lock is enabled [    8.631225] Bluetooth: hci0: API lock is enabled [    8.631225] Bluetooth: hci0: Debug lock is disabled [    8.631226] Bluetooth: hci0: Minimum firmware build 1 week 10 2014 [    8.631234] bluetooth hci0: Direct firmware load for intel/ibt-12-16.sfi failed with error -2 [    8.631235] Bluetooth: hci0: Failed to load Intel firmware file (-2) [    8.794982] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [    8.794983] Bluetooth: BNEP filters: protocol multicast [    8.794986] Bluetooth: BNEP socket layer initialized  $ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 0c45:670c Microdia  Bus 001 Device 003: ID 8087:0a2b Intel Corp.  Bus 001 Device 002: ID 413c:301d Dell Computer Corp.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


Attempt to invoke virtual method 'java.lang.CharSequence android.widget.TextView.getText()'

I am trying to create a Firebase Authentication application in Android Studio 3.1.4 using Email and Password, but when I click on register button, it crashes the Application with following summary.   MainActivity.java  package com.example.vatsal2416.firebaseauth;  import android.app.Activity; import android.os.Bundle; import android.support.annotation.NonNull; import android.view.View; import android.widget.Button; import android.widget.TextView; import android.widget.Toast; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.Task; import com.google.firebase.auth.AuthResult; import com.google.firebase.auth.FirebaseAuth;  public class MainActivity extends Activity {     private FirebaseAuth mAuth;     @Override     protected void onCreate(Bundle savedInstanceState) {         final TextView textEmail = findViewById(R.id.et1);         final TextView textPassword= findViewById(R.id.et2);         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);          //Initialize buttons         Button btn_Login = findViewById(R.id.login);         Button btn_regsiter = findViewById(R.id.register);          //intialize Firebase Authentication         mAuth = FirebaseAuth.getInstance();          btn_Login.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 methodLogin(textEmail.getText().toString(),textPassword.getText().toString());             }         });           btn_regsiter.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 methodRegister(textEmail.getText().toString(),textPassword.getText().toString());             }         });     }      public void methodRegister(String email, String password){         mAuth.createUserWithEmailAndPassword(email, password)                 .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {                     @Override                     public void onComplete(@NonNull Task<AuthResult> task) {                         if (task.isSuccessful()) {                             Toast.makeText(getApplicationContext(), "Authentication Successful", Toast.LENGTH_SHORT).show();                          }else{                             Toast.makeText(getApplicationContext(), "Authentication Successful", Toast.LENGTH_SHORT).show();                         }                     }                 });     }      public void methodLogin(String email, String password){         mAuth.signInWithEmailAndPassword(email, password)                 .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {                     @Override                     public void onComplete(@NonNull Task<AuthResult> task) {                         if (task.isSuccessful()) {                             Toast.makeText(getApplicationContext(), "Authentication Successful", Toast.LENGTH_SHORT).show();                         }else{                             Toast.makeText(getApplicationContext(), "Authentication Successful", Toast.LENGTH_SHORT).show();                         }                     }                 });     } }   Github link of project        Can anyone tell me what is actually wrong in the code.


What is the yield keyword used for in C#?

In the  question one of the answers had the following code snippet:  IEnumerable<object> FilteredList() {     foreach(object item in FullList)     {         if(IsItemInPartialList(item))             yield return item;     } }   What does the yield keyword do there?  I've seen it referenced in a couple places, and one other question, but I haven't quite figured out what it actually does.  I'm used to thinking of yield in the sense of one thread yielding to another, but that doesn't seem relevant here.


I've just discovered the  questions on this meta, and wondered how and when this feature is used. For example, I just discovered that we had a  tag () on Electrical Engineering, which was variously used for source code, binary codes, color codes, and official standards.  All that, in 7 questions (which I've since edited to remove the tag).  None of these is obviously the main target of the word , so I conclude that the  tag is meaningless, and should be abolished.  Is a tag blocklist an appropriate action for this tag?  How do you decide which tags to block? Assuming that the blocklist is appropriate,how can the blocklist be created?  I don't see a way to add anything to the , and there's no mention of this privilege in the tools that I can find.


How do I appropriately examine the dimensionality of binary data?

I have 72 binary variables and, at a theoretical level, I am trying to identify groups of variables that seem to vary together. In practice, I am struggling with how to analyze this data properly. I am using R and the psych package. Here is what I have tried and what the outcomes were:  Estimated a tetrachoric correlation matrix (ran without problem) Estimated MSA (relatively strong values, ran without problem) Ran parallel analysis to identify how many factors to extract (ran without problem) EFA using fa() to estimate factors (non-positive definite matrix and strangely high RMSEA) Tried different factor counts, smoothing/unsmoothing, estimation methods, rotations methods, and removing variables (problems persisted) Tried to focus instead on eBIC (always returned as NULL in output) EFA using (inappropriately) Pearson correlations (RMSEA behaved)  From looking at other questions and answers on here, I am now aware that tetrachoric matrices can be problematic like this. However, I don't know what to do with that information. Accept the problems as a limitation and move forward? Conduct a different type of analysis? I considered IRT as is recommended, but am unaware of an exploratory way to conduct IRT analyses. I understand that most of my options are imperfect. My goal is to find an analysis that is at least arguably appropriate for binary variables and that will inform the ways in which I group these variables in my theorizing. Given this, my questions are:  Can I trust EFA on a tetrachoric matrix despite problematic output? Can I somehow recover the lost eBIC value and use that? Is exploratory IRT possible/desirable? Are there other analyses, in R, that can be used to examine the dimensionality of binary data?  I appreciate all feedback! I love learning about data analysis and hearing about how I can improve.


trouble in overriding JFrame.setBackground()

I have a class called MainUI that extends JFrame, it has this code :  //Constructor public MainUI(){  // components/panels are already defined and initialized here.  setBackground(Color.decode("#EFF4E4")); }  @Override public void setBackground(Color colorbg){ //a method to set the same background color for all the components I ave  getContentPane().setBackground(colorbg);  decisionPanel.setBackground(colorbg);  adbRadio.setBackground(colorbg); fastbootRadio.setBackground(colorbg); commandRadio.setBackground(colorbg);  pushPanel.setBackground(colorbg); uninstallPanel.setBackground(colorbg); pcPanel.setBackground(colorbg); phonePanel.setBackground(colorbg); }   however, when I compile, it gives a NullPointerException at the line [ decisionPanel.setBackground(colorbg); ]  I tried not overriding the setBackground method and renamed it and the code worked fine, I don't know why overriding setBackground method causes a problem?  I'm sure all the panels/components are initialized before the call to the method, it's obvious since the code did work just ater I've renamed the method.


Including all the jars in a directory within the Java classpath

Is there a way to include all the jar files within a directory in the classpath?  I'm trying java -classpath lib/*.jar:. my.package.Program and it is not able to find class files that are certainly in those jars.  Do I need to add each jar file to the classpath separately?


I've looked up many ways on how to deal with the U2 songs on my phone, but they will not go away what ever I try.  The most common solution for this problem is to "Show all" music, go to the Music, click the iCloud download button to download it and then turn off "Show all" button again. Generally, this would work but in my situation, it says I haven't purchased the song and I can't download the song again. The song still plays when I click on it, but I can't swipe left to delete and I can't hide it. And yes, I am signed into iTunes. And no, it is not under my purchased section.  Is there any other way to rid of this song?   EDIT:  I'm running iOS7.1.2 on a iPhone5c And the song(s) aren't in my iTunes. It says I have zero items in my iTunes library and it isn't under my purchased songs. The song is only on my iPhone, and I can't redownload it (to delete it again) because then I'd have to purchase the song again.  Thanks.


At the beginning of my script I have this line:  Color[] oldColor;   Later I want to fill it with elements so in a function I wrote:  for (int i = 0; i < targets.Length; i++)         oldColor[i] = targets[i].color;   However, the first line is underlined in green and it says that I can't assign a value except from its default value (which is null). Also the line below the for loop (where it should copy the values from one array to the other) gives me NullReferenceException when I run it in Unity.  'targets' is defined as  SpriteRenderer[] targets;   All of its elements are assigned via the Inspector.  I don't understand what happens. Why doesn't it assign the variables?


Quake-style terminal with splitting in Gnome other than Yakuake

The most common Quake-style terminal in Gnome seem to be Guake and Tilda, but they can't split to show several shells in single tab like Yakuake can. Is there any alternative which can do so?


How does Distinct() work on a List of anonymous type?

How does Distinct() work on a List<> of anonymous type? will it just do a property compare? or will it always return the same list?  example:   List<SomeObject> list;  ....  ....   var result = list            .Where(i => i.Condition)            .Select(i => new                 {                   Name = i.Name,                   Date = i.Date                });            .Distinct()            .ToList()     Please note I applied the distinct on the anonymous-type list.


trigger priority and response to said triggers mtg

if there are two voltaic servant triggers, can i respond to the second trigger after the first trigger resolves? For example; I tap steel overseer during my turn. At the end of my turn my two voltaic servants trigger to untap a target artifact. I untap my steel overseer for the first trigger and in response to the second trigger I tap steel overseer again. After that the second trigger goes off and I will have effectively tapped steel overseer 2 times and untapped 3 times because of the two voltaic servants. Is this correct?


Last night I ran an upgrade and this morning after a shutdown I am experiencing a login loop (even though I normally don't even have the login screen displayed). I checked .xsession-errors and found the following:  openConnection: connect: No such file or directory cannot connect to brltty at :0 upstart: gnome-session (Unity) main process (4070) terminated with status 1 upstart: unity-settings-daemon main process (4059) killed by TERM signal upstart: logrotate main process (3887) killed by TERM signal upstart: bamfdaemon main process (3973) killed by TERM signal upstart: unity-panel-service main process (4077) killed by TERM signal upstart: indicator-bluetooth main process (4110) killed by TERM signal upstart: indicator-power main process (4111) killed by TERM signal upstart: indicator-datetime main process (4113) killed by TERM signal upstart: indicator-keyboard main process (4117) killed by TERM signal upstart: indicator-sound main process (4118) killed by TERM signal upstart: indicator-printers main process (4121) killed by TERM signal upstart: indicator-session main process (4123) killed by TERM signal upstart: Disconnected from notified D-Bus bus   I have tried to reboot lighdm, mv .Xauthority into a backup file, reinstalling ubuntu-desktop and ubuntu-session, and chown .Xauthority.  I think it is a graphics driver issue, since when I appear at the login screen my displays arrangement is incorrect (I have two monitors).


What known issues are there with arithmetic operation in PHP?

I don't know if this is a bug or expected behavior, but the following unit test passes against all logic:  public function testPHPIsBroken() {     $this->assertEquals((int)(2.04 * 100), (int)(2.05 * 100)); }   This is using PHP 5.4.7. Is there something obvious about how decimal numbers work that I should know as a programmer in order to avoid this. Currently all monetary values in my project are set like this, which could result in some serious egg on my face...


How to Globally Change Color of Matter Inside Inline and Displayed Math Mode?

I want to change/redefine the math environment in LaTeX Article class such that whenever I write a mathematical expression inline or in displayed math mode, it appears in a color of my choice. Here is an example of what I mean:   I can do it manually for every instance of inline math, or displayed math but I instead want to know how I can redefine the environment itself so that I have to do it only once and I can change the colors globally. Here is an MWE (in which I don't color the math):  \documentclass{article} \usepackage{amsmath,amssymb} \begin{document} \begin{enumerate} \item Households save $a_{t} \geq 0$ in the riskless debt issued by  experts with an interest rate $r_{t}$. Thus, wealth follows: \begin{equation*}  da_{t} = (w_{t}z_{t} + r_{t}a_{t} - c_{t})dt = s(a_{t}, z_{t}, K_{t}, G_{t})dt \item Optimal choice: $c_{t} = c(a_{t}, z_{t}, K_{t}, G_{t})$ \end{equation*} \end{enumerate} \end{document}


Should all sites have a more equal chance in the Stack Exchange Hot Questions list?

Looking at the  I have a feeling that its favoring the bigger sites. Because their 'hot questions' get more time in the spotlight, they in turn get hotter and keep others out of the spotlight. To me it looks like Programmers, Super User and Stack Overflow are over-represented, which especially in Programmers case I believe is due to the users there being much more liberal in upvoting answers than the other sites. I don't propose filtering the list, because I do believe its a great thing for every site to have their best questions in the spotlight regularly. However, I feel that its currently not working as intended. Rather than being a nice overview of the network, it looks like we're only seeing a small subset instead. Is there any data available to prove me right or wrong?


As electrostatic force is a conservative force, but friction, occurring due to electrostatic forces is non-conservative.   A wider question would be: why is any force non-conservative if it is a consequence of electrostatic or gravitational forces (not talking about nuclear forces)?


Yet another login loop problem with Nvidia Graphics Driver install

I just installed Ubuntu 16.04 LTS. I followed close instruction on how to install the nvidia drivers. I did sudo apt-get purge nvidia-* then I did   sudo add-apt-repository ppa:graphics-drivers/ppa   Then I did sudo apt-get update. and then sudo apt-get install nvidia-current  I rebooted and everything worked. I should also mention that my grub file has "nomodeset quiet splash' written in it. I started up Nvidia server and made sure Nvidia Graphics was selected. It was also selected in settings/updates and software/additional drivers (364).   Now when I restart, I got the black screen. I then took out nomodeset to see if that would help. I get to the login screen but of course, it keeps coming back to that over and over. Could someone please tell what the working solution for this is? I've gone through 3 installs of Ubuntu: 14.04,15.10 and now 16.04 to see if it would work and for each I get the same problem.   I'm using a Dell i7559 laptop with GTX960M graphics card.


Please include the title in the question preview

It would be really swell if the question title was included right above the preview of the body of the question. Every so often, I'll be asking about something and the very act of composing a good question helps me better refine the problem. I go back and forth between SO and my workspace testing other possibilities and working on getting the best SSCCE. As I'm going back and forth updating the question, I'm constantly looking down at the preview, making sure everything's just right. Once it is, I hit submit and see: Plz halp me Porblem with issue That is followed by a brilliant question that should have been titled something like How can I reduce manifold wear when using third-party flanges? This is exacerbated by the dupe suggestions. For a question of any length, the title I entered won't even be on screen by the time I'm near posting. Even when it is, it's easy to lose it up there as it's literally the smallest text on the top half of the page. Thankfully I can edit to go fix things, but it would be easier to just get it right the first time.  I know that improving the quality of titles around here is of keen interest, and this seems like an easy change that wouldn't bother anyone. Thoughts? Update: Seeing how there's continuing furor over , showing askers their title with the automatic edits applied might help a lot.  Some people will post "Question title broken?" questions here on meta, but those are the people whose titles are currently being broken without them noticing.  Hopefully everyone else will get the hint and write better titles. (There could even be a link to the policy when automatic edits are applied, but that starts to sound like real work to add.)


How can I install a Beta version as an upgrade to an existing OS. I would prefer not to wipe out what is on the drive.


Can RUBIK's cube be solved using group theory? If yes, how can we use it to solve a $2\times2$ Rubiks Cube?


Read csv file (converted from excel) and set variables x,y,z etc as the cell values

How to set cell values as x,y,z,l,m,n,p,q,r variables in python without using pandas (ignore second set of coordinates)  So x=5000, y=300, z=2700, l=0.2, m=-1, n=0.1, p=0, q=0, r=0


Is it possible that by mutation a human could see infrared or other 'colours'?

Incoming light reacts with the several types of cone cells in the eye. In humans, there are three types of cones sensitive to three different spectra, resulting in trichromatic color vision. Each individual cone contains pigments composed of opsin apoprotein, which is covalently linked to either 11-cis-hydroretinal or more rarely 11-cis-dehydroretina.  The opsins (photopigments) present in the L and M cones are encoded on the X chromosome.  A very small percentage of women may have an extra type of color receptor because they have different alleles for the gene for the L opsin on each X chromosome. X chromosome inactivation means that only one opsin is expressed in each cone cell, and some women may therefore show a degree of tetrachromatic color vision. Tetrachromacy is also demonstrated among several species of birds, fish, amphibians, reptiles and insects.  Humans cannot see ultraviolet light directly because the lens of the eye blocks most light in the wavelength range of 300–400 nm.  So, besides above mentioned exceptions, is it possible due to mutations or genetic engineering to see UV or infrared. What kind of mutations should be made or are the changes to be made in the opsines to big to create 'alien' eyes?


Let $p$ be an odd prime, and let $a$ be an odd integer such that $p \nmid a .$ Prove that $$ a^{p-1} \equiv 1 \quad(\bmod 2 p) $$  I thought about Fermat Little Theorem could be useful but for that we need prime in modulo. But her we have 2p so it is an even integer. Can somebody give me hint for how to proceed?


Use epsilon-delta definition to show $f(x)=x^2$ is continuous

Let $f$ be a function $f:\mathbb{R}\to \mathbb{R}$ and $f(x)=x^2.$ Prove that $f$ is continuous on all of $\mathbb{R}$.  I tried this:  Let $\epsilon >0$ and assume $\mid x-x_0\mid < \delta$ for some $\delta$ and $\forall x_0 \in \mathbb{R}.$ Then $$\mid f(x)-f(x_0) \mid=\mid x^2-x_0^2 \mid=\mid x-x_0\mid \mid x+x_0\mid <\delta \mid x+x_0\mid$$  Since the last term depends on $\delta,$ I can reduce it to any $\epsilon.$ Hence, $f$ is continuous on $\mathbb{R}$.  Does this look right? I think it might fail because I don't think I can choose any old $\delta.$ Is there a way to find an exact $\delta$ that guarantee $\mid f(x)-f(x_0) \mid < \epsilon$?


Select features from different vector layers at once?

I have two vector files in the layers panel in QGIS (V2.8.2, Wien).  I am trying to select points from both vector files simultaneously to view in both attribute tables - both tables are set to show selected features only.  The only way I can do this is to select one layer in the Layers Panel, then select features by rectangle, then select the second layer in the Layers Panel and reselect again using the rectangle.   Is there a way to select features from both layers and only using select by rectangle once?


User is not getting added to Monitored Users in debug logs

I am simply adding user in 'Monitored Users' in Debug Logs. But User is not getting added.


We heard this sentence in the movie Northmen.     These weapons are all that are left of men, whom, like you, confronted me.   Which is correct?  I think it should be who and not whom because in the affirmative the sentence becomes     These men confronted me   which should be replaced by who. My friend says the replacing pronoun should be whom because it refers to people.


Here is function:  def runaction(ENV, action_list):      appmanage_list = ['status']      for action in action_list.keys():         print('Action: %s' % action)          if action in appmanage_list:              from lib import appmanage_functions             a = appmanage_functions.AppManage(ENV)             a.[SOMETHING_GOES_HERE](ENV)   It's called like:   runaction(env, main_f.opts2)   action_list (main_f.opts2 argument in function call) - is dictionary from argparse with {'optionname':True};  appmanage_list - will include all options, which need to be call with code above;  action - options name, same as method from appmanage_functions.AppManage class, need to be called.  In place of [SOMETHING_GOES_HERE] I want add action variable, to call appropriate method from class.  I tried something like:  (a. + action + (ENV))   and:  a.('%s' % action)(ENV)   But sure - this not works...  Python 2.7


I was navigating on Internet, had rythmbox reading a song and LibreOffice open developing a chart when suddenly on Firefox all freezed  and a ahotdown and reboot was necessary.   For all the similar cases, in particular a had a repository file missing, so I guess this was reason, I've removed both repository files missing 10 min after dealing with freezed ubuntu.  Best regards!


A Code that can't occur NLP but JUnit StackTrace warns NLP

I tried to this test code with java.lang.reflect. But some errors happen. I am not familiar with JUnit and how to use java.reflect. How should I fixt it? This Question is not about NLP. StackTrace says it happens Nullpoint Exception. Line 160 but it returns boolean before getting to NullPointException. public void testServiceSample() throws IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {         Service serviceTest= new Service();          boolean expected = false;         Method method = Service.class.getDeclaredMethod("load", String.class);         method.setAccessible(true);         boolean actual = (boolean)method.invoke(load, "testtest");         assertEquals(expected, actual);     }  private boolean load(String user_id)     {         boolean flag = false;          if(environment == null && environment.getProperty("test.path") == null)         {             log(Log.test.path does not exist on the properties.");             return false;         } //↓LINE:161         pathString= environment.getProperty("test.path"); //↑LINE:161             try{             File file = new File(pathString);             BufferedReader br = new BufferedReader(new FileReader(file));             String str = br.readLine();               while(str != null){                 //omit                 }             }             br.close();         }catch(FileNotFoundException e){         }catch(IOException e){         }         return flag;     }  Error java.lang.reflect.InvocationTargetException     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at com.over.stack.api.ControllerTest.test(ControllerTest.java:76)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)  Caused by     at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)  Caused by: java.lang.NullPointerException     at com.over.stack.Service.load(Service.java:161)     ... 40 more


Comfirmation of Existence of finite field

It has been known that for any prime number $p$ and any positive integer $n$, there exists a finite field $F$ with $|F|=p^n$. But is there any way we can find what exactly this $F$ (up to isomorphism) is?


Do the following sequences converge in R^3

does xk = (√k+1 − √k, 7)converge to a limit in R3?  I know  a sequence is convergent iff its coordinates are convergent.  √k + 1 −√k = (√k+1 + √k)/(√k+1 + √k)            = (√k+1 − √k)/(√k+1 + √k)            = 1/(√k+1 + √k) -> 0 as k->0  7->7 as k->ꝏ  So xk -> (0,7) as k->ꝏ  does xk=(√k+1 − √k)/2 , 6) converge to a limit in R^3?  would I proceed in a similar way for this sequence?


pager "less": --quit-if-one-screen without --no-init

I can't get less --quit-if-one-screen (-F) working without --no-init (-X).  less --quit-if-one-screen  /proc/uptime   I see no output.  This works:  less --quit-if-one-screen  --no-init /proc/uptime   What I am doing wrong?


Is the following sentence grammatically correct? And what does the first part exactly mean?  'SIRE (company which made the video) called for hands to be kept off our social workers, so this video must be aimed at individuals who use violence against the people that are always ready to help us.'


C++ passing array without giving size. Other function to calc array size

I want to pass an array as a parameter. I want the other function to calculate the array size. So array size is not passed as a parameter. How do I do this?  #include <stdio.h> #include <stdlib.h> #include <stdarg.h> #include <string.h>  void myFunction1(int tmpints[]) {     int arraysize = *(&tmpints + 1) - tmpints;     printf("In myFunction1....\n");     printf("   size is :%d\n",arraysize);     printf("   start is :%p\n",*(&tmpints + 1)); }  void myFunction2(int tmpints[],int* EndP) {     printf("In myFunction2....\n");     printf("   size is :%d // correct\n",EndP-tmpints);     printf("   start is :%p\n",*(&tmpints + 1)); }  int main() {     int tmpintarray[] = {4,3,2,9,8,7};     printf("In main....\n");     printf("   start is :%p\n",*(&tmpintarray + 1));     printf("   size is :%d // correct\n",*(&tmpintarray + 1)-tmpintarray);     myFunction1(tmpintarray);     myFunction2(tmpintarray,*(&tmpintarray + 1)); }   results  In main:  start is :0x7ffc7e593a38 size is :6 // correct   In myFunction1:  size is :-529944200 start is :(nil)   In myFunction2:  size is :6 // correct start is :0x7ffc7e593a40


Hello i wanted to know how can get Ubuntu source code and compile it on my own .  Basically i wanted to give it a try so can some one help me regarding the steps to compile a full Ubuntu system .  Also would this be beneficial as compared to installing from per-compiled binary?


I use the code:  def foo(x):     print(type(x))     if x is not int:         raise(TypeError)     #do smth  foo(100)  The log is , but TypeError is raised. Why?


Unable to click dynamically created button?

I have these functions:    $('.list-group .list-group-item.list-group-item-action').click(function(e) {     $('.list-group .list-group-item.list-group-item-action.active').removeClass('active');     var $this = $(this);     if (!$this.hasClass('active')) {         $this.addClass('active');     }     e.preventDefault();   });    document.querySelectorAll('.list-group-item').forEach(function(channel){     channel.onclick = () =>{       load_channel(channel);       return false;     }   });     socket.on('create channel', data =>{     const button = document.createElement('button');     button.className = "list-group-item list-group-item-action";     button.innerHTML = `${data.channel}`;     document.querySelector('.list-group').append(button);    });   The last function dynamically creates a button in this list (ignore the jinja):    <div class="list-group">          <button class="list-group-item list-group-item-action active">General</button>         {% for channel in channels %}         <button class="list-group-item list-group-item-action">{{ channel }}</button>         {% endfor %}       </div>   But when it's created, the first two functions do not work.  What is the solution?


How to prove the folowing theorem in probablity?

Show that for any continuous random variable $X$ that takes only positive real values $\int_{0}^{\infty}\text{Pr}(X\geq x)dx=\mu$ where $\mu$ is the mean.


variable value not being changed in recursive method - JAVA

I have implemented code for The Stock Span Problem. The problem is that the variable count is not being permanently changed and it stays zero. It changes only during the recursion. I have also made count static. But the same problem occurs. Below is the code.  public static void test(Stack s,int previous,int count) {     if (!s.isEmpty())     {         int next = (int)s.pop();         if (previous > next)         {             count++;                 // System.out.print(previous+"  "+next+"===>"+count); // count is being changed here         }         System.out.println();         test( s,previous,count);         s.push(next);     } } public static void pan(Stack s, int [] array) {     int count=0;     int i=array.length-1;     while (s.size()>1)     {         int previous = (int)s.pop();         test(s,previous,count);         array [i] = count+1;         i--;         count=0;     }     array [i] = 1; } public static void main (String [] args) {         Stack s = new Stack();         s.push(10);s.push(20);s.push(5);s.push(5);s.push(10);         int [] array  = new int [s.size()];         pan(s,array);         System.out.println(Arrays.toString(array)); }


Is it ever acceptable for a period to come after a quote at the end of a sentence?

Possible Duplicate:          I've heard that you should always place ending punctuation inside of quotes, no matter what.    Are there any cases where it is appropriate for a sentence to end with ".?


I am new to JavaScript an I have a basic set up where I can append a div with another div. I am trying to create a button that lets me remove those divs that are added dynamically, these are the two functions:  $("#add_new").click(function(){ event.preventDefault(); clicks += 1; if (clicks < 10) {     //document.getElementById("total_steps_count").innerHTML = clicks;     $("#steps").append('
<input type="text" id="step_title" class="form-control" name="step_title[]" placeholder="Enter a title for this step">
<input type="file" id="step_image" name="step_image[]" >
<input type="text" class="form-control" id="step_caption" name="image_caption[]" placeholder="Enter a caption for this image">
<input type="text" id="step_text" name="step_text[]" class="form-control" placeholder="Walk us through this step">
<button class="btn btn-default" id="remove_step"> Remove This Step</button>

') } else {     alert("The maximum number of allowed steps is 10"); } });    //Remove step $("body").on("click", "#remove_story_step", function(){     event.preventDefault();     clicks -= 1;     $(this).closest("#remove_story").remove() });   When the 'add_new' button is clicked, the div is properly appended to the target div, however when I click the 'remove_step' button, the page refreshes and all of the previously appended divs are gone.  Like I say I am new to JavaScript/jQuery so I'm not sure how I can debug this, any help would be greatly appreciated!


Is it possible to power off a PCIe video card/slot? (eg. hot-plug)

I'm looking at building a system that supports VT-d so I can pass through a high powered loud video card to a Xen/KVM/whatever VM (host will be Linux based).  However, when I'm not using the VM I want to turn the video card off so its fan does not run.  The card will not be used when the VM isn't running.  Anyone know if this is possible?  The PCI-Express hot-plug specification allows cutting power to specific slots but I have never heard of anyone doing it with a video card and my searches for information have turned up nothing.


Should I use a StringBuilder or a StringBuffer in Spark?

I'm trying to read a normal file from HDFS in class which I would be executing through spark-submit.  I have a method which does a String operations and its from this string output I create RDD.  I'm performing the below string operations before creating an RDD.   Should I use a StringBuilder or a StringBuffer for the variable valueString ?          while ((line = bf.readLine()) != null) {         String trimmedLine=line.trim();         if(trimmedLine.charAt((trimmedLine.length()-1))==';'){             if(extractionInProgress){                 valueString=valueString.concat(trimmedLine.substring(0,trimmedLine.indexOf(";")));                 keyValues.put(searchKey, valueString);                 extractionInProgress=false;                 valueString="";             }             else{                 int indexOfTab=trimmedLine.indexOf(" ");                 if(indexOfTab > -1){                     String keyInLine=trimmedLine.substring(0,indexOfTab);                     valueString=trimmedLine.substring(indexOfTab+1,trimmedLine.indexOf(";"));                     keyValues.put(keyInLine, valueString);                     valueString="";                 }             }         }         else{             if(!extractionInProgress){                 searchKey=trimmedLine;                 extractionInProgress=true;             }             else{                 valueString=valueString.concat(trimmedLine.concat("\n"));             }         }     }


Why does this code return undefined 4 times instead of the array values?

This is an example from a blog post by  that addresses IIFE's. The following block of code returns 4 repeated 'undefined' responses by design:  function printFruits(fruits){   for (var i = 0; i < fruits.length; i++) {    setTimeout( function(){       console.log( fruits[i] );     }, i * 1000 );   } }  printFruits(["Lemon", "Orange", "Mango", "Banana"]);   Avaylo then shows how to produce what (to me) would have been the expected output of the first code block (it outputs the values of the array):  function printFruits(fruits){   for (var i = 0; i < fruits.length; i++) {     (function(){       var current = i;                    // define new variable that will hold the current value of "i"       setTimeout( function(){         console.log( fruits[current] );   // this time the value of "current" will be different for each iteration       }, current * 1000 );     })();   } }  printFruits(["Lemon", "Orange", "Mango", "Banana"]);   I understand that the IIFE creates a new scope. What I don't understand is the reason why the first block of code doesn't produce the (again, to me) expected output of returning the values in the array. I've been staring at this for a few days now, thus I conclude that my javascript knowledge is missing something fundamental.  Thank you for any insight!


Since Cyberduck uses Java, it's out for me.  Any replacement for Mavericks that is good, has similar to WinSCP functionality and has an option to try before I buy?


Proof that there are infinitely many primes congruent to 3 modulo 4

I'm having difficult proving this.  As a hint the exercise to prove first, that if $a\lneqq \pm 1$ satisfies $a \equiv 3 \pmod4$, then exist $p$ prime, $p \equiv 3 \pmod 4$ such $p\mid4$. But I'm not really getting for what purpose can this be used.


Can't switch language in Ubuntu 13.10 lock screen

I'm using Ubuntu 13.10 and have two keyboard layouts installed (English and Hebrew).  If I forget the Hebrew as active language and the computer locks, I can't switch it back to English in the lock screen, and I have to click on "Switch User" as a workaround.


How to prevent anonymous (users that are not logged in) BugZilla access?

I have a BugZilla system, but it's exposed to the whole network - people don't have to log in in order to see the bugs (they cannot submit new ones or change, but they can see everything).  How do I make logging-in mandatory?


Find when an app was released on the google play store

I tried searching for a tool online but couldn't find how you can find out when an android app was first released on the google play store?  On google play it just mentions when it was last updated. Any ideas how I can find the first release date ?


How can array variables be used as pointers?

int test[] = {1,2,3,4};  printf("%i",3[test]);   How is this the same as test[3]?  I know that array variable can be used as a pointer to the first element and that can be used to refer to or point to the other variables in the array but how is this statement correct? 3 is not an array variable here.


Custom salesforce dashboard on a Visual force page, Is there any way to do this?

I have tried using apex:iframe, but it displays a blank page using     apex:iframe  <apex:page showheader="true" sidebar="true">     <apex:iframe src="/01Z2w000000ooGVEAY/" height="600px" width="70%"/> </apex:page>                                                                                Then I had tried using wave:dashboard <apex:page showheader="true" sidebar="true">  <wave:dashboard dashboardId="01Z2w000000ooGVEAY"          showTitle="true"          height="800px"          openLinksInNewWindow="true" />             </apex:page>                                                                                The result was a blank page, for both cases


Normalization of 'change variables' in logistic regression

I am running a logit model trying to predict purchases on a dataset including change variables, i.e. I have a dataset of this kind:                webvisits.month1  webvisits.month2 webvisits.month3 Purchase contract1          34                   21            22          0 contract2          11                   2             2           1 contract3          9                    22            17          1 contractn          5                    44            42          0   The model is not performing well at all, would it be a good idea to try and normalize my variables? Would that affect the outcome? If this is the case, should I normalize them by month (considering the values by variable webvisits.month1, webvisits.month2 and so on) or rather by contract (e.g. considering the distribution contract1 [34,21,22,0], contract2 [11,2,2,1] and so on? Thanks, hope this makes sense.


Inverse Distance Weighting algorithm in SQL

I have a large amount of data associated with latitude/longitude in a database (currently housed in MS SQL Server).   For the data, I would like to use SQL to calculate the distance from a user derived lat long and then use this distance in an  (IDW) algorithm. I want to do this in SQL rather than inside of a GIS because the data is quite honestly large and complex and I have a tendency to not rely on ArcGIS to do these calculations.  I was wondering if there are SQL implementations of IDW algorithm out there that some could share.  As stated in the link above, IDW is NOT a distance calculator rather the IDW algorithm is an INTERPOLATION function which uses distance as an input.  Please remove the duplication status.


I am new to ubuntu and recently installed ubuntu 20.04 on my system. At the time of installation, I was getting this error: PCIe bus error severity=corrected type=physical layer (receiver id) for encounter this problem I did: Add pci=noaer at the end of GRUB_CMDLINE_LINUX_DEFAULT in the grub file. Then my kern.log file was getting pretty big, as big that it was consuming the whole of my root folder. For this, I installed ubuntu using an internet connection. and this problem was also solved. Now on running sudo apt update  I am getting this error: E: Could not get lock /var/lib/apt/lists/lock. It is held by process 1165 (packagekitd) N: Be aware that removing the lock file is not a solution and may break your system. E: Unable to lock directory /var/lib/apt/lists/  I couldn't even remove this lock file; as my whole system will crash out, May you please help me to encounter this error, I will be very much thankful to the whole of the community.


How to determine the maximum number to pass to make -j option?

I want to compile as fast as possible.  Go figure.  And would like to automate the choice of the number following the -j option.  How can I programmatically choose that value, e.g. in a shell script?  Is the output of nproc equivalent to the number of threads I have available to compile with?  make -j1 make -j16


PGFplots plot RGB image from data (to avoid Apple Preview anti-aliasing)

I want to plot a PNG image in PGFplots. While this basically works with the graphics keyword, my problem is that Apples Preview PDF viewer applies kind of anti-aliasing to the image. But in my case it is important to see the pixelwise elements (128x128 pixel) (see figures). I thought that the solution could be to plot not the PNG image directly but plotting it from the image data. Thus the image is not recognized as an image by Preview and thus is not anti-aliased. Is there a way to plot an image directly from a 128x128x3 data array? Other solutions for my problem not using PGFplots are also okay. \begin{tikzpicture}     \begin{axis}[     axis on top,     width=5cm,     height=5cm,     scale only axis,     enlargelimits=false,     axis equal=true,     tick align=outside,     tick pos=left,     tick style={black},     xmin=0,     xmax=128,     ymin=0,     ymax=128,     xtick={0, 64, 128},     ytick={0, 64, 128},     ]          \addplot graphics[xmin=0,ymin=0,xmax=128,ymax=128] {fig/scaled.png};     \end{groupplot} \end{tikzpicture}


How to make installation of linux programs easier?

Debian and Ubuntu provide .deb package files that can be installed directly. what about Fedora? Can all tar-balls be one day .deb files for ease of installation ... many people lose themselves installing after gunzipping. There is a lot of code which commoners don't get an idea of when doing ./make etc.


How do I get iScan to detect my Epson network Scanner?

I would like to install my Epson Scanner ( model WP-4535 ) in Ubuntu 16.04 (had it installed in 15.10).  I installed this   sudo apt-get install sane libltdl7    then iScan from the epsonpage (1), which is supposed to be an all-in-one package. I installed it via ./install.sh which results in having the following iscan parts:  x@y:~$ dpkg -l iscan* | grep ii ii  iscan                2.30.3-1     amd64        simple, easy to use scanner utility for EPSON scanners ii  iscan-data           1.39.0-1     all          Image Scan! for Linux data files ii  iscan-network-nt     1.1.1-1      amd64        Image Scan! Network Plugin   iScan still cannot communicate with the scanner, though it can be identified via the following command  scanimage -L device `epson2:net:192.168.0.7' is a Epson PID 087D flatbed scanner   If I recall it from 15.10 (worked after hours of meh) , epkowa was the solution not epson2, but adding it manually via      sudo nano /etc/sane.d/dll.conf doesn't work.  The  ubuntuuser page (2), suggests installing ltdl7 packages, which seems to be important, but I have no clue, how to find it (same with the plugin):  iscan_2.X.X-1.ltdl7_i386.deb (32 bit) / iscan_2.X.X-1.ltdl7_amd64.deb (64 bit)  ggf. iscan-plugin-gt-1500_2.1.2-1_i386.deb (allgemein iscan-plugin-SCANNER_VERSION_ARCHITEKTUR.deb) oder z.B. etwas wie esci-interpreter-perfection-v330_0.1.1-2_i386.deb    Also installed  xsltproc (3), because of reasons, but didn't change it.  Any suggestions?; help appreciated!  (1): hxxp://support.epson.net/linux/en/iscan_c.php?version=1.0.4  (2): hxxps://wiki.ubuntuusers.de/Hardware/Epson/#Verwendung-von-iScan  (3): hxxps://wiki.ubuntuusers.de/Scanner/Epson/


In a $\triangle ABC,a^2+b^2+c^2=ac+ab\sqrt3$,then the triangle is $(A)$equilateral $(B)$isosceles $(C)$right angled $(D)$none of these    The given condition is $a^2+b^2+c^2=ac+ab\sqrt3$. Using sine rule, $a=2R\sin A,b=2R\sin B,c=2R\sin C$,we get $\sin^2A+\sin^2B+\sin^2C=\sin A\sin C+\sin A\sin B\sqrt3$  I am stuck here.


I am trying to install Wine in Ubuntu 18.10 and I get this error :"E: Malformed entry 58 in list file /etc/apt/sources.list (Component) E: Lista surselor nu poate fi citită."Can anybody help me?Thanks in advance


The following is taken from this book titled "" (Published in 2004):     An independent artist is probably the one who lives closest to an unbounded creative situation. Many artists have considerable freedom from external requirements about what to do, how to do it, when to do it, and why. At the same time, however, we know that artists usually restrict themselves quite forcefully by choice of material and form of expression. To make the choice to express a feeling by carving a specific form from a rock, without the use of high technology or colors, restricts the artist significantly.   In the last sentence, the subject is "To make the choice to express a feeling by carving a specific form from a rock, without the use of high technology or colors," and the predicate is "restricts the artist significantly."  Is it possible to use "Making" instead of "To make" in the last sentence as follows?     Making the choice to express a feeling by carving a specific form from a rock, without the use of high technology or colors, restricts the artist significantly.   Also, how does this gerund subject compare with the to-infinitive subject? Are they both natural in context? Or is one more natural than the other?


Applying strings and using them in if-else statements in java

Whenever I run this program, everything runs fine until I get to the bottom where I'm supposed to type "y" or "n". I type "n" (without the parenthesis), and for some reason it continues to loop. Most likely, I'm improperly using. However, any help is fully appreciated! Thanks!              import java.util.Scanner;    public class GuessTheNumberEC {    public static void main(String[] args)    {    Scanner reader = new Scanner(System.in);   int guess = 5;   int randomNumber;   int guessRepetition = 1;   String yes = "y";   String no = "n";   String answer;    randomNumber = (int)(Math.random() * 24 + 1);   System.out.println(randomNumber);    for(;;){       for (int x = 1; x<=4; x++) {         System.out.println("Guess a number from 1 - 25.");         guess = reader.nextInt();          if(guess == randomNumber) {            System.out.println("Guess #" + guessRepetition + " is correct.");             if(guessRepetition == 1) {               System.out.println("Great, you guessed the number in " + guessRepetition + " try.");               break;            }            else {               System.out.println("Great, you guessed the number in " + guessRepetition + " tries.");               break;            }         }           else if (guess > randomNumber) {            System.out.println("Guess # " + guessRepetition + " is too high.");            guessRepetition ++;           }          else if (guess < randomNumber) {            System.out.println("Guess # " + guessRepetition + " is too low.");            guessRepetition ++;          }      }       if (guess != randomNumber)       {         System.out.println("The number was " + randomNumber + ".");         System.out.println("You couldn't guess the number in 4 tries, so you lose.");      }      System.out.println("Would you like to play again? Press 'y' or 'n'");      answer = reader.next();       if (answer == no)         break;   }   } }


I've just installed Ubuntu 14.04.3 in VirtualBox 5.0.14, and got the usual problem of only being able to get 640x480 screen resolution.   I ran sudo apt-get install virtualbox-guest-dkms, restarted virtual box; no change.  I ran Xdiagnose with all diagnostic options checked - now I have a choice of 640x480 and 1024x768. Well, that's better, but still not good enough.  I go to System Settings | Software & Updates | Additional drivers, and under InnoTek Systemberatung GmbH: VirtualBox Graphics Adapter select "Using x86 virtualisation solution-X11 guest utilities from virtual-guest-x11 (proprietary)" and click apply. The computer thinks about it for a few moments, then changes my selection back to "Do not use the device".  So what next? How do I get bigger screen sizes?


How to get direct access to host network from Virtualbox running Ubuntu?

I'm running Ubuntu on a virtual machine with Virtualbox. The host uses Windows 8. Right now, the guest has internet access, but it's some sort of virtual network because it thinks it's using a wired connection when I'm using wireless.  How do I get my Virtualbox guest to get direct access to the network the host is using?


Proving that $d(f,g)=\|f-g\| = \sup \limits_{0\leq x \leq 1} |f(x)-g(x)|$ is a metric on $X=C[0,1]$

Let $X=C[0,1]$ be the set of all continuous functions on $[0,1]$. For any two functions $f,g\in X$, set $$d(f,g)=\|f-g\| = \sup \limits_{0\leq x \leq 1} |f(x)-g(x)|.$$  Prove $(X,d)$ is a metric space.    My attempt:  This question comes down to showing that $d$ is a metric, which means that:   $d(f,g)\geq 0$ $d(f,g)=0\iff f=g$ $d(f,g)=d(g,f)$ Triangular sadness.     1) Nonnegativity is guaranteed by taking the supremum of the absolute value of a sum, since the absolute value of a sum is non-negative, the supremum of non-negative numbers is non-negative.  $\square$    2) For the supremum of $|f(x)-g(x)|$ to be equal to $0$, the greatest number for $|f(x)-g(x)|$ from $0\leq x\leq 1$ must be $0$, hence $|f(x)-g(x)|=0$ for all values on this range, and thus $f(x)=g(x)$ is the constant zero map.  $\square$    3) $|f(x)-g(x)|=|g(x)-f(x)|$ implies that $\sup \limits_{0\leq x \leq 1} |f(x)-g(x)|=\sup \limits_{0\leq x \leq 1} |g(x)-f(x)|$ $\square$    4) Triangular sadness:  We need to prove that $d(f,g)\leq d(f,h) + d(g,h)$  I.e.  $\sup \limits_{0\leq x \leq 1} |f(x)-g(x)|\leq \sup \limits_{0\leq x \leq 1} |f(x)-h(x)|+\sup \limits_{0\leq x \leq 1} |g(x)-h(x)|$  Now I am not sure how I can 'behave' with the sup 'function'. Can I do the following?  $$\sup|f(x)-g(x)| = \sup|f(x)-g(x)+h(x)-h(x)|=\sup|f(x)-h(x)+(h(x)-g(x))|$$ Then use normal triangular inequality:  $$\sup|f(x)-h(x)+(h(x)-g(x))|\leq \sup(|f(x)-h(x)|+|h(x)-g(x)|)=\sup(|f(x)-h(x)|+|g(x)-h(x)|)$$   This is obviously less than $\sup \limits_{0\leq x \leq 1} |f(x)-h(x)|+\sup \limits_{0\leq x \leq 1} |g(x)-h(x)|$, but I don't know how to prove it. How do I finish that one off.


I'm using Ubuntu Server 16.04.4 LTS.  I didn't install any antivirus program there. Is that necessary to install any antivirus program there?


I am trying to use sed to find a replace "Host" with "Europe/London", however it is failing as shown below: # sed -i -e 's/"Host"/"Europe/London"/g' /usr/local/php73/lib/php.ini sed: -e expression #1, char 18: unknown option to `s'  What am I doing wrong here?


How to get a good light bokeh using compositor in Cycles?

How to improve quality of bokeh especially lights?


When do you pronounce 'neither' as [nˈiːð.ə(ɹ)] and when [nˈaɪð.ə(ɹ)]?

Our english speaking teacher told us there were two pronunciations of the word 'neither': [nˈiːð.ə(ɹ)] and [nˈaɪð.ə(ɹ)]. Which one you use is supposed to be determined from the sound of the sentence somehow.  Can anybody clarify this?


how would i go about creating a keyring like this in blender? I started with a bezier circle curve but not sure how to make the double ring from there and have them connect at the center. thanks


Comparing two TINs created using ArcGIS for Desktop?

I have the following two files:   LiDAR las file1 Let's give it a name LiDAR las file2, contains the same file1 data, where number of points randomly removed.   So if file1 contains X number of points, file2 would contain Y number of points, where Y is less than X.  Now, I am using ArcGIS "LAS to Multipoint" to create from both files above their shape counterparts. Next I am creating two empty TIN(triangulated irregular network) files using ArcGIS. Then I edit both TINs, let's say tin1 and tin2, with the appropriate input feature classes, i.e. file1 to tin1 and file2 to tin2.  Is there any tool/package/library or any software that would let me calculate the RMSE(root mean square error) or any difference information that would give me information on the accuracy of the second file, i.e. file2, with respect to file1? I tried to use the TIN difference but it gives system error and cannot obtain the result. I would really appreciate if anyone could show how to obtain accuracy information and interpretation of the results obtained.


Symbol not found error when using templated class

I am trying to implement a templated Queue in a separate file from where the class is defined. There are other questions addressing this type of thing and they point to this FAQ () and provide the solution of inserting another definition below the function definition in the file where everything is implemented (see below). It is also useful to note that the FAQ mentions updating for C++11 whereas I am using C++14.   Despite reading through this I am still confused about   1) The syntax to make this work with the constructor/destructor (Edit: the code runs if I put the instantiation line at the bottom of queue.cpp)   2) why you need to define a type in the new declaration and whether or not it affects how you use the class and  3) whether or not I should be using templates like this in the first place. It seems like the language doesn't want me to.   queue.h  #pragma once #include <string>  namespace tiff {     class QueueEmpty: public std::exception{         const char* what() const noexcept override {             return "Empty Queue. Nothing to return.";         }     };      template<class E>     class Queue {     private:         int elements;         int capacity;         int front;         int rear;         E* q;         E* resize();      public:          Queue(int);          ~Queue();         int size() const;          bool empty() const;          const E& get_front() const throw(QueueEmpty);          void enqueue(const E &e);          void dequeue() throw(QueueEmpty);      };  }    queue.cpp   #include "queue.h"  namespace tiff {      template <typename E>     Queue<E>::Queue(int size) {         elements = 0;         capacity = size;         front = 0;         rear = 0;         q = new E[size];     }         template <typename E>     Queue<E>::~Queue() {         delete q;     }      template <typename E>     int Queue<E>::size() const {         return elements;     }      template <typename E>     bool Queue<E>::empty() const{         return (elements == 0);     }      template <typename E>     const E& Queue<E>::get_front() const throw(QueueEmpty){         if (empty()){             throw QueueEmpty();         }         return q[front];     }      template <typename E>     void Queue<E>::dequeue()throw(QueueEmpty){         if(empty()){             throw QueueEmpty();         }         front = (front + 1) % capacity;         ++elements;     }      template <typename E>     void Queue<E>::enqueue(const E &e) {         if (elements == capacity){             resize();         }         q[rear] = e;         rear = (rear + 1) % capacity;         --elements;     }      template <typename E>     E* Queue<E>::resize() {         capacity = elements*2;         E* new_q = new E[capacity];         for (int i = 0; i < elements; ++i){             new_q[i] = q[i];         }         E* temp = q;         q = new_q;         delete temp;     }      template class Queue<int>;  }   main.cpp  #include <iostream> #include "queue.h" #include "gtest/gtest.h"  int main(){     tiff::Queue<int> q = tiff::Queue<int>(5);     return 0; }   After reading the FAQ, I am still confused about what is happening under the hood. This whole thing is for learning purposes so I would be glad if anyone can point me to more in-depth info about what is going on here.


I am wondering how it is possible to change mm/yyyy to mm.yyyy in biblatex. Are these used correctly? alldates=terse labeldate=year  if I say labeldate = year, wouldn't that usually lead to omitting the month? Or did I get that wrong. Is terse the right option if I want a date like mm.yyyy? (I have been checking the documentation but not really sure about the / . replacement! Sorry!  MWE:  \documentclass[   12pt,   a4paper,   headings=standardclasses,   listof=totoc,   numbers=noenddot ]{scrartcl}  \usepackage[left=2.50cm, right=2.50cm, top=2.50cm, bottom=2.00cm, footskip=1cm]{geometry} \usepackage[onehalfspacing]{setspace} \usepackage[main=ngerman, english]{babel} \usepackage[babel, german=quotes]{csquotes} \usepackage[ngerman]{isodate} \usepackage[ngerman]{datetime} %---------------------------------------------------------------------------- %   BIB %---------------------------------------------------------------------------- \usepackage[   backend=biber,   style=ext-authoryear,   sorting=nyvt,   datamodel=customstyles,   maxnames=25,   innamebeforetitle=true,   usetranslator=true,   alldates=terse,   labeldate=year,   dashed=false,   doi=false,   isbn=false ]{biblatex} \addbibresource{\jobname.bib} \usepackage[hidelinks, pdfencoding=auto]{hyperref}  \DeclareDelimFormat[bib]{nametitledelim}{\addcolon\space}  % editor in parentheses \DeclareDelimFormat{editortypedelim}{\addspace}  \DeclareFieldFormat{editortype}{\mkbibparens{#1}} \DeclareDelimAlias{translatortypedelim}{editortypedelim} \DeclareFieldAlias{translatortype}{editortype}  \DeclareFieldFormat   [article,inbook,incollection,inproceedings,patent,online]   {title}{#1\isdot} %-------------------------------------------------------------------- %   MAIN %-------------------------------------------------------------------- \begin{filecontents}{\jobname.bib} @report{Chafe.1974, author = {Chafe, Wallace L.},   title = {An Approach to Verbalization and Translation by Machine. Final Report},   month = {10},  year = {1974},   institution = {{California University, Berkely}},   address = {New York}   } \end{filecontents}  \begin{document} \parencite{Chafe.1974}  \clearpage \printbibheading[heading=bibintoc,title={Literaturverzeichnis}] \printbibliography \end{document}


How to check if number is string or integer in python using if else

I am new to Python (30 minutes). I want to know how to identify whether the number is an integer or a string, and proceed with the result using if else.  My code is:  number = input("enter the number \n")  integer = int(number)  if integer.is_integer():      if integer > 0:         print("positive ", integer)     elif integer < 0:         print("Negative ", integer)     else:         print("Number is", integer) else:     print("Enter integer value")


making boost::ptr_vector container class push_back function

im just getting my head around container classes and templates, and am having trouble working out how to implement them properly.. all of my problems are pretty similar, so once i get this sorted, i think i should be okay..  here is the code for the push_back member function that i am trying to implement:  //data is of type boost::ptr_vector<T>  template <class T> void P_VContainer<T>::push_back(T* item) {     data.push_back(item); }   this is how it is defined in p_vcontainer.h:  void push_back(T* item);   this is the error im getting from the compiler:  main.cpp:(.text+0x89f): undefined reference to `P_VContainer<Customer>::push_back(Customer*)'   this is how i am implementing it in main:  P_VContainer<Customer> myvector;  Customer *a = new Customer("C004", "Testy McTestington");  myvector.push_back(a);   any ideas as to what im doing wrong?


Reconfiguration of xserver-xorg package fails on 12.04 LTS with Raring HWE installed

I am attempting to remove fglrx (proprietary AMD/ATI drivers) and install the radeon open source driver.   I am following the steps here:  RadeonDriver - Community Ubuntu Documentation   X/Troubleshooting/VideoDriverDetection - Ubuntu Wiki   In particular, I just executed these three steps:  sudo apt-get remove --purge xorg-driver-fglrx fglrx* sudo apt-get install --reinstall xserver-xorg-lts-raring libgl1-mesa-glx-lts-raring libgbm1-lts-raring sudo dpkg-reconfigure xserver-xorg   The output of the last command was:  /usr/sbin/dpkg-reconfigure: xserver-xorg is broken or not fully installed   What should I do next?  I'm running Kubuntu 12.04 with the lts-raring hardware enablement stack installed.


What's the difference between Stack Overflow and Software Engineering SE (previously known as Programmers)?

What is the difference between   and  (formerly known as Programmers SE)?


If $f(x)=f(xe^t)$, Then prove that $f$ is a constant function.

Let $f:\mathbb{R}\to \mathbb{R}$ be a continuous function such that $\forall x \in R$ and $ t \geq 0$, $f(x)=f(xe^t)$. Then prove that $f$ is a constant function.  This is what I did: For a typical $t =t_0$ we have: $$f(x)=f(xe^{t_0}) \to (1)$$ Now plugging $x=1$ above we get: $$f(1)=f(e^{t_0}) \to (2)$$ Also plugging in $x=e^{-t_0}$ in $(1)$ we get: $$f(e^{-t_0})=f(1)\to (3)$$ So from $(2),(3)$ we have: $$f(e^{-t_0})=f(e^{t_0}) \to (4)$$ Similarly we get: $$f(-e^{-t_0})=f(-e^{t_0})\to (5)$$ from $(4),(5)$ we get: $$f(x)=f\left(\frac{1}{x}\right), \forall x \in R-\{0\}$$ Any way to proceed from here?


I have read this word quite often and always tried to elicit its meaning from the context and circumstances in which it was said.. More often than not I took it as a word for official ban or penalty.. until recently when I was watching an interview in which the interviewee felt offended over a question asked by someone in the audience and refused to answer it and said "she do not sanction impoliteness"...contextually meaning approval or consent.  When I googled its meaning, it offered me two usages :-   a threatened penalty for disobeying a law or rule; syn- penalty, ban, deterrent, correction official permission or approval for an action; syn- permission ,authority, agreement   Both of them are almost contradictory and do not offer an unambiguous understanding when used in  sentence.  For example: the court sanctioned the proposal.  Did the court approved or deterred?


It is true that every group that has a finite number of subgroups is finite?   I think not, but I can not find counterexamples.


Prove that $T(n) = T(n/3) + T2n/3) + 5n$ is $O(n log n)$

I'm doing some research about time complexity of algorithms and stumbled upon the following problem that I'm not able to solve:  Let $T(n) = T(n/3) + T(2n/3) + 5n$. prove that $T(n) = O(n log n)$  First, I made a recursion tree, which is the same as the one in the question:   I found out that each level costs $5n$ and that the leaves have different depths (The left path is the shortest with height $log_3 n$ and the one on the right is the longest with height $log_{\frac{3}{2}}n$).  Now, since we need an upper bound, I took the longest path of height $log_{\frac{3}{2}}n$. This gives total costs $5n \cdot log_{\frac{3}{2}}n$.  Now I want to prove with induction on $n$ that this is true. I proceeded in the following way:  Assume as induction hypothesis that $T(k) \leqslant 5k \cdot log_{\frac{3}{2}}k$ for $k < n$. Then:  $T(n) \leqslant T(n/3) + T(2n/3) + 5n$ $=^{IH} \frac{5}{3}n log_{\frac{3}{2}}(\frac{n}{3}) + \frac{10}{3}n log_{\frac{3}{2}}(\frac{2n}{3}) + 5n$ $= \frac{25}{3}n log_{\frac{3}{2}} n - \frac{5}{3}n log_{\frac{3}{2}} 3 - \frac{10}{3}n log_{\frac{3}{2}} 3 + 5n$ $= \frac{25}{3}n log_{\frac{3}{2}} - 5n log_{\frac{3}{2}} 3 + 5n$  And this is certainly not smaller then or equal to $5n \cdot log_{\frac{3}{2}}n$. I've spend an entire day now on solving this recurrence relation, but nothing solved it so far. Could you help me solving this problem?


How to create a JavaScript callback for knowing when an image is loaded?

I want to know when an image has finished loading. Is there a way to do it with a callback?  If not, is there a way to do it at all?


Twin paradox - is acceleration relative?

The usual answer to the twin paradox is that the twin who undergoes acceleration is the one who finds the other has aged more, because the trajectory of the 'travelling twin' does not amount to a single inertial frame - the travelling twin has accelerated while the stationary twin has not. But isn't acceleration a relative phenomenon? If the universe were empty apart from the two twins, what does it mean to say that one and not the other is accelerating and how could it be decided which was which?  (Inevitably someone will say this is a duplicate - apologies if so but I can't find it)  Edit: thank you for those thoughtful responses - on reflection I was asking two questions and the twin paradox is about velocity not acceleration. I think the interesting question is how we distinguish the velocities or accelerations of two objects, which you need to do in order to calculate the proper time elapsed for each. It can't be enough to say that the accelerating one 'feels it' - that is true only insofar as the force is transmitted from one part of the object to another (such as from the rocketeer's back against the seat to her inner ear, or from the body of the accelerometer on the floor of the rocket to its detector component). Maybe it relates to Mach's conjecture about absolute rotation, ie that you have to make reference to the distribution of matter in the wider universe in order for the distinction of moving vs not moving to have meaning. If so there is a sense in which acceleration is relative rather than absolute. Anyway thank you.


How to dual boot windows 7 and ubuntu 18.04?

I am trying to dual boot Windows 7 and Ubuntu 18.04. I just installed Windows 7 64 bit so it is a fresh install. I added a partition for Ubuntu in Windows disk management and then installed Ubuntu 18.04 from a USB using "something else". I used  to install.   I made the partitions in Windows. After booting from USB and creating more partitions in "something else" and clicking on install it gave me an error:     Partition table requires a separate partition for boot loader code.    I installed anyway.   When the install was done it had to restart. But it booted back into Windows, no GRUB. I restarted window and still no GRUB.   So I try to install again and I chose to reinstall over Ubuntu. Same thing. No GRUB.  I am running a  I5-2500 8gb DDR 3 ram gigabyte motherboard 1tb hard drive with Windows 10 unplugged this whole time 500gb hard drive For windows 7 and Ubuntu  Windows 7 says EFI boot mode   I have tried to do (bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi). It says completed successfully. But no diffrance when I restart.


How can I boil an ostrich egg to ensure it is soft boiled?

Is there some guide I can use for cooking soft boiled ostrich eggs?