I'm planning a trip from Europe to USA, that will happen next summer.  I was looking lately into purchasing plane tickets, but a lot of carriers do not offer late July/early August 2015 tickets yet.  So, I can buy some ticket on kayak.com, but I feel that if I'll wait a bit, I might get a better deal. My question is generally - when is the best moment to purchase tickets - one that gives best prices, but also doesn't limit available flights too much, so I have options to choose from.

There is a common story that airline ticket prices rise significantly if you buy them less than two weeks before departure.  And that any time before that will yield standard prices.  Is that advice valid for flying during holiday seasons?  As an example: if I want to fly coast to coast USA on December 7th, must I buy my ticket ASAP, or would I get a similar price buying on November 21st?


I have a webpage and it have html content with id.i am calling a function on onclick. Everything seems working if i am making changes into static content  but when i am trying to call any jQuery function like html,append etc... with my dynamic content then it is not working .  As far as i understand it's because of Dom not getting updated with new content.So i would like to know how can i update dom after loading dynamic data.   A demo code below ..  jQuery( document ).ready(function($) {     var width=$( window ).width();     if(width <= 768){                    $('#extraslidercontent').html("

\             "+$('#testtt2').html()+"

\             "+$('#testtt3').html()+"

\             "+$('#testtt1').html()+"

");         updte(); }   after loading data in to testtt2 id i am trying to use an id which is in it's content.  Let me know if i missed anything to explain.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I switched to a dark theme (Dolorean Dark). I like it and I think--it is better for eyes. However I have problems in some web pages. Most pages are intended to be shown on white background. On dark theme form controls have black background and mostly the font is also black, so the content of forms are invisible. I would like to use white theme on web pages in Firefox.

I have a dark GTK theme installed in my Ubuntu 10.10 install and a persona installed for Firefox that I also like.  The problem is that Firefox is using my dark GTK theme for items like buttons and text fields on common web pages, and this commonly creates unreadable menus, text areas, and buttons.  (white text on white backgrounds, or black text on black buttons).  I don't want to change either theme, because they look great in every other application, and I don't want to have to do something crazy to my Firefox install like use custom user scripts or CSS overrides.   All I want to do is tell Firefox to stop using my GTK theme completely. This appears to be what Google's Chrome browser does and it makes the most sense by far.   How can web developers possibly work around all the possible GTK themes out there?


In the below code,  is it more efficient (in terms of memory and time) to create a List<string> directly, rather than creating a string[] and calling ToList() on it before passing it to SomeMethod()?  If you create the string[] and call ToList(), would it create a List<string> object, as well as already having the string[]?  The reason I ask is that I have seen code where they are creating a string[] and calling ToList() before passing it as an argument to a method with a List<string> parameter, and I wasn't sure if there was any particular reason for that.  class Program     {         static void Main(string[] args)         {                         var array = new string[] { "str1", "str2" };             SomeMethod(array.ToList());             var list = new List<string> { "str1", "str2" };             SomeMethod(list);                                 }          static void SomeMethod(List<string> list)         {             //do stuff         }     }

MyClass[] array; List<MyClass> list;   What are the scenarios when one is preferable over the other? And why?


The back camera works just fine but the front one does not. When I select it, it just freezes. When I quit the app and select it again it presents just a black screen; no image. I tried closing and resetting the phone but that hasn't helped.  Can anyone help me fix this in some free way?

Attempted to use the Camera App today and was presented with a closed shutter screen in the Camera app as pictured below. No tramma or anything happend to the phone no recent OS update, just not working out of the blue.    If I open the FaceBook app and go to the "Take Picture" section, the camera opens successfully, but when I attempt to switch to the front camer, it goes back and gets stuck at the shut shutter screen.  What I have tried:   Quitting the "Camera" app and re-opening it Shutting down and restarting the iPhone. The force shutdown method, hold power + home button until it turns off. The Restore in iTunes   Still the same rear camera works, and when attempting to switch to the front camera boom closed shutter screen.  Any other ideas, it looks like I have a hardware problem...


Seems like the subtraction is triggering some kind of issue and the resulting value is wrong.  double tempCommission = targetPremium.doubleValue()*rate.doubleValue()/100d;   78.75 = 787.5 * 10.0/100d  double netToCompany = targetPremium.doubleValue() - tempCommission;   708.75 = 787.5 - 78.75  double dCommission = request.getPremium().doubleValue() - netToCompany;   877.8499999999999 = 1586.6 - 708.75  The resulting expected value would be 877.85.  What should be done to ensure the correct calculation?

public class doublePrecision {     public static void main(String[] args) {          double total = 0;         total += 5.6;         total += 5.8;         System.out.println(total);     } }   The above code prints:  11.399999999999   How would I get this to just print (or be able to use it as) 11.4?


I would like to know: what are some of the best introductory books to Lagrangian Mechanics?

I am looking for a book about "advanced" classical mechanics. By advanced I mean a book considering directly Lagrangian and Hamiltonian formulation, and also providing a firm basis in the geometrical consideration related to these to formalism (like tangent bundle, cotangent bundle, 1-form, 2-form, etc.).  I have , but I would like to go into more details about the [symplectic] geometrical and mathematical foundations of classical mechanics.  Additional note: A chapter about relativistic Hamiltonian dynamics would be a good thing.


I am working on an animation which will have a model behind transparent materials making up the foreground:    However, no Freestyle settings ("QI Range", etc.) are working for me. I tried setting "Edge Mark" and "Exclusive", but depending on the "Visibility" setting I either get the lines showing through the foreground mesh or being entirely hidden by that mesh.  What would be the optimal way to approach this problem?

Can Freestyle draw lines when an object is behind a transparent plane (or any other transparent object)? The render below shows the issue, the freestyle lines that should be drawn on lower arm and hand don't get drawn.


Capacitor stores electric charge and battery also stores electric charge. SO whats the difference between them?

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


Given a matrix $A=\begin{pmatrix} 1 & 0 \\ {-1} & 1\end{pmatrix}$ We are asked to show $A^2 -2A +I = 0$ and hence find $A^{50}$. I've proved that  $A^2 -2A +I = 0$ but couldn't figure out how to proceed for the next part.


I need to put only one point with custom marker on the google map. When user enter his address, there must show up a route to that point from his address. What is the simplest way to get that function?

I need to add Google Map with about 400 markers into WordPress site (into one page). Every marker needs to have info window with photo, description and link. It is really high number of markers, so I'm not sure what is the best way to implement that kind of map.   What do you suggest?


I have referred to the various explanations around here on SO about pass by value and pass by reference in Java. So far the notion is that incase of primitive datatypes it goes pass by value and incase of reference and user defined datatypes it is pass by reference. I also read that arrays are always pass by reference. However, when I try to execute the following program why the outputs are different in both these methods? The location of the object is called the reference. So if I am passing by value to demoByValue_ it should return 90 or 91? What am I missing here? Also, will it help to start fiddling with first pointers from C/C++ in order to get an abstract picture of this idea or what could be a real life analogy to grasp thi concept for a beginner? I did look into the analogy of house addresses and if the person wants to go to a specific house it needs the address etc. But, I want to know here that why I am failing to understand this concept? How to access the reference to the value of a primitve data type to see whats going on?  public class Misc {      public static void main(String[] args) {          int a = 91;         System.out.println(a); //prints 91         demoByValue(a);         System.out.println(a); //prints 91         a = demoByValue_(a);         System.out.println(a); //prints 90 -- Why??     }     public static void demoByValue(int a){         a = 90;     }     public static int demoByValue_(int a){         a = 90;         return a;     } }

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I forgot my username and password so I can't log on.   I have seen how to load a recovery boot from the grub menu, but  I can't access mine. It says press esc, but I've tried at least 50 million times and it just counts down from 2 and continues loading.    I've tried holding it and pressing it repeatedly.  I tried pressing shift (even though I have an older version where you press esc) and that didn't work either.  I tried every other butt so many different times and ways with no success. I've also tried guessing my username and password (since I can't remember either) but to no avail.  I also created a Windows 7 boot disc to try and change OS and just wipe my computer, but it doesn't work.    It just takes forever to read the disc and then ignores it and continues loading Ubuntu...   I HAVE NO IDEA WHAT TO DO AND I DON'T WANT TO HAVE TO BUY A NEW TOWER.   My big brother made me this computer but I have a laptop and didn't have space for both in my tiny dorm room. Now I have my own apartment and I NEED to use this.   Is there some way to wipe it externally?   There are no important or relative files since it's so old and I just want to use my computer again... is there anything I could do?

I need to reset my password. I have followed these steps:    However, then I go to "root" or "netroot" recovery options, it tells me:  Give root password for maintenance (or type Control-D to continue)   Clearly, I do not know the root password. If I type CTRL+D, I return to the list of options. From  I read:  Under chapter 'The Other Way':  4. Highlight the line that begins kernel and press 'e' to edit`   But in the grub configuration file I have no line that starts with kernel. Only:  setparams 'Ubuntu...' recordfail set gxfpayload... insmod part_msdos insmod ext2 set root=... search --no-floppy... linux /boot/vmlinuz-2.6.38... initrd /boot/initrd.img-2.6....   Those are all lines in my GRUB. Which line should I edit? Or is there another way to reset my password?


I'm currently disabling password authentication on all my ssh servers (good idea of the day!). Some of my servers are shared with other people and I want to force them to use a ssh key with a passphrase. Is it possible to disallow ssh login for ssh keys without passphrase?

This is probably a noob question, but how can I determine if the public SSH key someone gives me has a passphrase or not?  We have a situation where I am not generating the SSH keys for users, but I want to make sure every SSH key I put on a server has a passphrase, but I get the feeling the passphrase is only part of the private key.  Thanks!


I got the following html:

Val1

Val2

   and JS code:  $(document).ready(function(){ $('#otherdiv').on('mouseup', function(e){      var left  = e.clientX  + "px";      var top  = e.clientY  + "px";      var div = $('.overlay');      div[0].style.left = left;      div[0].style.top = top;      $(".overlay").show(200);    });  $(document).on('click', function(e) {     $('.overlay').hide(200);   }); });   I need to hide my .overlay when the user clicks somewhere outside it and show it when the user clicks #otherdiv. When I attach an event to document and click on otherdiv, my overlay shows and then immediately hides. How to fix that behaviour? Thank you.

I have some HTML menus, which I show completely when a user clicks on the head of these menus. I would like to hide these elements when the user clicks outside the menus' area.  Is something like this possible with jQuery?  $("#menuscontainer").clickOutsideThisElement(function() {     // Hide the menus });


I have a Macbook Pro Retina 13" Mid 2014, with a 500GB disk.   I never have to work with large files such as movie editing or anything like that nor do I use time machine backups. After upgrading to Catalina 10.15.4 I noticed my disk shows ~200GB of used space which I have no idea where is it coming from.  Rebooting doesn't help and even the system information tool is not giving information on what's taking up that much space.  In the image below, the other sections (Applications, Documents, etc) all contain the correct sizes that I expect from the stuff that I use.

Every few days I get notices on my MacBook that it's running or run out of hard drive space. Curiously, restarting the computer will enable me to recover gigabytes of space (this past time, it was able to recover about 2.2GB). However, I can't identify anything in my personal activity that consumed that space.  It's possible that it's a rogue iTunes podcast or a huge software update that my Mac is automatically downloading - would either of these reclaim the space upon a restart?  One possibility that I can think of is that FileVault has some sort of disk leak, allocating but not freeing files. Does this make sense? Is there a tool that I can run to determine where this space is going? Assuming it is FileVault, should I try to disable it? What's the best way to turn of FileVault on a nearly full computer?


I have a code which is using Vanilla JS. Using a button I added dynamic content. But the problem is when I clicked a dynamically generated content, then it returns first click: 1 second click: 3 third click: 6 fourth click: 10 but it should be 1, 2, 3, 4 HTML Code Below:
Add Content

  JS file Below: let counter = 1; document.querySelector("p").addEventListener("click", function(){   document.querySelector(".dynamic-content").innerHTML += `     <span>My dynamic content - ${counter}</span>   `;   counter++; });  document.querySelector("body").addEventListener("click", function(){   let contentList = document.querySelectorAll(".dynamic-content span");   if(contentList.length){     contentList.forEach(function(el){       el.addEventListener("click", function(event){         console.log(event.target.innerText);       });     });   } });  Note: We can't use jQuery

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


When opening Explorer in Windows 7, the directory tree on the left contains Libraries and the user's home directory. These two starts expanded/collapsed according to their expanded/collapsed state when Explorer was closed.  Is there a way to ensure the libraries and user's home directory always start in the collapsed state?  I generally start explorer with windows + E key combination.

Windows 7 Explorer can be opened in any folder from the command line.  But, it automatically expands (on the left nav panel) the Favorites, Desktop, and [Username] folders.  This makes it hard to see what's what in the nav panel.  How can I tell Windows 7 Explorer to collapse those folders by default, until I open them? I only want the selected folder expanded.


Function $f$ is continuous on $\left[0,+\infty\right)$, does $\displaystyle\lim_{n\rightarrow\infty}f\left(nx\right)=0,\quad\forall x>0$   imply that $\displaystyle\lim_{x\rightarrow+\infty}f\left(x\right)=0$? If $f$ is not continuous, it is false. I don't know how to make use of the continuity.

When I google "baire category theorem", I get a  to Ben Green's website. And at the end of the paper, he mentioned such a classic problem:     Suppose that $f:\mathbb{R}^+\to\mathbb{R}^+$ is a continuous function with following property: for all $x\in\mathbb{R}^+$, the sequence $f(x), f(2x), f(3x),\dots$ tends to $0$. Prove that $\lim_{t\to\infty}f(t)=0$.   I find the problem 1.17 on P.27 of the book "", and on  gives the answer by prove the following lemma:      If $G$ is a unbounded open set of $\mathbb{R}^+$, then for any closed   interval $[p,q]\  (0<p<q)$, there exist a $x_0\in [p,q]$ such that   $G$ contains infinitely many points of the form $nx_0\ (n\in\mathbb{N})$.   But, on the above book, it also says:      If $\lim_{n\to\infty}f(nx)$ exists only for points $x$ in a nonempty   closed set without isolated points, then $\lim_{x\to\infty}f(x)$  also   exist.   I didn't find a proof for this result, I want to know whether for any nonempty closed set with no isolated points, the above lemma is true? and could someone tell me why Ben Green mentioned this problem on his paper (see the hint of his paper)?


with uMatrix I can block domains for specific external content. But I would like to know if there is also a blocker for specific scripts on a domain. With uMatrix it is all or nothing for one source type (image, css, script, ...) for one domain, but I would like to allow some scripts and block other ones on a single domain.

I want to disable a specific JS script from a specific website without disabling the javascript completely. Is there a way to do that ?


Running: Linux ips-svf-1 3.0.0-22-server #36-Ubuntu SMP Tue Jun 12 17:56:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux  I'm trying to free space in /boot with apt-get -y purge, but every time I run the command I get an error about unmet dependencies:  sudo apt-get -y purge linux-headers-3.0.0-12 Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies:  linux-headers-3.0.0-12-server : Depends: linux-headers-3.0.0-12 but it is not going to be installed  linux-image-server : Depends: linux-image-3.0.0-26-server but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   However, I can't run apt-get -f install since /boot is full.  I also tried running dpkg --purge and dpkg --remove manually, but both give the same unmet dependency error.  Any suggestions on how I can successfully free space in /boot?  Is there anything I can safely delete with rm?

My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates.  After installing that new version, the partition is nearly full again. So what else can I delete? Are there some other files associated to the old kernel images?  Here is a list of files that are on my /boot partition:  :~$ ls /boot/ abi-2.6.31-21-generic         lost+found abi-2.6.32-25-generic         memtest86+.bin abi-2.6.38-10-generic         memtest86+_multiboot.bin abi-2.6.38-11-generic         System.map-2.6.31-21-generic abi-2.6.38-12-generic         System.map-2.6.32-25-generic abi-2.6.38-8-generic          System.map-2.6.38-10-generic abi-3.0.0-12-generic          System.map-2.6.38-11-generic abi-3.0.0-13-generic          System.map-2.6.38-12-generic abi-3.0.0-14-generic          System.map-2.6.38-8-generic boot                          System.map-3.0.0-12-generic config-2.6.31-21-generic      System.map-3.0.0-13-generic config-2.6.32-25-generic      System.map-3.0.0-14-generic config-2.6.38-10-generic      vmcoreinfo-2.6.31-21-generic config-2.6.38-11-generic      vmcoreinfo-2.6.32-25-generic config-2.6.38-12-generic      vmcoreinfo-2.6.38-10-generic config-2.6.38-8-generic       vmcoreinfo-2.6.38-11-generic config-3.0.0-12-generic       vmcoreinfo-2.6.38-12-generic config-3.0.0-13-generic       vmcoreinfo-2.6.38-8-generic config-3.0.0-14-generic       vmcoreinfo-3.0.0-12-generic extlinux                      vmcoreinfo-3.0.0-13-generic grub                          vmcoreinfo-3.0.0-14-generic initrd.img-2.6.31-21-generic  vmlinuz-2.6.31-21-generic initrd.img-2.6.32-25-generic  vmlinuz-2.6.32-25-generic initrd.img-2.6.38-10-generic  vmlinuz-2.6.38-10-generic initrd.img-2.6.38-11-generic  vmlinuz-2.6.38-11-generic initrd.img-2.6.38-12-generic  vmlinuz-2.6.38-12-generic initrd.img-2.6.38-8-generic   vmlinuz-2.6.38-8-generic initrd.img-3.0.0-12-generic   vmlinuz-3.0.0-12-generic initrd.img-3.0.0-13-generic   vmlinuz-3.0.0-13-generic initrd.img-3.0.0-14-generic   vmlinuz-3.0.0-14-generic   Currently, I'm using the 3.0.0-14-generic kernel.


I have two laptops- and I want to install Steam in both of them and use the same account in both. Both the laptops have Windows 10, with the same Windows account. Can I do so? Also, what if I have a WIndows laptop and a Macbook? Can I use Steam on both (using the same Steam account)? Will there be any restrictions?

My gaming computer is currently downloading Napoleon: Total War and Supreme Commander 2 which I purchased on Steam, and which will take some time to complete. While this download is going on, I would like to play some of my other multiplayer games on my laptop, but I would rather not interrupt the download to do so.   Is it possible to have both computers logged in at once? I know if I was playing a single player game, I could set Steam into offline mode, then resume the download on the other computer, but this won't work for multi player games.


Can I turn my MSc thesis into a paper and can the paper get published if it does not have original work?

I have a written thesis, as my Final year project. I have submitted in university.   but now i want to make it professionally mine.   I want to publish it some where but i don't have such kind of experience before. I am total Rookie in this field.  Any Expert Opinion?  Note: Thesis in About "Handwriting Recognition "


I'm trying to implement a help message on my shell script to get a usage example when running my script with "-h" as a parameter. I looked for ways to do it on-line but it's just not working...  This is my code:  #!/usr/bin/env sh  usage="$(basename "$0") [-h] -- program to change all files from one extension to another extension  where:     -h      show this help text     ext1    extension to be changed     ext2    new desired extension      usage example: ./chage_entension.sh .cpp .c"  while [[ getopts ':hs:' option ]]; do     case "$option" in         h) echo "$usage"             ;;     esac done shift $((OPTIND - 1))  ext1 = "$1" ext2 = "$2"  for file in *$1; do     mv "$file" "`basename "$file" $1`$2" done   And this are the errors I'm getting when trying to run ./change_extension.sh  /home/andre/src/scripts/change_extension.sh: line 12: conditional binary operator expected /home/andre/src/scripts/change_extension.sh: line 12: syntax error near `':hs:'' /home/andre/src/scripts/change_extension.sh: line 12: `while [[ getopts ':hs:' option ]]; do'

Say, I have a script that gets called with this line: ./myscript -vfd ./foo/bar/someFile -o /fizz/someOtherFile  or this one: ./myscript -v -f -d -o /fizz/someOtherFile ./foo/bar/someFile   What's the accepted way of parsing this such that in each case (or some combination of the two) $v, $f, and  $d will all be set to true and $outFile will be equal to /fizz/someOtherFile?


I need to create an array of buttons, each having its own Card from another program in which I called Deck. After instantiating the cards and then instantiating the buttons, I keep on getting null pointer exception, which I do not know where it is coming from. Please feel free to ask if you don't understand what I'm talking about; I am relatively new to programming.      import javax.swing.*;     import java.awt.*;     import java.awt.event.*;      public class TenCard extends JFrame implements ActionListener { // a window with borders, title bar, buttons and panel. private static JFrame f;  // panel that will hold the contents private JPanel        p;  // declare deck and displayed cards private Deck        myDeck;     //Deck private Card[]      playerCards1; private Card[]      playerCards2;   /**********components**********/  //JButtons private JButton[]    cardbuttons1; private JButton[]    cardbuttons2; private JButton      sortbutton; private JButton      shufflebutton; private JButton     flipbutton;   //Textfields private JTextField text1; private JTextField text2;   //Menu private JMenuBar   menuBar; private JMenuItem  item1, item2; /*****ending the components*****/  /** * constructor that instatiates * the frame, panel, layout, etc and * adds two cards to the panel */ public TenCard() {     f = new JFrame("High Card Game");      // create the content panel     p = new JPanel();      // set the layout     GridLayout layout = new GridLayout(2,3);      // instantiate game and assign cards     myDeck  = new Deck();     myDeck.shuffle();       Card playerCards1[]= new Card[5];     for (int i=0; i<5; i++)     {         playerCards1[i]= myDeck.dealOneCard();     }       Card playerCards2[]= new Card[5];     for (int i=0; i<5; i++)     {         playerCards2[i]= myDeck.dealOneCard();     }          // set layout     p.setLayout(layout);     addCardsToPanel();     addFieldToContentPanel();      // add the content to the window     f.setContentPane(p); }  /** * Create and add three buttons to content panel */ public void addCardsToPanel() {     // instantiate buttons with images     sortbutton = new JButton("sort cards");     shufflebutton = new JButton("shuffle cards");     flipbutton = new JButton("flip cards");       JButton cardbuttons1[] = new JButton[5];     for (int i = 0;  i < 5; i++)     {         cardbuttons1[i] = new JButton("player 1, card" +i, playerCards1[i].getBackImage());      }      JButton cardbuttons2[] = new JButton[5];     for (int i = 0;  i < 5; i++)      {          cardbuttons2[i] = new JButton("player 2, card" +i, playerCards2[i].getBackImage());      }       // add buttons      p.add(sortbutton);     p.add(shufflebutton);     p.add(flipbutton);   }

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


What do the different colors in the Linux ls command mean?

There are two directories shown by 'ls'.  Normally directories anywhere are blue on black background.  But the first one is blue on green and impossible to read.  Why is this?  How to make it blue on black, or at least something light on something dark?  This is on Ubuntu 12.04, using bash in Gnome Terminal.  In Konsole, the blue is slightly darker, and possible to read, though could be way better.


I noticed that there are very few questions on Stack Overflow about  (DNN). Is this an indicator that DNN has a small Q&A community, or is there a more appropriate place than SO to ask DNN-related programming questions (e.g.  for )?

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


I am trying to create a step-by-step solution sheet for my homework and have discovered that I need to use "cancel" things in a fraction.  For example, like in the following picture    I would like to draw lines through the term b-4.

How can I strike through an expression (e.g. "2x") obliquely, e.g. from bottom left to top right, so as to indicate cancellation? With the \sout command from the ulem package, I can only strike horizontally.


If $P(x)$ is a polynomial with integer coefficients and $a, b ,c$ are three distinct integers, then show that it is impossible to have $P(a) = b$, $P(b) = c$, $P(c) = a$.

Let $a,b,c$ be $3$ distinct integers, and let $P$ be a polynomial with integer coefficients.Show that in this case the conditions $$P(a)=b,P(b)=c,P(c)=a$$ cannot be satisfied simultaneously.  Any hint would be appreciated.


I have a list full of classes of the same type: class Example():      def __init__(self, myVar):         self.myVar = myVar         # other variables and functions         # ...     Following example shows the list: myList = [] for i in range(0,10):     myList.append(Example(i))  And now i want a quick way to get a new list with all myVar of all Example-classes. I thoght of something like: myVector = myList[:].myVar  But this doesn't work. Can anyone help me?

I have a list of objects. Object has 3 string attributes. I want to make a list containing only a specific attribute from class.  Is there any built-in functions to do that?


Is there a way to find the solutions of $3^y=2^x-1$ where $(x,y)$ are integer coordinates (maybe within a certain interval)? Are there an infinite number of integer coordinate pairs for this equation? Is it possible to even determine this? I'm not quite sure the difficulty of this problem, but substituting $x$ or $y$ values into this equation to find integer pairs is time consuming and not very promising.

Consider the equation $$|2^x-3^y|=1$$ in the unknowns $x \in \mathbb{N}$ and $y \in \mathbb{N}$. Is it possible to prove that the only solutions are $(1,1)$, $(2,1)$ and $(3,2)$?


What happens to the other characters or items inside the one banished by a banishment spell?     Are they banished with it? Do they stay behind and fall to the floor? Is there a difference between what happens characters and items?

If a creature with the ability to swallow other creatures is banished what happens to a still living swallowed creature (i.e. PC)?    The  spell has the following key points:     "You attempt to send one creature that you can see" "While there, the target is Incapacitated" "The target remains there until the spell ends"   The thing is, you only targeted one creature.  So what creature(s) are affected in this situation and how?  You can't see the swallowed creature, so how is it affected?  I can see several possible scenarios:   The swallowed creature is left behind.  Could be a useful way to save someone swallowed. The swallowed creature is also banished.  It is treated the same as the banished creature and is also incapacitated.  It may or may not take ongoing damage during this time (for instance the acid damage from the stomach). The swallowed creature is also banished.  It isn't affected by the incapacitation and could fight its way out of the creature that did the swallowing.  If it gets out, it is just in the demiplane alongside the banished creature.  It may or may not stay behind in the demiplane since it wasn't the target and the spell fails to pull it back.   Background: Our party is about to face a Kraken (party member stole from the temple of the God of Sea and Treachery despite the cleric vehemently warning against taking anything).  This thing seriously outclasses us (level 10 party members) if it is the full version of the Kraken.    We've faced a baby version of this before.  If this is the full CR23 version, the only thing I can see that can get us out is the cleric's Divine Intervention, running away while it is banished, or an exploit like being able to banish the creature with someone(s) inside who can then escape and attack it without being attacked in response.


I run Ubuntu on my laptop and desktop. Regardless of the make and model of my computers, I can download Ubuntu from their website and install it with easy instructions designed for laymen to follow. After that, upgrades and updates are automatic, with regular downloads from a repository, not just for applications I've installed, but for the kernel and core components.  With Android, if I stay on the stock version I got when I bought my phone (right now I have a Galaxy S5), it might update the OS. My last phone, an S3, never received Anything above 4.0 because the carrier or someone (I don't know who makes the decisions) just never offered it.  To get a more recent version of Lollipop, I have to go through long, obscure, and definitely-not-for-laymen posts and instructions on the . I've done it before, and it's confusing, risky, and labyrinthine. You go through warnings about bricking your phone, you're taken to all sorts of sketchy  for-profit download sites... and then when you finally get it working, to get any upgrade, you have to go through it all again.  Why aren't there Android versions available on websites as easily as there are Linux desktop versions? Why don't Android versions have repositories that update as regularly as Linux versions do? For that matter, why don't versions of Android upgrade as freely and easily (in terms of user management) as apps on Android do?

I am used to install and remove various operating systems in my PCs, even having several at a time.  Usually, to install a new OS means:   Burn the ISO to a CD/DVD/USB. Insert it. Boot. (Maybe you have to tweak a bit the BIOS first).   The only difference between PCs is its CPU architecture: x86, x86_64, arm, etc. Depending on that, you have to download one ISO or another. But I never have to worry about which graphic card, mouse, keyboard, screen, network card, etc. it has. The install wizard automatically detects that and installs the corresponding drivers. Sometimes, if they are not bundled, the installer also downloads them. Anyway, the key point here is that the ISO is always the same.  Now, many mobile OS come out: Ubuntu, Tizen, Firefox OS, the omnipresent Android, and why not any Linux ARM distro out there!. Sadly I have a random chinese mobile, that surely will never get official support in any platform, and I will never be able to test them.  But... Are not today's phones just tiny ARM PCs? Why is installation that different? Why do I always need to have a precompiled monolithic ROM specific for my phone model? Why not just a single "ISO" per OS for any phone that detects and installs automatically the needed drivers, just like always has been in the PC market?  Note: I understand the problem with privative drivers, but I remember Debian asking me for those when there were no libre alternatives at installation, and I could install them then or later. I suppose that workaround could be used in those cases too. Correct me if I'm wrong.


I'm a novice programmer who just migrated from Python (on IDLE) to C++ and I'm finding it uncomfortable to know only a few "essential" methods of STL data structures. Is there something like the Python help() function in C++, or some other way to access digestible and concise documentation as regards the Standard Library?  Edit: To be clear, I am looking for a way to access documentation from my computer, preferably from within the IDE/compiler (I currently use and prefer g++ on Cygwin in Windows 7. I also have Code::Blocks, however). Please don't recommend books or mark this question as a duplicate of The Definitive C++ Book Guide and List.

This question attempts to collect the few pearls among the dozens of bad C++ books that are published every year. Unlike many other programming languages, which are often picked up on the go from tutorials found on the Internet, few are able to quickly pick up C++ without studying a well-written C++ book. It is way too big and complex for doing this. In fact, it is so big and complex, that there are very many very bad C++ books out there. And we are not talking about bad style, but things like sporting glaringly obvious factual errors and promoting abysmally bad programming styles. Please edit the accepted answer to provide quality books and an approximate skill level — preferably after discussing your addition in . (The regulars might mercilessly undo your work if they disagree with a recommendation.) Add a short blurb/description about each book that you have personally read/benefited from. Feel free to debate quality, headings, etc. Books that meet the criteria will be added to the list.  Books that have reviews by the Association of C and C++ Users (ACCU) have links to the review. *Note: FAQs and other resources can be found in the  and under .


When I wanted to change from the graphical interface to a non-graphical interface I used the shortcuts Ctrl+Alt+F[1-6] with the one in F1 being the graphical one by default. On the new Ubuntu, F2 is the graphical interface logged in, and F1, logged out. I don't understand this. What's the sense in having those 2?

I am running Ubuntu Gnome 16.10 (64bit). Gnome-shell version 3.20.4.   When I start my computer, I eventually see GDM3 offering a login prompt, as expected.   After I login, my monitors flash a little (like they're unplugged and then replugged in), and then I am brought to the gnome 3 desktop.   However, if I hit  CTRL + ALT + F1, I am brought back to GDM3, offering a login prompt.   If I then hit CTRL + ALT + F2,  I am brought back to my Gnome 3 desktop.  So it seems like GDM3 continues to run in TTY1 while the desktop runs in TTY2.   Questions   Is this how things are supposed to work? I thought the desktop was supposed to use the same TTY (or whatever you call it) as the display manager.  Am I using more graphical resources by having things setup this way? Is there a way to have GDM3 pass off the display to Gnome Desktop after I login? Is there any advantage do doing #3?


Prove that arithmetic mean of $4$ numbers is greater than geometric mean of the same $4$ numbers, i.e. prove that $$\dfrac{a+b+c+d}{4} > (abcd)^{\frac1{4}}$$

The arithmetic - geometric mean inequality states that $$\frac{x_1+ \ldots + x_n}{n} \geq \sqrt[n]{x_1 \cdots x_n}$$ I'm looking for some original proofs of this inequality. I can find the usual proofs on the internet but I was wondering if someone knew a proof that is unexpected in some way. e.g. can you link the theorem to some famous theorem, can you find a non-trivial geometric proof (I can find some of those), proofs that use theory that doesn't link to this inequality at first sight (e.g. differential equations …)?  Induction, backward induction, use of Jensen inequality, swapping terms, use of Lagrange multiplier, proof using thermodynamics (yeah, I know, it's rather some physical argument that this theorem might be true, not really a proof), convexity, … are some of the proofs I know.


I understand that Yuno and Yukiteru end up together, but I was wondering if it was 2nd-world Yuno (the yandere Yuno) or 3rd-world Yuno (the sane Yuno)?

The final scene where Yuno breaks into his world is crucial for the ending, yet they saved it for the OVA. Many people I know haven't seen the OVA, and missed this final embrace.  I remember reading the final volume of the manga because the anime ending seemed inconclusive, until I realized the OVA had the final ending.  Why does the anime conclude seconds before the manga concludes?


I recently gave an answer (the one and only so far) and the OP stated in a comment that it works perfectly.  But he either upvoted nor accepted it.  I went to his profile and saw that he doesn't upvote or accept at all.  What can I do?  Flagging his question is a bad idea. Should I tell a moderator? But how?

How should SO handle users who don't "maintain" their questions by selecting answers, or remarking newer/better answers as the chosen one?  Many questions...   Have no answer marked correct, even when one is plainly there Are not reviewed by the poster to select a new correct answer   I don't mind taking the time to answer questions, but don't see the point when I don't get "reputation" for doing so since no one reads those questions, and reputation seems to be the point of the site.  I think the "remind to accept an answer" feature is there now, since I just saw it when coming back.  I missed it the first time though.


In javax.ws.rs.core.Response.ResponseBuilder, when I set filename, with polish (german, french, etc.) national characters, it changes file name before response is sent to client:  ResponseBuilder response = Response.ok(file); response.header("Content-Disposition", "attachment; filename=żółty.txt");   After this, file is being downloaded as "-óBty.txt". How to fix this?  EDIT: Whole application works properly with UTF-8 (json content contains polish characters for example). Only http headers doesn't.

Web applications that want to force a resource to be downloaded rather than directly rendered in a Web browser issue a Content-Disposition header in the HTTP response of the form:  Content-Disposition: attachment; filename=FILENAME  The filename parameter can be used to suggest a name for the file into which the resource is downloaded by the browser.  (Content-Disposition), however, states in  (The Filename Parameter) that the file name can only use US-ASCII characters:     Current [RFC 2045] grammar restricts   parameter values (and hence   Content-Disposition filenames) to   US-ASCII.  We recognize the great   desirability of allowing arbitrary   character sets in filenames, but it is   beyond the scope of this document to   define the necessary mechanisms.   There is empirical evidence, nevertheless, that most popular Web browsers today seem to permit non-US-ASCII characters yet (for the lack of a standard) disagree on the encoding scheme and character set specification of the file name. Question is then, what are the various schemes and encodings employed by the popular browsers if the file name “naïvefile” (without quotes and where the third letter is U+00EF) needed to be encoded into the Content-Disposition header?  For the purpose of this question, popular browsers being:   Firefox  Internet Explorer  Safari Google Chrome  Opera


I am a beginner learner and i see posts in social media like: telling my friend where is my phone. İn this sentence i am thinking like it is present continuous tense and we should add "I am" at the beginning. Also if this is normal, can we talk like that in daily life?

"Thought you'd never ask" is "I thought you'd never ask" with "I" omitted. "Hope this helps" is "I hope this helps" with "I" omitted.   In English grammar, normally every sentence should have a subject, right?   My first thought is that these two examples are so often used that they are like set phrases. But these are not really set phrases. You can alter the words after "thought" and "hope".  Another possible explanation is the tendency to drop the subject if it is the first person pronoun. It seems that in many languages, such as Spanish, Italian and Japanese, the first person subject is usually omitted. Maybe English is going the same way? (Not exactly the same, since in Italian, verb forms change according to the person, so the subject is not necessary to understand who one's referring to.)  And, apparently, such omission is more common in spoken English than in written English.  Are there more examples of such first person subject omission? How frequent is it?


I have two dictionaries and I want to add their content to third dictionary naturally without mixing their between them.  a = {'life':'1','arts':'2'} b = {'technology':'3', 'culture':'4'} c = {} # here must be keys and values of the `a` and `b` dicts

I have two Python dictionaries, and I want to write a single expression that returns these two dictionaries, merged (i.e. taking the union).  The update() method would be what I need, if it returned its result instead of modifying a dictionary in-place. >>> x = {'a': 1, 'b': 2} >>> y = {'b': 10, 'c': 11} >>> z = x.update(y) >>> print(z) None >>> x {'a': 1, 'b': 10, 'c': 11}  How can I get that final merged dictionary in z, not x? (To be extra-clear, the last-one-wins conflict-handling of dict.update() is what I'm looking for as well.)


I am an algebraic geometer and I fell in love with the font they use in mathematical articles published by the IHES (for instance EGA, which I assume is the most famous of all time). How would I proceed to do that?   P.S. : I don't just want to know what to write in the code (which I assume is quite obvious), I'd also like to know what font it is.   EDIT : Actually I realized it only changed the font, not the math font. In EGA the math symbols are not slanted as in the standard math font... what about that? (Please don't close!)

I very much like the typesetting in Numdam's writeup of . I find the font particularily pleasing, and the headers are nice as well. I've heard this is how it looked in the original release; I would like to snatch it. Does anyone know the name of the font, or does anyone have a general setup?


My question may seem odd but this is indeed what I need to do. For the first in the last (maybe) 10 years I have to run a JAR file in my computer. But I don't want to install 'the Java' (and all those things it adds into your system). How can I run that JAR file?

I've installed Java on Windows Vista, and every day I get a Vista security warning asking me if I want to run "jucheck".  Apparently this is the Java automatic updater.  Well, I don't want it to run on its own, ever.  I cancel it, and quit it.  I right-click on the taskbar and unclick "Check for Updates Automatically", and then click "Never Check", and "Apply".  And yet, it never remembers this setting.  If I come back to the "Java Control Panel" right after clicking "OK", the very same box is checked again, all on its own.  Is there some way to kill jucheck once and for all?  If I simply delete jucheck.exe, will Java (other than the automatic check) still work, and will manual updates still work, and will it stop even trying to update every morning?


Does anyone administer any Android devices as kiosks which you need to be able to monitor remotely?  I've been looking for something like TeamViewer for Android. I found there's a Support version which should allow people to connect to the Android device but I am unsure if you can fully control it? i.e load up certain apps, change app settings etc.?   I also found Bomgar and AirDroid or something similar.  Ideally, I need to know the status of the device (online or offline) and be able to diagnose any problems (or update the settings and apps). We already use SureFox Kiosk Web Browser which works OK (although it's not as responsive as just running the Chrome app)

Looking for something to remote control my Droid without having to root.  To be clear, I am looking for full control over the computer (view on monitor, use mouse and keyboard for input).


I'm using code from GitHub for mitigation of DDoS attacks using reactive flow rules in Floodlight Controller. I can't run the program because the global variable attacked_switches is not defined, but I don't know how to do that. Can anybody help me?        def start():      try:          number_of_switches, number_of_hosts = topology_info()         switch_dpids = list()         hosts = dict()         switch_dpids = switch_info(number_of_switches, switch_dpids)         hosts = host_info(number_of_hosts, hosts)         dpid = switch_byte(number_of_switches, switch_dpids)         print 'dpid= ', dpid         if dpid != 0:             print'calling flow pusher'             global attack             attack = True             attacked_switches.add(dpid)             T2 = threading.Thread(target=Flowpusher, args=[dpid])             T2.start()         elif attack:             T3 = threading.Thread(target=Flowremover, args=[dpid])             T3.start()      except Exception as e:         print'Error occured:', e

How can I create or use a global variable in a function?  If I create a global variable in one function, how can I use that global variable in another function? Do I need to store the global variable in a local variable of the function which needs its access?


The Cambridge Dictionary capitalises  but does not capitalise . What is the BrE rule for this (other than looking it up in a dictionary or style guide), if any?  NB: According to , of which I do not know whether they are BrE or otherwise focused:     While schadenfreude is capitalized in German, it is not capitalized in English.

On another post an interesting fact has just been discovered about the OED's treatment of nouns adopted into English from German (loan-words).  A lot of them e.g. Nazi are spelled with a capital letter. Similar words, which are not of German origin, such as communist or socialist are not spelled with a capital.  Equally Zeitgeist, and Blitzkrieg are also given capitals, but interestingly not kindergarten or bratwurst.  Of course, in German all nouns are given capital letters, not just proper nouns as in English.   What is it that determines whether a noun adopted into English from German should have a capital letter?


I have a question regarding the AR(1) process. I want to derive the conditional expectation $E(X_{(t)}| X_{(0)})$ and the variance $\operatorname{Var}(X_{(t)}|X_{(0)})$ of the AR(1) process: $$X(t)=aX(t-1)+Z(t)$$ Where $Z(t)$ is i.i.d. normally distributed with standard deviation $b$. Does anyone knows how to do it?

Suppose we have a stationary AR(1) process: $Y_{t+1}=a+ \rho Y_{t} + \epsilon_{t+1}$ where $\epsilon_{t+1}$ is white noise with probability density function $\phi(.)$.   Now say we have a equation $P_{t+1}=u\cdot (A_{m}-Y_{t+1})^{+}$ where $(Y_{m}-Y_{t+1})^{+}$ = $ \max \{(A_{m}-Y_{t+1}),0\}$ and $u$ is a constant.  So $P_{t+1}=u\cdot(A_{m}-a-\rho Y_{t}-\epsilon_{t+1})^{+}$.   Can we write $E[P_{t+1} \mid Y_{t}]= u\cdot \int_{-\infty}^{(A_{m}-a - \rho Y_{t})}(A_{m}-a-\rho Y_{t}-\epsilon_{t+1})\phi(\epsilon_{t+1})d\epsilon_{t+1}$ ?


Are you the third of your parents' children? or the second issue?  Or, you are the third guy, eh?  What is the question for which "he came third in the race" is an answer?.  Instead of resorting to such a questioning is there a single  word to interrogatively  seek information of placement on a  time marker line ?  All Indian languages have such a word, none in English afaik..

I want to make a question having an answer as follows:     5 is the third prime number.   The bold part is the answer. How to phrase the question?


Why the virtual makeNoise method of the base class is called instead of the method of the inherited class when I iterate through the list of Animal objects in following code. If I call directly the makeNoise method from the inherited objects then the right out put is printed out.  #include <iostream> #include <list>  class Animal { public:   Animal() {   }   virtual ~Animal() {   }    virtual void makeNoise() {     std::cout << "This animal makes no sound." << std::endl;   } };  class Dog: public Animal { public:   virtual void makeNoise() {     std::cout << "Wuf!" << std::endl;   } };  class Cat: public Animal { public:   virtual void makeNoise() {     std::cout << "Maouw!" << std::endl;   } };  int main() {   std::list<Animal> listOfAnimals;   Animal * cat = new Cat();   Animal * dog = new Dog();   listOfAnimals.push_back(*cat);   listOfAnimals.push_back(*dog);    for (std::list<Animal>::iterator it = listOfAnimals.begin();       it != listOfAnimals.end(); ++it) {     it->makeNoise();   }    cat->makeNoise();   dog->makeNoise();    return 0; }   The output looks like:  This animal makes no sound. This animal makes no sound. Maouw! Wuf!   I would expect the noises of Cat and Dog to be printed out also while iterating. That is the functionality of virtual method as I would understand it. Does the type definition of the list affect it somehow?

Someone mentioned it in the IRC as the slicing problem.


If I start tmux on a remote server while using putty I can't paste using right click.

I am using tmux on ubuntu. I read this  for copy and paste inside tmux. But I would like to know how can I copy from TMUX terminal and paste it to other application e.g browser in my OS?


Are Ubuntu 16.04 & 18.04 compatible with Canon MG3650 all in one printer, or suggestions please

Canon CAPT Driver v2.4 was to be download from a link posted , but when I write this the link is dead.  I had the driver and have uploaded it .  But I suppose the driver and even a newer version should be available. Is it?


I'm using Nikon D750 DSLR camera.  How can I capture the rays of light as represented in these two black and white photographs?  I mean in terms of ISO, aperture and shutter speed and filter use.   by Fan Ho   and    by Hal Morley

I would like to be able to capture a photo which shows light shafts coming through the window. A famous example is this:    I'm guessing this involves a tripod, a long exposure and strong sunlight, but presumably also some particulate in the air to catch the light? Is there a way to reliably replicate this effect in a building like a church?


I'm going to be traveling to Germany from the US, and on the flight back that is preferable for other reasons, we'll be going Nuremberg->Frankfurt, then have 1.5 hours, then -> Chicago.  Is that long enough for that stage?  I'm not an experienced international traveller (I've never been on that side of the Atlantic, for example), and I'm somewhat concerned about what might happen if my puddle-jumper gets delayed (as I'm sure they do from time to time).    (Unfortunately, the other option is a 5 hour layover; that seems to me to be just short enough that we can't really go see anything (not that FRA has much to see from what I've read) and long enough my two toddlers will dislike it if we stay at the airport.)

I have bought a ticket to travel from Bangalore (India) to Dublin (Ireland) via Frankfurt (Germany). Both of the flights is of Lufthansa and as a part of the same ticket. The transit time I will have in Frankfurt is 1 hour. Last time when I travelled in the same route, there was 1 hour and 20 minutes of time available between changing aircraft, but the connecting flight was late and I was able to board comfortably. Therefore I am not able to estimate this time how long it may take. I was wondering if this is too little time.   Also, I would like to know what the possibilities are in the case of missing the connecting flight?


I'm using a list from enumitem-package inside table from tabularx-package. Between the table-row, which contains the list, and and the next table-row there is a space I would like to avoid. How do I do that? This is some basic example code:  \documentclass{article}  \usepackage{tabularx} % featured tables  \usepackage{enumitem} % control layout of itemize, enumerate, description \setlist{nosep} \setlist[itemize,1]{leftmargin=\dimexpr 1em}  \renewcommand{\arraystretch}{1.3} % table spacing  \begin{document}  \begin{tabularx}{\textwidth}{p{4cm}X}   lorem ipsum a & lorem ipsum b   \begin{itemize}[label=--]     \item lorem ipsum c     \item lorem ipsum d   \end{itemize}\\   lorem ipsum e & lorem ipsum f\\ \end{tabularx}  \end{document}   It looks like this:

I'm trying to use itemize inside a tabularx environment, but I have a problem when I mention the end of the line. It seems that using \\ end the line after the end of itemize, resulting in a supplementary vertical spacing that I would like to remove.  Any hint?  \begin{frame} \frametitle{Sujet de thèse}         \begin{center}             \textit{Sujet N$^\circ$221 : Formation et dynamique des champs de dunes longitudinales.}         \end{center}          \begin{tabularx}{\textwidth}{l !{\color{blue}\vline width 3pt} X}             Contexte &  \scriptsize{Classification des dunes selon leur mécanisme de croissance, leur orientation et leur forme.              Bonne compréhension :             \begin{itemize}[noitemsep,topsep=0pt, label=\textbullet]                 \item du mécanisme de croissance lié à une disponibilité en sédiment grande.                 \item de la croissance sous un vent unidirectionnel.             \end{itemize}} \\             Objectifs & \scriptsize{Etude de l'orientation longitudinale :             \begin{itemize}[noitemsep,topsep=0pt, label=\textbullet, parsep=0pt ]                 \setlength\itemsep{0cm}                 \item Développement d'un formalisme sous des vents multidirectionnels.                 \item Etude des dunes longitudinales dans le cas d'une faible disponibilité en sédiment. (Fingering mode)                 \item Inversion: données topographiques $\longrightarrow$ Données de vents $\rightarrow$ paléo-climats.              \end{itemize}} \\             Outils & \scriptsize{Modèle numérique (Rescal), Données expérimentales, Théorie.} \\         \end{tabularx}     \end{frame}     And yes, dunno if it's important but everything is inside beamer.


I’m learning Python 3.  My code   numbers = [1, 2] print( type( numbers[0] ))   outputs  <class ‘int’>   How do I print only   ‘int’   or   int

How do I find out a name of class that created an instance of an object in Python if the function I am doing this from is the base class of which the class of the instance has been derived?  Was thinking maybe  might have helped me out here, but it doesn't seem to give me what I want. And short of parsing the __class__ member, I'm not sure how to get at this information.


I want to zoom to specific polygon boundary of some polygon layer. How can I do this.The map layer is WMS layer.

I created a layer that contains points and I added it to a map as WMS layer in OpenLayers. I did a CQL filter and it works but I'd like to zoom to the selected point when I worked with getextent or getdataextent it doesn't zoom to the right place. It missed with a few Km. Here is my the code of filter:   function filterNom(){             var filterType ="cql";             var filter = document.getElementById('batima').value;             // by default, reset all filters             var filterParams = {cql_filter: null};             if (OpenLayers.String.trim(filter) != "") {                 if (filterType == "cql")                      filterParams["cql_filter"] = "batiment='"+filter+"'";              }             // merge the new filter definitions             wfs_layer.mergeNewParams(filterParams);             var bounds =  new OpenLayers.Bounds             bounds = wfs_layer.getExtent()             map.setCenter(wfs_layer.getExtent(),18);             var center = map.getCenter();             center.transform(new OpenLayers.Projection("EPSG:4326"), new OpenLayers.Projection("EPSG:900913"));             alert(center.toString()); }   and here is the code to add the WMS layer:    wfs_layer = new OpenLayers.Layer.WMS("Patrimoines",         "http:// localhost/geoserver/cite/wms",          {layers: 'cite:patrimoine' , transparent: true },         {isBaseLayer: false, opacity: 1, singleTile: true, visibility: true,          projection: 'EPSG:900913'});


In order to store their arcane spells, does an Arcane Trickster rogue need a spellbook?

Page 200 of the DMG says that a wizard scroll can be copied into a spellbook     A wizard spell on a spell scroll can be copied just as spells in spellbooks can be copied. When a spell is copied from a spell scroll, the copier must succeed on an Intelligence (Arcana) check with a DC equal to 10 + the spell's level. If the check succeeds, the spell is successfully copied. Whether the check succeeds or fails, the spell scroll is destroyed (DMG)    Does an Arcane Trickster have a spellbook to copy a scroll into? If they do have a spellbook, is the entire Wizard list open to them, or only enchantment and illusion spells? i.e. could they copy Absorb Elements (a 1st level Wizard Abjuration spell)     You know three 1st-level wizard spells of your choice, two of which you must choose from the enchantment and illusion spells on the wizard spell list. (PHB)  If they don't have a spellbook, is there an acceptable mechanic for learning or memorizing the spell on the scroll that is similar to how a wizard would be able to learn it? (And is the entire Wizard list open to them)     Intelligence is your spellcasting ability for your wizard spells, since you learn your spells through dedicated study and memorization. (PHB)


Determine whether the following models are linear, intrinsically linear,   or nonlinear (disregard the error structure):      $y=\beta_0+\beta_1 x_1 +\beta_2 x_2^{\beta_3}+\epsilon$      $y=\beta_1 + \left(\frac{\beta_2}{\beta_1}\right)x+\epsilon$      $y=\beta_1+\beta_2 e^{\beta_3 x}+\epsilon$   I'm having trouble finding a systematic way to determine whether a model is linear, intrinsically linear, or nonlinear.     For $y=\beta_0+\beta_1 x_1 +\beta_2 x_2^{\beta_3}$ I have that the best you can do is to have  $$log(y-\beta_0)=log(\beta_1 x_1 +\beta_2 x_2^{\beta_3})$$  but there is no way to separate $x_1$ and $x_2$ so this model is nonlinear. Is this valid reasoning for this being nonlinear though?  For $y=\beta_1 + \left(\frac{\beta_2}{\beta_1}\right)x$ I have that $y$ can be expressed as  $$y=\theta_1+\theta_2 x$$  which is linear in the transformed parameters $\theta_1$ and $\theta_2$ so this model is intrinsically linear.   For $y=\beta_1+\beta_2 e^{\beta_3 x}$ since $\beta_1$ is just constant, we have  $$log(y-\beta_1)=log(\beta_2)+\beta_3 x$$  so this model is intrinsically linear.

I was reading the following link on non linear regression . My understanding from reading the first section "Nonlinear Regression vs. Linear Regression" was that the equation below is actually a linear regression, is that correct? If so why?  $$y = b_1x^3 + b_2x^2 + b_3x + c$$  Am I also to understand that in non linear regression multicollinearity isn't an issue? I know that multicollinearity can be an issue in linear regression so surely if the model above is in fact a linear regression there would be multicollinearity?


Give two integer vectors in c++ (same size), I'd like to sort one of my vectors from smallest to largest element and change the order of the second vector respectively.  How can I achieve this without using boost library?  Thanks.

I have several std::vector, all of the same length. I want to sort one of these vectors, and apply the same transformation to all of the other vectors.  Is there a neat way of doing this? (preferably using the STL or Boost)?  Some of the vectors hold ints and some of them std::strings.  Pseudo code:  std::vector<int> Index = { 3, 1, 2 }; std::vector<std::string> Values = { "Third", "First", "Second" };  Transformation = sort(Index); Index is now { 1, 2, 3};  ... magic happens as Transformation is applied to Values ... Values are now { "First", "Second", "Third" };


I have 200 mm long, 0.3 mm diameter nichrome wire. I am heating this wire with 5V AC power supply and current approximately 1.4 A. I need to calculate the exact temperature of the nichrome wire?

I have 2 meters, 32wg, 19 ohm per meter. NIchrome wire  I want to calulate what amps and volts i need so 2 meters of nichrome heats to 35 celsius.  How can i calulate this and what formula do i need to use.


As referenced in "Hogwarts: A History", the location of the school is unknown due to a number of various charms and protections. Igor Karkaroff even interrupts a conversation between Krum and Hermione when Krum starts mentioning the lakes and mountains that surround their castle. Karkaroff mentions "don't give away any more information, otherwise your pretty little friend will know exactly where we are". I'm just curious that if the secretive locations of schools are so closely guarded, then how did Beauxbatons and Durmstrang know where to go?

So in GoF, they state that Beauxbatons and Durmstrang are hidden from view and don't have their locations public.     “Durmstrang’s another wizarding school?” said Harry      “Yes,” said Hermione sniffily, “and it’s got a horrible reputation.      According to An Appraisal of Magical Education in Europe, it puts a   lot of emphasis on the Dark Arts.”      “I think I’ve heard of it,” said Ron vaguely. “Where is it? What   country?”      “Well, nobody knows, do they?” said Hermione, raising her   eyebrows.      “Er — why not?” said Harry.      “There’s traditionally been a lot of rivalry between all the magic   schools. Durmstrang and Beauxbatons like to conceal their whereabouts   so nobody can steal their secrets,” said Hermione matter-offactly.   So how do students get to the other school for the Triwizard tournament?


I found that problem and I could use some help.     I have a partial order $(2^S,⊆)$ and |S| = n.       How many different chains are there in that poset?   If I had the Hasse diagram or knew the elements of S it would be easy to find out.   But now with knowing just that |S| = n I have absolutely no idea.  Could anyone help and provide a methodology?  Thanks

Let $A$ be a finite set with $n$ elements. How many chains are there in $\mathcal P(A)$ -- that is, how many different subsets of $\mathcal P(A)$ are totally ordered by inclusion?  It's easy enough to count maximal chains; there are $n!$ of them. But counting all chains gets me into horrible inclusion-exclusion situations even if I try to do it by hand for small $n$.  Of course this is also the number of chains in a Boolean algebra with $2^n$ elements, or the number of chains in a finite lattice with $2^n$ elements.  By hand computation, the number of chains for $n$ running from $0$ to $6$ is $2, 4, 12, 52, 300, 2164, 18732$. This sequence appears to be unknown in OEIS.


In the code below I have the problem that the 'TOO HIGH' on the first page after the title page is shifted into the header. I want this on the same height as the 'IN THE RIGHT PLACE' on the second page after title page. anyone knows the answer?  \documentclass[a4paper, 11pt]{article} \usepackage{fancyhdr}  \pagestyle{fancy} \fancyhead[L]{ \scshape \begin{tabular}[t]{@{}l@{}} asdf \end{tabular}} \fancyhead[R]{ \scshape \begin{tabular}[t]{@{}r@{}} asdf \\ asdf \\ asdf \end{tabular}}  \begin{document}  \thispagestyle{empty} Title  \clearpage TOO HIGHT -> INSIDE HEADER  \newpage IN THE RIGHT PLACE  \end{document}

Looking at the example provided in , I noticed something strange: The vertical alignment of sections is varying. I was able to strip the effect down to the following (hopefully minimal) example:  \documentclass[12pt]{report}  \usepackage{fancyhdr} \pagestyle{fancy}  \begin{document}  \chapter{My First Chapter} \clearpage \section{Section 1} \clearpage \section{Section 2} \clearpage \section{Section 3}  \end{document}   If you look closely, the vertical alignment of "Section 1" differs from those of "Section 2" and "Section 3" (which are the same). The effect disappears if you either a) refrain from using the fancyhdr package and \pagestyle{fancy} or b) switch to the 10pt class option. What is causing this strange vertical alignment?


The checkmark besides the badge on the Badges page is not vertically aligned to the badge. It appears that this can be fixed by changing vertical-align: top; to vertical-align: middle; in the following line in secondary.css: .badges-page .single-badge-table .single-badge-wrapper .single-badge-badge {     vertical-align: top; }  Current CSS (vertical-align: top;):    Corrected CSS (vertical-align: middle;):     FWIW the checkmark displays correctly on the list of badges page ():

At :    At :    The little green check mark is slightly too high in the second image.  Please just lower it a bit.    Another instance of bug found on :      Produced on:   Windows 8.1 Chrome V 47.0.2526.111 with default settings   Mac OS X El Capitan Chrome V 47.0.2526.111 with default settings Mac OS X El Capitan Safari V 9.0.2 (11601.3.9) with default settings Win 7, Firefox 62.0     The issue is still here after a long time, I would like to hear if this is going to be fixed or not.


I'm calling a function when I press a button. When I use the btn.onclick = function() the button is pressed and the function is completed. If I change the HTML to include onclick=clicked() and the javascript to function clicked(), it does not run.  I've tried both these methods because I want to be able to pass a parameter through the function (as I have lots of buttons and I want to use as little code as possible).  window.onload = function () {   var modal = document.getElementById('myModal');   var btn = document.getElementById("Q11");   var span = document.getElementsByClassName("close")[0];   btn.onclick = function () {     modal.style.display = "block";   }   span.onclick = function (){     modal.style.display ="none";   }   window.onclick = function(event) {     if (event.target==modal) {       modal.style.display="none"     }   } }   How do I get it where I can pass a parameter through the btn.onclick function so that any button can call that function but pass a different parameter through it? Is there an equivalent for onclick="function(a)" but for event handlers/listeners?  Any help is appreciated.

The situation is somewhat like-  var someVar = some_other_function(); someObj.addEventListener("click", function(){     some_function(someVar); }, false);   The problem is that the value of someVar is not visible inside the listener function of the addEventListener, where it is probably being treated as a new variable.


I meet a strange phenomenom when using grep on Solaris 10: I try to use grep to find creat related DTrace probes. When in a folder (/data1/nan), it works OK:    bash-3.2# pwd /data1/nan bash-3.2# dtrace -l | grep creat*    27 hotspot586         libjvm.so __1cHThreadsJcreate_vm6FpnOJavaVMInitArgs_pb_i_ vm-init-begin    28 hotspot586         libjvm.so __1cHThreadsJcreate_vm6FpnOJavaVMInitArgs_pb_i_ vm-init-end   574        fbt              aggr                   aggr_ioc_create entry   575        fbt              aggr                   aggr_ioc_create return   While in another folder(/data1/nan/DTraceToolkit-0.99/Proc/), the grep can't find anything:    bash-3.2# cd /data1/nan/DTraceToolkit-0.99/Proc/ bash-3.2# pwd /data1/nan/DTraceToolkit-0.99/Proc bash-3.2# dtrace -l | grep creat* bash-3.2#   Could anyone give any clue about this issue, thanks very much in advance!

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


String s1 = "java";  String s2 = "java";  System.out.println(s1==s2);  //true System.out.println(""+s1==s2); //false   why the output is so?  in the second case only added "" quotes.

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


$$ \int \frac{\sin x+\cos x}{\sin^4x+\cos^4x}\,\text{d}x. $$ What I have tried: I tried writing denominator as  $ \sin^4x+\cos^4x =  1-2\sin^2x\cos^2x $ and $ 2\sin^2x\cos^2x = \frac{1}{2}\sin^2(2x) $ so the integral becomes, $$ \int\frac{\sin x+\cos x}{1-\frac{\sin^2(2x)}{2}}\,\text{d}x. $$ Anyone, how do I solve this further?

I am having real trouble evaluating this indefinite integral  $$\int{\frac{\sin{x}+\cos{x}}{\sin^4{x}+\cos^4{x}}}dx$$  Need I mention that I already tried WolframAlpha with little success? It returned a complicated expression full of many $\arctan$ terms.  Here is what I have already tried:   Seperating denominator as $(1-\sqrt{2}\sin{x}\cos{x})(1-\sqrt{2}\sin{x}\cos{x})$ and applying partial fractions. Multiplying and dividing by $\sec^4{x}$   Please provide any help. It would be appreciated if you give a hint rather than the whole solution.


I am trying to build a software using make launch and it is failing because its header files can't locate particular file. I do have the file but I don't know where to put it on my Mac such that the header files would be able to locate it using angled brackets <>.  Thanks

In the C and C++ programming languages, what is the difference between using angle brackets and using quotes in an include statement, as follows?   #include <filename>  #include "filename"


When I try to multiplicate some fractional number by 100, I get number with very small fraction instead of     integer number. For example, 32.02 * 100 = 3202.0000000000005. But in other case: 32.06 * 100 = 3206 Could you please tell, why do I get a small fraction in the first case?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I would like to do a deep copy of a primitive array of n dimensions.  public static double[] deepCopy(double[] arr) {     return arr.clone(); }  public static double[][] deepCopy(double[][] arr) {     arr = arr.clone();     for (int i = 0; i < arr.length; i++) {         arr[i] = deepCopy(arr[i]);     }     return arr; }  public static double[][][] deepCopy(double[][][] arr) {     arr = arr.clone();     for (int i = 0; i < arr.length; i++) {         arr[i] = deepCopy(arr[i]);     }     return arr; }   Above is the code to deep copy a double array of 1, 2, and 3 dimensions. I would like to generalize for any primitive type and/or generalize for the dimension of the array. I would like both, but I know a lot of things in Java are not possible, so it is okay if you can only get one, or tell me why it wouldn't work.  Thank you!

It's a bit difficult to implement a deep object copy function. What steps you take to ensure the original object and the cloned one share no reference?


I am installing Ubuntu 20.04 LTS alongside Windows 10. The Windiws is installed in the EFI partitioning style. When I'm installing Ubuntu, and goes to the "Something Else" option, I am provided with a partition table where Windows is already using a ~ 100 MB EFI partition. Do I need to create a separate 512 MB EFI partition dedicated for Ubuntu? Here's the my partition table (gparted on Xubuntu):

I'm trying to do a dual-boot installation of Ubuntu and I've noticed that there is already an EFI partition in my SSD. Do I need to create a new one for my Ubuntu Partition?


I tried to uninstall comodo but it is showing the following errors:  anurag@ubuntu:~$ sudo apt-get --purge remove cav-linux E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? anurag@ubuntu:~$   What can I do about this?

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


I need to use Python operator == to evaluate whether the components of two matrices are equal to each other to a specific precision (say only the first three digits is important to me). Is there a way to pass the precision to this operator?

I have been asked to test a library provided by a 3rd party. The library is known to be accurate to n significant figures. Any less-significant errors can safely be ignored. I want to write a function to help me compare the results:  def nearlyequal( a, b, sigfig=5 ):   The purpose of this function is to determine if two floating-point numbers (a and b) are approximately equal. The function will return True if a==b (exact match) or if a and b have the same value when rounded to sigfig significant-figures when written in decimal.   Can anybody suggest a good implementation? I've written a mini unit-test. Unless you can see a bug in my tests then a good implementation should pass the following:  assert nearlyequal(1, 1, 5)  assert nearlyequal(1.0, 1.0, 5)  assert nearlyequal(1.0, 1.0, 5)  assert nearlyequal(-1e-9, 1e-9, 5)  assert nearlyequal(1e9, 1e9 + 1 , 5)  assert not nearlyequal( 1e4, 1e4 + 1, 5)  assert nearlyequal( 0.0, 1e-15, 5 )  assert not nearlyequal( 0.0, 1e-4, 6 )    Additional notes:   Values a and b might be of type int, float or numpy.float64. Values a and b will always be of the same type. It's vital that conversion does not introduce additional error into the function. Lets keep this numerical, so functions that convert to strings or use non-mathematical tricks are not ideal. This program will be audited by somebody who is a mathematician who will want to be able to prove that the function does what it is supposed to do. Speed... I've got to compare a lot of numbers so the faster the better. I've got numpy, scipy and the standard-library. Anything else will be hard for me to get, especially for such a small part of the project.


This is a C# project.  I have several classes inherited from a base class. Most of the child classes have the same behavior while some of them behave differently.  I'm using the new keyword.  public class Parent {     public DataTable FetchScore()     {         // blahblah     } }  public class ChildNormal : Parent { }  public class ChildOdd : Parent {     public new DataTable FetchScore()     {         DataTable dt = base.FetchScore();         // blahblah     } }   But the build says using new is not a good practice.  I cannot use virtual and override either, because I want a default. I don't want to copy the same override implementation many times.  How do I do this in C#?

What is the difference between an abstract method and a virtual method? In which cases is it recommended to use abstract or virtual methods? Which one is the best approach?


Does the series $$ \sum_{n=1}^\infty \frac{\sin(2^n)}{n} $$ converge?  Based on , series like $$ \sum_{n=1}^\infty \frac{\sin(a[n])}{n} $$ converges when $a[n]$ is an arithmetic sequence. Different from this case, where $2^n$ is a geometric sequence. Not clear if Dirichet's test is still applicable.

As the title says, I would like to launch a community project for   proving that the series $$\sum_{n\geq 1}\frac{\sin(2^n)}{n}$$ is   convergent.   An extensive list of considerations follows. The first fact is that the inequality $$ \sum_{n=1}^{N}\sin(2^n)\ll N^{1-\varepsilon}\qquad\text{or}\qquad\sum_{n=1}^{N}e^{2^n i}\ll \frac{N}{\log(N)^{1+\varepsilon}} \tag{1}$$ for some $\varepsilon>0$ is enough to prove the claim by Abel summation. In the same spirit, it is quite common to employ  /  to prove the convergence of $\sum_{n\geq 1}\frac{\sin(n^p)}{n}$. In our case, however, we do not have an additive base of $\mathbb{N}$ made by perfect powers associated with some exponent, hence an additive base of finite order, so the estimation of the exponential sums appearing in the right side of $(1)$ is more difficult. Assuming that for an infinite number of primes $p$ the element $2$ is a generator of $\mathbb{Z}/(p\mathbb{Z})^*$ (Legendre's conjecture), we may probably regard $[1,N]$ as a subset of $\mathbb{Z}/(p\mathbb{Z})$ (for a huge $p$) and prove there is enough cancellation to grant $(1)$. However, Legendre's conjecture seems quite out-of-reach at the moment.  Integral extimations techniques, that turned out to be pretty effective , are almost ineffective here, since $\sin(2^x)$ oscillates too fast, so that there is no reason for expecting that $$ \sum_{n=M+1}^{M+N}\sin(2^n)\approx \int_{M}^{N+M}\sin(2^x)\,dx, $$ so, even if $\lim_{N\to +\infty}\int_{1}^{N}\sin(2^x)\,dx$ is convergent by Dirichlet's test, there is little use of that.  However, the series $g(\xi)=\sum_{n\geq 1}\frac{\sin(2^n\xi)}{n}$ is convergent for almost every $\xi$, since $g\in L^2\left(-\pi,\pi\right)$.  Additionally, the statement there is enough cancellation to ensure $(1)$ appears to be equivalent to (or, at least, a consequence of) the statement the digits $0$ and $1$ in the binary representation of $\pi$ are equidistributed. It is hard to believe that is not the case, and the   $$\pi=\sum_{k\geq 0}\frac{1}{16^k}\left(\frac{4}{8k+1}-\frac{2}{8k+4}-\frac{1}{8k+5}-\frac{1}{8k+6}\right)\tag{2}$$ may provide a way to prove it.


I am aware that when using  \caption[Short Title]{Longer Description}  Short Title is usually used for the List of Figures. Now I would like it to also be displayed below the figure, and in bold if possible. Is there a simple workaround that I'm overlooking to accomplish this?  The figure label should look something like this:  Figure 1. Short Title. Longer Description  Thanks in advance, and best regards

I'm using the caption package.  I want to say  \caption[My short Caption] {My longer longer caption}   and have both show up? How can I do that?


After I choose Ubuntu from the GRUB menu which appears on the primary monitor, the login screen appears on the second monitor which is something that I don't want.  How can I prevent this, so that everything appears on the primary monitor?

On Ubuntu 18.04, I have connected my laptop to an external display and I am able to set the external display as primary and external display only mode. But when I turn on my laptop or log out from my session the display login screen is displayed only on my(internal) laptop screen. But once I login the display switches to external only and my laptop screen turns off as expected. Is there a way I can make the login screen appear only on the external screen on bootup or on logout as in 16.04? Also the login screen does not follow my cursor as in 16.04.


I'm running a lot of simulations in LT-Spice, and I need someway to run them all either sequentially or at the same time.   I was going to use Python, but I'm not entirely clear on how I would get past the GUI and open the netlists I have and be able to run them all and collect the data I need.  Is there some easier way to run a large ammount of simulations at once?   As an example I have about 25 models that I need to run with various transistor model files that I reference in a library folder that I swap out for every iteration.  I have 4 transistor nominal models that each have different speeds that need to be tested.   Any suggestions would be much appreciated.

I have a battery-powered boost converter and I'm attempting to measure the maximum input (battery) voltage droop under various load conditions of high current draws (different duty-cycles/periodicities) in addition to over several battery types (various voltages/internal resistances).  Since I'm simulating such a (relatively) large amount of operational time the simulation files are getting pretty substantial, not to mention they take a while. I would like to automate LTSpice so that I can change component values programatically and rerun simulations and capture data (values of things like voltage or current).  I know that:   WAV files can be used to input/output data from the program The program can be run from the command line   So far my best option seems to use a combination of these two options along with my own code/script in a fashion that accomplishes my goals, but I just wonder if there is a better way already out there.     Has anyone automated LTSpice or know if there has been any kind of automation   API written for it (either by the manufacturer or by 3rd parties)?   Ideally I would like to have a solver, such that I gave it the desired parameters and it tried various component values until it found the "optimal" solution to my constraints.


I'm looking for a way to find if a number is the sum of 2 perfect squares. given x find if there exists non negative integers a, b, m, n such that:  $a^m + b^n = x$

How to find if a number can be expressed as sum of two perfect powers. That is, given $x$, I have to find if there exists non negative integers $a, b, m, n$ such that $a^m + b^n = x$.


According to Dictionary.com,  and  are two distinct terms that are commonly confused with each other.     Can be confused      abbreviation, acronym, initialism.         Contrastly, Google  as a specific type of abbreviation.     Acronym:      an abbreviation formed from the initial letters of other words and   pronounced as a word (e.g., ASCII, NASA ).         I know that , but there seems to be contradicting information on whether the reverse is true.  There are some acronyms which take longer to say than their original phrase. As  points out, despite being shorter to write, it takes longer to pronounce www (9 syllables) than world wide web (3 syllables).  Are all acronyms a type of abbreviation, even if the abbreviation takes longer to pronounce when spoken?  A  claimed that acronyms and synonyms are both two distinct terms, but does that mean that Google's definition of acronym is incorrect?

TLA is an acronym for "Three Letter Acronym". Is it also an abbreviation, since it abbreviates the original phrase?


I would like to add a . I'm on an Xperia Z2 tablet (so not on a phone, where you can't use restricted profiles) running Android 5.0.2 and I'm the "Owner".  When I go to Settings > Users there is no option Add user or profile, only Add user. When I tap Add user no Restricted profile option is shown:    Also when I tap OK no options regarding restricted profiles are offered.  According to this , it should be possible on the Z2.  I tried adding a PIN screen lock for the Owner account. That did change the information in the alert shown when adding a new user, but that didn't show the restricted profile option.

Can we create restricted user on phone running Android Lollipop? Seems that restricted users are not supported on mobile but only on tablet (mobile has only simple user no restricted user option).  Reference:


I have downloaded several versions of Ubuntu and none are installing on my Windows 8 PC. I have tried with flash drives, CDs and several applications. Can anyone please help? I need these installed ASAP for school purposes.

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


Is it considered safe to use user-defined expressions with std::regex (eg for a server-side search)? Does the standard library make any guarantees about the safety of broken expressions?

Is it possible to detect a valid regular expression with another regular expression?  If so please give example code below.


I have notices that sometimes a single unpopular question eats all user reputation, for users with less reputation, it may lower their reputation so that they can't even downvote or they loss other privilege that based on reputations.  I don't want to link any question here because I think its not appropriate, but I saw some examples in META.  My suggestion is that: allow users to downvote and other basic privilege when they lost reputation because of one question, because questions can't be deleted when had answers, and the principle can be based on previous reputation in some point.  More detail:  USER A get 200 reputation, then he/she can downvote, after this point, if the reputation decreased below 125, allow him to downvote.  Scenario:  User A answered 10 questions and gained 100 point, but asked one question that was unpopular and it causes user to loss all reputations.  In this scenario, the user lost all reputations and now he might not able even to downvote, I see that this is unfair some how, but its also realistic because its all about how this website works.

I wrote a question about blocking certain characters in passwords. It became tremendously unpopular, and it seemed like everyone wanted to rain on my parade every day.  Eventually, I "got it," agreed completely with what people were saying to me, and just wanted to withdraw my question so that my reputation didn't slide even further downhill.  Unfortunately, the system is designed such that I can't withdraw my question or redeem myself. Instead, I just get daily reputation attacks. That's a terrible system, and it needs to be changed.


When I intialize a string:  char pol[100];  and printf it, I get this weird ╠ sign 100 times. My question is how to intialize a string, print it and get only blanks? Thanks!

I have a large array in C (not C++ if that makes a difference). I want to initialize all members of the same value.  I could swear I once knew a simple way to do this. I could use memset() in my case, but isn't there a way to do this that is built right into the C syntax?


I get the following error:   E: Could not get lock /var/lib/dpkg/lock - open (11: Resource  temporarily unavailable)   E: Unable to lock the administration  directory (/var/lib/dpkg/), is another process using it?   every time I try to install new software and then I tried to kill the process. So I typed in the command 'ps -A | grep apt-get' and get no response from it.  How do I get rid of this lock?

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


...but this question:  is still actively collecting answers; has received comments like "This is a spectacularly useful thread. Thanks!"; has not received even a single close vote; yet clearly flies in the face of :     Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.   I think that this particular thread helps a lot of people in the community; I would definitely not want it to be closed. However, I think that if this exact question were asked today (instead of 4 years ago), it would be closed in short order.  I understand perfectly well why this kind of question often leads to undesirable opinion-mongering. However, considering how useful this particular thread itself is, would there be some value in revising the criteria for what can be asked? Perhaps a way could be found to make room for this kind of thread when it actually is a valuable resource for the community? (Note that the  directs that community to SO for questions about programming tools. There appears to be no place in the StackExchange network for this kind of thread.)

I frequently come across a really useful answer on StackOverflow which has been closed because it doesn't match the Q&A format.  Examples include  ,  ,   ,  and there are others.  Where should this information be exchanged if it's not on stackoverflow?  It seems the moderators are often somewhat overzealous...  ---edit  When I say best, I mean they are informative and useful for someone who's looking for an answer to them.  Even if they do become a bit of a discussion, I value other people's opinions on the relative merits of the different JPA frameworks.  I come here looking to choose one and the answer helps me.  So what if it's not a definitive answer?  ---edit  I don't care how popular a question is, nor how interesting it is.  Users are interested in stuff that's useful to them.  Plenty of those were useful (as judged by the upvotes on the answers: 'This answer is useful'), but closed because they didn't have a definitive answer, as far as I can tell.  ---edit  Seems I'm not the first person to think this: there are various similar questions to mine like this one:   In it the user lists lots of other useful questions which have been closed:                    So isn't there a place on stackoverflow for these questions?  A discussion section, maybe?


I just replaced my Macbook for an IMac. I saw that they released Splinter Cell Chaos Theory on Steam, complete with MP :-O . It is only for windows however. Is there a way I can run some sort of program or emulator to play this game? My over all computer knowledge is somewhat limited. You might have to break it down Barney Style. The game should not require  much power to run, it was an XBOX/PS2 game when it came out. Any help with this would be greatly appreciated.

I recently downloaded 'Blood Bowl' on Steam to my Mac, not realizing that it was not Mac-compatible. Is there any software or any way that will allow me to play it, as obviously I've already paid for it? Cheers.


Perhaps I am completely wrong, but as I understand it our observation of a system can affect the outcome.  The example I remember is the double slit experiment where electrons behave as a wave at first, but when observing it behaves as a particle.  The conclusion, as I remember hearing, is that observing the system is what caused the different outcomes.  Why is this that case?  Couldn't it have been the camera (or whatever is used to detect/observe/etc.) that causes the difference?  It just seems like there are a few potential explanations that get skipped over here.  Excuse me while I most likely butcher this experiment with an example.  Say I turn on the sink and water goes from the faucet to the drain.  Now when I hold a cup under the water, it no longer hits the drain, instead it is captured in the cup.  My explanation, having my hand there causes the behavior.  This has bugged me since I first heard it, and I have yet to find an explanation that I can accept.  Given, that may be due to my inability to comprehend some of the more complex explanations, but I would still like to figure it out.

From what I understand, the  states that there is a fundamental natural limit to how accurately we can measure velocity and momentum at the same time. It's not a limit on equipment but just a natural phenomenon.  However, isn't this just an observational limit? There is a definite velocity and momentum, we just don't know it. As in, we can only know so much about the universe, but the universe still has definite characteristics.  Considering this, how do a wide range of quantum mechanical phenomena work? For example, quantum tunneling - its based on the fact that the position of the object is indefinite. But the position is definite, we just don't know it definitely. Or the famous light slot experiment? The creation of more light slots due to uncertainty of the photon's positions?  What I am basically asking is why is a limit on the observer, affecting the phenomenon he is observing? Isn't that equivalent to saying  because we haven't seen Star X, it doesn't exist? It's limiting the definition of the universe to the limits of our observation!