This is my code for the Powers superclass:  import java.util.*;  public abstract class Powers implements Sequence {    private ArrayList<Double> powers;     public Powers()    {       powers = new ArrayList<Double>();     }     public abstract List<Double> firstTenTerms();    public abstract List<Double> firstNTerms(int n);      public void setPowers(ArrayList<Double> newlist)    {       powers = newlist;    }     public List<Double> getPowers()    {       return powers;    } }   And below is my code for PowersofTwo Subclass (well, part of it, since the code is quite long):     import java.util.*;  public class PowersOfTwo extends Powers {       public PowersOfTwo()    {       super();    }     public List<Double> firstTenTerms()    {       if(Powers.getPowers().size()!=0)       {          while(Powers.getPowers().size()>0)          {             Powers.getPowers().remove(powers.size()-1);          }       }        for(int k=0; k<10; k++)       {          Powers.getPowers().add(Math.pow(2.0,(double) k));       }       return Powers.getPowers();    } }   When I try to compile the subclass, I keep on getting this kind of error message:  PowersOfTwo.java:15: error: non-static method getPowers() cannot be referenced from a static context  Or, if I just try "powers" rather than "Powers.getPowers()", I still get this:  PowersOfTwo.java:19: error: powers has private access in Powers  The problems I had encountered in classes were usually solved by using the getters, and now I am really stumped as to what to do to try fix this error. Any help would really be appreciated!

The very common beginner mistake is when you try to use a class property "statically" without making an instance of that class. It leaves you with the mentioned error message:     You can either make the non static method static or make an instance of that class to use its properties.   Why? I am not asking for solutions. I would be grateful to know what is the reason behind it. The very core reason!  private java.util.List<String> someMethod(){     /* Some Code */     return someList;             }  public static void main(String[] strArgs){                // The following statement causes the error. You know why..     java.util.List<String> someList = someMethod();          }


The problem is that I'm doing a script for class, and the question is to "Make a script that names all the files in the actual directory and tells us the name and the permissions they have", so I made the following script:  #!/bin/bash  for name in `ls -l . | awk {print'$9'}` do echo "The file $name has the following permissions: `ls -l . | grep $name | cut -d" " -f1`" done   Okay, the script works somewhat, but the problem is that it won't show all the files in the ls -l list because I'm printing the 9th column (The name of the file) but if it has a space, the word after the space is in column 10, so I tried it like this:  #!/bin/bash  for name in `ls -l . | awk {print'$9,$10'}` do echo "The file $name has the following permissions: `ls -l . | grep $name | cut -d" " -f1`" done   But when I do this, the problem is that the variable $name will reference to the first column and the second column as separate words, and it will show both as if they were different files.  I also tried escaping the spaces in lsusing ls -lbbut then the grepcommand won't work, and if I use  grep '$name\s' it will copy literally the $name\s so it won't search anything in the lscommand...  Maybe it's really easy to solve this problem, but I've been over this for more than 5 hours and nothing... Any help is appreciated!

I'm trying to beat my head against the syntax of this. I'm getting problems with whitespaces and I can't see if there's a better way to do this.  vardir=/home/user cd $vardir for i in $(ls "$vardir") ; do timestamp="$(stat -c %Y $i)" echo "$i" echo "$timestamp"  done   Result is similar no matter where I quote and I'm not sure what I'm doing wrong:  stat: cannot stat ‘Temporary’: No such file or directory Temporary  stat: cannot stat ‘Items’: No such file or directory Items   My goal is I want to grab the timestamps off of backup directories and touch the current ones to restore the original modified dates.


I am new to Ubuntu and Linux.  I installed Ubuntu 13.10 64-bit on my new Samsung Ativ (4 GB memory / Quad Core 1.4 GHz processor / AMD Radeon HD8250 graphic card / 128 G SSD).  The first time all went well, except for graphics issues, which I was able to fix by installing fglrx.  After an update something went wrong, I couldn't log in anymore and could only work with a guest account. After trying to fix that, I decided to reinstall Ubuntu.  This won't work, as after installation and rebooting all I see is All boot options are tried, press F4 for Recovery mode. Pressing F4 didn't change anything. If I reinstall, I see that Ubuntu is installed and am asked if I want to reinstall, install alongside 13.10 or erase and install.  After installing, the whole thing repeats, "all boot options are tried" after rebooting.  Pressing shift while booting didn't help.   What went wrong?

So yesterday I went ahead and bought the Samsung NP915S3G (ATIV Book 9 Lite) and installed Tahr in hope that everything would go smoothly. For the most part it; everything necessary seems to work off the bat. Unfortunately when I restart it, nothing boots. I erased Windows so that's obviously not an option, but the computer seems pretty dead certain that there's nothing there to boot. I think this might have a lot to do with UEFI which is a field I have next to no experience with. There also seems to be a fat32 partition that consistently reappears when I delete it.   Any help is much appreciated, thanks.


I was trying to install a package called: "qt-at-spi", but this doesn't exist in the version 20.04 LTS (Focal Fossa), so I went to the repositories and this package exists but only on the version 18.04 LTS (Bionic Beaver) this is the URL:  . My question is: if I install this package from a previous version my system won't have issues? , if it so , what should I do ?  waiting for a new package from the version 20.04 or trying to break dependencies?

Package packettracer is referring to . My OS is Ubuntu 20.04.  I installed packettracer, but the package requires a qt-at-spi package that I could not find in the Ubuntu 20.04 repository.  $sudo dpkg -i PacketTracer_730_amd64.deb Selecting previously unselected package packettracer. (Reading database ... 199702 files and directories currently installed.) Preparing to unpack .../PacketTracer_730_amd64.deb ... Unpacking packettracer (7.3.0) ... dpkg: dependency problems prevent configuration of packettracer:  packettracer depends on qt-at-spi; however:   Package qt-at-spi is not installed. dpkg: error processing package packettracer (--install):  dependency problems - leaving unconfigured Processing triggers for gnome-menus (3.36.0-1ubuntu1) ... Processing triggers for desktop-file-utils (0.24-1ubuntu2) ... Processing triggers for mime-support (3.64ubuntu1) ... Processing triggers for shared-mime-info (1.15-1) ... Errors were encountered while processing:  packettracer   I searched for that package, but what I found is only . I tried to install it, but it also requires other packages.  $ sudo dpkg -i qt-at-spi_0.4.0-8_amd64.deb  Selecting previously unselected package qt-at-spi:amd64. (Reading database ... 202991 files and directories currently installed.) Preparing to unpack .../qt-at-spi_0.4.0-8_amd64.deb ... Unpacking qt-at-spi:amd64 (0.4.0-8) ... dpkg: dependency problems prevent configuration of qt-at-spi:amd64:  qt-at-spi:amd64 depends on libqt4-dbus (>= 4:4.8.0); however:   Package libqt4-dbus is not installed.  qt-at-spi:amd64 depends on libqtcore4 (>= 4:4.8~); however:   Package libqtcore4:amd64 is not installed.  qt-at-spi:amd64 depends on libqtgui4 (>= 4:4.8~); however:   Package libqtgui4 is not installed.  dpkg: error processing package qt-at-spi:amd64 (--install):  dependency problems - leaving unconfigured Errors were encountered while processing:  qt-at-spi:amd64   I searched again for those other packages (libqt4-dbus, libqtcore4, libqtgui4), but what I found is only for Ubuntu versions below 20.04 (i.e 18.04, 19.04, 19.10), there are none for Ubuntu 20.04.  I keep trying to install those packages, but they depend on other unavailable packages again, and so on.  I have tried to install . Qt-5.12.8 installed but I still did not get the qt-at-spi package.  Packettracer doesn't even seem to need qt-at-spi, as it runs properly without error. However, when I tried to install another package (whatever is it), there is a dependency error:  packettracer : Depends: qt-at-spi but it is not installable E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).   So, I must run "apt --fix-broken install" first and uninstall packettracer before I can install another package. Then when that another package installed, I reinstall the packettracer again. It is annoying.  $ sudo apt --fix-broken install Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages will be REMOVED:   packettracer 0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used.   The question is:   Can you help to find qt-at-spi for ubuntu 20.04? or Can I exclude packettracer from apt --fix-broken install?


So, I’m a beginner. I just installed Ubuntu and I was fairly excited, that was until after the install. I’m running Ubuntu 20.4.1. I can’t install the drivers because I can’t install dkms because I need Ethernet. This is a repost of my other question. I need to fix it ASAP. I can’t use Bluetooth connection, no hotspot, and my laptop doesn’t have a Ethernet port. My adaptor is a Realtek RTL8821CE.

My Laptop (HP Laptop 14-ck1xxx) came with the RTL8821CE Network Controller. When I run lspci | grep Network I get: 03:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter  I‘m unable to get the Wi-Fi to work. What I did so far:  Download the repo at . Unzip the file and rename the folder from rtl8821ce-master to rtl8821ce. Run the following commands in the terminal:  cd Downloads/rtl8821ce/ sudo apt install bc module-assistant build-essential dkms sudo m-a prepare sudo ./dkms-install.sh    Everything seemed to install and execute successfully. Then, I rebooted my laptop and made sure secure boot is disabled. However, Ubuntu still displays: No Wi-Fi Adapter Found - make sure you have a Wi-Fi adapter plugged in and turned on  The command uname -r returns: 5.4.0-7634-generic  The command sudo lshw -C network returns: *-network                         description: Ethernet interface        product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:02:00.0        logical name: eno1        version: 15        serial: c4:65:16:08:52:bf        size: 1Gbit/s        capacity: 1Gbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.178.37 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s        resources: irq:16 ioport:4000(size=256) memory:a1204000-a1204fff memory:a1200000-a1203fff   *-network UNCLAIMED        description: Network controller        product: RTL8821CE 802.11ac PCIe Wireless Network Adapter        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:03:00.0        version: 00        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress cap_list        configuration: latency=0        resources: ioport:3000(size=256) memory:a1100000-a110ffff  What am I doing wrong? How can this be solved?


I have XML which contains other XML as data in one of element. I need to convert XML element data to CSV using XSLT.  This is my XML:  <?xml version="1.0" encoding="ISO-8859-1"?>  <products>    <details>       <?xml version="1.0" encoding="ISO-8859-1"?>        <catalog>         <cd>         <title>Empire Burlesque</title>         <artist>Bob Dylan</artist>         <country>USA</country>         <company>Columbia</company>         <price>10.90</price>         <year>1985</year>        </cd>         <cd>         <title>Hide your heart</title>         <artist>Bonnie Tyler</artist>         <country>UK</country>         <company>CBS Records</company>         <price>9.90</price>         <year>1988</year>       </cd>       <cd>         <title>Greatest Hits</title>         <artist>Dolly Parton</artist>         <country>USA</country>         <company>RCA</company>         <price>9.90</price>         <year>1982</year>         </cd>     </catalog>     </details> </products>   In this I need to convert data of <details> to CSV.

I have the following XML document:  <projects>   <project>    <name>Shockwave</name>     <language>Ruby</language>     <owner>Brian May</owner>     <state>New</state>     <startDate>31/10/2008 0:00:00</startDate>    </project>   <project>    <name>Other</name>     <language>Erlang</language>     <owner>Takashi Miike</owner>     <state> Canceled </state>     <startDate>07/11/2008 0:00:00</startDate>    </project> ...   And I'd like to get this from the transformation (XSLT) result:  Shockwave,Ruby,Brian May,New,31/10/2008 0:00:00 Other,Erlang,Takashi Miike,Cancelled,07/11/2008 0:00:00   Does anyone know the XSLT to achieve this? I'm using .net in case that matters.


While asking any question, if I know some one knows the answer from the community, is it right to tag him in comment to get attention and increase probability of getting right answer quickly.  It might flood that user with lots of notification, but it seems to be a better way to get attention from someone appropriate quickly. Is it right/possible?   As I know there is bounty option available for getting attention on question, but that can be used after 2 days, so this might be a better option.

There has been quite a few times that I wished I could send a message to another user on SO - not ask a question for everyone to see, but just a short message informing them of something or requesting them to do something.  Are there any plans to allow this to happen in the future?  Related:


I am driving an RGB LED using an MCU. However, maximum current output for the MCU is 50mA which is less of what 3 LEDs require (RGB).   What is the simplest way to let the LEDs to draw current from an external power supply while yet being PWMed from the MCU?

I have an IC that has an GPIO with which I would like to drive a LED.   Since the device will be running off battery, keeping the power use low (Zero maybe) while the LED is off as a priority.  The GPIO supplies 3.3V when turned on and 0.0V votes when turned off.   It also has a limit of a maximum of 4mA.  The LED has a forward current of 20mA and a desired forward voltage of 2.0V.  When the LED is turned on it will most likely be blinking (using PWM) in the low kilohertz range.  After poking around I believe this may be the type of circuit I need.    Question 1: Am I even close to being on the right track.  Question 2: What is the correct component to use for item (5), (Transistor or  Mosfet), and how do I go about finding one (at the local Frys, RadioShack, Online) and how are they identified(specified)?  Question 3: Will the choice of item (5) have any effect on the ohm value of the resistor item (3)?  Apart from the normal Ohms law for the 3.0V power source and the 2.0V LED.  Question 4: What would be the ohm value of the resistor item (2), if any is required.


I would like to install an homemade package ? With MacTeX, I put my package in texmf-local and then simply use texhash.  Under Ubuntu, I have to use the plain path sudo /usr/local/texlive/2013/bin/x86_64-linux/texhash. This is a little boring.  Have you a way to avoid the use of the long plain path ?

I know how to define a package or a class, but how do I make it available (to myself) at all times?  Say I have the package file commonstuff.sty (or myprettyclass.cls), that I want to be able to include in any .tex file I create on my computer. Where do I put it? Do I need to run some installer on it, or is it enough to keep it in a certain folder?  Note: I know I can just place it in the same folder as the .tex file, but that's not what I'm after here. I'm looking for a way to "install" the package centrally on my computer.


In file included from /usr/local/Qt/linux-g++/include/QtCore/QLinkedList:2,   from /home/bamboo/Packages/Parser.h:17,   from /home/bamboo/Packages/Module.cpp:6: /usr/local/Qt/linux-g++/include/QtCore/qlinkedlist.h: In member function 'void QLinkedList<T>::clear() [with T = int]': /usr/local/Qt/linux-g++/include/QtCore/qlinkedlist.h:294: error: dereferencing pointer 'y' does break strict-aliasing rules /usr/local/Qt/linux-g++/include/QtCore/qlinkedlist.h:293: note: initialized from here /usr/local/Qt/linux-g++/include/QtCore/qlinkedlist.h:294: error: dereferencing pointer 'y' does break strict-aliasing rules /usr/local/Qt/linux-g++/include/QtCore/qlinkedlist.h:293: note: initialized from here   where in big lines class Module contains a member template like: Parser<int> and the class parser is defined:  template <typename T> class Parser {    // some stuff    QLinkedList<T> stuff; };   and this piece of code compiles nicely with gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3 and nicely with g++ (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2 and fails with g++ (Debian 4.4.5-8) 4.4.5 ... and I have no idea why? Anyone has seen this error message and anyone know what this might mean?... and more importantly how to solve it?

When asking about , people sometimes refer to the strict aliasing rule. What are they talking about?


I am using a Galaxy note [GT i9220], it has samsung account for cloud synchronization but no google account.  I9220ZCLSF  It supports Chinese / Korean / English language only. using Android 4.1.2   It seems I could set up gmail through exchange synchronization which is not so efficient.   Is there a way to enable google account ? Once solved, can I sync contact both to Samsung and Gooogle cloud ?   UPDATE: I just want a google account for email, addressbook and calendar sync. Do I necessarily need to flash cyanogen mod to enable google account ?

I have recently installed a custom ROM and cannot find the Play Store. It seems like all apps that belong to Google are missing.  How can I install the Google Apps Package (Play Store, ...) on my Android device?


I am formatting a twopage book on latex and I have a diagram divided on two almost page size images. (Two captions).  What can I do for putting the first image on an even page and the second on the following page so that way one can open that pages and wiew the whole diagram without passing pages? The two parts of the diagram are in two different files, as opposed to the post . In other words, I would like the same as the above post, but just much less functionality, such as dividing the picture into wo parts automatically and such. It would be nice, if the picture waits to be outputted until the next even side begins.  I tried using the following command before the two pictures, but that doesn't seem to work, cf. .  \newcommand{\newevenside}{     \ifthenelse{\isodd{\thepage}}{\newpage}{     \newpage     \phantom{placeholder} % doesn't appear on page     \thispagestyle{empty} % if want no header/footer     \newpage     } }   The problem is that it would place both figures on the left side, two different doublepages.  The code which I use for putting the images on the document is  \newevenside  \begin{figure}[hp!] \includegraphics[width=18cm,angle=90]{figuras/project1.eps} \caption{My caption.} \label{fig:gantt1} \end{figure}  \newpage  \begin{figure}[hp!] \includegraphics[width=18cm,angle=90]{figuras/project2.eps} \caption{My caption.} \label{fig:gantt} \end{figure}

I have two sideways tables that I want on two facing pages so the reader can turn the entire book and read them both in one turn. For the moment I keep moving them around to keep them on facing pages. Is there a way I can make the first one float until it's on a left page and then place the other one right after? Or perhaps some similar way to automatically get them on the same spread?


I put a frozen beef roast (about 2 lbs) in the crockpot with some sherry and onions, but forgot to turn the crock pot on.  The lid was on, and when I got home about 6 hours later the roast was still mostly frozen (I could only get a fork into about ¼ to ½ an inch) and the outside of it still felt very cold.  I immediately put the whole crock pot in the fridge and I'm wondering if I can cook the roast today, or if I need to toss it.    Thanks!

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


I have dual booted Ubuntu 16.04 LTS and since then I can't boot to windows any more. It gives me choices but windows isn't one of them.  How can I boot again to Windows?

Whenever I boot into my system, Linux directly boots. If I press shift, GRUB shows only Linux, not Windows. Here are results of fdisk and update-grub. I think I have installed Linux the wrong way.  $ fdisk WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.   Disk /dev/sda: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00000000     Device Boot      Start         End      Blocks   Id  System /dev/sda1               1  1953525167   976762583+  ee  GPT Partition 1 does not start on physical sector boundary.  $ update-grub Generating grub configuration file ... Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported. Found linux image: /boot/vmlinuz-3.19.0-32-generic Found initrd image: /boot/initrd.img-3.19.0-32-generic Found memtest86+ image: /boot/memtest86+.elf Found memtest86+ image: /boot/memtest86+.bin   No volume groups found done


I want to modify the enumerate environment (from enumitem) to always be passed a certain optional argument. I expected the following code to work, but it always stalls (takes forever).  \documentclass{article} \usepackage{enumitem} \let\ooenumerate\enumerate \let\endooenumerate\endenumerate \renewenvironment{enumerate}[1][]{%      \ooenumerate[series=test,#1]% }{      \endooenumerate% } \begin{document}     \begin{enumerate}         \item ione      \end{enumerate} \end{document}   I'm on     pdflatex> This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MikTeX 2.9.6730 64-bit)

Frequently I see users redefine macros using (for example)  \let\oldmacro\macro% Store \macro in \oldmacro \renewcommand{\macro}{%   % ...redefined \macro   \oldmacro% }   and other times they use  \usepackage{letltxmacro}% http://ctan.org/pkg/letltxmacro \LetLtxMacro{\oldmacro}{\macro}% Store \macro in \oldmacro \renewcommand{\macro}{%    % ...redefined \macro   \oldmacro% }   Why would one use \LetLtxMacro when \let works just as well? Or, more specifically, when would one use \LetLtxMacro and/or why?


My 10K-tools items currently lists:    What I have a problem with is that I've flagged both these posts as being "not an answer" and also cast the only "delete" vote that is listed with the second post. However, neither post is being removed from my list of items to review:     Why is this the case?

The 10k flag tools no longer exclude posts I've already reviewed.  For example,   Go to the  Flag one of the posts Refresh page Post is not excluded, as it used to.


I recently installed MATE desktop on ubuntu 16.04 and later decided to uninstall it. I did so using the commandsudo apt-get remove mate-desktop.  It was uninstalled and was no longer available on the login screen as an option. But i think that not everything related to MATE was removed. I know this because i still have MATE-terminal in my applications list. I could, of course, just uninstall it but then what about other hidden items that are not so obvious. I prefer not having them at all.  I tried running the commands suggested , but it doesn't solve the problem.

I installed few environments that I wanted to try out on Ubuntu 12.04, but none of them worked at all. It could be that I installed them all at the same time, meaning the OS didn't get a chance to work everything out, but either way, they didn't work. I would now like to remove them.   The one's that I installed are Xubuntu/Xfce, Lubuntu/LXDE, Kubuntu/KDE, Fluxbox, OpenBox, cinnamon, and MATE. I installed them. Everything seemed to have been working properly until I actually tried to use the shells and nothing loaded at all. Except for Fluxbox, I think that one worked. I want to know of any way to repair or perhaps just remove the packages entirely. I might have already removed them because I did the apt-get remove command on all of them, but they were still in the list on the login screen.


my question is, how can i edit or throttle the upload speed when i upload a file to my ASP.Net core web API. We have many clients with very very slow internet, so when the program starts uploading files, the entire bandwidth is used and nothing can be done on the internet. I have 2 code examples here: 1:Client: class Program {     static void Main(string[] args)     {         FileStream stream = new FileStream(@"C:\TEMP\te...", FileMode.Open);                  Upload(stream).Wait();     }     public static async Task Upload(FileStream image)     {         using (var client = new HttpClient())         {                          var content = new MultipartFormDataContent();             content.Add(new StreamContent(image), "te...");             try             {                 HttpResponseMessage response =              await client.PostAsync("https://localhost:5001/api/uploadtest", content);                 var cont = await response.Content.ReadAsStringAsync();                 Console.WriteLine(cont);             }             catch(Exception ex)             {                 Console.WriteLine(ex.ToString());             }                                                     Console.ReadKey();         }              } }  2:ASP.Net Core Web-API [Route("api/[controller]")] [ApiController] public class UploadTestController : ControllerBase {     Stream stream;         // POST api/<UploadTestController>     [DisableRequestSizeLimit]     [HttpPost]     public async Task<IActionResult> Post()     {                  stream = Request.Body;         try         {                         using (var fstream = System.IO.File.OpenWrite(@"F:\TMP\te..."))             {                 await stream.CopyToAsync(fstream);             }             return Ok("test");         }         catch(Exception ex)         {             Console.WriteLine(ex.ToString());             return BadRequest();         }                       }       }

I am developing a program that continually sends a stream of data in the background and I want to allow the user to set a cap for both upload and download limit.  I have read up on the  and  alghorhithms, and seemingly the latter seems to fit the description since this is not a matter of maximizing the network bandwidth but rather being as unobtrusive as possible.  I am however a bit unsure on how I would implement this. A natural approach is to extend the abstract Stream class to make it simple to extend existing traffic, but would this not require the involvement of extra threads to send the data while simultaneously receiving (leaky bucket)? Any hints on other implementations that do the same would be appreciated.  Also, although I can modify how much data the program receives, how well does bandwidth throttling work at the C# level? Will the computer still receive the data and simply save it, effectively canceling the throttling effect or will it wait until I ask to receive more?  EDIT: I am interested in throttling both incoming and outgoing data, where I have no control over the opposite end of the stream.


My friend said he knows this guy who will deposit money into my Chase bank account. The only requirements being that I have had the account for over 4 months and my balance is not negative.  His name is Antonio and he states he can set me up with a payroll; deposit $1,500 into my account once a month for the next 3 months. When I asked where this money is coming from he stated from Ghost Accounts.  What is this?! It sounds illegal/fraud. Anyone heard of something like this?

A woman on Facebook recently contacted my dad.  She asked him to get a bank account so she could send him money, and he would send money to her employees (about 12 people), and she would pay him for doing so each time. She said the last person who she had do this for her ran away with all her money. But he would have made more money continuing to do this money transfer thing for her. I am not sure if this is a scam or not. Sounds weird to me, but my dad said it’s worth the try.  I had to get the bank account in my name because my dad has bad notices on his records for falling for fraud traps and asking for refunds too many times. She stressed to him that it had to be the bank “American Christian Credit Union;” for what reason, I’m not sure. There is no large amount of personal money in this bank account, just the minimum amount to open the account: $25.  I’m skeptical about this and confused as to why this person would send a large amount of money to a random person on the Internet?  Has anyone heard of any scams like this?  What should I look out for?


In quadrilateral $ABCD$, let $AB$ and $CD$ meet at $E$ and $AD$ and $BC$ meet at $F$. Then prove that the midpoints of $AC,BD$ and $EF$ are collinear.  What I Tried:- Here is a Picture :-  First extend $GH$ to meet $CE$ at $J$. Now I applied Menelaus Theorem on whatever triangles I found suitable :- $$\rightarrow \frac{BI}{ID} * \frac{DJ}{CJ} * \frac{CL}{BL} = 1.$$ $$\rightarrow \frac{AK}{KD} * \frac{DJ}{CJ} * \frac{CH}{HA} = 1.$$ $$\rightarrow \frac{FG}{GE} * \frac{EJ}{CJ} * \frac{CL}{LF} = 1.$$ $$\rightarrow \frac{FG}{GE} * \frac{EJ}{DJ} * \frac{DK}{KF} = 1.$$ From here I got some results, like $\frac{AK}{KD} = \frac{CL}{BL}$ , but I do not know how to proceed further. Can someone help me? Thank You.

For an arbitrary convex quadrialteral $ABCD$:   $$AF=FC, BE=ED, GI=IH$$  Prove that points $F$, $E$ and $I$ are collinear.  I was able to solve the problem by using vectors and I think that it can be also solved analytically but I wanted some more elegant proof, more in the spirit of Euclid.


I need to know how I can prove this question.  Prove that not every boolean function is equal to a boolean function constructed by only using And ($\wedge$) and Or ($\vee$)

Prove that not every boolean function is equal to a boolean function constructed by only using $\wedge$ and $\vee$.  Here is my solution, can I ask for a feed back on my solution please?   $p∧q$                          $0 0 0 1 $   $p∨q$  $0 1 1 1$  Not every boolean function is the same when using $ ∨ $ and $∧.$  Edited part!  $p\vee q$                  $0111$  $(p\vee q)\wedge p = p$  $0 = 0$  $0 = 0$  $1 = 1$  $1 = 1$  $(p\vee q)\vee p = p\vee q$  $0 = 0$  $1 = 1$  $1 = 1$  $1 = 1$  here is my edited answer , can I ask for more feed back , thanks


My folders in desktop:     My folder name about which I'm interested is Ram:      I tried the following command for installing yoono-desktop:  [root@localhost mpatil]# tar jxf ~/Ram/Downloads/yoono-desktop-1.8.43.tar.bz2 tar tar (child): /root/Ram/Downloads/yoono-desktop-1.8.43.tar.bz2: Cannot open: No such file or directory tar (child): Error is not recoverable: exiting now tar: Child returned status 2 tar: Error is not recoverable: exiting now   I have root and password. I tried as root.

I downloaded YOONO-Desktop from , and I try to install it with the following steps:  [root@localhost mpatil]# tar xfv yoono-destop-1.8.43.tar tar: yoono-destop-1.8.43.tar: Cannot open: No such file or directory tar: Error is not recoverable: exiting now [root@localhost mpatil]# tar xfv yoono-destop-1.8.43 tar: yoono-destop-1.8.43: Cannot open: No such file or directory tar: Error is not recoverable: exiting now   This file is in Desktop/Ram/Downloads. But it is showing an error like "no such file or directory". Why is it showing this error?


I am trying to make a warm drink using cocoa without much additions. Basically I boil water and the slowly add it to a cup with cocoa powder while I stir. I also add some cold milk. When I stir with a spoon, I see that it becomes sticky and liquid and looks like butter melted. The problem is that when I fill the cup with boiling water and some cold mild and start drinking it, in the end most of the cocoa powder have stayed stuck at the bottom of the cup. How can I make it so that it is completely dissolved but only using water and a bit of milk? Please note, that I don't have a microwave

I wanted to make a Stevia-sweetened chocolate milk so I tried mixing some unsweetened cocoa powder with the milk and stevia, but I found that the cocoa powder doesn't mix with the milk at all. It tends to float on top, and even with a lot of stirring and mixing back and forth between two glasses it was a lumpy mess.  Any techniques or natural additives I can use to help the powder dissolve more like Nestle Quick and the like?


If two teams in the Premier League are tied on goal difference, goals against, have scored and conceded the same number of goals, how is the order of their position determined?

Is there any rule defined by UEFA or FIFA?     If more teams have the same number of points in a league after the finishing game, what is the rule to declare a winner??   Were there any rule updates by UEFA for this season (2013/14) or the upcoming season?  I found on the Premier League official website:   Here the rule is defined by goal difference. Is it a new rule, or is it determined by head-to-head then goal difference?


$$\|\textbf{x}\|_2 \leq \sqrt{\|\textbf{x}\|_1\|\textbf{x}\|_\infty} \leq \frac{1+\sqrt{n}}{2}\|\textbf{x}\|_2$$ I know the basic inequality relationship of $\|x\|_1$,$\|x\|_2$ and $\|x||_\infty$, such as $$||x\|_\infty \leq \|x\|_2 \leq \|x\|_1 \leq \sqrt{n}\|x\|_\infty$$ but I just cannot figure out this variant.

Let $x\in\mathbb{C}^n$. Do the following inequalities hold? $$\lVert x\lVert_2\leq\sqrt{\lVert x\lVert_1\lVert x\lVert_\infty}\leq\frac{1+\sqrt{n}}{2}\lVert x\lVert_2.$$ I think the first inequality is the Holder inequality with $p=1$ and $q=\infty$.


I am looking for a group which is not abelian but all of its subgroups are normal. Is there any example? Thanks.

This is , I think an easy problem just that I am not getting the catch of it. How to show whether or not the statement is true?  All subgroups of a group are normal$\implies$ the group is an abelian group?  I have been able to show the other way round.


I changed the fill valve with water sensor valve and the water is still running. The water does not exceed normal volume.   Why is this?

I have an American Standard toilet I installed last year. I don't know much about plumbing, but I was able to install this toilet. It seems to function okay, except for what I think is a mechanical problem.  Sometimes when the toilet is flushed, the flapper doesn't close and water keeps running.  The handle feels like it's slightly stuck in the up position.  I looked inside the tank once when it was doing this, and the chain attached to the handle was slack. I don't understand why the flapper isn't closing.  I've tried putting more slack in the chain and loosening the plastic nut that holds the handle on the toilet, but it doesn't seem to be helping.    How can I fix this?


People had to move their entire city towards the (horizon?). They traveled over all terrains--water, mountains, deserts. As they traveled they remained the same height. If they slowed down or sped up their bodies would get longer or shorter. I read it at least 20 years ago

I read a very special book a few years back. We follow a boy who lives in a world where, if one moves far enough in a direction, that person gets distended and changed in size.   The boy works on laying tracks for the train, on which his city is. The city has to continually keep moving or it also will get squashed.   It's like a world like if one end is pinched and then dragged out like a piece of rubber string or bubble gum.   The book is not older than 10 years I think.  Hope I was clear enough...


GregorianCalendar last = new GregorianCalendar(py,pm-1,pd); System.out.println(last.getTime()); GregorianCalendar present = new GregorianCalendar(py,pm-1,pd); System.out.println(present.getTime());  long diff = Math.abs(prsent.getTime() - last.getTime());   Problem facing when subtracting these two dates

I find it funny that Java (or the java.util library) does not have a built-in function to calculate difference in dates. I want to subtract one date from another to get the elapsed time between them. What is the best way to do this?   I know the simple way is to take the difference of the time in milliseconds and then convert that into days. However, I wanted to know if this works in all cases (with daylight saving, etc.).


I was just wondering if it is possible to create source code explanations like the image below using LaTeX (listings or minted it doesn't matter). I'm Sorry I'm kind of new to LaTeX.    Thanks in advance for the help.

I'm wondering if there are some macros for annotating listings as below easily. They are primarily used in books from Manning.    Solution  For anyone who's interested, this is my macro I finally got:      \newcommand*{\AddNote}[5]{%     \begin{tikzpicture}[overlay, remember picture]     \coordinate (x) at (#2,0);     \coordinate (a) at ($(x)!(#1.north)!($(x)+(0,1)$)$);     \coordinate (b) at ($(a)+(0.8,0)$);     \coordinate (c) at ($(b)+(0,#3)$);     \draw [open triangle 45-] (a) -- (b) -- (c);     \node[#5] at (c) {\bf\sffamily\smaller#4};     \end{tikzpicture}%     }   Usage is: \AddNote{linemarker}{x-offset}{y-offset}{text}{style}


I want to know if I have a 32 bit OS running on a 64 bit cpu, will it detect or access 4 GB of ram or more

What are the differences between 32-bit and 64-bit systems?  If you have used both of them, what kind of sharp differences have you experienced?   Would it be a problem to use 32-bit programs on 64-bit systems in some cases?


Let $G \subset PSL(2, \Bbb R)$ be a discrete subgroup without elliptic or parabolic elements. Does it follow that it is at most countable?  Subgroups as above have the property that the quotients of the hyperbolic upper half-plane $H$ by them are compact smooth surfaces. The fact that $G$ acts properly discontinuously on $H$ makes me suspect that it cannot be uncountable (otherwise, "something" would have a limit point, and this would somehow contradict the proper discontinuous action), but since I cannot visualize these objects, I do not know how to encode my intuition into a formal reasoning.  (For me, $G$ acts properly discontinuously on $H$ if and only if for every $z \in H$ there exist an open subset $U_z \subset H$ such that $U_z \cap g U_z = \emptyset, \ \forall g \in G \setminus \{1\}$. This is equivalent to $G$ being a discrete subgroup with no elliptic elements.)    A posteriori, the fact that, for $f \in L^1 (H)$ and $D$ a fundamental domain for $G \backslash H$, one may write $\int _H f = \sum _{g \in G} \int _{gD} f$, is a further argument that $G$ must be at most countable, otherwise $\sum _{g \in G}$ wouldn't make sense. This, on the other hand, is not a proof.

Does an uncountable and discrete subspace of the reals exist?


I am trying to call java class from a jar file in python. I've see people talking about programs like Jython, Py4j, Jpype, etc, but I am hoping for an easier way other than spend lots of time to study a new program. I am new to programming. Thanks.  Briefly, here is what I want to accompolish. Say a jar file called 'Converter.jar'. It has a function 'parse' in a class 'Handler'. How can I call the jar file to realize something like Converter.Handler.parse('my file')?

I have a python app and java app. The python app generates input for the java app and invokes it on the command line.  I'm sure there must be a more elegant solution to this; just like using JNI to invoke C code from Java.  Any pointers? (FYI I'm v. new to Python)    Clarification (at the cost of a long question: apologies) The py app (which I don't own) takes user input in the form of a number of configuration files. It then interprits these and farms work off to a number of (hidden) tools via a plugin mechanism. I'm looking to add support for the functionality provided by the legacy Java app.  So it doesn't make sense to call the python app from the java app and I can't run the py app in a jython environment (on the JVM).  Since there is no obvious mechanism for this I think the simple CL invocation is the best solution.


I have what is probably a simple question, but it is baffling me right now, so I am hoping you can help me out.  I have a least squares regression model, with one independent variable and one dependent variable. The relationship is not significant. Now I add a second independent variable. Now the relationship between the first independent variable and the dependent variable becomes significant.  How does this work? This is probably demonstrating some issue with my understanding, but to me, but I do not see how adding this second independent variable can make the first significant.


I would like to know that if i get a call from my iphone,is it possible to differentiate whether it is Land line call or mobile line call?  Please help me out...I searched a lot and found nothing.

I am building application that required some data from iPhone's Call log(read only). The call log is a sqlite db located at "/User/Library/CallHistory/call_history.db". I used a jailbroken device to extract the log. However trying to open this location using the sqlite_open3() command I get a SQLITE_ERROR error, which according to the library documentation means "SQL error or missing database". In an attempt to debug the error I've used NSFileManager to enumerate the folder('/User/Library/'). It would appear as if it's returning a "filtered" set of results, that exclude the 'CallHistory' folder along with several of the other folders.   The File system uses a series of alias to give the illusion of tradition OS X file structure, and I don't know if these are having an effect on my results.  The call log is only present on a device, and not the simulator. I've been unable to get it to work on a 1st gen iPhone running fireware 2.1.  This is some code I used to test the output  NSDirectoryEnumerator *dirnum = [[NSFileManager defaultManager] enumeratorAtPath: @"/private/var/mobile/Library/"];  while( bar = [dirnum nextObject]) {     //Uncomment if you don't want to log sub folders     //[dirnum skipDescendents];      NSLog(bar); }   I have a suspicion that Apple is blocking access to the directory as part of its sandboxing strategy, however I have no proof at this stage. However, I can access the address book without any issues, so I'm a little confused.  Thanks


I compile my latex with pdflatex in texniccenter. The produced pdf looks good. But when I select a word and copy it over to a texteditor, some of the characters are wrong. for instance all german ö,ü,ä but also a word like anriffsvektor becomes angri_svektor, so both "f" become a "_". Are there any settings, I can setup with pdflatex for that?  Here is a mwe:  \documentclass[a4paper,fontsize=11pt,oneside,parskip=half,headings=normal]{scrreprt}  \usepackage[utf8]{inputenc}    \usepackage[T1]{fontenc}         \begin{document} angriffsvektor \end{document}   And here is an  file

One frequent aspect of pdflatex output that could be improved is to what extent one can select text output from the generated pdf-file and copy-and-paste it. This is essentially an issue of having the right output encoding. There are at least two important aspects to this:   In the ideal case, Unicode would be the output encoding. Ligature glyphs (such as ﬁ) are ideally de-ligated in the output (here: "fi").   It seems that output encodings are specified through the fontenc package. What is the range of possible output encodings, and most importantly: Is there a way to specify a Unicode output encoding and one that deals with ligatures in the intended way?  (Note: It is important to distinguish output from input encodings. How to use different input encodings in LaTeX has been documented widely. My understanding is that this is best handled by the inputenx package, as it supersedes the inputenc package.)    Quick guide to the solutions: The information in the answers and answer threads is a bit distributed, so here the short summary: one approach is to use \input glyphtounicode together with \pdfgentounicode=1; the other approach is to use cmap/mmap.  Addendum: Sometimes one will need to load the package accsupp and enclose one's macro definition in \BeginAccSupp{method=hex,unicode,ActualText=<codepoint>}[...]\EndAccSupp{} to generate a specific code point. See the caveat about non-BMP code points  and the fix (starting from accsupp version v0.4, 2012/11/18) , which provides the new unichar package option.


I am at Newark airport right now, waiting to board a flight to MCO (Orlando, FL) with United Airlines.   They are announcing that the flight is overbooked by 7 passengers and that they need volunteers to be bumped from the flight for a (measly) 150$ compensation.   I cannot afford to be bumped since I have a cruise tomorrow morning and they obviously won't wait for me...   I have checked in for the flight online and received my boarding pass with an assigned seat.  Furthermore, (if that matters) I'm a frequent flyer for the airline. I have booked this ticket 6 months ago.   So, I ask you, can they just bump me in these circumstances?

Some companies allow you to check-in online prior to the flight, assigning you the seats.  Is it still somehow possible to be involuntarily bounced, despite having already checked in and already having an assigned seat?  This assuming you don't arrive late.


I know that Bell jars are often used in laboratories to form and contain a vacuum but not total vacuum like space.So i don't understand why can't human make vacuum bell jar a total vacuum state?

Have we managed to make a device without any atom inside it on earth? I was reading about vacuum , and I found in the examples part  that even on the best man made vacuum devices, there are still millions of "molecules per $cm^3$". So my other question here is, what are these molecules and what is the mass of them?


My attempt: it is known that $(a,b)=1$. Let $d = (a+2b,a-2b)$.  Then it follows that $d|{(a+2b)}$ and $d|{(a-2b)}$, and thus $d|{(m(a+2b)+n(a-2b))}$; that is, $d$ divides all linear combinations of $(a+2b)$ and $(a-2b)$.    If we write $X = a + 2b$ and $Y = a - 2b$, then:   $2X+2Y=4a$ and thus $d|4a$   $X-Y=4b$ and thus $d|4b$   Therefore $(4a,4b)=d$ and $(4a,4b)=4(a,b)=4$.  It follows that $(a+2b,a-2b) \leq 4$ and so 4,3,2, and 1 are possible values.  $(a+2b,a-2b) \neq 3$ given it is not a divisor of 4.  Therefore $(a+2b,a-2b) = \{4,2,1\}$  As one could imagine I'm posting because I am not sure of my proof. In particular I'm not certain whether the less than or equal to 4 actually follows from the previous line. As well as this, I'm not really certain my explanation for 3 not being in the answer set is adequate.

I'm having problems with an exercise from Apostol's Introduction to Analytic Number Theory.     Given $x$ and $y$, let $m=ax+by$, $n=cx+dy$, where $ad-bc= \pm 1$. Prove that $(m,n)=(x,y)$.   I've tried to give a proof, but I suspect it's wrong (or at least not very good). I would be very thankful for any hints/help/advice!  My proof:     We observe that since $ad-bc= \pm 1$, $ad=bc \pm 1$, and $(ad,bc)=1$.   Now, $(a,b) \mid m$ and $(c,d) \mid n$ but      $$(a,b) = ((d,1)a,(c,1)b)=(ad,a,bc,b)=(ad,bc,a,b)=((ad,bc),a,b)=(1,a,b)=1.$$      Similarly, we determine $(c,d)=1$. So, $1=(a,b) \mid m$ and $1=(c,d) > \mid n$. But $(x,y)$ also divide $m$ and $n$. Since $(x,y) \geq (a,b)=(c,d)=1$, this implies that $(x,y)=m,n$. Hence   $(m,n)=((x,y),(x,y))=(x,y)$.


My wife and I are going to Finland from Mauritius (we are residents of Mauritius) for our holidays this month. We also planned to spend a few days in England. Our plan was as follows: 15th, flight to UK via british airways, flight to Finland by Finnair. Stay in Finland until 25th. 25th, flight to UK via finnair. Stay in UK until 4th april. 4th, flight to Mauritius via british airways.  Due to the spread of the virus in UK, we are thinking that if the situation gets bad we might go directly to Mauritius from Finland on 25th and skip our UK part. We'd get a flight on Emirates to Mauritius from Finland via Dubai.  Is this a possible thing to do despite having bought a two way ticket for both our BA and finnair flights? And should we be informing our airline that we won't be showing up for the return flights?  Not sure how to proceed with the above plan B if we decide to change our plans. Thanks in advance for your answers.

Disregarding the morals of hidden-city ticketing, I've got a question.  Are there any issues from flying and skipping the last leg and hopping onto a different airline's flight to get to my wanted final destination?  So, I would go from DFW, layover in ORD and skip the final leg to GSO and go from ORD to KEF.  DFW-ORD-GSO-KEF     DFW: Dallas / Fort Worth (USA) ORD: O'Hare International Airport (USA) GSO: Piedmont Triad International Airport (USA) KEF: Keflavík International Airport (Iceland)


I am looking for the fastest way to return the most recent record for each reference number.  I quite liked , but it does not seem to work when I add a third condition (SequenceId). It appears to work only when I specify the Id and the creation date.  To understand my problem, You will need to create the modified sample table, which is essentially a copy of the table on the above referenced website but with a little twist.  CREATE TABLE [dbo].[TestTable](       [Id] [int] NOT NULL,       [EffectiveDate] [date] NOT NULL,       [SequenceId] [bigint] IDENTITY(1,1) NOT NULL,       [CustomerId] [varchar](50) NOT NULL,       [AccountNo] [varchar](50) NOT NULL, CONSTRAINT [PK_TestTable] PRIMARY KEY CLUSTERED  (       [Id] ASC,       [EffectiveDate] ASC,       [SequenceId] ASC ) ON [PRIMARY] ) ON [PRIMARY] GO  SET IDENTITY_INSERT [dbo].[TestTable] ON INSERT [dbo].[TestTable] ([Id], [EffectiveDate], [SequenceId], [CustomerId], [AccountNo])  VALUES (1, CAST(0xDF300B00 AS Date), 1, N'Blue', N'Green') INSERT [dbo].[TestTable] ([Id], [EffectiveDate], [SequenceId], [CustomerId], [AccountNo])  VALUES (2, CAST(0xDF300B00 AS Date), 2, N'Yellow', N'Blue') INSERT [dbo].[TestTable] ([Id], [EffectiveDate], [SequenceId], [CustomerId], [AccountNo])  VALUES (1, CAST(0xE0300B00 AS Date), 3, N'Red', N'Yellow') INSERT [dbo].[TestTable] ([Id], [EffectiveDate], [SequenceId], [CustomerId], [AccountNo])  VALUES (3, CAST(0xE0300B00 AS Date), 4, N'Green', N'Purple') INSERT [dbo].[TestTable] ([Id], [EffectiveDate], [SequenceId], [CustomerId], [AccountNo])  VALUES (1, CAST(0xE1300B00 AS Date), 5, N'Orange', N'Purple') INSERT [dbo].[TestTable] ([Id], [EffectiveDate], [SequenceId], [CustomerId], [AccountNo])  VALUES (2, CAST(0xE3300B00 AS Date), 6, N'Blue', N'Orange') INSERT [dbo].[TestTable] ([Id], [EffectiveDate], [SequenceId], [CustomerId], [AccountNo])  VALUES (3, CAST(0xE6300B00 AS Date), 7, N'Red', N'Blue') SET IDENTITY_INSERT [dbo].[TestTable] OFF GO   If I run a similar query as on the website, I get exactly the same result.  SELECT tt.* FROM dbo.TestTable tt LEFT OUTER JOIN dbo.TestTable ttNewer ON tt.id = ttNewer.id AND tt.EffectiveDate < ttNewer.EffectiveDate WHERE ttNewer.id IS NULL   However, the little twist is that I added a SequenceId column to the table as you may have noticed. The purpose of this column is because the client may want to do a post dated entry for a date in the past. This entry must supercede the other entries made on the same date which is in the past. If I run the query before I add the the post dated entries, I get the same result as previously.  SELECT tt.* FROM dbo.TestTable tt LEFT OUTER JOIN dbo.TestTable ttNewer ON    (              tt.id = ttNewer.id AND tt.EffectiveDate < ttNewer.EffectiveDate             AND tt.SequenceId < ttNewer.SequenceId       ) WHERE ttNewer.Id IS NULL   If I add two post dated entries as shown below, then I start to get interesting results.  INSERT INTO TestTable(Id,EffectiveDate,CustomerId,AccountNo) values (       2,'20090103','Blue','Orange' );  INSERT INTO TestTable(Id,EffectiveDate,CustomerId,AccountNo) values (       2,'20090105','Blue','Orange' );   What you should notice is that the two queries below no longer return the last record whether I use the one which is similar to what is on your website or I use the one which adds another condition (SequenceId)  SELECT tt.* FROM dbo.TestTable tt LEFT OUTER JOIN dbo.TestTable ttNewer ON tt.id = ttNewer.id AND tt.EffectiveDate < ttNewer.EffectiveDate WHERE ttNewer.id IS NULL  SELECT tt.* FROM dbo.TestTable tt LEFT OUTER JOIN dbo.TestTable ttNewer ON    (              tt.id = ttNewer.id AND tt.EffectiveDate < ttNewer.EffectiveDate             AND tt.SequenceId < ttNewer.SequenceId       ) WHERE ttNewer.Id IS NULL   What I would like the query to do is to return the last record for a reference number (Id) based on the last sequence number for any given day. In other words, the record with the last sequence number on the most recent EffectiveDate.

I often need to select a number of rows from each group in a result set.  For example, I might want to list the 'n' highest or lowest recent order values per customer.  In more complex cases, the number of rows to list might vary per group (defined by an attribute of the grouping/parent record). This part is definitely optional/for extra credit and not intended to dissuade people from answering.  What are the main options for solving these types of problems in SQL Server 2005 and later? What are the main advantages and disadvantages of each method?  AdventureWorks examples (for clarity, optional)   List the five most recent recent transaction dates and IDs from the TransactionHistory table, for each product that starts with a letter from M to R inclusive. Same again, but with n history lines per product, where n is five times the DaysToManufacture Product attribute. Same, for the special case where exactly one history line per product is required (the single most recent entry by TransactionDate, tie-break on TransactionID.


Let n be a prime.   1. If (G,+) has order 2n, prove that every proper subgroup of (G,+) is cyclic.   2. If (G,+) has order n^2, prove that (G,+) has a subgroup of order n.

These questions are really bothering me. Any help would be much appreciated.  Let $p$ be prime  a) If $(G, \oplus)$ has order $2p$, prove that every proper subgroup of $(G, \oplus)$ is cyclic  b) If $(G, \oplus)$ has order $p^2$, prove that $(G, \oplus)$ has a subgroup of order $p$


I am working on a simple code that keeps incrementing a counter every second and will stop incrementing only when a 'q' is pressed .  I tried getchar() and getline()  , but they require the user to enter an input for every loop .  to make it simpler , this code keeps counting on the console forever until I terminate it by ( Ctrl+c ) , I would like to use 'q' to do the same functionality.  #include <stdio.h> #include <stdlib.h> #include <windows.h> int j=0; int main() {     printf("Enter Q to quit !\n");     while(1)     {     j++;     printf("%d\n",j);     Sleep(1000);     system("cls");     }     return 0;  }

I'm trying to write a program in C (on Linux) that loops until the user presses a key, but shouldn't require a keypress to continue each loop.  Is there a simple way to do this? I figure I could possibly do it with select() but that seems like a lot of work.  Alternatively, is there a way to catch a ctrl-c keypress to do cleanup before the program closes instead of non-blocking io?


Can coefficient of static or kinetic friction be greater than one?  If yes, then is there example of any material which is practically in use?

Is the coefficient of friction always less than unity? What are the cases in which coefficient of friction is greater than unity?


Is there some way I can use ConsoleColors as the Ints that they are? Like  Console.ForeGroundColor = 10; //ConsoleColor.Green has the Value of 10   but i can only use  Console.ForeGroundColor = ConsoleColor.Green; //when hovering over "Green" Visual Studio even shows me that Green is 10   I managed to find these Color-Ints in the registry (HKEY_CURRENT_USER/Console) where the Ints have hexCodes of the colors but no where the name (and i was able to change the value of Green to Orange and back to default but that doesn't matter). So why won't C# or Visual Studio let me use the Ints? Or am I doing something Wrong?  Please try to explain it without using refering to enums. I know, these colornames are enums but i just don't understand enum-conversion yet

How can an int be cast to an enum in C#?


In electrostatics, we usually consider charge to be continuous on any body, to calculate the electric field of the body. For eg. I had proved the  taking an infinitesimal charge of $dq$ on the sphere. But we also know that charges are quantized (In terms of electrons and protons). They are finite and not infinitesimal. So is considering them continuous an approximation or is there a reason to why we can do it?

Suppose we view fluids classically, i.e., as a collection of molecules (with some finite size) interacting via e&m and gravitational forces. Presumably we model fluids as continuous objects that satisfy some differential equation. What mathematical result says that modeling fluids as continuous objects can accurately predict the discrete behavior of the particles? I don't know anything about fluid mechanics, so my initial assumption may in itself be wrong.


I have a microcontroller which is connected to an 8MHz crystal.  I have a schematic which has a QSPI flash IC connected to it whose clock is provide by the micro and happens to be 48MHz.  I want to understand how the 8MHz is increased to 48MHz. Is it a PLL which does this? If so how?  How can I determine the maximum frequency that the microcontroller can provide from any of its pins?

So before this I only worked with simple 8 bit Atmel MCUs and I realized on my development board schematics it has only a 12Mhz crystal, yet the MCU operates at  up to 100MHz. (I think the default is 80MHz. I only made it higher once for fun. It's just a simple line in the code.)  How does it do that? Why does an Atmega328, for example, run at the used crystal speed?


I am working on git repo which has no git flow setup means it does not have master, develop, feature branch. I cloned this repo and I have created a branch test_branch and I made changes on my local branch and did multiple commits then pushed them. Now, I would like to find out list of files I have pushed.   All the git diff commands I found are comparing with origin/master, HEAD and so but in my case this will not be available . I will push my changes by setting up an upstream like git push -u origin test_branch. In such scenario how can I find list of files which I have pushed?  I have tried following commands but not matching with my requirement   git log --name-only pattern="" git diff origin/master...   git log shows complete information on local branch but I need only files which I have pushed. After one git push I might do one more set of commits and doing git push I need only files which I pushed recently.   I am getting this error when I try with origin/master.  fatal: ambiguous argument 'origin/master...': unknown revision or path not in the working tree.  I am looking for a command which is purely depend on local branch to find out the pushed files.  EDIT:    will not solve my problem becuase,   I do not have commit ids I need list of files from multiple commits not from last or recent commit.

I am looking for a simple Git command that provides a nicely formatted list of all files that were part of the commit given by a hash (SHA-1), with no extraneous information. I have tried: git show a303aa90779efdd2f6b9d90693e2cbbbe4613c1d  Although it lists the files, it also includes unwanted diff information for each. Is there another git command that will provide just the list I want, so that I can avoid parsing it from the git show output?


I'm stuck with this one - Any tips?  The Problem:     Let $n \in \mathbb{N}.$ The following $n \times n$ matrix:      $$A =  \left( \begin{array}{ccc} 2 & 1 &  &  &  & ...\\ 1 & 2 & 1 &  &  & ...\\  & 1 & 2 & 1 &  & ...\\  &  & 1 & 2 & 1 & ...\\  &  &  & 1 & ... & 1\\ ... & ... & ... & ... & 1 &2 \end{array} \right) $$      e.g. for the main diagonal = 2, the sub- and superdiagonal = 1 .       Show with Induction that $\det(A) = n + 1$.      My solution approach: Laplace Expansion starting with the 2 in the bottom right corner $(a_{n+1,n+1})$. But how can I tell wether its positive or negative? After that I'm stuck with the 1 $(a_{n,n+1})$(the sub matrix matrix becomes ugly and I get a recursively solution). How can I formalize this in a proper manner?

How to show that the determinant of the following $(n\times n)$ matrix  $$\begin{pmatrix} 5 & 2 & 0 & 0 & 0 & \cdots & 0 \\ 2 & 5 & 2 & 0 & 0 & \cdots & 0 \\ 0 & 2 & 5 & 2 & 0 & \cdots & 0 \\ \vdots & \vdots& \vdots& \vdots & \vdots & \vdots & \vdots \\ 0 & \cdots & \cdots & 0 & 2 & 5 & 2 \\ 0 & \cdots & \cdots & \cdots & \cdots & 2 & 5 \end{pmatrix}$$  is equal to $\frac13(4^{n+1}-1)$?    More generally:     How does one compute the determinant of the following  (where the three diagonals are constant)?      $$M_n(a,b,c) = \begin{pmatrix} a & b & 0 & 0 & 0 & \cdots & 0 \\ c & a & b & 0 & 0 & \cdots & 0 \\ 0 & c & a & b & 0 & \cdots & 0 \\ \vdots & \vdots& \vdots& \vdots & \vdots& \vdots & \vdots \\ 0 & \cdots & \cdots & 0 & c & a & b \\ 0 & \cdots & \cdots & \cdots & \cdots & c & a \end{pmatrix}$$      Here $a,b,c$ can be taken to be real numbers, or complex numbers.   In other words, the matrix $M_n(a,b,c) = (m_{ij})_{1 \le i,j \le n}$ is such that $$m_{ij} = \begin{cases} a & i = j, \\ b & i = j - 1, \\ c & i = j + 1, \\ 0 & \text{otherwise.} \end{cases}$$  There does not seem to be an easy pattern to use induction: the matrix is not a diagonal  of the type $M = \bigl(\begin{smallmatrix} A & C \\ 0 & B \end{smallmatrix}\bigr)$ (where we could use $\det(M) = \det(A) \det(B)$ for the induction step), and there are no lines or columns with only one nonzero entry, so  gets complicated quickly.  Is there a general pattern that one could use? Or is the answer only known on a case-by-case basis? It's possible to compute the determinant by hand for small $n$:  $$\begin{align} \det(M_1(a,b,c)) & = \begin{vmatrix} a \end{vmatrix} = a  \\ \det(M_2(a,b,c)) & = \begin{vmatrix} a & b \\ c & a \end{vmatrix} = a^2 - bc \\ \det(M_3(a,b,c)) & = \begin{vmatrix} a & b & 0 \\ c & a & b \\ 0 & c & a \end{vmatrix} = a^3 - 2abc \end{align}$$  But there is no readily apparent pattern and the computation becomes very difficult when $n$ gets large.


Can i install Ubuntu on my pen drive, i do not want to install it at my system's drive  I just want whenever i plug the pen drive, run Ubuntu else run my Windows 8  Is it possible if it is possible.. will get my data back after shutdown and restart with Ubuntu.  Pls help me Thanks

I want to install Ubuntu like how you would to a hard drive so I can use it as a portable system. I do not want a Live install; I want something where i can install updates, install drivers, and things like that. I'm really confused because I made a persistent install using UNetBootIn in Windows thinking that would allow me to do that and yet when I booted I still saw the "Install Ubuntu 12.04 LTS" icon.


I'm importing a .csv that contains data that I am joining to a shapefile. The value that I am joining is shown in the first column of the image below. When I import the data into ArcMap the data in the second column is converted to type 'string' instead of 'integer'.   How do I import the data so that numeric values are of type integer 'instead' of 'string'?

How do I prepare CSV files for use in ArcGIS Desktop.   I ask because I have some troubles using CSV files because ArcGIS attributes wrong field types to my columns and also misinterprets special characters such as á or ê.   I have read in the Esri forum that there is a so-called schema.ini file that defines somehow the field types e.g "Col22=V002 Text" see here   That's kind of funny because I have often seen these .ini files on my disc but never actually wondered what they are good for. It is kind of weird that Excel stores such metadata in an extra file since other programs like R don't do so.   I already tried to manipulate this .ini file with little success since I didn't find out how to apply for example "string" type. There are some information on MS sites, see here:  but I couldn't find a solution.  Also I didn't really like the idea to work with this .ini file because it is quite a bunch of work to define and type all the fieldnames when I have let's say 50 columns. And these .ini files might get lost, etc.


I have this structure of files (directory and after arrow files):  model -> py_file.py  report -> other_py_file.py   main __init__.py:  import model import report   model directory:  import py_file   report directory:  import other_py_file   now in other_py_file I want to import py_file, but what ever I try I give error that there is no such module.  I tried this: from model import py_file  Then: import py_file  Looks like these two folders don't see each other. What is the way to import file from other directory? Do I need to specify some additional imports in init.py files?

Imagine this directory structure:  app/    __init__.py    sub1/       __init__.py       mod1.py    sub2/       __init__.py       mod2.py   I'm coding mod1, and I need to import something from mod2. How should I do it?    I tried from ..sub2 import mod2 but I'm getting an "Attempted relative import in non-package".  I googled around but found only "sys.path manipulation" hacks. Isn't there a clean way?      Edit: all my __init__.py's are currently empty    Edit2: I'm trying to do this because sub2 contains classes that are shared across sub packages (sub1, subX, etc.).  Edit3: The behaviour I'm looking for is the same as described in  (thanks John B)


In other words, what equations hold the most promise in this endeavour? Are we all looking at the same equations or is this pursuit subjective?

It is well known that quantum mechanics and (general) relativity do not fit well. I am wondering whether it is possible to make a list of contradictions or problems between them?  E.g. relativity theory uses a space-time continuum, while quantum theory uses discrete states.  I am not merely looking for a solution or rebuttal of such opposites, more for a survey of the field out of interest.


I have added a new custom view filter with next code: /**  * Filter .  *  * @ingroup views_filter_handlers  *   * @ViewsFilter("filter_pricelist")  */ class PriceListFilter extends FilterPluginBase {    /**    * @{inheritdoc}    */   public function init(ViewExecutable $view, DisplayPluginBase $display, array &$options = NULL) {     parent::init($view, $display, $options);     $this->valueTitle = t('Price list quantity filter');   }    public function query() {     $grupo = $this->query->setWhereGroup('OR');     $this->query->addWhere($grupo, 'pricelist.fromquantity', 0, '>');     $this->query->addWhere($grupo, 'pricelist.toquantity', 0, '>');      }  }  It works good and filter is added to the query of my view. The problem is the compared values are in string format. This is the generated sql query: SELECT pricelist.fromquantity AS pricelist.fromquantity, pricelist.toquantity AS pricelist.toquantity, pricelist.id AS id FROM {pricelist} pricelist WHERE (pricelist.sku = '017016') AND ((pricelist.fromquantity > '0') OR (pricelist.toquantity > '0')) ORDER BY pricelist.fromquantity ASC, pricelist.toquantity ASC  I don't know why It is comparing to string '0' instead of integer 0.

When I check "SHOW PROCESSLIST" in phpMyAdmin I can see lots of queries where argument-integers are being inserted as strings (with single quotation marks).  I'm wondering if this is due to the way phpmyadmin reports the queries (if it puts every argument between quotation marks) of if it is db_select that puts every argument between quotation marks.  An example of my code where integers are being used as arguments:  $select->join('taxonomy_index', 't_'.$key, 't_'.$key.'.nid = n.nid AND t_'.$key.'.tid = :tid_' . $key, array(':tid_'.$key => (int)$tid)); $select->condition('t_'.$key.'.tid', (int)$tid);   As you can see I explicitly write (int)$tid but in my query log I can see the following:  ... WHERE (t_0.tid = '10') ...   The big question is: How can I be sure that integers are being treated as integers in my queries? I don't want MySQL having to transform strings to integers.


in my homework i must embody Bfs and Edge method in BFS method  i must use queue to memory visited edge in Edge method i must store arraymatrix if i input , it shows nullpointerexception void Bfs(int v) {      Queue<Integer> q = new LinkedList<>();          q.add(v);     for(int i=0;i<numofnodes;i++) {         visited[i]=false;     }     visited[v] = true;           while(!q.isEmpty()){             int temp = q.poll();             System.out.print(temp + " ");                          for(int j = 0; j <numofnodes; j++){                 if(AdjMatrix[temp][j] == 1 && visited[j]==false){                                        q.add(j);                                            visited[j]= true;                                 }                 }                            } }     void Edge(int n1, int n2) {      AdjMatrix[n1][n2]=1;     AdjMatrix[n2][n1]=1; }  java.lang.NullPointerException  i 5 e 0 1 e 0 3 e 1 2 e 1 4 e 2 3 e 3 4 bfs 0 0 1 3 2 4

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I'm working with 'Contains' in VisualForce and have a user-fillable form.  I want the user to be able to select an option from a picklist and then populate another pageblock section based on if the user's picklist selection contains a specific value.  Otherwise, I do not want this section to be rendered. Can someone please explain to me why the code below does not work and assist in fixing it? Thank you <p>     Personal Care Concerns: </p>  <div class="selectiondiv">   <apex:inputField styleClass="fieldset" value="{!Intake__c.Personal_Care__c}"/> </div>   <apex:pageblock>     <apex:pageblockSection >          <apex:outputText rendered="{!IF(CONTAINS(Intake__c.Personal_Care__c,"Toileting/Bathing/Self-Care in Bathroom"), "true", "false")}" value="SimplyHome System" />     </apex:pageblockSection> </apex:pageblock>

I have a VF page to make a record for a custom object. It has 2 <pageBlockSection>. The first should always be rendered, and it contains a picklist. Depending on the value of the picklist, the second might be rendered.  What is the best way to go about this? Can the standard controller handle this, or does it need a custom controller? Why isn't my second section rendering correctly?  The picklist:  <apex:inputField value="{!CustomObject__c.Type__c}">       <apex:actionSupport event="onchange" reRender="section2"/> </apex:inputField>   And the second section:  <apex:pageBlockSection id="section2" columns="1" rendered="{!IF(CustomObject__c.Type__c == 'Functionality Request',true,false)}">       <apex:inputField value="{!CustomObject__c.Priority__c }"/>  </apex:pageBlockSection>


Trying to decide which type of polarization filter I should get.  Some information I've read suggests that there is no difference and that a circular polarizer is just an ordinary linear polarizer, but a circular piece of film that can be rotated in order to adjust the phase of the filter.  Others seem to suggest that it is the result of two linear filters, aligned 90° out of phase. Like this  page, located on the Georgia State University network:      If light is composed of two plane waves of equal amplitude but differing in phase by 90°, then the light is said to be circularly polarized.    It goes on to say:     Circularly polarized light may be produced by passing linearly polarized light through a quarter-wave plate at an angle of 45° to the optic axis of the plate.   I've probably misunderstood something about the fundamentals of how it all works, or got something backwards. But was hoping someone could demonstrate the difference it makes in terms of the result it has on a photograph, rather than trying to explain with diagrams. Thanks.

When I bought my polarizer, a friend told me that I should get a circular one, because the linear ones can mess with the autofocus. Is this true? What should each be used for?


I want to sort an array which will always contain three objects.  The script knows the name values of the objects that should be returned second and third.  How can I sort this array so that the order is correct?  $categories = Array (   [48] => stdClass Object (      [term_id] => 48      [name] => Hello      [term_group] => 0      [term_taxonomy_id] => 57      [taxonomy] => resume_category      [description] =>      [parent] => 0      [count] => 572      [object_id] => 18397      [filter] => raw   )   [64] => stdClass Object (       [term_id] => 64      [name] => World      [term_group] => 0      [term_taxonomy_id] => 75      [taxonomy] => resume_category      [description] =>      [parent] => 0      [count] => 22      [object_id] => 18397      [filter] => raw  )  [5] => stdClass Object (      [term_id] => 5      [name] => Test      [term_group] => 0      [term_taxonomy_id] => 75      [taxonomy] => resume_category      [description] =>      [parent] => 0      [count] => 22      [object_id] => 5      [filter] => raw    )   I want Hello as the second value and World as the last value but the values and order of the array are dynamic and will vary:     foreach ( $categories as $category ) {     echo $category->name;     echo ', ';    }   Should return: test, hello, world

Basically I have a setup like the following:  Array (  [0] => Array ( [0] => stdClass Object ( [nid] => 1 [title] => title1 [uid] => 1 [parent] => 0 [weight] => -15 [name] => name1 [value] => 0 )                [1] => stdClass Object ( [nid] => 2 [title] => title2 [uid] => 1 [parent] => 0 [weight] => -7 [name] => name2 [value] => 100 )                [2] => stdClass Object ( [nid] => 3 [title] => title3 [uid] => 2 [parent] => 0 [weight] => -1 [name] => name3 [value] => 0 )                [3] => stdClass Object ( [nid] => 4 [title] => title4 [uid] => 2 [parent] => 0 [weight] => 1 [name] => name4 [value] => 80 )               )   )   What I need is a way to sort all the arrays inside the parent array by the [value] key in the Object. I've been trying for about 2 days now with usort and different methods but I just can't seem to get my head around it. The [value] key will range anywhere from 0 to 100 and I need all of the arrays sorted in decreasing order (IE: 100 down to 0).


We want to find the $[\Bbb{Q}(\sqrt2+\sqrt3)(\sqrt5):\Bbb{Q}(\sqrt2+\sqrt3)]$.  My first thought is to find the minimal polynomial of $\sqrt5$ over $\Bbb{Q}(\sqrt2+\sqrt3)$. And from this, to say that $[\Bbb{Q}(\sqrt2+\sqrt3)(\sqrt5):\Bbb{Q}(\sqrt2+\sqrt3)]=\deg m_{\sqrt5,\Bbb{Q}(\sqrt2+\sqrt3)}(x).$  We take the polynomial $m(x)=x^2-5\in\Bbb{Q}(\sqrt2+\sqrt3)[x].$ This is a monic polynomial which has $\sqrt5\in \Bbb{R}$ as a root. We have to show that this is irreducible over $\Bbb{Q}(\sqrt2+\sqrt3)$, in order to say that $m(x)=m_{\sqrt5,\Bbb{Q}(\sqrt2+\sqrt3)}(x)$. The roots of $m(x)$ are $\pm \sqrt5\in \Bbb{R}.$ So,  $$m(x) \text{ is irreducible over } \Bbb{Q}(\sqrt2+\sqrt3) \iff \pm \sqrt5 \notin \Bbb{Q}(\sqrt2+\sqrt3)=\Bbb{Q}(\sqrt2,\sqrt3)$$  because $\deg m(x) =2.$   And this is the point I stack. I tried with the use of the basis of the $\Bbb{Q}$-vector space $\Bbb{Q}(\sqrt2+\sqrt3)$: $$A:=  \{1,\sqrt2,\sqrt3,\sqrt6 \}$$   in order to claim that $\nexists a,b,c,d\in \Bbb{Q}:\sqrt5=a+b\sqrt2+c\sqrt3+d\sqrt6$ but this doesn't help.  Any ideas please?   Thank you in advance.

I want to show rigorously that this is 2. I'm sure there's a faster way than by trying to see if $\sqrt{5} = a + b \sqrt{2} + c \sqrt{3} + d \sqrt{6}$ (linear combination of the basis elements for $\mathbb{Q}(\sqrt{3}, \sqrt{2})$). I'm just not sure what.


Let $R$ be an integral domain with quotient field $K$. Let $0 \neq f \in R$. I want to prove   Statement: $R[X]/(Xf-1) \cong R[1/f]$.   Argument: Consider the epimorphism $\phi: R[X] \rightarrow R[1/f]$ which sends $X$ to $1/f$. The  goal is to show that the kernel of $\phi$ is the ideal generated by $Xf-1$. If $\phi(p[X])=0$ then $p(1/f)=0$. This shows that $1/f$ is a root of $p(X)$. Viewing $p[X]$ as an element of $K[X]$, this implies that there exists some $g(X) \in K[X]$ such that $p(X) = (X-1/f) g(X) = (Xf-1) \left[g(X) /f\right]$. I will be done if i can show that $g(X)/f \in R[X]$.   Question 1: How to complete the argument?  Question 2 (optional): Is there any other proof to the statement?

I am having trouble with the following problem.      Let $R$ be an integral domain, and let $a \in R$ be a non-zero element. Let $D = \{1, a, a^2, ...\}$. I need to show that $R_D \cong R[x]/(ax-1)$.    I just want a hint.  Basically, I've been looking for a surjective homomorphism from $R[x]$ to $R_D$, but everything I've tried has failed. I think the fact that $f(a)$ is a unit, where $f$ is our mapping, is relevant, but I'm not sure. Thanks


I'm an avid watcher and lover of the X-Men movies. The original trilogy, the X-men wolverine series, as well X-Men: First Class and DoFP.   With X-Men: The Last Stand, Mystique has lost her powers, Professor X has died, and the closing scene shows Magneto having a hint of his power left.  The next time we actually meet Professor X or Magneto is in Days of Future Past. (Unless I'm mistaken) and this is where my confusion lies.  Is there a story behind how Professor X is still alive, or what has happened over the past years?  Is each subsequent film only lightly based upon the previous? Or are they going to continue to try and fill in the gaps non-chronologically?

In X-Men 3:The Last Stand, we see that Professor Charles Xavier died and Jean Grey killed him, and his body turned into pieces.  But in X-Men: Days of Future Past he's alive and well.  I'm pretty surprised that nobody asked about this before. Maybe the answer is too obvious and I'm missing something in the previous movie. I'm not following the comic, so I don't know that maybe this movie is set in an alternate universe.  ADDITION: in the extra scene after the credits in X-Men 3: The Last Stand we see that Xavier has transferred his consciousness to the other body. But his own body already destroyed, so how can he regain his original body?


I need help to show that $\lim_{n\rightarrow\infty}{\displaystyle\sum_{i=1}^{n}{\frac{F_n}{2^n}}}=2$, where $F_n$ is the n-th number in the Fibonacci sequence.  I know how to prove this by putting that $A_n={\displaystyle\sum_{i=1}^{n}{\frac{F_n}{2^n}}}$ and than finding a closed form for $A_n$ (I can't remember how the closed form looks like bcs I did this problem 2 years ago). Now that I started to learn limits at school I wanted to know if it is possible to solve this problem in another way using some tricks with limits or something similar.

I presented the following problem to some of my students recently (from Senior Mathematical Challenge- edited by Gardiner)  In the Fibonacci sequence $1, 1, 2, 3, 5, 8, 13, 21, 34, 55,\ldots$ each term after the first two is the sum of the two previous terms. What is the sum to infinity of the series: $$\frac{1}{2} + \frac{1}{4}+ \frac{2}{8} + \frac{3}{16} + \frac{5}{32} +\frac{8}{64} + \frac{13}{128} +\frac{21}{256} +\frac{34}{512}+ \frac{55}{1024} + \cdots$$  Now, I solved this using an infinite geometric matrix series (incorporating the matrix version of the relation $a_n= \frac{a_{n-1}}{2}+ \frac{a_{n-2}}{4}$), and my students, after much hinting on my part, googled the necessary string to stumble across Binet's formula (which allows one to split the series into two simple, if rather messy, geometrics). Both of these are good methods, but neither really seems plausible for a challenge set for 15-18 year olds under exam conditions. So how is one supposed to do it?


I want to disable Intel "turbo boost" on startup of my system. For reason of this, as well as my laptop details, please refer to my Stack Overflow thread:   In an answer I made myself, I used the following line inside /etc/rc.local:  echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo   This solution is partly motivated by this thread: , and was working just as expected, before I upgrade my Ubuntu system from 14.04 to 16.04 in February. But after that it no longer works: the no_turbo value is still 0 and that line has no effect at all.  Of course, I could manually do the following later:  sudo su echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo exit   However, I can't remember doing this every time, and it is very discouraging when I realized that I had forgotten to do so and have to rerun a long benchmarking (like what I am doing now).  Is there an explanation why the same solution fails in 16.04? Or how can I achieve this automatically on startup?    Note I have other lines in rc.local, like for turning off Intel hyperthreading and setting backlight, they all work. It is just this particular line for "turbo boost" that fails. So the problem is not that rc.local is not run.  My machine has UEFI boot loader. Though there is an entry for the so-called legacy BIOS, there are few options there to set. Neither hyperthreading nor "turbo boost" can be configured.    In case someone wonders: the   systemctl enable rc-local.service   does not solve the issue.

On previous installed version kubuntu 15.xx i added a line into /etc/rc.local - /home/diet/scripts/my-auto-mount-script which obviously referred to a script that if on home wifi network drives should be mounted.   This worked flawlessly on kubuntu 15.xx  After the upgrade it seems /etc/rc.local is being ignored on boot because running the command /etc/rc.local still seems to do the trick. The reason I think rc.local is being ignored is because the script it refers to should produce logs on script success but also on script fail, but there are no logs.  Can anyone give me some pointers on how to troubleshoot this matter?  PS : yes I know that putting stuff in /etc/fstab is also a way of mounting the drives, but when I'm not at home I hate it that I can see the drives on dolphin and have those little red crosses on them because the are not there. This way when I'm on the road (it is a laptop) people can't see what i have at home.


Let $(X, \Sigma, \mu)$ be a measure space with $\mu$(X) $< \infty$. Let $p \in [1,\infty)$.    I would like to prove that $L^p \subseteq \underset{1 \leq q \leq p}\cap L^q$. I'm not sure how to go about this question, so would appreciate any help. Thanks!

Let $(X, \mathcal B, m)$ be a measure space.  For $1 \leq p < q \leq \infty$, under what condition is it true that $L^q(X, \mathcal B, m) \subset L^p(X, \mathcal B, m)$ and what is a counterexample in the case the condition is not satisfied?


I want to start by saying that I know this question has been asked a lot, but the 10~15 articles and posts I've read all assume that the reader is knowledgeable on the subject, and I'm not.   So, I currently have ubuntu 16 installed on a dell latitude 6430u (if that matters). Basically what I've gathered is that I would want to install some windows 10 software on a flash drive and create a new partition on my SSD so that I could dual boot into windows 10 (switching by pressing f12 on start up to get into the bios). Now, I can't fully understand how I'm supposed to do most of that. I'm seeing a lot of installing/using grub but I'm not sure what it's saying. Any way I could get some pointers?  Some places are saying it's easier to whipe ubuntu and install windows 10, then reinstall ubuntu, but I would prefer to avoid that. Thanks  Edit: I think my question is different than the given duplicate because they're talking about windows 7. Also using cd drives, which I don't have.

I have Ubuntu on my laptop. Now I want install Windows 7 in a dual-boot. How can I do this? I can't lose my Ubuntu files, and I'm afraid that I might break . Go  for UEFI only!


I just installed WPS office on ubuntu but now whenever I try to launch any of those WPS office software like WPS Writer or WPS Presentation they won't launch.It won't show any error report either. I downloaded the package from its website and then installed it using gnome. I have to make a project and I'm more used to Microsoft office and WPS office seems to be the closest to it in Ubuntu. Also the  LibreOffice seems to lack many features (like word art, styles etc.).  I'm using the 16.04 version of Ubuntu.

It's pretty complicated and sometimes the system freezes when I try to download and install wps office. I think it is much more convenient to use the terminal. But I never used installed WPS Office from the command line. That would be great if I could update it using software manager or terminal. Third party deb files are from separate locations. I specifically want to know about WPS


Some websites use Editors' picks while others use Editor's picks .   Which one of these is correct?  Is Editors' picks correct when the publication have more than one editor?

I’ve been looking over what has been posted regarding the use of ’s.   I used to be a Technical Writer (years ago). The title of one of our training documents was Users’ Guide.  Once, a coworker said every time he saw that title he expected users to start coming.    Never made any sense to me, but I have to admit that the majority of us didn't understand the use of s’ in place of ’s.  What is the difference?


Should "social media" be spelled with a hyphen in the phrase "social media post"?   To me, the hyphen looks wrong, but I would like to be able to provide some grammatical rationale to explain why.

Possible Duplicates:                In the sentence "Portland is known to be one of the most bike friendly cities in the US", is a hyphen necessary in "bike friendly"? As far as I know, the hyphen is only required when leaving it out would cause ambiguity. Wikipedia uses the example of "a small appliance factory" vs "a small-appliance factory".   As far as I can tell, the sentence above is pretty clear. A quick google search for "bike friendly city" brings up instances of both hyphenated and non-hyphenated usage. Thoughts?  Please excuse the poor formatting, sent from my iPhone.


I just found that my /sdcard/DCIM/.thumbnails folder grew to more than 40GB. Two .thumbdata3 files each large 20GB.  My Galaxy S3 has only 16GB of internal storage. These files prevent me from backing up my sdcard to SFTP.  I think I can safely delete these files, but where do they come from? And how to check if there are any strange ghosts left?

I have an 8GB Nextbook7 running Android 4.0.4. Recently, I discovered that I have 2 files named .thumbdata3... eating up all my internal space of 5+GB. These files are found in the .thumbnail folder under the DCIM folder. I have read on the internet that these files are produced by Android Gallery, but there is a bug in the OS that causes these files to grow so large and max out all the available internal storage space.  I have tried deleting the files, but they come back. I have tried writing small text files and saving them with the name .thumbdata3... as in the problem files, but that does not work either. I have downloaded an app called Thumbnail file deleter, which deletes the problem files, but the files will rebuild themselves again until the space is maxed out.  Does anyone have a permanent cure to this .thumdata3... problem? Any suggestions appreciated. Thanks.


I hear these words thrown around a lot but I don't understand what they mean in . Somebody told me to look it up in the standard but in the  there's no mention of "stack" or "heap", only stack unwinding which doesn't say what the stack is.   Do these concepts exist in C++?

Programming language books explain that value types are created on the stack, and reference types are created on the heap, without explaining what these two things are. I haven't read a clear explanation of this.  I understand what a stack is. But,    Where and what are they (physically in a real computer's memory)? To what extent are they controlled by the OS or language run-time? What is their scope? What determines the size of each of them? What makes one faster?


And if so, why? I'm having some trouble with this. I know that the $D_{f}$ (set of primes not containing $f$) are the open sets and form a basis for the Zariski topology; but I do not know how to go about even constructing an open cover. Thanks.

In an exercise in Atiyah-Macdonald it asks to prove that the prime spectrum $\operatorname{Spec}(A)$ of a commutative ring $A$ as a topological space $X$ (with the Zariski Topology) is compact.   Now because the basic open sets $X_f = \{\mathfrak{p} \in \operatorname{Spec} (A) : \{f\} \not\subseteq \mathfrak{p} \}$ form a basis for the Zariski Topology it suffices to consider the case when   $$X = \bigcup_{i \in I} X_{f_i}$$   where $I$ is some index set. Then taking the complement on both sides we get that   $$\emptyset = \bigcap_{i \in I} X_{f_i}^c$$  so there is no prime ideal $\mathfrak{p}$ of $A$ such that all the $f_i$'s are in $\mathfrak{p}$. Now from here I am able to show that the ideal generated by the $f_i$'s is the whole ring as follows. Since there is no prime ideal $\mathfrak{p}$ such that all the $f_i \in \mathfrak{p}$, it is clear that there is no $\mathfrak{p}$ such that $(f_i) \subseteq \mathfrak{p}$ for all $i \in I.$ Taking a sum over all the $i$ then gives $$\sum_{i \in I} (f_i) = (1).$$  Now here's the problem:          How do I show from here that there is an equation of the form $1 = \sum_{i \in J} f_ig_i,$ where $g_i \in A$ and $J$ some finite subset of $I$?       This part has been giving me a headache. I am not sure if the finiteness bit has to do with algebra, topology or the fact that we are dealing with prime ideals.  This is not a homework problem but rather for self-study.  $\textbf{Edit:}$ I have posted my answer below after the discussion with Dylan and Pierre.


I am using Ubuntu 19.04. How do I install Microsoft Visual Studio 2017 on it?

How can I install Visual Studio?    I'd prefer to use it in Wine or PlayOnLinux if possible.


I want to know if I can use a particular type of formatting to differentiate one part of the figure from the text. For example, in the figure below, I would like to talk only about the role of part M5 in the system and would like to box it or bold it as I pause to explain one bullet of the slide. Subsequently, another part of the image would be boxed and so on.

Recently I have learned how to draw simple stuff with TikZ. I really like it. Now I wonder if it is possible to draw with TikZ on a image. Instead of pasting a image in Illustrator and adding some vectors to point something in the picture I would like to do it using TikZ. Is it possible?   For example, on a picture of a computer (PNG,etc) I would like to draw some arrows and labels saying "Keyboard", "Monitor", etc.


On Cambridge Online Dictionary, the phrase "have got" is considered a formal alternative to simply "have", for example:  He has four cats.   He has got four cats.  I want to ask: Does adding an additional modal verb (e.g. must) change the meaning, or is the meaning of "must have got" & "must have" still the same? In other words, do these sentences mean the same thing?:  He must have four cats.   He must have got four cats.  How about with modals apart from must?

When do I use have and have got?  Are "I have the answer" and "I've got the answer" both correct?


If I cast Charm Person on a human and then he or she is Polymorphed into an animal, does the spell end?

There are several spells that require the target to be "humanoid" such as , , etc.  However, if the target is Polymorphed after that spell has been successful, then what happens?  Does the change in form to Beast end the spell effects? Does it suppress the spell until the correct form returns? Does it do something else?


The sequense $\{a_n\}$ such that $a_1>0, a_2>0$ and $$a_{n+1}=\frac2{a_n+a_{n−1}}$$ for $n≥2$.   Prove that this sequence has a limit.   I know I need to prove  1) the sequence is monotone; 2) the sequence is bounded.   But sequense is not monotone.  Any hints?

Assume that $(a_n)$ is a sequence of positive real numbers satisfying $a_{n+1}=\frac{2}{a_n+a_{n-1}}$ for $n=2,3,\dots$.  Prove that $(a_n)$ is convergent and find the limit.    I have no idea how to prove convergence. I tried to prove that $(a_n)$ is bounded and monotone, but both trials failed.  If convergence is proven, the limit is easy: if $g=\lim a_n$, then $g\ge 0$ because all $a_n$'s are positive, the equivalent relation $a_{n+1}(a_n+a_{n-1})=2$ gives $g(g+g)=2$, so finally $g=1$.


I am working on a program using a JPanel to show a block of text,buttons,etc. and I am trying to set a JPanel equal to another one that i created but its not doing anything. Ignore my buttons and crap.  I have the panel declared publicly       public JPanel panel;   And Here is its stuff...       panel = new JPanel();     panel.setBackground(PanelColor);     panel.setBounds(0, 93, 594, 478);     contentPane.add(panel);     panel.setLayout(null);   I want to make it so when i hit a button (in this case: btnKinematics) it changes a the panel to a different class i have called KinematicsPanel.java      btnKinematics = new JButton("Kinematics");     btnKinematics.setFont(ButtonFont);     btnKinematics.setFocusPainted(false);     btnKinematics.setBorder(compound);     btnKinematics.setBackground(Color.WHITE);     btnKinematics.addActionListener(new ActionListener() {         public void actionPerformed(ActionEvent arg0) {              highlite(btnKinematics);             panel = new KinematicsPanel();             panel.setBackground(Color.WHITE);         }     });     btnKinematics.setBounds(14, 60, 130, 23);     contentPane.add(btnKinematics);   Thanks   UPDATE: FIXED  I made some changes and this worked      contentPane.remove(panel);     contentPane.add(new KinematicsPanel());     contentPane.repaint();   thanks

To put it simple, there's a simple java swing app that consists of JFrame with some components in it. One of the components is a JPanel that is meant to be replaced by another JPanel on user action.  So, what's the correct way of doing such a thing? I've tried  panel = new CustomJPanelWithComponentsOnIt(); parentFrameJPanelBelongsTo.pack();   but this won't work. What would you suggest?


I wrote a method to subdivide a list of items into multiple lists using System.Linq.  When I run this method for 50000 of simple integers it takes about 59.862 seconds.  Stopwatch watchresult0 = new Stopwatch(); watchresult0.Start(); var result0 = SubDivideListLinq(Enumerable.Range(0, 50000), 100).ToList(); watchresult0.Stop(); long elapsedresult0 = watchresult0.ElapsedMilliseconds;   So I tried to boost it, and wrote it with a simple loop iterating over each item in my list and it only needs 4 milliseconds:  Stopwatch watchresult1 = new Stopwatch(); watchresult1.Start(); var result1 = SubDivideList(Enumerable.Range(0, 50000), 100).ToList(); watchresult1.Stop(); long elapsedresult1 = watchresult1.ElapsedMilliseconds;   This is my Subdivide-method using Linq:  private static IEnumerable<List<T>> SubDivideListLinq<T>(IEnumerable<T> enumerable, int count) {     while (enumerable.Any())     {         yield return enumerable.Take(count).ToList();         enumerable = enumerable.Skip(count);     } }   And this is my Subdivide-method with the foreach loop over each item:  private static IEnumerable<List<T>> SubDivideList<T>(IEnumerable<T> enumerable, int count) {     List<T> allItems = enumerable.ToList();      List<T> items = new List<T>(count);     foreach (T item in allItems)     {         items.Add(item);          if (items.Count != count) continue;         yield return items;         items = new List<T>(count);     }      if (items.Any())         yield return items; }   you have any idea, why my own implementation is so much faster than dividing with Linq? Or am I doing something wrong?  And: As you can see, I know how to split lists, so this is not a duplicated of the related question. I wanted to know about performance between linq and my implementation. Not how to split lists

Is there any way I can separate a List<SomeObject> into several separate lists of SomeObject, using the item index as the delimiter of each split?  Let me exemplify:  I have a List<SomeObject> and I need a List<List<SomeObject>> or List<SomeObject>[], so that each of these resulting lists will contain a group of 3 items of the original list (sequentially).  eg.:   Original List: [a, g, e, w, p, s, q, f, x, y, i, m, c] Resulting lists: [a, g, e], [w, p, s], [q, f, x], [y, i, m], [c]   I'd also need the resulting lists size to be a parameter of this function.


So I have just started learning QFT.  So you take a classical field and turn the degrees of freedom into operators.  All fine, just like normal quantum.    However I am confused about the commutation relations.    For the Klein-gordon/spin 0 scalar field we say $$[\psi_\alpha(x),\psi_\beta^\dagger(y)]=\delta_{\alpha\beta}\delta(y-x)$$ however for the dirac/spin half field we say $$\{\psi_\alpha(x),\psi_\beta^\dagger(y)\}=\delta_{\alpha\beta}\delta(y-x).$$  In Tong's lecture notes he seems to justify this by appealing to the fact that it works.  However I don't find this very satisfying.  Is there a mathematical reason for seeing what the commutation relations are a priori or do you just have to see what works.

Why is the anticommutator actually needed in the canonical quantization of free Dirac field?