I have put together the following mootools script   window.addEvent('domready', function() {     var shouts = "timed.php";     var log = $('log_res');     function updateData (url,target)     {         new Ajax(url,{         method: 'get',          update: $(target),          onComplete: function() {         log.removeClass('ajax-loading');}  }).request();         log.empty().addClass('ajax-loading');     }      var update = function(){ updateData ( shouts, 'log_res' ); };     update();           // call it immediately     update.periodical(10000);   // and then periodically   });   heres the html

Ajax Response

exercise

   its using moo 1.1.  The above works fine, the page loads then the ajax request kicks in div id log_res has a class of ajax-loading whilst its updating, and when its finished the text exercise in the div is replaced with whatever the ajax has returned (yippee). But I want to put some custom HTML into the div WHILST the page is loading, because the ajax-loading class is not enough to contain the information, i also want to put a spinny flasher into the div whilst the ajax request is retrieving the information. Hope that makes sense!


What do the symbols on the main menu mean?

If you swipe all the way to the left on the menu and then some, this sequence of symbols appears. (Do not pay any mind to the white circles: it's where I was holding my finger. The space between the first few and the last three symbols is also not present in game.)    What gives?


Locked out from Windows 8.1 administrator account being disabled

I installed a Windows 8.1 laptop. By default the Administrator account is disabled. During the install process, the user created belongs to the administrators group (call it FirstUser).    I installed various software, I created a normal account for the user (call it RealUser), and I mistakenly deleted FirstUser account (while I was connected under this account). I rebooted and... oh well, I understood the mistake. I no longer have access to any administrative privileges. The laptop is still in workgroup.  I tested with  (latest version):   Activated Administrator account, and blanked its password (no option to set a new one) Gave RealUser account administrative privileges   After reboot, only RealUser account is still available. Once logged in, I'm unable to access anything requiring administrative provileges.  Does anyone know a way to successfully activate the Administrator account, or whatever ?


I was trying to create a Java method that reads a file and returns a string but it seems that the value of string was same when it was initialized

public static String priceReader(String clotheOrder) {                  String price = "";         try {                          File file = new File("src\\application\\clotheprice.txt");             Scanner scan = new Scanner(file);                          while (scan.hasNext()) {                                           String clotheCode = scan.next();                 String clothePrice = scan.next();                 String clotheStocks = scan.next();                                          if (clotheOrder == clotheCode) {                             price = clothePrice;                 }             }             scan.close();         }              catch (FileNotFoundException e) {             System.out.println("Error occured.");             e.printStackTrace();         }         return price;     }  Above is the java method that I'm trying to run. If this method is not functional, is there other way to read a file then return a string from the file? Thank you in advance.


A)It is not permitted to smoke in the kitchen.      B)It is not allowed to smoke in the kitchen.   According to Practical English Usage(42) the passive structure with it,is only possible with permit. To me sentence B seems to be correct and I can't understand why it is wrong to use it.  And according to Cambridge dictionary example:     The loophole has allowed hundreds of drink-drivers to avoid prosecution.   Unlike the previous accepted answer for this question  I think Something can allow something else to happen as well as something can be permitted.


How do I install the latest version of node.js?

How do I install the latest  on Ubuntu? I've been looking around, and I can't find anything. Is there a Ubuntu package for node.js, or do I have to compile it myself?


An MCQ for finding the extremal of the functional $J = \int_{a}^{b} F(x, y, y^{'})$

Consider a functional  $$J = \int_{a}^{b} F(x, y, y^{'}),$$ where $F(x, y, y^{'}) = \frac{1 + y^{2}}{(y^{'})^2}$ for admissible function $y(x).$ Which of the following are extremals for $J$?   $y(x) = A\sin x $ $y(x) = A\sinh x + B\cosh x$ $y(x) = A\sinh(Ax + B)$ $y(x) = A\sin x + B\cos x$   I use Cauchy Euler equation. But it does not give me any direction to justify the option(s).


Evaluate ${n \choose 1}+2{n \choose 2}+...+n{n \choose n}$

I have trouble finding an explicit expression to prove this sum using induction, and would like a hint. It would also help if someone provided a non-induction question.


How to run a script, depending on internet connection

I often mount a remote drive using sshfs. I would love to have this mount automatically. However, if I mount it in my .bashrc or startup scripts, the mount often fails because my wireless internet connection has not yet been made.  Does anybody know of an easy way to execute a bash scrip every time the connection is made, or to auto-mount an sshfs drive?


jQuery: fire click event on dynamically added HTML

I add dynamically a form into a <div> using jQuery with some data retrieved via Ajax (it's made to update some records). Problem is that i'm not able to fire a click event on this form as i assume it is created after the document comes ready. I need to fire this event to call Ajax again and save the new data in the db.  Basically, this creates the form into the <div id="#result"> :  jQuery(document).ready(function ($) {     $.ajax({         [...]         success: function(data) {             $('#result').html(                 '<form name="form_name_here">' +                     '<input type="text" value="' + data[0].it + '">' +                     [...]                     '<input type="button" id="update_record" value="Save"> ' +                 '</form>'             );         }     }); });   But then this won't work:  jQuery(document).ready(function ($) {     $.ajax({         [...]     });     $('#update_record').click(function () {         console.log('test');     }); });   I tried also $('#update_record').on('click', function() { with no success.


Why were my answers about using a library I've created deleted?

A Stack Overflow moderator, , just erased almost all answers I've given. They are valid though! They are in context with the questions made, and yes, they redirect people to use a library I have made. The answers redirect people for this library just like other answers that redirect people for a Microsoft or other library that would not work for this case and still were not deleted. I've taken care to answer only in the context where I know my library would work and the other options would not, or would be more difficult to implement. . These are questions where my answers were deleted:      and there may be others … And these are questions where I helped people to use the library – or questions where it was not me who answered about using the library:     Why were those answers deleted, and could they be undeleted?


Edit post + "New edit to this post" = Extra "navigate away" prompt

Instead of explaining this bug in prose form, I'll just list the steps you need to reproduce it.   Begin editing a post (not sure if actually making any changes makes a difference) A wild "An edit has been made to this post" dialog appears! Click on said dialog to refresh the post's content, discarding your edits and taking you out of post-edit mode Edits looks okay (surprised look on face), so I'll just navigate away Are you sure you want to navigate away? You may lose your changes. [OK] [CANCEL]   I can see why this hasn't been caught before; it's kind of uncommon. If you didn't catch the bug: I'm no longer making edits, therefore the "Navigate away" prompt shouldn't show up.


AC Adapter gives much more voltage than it's supposed to

Hello! I have this one older AC-DC adapter from Korg (wallwart?)...    ...that I have been using for my (guitar) effect pedals for a few years, and I recently found out (when I was doing some electronics doodling) that the adapter gives much more voltage than it's supposed to.  I should give out +9V (as it is clearly seen from the picture), but when I measured the voltage by my multimeter, it is showing...    ...more than 14V! It freaked me out a little bit, since I may have been using it like this as a +9V adapted for my (expensive) delay, and that certainly could have been good for the pedal.   Does anyone have an idea of what's wrong with the adapter, since I have never opened it up or messed with it? Or am I measuring it wrong? And possibly, is there an easy fix?  Thank you!  EDIT: How can I find out that the adapter is "unregulated" (is it the same as unstabilized?) and it's not broken?


Number of partitions with limited cardinality

We are given $k$ urns labeled from $1$ to $k$. What is the number of ways to put $n$ indistinguishable balls into the $k$ (distinct) urns, given that each urn has a limited capacity equal to $c$, namely the maximum number of balls that can be put in the same urn?


A few automatic weight / weight painting questions

I'm quite new to Blender.  I've been following a few tutorials on Youtube and have made and rigged a human model.  I've merged the armature with its bones and applied automatic weights but barely any of the model has lit up in Weight Paint mode and what has lit up appears to be mirrored on the opposite side of the model which can be seen below.    I don't understand why this bone is having so much influence over the rest of the armature when the whole model is blue.    At this point you might already know what the problem is, but if not here are my thought. The character mesh is being mirrored and I think that at some point I was meant to turn off the mirror, duplicate half of the mesh, flip it and then merge it with the other half. But at no point in the video series I'm watching was this done, so I'm sceptical.  I also can't find how to turn off the mirror. Though I suspect I could if I just googled and while that might fix my issue I'd still appreciate some reassurance or advice.  Thank you.  In the odd chance anyone would like to download this blender file .


I have reduced my problem to a MWE and I have no idea what is going on.  The following code compiles and functions as expected when I remove the empheq package:  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{empheq} %Put boxes around multiline equations/equation environments  \begin{document}  \tableofcontents  \section{blahsec1} \subsection{blah1} \subsection{blah2} \section{blahsec2}  \addtocontents{toc}{\setcounter{tocdepth}{1}} % \subsection{blah1} \subsection{blah2}  \end{document}   However, when I add the empheq package, I get the following error:     Missing number, treated as zero.                             \begingroup  l.5 ...oup \aftergroup \calc@B \calc@A \begingroup                                                      \aftergroup \calc@B \calc... A number should have been here; I inserted 0'. (If you can't   figure out why I needed to see a number, look upweird error' in the   index to The TeXbook.)      ! Missing number, treated as zero.                        \afterassignment  l.5 ...aftergroup \calc@B \calc@A \afterassignment                                                      \def {\GenericError {(cal... A number should have been here; I inserted 0'. (If you can't   figure out why I needed to see a number, look upweird error' in the   index to The TeXbook.)


I followed some instructions which I found on youtube, all was going smoothly untill it said that there is no operating system installed which clearly is wrong since I have windows 10 installed. I do not want to unistall windows 10, but run Ubuntu as a dual-boot. I tried googling for answers but the problem is that I do not understand any of the instructions I find there. I do not know a thing about computers. I think I could get it to work if someone would tell me exactly what to do. That would mean the world to me. Thanks in advance


Apache URL Rewrite /client/client to /client

I am attempting to change the URL of my site, to make it more user friendly.  Currently users must navigate to www.domain.com/client/client/. I wish to display this as just www.domain.com/client. However, I still require the file path /client/client to exist (IE: there are files in /client/client that use ../folder, and I need these to still work)  Does anyone know if RewriteRule can accomplish this, or how else to accomplish this?


If universe is expanding then relative to what?

I am very keen about the fact that universe is expanding.If something expands, it expands relative to something else. If the universe is expanding, then it must expand relative to something else. What is that something else here? I am asking this question as if everything is contained in the universe itself,then where  does that something else live?


Attached you find photos of a Li-Ion battery's PCB. I'd like to know what this component is called and what its use is.  The component in question is the three pin stretched silver "bridge". The white blobs seem to be glue, while the black things you see are ICs. There is nothing beneath the brownish center of the component.


How to ask for a password to mount crypted swap at boot time on Linux Mint 16 with initramfs-tools?

I use encrypted home folders on my notebook, which prevents use of hibernation on standard setup, because - and for a good reason - besides encrypting the home folder with ecryptfs, it reformats the swap partition with one-time passwords each boot. Thats why it is impossible to share hibernation data (which is stored in swap) between reboots.  One way of enabling the hibernation without sacrificing the security is to use persistent password for the swap an ask user to enter it at system boot.   AFAIK the standard way to achieve it is by adding or modifying scripts in /usr/share/initramfs-tools/scripts/local-top, and there was a .   On Linux Mint 16, although the patch doesn't work anymore, although the file /usr/share/initramfs-tools/scripts/local-top/cryptroot didn't change between the ditributions. I guess there was introduced a difference on how the kernel handles those scripts. Can anyone help me out?


How can I achieve a Japanese style cell animation toon shader look in Blender?

Here are my examples.  Edit// Here is a video showing what I want exactly, how "shaders" and "renderer" should work.   notice how easy it is to set the shadows on the character in the video here?      Somehow they have controls over the shading, and normals. And the shader draws smooth lines around the edges. Here are more examples.    Animation:     This here is actually created in blender.   I actually think it's better than most of the other ones, I don't know what tricks he used, or if it holds up in full 3D animation though.  The others are all pretty much 3DS MAX Pencil+ plugin.  here's some more examples even.  I would like to know, what kind of settings, what kind of stuff I should be looking for, to copy this style with blender, or if anybody pro enough to create a short tutorial it would be amazing!  Here are a few more. Supposedly, this style is "easy" if you have the 500$ 3DS Max plugin...   Anybody know here?


How did Koro-sensei's body change from humanoid to an octopus-like creature?

In his earlier transformation form, Koro-sensei had a humanoid and white-colored body.     But later on, his body had undergone a drastic change and his body became like an octopus with a large smiley face.    Why did his body transform? And could he revert back to his humanoid-tentacle like body?


I write tic tac toe and i have small problem.  When checking the fields, console write error:  Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at pl.knugi.Main.sprawdzKombinacje(Main.java:164) at pl.knugi.Main.actionPerformed(Main.java:179)   This code:      public boolean sprawdzKombinacje(String p){     String[] spr = new String[3];     for(JButton[] c : check){         int a = 0;         for(JButton b : c){             spr[a]=b.getText();             a++;         }         if(spr[0].equals(p)&&spr[1].equals(p)&&spr[2].equals(p)){             return true;         }     }     return false; }   Variables:  JButton[] check1 = {button1, button2, button3}; JButton[] check2 = {button4, button5, button6}; JButton[] check3 = {button7, button8, button9}; JButton[] check4 = {button1, button4, button7}; JButton[] check5 = {button2, button5, button8}; JButton[] check6 = {button3, button6, button9}; JButton[] check7 = {button1, button5, button9}; JButton[] check8 = {button3, button5, button7}; JButton[][] check = {check1, check2, check3, check4, check5, check6, check7, check8};   What am i doing wrong?  Problem is b.getText(), because this is AbstractButton. Then how I getted text from my button ?


Help needed with changing the colors in a video

I am trying to get the colors in the video to be changeable. I need something that could completely change any one color in a video, specifically black to white, but I don't want to invert it to make all white objects black. I can work without changing the other colors, but it would be nice if I could do them too. I am not very experienced with Blender, so there may be a very obvious answer here that I am just not seeing. One thing I tried was turning the black into a green screen with the keying node, but that messes with the other colors. Any help is appreciated. Thank you.


Boolean Operations - Why the fuzzy result after union of 2 objects?

I am trying to join this cube.    With this cube with a Boolean Union modifier.   The result is always this fuzziness in the final mesh.  WHY?  I have checked for correct face orientation and Scale and Rotation.     Here is a file upload and screenshot of the Boolean as requested.      Below is a  successful joining of 2 intersected objects without fuzziness as I explained below.


Conservation of energy and Doppler effect?

From what I understand, the frequency of light coming from the source moving towards an observer increases. From $ E=hv $ , this implies increase in energy of photon.  What really is confusing, is where does that extra energy come from? And also where is the energy is lost during opposite Doppler effect (red shift)? Why doesn't this violate the conservation of energy?


I was going through some material related to localisation of rings. I am having a trouble with understanding why it is needed. I just see it as a way to create more rings but I have no idea what is special about the $S^{-1}A$ where $S$ is a multiplicative closed set and  $R$ is the ring. My knowledge of tensors if very limited.


$A$ is an invertible matrix such that the sum of each row is $1$

Let  $A$  be  an $10\times 10$  invertible  matrix  with  real  entries  such  that the  sum  of  each  row  is  $1$. Then  $A$. The  sum  of  entries of  each  row  of  the  inverse  of  $A$  is  $1$  $B$. The  sum  of  entries of  each  column  of  the  inverse  of  $A$  is  $1$  $C$. The  trace  of the  inverse of $A$  is  non-zero  $D$. None  of  the  above  I  don't  see  how  to  proceed or how  to  use  the  sum of  the  elements of of  rows.  Please  help.  I know  option $A$  is  correct  and  option $C$  is not. Why  is  option $B$  not  correct?


"Move" confirmation dialog in File Explorer?

Windows 10. I have Tourette's and occasionally when moving the mouse I'll click it. Every once in a while I get unlucky and have a File Explorer window open and accidentally drag some random folder to some random place. The only way I can really tell that this happens is I'll see the item list lose an item out of a corner of my eye, then think, "argh, not again" (I don't even want to think about how many times I didn't notice at all). Then I have to kind of hunt around to find out what I did so I can fix it, because for some reason the explorer "undo" doesn't catch moves all the time (especially when they happen in the folder pane on the left). So my question is: Is there some way to enable a folder move confirmation dialog in Explorer? (Or if not is there some way to make the Undo feature have better coverage?) (Or maybe make it so I have to shift+drag to move or something?) I use TeraCopy as my copy handler but afaict there's no move confirmation feature. I'm not against registry hacks or installing 3rd party software if needed, although I'd prefer not to. To me it's an accessibility issue. I did check through the accessibility settings but I couldn't find anything helpful. I checked both the Win 10 settings and the old school Control Panel -> Ease of Access settings. I read through  (thanks for the link), but the solution there isn't quite what I'm looking for, for similar reasons to why it wasn't the right solution for the OP there: My accidental drags almost always are past the threshold, and also that applies to all drag operations, which isn't really ideal.


At the Battle of Scarif, a pilot shouts out      More fighters! Form up at six-five!                                    as imperial fighters are dispatched.  What is 65? Is that a formation or some sort of coordinates?


$\forall x\in\mathbb{N}[(\exists y\in\mathbb{N}(2\leq y\land y<x\land y\ |\ x))\to(\exists z\in\mathbb{N}(2\leq z\land z\leq\sqrt x\land z\ |\ x))]$

Please help me to prove this statement. I'm very confused, Thank you! I Have tried prove it using examples but it needs to be proved using mathematical method


For example, if we have some mockups and we want to test it, using a lab test, to check if they are ok to implement we should:   Do only a formative test to identify issues? Or we can also do a summative with the mockups to verify errros, eficiency and effectiveness? Or this summative test should only be after implement? Also it seems that its ok to test with just 5 users to identify problems, that is to make formative tests, but for summative (to measure errors, efficiency and so on) tests, with just 5 users can be enough also? Note, but if we should only do a formative test with the mockups, a formative test should include what? What can we test to identify problems? We can use summative metrics in the formative test?


Ubuntu 14.04 Desktop install stuck in loop at Where Are You

I'm installing Ubuntu 14.04 64-Bit Desktop.  I'm using all defaults and after accepting "Erase disk and install Ubuntu" I click the "Install Now" button.  Immediately, the "Where are you?" form comes up with a small error window showing "??? ???" in both the error window's text and header.  The pointer is still active.  The "Continue" button seems to be active but ignores clicks.  I can't click anywhere on the entire screen with the exception of the "OK" button in the error window.  Once I click that I'm taken back to the previous "Install Now" button.  Seems like I'm stuck in a loop. Thanks, Curt  i5 Asus Z97-ar mobo 16GB RAM 2 x 4TB hard drives


Question with matrices, determinant and adjugate

Let $A$ be a $n \times n$ matrix with complex elements, $L$ a $1 \times n$ matrix with complex elements and $C$ a $n \times 1$ matrix with complex elements. Show that $\det (A-CL)=\det(A)-LBC$, where $B=\textrm{adj}(A)$ is the adjugate matrix of $A$.


Is there an app to increase/change default fontsize for all applications in mac ? It is really painful for me to read default fonts or to increase fontsize in every app I open, and even worse, the fontsize in many menus(as well as Finder match results) can not be modified!


If the Pauli Exclusion Principle is not a force, how does it result in pressure, or change the momentum of particles?

This question, and ones like it, seem to defy satisfactory explanation for non-physicists. PEP is referred to as Pauli "repulsion", or Pauli "pressure", while it is simultaneously denied to be a force, or result in a force. Comparisons are made to ideal gases. Apologies have been offered for technical jargon being mistaken for the lay person's notion of "force". Copious math Is done to describe acceptable and forbidden behavior of particles. Yet none of the four fundamental interactions, nor indeed a fifth force, is said to be responsible for keeping electron clouds from overlapping too much (solidity of matter questions), or neutrons from collapsing further in a neutron star.   Ideal gas behavior is straightforward and intuitive enough. It's easy to see that many small fast moving particles exert an average force on their container and vice versa. But at the particle level (can we assume hydrogen gas in a balloon?), the same question arises: what force, during the impulse time of an H atom collision with the container wall, changes the particle's momentum? Again, PEP would appear to be the cause, because this is really no different than the solid object question. But, PEP is not a force, so how does a particle undergo a change in momentum without a force?


How to join two expressions with AND, OR

Lets say I have: Expression<Func<object, bool>> a; Expression<Func<object, bool>> b;  a = (x) => x.ToString() == "hello"; b = (x) => x.ToString() == "world";  How can I AND this expressions? In other words I will like to implement this method: // I will like this method to return this expression: // (x) => x.ToString() == "hello" && x.ToString() == "world"; Expression<Func<object, bool>> AndExpressions(Expression<Func<object, bool>> a, Expression<Func<object, bool>> b) {     // return a.Body && b.Body  }    I do not plan to execute the expressions. I just want to join them so that I can build my mongodb query with c#.


How can you merge two worlds in Minecraft?

I want to download two Minecraft maps, and then put them together. Side by side, as in the builds. Like, specifically, a city, and a couple of districts or neighborhoods. How do I do it in the sense that its merged?


So, I've been coding for a Python 'computer software', one where you basically have a log-in username and password that can be edited. I tried to add a feature that allows you to 'remove' the password, (but is more like skipping it) but it won't work. Here is the code for the skipping procedure:  def Access1():      print("Input first name")     print("")     answer = raw_input()     if(answer.lower() == username and PasswordSkip == True):         print("")         print("Access granted")         List1()     if(answer.lower() == username and PasswordSkip == False):         print("")         print("Access granted")         Access2()   *Note that Access2() is the function where a password is needed to continue, and List1() is the main menu of the system.  Here is where the boolean is set to True:  def PasswordRemove():     print("")     print("Are you sure you want to remove your password, <yes> or <no>?")     print("")     key = raw_input()     if(key.lower() == "yes"):         PasswordSkip = True         print("")         print("Ok, your password has been removed.")         print("")         List1()     elif(key.lower() == "no"):         DetailsChange()     else:         DetailsChange()   And here is how I define and globalise PasswordSkip:  PasswordSkip = False  def Startup():     global PasswordSkip   (the function goes on longer, but has no involvement in the boolean.)  If you need any more infor ation on my code, I'm able to give it to you.  So, when I run my code, it overlooks the if statement about the boolean. If the boolean is True, it should go to a different function. However, it skips the statement because it brings up Access2() (the password function).  Answers aren't urgently needed, but thanks.


Why do we need the decorator in the decorator design pattern?

Presuming I have a class named A, and I want to use the decorator design pattern. Correct me if I'm wrong, but for that to work , we'll need to create a decorator class, say ADecorator, which will hold a reference to an A instance, and all the other decorators will extend this to add functionality.  I don't understand why do we have to create a decorator class, instead of using an A instance?


Forgot my Gmail password and SIM card - how can I recover my password?

I have forgotten my Gmail password and have lost my phone SIM card.  How can I recover access to my email account?


If $q(A) = 0$, then $q$ is divisible by the minimal polynomial of $A$

If $A$ is a linear transformation with minimal polynomial $p(x)$, and if $q(x)$ is a polynomial such that $q(A)=0$, then show that $q$ is divisible by $p$.


How can I get textures on edge of walls like in Super Metroid and Aquaria?

Games like Super Metroid and Aquaria present the terrain with the other facing parts having rocks and stuff while deeper behind them (i.e. underground) there's different detail or just black.      I would like to do something similar using polygons. Terrain is created in my current level as a set of overlapping square boxes. I'm not sure if this rendering method will work such a system for creating terrain but if anyone has ideas I'd love to hear them. Otherwise I'd like to know how I should re-write the terrain rendering system so it actually works to draw terrain in this manner...


Gnu Grub menu does not recognise my MS Windows installation

I had dual boot set up with my previous Ubuntu installation which allowed me either to use Windows XP or Ubuntu. This worked successfully.  I have upgraded to Ubuntu 14.4. The new Gnu Grub menu does not show my Windows XP installation on the start-up menu. So I am unable to access Windows.  results of sudo fdisk -l  Disk /dev/sda: 500.1 GB, 500107862016 bytes 255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0xa89aa89a  Device Boot      Start         End      Blocks   Id  System /dev/sda1   *          63   976751999   488375968+   7  HPFS/NTFS/exFAT  Disk /dev/sdb: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x00062131  Device Boot      Start         End      Blocks   Id  System /dev/sdb1   *        2048   195311615    97654784   83  Linux /dev/sdb2       195311616   625137344   214912864+   7  HPFS/NTFS/exFAT


Ubuntu 18.04 BCM43142A0 bluetooth problem

I have a problem with Bluetooth on my Laptop. It seems to get stuck on searching for devices.  I looked through AskUbuntu already and found a few great, detailed solutions, but I don't know what firmware I need. Here are the outputs of commands I found online:  dmesg | grep -i bluetooth  [   20.793040] Bluetooth: Core ver 2.22 [   20.793074] Bluetooth: HCI device and connection manager initialized [   20.793081] Bluetooth: HCI socket layer initialized [   20.793085] Bluetooth: L2CAP socket layer initialized [   20.793095] Bluetooth: SCO socket layer initialized [   21.153861] Bluetooth: hci0: BCM: chip id 70 [   21.154856] Bluetooth: hci0: BCM: features 0x06 [   21.170837] Bluetooth: hci0: BCM43142A [   21.170844] Bluetooth: hci0: BCM (001.001.011) build 0000 [   21.449876] bluetooth hci0: Direct firmware load for brcm/BCM.hcd failed with error -2 [   21.449883] Bluetooth: hci0: BCM: Patch brcm/BCM.hcd not found [   24.056776] Bluetooth: hci0: command 0x1003 tx timeout [   24.058451] Bluetooth: hci0: unexpected event for opcode 0x1003 [ 5417.077645] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 5417.077649] Bluetooth: BNEP filters: protocol multicast [ 5417.077657] Bluetooth: BNEP socket layer initialized [ 5513.623521] Bluetooth: RFCOMM TTY layer initialized [ 5513.623532] Bluetooth: RFCOMM socket layer initialized [ 5513.623543] Bluetooth: RFCOMM ver 1.11 [ 5538.321869] Bluetooth: hci0: command 0x1003 tx timeout [ 5538.323516] Bluetooth: hci0: unexpected event for opcode 0x1003 [ 5734.376654] Bluetooth: hci0: urb 0000000094ad7f77 failed to resubmit (2) [ 5739.698606] Bluetooth: hci0: BCM: chip id 70 [ 5739.699750] Bluetooth: hci0: BCM: features 0x06 [ 5739.715784] Bluetooth: hci0: patryk-Lenovo-G50-45 [ 5739.715798] Bluetooth: hci0: BCM (001.001.011) build 0000 [ 5739.715927] bluetooth hci0: Direct firmware load for brcm/BCM.hcd failed with error -2 [ 5739.715934] Bluetooth: hci0: BCM: Patch brcm/BCM.hcd not found   lsusb  Bus 002 Device 004: ID 105b:e065 Foxconn International, Inc. BCM43142A0 Bluetooth module Bus 002 Device 003: ID 5986:0652 Acer, Inc  Bus 002 Device 002: ID 0438:7900 Advanced Micro Devices, Inc.  Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 004: ID 046d:c534 Logitech, Inc. Unifying Receiver Bus 001 Device 003: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller Bus 001 Device 002: ID 0438:7900 Advanced Micro Devices, Inc.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   As you can see it tries to load BCM.hcd firmware and while I found this repository on Github:  I don't know which firmware I should use.


Black/white hatching pattern fills in QGis

I am looking to replicate black & white maps in QGis, using hatching patterns and greyscales to indicate different categories of a continuous variable (example below).  It is possible/straightforward to do so in QGis? At first sight I only see color gradients and symbol fills.   ).


Suppose we have $$\frac{2}{3} \equiv x \bmod 5$$  I understand that the first step that needs to be made is: $$2 \equiv 3x \bmod 5$$  But from there I'm having a hard time understanding the logic of how to solve for $x$. Obviously, with simple numbers like this example, the answer is $4$, but how can I abstract the process to solve for $x$ when the numbers become very large?


I'd like to find an analogue of  or any other fps counter on Ubuntu 12.10.  After some googling I found 2 solutions:   To use  (I found it from ). This solution didn't work for me because after launching the game:  mumble-overlay game   I got this error:  game: symbol lookup error: /usr/lib/mumble/libmumble.so.1: undefined symbol: glPopClientAttrib   And I didn't find any fix of this error in the WEB. To use WINEDEBUG=fps with osd_cat. It works only with  (only Windows games). Found from reading  and . It shows FPS during play but the output is definitely wrong - 0.15-0.18 fps. And it doesn't matter if game really runs slow or fast - the result is always the same.   Does anyone know how to fix these errors? Or are there any other solutions? Thanks for the help.


I can't change Google Maps menu to English. English is my language of choice throughout Google, but in Google Maps the menu is in Russian. How can I change it to English?


hard disks spin up by processes / applications that simply get a list of disks? How to prevent?

I have a 24/7 always-on Debian Jessie based headless home server that has a large 1TB SSD for the OS and all of my frequently accessed files. This same system has 4 larger hard disk drives in a SnapRAID array. These are mainly for archiving infrequently accessed Blu-rays and want those drives to remain spun down in standby unless I actually read or write to them. They are all formatted as ext4 and mounted with noatime and nodiratime enabled.  So even though no process or program should be regularly accessing those drives in any direct way, the hard drives constantly get spun up from standby. It seems to be related to graphical programs that provide a gui file browser, even something like Chromium. If I don't even browse into those drives, I'm thinking that these processes by simply getting a list of available drives spins up the hard disks. Much like blkid does. The problem is, it's hard to determine the root cause of this since none of these processes are actually reading or writing the filesystem on those drives, so no files are actually changing or being touched. Is there some sort of cache that I can populate or a buffer to prevent these programs from spinning up the hard drive simply by getting a list of available disks? This is honestly driving me insane, since I can't find a reliably way to keep these disks spun-down even though there is no direct access of the filesystem.  UPDATE: Thanks to Stephen's answer, I was able to trace the disk activity to gvfs and udisks. It's a real shame that these processes insist on waking up disks in standby when they aren't actually being accessed to do any real I/O with the filesystem. So far I just uninstalled them, knowing that it will remove some functionality from PCManFM and the like.


Keyboard no longer works on Toshiba Satellite E45t-A4100

On my Toshiba Satellite E45t-A4100, the keyboard is not working. No matter what I press nothing responds. The touch screen is still working, and everything seems to be working properly, but I have zero keyboard function! Any suggestions? I was up a few nights ago using my laptop and everything worked fine, the next morning when I woke up I opened it and turned it back on from sleep mode and none of my keys, nor mouse worked. Really strange to me, I did not add anything to my laptop or do anything, just simply used it one night woke up the next morning and can not use my key board for the last 3 days now.


I wanna convert the linked list to array. But when I print it it gives me the objects' hash code. How can I fix this? I create an array and then equalize it to the person object which is in the linked list.  Person [] personArray; personArray = new Person[phoneList.size()]; System.out.println(personArray);   Phone Book Class:  public class PhoneBook {  Scanner input = new Scanner(System.in); SLinkedList<Person> phoneList; Person [] personArray;  public PhoneBook(){     phoneList = new SLinkedList<Person>(); }  public void addPerson(){     System.out.println("Create new person.");     System.out.println("Name: ");     String name = input.next();      System.out.println("Surname: ");     String sn = input.next();      System.out.println("Address: ");     String a = input.next();      System.out.println("Cell Number: ");     int cell = input.nextInt();      System.out.println("Home Number: ");     int hn = input.nextInt();      System.out.println("Work Number: ");     int wn = input.nextInt();      Person per = new Person(name, sn, a, cell, hn, wn);      phoneList.addLast(per);     personArray = new Person[phoneList.size()];     System.out.println(personArray);  }   Person class :  public class Person {     private String name;     private String surname;     public  String address;     public int cell;     public int home;     public int work;       public Person(String name, String surname, String address, int cell, int home, int work){         this.name    = name;         this.surname = surname;         this.address = address;         this.cell    = cell;         this.home    = home;         this.work    = work;     }      // Accessor methods:     public String getName(){         return name;     }     public String getSurname(){         return surname;     }     public String getAddress(){         return address;     }     public int getCell(){         return cell;     }     public int getHome(){         return home;     }     public int getWork(){         return work;     }      // Modifier methods:     public  void setName(String name){         this.name = name;     }     public void setSurname(String surname){         this.surname = surname;     }    public void setAddress (String address){         this.address = address;     }     public void setCell (int cell){         this.cell = cell;     }     public void setHome (int home){         this.home = home;     }     public void setWork (int work){         this.work = work;     }      public String toString(){         return name + " " + surname + " " + address + " " + cell + " " + home + " " + work;     } }


weak convergence in $L^p$ plus convergence of norm implies strong convergence

Having trouble with this problem. Any ideas?  Let $\Omega$ be a measure space. Let $f_n$ be a sequence in $L^p(\Omega)$ with $1<p<\infty$ and let $f \in L^p(\Omega)$. Suppose that $$f_n \rightharpoonup f \text{ weakly in } \sigma(L^p,L^{p'})$$ and  $$\|f_n\|_p \to \|f\|_p.$$  Prove that $\|f_n-f\|_p \to 0$.  Also, can you come up with a counter-example for the $L^1$ case?


Is it possible for infinite sets to exist in ZFC with the negation of the Axiom of Infinity?

The Axiom of Infinity states that at least one inductive set exists. Inductive sets are infinite, but not all infinite sets are inductive.  Suppose that we take ZFC with the negation of the Axiom of Infinity. Is it still possible for infinite sets to exist? I feel that this might be a dicey question, since ZFC's internal notion of an infinite set relies on ordinal numbers, and (I assume) the negation of the Axiom of Infinity precludes the existence of infinite ordinals. If this question is actually ambiguous as written, I'd be happy to have that be the answer to the question.  Thanks!


Will the Big Rip tear black holes apart?

There seems to be an obvious contradiction between the predictions of the physics of black holes and the Big Rip, a predicted event about  where local groups, galaxies, solar systems, planets, and even atoms will be torn apart.  More , but would this include black holes, which are thought to casually prohibit escape across the event horizon?  The possibilities as I can conceive of them:   Black hole will be evaporated close to the 16.7 Gyr mark as the expansion increases the rate of Hawking Radiation The cosmic even horizon will approach the black hole's event horizon, getting asymptotically closer, forever or until the black hole evaporates according to our predictions for a black hole The universe doesn't completely tear itself apart at all, as matter on the scale of local groups falls into itself, even though the separation between local group increases in a big rip, the local group itself becomes a black hole and experiences a local "big crunch"   That last one is a big stretch, but it was my main take-away from reading .  I found it insightful, regardless of whether it has physical merit or not.  This question has been asked in  before, but didn't seem to have a very informed set of answers.


How to get rid of an extra radio button choice created by SharePoint Lists?

I am creating a list on SharePoint and want to include a simple field in which users can answer a question by choosing a radio button. When I save my changes I see that Sharepoint has included an extra line (or choice) I simply wanted YES, NO and UNSURE as my options. I do not want an empty field. Any help would be great.


Is it possible to uninstall stock apps in Sony Xperia E3 Dual?

My device has 4GB of internal Storage, but it only shows 2GB.  Apps have taken 1.7GB of space alone. Any idea for how to uninstall the stock apps such as as Hike,Line, and others. The only option I see is to disable them but no option as uninstall.


I'm trying to create a dynamic sender profile where the from name and from email change if a value is present in a specific field of the data extension. I want the Lead First Name value and Lead Last Name values to appear. I'm trying to keep all the logic in the sender profile. %%=IIF(EMPTY(AttributeValue("X")), "Bill", AttributeValue("LeadFirstName") AttributeValue("LeadLastName"))=%%  Not sure why, but doing the test, the script shows up as the sender and isn't resolving.


I have a Canon 40D, a tripod and a Canon 70-200mm f2.8L IS II USM lens.  I wanted to take pictures of the moon on a clear night, when there is a full moon.  I wanted to capture the details on the moon.  What settings should I use to get the shot.  Are there any tips anyone can give me?  I've never done this kind of thing before and my lens is totally new, so I have not had much experience with it yet.


What kind of dash is used in the combination of artist and song title?

Which one is correct?   Def Leppard ‒ Photograph (figure dash, U+2012), Def Leppard – Photograph (n-dash, U+2013), Def Leppard — Photograph (m-dash, U+2014) or Def Leppard ― Photograph (horizontal bar, U+2015).


"I would like to know what your name is" instead of "I would like to know what is your name"

Could anyone name the grammar rule that governs how "I would like to know what is your name." should be "I would like to know what your name is." If there isn't really a rule for that, could anyone explain why the verb and the noun should swap places for this type of sentence structure?


I waited two hours before starting my slow-cooker. Will the food be safe to eat?

What I did:  I browned some beef cubes and put them in the slow-cooker. I then added some spices (a lot of spices), tomato juice, olive oil and vinegar.  For all kinds of reason, I waited a total of over 2 hours since placing the meat in the slow-cooker (mostly covered) before turning it on.   I then turned it on high. I plan on cooking the food for at least 7 hours.  Is it safe?  Thank you!


I was getting rid of linux on a spare hdd i have laying around and i asked a friend to remove it and he messed up and formatted the entirething without getting rid of grub. The drive isnt showing up on any systems and i cant boot to it without crashing my new rig. Please help.


What is the best/worst monitoring system?

This is one of those generic questions whose only correct answer is ``it depends''.   What are the criteria?     What is monitored?     Reachability, availability? e.g. is a link up/down, does host respond to ICMP, etc. Services?  e.g. is something listening at the right port, is a named service running, etc. Resources?  CPU usage? e.g. % of total possible, cumulative time, total or per proceess. disk usage?  network usage?  e.g. bytes or packets moved in or out.  Services?  e.g. is something listening at the right port, is a named service running, etc. Service or application specific metrics?  e.g. DB transactions per second, SMTP messages send or received, etc.  How are monitored elements discovered/added/setup/configured?  Is there auto discovery?  Manual setup?   How are particular elements monitored?   a local agent? e.g. to do periodic "df" or "ps" or "ping" SNMP?  JMX? windows performance counters?   How is notification done?  e.g. console, email, pager, SMS, IM, etc.   How are elements and notifications grouped and prioritized?    e.g. will a link failure set off notifications for all the service or reachability elements behind that link?   Or a just one?  Or is it configurable?  e.g. will a host failure set off notifications for all the services or applications hosted there and for lack of resource monitoring data?  is there automatic case/ticket/issue creation in tracking system?   How is tracking to SLA metrics done?


How can I make apt upgrade skip packages with “unmet dependencies” and upgrade the rest?

I have an Ubuntu 14.04 machine and when trying to upgrade packages I get errors about unmet dependencies.  My question is, How do I upgrade everything else but the packages with unmet dependencies? I tried:  apt-mark hold <package name>   I can see that the package is in "hold" status, But still cannot upgrade, same error.  Also tried:  apt-get install --only-upgrade <package name>   still cannot upgrade, same error.  I don't mind even using a script to install packages one by one and skipping the problematic ones, but nothing works.  How can I get around this?


String target = JOptionPane.showInputDialog("Please enter the string you are looking for");     Node current = top;     int counter = 0;      while (current != null) {         if (current.getElement() == (target)) {             printTextField.setText(target + " was found, its position is: "+ counter);         } else {             System.out.println("not found: "+current +" "+target);     current = current.getNext();             counter ++;         }     }   As you can see I am trying to search for a certain string in a stack.  My stack looks as followed : One, Two, Three, Four, Five.  Method is comparing the values as followed: not found: menuGUI$Node@4ae17538 Three  When using .equals the program is just looped for eternity.


How do electrons choose their way through nodes?

Suppose I have a circuit, powered by some emf ($V$). If I put two resistors $R1$ and $R2$ of different resistances in parallel, the current at the node is divided following Kirchhoff's circuit laws. This is also following the "universal" rule for which all objects try to get to the lowest energy state, fine.  However, how do single electrons in the current know which way to go? If the node wires are of the same diameter, current will not simply divide by half, and still follow Kirchhoff's laws.


I have a dict containing lists and need a fast way to dedupe the lists.  I know how to dedupe a list in isolation using the set() function, but in this case I want a fast way of iterating through the dict, deduping each list on the way.  hello = {'test1':[2,3,4,2,2,5,6], 'test2':[5,5,8,4,3,3,8,9]}   I'd like it to appear like;  hello = {'test1':[2,3,4,5,6], 'test2':[5,8,4,3,9]}   Though I don't necessarily need to have the original order of the lists preserved.  I've tried using a set like this, but it's not quite correct (it's not iterating properly and I'm losing the first key)  for key, value in hello.items(): goodbye = {key: set(value)} >>> goodbye {'test2': set([8, 9, 3, 4, 5])}   EDIT: Following PM 2Ring's comment below, I'm now populating the dict differently to avoid duplicates in the first place. Previously I was using lists, but using sets prevents dupes to be appended by default;  >>> my_numbers = {} >>> my_numbers['first'] = [1,2,2,2,6,5] >>> from collections import defaultdict >>> final_list = defaultdict(set) >>> for n in my_numbers['first']: final_list['test_first'].add(n) ...  >>> final_list['test_first'] set([1, 2, 5, 6])   As you can see, the final output is a deduped set, as required.


I'm trying to write some code to skip over empty raster sets when converting rasters to point (the empty sets stop the conversion, leaving me with a half complete model run).  I know that I can identify empty rasters using the ALLNODATA result from "Get Raster Properties" .  I know I can delete rasters using the Delete.management tool.  I know I should be able to create a branch using calculate value.  But I'm inexperienced with python and modelbuilder, and haven't been able to put this all together. Could someone help me figure out what I am doing wrong? My code and an image of the modelbuilder setup are below.  def fn(Property):  #Import modules      import arcpy  #ifelse statement if Property == "1":             return "true" elif Property == "0":            return "false"


Lemma: Cauchy sequences are bounded.  Proof: Given Cauchy sequence $(s_n)$, for $\varepsilon=1$ we obtain $N\in\Bbb N$ such that $m, n > N$ implies $|s_n − s_m| < 1$.  (2) implies $|s_n − s_{N+1}| < 1$ for all $n\geq N$, (from this step (2) to the next step (3)  how does one get there?  is it through the reverse triangle inequality ? do we simply say that $||s_n|-|s_{N+1}||\leq|s_n-s_{N+1}|<1 $  then $||s_n|-|s_{N+1}|| < 1$ for all $n\geq N$  then add $|s_{N+1}|$ to both sides of the inequality? is it that simple?)  (3) implies $|s_n| < |s_{N+1}| + 1$ for all $n>N$.  If $M = \max\{|s_{N+1}| + 1, |s_1|, |s_2|,\ldots, |s_N |\}$, then $|s_n| \leq M$ for all $n \in\Bbb N$ hence the sequence $(s_n)$ is bounded. QDE


If $ x_1, x_2 , x_3........x_n $ are n positive reals prove that  $$ \frac{x_1}{1+x_1^2} + \frac{x_2}{1+x_1^2+x_2^2} +...+\frac{x_n}{1+x_1^2+x_2^2+...x_n^2} \le \sqrt{n}$$ So this is an IMO 2001 proposed question.It was in the section of Cauchy Schwartz inequalities in my book. It seems that there is a Cauchy hidden because of the root n but then we need to find two series whose terms are those of the LHS and the product of sum of whose squares gives n . I'm at a loss in finding that Thanks for any help


Does the minimum of two decreasing divergent series diverge?

If $\displaystyle \sum_{n=1}^{\infty}a_n$ and $\displaystyle \sum_{n=1}^{\infty}b_n$ are both divergent series with $a_n\downarrow0$ and $b_n\downarrow0$,   [so $(a_n)$ and $(b_n)$ are decreasing sequences which converge to 0],   and if $c_n=\min\{a_n,b_n\},\;\;$ does the series $\displaystyle \sum_{n=1}^{\infty}c_n$ necessarily diverge?  (I was led to ask this question after reading this question and math110's solution to it: .)


Using regex and python to extract numbered lists (multi lines)

Suppose I have plain text that contains the following ordered list in a plain-text file across multiple lines. This is a text\n that contains an ordered/numbered list\n appearing on multiple lines in a plain-text file.\n \n Item 1. This is a list where each item can span over\n  multiple lines\n Item 2. that I want to extract each separate item from but ONLY in series (order)\n Item 3. non-blank text\n Item 4. non-blank text\n Item 5. non-blank text\n Item 6. non-blank text\n Item 7. non-blank text\n Item 8. non-blank text\n Item 9. non-blank text\n Item 10. non-blank text\n Item 11. The items are in an ordered list, but digits may repeat (11, 22)\n  or they may be preceded or folowed by another digit (20, 35, 300) with\n ... Item 999. Up to 999 items\n  in each ordered list\n \n But, (most annoyingly), any Item n (with up to 3 digits) or Items may be repeated\n  or back-referenced later in text but not\n  again as an ordered list (or in series) as the first\n  instance of each item in the list above.  Desired capture/output from regex:  Return the text of each item (potentially across multiple lines) as it appears in the ordered list. Item 1. [Text]\n Item 2. [Text]\n [Text may span multi-line] Item N (up to 999). [Text]\n  My current best regex construction is as follows: (Item\s[\d]+\. )(.*?)(?=(Item\s[\d]+\.)|($))  The above regex construction does not greedily include newlines or multiple lines in each 'item' captured from the ordered list above. My question: Is it possible using regex in Python to extract just the items in the ordered list? And if not possible using regex, how would I most efficiently go about 'locating' the ordered list in a text such as this using Python and extract it?


Wildly different performance for CTE vs. duplicated table expression

I have a view written like  create view v1 as  with conn_query as (xxx) select stuff from conn_query where some_cond union select stuff from conn_query where some_other_cond   But suddenly querying this view became very slow (10 seconds for a result of 2 records), even though the  single queries in the union where very fast (milliseconds). Apparently the union caused xxx to be  fully evaluated without pushing down the arguments (10 seconds is about also the time it takes to select count(*) from v1)  Rewriting the view to   create view v1 as  select stuff from (xxx) where some_cond union select stuff from (xxx) where some_other_cond   fixed this. Unfortunately, this makes now the SQL xxx appear twice which is a bit ugly.  So now I'm curious if on a conceptual level, is there a good reason for this behaviour?  This is with Oracle 11.2.0.4.0  UPDATE/DUPLICATE:  I got exactly the expected fast behaviour with the cte variant by using  create view v1 as  with conn_query as (select /*+INLINE*/ xxx) select stuff from conn_query where some_cond union select stuff from conn_query where some_other_cond   as suggested in . This undocumented hint prevents Oracle from trying to be smart and materialzing the CTE just because it is accessed more than once.


suppose the following is mentioned in the tag a:  <a href=www.google.com/url?url=www.xyz.com> www.xyz.com/1213sdsd/en-us </a>    The text between the  tagname is also a link. How do I select the same using driver object in selenium.  my code:  String link = "www.xyz.com"; WebElement link = driver.findElement(By.partialLinkText(link)); link.click();


Is there a name for "I don't mean to..., but" phrases?

"I don't mean to change the subject, but..." but you are changing the   subject.      "I don't mean to interrupt, but..." but you are interrupting.   Is there a name for these type of "polite" phrases?


Do systemd unit files have to be reloaded when modified?

Let's say I write a mine.service file. Then I use systemctl enable mine.service.  If I later decide to edit mine.service, do I have to tell systemd that mine.service was changed? If so, how do I do that?


I realise there has been quite a lot of discussion on this topic and have already read through the suggestions on this forum of how to rectify this problem, but still nothing has worked.    I am trying to clip a merged hillshade raster using a vector mask to define the clipped area.  I have turned on-the-fly-projection off and both layers align to the same CRS.  I am still getting the error message "cannot compute bounding box of cutline".    I have tried all the suggestions in previous posts, but nothing works!  This is getting so frustrating!  Does anyone have any further suggestions on how to solve this problem.    I am using QGIS Lyon 2.12.3, but I also get the same issue in 2.8.6 LTR version.  A link to the zip files is given below:      Also, when I clip using extents, it works no problems


Use Linux to read contents of Windows encrypted folder

Windows allows the  of certain files or folders. I currently have a Windows folder that is set to "encrypt contents to secure data". (The Windows partition is NTFS.)  If I mount this drive under Linux, is there anyway to decrypt the contents of the directory so that I can read the files without having to reboot into Windows?


How can I prove $$\sum_{i=1}^{n}(-1)^{i-1}\dbinom{n}{i}\frac{1}{i}=\frac{1}{1}+\frac{1}{2}+....+\frac{1}{n}\quad ?$$ I have tried induction, but it doesn't work.


How to resolve MySQL error "You can't specify target table X for update in FROM clause"?

Why doesn't this query work?  DELETE FROM cancome WHERE user_id IN (     SELECT user_id FROM cancome  GROUP BY user_id HAVING COUNT(user_id)>3    ) limit 3   I get this error message:     [Err] 1093 - You can't specify target table 'cancome' for update in FROM clause


Balance chemical equations without trial and error?

In my AP chemistry class, I often have to balance chemical equations like the following:  $$ \mathrm{Al} + \text O_2 \to \mathrm{Al}_2 \mathrm O_3 $$  The goal is to make both side of the arrow have the same amount of atoms by adding compounds in the equation to each side.  A solution:  $$ 4 \mathrm{Al} + 3 \mathrm{ O_2} \to 2 \mathrm{Al}_2 \mathrm{ O_3} $$  When the subscripts become really large, or there are a lot of atoms involved, trial and error is impossible unless performed by a computer. What if some chemical equation can not be balanced?  (Do such equations exist?) I tried one for a long time only to realize the problem was wrong.  My teacher said trial and error is the only way. Are there other methods?


Jokes aside, I have a strange situation, I have some code:  def remotes(form,remotes)   personalised_form = form.dup   remotes.each do |ident,remote|     object = yield(ident)     result = remote.call(object)     insert_into_(personalised_form,ident,result)   end   personalised_form end   And I'm seeing if it works like so:  pp remotes(forms,remotes) do |ident|   case(ident)     when :get_assets       '@Userobject'   end end   The problem is that ruby seems to think I'm not passing a block to the remotes function.  Why is ruby insisting that I'm not passing a block? (it gives a no block given (yield) (LocalJumpError) specifically).  Thought it's not relevant, remotes is a hash containing key's and Procs, and form is just a specificly structured hash that has the result of the proc inserted into it using the ident to locate the correct insertion point


Python: How much memory does attribute takes?

is there a function in Python which can find out how much memory takes a certain attribute or a variable?   EXAMPLE:   a='ThisTakesSeveralBitesOfMemory' print(a.memoryTaken())  >> 20 b


Short Science Fiction story, told in a series of letters

This was a short story told in a series of letters.  The protagonist starts by writing a letter to a utility company about an error in his bill.  By the last letter he is on death row trying to get his sentence commuted.  Each letter is slightly misunderstood.  I think it's from the late 60's and may have been in anthology like "Orbit".


I'm having a problem with choosing between Pearson and Spearman correlation. I'd like to understand clearly why I should use one or the other. I have read the questions already asked here about this subject, but I am still confused, plsease if someone can help:  The kind of data I'll correlate: I will have an abundance index (of mushrooms) that I'll correlate (test the relationship) with some environmental and biogeographical data, such as: altitude, plant species, soil PH, etc. The aim of doing this is to find positive or negative relationships, to explore if these factors determine the distribution of the mushrooms, and explain how they do this.    I dont know if I should the " Answer option" here, I'm not familiar with the use of the "forum"?. Thank you all for your valuable information and details, I have clearer idea now!   According to the answers if I have ranks so Spearman is most suitable. For plants species, I'll use also an abundance index which i'll correlate with the abundance index of mushrooms. For the other factors(variables) I'll use numerical data PH will vary between (0 and 14), for altitude there will me also " numbers in meter". For some other varibales I might have " ranks" ! so I can use Spearman as it will explore the relationships whatever these are?


How do I make nice formated date with MySQL & PHP

SQL  /* The SQL syntax I used to create my 'time' field:     ALTER TABLE  `files` ADD  `time` DATE NOT NULL AFTER  `id`; */   then I added the function 'NOW()' to the values I wanted.  PHP  <?php // Selects all the files from my table 'files'. It contains 'title', 'content', 'time'. $get_files = mysql_query("SELECT * FROM     files ORDER BY id      DESC LIMIT 0, 3", $connection);  echo "
"; // Wraps this around the Article.  while($files = mysql_fetch_array($get_files)) {     $title_get = $files['title']; // Gets the 'title' from table 'files'.     $content_get = $files['content']; // Gets the 'content' from table 'files'.     $date_get = $files['date']; // Gets the 'date' from table 'files'.      echo "
"; // Article is just to organize the content.     echo "
{$title_get}
"; // Displays 'title'.     echo "
{$content_get}
"; // Displays 'content'.        echo "

Created: {$date_get}

"; // Displays 'date'.     echo "
"; } echo "
"; ?>   The variables should have explained well enough, but I added comments . . . just in case for the people who have troubles reading my code. Plus, first question I am doing.  The Result: 2016-03-14  Anyways, I am here to ask if there is a way to get the 'time' from my DB/Database and give it a nice readable format.  e.g: Mar 14 2016


When would I need a SecureString in .NET?

I'm trying to grok the purpose of .NET's SecureString.  From MSDN:  An instance of the System.String class is both immutable and, when no longer needed, cannot be programmatically scheduled for garbage collection; that is, the instance is read-only after it is created and it is not possible to predict when the instance will be deleted from computer memory. Consequently, if a String object contains sensitive information such as a password, credit card number, or personal data, there is a risk the information could be revealed after it is used because your application cannot delete the data from computer memory. A SecureString object is similar to a String object in that it has a text value. However, the value of a SecureString object is automatically encrypted, can be modified until your application marks it as read-only, and can be deleted from computer memory by either your application or the .NET Framework garbage collector. The value of an instance of SecureString is automatically encrypted when the instance is initialized or when the value is modified. Your application can render the instance immutable and prevent further modification by invoking the MakeReadOnly method.  Is the automatic encryption the big payoff? And why can't I just say: SecureString password = new SecureString("password");  instead of SecureString pass = new SecureString(); foreach (char c in "password".ToCharArray())     pass.AppendChar(c);  What aspect of SecureString am I missing?


How to prove that $\max(f(n), g(n)) = \Theta(f(n) + g(n))$?

Using the basic definition of theta notation prove that $\max(f(n), g(n)) = \Theta(f(n) + g(n))$   I came across two answer to this question on this website but the answers weren't clear to me. Would you mind to elaborate how this can be proven? I am first year student of computer sciences. Thank  you!  Edit:  What  exactly does $\max(f(n), g(n))$ return?


If $y= \frac1{1+x} + \frac2{1+x^2} + \frac4{1+x^4} + \dots + \frac{2^n}{1+x^{2^n}} $, then find $\frac{\mathrm dy}{\mathrm dx}$.

If $y= \dfrac1{1+x} + \dfrac2{1+x^2} + \dfrac4{1+x^4} + \dots + \dfrac{2^n}{1+x^{2^n}} $, then find $\dfrac{\mathrm dy}{\mathrm dx}$.  I am stuck up in this question. I tried taking log on both sides and generate some simplified expression but was unable to do so. Any help would be highly appreciated. thanks


Which comes first in a sentence?  I know some word pairs such as bacon and eggs, where bacon always comes first. E.g:     Make me bacon and eggs for dinner, honey.   Cats and dogs are the two most common pets I know of. What is the preferred order?   Dogs are superior.     Don't put dogs and cats together, they might fight!  Cats are superior.     Don't put cats and dogs together, they might fight!


Is there a way to left align a simple equation without juggling spaces with hspace?

Here’s an example of an equation I’m trying to align (I have lots throughout my 50-page NT paper):  $$\frac{5x^2}{4}+\frac{17x^4}{16}+\frac{65x^6}{64}+\frac{257x^8}{256}+\ldots \hspace{9.5cm}$$   I want to be able to get rid of the hspace.  It’d be really frustrating if all LaTeX has is this hspace thingy plus manual trial-and-error adjustments. And no, I don’t want to default left-alignment for all equations across the document, no.  Here’s my settings:  \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{setspace} \usepackage{amssymb} \usepackage{indentfirst} \usepackage[superscript]{cite}   Here’s the codes that are creating the centered formatting:  \[\frac{5x^2}{4}+\frac{17x^4}{16}+\frac{65x^6}{64}+\frac{257x^8}{256}+\ldots \]  \begin{flalign*} \frac{5x^2}{4}+\frac{17x^4}{16}+\frac{65x^6}{64}+\frac{257x^8}{256}+\ldots  \end{flalign*}   I'm editing this question, so @egreg sees my code, which is not working to create equation numbering:  \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{nccmath} \usepackage{setspace} \usepackage{amssymb} \usepackage{indentfirst} \usepackage[superscript]{cite} \usepackage{geometry} \geometry{top=15mm,left=15mm}  \newenvironment{eqleft*}  {\begin{equation*}}  {\hspace{10000pt minus 1fil}\end{equation*} \ignorespacesafterend}  \begin{document} \begin{eqleft*} \frac{5x^2}{4}+\frac{17x^4}{16}+\frac{65x^6}{64}+\frac{257x^8}{256}+\dotsb \end{eqleft*}  \begin{ceqn} \begin{align} \label{eq:eq:k_div_n_closed} A=\sum_{j=1}^{k}\tan{\frac{2\pi nj}{k}}  \end{align} \end{ceqn}\\ \indent The above summation can be rewritten as a closed-form as follows:  \end{document}   First issue   Second issue


I don't understand how to find a basis for a polynomial vector space. Can someone help me with an example?


Why does a glass window reflect white objects white from an atomic scatterers’ viewpoint?

Related:   If you are standing in front of a glass window during the day, you can see your dim white t-shirt’s reflection in the window. The reflection is dim because only 4% of the light is reflected (assuming you’re perpendicular to the window) while the rest is transmitted through the glass.  If a white object is placed in front of this glass pane, it’s obvious that white light is reflected as white and not colored. Why is this?   I vaguely remember that visible light that is reflected penetrates glass about λ/2, so that means that blue light penetrates the least while red light penetrates more. If I shine white light onto a glass window (assume RGB color model), I have to account for all three colored scatterers in roughly equal amounts of intensity to produce white. Here is what I think.  • Blue light penetrates shorter distances into the glass window’s atomic layers and recruits less atomic scatterers that back scatter more intensity blue light. I assume Rayleigh scattering is valid since wavelengths of light are much greater than the atomic spacing’s in glass, therefore $I ∝ 1/λ^4$.  • Green light penetrates deeper into the glass window’s atomic layers and recruits more atomic scatterers that back scatter more “less intensity” green light according to $I ∝ 1/λ^4$?. So the larger number of green atomic scatterers scattered less intense green light but there are more green atomic scatterers.  • In a similar fashion, red light would recruit an even larger number of red atomic scatterers (but less intense than green or blue), however, the increased number of red atomic scatterers compensates for a more overall intense red intensity.   In summary, there are roughly equal amounts of blue, green and red light reflected such that a glass window reflects white objects white. Here is what I am asking: is this correct way to view this? I was unable to find this anywhere online or on . I would greatly appreciate feedback, especially if this is not correct.


$\nabla U=0 \implies U=\mathrm{constant}$ only if $U$ is defined on a connected set?

How can I prove the following statement?     Given a function $U: A \subset \mathbb{R}^n \to \mathbb{R}$ with $A$   connected set, $$\nabla U=\bar{0} \,\,\,\,\,\,\, \forall \bar{x} \in A\implies U=\mathrm{constant} \,\,\,\,\,\,\, \forall \bar{x} \in A$$   In particular I do not understand how the condition of $A$ as a connected set is necessary to prove the statement.


A couple weeks ago I received that warning about the disk being likely to fail soon. I ran smartctl and got the following:   As you can see, it claims that my drive has actually passed the test. Also the disk utility no longer claims that my disk is going to fail but it does show a serious amount of bad sectors.     What I want to know is: Is my hard drive really going to fail soon?   P/s: I'm running Ubuntu on my Mac because I kept having boot problems with the original OS. Also, recently I had some problems copying a file which prompt the following error:   Error splicing file: Input/output error.   I bring this up because some have mentioned it indicates problems with the drive.


I wanted to replace a string : 'li\\oa' by 'ext' but I get this error     error: octal escape value \505 outside of range 0-0o377   I know that the problem is: string containing these chracters '\\', so the question is : How can i read these backslashes as a string.   df['col']= df['col'].replace(['li\\oa'],['ext'], regex=True)


Should I write "X and I", "X and me", "I and X", or "me and X" in a conjoined object?

A question was asked in one of my friend's interview. The question was to determine the right form from the below sentences.     Q. Correct form of English:          Samuel was with Susan and I   Samuel was with Susan and me   Samuel was with I and Susan   Samuel was with me and Susan   None of these      Now I vaguely remember a rule of thumb from my school days. That is "2-3-1" i.e. where all the persons are acting in a sentence, second person comes first, then third person and it is followed by first person.  So according to this theory, 1 seems to be correct to me. Is this theory correct?


80s sci fi film with line "Paris? Bye bye!"

I've just been reminded by a friend of a line in a film we saw mid/late '80s (on video, so may have been earlier but it definitely had an 80s feel to it). It was a humorous sci fi involving humans and aliens.  Towards the end, the humans (two boys?) are on the alien spaceship. The aliens are a father and daughter (green/ugly type aliens of the rubber suit variety). The human boy turns to the alien girl and says "we'll always have Paris".  At this point, the alien father shouts "Paris? Bye bye!", then opens the spaceship doors and throws them out. I think that was the end of the film, and the humans ended up back on Earth.


Does the panasonic dmc-lz40 take better pictures than the samsung wb35 camera?

I currently have the  camera and it takes really great pictures and I recently changed the settings so the image quality was at super fine and they turned out better. My plan is too upgrade to  camera. The dmc-lz40 has a 20mp sensor while the wb35f has a 16mp sensor. I'm not an expert on cameras, but I do know a 20mp sensor while give you 4 more million pixels per shot than the wb35f 16mp camera, but does this mean the Panasonic dmc-lz40 takes better pictures or is their more factors that go into a camera to make the image quality greater.


Addition of Two positive definite matrices

Let A and B be two positive definite matrices.Then is it true that A+B is also positive definite? My view:I have taken several examples and every time it indicates that A+B is p.d.But haven't able to prove it explicitly.Anybody please help.


I write homework assignments in LaTex and the assignments are always divided into subparts (i.e. Problem 1 is divided into 1.1, 1.2, 1.3, ...). Currently what I do is I have nested enumerations, but the numbering isn't exactly what I'd like. To number the subparts, I am currently using:  \renewcommand{\labelenumii}{\arabic{enumii}.}   However, this produces  1. 2. ...    and what I'd like it to be is   1.1 1.2 ...    Is there anyway to do this?


I was watching:  Where the following implementation: int factorial (int n) {     if (n==0) return 1;     return n * factorial(n-1); }  with the following: int factorial (int n) {     return go(n, ); }  int go(int n, int a) {     if (n==0) return a;     return go(n-1, a*n); }  Where he claimed the second is more efficient but my question is why? Both call the function exactly the same number of times, thus 2 of them are O(n).


Display data from geoserver on click map with openlayers

I tried to display data with popup from Geoserver or Postgres to my map, but it dosen't work at all. Can anyone please help me? I used this code:      function Info(e)          {                 if (e.features && e.features.length)                  {                      //console.log(e.features[0].attributes);                     var popupId = e.xy.x + "," + e.xy.y;                     var popup = popups[popupId];                     if (!popup || !popup.map) {                     popup = new OpenLayers.Popup.FramedCloud(                     popupId,                      map.getLonLatFromPixel(e.xy),                     null,                     " ",                     null,                     true,                     function(e) {                         delete popups[this.id];                         this.hide();                         OpenLayers.Event.stop(e);                     }                 );                 popups[popupId] = popup;                 map.addPopup(popup, true);                 }                popup.setContentHTML(popup.contentHTML + "nom_user:" +e.features[0].attributes.nomservice +" region_user :"+ e.features[0].attributes.region);             popup.show();                                    }       selectcltr = {         click: new OpenLayers.Control.WMSGetFeatureInfo({             url: 'http://localhost/geoserver/wms',              title: 'Identify features by clicking',             layers: [ser],             queryVisible: true         }),         hover: new OpenLayers.Control.WMSGetFeatureInfo({             url: 'http://localhost/geoserver/wms',              title: 'Identify features by clicking',             layers: [ser],             hover: true,             // defining a custom format options here             formatOptions: {                 typeName: 'projet',                  featureNS: 'http://www.openplans.org/topp'             },             queryVisible: true         })     }


How to lock a menu (specifically Sapling Tree Gen)?

I am trying to play around with the Sapling Tree Gen Add-On, which allows me to create trees and modify them. But the problem is that the settings for the tree were in the Toolbox on the left (opened by pressing T) in earlier Blender versions. Nowadays, this Toolbox doesn't exist anymore. I found the settings as a little pop-out window after creating the tree, but as soon as I click somewhere else, this window disappears. I managed to reopen this window with F9 (Adjust Last Operation), but as soon as I perform any other operation (for example delete something), I can't open it anymore with F9, because by pressing F9, you open the "Adjust Last Operation" Window. And then adjusting the tree values is not the last operation anymore. Apart from the fact that I can't really use this way for a long time, it feels pretty hacky as well and it's very uncomfortable to work with. I have been researching a lot in the internet and I couldn't find any answers. A detailed research in Blender didn't help as well. Is there a way to pin that window somewhere and work with it all the time, no matter what I do or just another place where I can find this menu? Thank you very much This is how this menu looks like after creating the tree. But as already said, this window doesn't last long. But this is the exact same window I want. I just want a way to pin it somewhere.


This week in Algebra II we are studying the Hanoi tower's. Our assignment was to find what type of formula would give the number of moves it would take to solve the puzzle. After using a T-chart (where $x=$number of disks and $y=$ shortest number of moves that gives the solution)I found that   (0 , 0) (1 , 1) (2 , 3) (3 , 7) (4 , 15) and (5 , 31).  Using the information in the T-chart one should be able to find that $y=2^x-1$, however I don't know how to come to this conclusion on my own. My question today is, how do I find this formula with the given T-chart? That is my only question.....(P.S) everything I need to complete the assignment is done so this is more or less of an add on to improve what I know, NOT to get answers.


Running virtual linux using qemu on windows

I am trying to use Qemu 1.3 for windows to run lubuntu on a USB stick with Windows 7. After downloading and unpacking Qemu on my usb stick, if I click on qemu.io.exe, I get  qemu-io.exe>   How do I start my downloaded linux .iso file? It sounds basic but its not clear to me from the Qemu website.


Check from which directory the program was executed

How can I check from which directory the program in one of the directories in PATH was executed?  For example, I am running the following command:  laravel   and would like to check where this program is actually located.  I am using  and get the impression that PATH variables get somehow mixed up between Windows and Ubuntu.


Undergraduate prerequisites for a Ph.d. in combinatorics

I am a double major in mathematics and electrical engineering. Towards the end of my mathematics major, I began to develop an interest in combinatorics (specifically graph theory), and am seriously considering a Ph.D. in the subject.   Having developed the interest late, my senior thesis will be in a different topic (complex ODEs), but I would have completed one course in combinatorics/graph theory (an upper-level undergraduate course using a grad-level text - I expect a strong reference from the professor teaching this course).   The courses I have completed are basically both the undergraduate and graduate-level algebra sequence,  analysis in R and R^n (without a formal introduction to Lebesgue measure), discrete math (for EECS), applied probability, one course in numerical methods, PDEs, applied complex variables, and a "mathematical methods for sciences" course (focusing on special functions, variational calculus, and integral transforms).   I won't have the standard math major courses(i.e,  topology, measure theory, and number theory.) I plan to focus more on applications than theory in my combinatorics Ph.D.   Would additional coursework be necessary for a Ph.D. in combinatorics (specifically graph theory)? (I could potentially delay my degree by a year and spend time as a non-degree student at another university, or complete a non-thesis track master's degree before applying for a masters/Ph.d.). Any advice would be appreciated.


How to install Ubuntu on a Dell Inspiron 1525 which has no operating system

I have a Dell Inspiron 1525 laptop, which has had the os removed and hard disk wiped. I downloaded the latest version of Ubuntu desktop onto an external hard drive. I am struggling on the Dell laptop to access the external hard drive and install ubuntu. I have changed the boot sequence on the Dell so that USB drive is no.1, but still not able to access the external hard drive & load ubuntu. Can anyone help? Thanks Kevin


In Python, I want to prevent my local variable to be hoisted to the parent scope. Basically, I want to avoid accidental programming errors by keeping the variable b's scope local to the 'if' block. Is it possible in Python. How?  a = 10 if a == 10:     b = 5 else:     c = 0  print b # prints 5


mismatch between server schema content and exported sql rows

I am using MySQL 5.6.44 within phpMyAdmin on Go Daddy shared hosting and experimenting with some duplicate table data.  I am trying to figure out, when I export my table from phpMyAdmin the exported sql file structure when opened does not match the schema seen in the admin panel. By that I mean the row sequence in the sql file are jumbled up.  I don't have any foreign key constraints set up or any other operations on the table.  Any steering and knowledge as to why this might be the case would be appreciated.


can someone help me  Im having issues binding my dropdown list from my sql linq query, theres seems to be issues with anon types not being statically typed and then the list is not being populated  please help thanks  public static void getlocation() {     DataClasses_AbintegroDataContext dc = new DataClasses_AbintegroDataContext("name = name");       //List<Location> thelocations = new List<Location>();       var locations = new[] { from a in dc.Locations select new { a.name } };       DropDownList ddLocation = new DropDownList();      ddLocation.DataSource = locations;     ddLocation.DataTextField = "Location";     ddLocation.DataValueField = "Location";   }


Which would be correct who or whom at the beginning of this interrogative  sentence _____ do you think will win?


Useful posts about FFmpeg are spread over four sites

Good and useful posts about  are spread over four sites. A few examples:  Stack Overflow    (these questions are not language-specific, but rather general-purpose FFmpeg)  Super User   Video Production   Unix & Linux Some questions are indeed Linux-specific, such as , but many others are "general" FFmpeg questions:    which sometimes makes it difficult to perform searches. Where is the recommended place to ask new general FFmpeg questions? Is there a way to centralize all questions/answers about FFmpeg across these four sites, to make it easier for readers to search? (I guess it would be question migration, but this would be difficult for thousands of questions/answers?) Or maybe the answer to my question is just "If it ain't broke don't fix it", I don't know.


Canadian visa agencies like canadianvisaexpert - are the legit or should I fill out the visa forms myself?

I plan traveling to Canada in order to visit my brother (and his family) and to travel around for 3 weeks in Canada. I know that I can fill all the visa forms online, but a friend told me that if I will make a mistake, or somehow miss something my visa application will be rejected and I will not be able to apply again.  so I have 2 options either to use the service of a lawyer or the services on an agency like canadianvisaexpert.  I now that in the end of the day a lawyer as well as canadianvisaexpert just fill up forms for me, but as this is their job, they probably will not do any mistakes. saying that are agencies like canadianvisaexpert are legit service provider that can actually do what they say or should I use a lawyer?


T-SQL How to Pivot on the Values of a Table?

How do you pivot a table on the value in the field? I have to admit that while I can write some pretty nifty queries, have my CTEs down, and enjoy a wide knowledge of T-SQL programming, Pivots get into a wonky area that I am uncomfortable and unfamiliar with.  Let me describe my issue, and see if you can help.  I have the following tables:  CREATE TABLE [dbo].[Itinerary] (    [ItineraryID] [int] IDENTITY(1,1) NOT NULL primary key,    [RoadTripID] [int] not NULL,    [ItineraryDate] [date] not NULL,    EstimatedMiles int not null,    Destination varchar(64) not null,    DestinationState varchar(2) not null,    DayTypeID int not null )  Create Table dbo.DayType  (    DayTypeID int primary key identity,    DayTypeCode varchar(2) not null,     DayTypeDescription varchar(32) not null  )   DayType is a helper table with nine values:  Insert into DayType values    ('XX', 'Planning/Prep'),   ('SE', 'Short Event'),   ('LE', 'Long Event'),   ('WD', 'Writing Day'),   ('TD', 'Tech Day'),   ('HD', 'Hiking Day'),   ('PD', 'Photography Day'),   ('LD', 'Layover Day'),   ('LH', 'Long Haul')   When I enter a row into Itinerary it looks like this:  insert into itinerary  values(1, '11/27/2014', 361, 'Amarillo', 'TX', 1)   The last piece of the puzzle (and the question itself) is that I want to report out on how many of each type of day I've planned.  I am currently using the tried-and-true-(and awful) method:  Select     s.ItineraryID, R.ShortName as RoadTripName,     sum(EstimatedMiles) as TotalMiles,     count(itineraryid) as TotalDays,     (select count() from Itinerary i1 with (nolock) where daytypeid = 1 and i1.itineraryid = s.itineraryid) as 'Planning/Prep',    (select count() from Itinerary i2 with (nolock) where daytypeid = 2 and i2.itineraryid = s.itineraryid) as 'Short Event',    (select count() from Itinerary i3 with (nolock) where daytypeid = 3 and i3.itineraryid = s.itineraryid) as 'Long Event',    (select count() from Itinerary i4 with (nolock) where daytypeid = 4 and i4.itineraryid = s.itineraryid) as 'Writing Day',    (select count() from Itinerary i5 with (nolock) where daytypeid = 5 and i5.itineraryid = s.itineraryid) as 'Tech Day',    (select count() from Itinerary i6 with (nolock) where daytypeid = 6 and i6.itineraryid = s.itineraryid) as 'Hiking Day',    (select count() from Itinerary i7 with (nolock) where daytypeid = 7 and i7.itineraryid = s.itineraryid) as 'Photography Day',    (select count() from Itinerary i8 with (nolock) where daytypeid = 8 and i8.itineraryid = s.itineraryid) as 'Layover Day',    (select count(*) from Itinerary i9 with (nolock) where daytypeid = 9 and i9.itineraryid = s.itineraryid) as 'Long Haul' from     RoadTrip r  inner join     Itinerary s on r.roadtripid = s.roadtripid group by     s.itineraryid, r.shortname   which returns:    Obviously (hopefully!) there needs to be a better way. How can I pivot those nine values, and their total count each into this query?


Can LINQ to SQL query using NOT IN?   e.g., SELECT au_lname, state FROM authors WHERE state NOT IN ('CA', 'IN', 'MD')


Cannot figure out where the tmp folder is to add the .htaccess file per http://drupal.org/SA-CORE-2013-003

That doesn't make any sense to me. I do not have a tmp folder anywhere outside the root. I cannot find the /tmp folder supposedly outside the folder where my Drupal instance is located. Well, let me correct that. I found one, but placing the recommended .htaccess file in it didn't solve the error message. It didn't seem to be the correct tmp directory. Maybe I don't fully understand where outside the root dir is at? Isn't it the directory above where the installation is at? Is it in the html folder, the sites folder, or above the html folder?  Will the instructions in  work if I create a tmp folder in the html folder? Where exactly do I create the tmp directory?


Please include info about spoiler sections on the "formatting help" page

As described on , it's now possible to create spoiler blocks/hidden text with the syntax   >! Spoiler text   Can a blurb about this be added to the "formatting help" page that's linked to in the "How to format" box on the right of posting pages and by the little ? block above post entry fields?


Can you please explain how can we derive the total number of factors of a composite number using the concept of combinations ? Thanks in advance !


Do c++ compilers skip parts of files when compiling?

In C++, I've heard that you need to separate the implementation from the interface in order to reduce compile times. In  question, the answerer basically says that if you change the header then the source is recompiled, so if you separate the interface from the implementation then there is less chance you will need to change the header. But here are the two scenarios I see:   Have all code in header file  Whenever you change any code, the entire file is recompiled. Have code in separate header files and source files  Since the header file is usually copy and pasted (via include) into the source file, if you make a change to either the header or source files the whole file will still have to be recompiled because it is as if they are one file.  Whether you change either the header or the source file, the whole file (both the header and the source) are recompiled.    So then what is the advantage of separating interface from implementation? You might say it is so that you can have multiple implementations for a single interface by means of inheritance, but can't you still do that when you have all the code in the header file? You could also say that it is so that the interface does not see any implementation details, but what is the use of that?  The only reason I can see why separating interface from implementation is that if the C++ compiler skips over the part of the source file that is the header file that is copy and pasted into the source code if it is not changed and just compiles the rest of the source file. So is this the case? Do C++ compilers skip compilation of certain parts of files that have not changed? I know that that is probably not what happens, but I cannot think of any other explanation.  Edit  I've already seen  question. What I am asking is why are the compilation times faster with separate implementation and interface files. I understand that there are advantages with separate implementation and interface files such as what Lightness Races in Orbit stated, but I am asking is why are compile times better if they are at all.


Cannot pass an object to a public method as a class

Here is my code from the main file (Airport.java) in java AirportMarker airSource = airports.get(source); AirportMarker airDest = airports.get(dest);  SimpleLinesMarker sl = new SimpleLinesMarker(route.getLocations(), route.getProperties());                  airSource.addRoute(sl); airDest.addRoute(sl);  and here is the class AirportMarker public static List<SimpleLinesMarker> routes;  public void addRoute(SimpleLinesMarker route) {      routes.add(route); };  and here is the error Unfolding Map v0.9.7 (UCSD edition) No OpenGL renderer. Using Java2DMapDisplay. Exception in thread "Animation Thread" java.lang.NullPointerException     at module6.AirportMarker.addRoute(AirportMarker.java:102)     at module6.AirportMap.setup(AirportMap.java:130)     at processing.core.PApplet.handleDraw(PApplet.java:2365)     at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:245)     at processing.core.PApplet.run(PApplet.java:2260)     at java.lang.Thread.run(Thread.java:748)   What is the error I am getting?


No newline before scientific units without using "~"

Is it possible to define a list of units (like ml, °C, nmol, eq., etc.) and forbid latex to insert a newline before those?   I know it is possible to use a ~ between number an unit, but the above described method would be much more convenient for me.  Thanks for helping me!  edit: thanks for all the comments and answers, but maybe i should explain my reason to look for something like that: I have a very large Document (not yet written in latex) and try to format it using latex. Therefore it would be quite time consuming to edit every value and unit to fit the siunitx syntax. Same problem with the answer from .


I think datum is the singular of data,but where I should use it???I am getting confused between both,if there is one data? Will I use datum? Please give me some proper example to clear out it.thank you.


Are internal links to pages more valuable than sitemap.xml links

So part of my site is asynchronously loaded with javascript. This part contains links to products. All these links also exist in my sitemap.xml.   I've tested with Googlebot Fetch and it doesnt see these links, probably because of the asynchronous javascript that fetches them from an api.  So my question is, does googlebot treat internal links differently from sitemap.xml links?   If a product exists both as an internal link on my page and in sitemap.xml is it more valuable than if it just existed in my sitemap.xml ?


Getting mysql by php turns non-latin characters into question mark "?"

When I echo values with non-latin characters from MySQL they turn into question marks. And I mean question marks "?" not "�". I got these things:  header('Content-Type: text/html; charset=ISO-8859-2'); //php  <meta name="charset" content="ISO-8859-2" />//html   And they're not working!  Requesting help.  EDIT: More informations: in PHPMyAdmin I changed collation to utf8_polish_ci.


How to mirror Android screen to PC (USB or WiFi)?

I have an nVidia Shield, and since I don't have an HDMI cable nor a monitor, I would like to stream the whole screen to my laptop. I have tried a few apps and the streaming lags. Is there a way to stream the screen without lag? It doesn't matter if the Shield is plugged in via USB, I just need to have the Shield's screen on my monitor (preferably fullscreen) and so it has no lag so I can enjoy games on a bigger screen.


Can anyone give me a tip how to achieve homogenous color of the wooden floor? What am i doing wrong? Parts of the wooden floor are brown, then other parts (behind the bed on the right side)are green... It's like too much of the wall is reflecting of the wooden floor which is nonsense!!


scrlttr2: how to reduce space between text and footer

How do I reduce the spacing between the last line of "regular" text and the footer?  I tried increasing \footskip, but instead of moving the footer up, this results in the main text wrapping onto the next page earlier...  \documentclass[fontsize=11pt, paper=letter,       parskip=half, firstfoot=on,]{scrlttr2} \usepackage{lipsum}  %\setlength{\footskip}{4cm} \firstfoot{\centering\emph{(please turn)}} \LoadLetterOption{DIN}  \begin{document}   \begin{letter}{       Foobar\\     }     \setkomavar{subject}{It won't work!}     \opening{Dear Sir or Madam,}     \lipsum     \closing{Yours sincerely,} \end{letter} \end{document}


The cardinality of the power set with $N$ elements is equal to $2^N$

Let $\mathcal{P}(X_N)$ be the power set of a set $X$ with $N$ elements.  I am trying to prove by induction that its cardinality $\mid \mathcal{P}(X_N) \mid = 2^N$.  Firstly, I think it helps to observe that this can pretty much be "rewritten" or rather fleshed out as  $$\mid \mathcal{P}(X_N) \mid = 2^N = 2^{N-1} \cdot 2^1 = 2 \cdot \mid \mathcal{P}(X_{N-1}) \mid.$$  See that if $N = 0$, $X$ is then the empty set $\emptyset$ and {$\emptyset$} is its only subset; thus, $\mathcal{P}(X_0)$ = $2^0 = 1$, which is correct.  (*) So assume $\mid \mathcal{P}(X_N) \mid$ does in fact equal $2^N$.  Then we see that  $$\mid \mathcal{P}(X_{N+1}) \mid = 2^{N+1} = 2^N \cdot 2^1 = 2 \mid \mathcal{P}(X_N) \mid,$$  which is true by (*), our inductive hypothesis.  My question is (as you might expect if you have read any of my other posts)...is this a correct use of induction? I apologize in advance if this is a tiresome sort of theme; considering my beginner's lack of competency and self-assuredness, competently-given feedback and assurance from insightful and encouraging users here is more than extremely helpful.


Beamer-How to have figures replacing one another in a slide?

I was wondering if there is a way to have a figure in a slide that replace the previous figure. So if one has 5 figures then each figure will appear once and be replaced by the next figure. At the end of the slide, the last figure will be shown.  I have tried the following, but I am sure it's not the best way.  \begin{frame}     Here is an example. \begin{example}    Let a finite sequence of real numbers be $(1,2,3,4,5,6,7,8,9,10)$. \end{example} \pause \begin{minipage}{\textwidth}     \begin{itemize}       \item<1|only@1>\includegraphics[width=8cm]{figure1.png}       \item<2|only@2>\includegraphics[width=8cm]{figure2.png}       \item<3|only@3>\includegraphics[width=8cm]{figure3.png}       \item<4|only@4>\includegraphics[width=8cm]{figure4.png}       \item<5|only@5>\includegraphics[width=8cm]{figure5.png}     \end{itemize} \end{minipage} \end{frame}   The problem with above code is that the first figure is not shown and bullet points are also shown since it's a itemize environment.  I would appreciate any help or suggestion.  Thank you.


Is this map to a finite dimensional topological vector space an open map?

Suppose $X$ and $Y$ are topological vector spaces, $\dim (Y)<\infty$, and $f:X\to Y$ is linear and surjective. Prove that $f$ is open and if the null space $N$ of $f$ is closed, then $f$ is also continuous.  The second assertion is easier since the quotient space $X/N$ has the universal mapping property.