I'm tring to write equivalent for encode("hex") in python3.  Here what i got:  s = "'" print(str(s).encode('hex')) >>27   Tring binascii in Python 2.7:  import binascii  s = "'" print(binascii.hexlify(str(s))) >>27   So in Python 2.7 both methods give same result.  Now i tring to run this code in Python 3.5:  import binascii  s = "'" print(binascii.hexlify(str(s)))  >>Traceback (most recent call last):   File "<stdin>", line 1, in <module> TypeError: a bytes-like object is required, not 'str'    After i tried:  import binascii  s = "'" print(binascii.hexlify(str(s).encode('utf8')))  >>b'27'   But not sure what i have to do next. How to get my 27?

I'm using this code to get standard output from an external program:  >>> from subprocess import * >>> command_stdout = Popen(['ls', '-l'], stdout=PIPE).communicate()[0]   The communicate() method returns an array of bytes:  >>> command_stdout b'total 0\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file1\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file2\n'   However, I'd like to work with the output as a normal Python string. So that I could print it like this:  >>> print(command_stdout) -rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file1 -rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file2   I thought that's what the  method is for, but when I tried it, I got the same byte array again:  >>> binascii.b2a_qp(command_stdout) b'total 0\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file1\n-rw-rw-r-- 1 thomas thomas 0 Mar  3 07:03 file2\n'   How do I convert the bytes value back to string? I mean, using the "batteries" instead of doing it manually. And I'd like it to be OK with Python 3.


how would you evaluate the Riemann Sum of $\int_a^b \frac{1}{x^2} dx$? By the usual method, I arrived at a $x_i^*$ term of $\frac{1}{(a+i)^2}$, but am unsure of how to proceed thereafter. The sample solution provided a hint that $x_i^* = \sqrt{x_{i-1}\ x_i}\in [x_{i-1}, x_{i}]$, and I cannot tell where $\sqrt{x_{i-1}\ x_i}$ came from. Can anyone provide some advice? Thank you very much!

Let $0 < a < b$. Use Riemann sums to compute $$ \int_{a}^{b}x^{-2}\ \mathrm{d}x\ . $$ So far, I have gotten to the step where \begin{align} \int_{a}^{b} x^{-2}\ \mathrm{d}x & = \lim_{n \to \infty}\ \sum_{i = 1}^{n} \left[\left(a + \frac {b - a} {n} \ i\right)^{-2}\left(\frac {b - a} {n}\right)\right] \\[5 mm] & = \lim_{n\to\infty}\left[\frac{b - a}{n}\ \sum_{i = 1}^{n}\left(a + \frac {b - a} {n}\ i\right)^{-2}\ \right]. \end{align} I assume my equation is correct, but I am not sure how to evaluate the sum. I also know how to compute $$ \int_{a}^{b}x^{2} \ \mathrm{d}x\ , $$ but I am not sure how to carry forward the idea (if it is even relevant) to this problem (if it is even relevant). Riemann sums were just covered in my module and I am still trying to get used to it. I would appreciate some help/guidance on this!.


I'm going to start a Stargate marathon where I watch all of SG-1 and Atlantis. I know the 2 series take place roughly in the same timeframe but I am wondering at what points in SG-1 do each seasons of Atlantis takes place.  While I am only asking about when each season of Atlantis takes place in regards to SG-1 if there are key mid-season moments in Atlantis that should be seen before a particular point in SG-1 (ie. the Replicators beginning their attack on the Wraith) then I am interested in these as well.

I am unfamiliar with the (multiple) Stargate shows and films, other than the movie which I saw a while ago. I want to try watching the series to see if it is something that I like.   What are the non-subjective facts about the series (without spoilers) that I should be aware of when figuring out which series to start with, for example the original airing order of the series, chronological order of the series, frequency of references to a series other than the one that I'm watching, etc.


I am trying to install ns2 simulations on ubuntu 18.04.5, But got an error. I was followed this step  E: Unable to locate package ns2

How do I get to the Universe Repository in supported versions of Ubuntu?


Is dielectric capable of storing charge?  I mean if a dielectric is removed out of a charged capacitor will it still have charges stored into it??

If you imagine a dielectric of height $d$ and dielectric constant $\kappa$  placed evenly in a capacitor of height $D$. We define $\Delta x = \frac{D-d}{2}$.   The equivalent capacitance is now  $$\begin{align} \frac{1}{C_{eq}} &= 2 \frac{\Delta x }{\epsilon_0 A} + \frac{d}{\kappa \epsilon_0 A} \\ &= \frac{D-d}{\epsilon_0 A} + \frac{d}{\kappa \epsilon_0 A} \\ &= \frac{\kappa(D-d)+d}{\kappa\epsilon_0 A} \end{align} $$  At this point   $$C_{eq} = \frac{\kappa\epsilon_0 A}{\kappa(D-d)+d}$$  Based on prior knowledge, it should be that the charge on the equivalent capacitor is the same as the charge on the original, non dielectric capacitor  In other words:  $q = CV = C_{eq}V$ and voltage hasn't changed.   But $CV \ne C_{eq}V$!  What am I missing?


Simply list "todo". One click add class "done" second click remove items. Adding form to add new items.  If I add new list item by form, jQuery selector $('li') not see this and does not take into account when changing class.    var $listItems = $('li'); var $list = $('ul'); var $form = $('#newItemForm');  // add item $form.on('submit', function(e){       e.preventDefault();   $('ul').prepend('
' + $('input:text').val() + '
'); });  // set item class as 'done' and remove $('li').on('click', function(){          if ($(this).hasClass('active')){                 $(this)         .insertAfter($listItems.last())         .attr('class','done');             }     else if($(this).hasClass('done')){         $(this).remove();             } }); .active {background-color:red; color:#fff;} ul{ -webkit-padding-start: 0px; margin-bottom:15px;} ul li {margin-top:3px; list-style:none; line-height:35px; padding:0px 5px; border: 1px solid #808080; background-color: red;} .done {background-color: green;} body{width:250px; margin:0px auto;}

milk

cabbage

cucumber  bonus

honey

lemon

          <form id="newItemForm">     <input type="text" id="itemDescription" placeholder="Add name..." />     <input type="submit" id="addButton" value="Add" /> </form>

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.


The mods at English Usage are intent on undeleting bad answers, even though I've retracted them. In trying to prune, they give suspensions. What are the rules on that? It's literally only a handful of answers, and of course the accepted answers remain untouched.

According to , the only restriction on self-deleting an answer is that you can't delete an answer that's been accepted.  But I've also heard of users getting in trouble for deleting (non-accepted) answers, and there's the CC-SA license to consider, so -- quite aside from what is technically possible -- my question is when it's permitted to delete your own answer.  Some cases to consider:   You now believe the answer is incorrect. Your answer is correct, but another answer covers the same territory better. You aren't satisfied with the quality/rigor of your answer, e.g. it's speculative and you didn't back it up (on a site that expects that). Something in the answer embarrasses you and you'd rather just make it go away. Your answer wasn't well-received by the community (whether that's "meh" or "make the rep bleeding stop please"). (I'm sure there are others; this isn't meant to be an exhaustive list.)   Does voting matter, either in absolute terms or in comparison to other answers?  For example, maybe it's ok to delete a lower-voted one but not the top-voted answer, or one with score > N??  There is a badge, Disciplined, for deleting your own post of score 3 or higher.  This tells me that it's sometimes ok to delete upvoted answers.  But I'm not sure how much policy we can infer from badges.  Could we have some clarification please?


I can show a hash code like this :              string str = "Hello World !";         MessageBox.Show(str.GetHashCode().ToString());   This is very simple , Message box return hash code of "Hello World !" . But I want to know when I use a code Like this :              MessageBox.Show(GetHashCode().ToString());   What will happen in this code ?! It give me a code like this "64923656" . if I run my application again it give me another code !!! Is it a random hash code ?! or this is a special word hash code ?!  Thank u for read .

Given the following class  public class Foo {     public int FooId { get; set; }     public string FooName { get; set; }      public override bool Equals(object obj)     {         Foo fooItem = obj as Foo;          if (fooItem == null)          {            return false;         }          return fooItem.FooId == this.FooId;     }      public override int GetHashCode()     {         // Which is preferred?          return base.GetHashCode();          //return this.FooId.GetHashCode();     } }   I have overridden the Equals method because Foo represent a row for the Foos table.  Which is the preferred method for overriding the GetHashCode?  Why is it important to override GetHashCode?


I know what a regression line is.    What I'm curious about is the use of the word "regression".  What's regressive about a regression line?   The etymology of  is      early 15c., from Latin regressionem (nominative regressio) "a going back, a return," noun of action from past participle stem of regredi).   So, how is a regression line a "going back, a return"?

I was just wondering why regression problems are called "regression" problems. What is the story behind the name?      One definition for regression:   "Relapse to a less perfect or   developed state."


Here's my sample code :   \documentclass[a4paper,12pt]{article} \usepackage{amsmath} \begin{document} \pagenumbering{roman} \section*{Problem 1} Given that : \\ $$ x \epsilon \mathbb{R} (3,2) $$ \end{document}   I get the following compilation error when using overleaf :  Undefined control sequence. l.19 $$ x \epsilon \mathbb                           {R} (3,2) $$   How could I fix this ?

I am using WinEdt 6 for compiling my TeX documents. I am getting an error with contains the line $\mathbb{Z}$ showing that it is undefined control sequence. How should I rectify it? Should I include any math packages or something. I am a beginner in using TeX.


How can I store emoji from TextMesh pro in a database using the WWW class to post the string containing the emoji as a parameter in the URL?  I'm having a problem getting the emoji from a TextMesh Pro text field into my database. When I try, the emoji data is stored in plain text like this: ðŸ˜‚ or like this � or like this □ depending on which encoding i try.  I have a php script that uses a sql statement to store the text in my mysql database. And when I manually type the url of the php script in my browser and add the emoji as a parameter it works perfectly fine, it properly stores the emoji (as I have already set the collation of my database to utf8mb4).  Here's the part I don't understand: if I take the string that contains the emoji through my c# code and access the php file with the string as a parameter, it doesn't work. It stores the emojis as . (ðŸ˜‚ this sequence of characters should be this: 😂).   It stores the text just fine otherwise, so there's no problem with the code below. Here's how it looks:  public IEnumerator UpdateChatCR(string gameID, string text) {     string hash = Md5Sum(gameID + secretKey);      print("posting to chat db: " + text);      string post_url = updateChatURL + "&game_id=" + gameID + "&text=" + text + "&hash=" + hash;     WWW www = new WWW("http://" + post_url);     yield return www;      if (www.error != null)     {         print("There was an error updating the chat in the DB: " + www.error);     }     else     {         //print(www.text);     } }   I have tried different ways of encoding the text, but to be honest I have no idea what I'm doing at this point. I tried different variations of the following code, but with no luck:   byte[] bytes = Encoding.UTF8.GetBytes(tmpField.text); string encodedText = Encoding.Default.GetString(bytes);     I've been searching for an answer for the last few days. And I've come to the point where I realize I probably have to read a book about encoding and emoji unless there's someone out there who can help me out...   Thank you for your time.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I've checked other solutions to similar sounding problems but to no avail. I installed Ubuntu 14.04.3 LTS last night, experienced no problems with wireless, today, it was fine in the morning, suddenly, no internet. The wireless was still connected to my home network but  ping www.google.com   gave unknown host. If I reboot the laptop, I get an internet connection for a bit and then it dies again.   On a perhaps unrelated note, I booted up the laptop, did some local stuff, put it to sleep, woke it again later and the internet was still fine. As soon as I opened a browser to do some work it suddenly stopped working again. I just don't understand why it connects, works, and then suddenly drops. Any ideas?

I have an OpenVPN config that I use on my Windows XP box and on my Ubuntu machine.  When I use it with my Windows machine, I can connect to the VPN and access sites on the VPN, and the internet as normal. When I use it on my Ubuntu box, when connected to the VPN, I can only access internal sites - No internet access at all.  I'm sure there is a way to configure OpenVPN on Ubuntu to allow internet connections, but I can't figure out how.


I get an error A "NullPointerException" could be thrown; "entity" is nullable here. below is a sample of my code.  NewResponse newResponse = new NewResponse(); if(entity.getName() != null){         GetDetails response = crossService             .getDetails(entity.getName());          response.setHumanName(response.getFullName());         }   Is there a way that I can fix null pointer dereference?

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


I've got a '70s road bike with shift cables which work quite well and so I see no immediate reason to replace them, but the cable ends were not crimped with end caps and so they've frayed out to ridiculous levels. However, I can't just cut off the frayed end and re-crimp it because then my cables would be too short; Is there any way for me to "save" these cables and avoid having to re-cable the bike? Is there no way to "de-fray" the ends even if it doesn't leave them in "pre-frayed" condition?

I was adjusting the tension of my front derailleur cable and managed to pop off the cable end cap. The cable is now quite frayed at the end and I think it would be difficult to attach another cap.  What would work as a suitable replacement for a cap? I've read that perhaps superglue or duct tape could work?


For example, implement INotifyPropertyChanged interface:  public event PropertyChangedEventHandler PropertyChanged;  private void OnPropertyChanged([CallerMemberName] string propertyName = null) {     var handler = PropertyChanged;     if (handler != null)         handler.Invoke(this, new PropertyChangedEventArgs(propertyName)); }   Two things:   Copy event to local variable to prevent errors with multithreading ( are some examples). Resharper gives notification, if you don't copy to local variable:         Check it for null, to prevent NullReferenceException   But now, we can use ?. operator for null-checking. And if I use it, Resharper is idle:   So, question is: should I copy event ProperyChanged to local variable, if I use null-conditional operator?

Something that confuses me, but has never caused any problems... the recommended way to dispatch an event is as follows:  public event EventHandler SomeEvent; ... {     ....     if(SomeEvent!=null)SomeEvent(); }   In a multi-threaded environment, how does this code guarantee that another thread will not alter the invocation list of SomeEvent between the check for null and the invocation of the event?


How do I solve: $$ e^{4z}+e^{3z}+e^{2z}+e^z+1=0 $$  I'm getting lost on where to start. I tried using the definition $$ e^z=e^x(\cos(y) +i\sin(y))  $$  But that doesn't seem to do me any good. I also tried using complex powers, but I seem to just be going in circles. Any suggestions?

Solve $$e^{4z} +e^{3z} + e^{2z} + e^z  + 1 = 0.$$  I have attempted this problem with the usual definition by writing $z=x+iy$ and using $e^z = e^x(\cos y + i \sin y)$ but got a large unsolvable mess. Is there something I'm missing?


I use codeblock for compilation.  code:  int main(){ int l=pow(10,2); cout<<l; return 0; }   OUTPUT-99  int main(){ int l=pow(10,3); cout<<l; return 0; }   OUTPUT-1000

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


I will be speaking at a conference in the USA soon, where I will receive a fee and reimbursement for my travel expenses. The conference will not be held by a University, but by a private company. I have a German passport and I am currently residing in Germany. Am I eligible for the Visa Waiver Program?

I'm a British Citizen. I've spoken at business conferences in the past in the US, but haven't been paid for speaking. This is acceptable under the Visa Waiver Program.  Let's say that one day I am offered the opportunity to be paid a fee for speaking, over and above the incidental costs of travel/hotel.  A B-1 business visa doesn't cover it, it appears. So what is actually required?  On reading up about this, it's fine to be paid US$8,000 for speaking  from a VWP country; I'm a bit confused by the outcome of this story.


On Linux, I want to send a command string (i.e. some data) to a serial port (containing control characters), and listen to the response (which also usually might contain control characters).   How can I do this as simplest as possible on Linux? An example is appreciated!

On a Gentoo Linux machine, a process is communicating with another computer via serial port (/dev/ttyS1). I want to listen to this communication (i.e. what is being sent/received by the process) without further interfering.   How can I achieve this with just basic Linux tools? I even can change the serial port the process is communicating with, so maybe I can 'shortcut' two devices (/dev/ttyS1 and /dev/xxx) listen to all communication, when all output to /dev/ttyS1 is forwarded to /dev/xxx and vice versa. But how do I do it? Something with socat?


I have an application which is hosted on a subdomain URL of my client's primary domain. Below is the example of how my primary domain is and how the subdomain is:   Primary domain: example.com  Subdomain: replacephone-carriername.example.com   Now please help me understand below points:   Does my Primary Domain becomes my subdomain's competitor? The carrier for which my client has created the application, has all the details of replacephone program and also this new application URL is linked into this carrier's main portal, and because of this, the carrier URL also becomes my subdomain URLs competitor, because we both are fighting for keyword say "replacephone-carriername" for different URLs.   Please advice me to encounter above 2 challenges.

If I have example.com, and blog.example.com, do search engines see those as one site or two? Will using subdomains hurt SEO? I have some technical reasons why I can't use example.com/blog.


I am trying to find alternative symbology for GIS maps and web apps I occasionally produce. Esri has done a great job collecting and categorizing thousands of symbols, markers, line and polygon styles. For instance, here one can find . They are available as  here, too. I have also seen a great resource page on  with lots of additional styles. Quite many links on symbology standards , too.   I am however looking for any good resources with symbology that can be not necessary related to mapping/physical geography, but rather something that describes world around us. The one I liked really much is available , which is part of this . I fully understand that there are plenty of resources like . Any other website worth visiting when looking for icons for map symbols?

When a user clicks on a map what should they expect to see?   I would say a symbol for where they clicked.  A pushpin seems to be the most accepted icon for generic data. Google has pushed the upside down tear drop.   What are other ideas/options and is there a place for finding professional gis oriented icon packs?  I ended up creating this,     This just popped up from the guys at map box. Clean


I have seen many posts saying an interface is bounded by a contract which specifies the way in which it's methods should be implemented. But couldn't get what is meant by that. Could you please explain?

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


This is my js. now , when the date is february 28, the 7th day will be 35. how can I fix my js code? I want to display the exact date from now up to 7th day.    //Get Upcoming Bookings Current Date getUpcomingBookingsCurrenDate = () => {   let currentDate = Date.now();   let day = new Date(currentDate).getDate();   let day2 = day + 1;   let day3 = day + 2;   let day4 = day + 3;   let day5 = day + 4;   let day6 = day + 5;   let day7 = day + 6;   document.getElementById('day1').innerHTML = day;   document.getElementById('day2').innerHTML = day2;   document.getElementById('day3').innerHTML = day3;   document.getElementById('day4').innerHTML = day4;   document.getElementById('day5').innerHTML = day5;   document.getElementById('day6').innerHTML = day6;   document.getElementById('day7').innerHTML = day7; } getUpcomingBookingsCurrenDate(); First 7 date from today

How to add days to current Date using JavaScript. Does JavaScript have a built in function like .Net's AddDay?


I'm using Ubuntu 18.04.5 LTS on my Laptop ASUS ZenBook UX433FN with NVIDIA MX150, when watching videos with VLC the bottom of the screen always flicker, how to fix this issue?

As i am playing avi videos on my newly installed Xubuntu i observe video flickering because of which i do not get optimal user experience while watching videos. I have tried multiple players as well as multiple videos but the problem persists. The flickering doesnt exist when i am playing my video on win 7.   info driver:- amd radeon 4500 propriety driver activated players tried:- mplayer, vlc


I need to switch those colors for paint code - ral  BLUE（C:80  M:70 Y:50 K:20）  GREEN（C:50  M:0 Y:100 K:0）  can anybody help ?

A client needs to produce a large logo for their front office and the production company requires us to convert the CMYK 40,48,77,17 to RAL or Pantone. I have never been faced with such a request and not sure how to approach this correctly? The logo is black text + an icon in this single CMYK code (flat color). thanks


I was just going through some book and found a word "computers" used as a class (like computer class). But in my generation, we called it a computer class, never "computers." Can anyone tell me what English speaking countries use this expression?

Sorry for the title, it is not very evident and intuitive but I really do not how to tell it better...  Well, you know, several times, or better, many times, we use this form:  If I want to say:      "development of special weapons was   the first point in Hitler's   program..."   I will say this (a better form):      "special weapon development was..."   OK...  is it      "special weapon development"   or      "special weapons development" (note   the plural...)   what's the grammar rule in order to understand how to use this very used form?


i am trying to sed and change something from a json file and i am getting this error.  prajwal  sed -i 's/{"telephone_numbers":\["1-/{"telephone_numbers":["+1-/g' output.json sed: regex input buffer length larger than INT_MAX

Oh, hi; So I've got this big json file and I'm trying to find and replace a few things but when I've used sed I get an error and I need a sed or awk string to find and replace it, without getting an error.  prajwal  Current: {"telephone_numbers":["1-  Future: {"telephone_numbers":["+1-  This is the command i tried and the error i got. sed -i 's/{"telephone_numbers":["1-/{"telephone_numbers":["+1-/g' output.json sed: -e expression #1, char 56: unterminated `s' command


On the question , if you sort by "votes" or "active", the accepted answer (with the green checkmark) is not the top answer. (At least, this is what I am seeing in my browser.)  This is the only place I've seen this happen, and it seems to go against the standard for Stack Overflow.  Is this a bug?  If not, what is going on?

I just recognised that an accepted answer does not always appear at the top of the other answers (for example ) Sometimes it does, but if I reload the page the two answers change their positions and the accepted answer is at the bottom.


Currently I updated my OS to 19.04 Disco Dingo, but every time I try to do a   sudo apt-get update   I get the following error:  E: The repository 'http://ppa.launchpad.net/webupd8team/atom/ubuntu disco Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   What is the reason for this and how can I fix it.

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


Or do I need another technology?  I need to build a web gis server and I need map display, layers switch, search function and attribute display feature.   I am currently using GeoServer, OpenLayers and GeoExt.

I want to start working on a web map at work to map some of our statistics by city.    I have an idea, but I'm not exactly sure where to start.   Are there any definitive resources that provide step by step guidance on how to do this?


The only way I know to upgrade the snap app is to type sudo snap refresh APP_NAME.  Can I do it without typing the app's name just like how apt does?

I know that I can update a snap package using  sudo snap refresh <package>   But is there a way to update all snaps, like   sudo apt dist-upgrade


Superman's powers come from being near a yellow sun as opposed to the red sun of krypton. Occasionally Superman will travel to other planets/off-world to help some other cause or force.  I'm curious, has any writer had the man of steel utilize the radiation from another different colored (blue, white etc) sun for his powers? Do hotter stars have similar affects, or are Kryptonian powers only activated by yellow suns?

With the Superman lore, we know that light from a yellow star gives him his powers, light from blue stars makes him stronger, and light from red stars weakens him.  However, what happens if he is near a white dwarf, or a neutron star?  Has there been any evidence of Superman visiting a star system that wasn't red/yellow/blue?


Does anyone know how to prove (or a reference for) the following identity for positive integers $r$: $$\sum_{i=0}^r (-1)^i{r\choose i}\frac{1}{ir+1}= \frac{\Gamma(1+1/r)\Gamma(r+1)}{\Gamma(r+1+1/r)}$$

Can I simplify or approximate this equation without sigma and combination?  \begin{align} \sum_{i = 0}^n (-1)^i {n \choose i} \frac{{d+1}}{d(di + 1)} \end{align}


Context: "As this story is about my experiences as an ordinary prisoner, it is important that I mention, not without pride, that I was not employed as a psychiatrist in camp, or even as a doctor, except for the last few weeks."  Does this mean he felt pride, he felt shameful, or something else?  Thanks!

I read it in an article and I don't understand the meaning of it. "not without some merit". From the context I guess the meaning is: there is some sense in it. However I don't find in the dictionary (vocabulary.com or thefreedictionary.com) an explanation that apt my understanding.  Nor I've found an expression with "merit" that can explain it.  The article is here:


I have such error messages while compiling my (simple) code:  ||=== Build: Release in zad12 (compiler: GNU GCC Compiler) ===| obj/Release/Section.o||In function `MyFigures::Section::Section()':| Section.cpp|| undefined reference to `vtable for MyFigures::Figure'| obj/Release/Section.o||In function `MyFigures::Section::Section(Point, Point)':| Section.cpp|| undefined reference to `vtable for MyFigures::Figure'| obj/Release/Section.o||In function `MyFigures::Section::~Section()':| Section.cpp|| undefined reference to `vtable for MyFigures::Figure'| Section.cpp|| undefined reference to `vtable for MyFigures::Figure'| obj/Release/Section.o:(.rodata._ZTIN10MyFigures7SectionE[_ZTIN10MyFigures7SectionE]+0x10)||undefined reference to `typeinfo for MyFigures::Figure'| ||=== Build failed: 5 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|   And the code:  #ifndef _FIGURE_H_ #define _FIGURE_H_  namespace MyFigures { class Figure {     public:          Figure(){}          ~Figure(){}          virtual void draw();         virtual void move();         virtual void scale(double s); }; } #endif  #ifndef _Section_H_ #define _Section_H_  #include "figure.h" #include "point.h" #include <exception>  namespace MyFigures {  class Section : public Figure { public:     class badsection : public std::exception     {     public:         const char * what() const throw()         {             return "error";         }     };      Section();     Section(Point start, Point end);     void draw();     void move();     void scale(double s);     ~Section();  private:      Point start;     Point end; };  }  #endif  #include "section.h"  namespace MyFigures {  Section::Section() { }  Section::Section(Point start, Point end) {     if(start == end)         throw badsection(); }  void Section::draw() {} void Section::move() {} void Section::scale(double s) {} Section::~Section() {}  }  #ifndef _Point_H_ #define _Point_H_  class Point {     private:          double x,y;      public:          Point();         ~Point();         Point(double xx);         Point(double xx, double yy);          Point& operator=(const Point& p);         bool operator==(const Point& p);  };  #endif  #include "point.h"  Point::Point() {     x = 0;     y = 0; }  Point::Point(double xx) {     x = xx;     y = 0; }  Point::Point(double xx=0, double yy=0) {     x = xx;     y = yy; }  Point::~Point() { }  Point& Point::operator=(const Point& p) {     x = p.x;     y = p.y;     return *this; }  bool Point::operator==(const Point& p) {     return (x == p.x) && (y == p.y); }   I tried to make the destructor in Figure class as virtual, but no effect (errors remain).

I just ran across the following error (and found the solution online, but it's not present in Stack Overflow):     (.gnu.linkonce.[stuff]): undefined   reference to [method] [object   file]:(.gnu.linkonce.[stuff]):   undefined reference to `typeinfo for   [classname]'   Why might one get one of these "undefined reference to typeinfo" linker errors?  (Bonus points if you can explain what's going on behind the scenes.)


I once tried to stick a Sticky Bomb on other player's personal vehicle when the player was away for shopping for guns in Ammu-Nation. When he got back on his ride, BOOM!  But a message pops up on the left top of the screen said,      Blowing Up other player's Personal Vehicle is considered as "Bad Sport"   Why? Will I get any penalty?

I received an in-game notification saying, "If you are a 'Good Sport' you will receive periodic rewards".  (see picture below)    How do I become a 'Good Sport & what rewards can I receive?  How often will I receive rewards?  I did get a notification when I accidentally blew up someone else's car, saying [something along the lines of]: "You blew up someones car.  You are a Poor Sport."  I also saw an in-game message that mentioned [something like] "If you are a Poor sport, you will play with other poor sports"


Polynomials of degree larger than 4 with integer coefficients may have non-algebraic solutions, that is, zeros that do not have an  (over the integers).  How likely is this to happen?  For example, of the $(2M+1)^{n}$ polynomials of degree less than or equal to $n\geq 5$ with coefficients in $\{-M,\dots,M\}$, what is the asymptotic behavior, as $M\to\infty$, of the proportion of those polynomials with no/at least one/only algebraic solutions?

A  asked about the topological density of solvable monic quintics with rational coefficients in the space of all monic quintics with rational coefficients. Robert Israel gave a nice proof that both solvable and unsolvable quintics are dense in $\Bbb Q^5$. A natural (non-topological) way to ask about the relative density of solvable quintics in all quintics is to ask about their natural density, as follows:  Write our quintics as $x^5+a_0x^4 + \dots + a_4$, with $a_i \in \Bbb Z$. Write $$f(N) := \frac{\text{# of solvable quintics with } |a_i| < N}{(2N+1)^5}.$$ Robert Israel's answer to the linked question gives some data that supports our intuition that yes, the solvable quintics are in fact extremely rare. Do we indeed have $\lim_{N \to \infty} f(N) = 0$? Are there known nice asymptotics for $f(N)$?


I have installed the Plasma 5.6 desktop over Unity to give a try, but I don't really like it and I want to completely remove  Plasma 5.6 and restore Unity.

I have 2 computers with Ubuntu but on both I installed KDE to have another option for the users. Since Unity has come along very well, there has not been a need to use KDE for a while now. How can I delete all KDE related packages with one single sweep, freeing space and anything KDE related in Ubuntu, including overwriting the Logo of ubuntu when the PCs start or shutdown since after installing KDE the Kubuntu logo is the default one. How to revert back completely from all KDE stuff with a simple short command line or GUI tool.  NOTE - I ask this because it is very time consuming to start selecting, one by one, each package that relates to the KDE desktop environment, checking if it also relates to any GTK, checking dependencies for each, etc.. Deleting the package kubuntu-desktop does not remove every installed KDE package that was installed with it since this is a pseudo package that installs the rest of the real packages but does not uninstall them which makes me wonder why a package can install a whole bunch of other packages but not uninstall them with some added option to actually uninstall them not just the dummy package itself.


My door bell transformer is on an outside wall in my ceiling. I want to know if I can put the whole thing with the wire behind the drywall?  Concerned about it over heating.

Can a doorbell transformer that is on the outside of a wall be place inside the wall behind the drywall. I’m concerned about it getting too hot. Mine is in the kitchen by the ceiling lights


I don't understand why I see these edges when rendering my model. They don't appear in object mode, but when I render.       And the topology seems dense enough to not produce these edges?  Here are some images of the topology and lighting, which is only an hdri of a photo studio:

I've been modeling a hermit crab and I don't know why but some areas of the mesh are really dark on some spots, like the legs and the claws.   I hope you can help me fix it.


I am using Ubuntu 14.04 and after installing a few programs when restarting the machine, the system hangs, I get login, but only the wallpaper appears

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.iot.maptesting, PID: 11741     java.lang.RuntimeException: Unable to start activity ComponentInfo{com.iot.maptesting/com.iot.maptesting.MapsActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.MapFragment.getMapAsync(com.google.android.gms.maps.OnMapReadyCallback)' on a null object reference         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2913)         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)         at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)         at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)         at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)         at android.os.Handler.dispatchMessage(Handler.java:106)         at android.os.Looper.loop(Looper.java:193)         at android.app.ActivityThread.main(ActivityThread.java:6669)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)      Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.maps.MapFragment.getMapAsync(com.google.android.gms.maps.OnMapReadyCallback)' on a null object reference         at com.iot.maptesting.MapsActivity.onCreate(MapsActivity.java:39)         at android.app.Activity.performCreate(Activity.java:7136)         at android.app.Activity.performCreate(Activity.java:7127)         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)          at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)          at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)          at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)          at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)          at android.os.Handler.dispatchMessage(Handler.java:106)          at android.os.Looper.loop(Looper.java:193)          at android.app.ActivityThread.main(ActivityThread.java:6669)          at java.lang.reflect.Method.invoke(Native Method)          at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)          at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

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?


"A  is a platform for conducting rigorous, transparent, and replicable testing of scientific theories, computational tools, and new technologies" (Wikipedia).  While Wikipedia seems to prefer "testbed",  and   prefer "test bed". I have seen "testbed" predominantly in the scientific literature I have been reading. Should I mirror the literature or add the additional space?  I have read this great  which focuses mostly on hyphenation usage. Rather I am looking for guidelines for open versus closed forms. Most of the answers address this indirectly, giving descriptive rather than prescriptive answers. Many answers also allude to the differing standards of hyphenations in different contexts.

Some compound words are written without hyphens (nonaggression, nonbeliever), some with hyphens (well-intentioned), and others with spaces (post office).  Is there a rule or good guide as to which option should be used?


I have a folder with couple hundred figures (and only figures in there): How can I import all of them into my tex-file without knowing the filename in a code like \includegraphics{filename} (working with LuaLaTeX?  I would like to have the filename as caption.  General MWE:  \documentclass{article} \usepackage{graphicx,caption} %folder for the figures is `/figures/`  \begin{document} %repeat from here for each file in folder `figures` \begin{figure}[!htb] \includegraphics[scale=1]{figures/`filename`} \caption{`filename`} \end{figure} \end{document}

I have a set of pictures in my working directory and I want to make a PDF report using these images. I want to include all of them, but the number of the pictures changes in each case. I would like to make a "for" loop to insert each picture one after the other sequentially. Can anyone help me? At the moment the code I have is the following:   \begin{figure}[h!] \begin{centering} \includegraphics[width=10cm,height=10cm]{Figure1.png} \caption[Sèries temporals de vent i direccions]{Sèries temporals velocitat de vent i     direccions. filtratge de pics i glaçades de velocitat.} \label{Serie} \end{centering}  \end{figure}   I would like to do it for every .png image in the directory. Thanks for your questions: I am using Windows 7 and the file names follow the pattern Figura1.png, Figura2.png and so forth. So which of these possibilities would fit best?


How can I introduce, as embedded subsets, the fonts: Symbol, Times-Bold,Times-Roman, TimesNewRomanPSMT-Bold, TimesNewRomanPSMT-Bolditalic in Plain TeX, under Ubuntu?

I just ran into the problem of embedding fonts while trying to publish with lulu.com. Although everyone apparently is 'supposed' to handle those 35 standard fonts for some strange reason they won't accept pdf's without them included. So one way that according to  is supposed to work (I haven't tried yet, but hopefully it does work) is to convert the pdf to ps and then back to pdf and include the fonts at that time:  pdftops file.pdf ps2pdf14 -dPDFSETTINGS=/prepress file.ps   But this feels at least to me like the wrong way of doing things. Is there some way of passing the parameter directly to pdflatex to tell it to embed those fonts?   And, if not -- How do we go about getting such a feature? (Because it can't only be me who has this sort of problems)


How can I change height of line break in math mode? I need to add more space between each two lines of the equation.  \begin{gather*}     EFF_a = \sum_{j=0}^{2} (\frac{ \sum_{i=1}^{4} (EFF_{{a_j}_i} = {\{ p_i; q_i}\}  \rightarrow p_i \cdot q_i)}{ \sum_{i=1}^{4} q_i } \cdot W_{EFF_{a_j})} =     \\ = \frac{1 \cdot 15 + 2 \cdot 15 + (-1) \cdot 2}{15+15+2} \cdot 0.5 + \frac{1 \cdot 314 + 2 \cdot 101 + (-1) \cdot 33 + (-2) \cdot 4}{314+101+33+4} \cdot 0.4 +     \\ + \frac{1 \cdot 23 + (-1) \cdot 33 }{23+33} \cdot 0.1 = 1.0743718394437423 \end{gather*}   This produces:

Is there a way to consistently increase the vertical spacing between equation lines in a gather (or gather*) environment from amsmath?  Specifically, I want to produce something like  \begin{gather*} a = b \\[2ex] c = d \\[2ex] e = f \end{gather*}   without having to write [2ex] at the end of each equation line.  I can think of some hacks that redefine \\ to automatically add the spacing, but is there some cleaner/better way to achieve this?


Please I have some couple of 3.6v 3Ah cylindrical li-ion battery, but since I bought them, charging it became a huge problem. I first connected a single one to a 2A infinix phone charger (made in china. According to the ratings, it capable of adjusting output current and voltage to load)thinking that if it's capable of charging a 4Ah infinix phone battery then a 3Ah shouldn't be a problem. Until I connected the battery directly to the charger output, after some time, i measured the output voltage of both the battery and the charger, the battery was not charging and the charger decreased it output voltage from 5v to 2v and was also giving me an unusual jolt in my finger. I concluded that the charger has damage. I tried it again with a similar charger, but this time a TECNO phone charger, but the same result. I then found another SMPS charger 12v, 1.2A. In my desperation, I ignorantly implemented a '7805' regulator ic to drop the voltage to 5v(since using a smps to regulate a smps sounds absurd). When I connected the battery, I measured the charging current, and I was so surpries to see 2A.From a 1.2A(short circuit current) SMPS. So please where did I went wrong and how can I charge my batteries before it damage.

I just started studying about batteries and battery chargers. I have this simple query so please help me out.  I am trying to charge my 3000mah li-ion battery. The battery voltage is around 3.6v and the charger regulates the 5v from the source to 4.2v. I connect the battery to the charger. Now what is the voltage at the output should I expect? Shouldn't the output voltage be at 4.2v so that the battery gradually charges to 4.2v ? I ask this because I am using Bq2057 IC and once I connect to the battery to the charger the output voltage is dropping to 3.63v.  My assumptions were, 1. I considered the charger as voltage source 2. Battery also as a voltage source  I experimented this buy connecting two DC voltage sources(5 and 3.3v) in parallel and measured the voltage at the node and it was 5v. So I was expecting the charger output to be 4.2v even when I connected my battery to it.    Thanks


since I am new to this society but I a using Ubuntu for last one and a half year.I was not facing any problems because it is best. My problem is that how to get g++ packages install in my computer in an offline way for 14.04 LTS version because I do not have any internet connections.Thank you to all the respected one's and thank you for making me as one of your family member.

I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily?


I have some code
   some content
   I want to prepend this with some content  $( "#wrapper" ).prepend( "" );   however I don't want it to prepend if the img is already there.  I can't do something like checking how long the wrapper div is because it's content comes from a database and is of variable length.

How can I check the existence of an element in jQuery?  The current code that I have is this:  if ($(selector).length > 0) {     // Do something }   Is there a more elegant way to approach this? Perhaps a plugin or a function?


So let's say this is inside a .ini file:  [general] Something = 1 Somethingelse = 5  Inside the form are 3 things: 2 textboxes and one button. When i open the form it should load the ini file and make textbox1 to be equal to Something (1 in the example) and Textbox2 should be equal to Somethingelse (which is 5) And when i click the button it should save the changes (so if i changed Textbox1 to "2", it should change "something = 1" to "something = 2" inside the .ini file). I'm sorry for my bad english, Linuxfreak23

Is there any class in the .NET framework that can read/write standard .ini files:  [Section] <keyname>=<value> ...   Delphi has the TIniFile component and I want to know if there is anything similar for C#?


I am getting an error while trying to invoke an apex method which accepts a list as parameter  from custom button using javascript  Error:     faultString "No operation available for request   {}checkAccess,   please check the WSDL for the service."   below is my apex class:  global class PSS_deleteMilestoneAccessCheck {     public static void checkAccess(list<PSS_Milestone__c> idsForDeletion){     } }   This is my javascript:  {!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}  {!REQUIRESCRIPT("/soap/ajax/29.0/apex.js")} try{      if({!$Permission.Can_Delete_Pss}){         var pssOpportunity ='{!ParentObject__c.Id}';           if(pssOpportunity!=null && pssOpportunity!=''){                  var result = sforce.connection.query("Select ID From ChildObject__c Where ParentObject__c = '{!ParentObject__c.Id}'", {                   onSuccess : success,                   onFailure : failure                 });          }     } } catch(err) {      alert('Something wrong happened');  }  function success(result) {     var records = result.getArray("records");     var idsForDeletion = [];      for (var i=0; i<records.length; i++) {         idsForDeletion.push(records[i].Id);     }      if(idsForDeletion.length != 0){                 sforce.apex.execute("PSS_deleteMilestoneAccessCheck","checkAccess", {idsForDeletion: idsForDeletion});         window.location.reload();      } }  function failure(error) {     console.log(error); }   I believe I am getting an error because of sforce.apex.execute("PSS_deleteMilestoneAccessCheck","checkAccess", {idsForDeletion: idsForDeletion});.Code works just fine if I remove this line.

I have a javascript button on my product layout named "ListToEbay" and I have written a controller to invoke the EndItem()  service method of ebay api.  Below is the method:--  public void  removeItemFromEbayList() {   HttpRequest req = new HttpRequest();   Http http = new Http();   sEnvelopHandlerForEndingList='Request XML';   req.setBody(sEnvelopHandlerForEndingList); }   I want to execute this method directly on clicking that button, without going or opening a VisualForce Page. How can I accomplish that?


Does anyone know how to export shaders or materials from Blender to Unity? Any help is appreciated Thank you

I have been experiencing an issue that once I have a material created and looking the way I want it, I cannot seem to export it correctly with the textures mixed.  I don't know the correct words to use, but in blender I have the material created using the nodes editor, and I have placed two textures inside of there (one for the rock texture and one for moss, my object is a rock). When I export this model and import to Unity (the game engine I am using), I find a materials folder but the material inside of it does not have the textures assigned, it's just a plain white material?  How can I export my material from blender in a way that it will allow me to import it WITH TEXTURES into Unity?


I am trying to solve the following question: Let $A$ be the set of rational numbers in $[0,1]$ and let $\{I_n\}$ be a finite collection of open intervals covering A. Show that $\sum l(I_n) \geq 1$ I'm not really sure what the question is getting at. I feel like it has to do something with the density of the rationals in Q making it impossible for the $I_n$s to be disjoint, but I don't know how to get there

I have the following homework problem:  Let $B$ be the set of rational numbers in the interval $[0,1]$, and let $\{I_k\}_{k=1}^n$ be a finite collection of open intervals that covers $B$. Prove that $\sum_{k=1}^n m^*(I_k) \geq 1$.    This is my approach, First we have that $B = \mathbb{Q}\cap [0,1]$. Now, $B \subset \bigcup_{k=1}^nI_k$, where $I_k$ are open intervals.In particular $0 \in B \wedge 1 \in B$.Now, since $B \subset \bigcup_{k=1}^nI_k$ then there exist positive numbers, $\epsilon_0, \epsilon_1$ such that: $$(0-\epsilon_0,0+\epsilon_0)\subset \bigcup_{k=1}^nI_k$$ $$(1-\epsilon_0,1+\epsilon_0)\subset \bigcup_{k=1}^nI_k.$$   Clearly, $-e_0 \notin [0,1]$ and $e_1 \notin [0,1]$.I am not sure, if so far I am in the right track.


Let $a$ be an algebraic integer of degree $n$ and $K$ is the number field $\mathbb{Q}(a)$ with $\mathcal{O}_K$ as its ring of integers. Let $\sigma_1,\dots,\sigma_n$ be the embeddings of $K$. I want to show (or disprove) that given $M>0$, the set of $x\in\mathcal{O}_K$ such that $|\sigma_i(x)|\leq M$ for all $i$ is finite. I thought of using the norm of $x$ but I am stuck.

Let $K$ be a number field, with ring of integers $\mathcal{O}_k$.  For $x\in \mathcal{O}_K$, let $f(x) = |N_{K/\mathbb{Q}}(x)|$, the (usual) absolute value of the norm of $x$ over $\mathbb{Q}$.  Dirichlet's unit theorem tells us, in a precise sense, "how many" units (i.e., elements with $f(x)=1$) there are in $\mathcal{O}_K$.  My question is, are there results out there about the size (or structure) of the set of elements $\alpha\in \mathcal{O}_K$ with $f(\alpha)=n$, for some given positive integer $n$?  (To make things more concrete, we could just focus on $n=2$, if it helps.)  Of course, if $f(\alpha)=n$ and $u$ is a unit, $f(u\alpha)=n$ too, so we should mod out by the action of $\mathcal{O}_K^*$ on $\mathcal{O}_K$ by multiplication, i.e., look at equivalence classes of associated elements of $\mathcal{O}_K$.  If we let $S =$ this set of equivalence classes, $f$ is well-defined on $S$.  For a given $n\in\mathbb{N}$, is $f^{-1}(n)$ finitely generated or (dare I hope it) finite?


I want to get current user login name with PnP-Core-Library for SPFx in Office365. My page is modern Page  How to do this?

We all know that _spPageContextInfo is a very useful thing in Client side development. I need something equivalent of _spPageContextInfo in SPFX. Currently I am unable to use it directly from typescript. It gives error like     Can not find '_spPageContextInfo'   Finally, I have gone through the API documentation of  and  found . PageContext has dependence with . My qestion is: How to use PageContext? I need to use it my BaseService class. constructor of my class is:  constructor(private $http: ng.IHttpService, private $q: ng.IQService, serviceScope: ServiceScope) {     serviceScope.whenFinished(() => {       this.pageContext = new PageContext(serviceScope);       console.log(this.pageContext);     });   }   Inside the constructor serviceScope is undefined. I know the reason: As I am not injecting/initialising serviceScope anywhere like other angular services. So what is the approach of injecting/initialising serviceScope in angular service class?


I'm an Indian on a 180 days Spanish student visa. I would like to travel around EU. Is it possible for me to catch my return flight to India from an airport in a different Schengen state or do I strictly have to depart from Spain?

I have requested for a French long term (Type D) student visa from a consulate in India. It's a national Type D visa and not a Schengen visa. My question is that can we still go to other Schengen countries on this visa? If not then can we get a Schengen visa from a consulate in France?


Context  I made a small proof of concept project in order to learn to use ant:  I created a small JAR file that only contains one class that you can see here:  public class Dummy {      private String name;      public Dummy(String name) {         this.name = name;     }      public String getName() {         return name;     } }   I made a JAR of that called lib/dummy.jar. Here is its manifest:  Manifest-Version: 1.0 Ant-Version: Apache Ant 1.10.5 Created-By: 1.8.0_232-b09 (Oracle Corporation) Class-Path:     Project  Now, I want to use that JAR in a main class that looks like this:  public class Main {     public static void main(String[] args) {         Dummy f = new Dummy("Hello, World!");         System.out.println(f.getName());     } }   I can compile it without a problem (if I include my JAR in the classpath).  Then, I try to make a JAR of that main class. The JAR contains this:  META-INF/ |- MANIFEST.MF Main.class dummy.jar   The manifest contains:  Manifest-Version: 1.0 Ant-Version: Apache Ant 1.10.5 Created-By: 1.8.0_232-b09 (Oracle Corporation) Main-Class: Main Class-Path: dummy.jar   The JAR is created successfully.  Problem  If I try to run the JAR, I've got an Exception in thread "main" java.lang.NoClassDefFoundError: Dummy  The code should work, because if I include my initial dummy.jar in the classpath when running, everything works fine. (java -cp build/jar/run-me.jar:lib/dummy.jar Main)  Why is it not working when I run the JAR all by itself?  build.xml  If it is of any use, here is my build.xml (improvements gladly accepted in the comments):  <project default="all">     <path id="build.classpath">         <fileset dir="lib">             <include name="**/*.jar" />         </fileset>     </path>     <pathconvert property="mf.classpath" pathsep=" ">         <path refid="build.classpath" />         <flattenmapper />     </pathconvert>      <target name="all" depends="compile,jar,run" />      <target name="compile">         <mkdir dir="build/classes" />         <javac srcdir="src" destdir="build/classes" includeantruntime="false">             <classpath>                 <fileset dir="lib">                     <include name="**/*.jar" />                 </fileset>             </classpath>         </javac>     </target>      <target name="jar">         <mkdir dir="build/jar" />         <jar destfile="build/jar/run-me.jar" basedir="build/classes">             <manifest>                 <attribute name="Main-Class" value="Main" />                 <attribute name="Class-Path" value="${mf.classpath}" />             </manifest>             <path id="build.classpath">                 <fileset dir="lib">                     <include name="**/*.jar" />                     <include name="**/*.zip" />                 </fileset>             </path>         </jar>     </target>      <target name="run">         <java jar="build/jar/run-me.jar" fork="true"></java>     </target>      <target name="clean">         <delete dir="build" />     </target> </project>

Is it possible to specify a Java classpath that includes a JAR file contained within another JAR file?


I've seen a couple of questions recently that IMHO would be better suited to .  Here's one .  I couldn't see such site listed in the close dialog though:    What am I missing and what's the proper protocol to migrate such questions to their respective SE site?

Possible Duplicate:             This morning I was trying to flag a question as off-topic to be migrated to serverfault ( which has beed migrated to su). But I can't find serverfault in the website list:    Is there more questions being migrated to sharepoint.se than serverfault? If yes, that's why serverfault isn't in the list anymore?


Carousel in web design is used to display a series of (interactive) banners. Is it phasing out-of-fashion, these days?  Microsoft.com and Apple.com still do use it with and without arrows.  Is there a Usability study that verily questions its use /application in design?

Go to just about any eCommerce site and the homepage is nearly guaranteed to feature a carousel - an auto-rotating panel, usually with some sort of small navigation, usually highlighting new product releases, sales or offers.   Are there any studies out there that look into how effective carousels actually are in terms of conversions and as compared against other ways of displaying similar information? I have a hypothesis that they might be something of a UI cliche, partially supported by looking at click data from some of our own sites.


I am a programmer and sorry if this sounds stupid.  If I have to specify the same value for both the right and the left property of something, I usually refer it as the SIDE property. Is there a similar generic word to use for a value for both the top and the bottom property?   Examples:   "The rectangle has 3 pixels left and 3 pixels right margin" = "The rectangle has 3 pixels side margin." "The image is 40 pixels high and 40 pixels wide" = "The image size is 40 pixels."

"Sides" can be used to describe positioning relative to the left or right of an object. Is there a corresponding word that has the same meaning for the top or bottom of an object?  For example, if I say "side padding," it's pretty clear that I'm talking about padding from the left and right edge. I want to be able to say the same thing about the top and bottom edge.


Looking Terminal commands to install GHDL and GTK WAVE in Ubuntu 18.04 LTS  Operating System  Error shown below -  shivam@shivam-Inspiron-N5010:~$ sudo apt-get install ghdl gtkwave Reading package lists... Done Building dependency tree        Reading state information... Done Package ghdl is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source   Kindly help me out.

How do I get to the Universe Repository in supported versions of Ubuntu?


I'm trying to develop an android app android studio 3.2. When app crashes imageView.setImageBitmap(bitmap);  stopped the app. This  is my code to get an image in drawable         public class MainActivity extends AppCompatActivity {         Button button;         ImageView imageView;         TextView textView;      @Override     protected void onCreate(Bundle savedInstanceState) {         this.imageView=(ImageView)findViewById(R.id.image_view);         textView=(TextView)findViewById(R.id.text_view);         button=(Button)findViewById(R.id.button_click);          try {             this.imageView.setImageResource(R.drawable.helloworld);          }catch (Exception e){             Log.d("error_msg", ""+e);             System.out.println(">>>>>>>>>>>>>>>>>"+e);          } //         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);     } }   and also i used this      implementation 'com.google.android.gms:play-services-vision:16.2.0'   How to solve this issue?  D/error_msg: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setImageResource(int)' on a null object reference   This is the error i got when Catch the error

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?


Similar to how one can find a primitive root element of $\mathbb{Z}/p\mathbb{Z}$, I was wondering if, for any group of size $N$ that can be written as $(k\backslash\{0\},\cdot)$ where $k$ is a field, one can find an element of the group such that its order is $N$.   The sketch of my attempted reasoning is as follows:   Lemma 1: Legendre's Theorem says the order of every element of a group divides the size of the group, $N$.   Lemma 2: The order of every element divides the largest order of an element ().   Lemma 3: The maximum number of solutions to $x^n=1$ in a group given by $(k\backslash\{0\},\cdot)$, where $k$ is a field, is $n$ (, ).   From Lemma 2 and 3, if the largest order is $n$, then the maximum number of solutions is $n$, but $N$ elements must solve it, so $n\geq N$. From Lemma 1, $n|N$, so $n=N$.   Does this mean that every group that can be defined as $(k\backslash\{0\},\cdot)$, where $k$ is a field, is cyclic??? Or am I missing something? Is there an existing proof of this that has a name?

The book "A First Course in Abstract Algebra" by Fraleigh says      If $G$ is a finite subgroup of the multiplicative group $\langle F^*,\cdot\rangle$ of a field $F$, then $G$ is cyclic. In particular, the multiplicative group of all nonzero elements of a finite field is cyclic.    I wonder why that is. Take $a,b\in F$ such that $a^2=b^2=1$. Then $\{1,a,b,ab\}$ is a non-cyclic subgroup of $F$. Where am I going wrong?  Thanks in advance!


There are (in real life) many amazing examples of this (Bill Gates, "gates" being the fundament of computers, Tiger "Woods", the greatest ever user of "woods" golf-clubs, etc) and it is a staple of fiction.  Is there a single-word for this, or a frequently-used term?  Note that in fictional usage, I observe there is literal "X", so, for example I just saw a children's movie where "Madame Work" was a taskmaster. However, authors often employ near-literal "X": for example, most of the minor character surnames in Harry Potter are 'kind of" "X".  So, is there an "X" for Bill "Gates", Tiger "Woods", an undertaken named Mr. Death, etc?  Sorry if this has been asked already, I couldn't find it.    Note - I've just found there's a "wikipedia" page claiming 'aptonym' or 'euonym' is sometimes used.  Wikipedia is often valueless, so I do not know if this is a meaningful claim.

I'm looking for a word which indicates that a person has adopted a quality suggested by their name, e.g. a person named Grace who is indeed graceful, or perhaps someone named Shepherd who has become a shepherd.  I have a strong notion that I once learned such a word, but I have forgotten it and have never re-discovered it.


I'm not savvy at all when it comes to any of this.  We need a photo of our dog that will be blown up to go on a van wrap. My photographer has a camera with 24 mega pixels which is a 4000x6000 resolution.  Will this be sufficient?

For wall-sized graphics and large banners (e.g. 3m × 5m), what is an acceptable PPI for print? As I understand it 300 ppi is the typical for 'small' artworks (esp. for clean text resolution). However, for small artworks, the audience usually engages at a much closer distance. Therefore, in the interests of keeping a bitmap file down to a reasonable size, can you get away with a much-reduced PPI for a large format/banner print?


I recently bought warm white LED strips and installed them. Even though they are considered "warm" white (3000K), the light is very white and not close to incandescent light and it hurts the eyes.   Is there any way to make the light warmer? maybe hacks like painting the strip LED's?

I recently bought  white LED reading lamp. I like it a lot, but the "white" light produced is significantly blue; I'll guess its  is about 5000K.  I've noticed that, when this is the only source of light, printed text appears slightly fuzzy, and is more difficult to read than with a standard incandescent reading lamp. My guess is that this is  causing color fringing in my eyes, making it harder to read with this new lamp.  Is there a way to make this lamp less blue using some sort of transparent/translucent filter over the lens? This could filter out some of the blue end of the spectrum, or include a  to convert some of the blue to yellow (as  do). The fluorescence idea would be better, as there'd be less light lost. I don't want to go too far, though; a strongly yellow lamp might be worse for reading than this currently blueish lamp.


I am trying to minimize a convex function using the steepest descent method. The function is defined over the domain $D = \{(x, y) \in R^2 : 2x^2+y^2 < 10\}$.  The gradient descent iterations:  $$\mathbf{x}_{n+1}=\mathbf{x}_n-\gamma \nabla F(\mathbf{x}_n),\ n \ge 0$$ where $\gamma$ is my constant stepsize (I tried diminishing stepsize and I get the same problem)  I easily get a solution $\mathbf{x}_{n+1} \notin D$ and then  diverge. How should I deal with the problem of going outside the domain?

I am minimizing a convex function $f(x,y)$ using the steepest descent method: $$\mathbf{x}_{n+1}=\mathbf{x}_n-\gamma \nabla F(\mathbf{x}_n),\ n \ge 0$$  My function is defined over a specific domain $D = \{(x, y) \in R^2 : 2x^2+y^2 < 10\}$, if my $x_{n+1}$ goes out of bound, my method diverge. I was told to choose $\gamma$ using armijo rule to stay inbound.   Can someone explain to me the method and also describe a pseudo code for implementing it?


a) Use the remainder theorem to prove that $(a+b+c)$ is a factor of $(a^3+b^3+c^3-3abc)$ . Then find the other factor.      b) Hence factor $(ab^3-ac^3+bc^3-ba^3+ca^3-cb^3)$   So far I have managed to find the other remainder being $(a^2+b^2+c^2-ab-ac-bc)$ but I don't understand how to use this to hence factor the expression.   Also I was reading a solution which factorised the expression without using part a) but how does the second last line turn into the last line?  \begin{align}&\color{white}=(bc^3−cb^3)−(ac^3−ca^3)+(ab^3−ba^3)\\ &=bc(c^2−b^2)−ac(c^2−a^2)+ab(b^2−a^2)\\ &=(c−b)(c+b)bc−ac(c−a)(c+a)+ab(b−a)(b+a)\\ &=−(a−c)(b−c)(a−b)(a+b+c)\end{align}  Thanks in advance

I would like to know how to factor the following polynomial.  $$ ab^3 - a^3b + a^3c -ac^3 +bc^3 - b^3c $$ What is the method I should use to factor it? If anyone could help.. Thanks in advance.


When disavowing links you do so by individual property in Search Console. Most sites will have multiple properties (www / non www / https etc.)  When disavowing, should I upload the same disavow file for every property?

I have a client which disavowed a few thousand dirty links from his site profile back in February 2015. Recently the site was switch from HTTP to HTTPS (SSL enforced).   Google recommends that you add all variations to the Google Console (Webmaster Tools).  The site has a total of 4 variations, eg:    http://www.example.com (Previously Preferred) http://example.com https://www.example.com (Now Preferred) https://example.com   Question:  Since technically this is a new property in Google Webmaster Tools, do you need to submit the same disavow file added previously back in 2015?


I am researching on matrix diagonalization and trying to understand the condition for matrix diagonalization ( when can a matrix be diagonilized basically... i think it is when there r n distinct eigen vectors for a n order matrix but im not sure when this is the case). Thanks for the help.

There are many sufficient and necessary conditions that derive from the fact that a matrix can be diagonalize means it is similar to a diagonal matrix.  Is there a list of all of conditions?


I am presently riding a hybrid that apparently is a bit too small for me, and I'd like to replace it with a road bike. Having ridden this improperly-sized bike for as long as I have (about 8 months, including one MS150), I am interested in making sure that the next bike I buy is properly sized.  The sizing numbers published for different bike models are only somewhat helpful, because a 54cm bike, even of the same type, will fit different people depending on who made the bike. It would have been more helpful if the sizing was listed as a range of heights for riders (such as, "best fits riders from 175 to 185 cm").  Somewhat complicating the issue is that (as I have mentioned in another question) I am chronically short of funds, and there is a high chance that I'll be buying something off of Craig's List or some other such place. I don't want to waste the seller's time by trying the bike if there's any chance that I won't buy it. I'd much prefer to know when I show up to make the purchase that the bike is manufactured for a rider of my height.  The same goes for mail-order. If I go this route, I want a reasonable certainty that the bike is made for someone my size. I don't want to deal with the hassle of returning a bike that doesn't hit my own personal Goldilocks zone.  I'd also rather not trouble bike shop personnel to let me try a bike to see if the sizing is right unless I'm ready to buy from that shop (possible but by all means not certain); I like to think that I'm a golden rule sort of person and using their time in this way seems too much like taking advantage of them. However, if this is considered by them to be a cost of doing business, then it's not a show-stopper.  That all being said, what's the best way to go about finding what size bike will fit me best? (If it helps to be more specific, I'm mostly interested in a road bike.)

I'm fairly tall (6'4" or 195cm), and the bike I'm looking for is fairly specialised these days (a tourer, presumably steel, possibly with a sideline as a gravel bike/off-road tourer but no need for full-on CX specs and I need heel clearance).  I ride a hybrid.  My total road bike miles add up to about the same as a decent ride on my hybrid (42 miles) and those were on a too-small bike. So I'm not familiar with road bike fit.  I do know that if I can get the saddle high enough I'll be OK for easily an hour in the saddle of anything.  Nowhere stocks a range of tourers in my size. Even finding one single tourer in stock in my size is rare (tourers don't sell fast).  Of course many places can get one in, try to fit it, fail, send it back, try again...  But how do I maximise my chances of getting it right first time?  I don't see that a rough fit on a typical road bike or even a CX bike would be very informative, as I'm after the long wheelbase, relaxed geometry of a tourer.  It feels like I could extrapolate as well from flat bars. I'd almost be glad if these assumptions were wrong, but I might take a little convincing.  The next step of course is testing it to make sure it fits -- with everything set nominally right it will feel a bit odd as I'm used to flat bars.  How can I tell whether this is bad-odd or OK-odd in a short test ride?  Part of my concern is that I'm looking at the , and I'm at the top end of the largest size -- by some shops' size guides I should be OK, but not according to others (including the one I may buy it from)


I have a test setup running with a MaaS Server, a JuJu Server and a number of Nodes in the MaaS Cluster.  After I reinstalled my MaaS Server (and subsequently the JuJu-Core Server) with Saucy  instead of Precise, certain things definitely improved while, at least one other thing  seems to be broken now. The maas-cli. I always get an error :  httplib2.socks.HTTPError, 403, Forbidden.   I also created a new MaaS Key/OAuth Token, but to no avail. I have a couple of machines,  that have different number of Disks in the cluster. But they have the same number of CPUs and the same amount of memory. According to this .  I can also use tags as constraints in the deployment process to distinguish between the nodes. As I'm seemingly unable to tag the nodes through the MaaS Web UI, I wanted to use the maas-cli. On precise it worked well, I used it to release nodes etc. But on Saucy I haven't even once been able to at least login. I always get:  Traceback (most recent call last):   File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main     "__main__", fname, loader, pkg_name)   File "/usr/lib/python2.7/runpy.py", line 72, in _run_code     exec code in run_globals   File "/usr/lib/python2.7/dist-packages/maascli/__main__.py", line 20, in <module>     main()   File "/usr/lib/python2.7/dist-packages/maascli/__init__.py", line 46, in main     options.execute(options)   File "/usr/lib/python2.7/dist-packages/maascli/cli.py", line 70, in __call__     description = fetch_api_description(options.url, options.insecure)   File "/usr/lib/python2.7/dist-packages/maascli/api.py", line 71, in fetch_api_description     ascii_url(url_describe), "GET", insecure=insecure)   File "/usr/lib/python2.7/dist-packages/maascli/api.py", line 60, in http_request     return http.request(url, method, body=body, headers=headers)   File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1569, in request     (response, content) = self._request(conn, authority, uri, request_uri, method, body, headers, redirections, cachekey)   File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1316, in _request     (response, content) = self._conn_request(conn, request_uri, method, body, headers)   File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 1251, in _conn_request     conn.connect()   File "/usr/lib/python2.7/dist-packages/httplib2/__init__.py", line 900, in connect     self.sock.connect((self.host, self.port) + sa[2:])   File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 424, in connect     self.__negotiatehttp(destpair[0], destpair[1])   File "/usr/lib/python2.7/dist-packages/httplib2/socks.py", line 390, in __negotiatehttp     raise HTTPError((statuscode, statusline[2])) httplib2.socks.HTTPError: (403, 'Forbidden')   The maas.log does not hold anything regarding this issue. It holds Error messages about OAuth and that a request was unauthorized. But that's an 'old' message. No new messages seem to be written to that log.  ERROR 2013-11-22 09:35:37,592 maasserver Traceback (most recent call last):   File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response     response = callback(request, *callback_args, **callback_kwargs)   File "/usr/lib/python2.7/dist-packages/django/views/decorators/vary.py", line 19, in inner_func     response = func(*args, **kwargs)   File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 128, in __call__     actor, anonymous = self.authenticate(request, rm)   File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 103, in authenticate     if not authenticator.is_authenticated(request):   File "/usr/lib/python2.7/dist-packages/maasserver/api_auth.py", line 57, in is_authenticated     raise OAuthUnauthorized(error) OAuthUnauthorized   How can I resolve this ?

So, I have Ubuntu 12.04 LTS, installed MaaS from the initial bootup, and then added JUJU. I'm behind a proxy, so, added proxy to /etc/apt/apt.conf and also to /etc/wgetrc. Doing that I could then use maas-import-pxe-files.  Setup my environment, everything seems fine, but when I boot the nodes up they can't resolve archive.ubuntu.com. Is there somewhere I have to set my proxy information so it's passed onto the nodes that connect to the MaaS server? I don't see any action in any squid logs, and not sure where I should put my proxy to the outside world so it should be passed on.  Any assistance is greatly appreciated!


I need to simulate the warning:  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!  @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!   I have two Linux machines and when I do ssh from Linux1 to Linux2, ssh accepted and reports no problem.  But because some of testing, I want to simulate the - Identification Has Changed error  So what I need to edit on the remote server in order to create the problem?  what I did until now is to change the knwon_hosts on both machine but its not create the problem  I get this:   key_read: uudecode AAAAB3NzaC1y3jrzG62xyHrb3qxc9eYpg1Cp1PrRElTFfYbEHsRfTZU21S8kO5/Tq+ED8=  failed  key_read: uudecode AAAAB3NzaC1y3jrzG62xyHrb3qxc9eYpg1Cp1PrRElTFfYbEHsRfTZU21S8kO5/Tq+ED8=  failed  The authenticity of host 'sfe1 (10.106.164.111)' can't be established.  RSA key fingerprint is 84:82:2b:80:ca:3f:57:c7:8c:14:44:dd:b9:70:e5:d8.  Are you sure you want to continue connecting (yes/no)?

I need to simulate the warning:  @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!  @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@  IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!   I have two Linux machines and when I do ssh from Linux1 to Linux2, ssh accepted and reports no problem.  But because some of testing, I want to simulate the - Identification Has Changed error  So what I need to edit on the remote server in order to create the problem?  what I did until now is to change the knpwn_hosts on both machine but its not creating the problem.  I get this:   key_read: uudecode AAAAB3NzaC1y3jrzG62xyHrb3qxc9eYpg1Cp1PrRElTFfYbEHsRfTZU21S8kO5/Tq+ED8=  failed  key_read: uudecode AAAAB3NzaC1y3jrzG62xyHrb3qxc9eYpg1Cp1PrRElTFfYbEHsRfTZU21S8kO5/Tq+ED8=  failed  The authenticity of host 'ste1 (10.106.164.111)' can't be established.  RSA key fingerprint is 84:82:2b:80:ca:3f:57:c7:8c:14:44:dd:b9:70:e5:d8.  Are you sure you want to continue connecting (yes/no)?


Shown here, a green (location (x,y,z)), brown (rotation (x,y,z)) and yellow (scale (x,y,z)) colored attribute highlight. What do these mean? (And where are they documented?)

I have downloaded a free model for my current project and spotted those different colors on Scale, Rotation, Location, and other properties. What do these different colors signify? What is the meaning of various possible color overlays on UI properties buttons? The very same model after Ctrl + C Ctrl + V to my project file disappeared after a while.


Vector addition, subtraction and dot product seem logical enough, but I don't understand how two vectors acting on the same plane maybe, can give a perpendicular resultant.

I was doing calculations with torque and then I came across something very confusing:  I understand that the magnitude of the torque is given by product of the displacement(from the center of rotation) at a point and the force applied at that point. This magnitude perhaps, says something about how "powerful" the rotation is. The question that confuses me, however, is what does the direction of the  tell? The direction is perpendicular both to the force and the displacement. What really is this the direction of?


My goal is to extract text from a specific line with a hotword (don't know how to call it else) in it. The line number can vary because its an weekly updated file. When hotword is detected it should copy this line and all following text to another file.  Could this be done by sed, awk or something else?

I use sed -n '/string/,$p' file >> otherfile to copy text from a line with certain string to another file.  Now I want the copied text to be deleted in the original file. I tried different methods with sed and awk but nothing worked.  How to use sed to delete the text of a file from the beginning line with a certain string in it?  texta  texta1  textb    <- string, delete rest of the text from here  textb1  textc  textc1   or would it be easier to cut instead of copying with sed and what would be the command instead?


So I have a symbolic link called "script_link" and another called "script_link2" and they are both pointing to a bash script (this is hypothetical, I could have a lot more than 2 links to the script). In my script, how can I get the name of the link that called the script? So if I type "./script_link" in the shell, I want my script to echo "script_link" and if I type "./script_link2", I want it to echo "script_link2". Is there anyway to do this in bash?

How can I determine the name of the Bash script file inside the script itself?  Like if my script is in file runme.sh, then how would I make it to display "You are running runme.sh" message without hardcoding that?


This may seem like a duplicate but I do not understand other explanations.   I have read that light is an electromagnetic wave (a fluctuation or disturbance in the electric and magnetic field). How does this have anything related to a packet of energy described as a photon. All I understand about photons is that they are packets of energy absorbed and released by the movement of electrons in different energy levels.  Please explain as best as you can for a high school student.

At the end of this nice video (), she says that  is a chain reaction of electric and magnetic fields creating each other so the chain of wave moves forward.  I wonder where the  is in this explanation. What is the relation between electromagnetic wave and photon?


My passport is slightly broken as in pic, everything else is intact. Is it considered as damaged passport? My first passport was water damaged and this is second and if it is considered as damage, will it give a bad remark?

My Indian passport has got some slight water mark in it now. Is this considered damaged passport or will it be fine. The pages which has my details are all intact. It is just the first page cover and slightly on the edges.  Will I need to get a new one replaced. I have a visa appointment on Monday :(


One of my plugins is using an API key to communicate with an off-page service. However, this API is not encrypted and is therefore visible to everyone with an admin login.  Can I encrypt the API key in the database? And what would be the best practice for doing this?  Thanks,

I'm looking to use a few APIs and many come with keys, secret keys and passwords required to work. Where in WordPress can you store that information? Assuming anyone can hack your DB is there anyway for WordPress to make saving that information more secure? Also, consider the ability to change these keys ever so often so I would need to update the keys on an options page.  UPDATE


How can I get more doc in lucene4.Here is my code.  int limit = 1000; TopFieldColletor collector = TopFieldColletor.create(sort,limit,true,false,false,false); searcher.search(query,collector); ScoreDoc[] sds = collector.topDocs().scoreDocs; System.out.println("sd:" + sds.length);    System.out.println("total:" + collector.getTotalHits());   This is my result: sd:1000 total:9060 My question is I got the 1000 doc, how to get the next 1000, until the end to take.

I am using Lucene to show search results in a web application.I am also custom paging for showing the same. Search results could vary from 5000 to 10000 or more. Can someone please tell me the best strategy for paging and caching the search results?


I am trying to find all combinations to select exactly one element from each list inside a list. (I prefer the computationally fastest method.)  Example: If my list is [[1], [2,3], [4,5,6]] I would want to get the following result (in any order): [[1,2,4], [1,2,5], [1,2,6], [1,3,4], [1,3,5], [1,3,6]]  I tried finding functions in modules like itertools without any success and am not sure how to start this.   I was thinking about doing the following, but I have no idea how to finish this: Find the number of permutations to find (called m here):  m = 1 for letter in letters:     m *= len(letter)   Then set up a for loop:  for i in range(m):   Then find each combination by cycling through all lists in the list and taking one element. I was thinking of doing the selection somehow using the modulus (%) function, but I don't know how to make it work.

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


I want to disable the prompt for a password when installing a software and when launching a vpn client (torGard).  How can disable this?  What I've done: in terminal >    sudo visudo /etc/sudoers/   1st I've changed   %admin ALL=(ALL) NOPASSWD: ALL   then ctrl + O (wich might be were I am wrong?)  It didn't do much so I've also changed the setting for %sudo and %root but I am still prompt for those passwords. Any thing I would have missed?

There's been one problem I've had since I installed Ubuntu to run alongside Windows, I assume this would also be the same if it was installed to replace the other operating system as well, the installer prompts you to create a password upon typing in the user account name and if you don't put in a password and just put in the user account name, it ends up saying to create a password. My comparison is in Windows and Mac OS X, you are never forced to create a password.  If you remove the password on your Admin account in System Settings > User Accounts, you won't be able to authenticate whenever you try to install something, because it requests for a password and putting in no password at all isn't going to work, it will just act as if you put in an invalid password. This is what I call "getting locked out of privileges".  I'm finding the "Authenticate" window that comes up whenever you install something or accessing somewhere a nuisance, 'cause it always requests for your password.  So my question is - Why does Ubuntu force users to create a password upon installation?


I am using Ubuntu 20.4 and I am attempting to install DSD by debi  20.4 main But I get this response: debi: warning:     debian/changelog(l12): found start of entry where expected more change data or trailer LINE: sdrangel (6.7.0-1) unstable; urgency=medium debi: warning:     debian/changelog(l12): found end of file where expected more change data or trailer debi: can't read sdrangel_6.8.0-1_amd64.changes!  The developer of DSD really wants us to use DOCKER to install full versions of SDRAngel, which includes DSD, so I tried that, as well: sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"  BUT I receive this response: Hit:1 http://us.archive.ubuntu.com/ubuntu focal InRelease Hit:2 https://download.docker.com/linux/ubuntu focal InRelease                                                     Get:3 http://us.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]                                         Get:4 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]                       Ign:5 http://ppa.launchpad.net/szechyjs/dsd/ubuntu focal InRelease                         Get:6 http://us.archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB]                               Err:7 http://ppa.launchpad.net/szechyjs/dsd/ubuntu focal Release                                             404  Not Found [IP: 91.189.95.85 80] Get:8 http://us.archive.ubuntu.com/ubuntu focal-updates/main amd64 DEP-11 Metadata [264 kB] Get:9 http://us.archive.ubuntu.com/ubuntu focal-updates/universe amd64 DEP-11 Metadata [303 kB] Get:10 http://us.archive.ubuntu.com/ubuntu focal-updates/multiverse amd64 DEP-11 Metadata [2,468 B] Get:11 http://us.archive.ubuntu.com/ubuntu focal-backports/universe amd64 DEP-11 Metadata [1,768 B] Get:12 http://security.ubuntu.com/ubuntu focal-security/main amd64 DEP-11 Metadata [24.3 kB]        Get:13 http://security.ubuntu.com/ubuntu focal-security/universe amd64 DEP-11 Metadata [58.2 kB] Reading package lists... Done                E: The repository 'http://ppa.launchpad.net/szechyjs/dsd/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.  It appears from these two responses that the DSD component for Ubuntu 20.04 is absent. It appears that past and future releases of Ubuntu have valid DSD repositories. 20.04 seems to have an abnormally ended file repository. I am assuming here that the DSD repository needs to be rebuilt and replaced, then the Docker container for 20.04 be rebuilt and replaced. I left a note with the DSD developer yesterday in github, but no response as of this afternoon from anyone. I don't know where is the appropriate forum to lodge this issue. I would have assumed the repository should have been submitted by the DSD developer. But, I can see the potential that the Ubuntu repository build might be managed by someone other than the developer, so maybe a repository maintainer issue. In the case of the Docker container, it might be some issue with the container publishing function. Can those familiar with this whole process advise me on how to properly direct this (these?) issue(s)? Many thanks, Shane

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


I want to read a json file in my java application which uses gradle. When I run the application in Intellij and gradle run it works fine, but when I do gradle dist and run that jar it throws a FileNotFound. If I open the jar with winrar I see the file in the correct directory.  I have tried getting the file in all ways I could find, some are:  new FileReader("data/user-data.json"); new FileReader(new File(getClass().getResource("data/user-data.json").getFile())); new BufferedReader(new InputStreamReader(getClass().getResourceAsStream("data/user-data.json")));   and lots more.  Can anyone help me? Let me know if you need more information.

I'm trying to access an XML file within a jar file, from a separate jar that's running as a desktop application.  I can get the URL to the file I need, but when I pass that to a FileReader (as a String) I get a FileNotFoundException saying "The file name, directory name, or volume label syntax is incorrect."  As a point of reference, I have no trouble reading image resources from the same jar, passing the URL to an ImageIcon constructor.  This seems to indicate that the method I'm using to get the URL is correct.  URL url = getClass().getResource("/xxx/xxx/xxx/services.xml"); ServicesLoader jsl = new ServicesLoader( url.toString() );   Inside the ServicesLoader class I have   XMLReader xr = XMLReaderFactory.createXMLReader(); xr.setContentHandler( this ); xr.setErrorHandler( this ); xr.parse( new InputSource( new FileReader( filename )));   What's wrong with using this technique to read the XML file?


By Illuvatar's will, mankind is known as Man, not humans. As the secret history of our world, however, this is in our past. As such, is the word human known to Man during the time period in history written by Tolkien, and what instances of its usage are there, if any?

I'm asking this because I've recently come upon the conclusion that, as beings living on an entirely different plane of existence, they might simply not be Humans at all, and just Humanoids bearing a striking resemblance to our own species...  Is there any place in the books where this group is called Humans and not Men or Edain, Rohirrim... ?


What is the term or word for when facts or truths, while accurate, have no bearing on the subject or argument: "Leaves are green in summer, therefore we should all wear boots"

I'm really lost for words...  For example, I like people with short hair. But then someone could say, so you hate people with long hair? But, of course, I did not give any information on people with long hair. I could've liked/hate it. What is this called? I'm sure there was a name to this, maybe an expression?


If $f$ is continuous and non-negative and $\int_a^b f(x)dx=0$ therefore $f(x)=0$ for all $x\in[a,b]$.  My attempts  Suppose $f\neq 0$, i.e. there is an $x\in ]a,b[$ s.t. $f(x)\neq 0$. Since $f$ is continuous, there is a $\delta>0$ s.t. $f|_{]x-\delta,x+\delta[}> 0$ (we take $\delta$ small enough to have $]x-\delta,x+\delta[\subset ]a,b[$. Therefore $$\int_a^b f(t)dt\geq \int_{x-\delta}^{x+\delta}f(t)dt>0$$ contradiction. The cas $x=a$ or $x=b$ goes the same but with $f|_{]a,a+\delta[}>0$ or $f|_{]b-\delta,b[}>0$.

Suppose that a function $f:[a,b]\to\mathbb{R}$ is continuous and nonnegative. Prove that if $\int_a^b{f}=0$, then $f(x)=0$ for all $x\in [a,b]$.   I've been trying to prove it using the extreme value theorem, continuity and the upper and lower sums but can't come up with something tight enough. More specifically, I've been trying to relate $|f(x)-f(t)|<\epsilon$ to the sum of $M_k-m_k(x_k-x_{k-1})$


Lets say that i have a big list of string called "lines" and it holds all lines from a text file (Its usually big numbers around 100k - 1mil lines)  List<string> lines = File.ReadAllLines("Lines.txt");   And my problem is that i would need to split the file (Or the list) based on what chunk size the user inputs. So lets say that we have 10k Lines in  Lines.txt and user imputs chunks of 4400 lines  File1 = 4400 Lines  File2 = 4400 Lines File3 = 1200 Lines   I tried using something like this that my colleague recommended but i dont understand it and it does not work.   public static class ListExtensions {     public static List<List<T>> ChunkBy<T>(this List<T> source, int chunkSize)      {         return source             .Select((x, i) => new { Index = i, Value = x })             .GroupBy(x => x.Index / chunkSize)             .Select(x => x.Select(v => v.Value).ToList())             .ToList();     } }   I would appreciate any recommendations or help on how i could solve this.

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


-Edit- Someone decided to nuke the comments (which were nonsense and none were mine). They nuked the 'duplicates' which had nothing to do with my question too but didn't reopen (why?). I had to ask it again and now I actually have an answer  It's ridiculous the function works this way. Am I stuck with mmap? How would I solve this for windows? Problem happens under clang and g++ on linux (64 bit) #include<cstdlib> #include<cstdio> #define ALIGNSIZE 64 int main() {     for(int i = 0; i<10; i++)     {         void *p = aligned_alloc(ALIGNSIZE, 4096);         void *p2 = realloc(p, 4096+2048);         //void *p3 = aligned_alloc(ALIGNSIZE, 4096/24); //Doesn't need this line to make it unaligned.           if (((long)p & (ALIGNSIZE-1)) != 0 || ((long)p2 & (ALIGNSIZE-1)) != 0)             printf("%d %d %d\n", i, ((long)p & (ALIGNSIZE-1)) != 0, ((long)p2 & (ALIGNSIZE-1)) != 0);     } }

I just finished a test as part of a job interview, and one question stumped me, even using Google for reference. I'd like to see what the StackOverflow crew can do with it:  The memset_16aligned function requires a 16-byte aligned pointer passed to it, or it will crash. a) How would you allocate 1024 bytes of memory, and align it to a 16 byte boundary? b) Free the memory after the memset_16aligned has executed.  {        void *mem;    void *ptr;     // answer a) here     memset_16aligned(ptr, 0, 1024);     // answer b) here     }