There are two apps that can disable system apps (bloatware) from  and  devices. Those do not need root or any special permission. Can anyone explain how this works?

Apps like Link2SD and Titanium Backup are able to "freeze" other apps, that is disable them without removing them. What do these apps do to achieve this?


I have a generic method, with the following signature   private static void ProcessItem<T>(int id) where T : BaseItem   And it gets called in the following way  ProcessItem<RedItem>(id: 2) ProcessItem<BlueItem>(id: 7)   My issue is that I get the type of item on application start up via reflection as a Type object.  So now I am looking for a way that I can construct an expression tree that will result in a lambda that calls this method with the appropriate type.  So I can do something like lambda.Invoke(Type type, int id). And this will call something along the lines of id => ProcessItem<type>(id)  I found a similliar issue answered here:   However, the answer there shows how to instantiate a generic param of IEnumerable<> whereas I simply need to call my method, transforming the Type object into an actual <Type> parameter that my method can accept.  I am not exactly sure if this is even possible (converting a Type object into an actual type parameter), but would love to hear any suggestions on the topic.   PS: I am also willing to take a different approach (some reflection tricks maybe), as long as it doesn't affect performance by more than 10-20%

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


Many (particularly sci-fi) shows or books invent words to replace real words, for example 'frak' in Battlestar Galactica replaces the 'F' word to get through censorship.  Is there a word to describe a word like 'frak', a word used in place of another? Not necessarily always replacing a curse word, I'm only using this as an example. My first thoughts were proxy or intimation but that's not quite right.

What term describes a non-offensive substitute for a swear word?   For example, Battlestar Galactica used frack instead of fuck. Another example is the use of snap instead of shit.  I think I may have heard a single-word term used to describe such alternate non-offensive words before, but I don’t know what it is.


Plan to fly from USA to Switzerland through London Heathrow. There is only 1.5-2h to catch connecting flight. The terminal for arrival and departure is the same.  Is it too tight?

British Airways (BA) just changed our flight times, leaving us only 1h15mins for our layover in Heathrow. We arrive from Brussels in terminal 5 in Heathrow at 7:55 and our next flight leaves for Miami in Heathrow terminal 3 at 9:10.  This seems awfully short.   Does anyone know whether this is doable?   The flights are in November, so I'm still hoping that the flights will change back to the original flight times, which would give us an additional hour for the layover, but in case this does not happen, what are the chances that we will make the connecting flight in 1h15mins?


This question arises from a sntence found in a popular grammar book for EFL:     I didn't get where I am today without ...   or     I wouldn't have got where I am today without ...   Are both of these used in UK and correct? The first phrase is in New English File series.

e.g. I didn't get to where I am now unless ... or I wouldn't have got where I am now ... Are these both correct? The first sentence I found in a EFL series New English File. I have never heard this used in HampshireUK nor have I ever used it myself.


I'm currently doing work on discrete mathematics in my free time and am having some difficulties with understanding some questions pertaining to Relations and Functions. To be specific, I'm stuck on the following practice question:      Let A = {a, b, c, d}. Give an example of a relation R on A^2 which is     reflexive, symmetric and not transitive. Explain.   I don't really understand how to do reflexive etc., how would I find the resulting relation? Any help is appreciated! Thanks.

I am just looking for some clarification on this exercise:  Let $A = \{a,b,c,d\}$. Give an example of a relation $R$ on $A^2$ which is reflexive, symmetric, and not transitive.  I understand that if I was only dealing with $A$ and and not $A^2$ I could give an answer similar to:  $R = \{(a,a),(a,b),(a,d),(b,a),(b,b),(c,c),(d,a),(d,d)\}$  Here $R$ is reflexive, symmetric, and not transitive.  What is confusing me is the fact that we have $A^2$. I am not sure what I am missing here. I am looking through my book to see if I can figure this out, but if someone could help shed some light on this it would be appreciated.  Thanks,  Tony


In book seven, Harry and Hermione Apparate to the Forest of Dean, where Snape's Patronus leads Harry to the sword in a pool of ice. But how did it get there? Did Dumbledore put it there expecting Harry to find it? If so, how did Snape know Harry was in the forest? If not, did Snape put in the pool for Harry to find? Was he trying to find out where Harry was so he could lead him to the sword?  What exactly happened?

How was the Sword of Gryffindor placed into the pool in the Forest of Dean in Deathly Hallows?     ‘So how did the sword get in that pool?’   ‘Whoever cast the Patronus must have put it there.’   They both looked at the ornate silver sword, its rubied hilt glinting a little in the light from Hermione’s wand.   Deathly Hallows - page 304 - UK - chapter 19, The Silver Doe   I've read the chapters The Silver Doe (DH) and The Prince's Tale (HBP) many times over and I'm still not certain whether Snape placed the Sword of Gryffindor in the pool in the Forest of Dean, or if he somehow managed to have his doe Patronus place the sword there.   Was it Snape or his Patronus that actually placed the sword in the pool?


How do you find the equivalent resistance here? (I realized it's a Wheatstone bridge, but it's unbalanced, so that doesn't help.) I tried using Kirchhoff's laws, but there is no cell given.

If I have a configuration of 5 resistors as follows:        – Schematic created using   How can I calculate the expected total resistance between A and B, given only values for R1-R5?  edit: okay, here's what I've tried so far.  I intended to find the expected voltage drops across each resistor, and from there I knew I could easily find the total resistance of the circuit.  First, I observed three loops in the diagram: R1,R3,R4; R3,R5,R2; and R1,R2,R5,R4.  I remember from  my old electronics class that the voltage drop around each loop in a circuit should always equal zero, as follows: $$ v1+v2-v4-v5=0\\ v1+v3-v4=0\\ v3+v5-v2=0 $$ (Assuming that current is flowing from A to B, I further assume that it is flowing down through r3.  If this is wrong, then the value for v3 would just have the opposite sign, and all would be well).  The sum of currents flowing into a point should equal the current flowing out, so I have these equations as well: $$ \frac{v1}{r1}=\frac{v2}{r2}+\frac{v3}{r3}\\ \frac{v5}{r5}=\frac{v3}{r3}+\frac{v4}{r4}\\ \frac{v1}{r1}+\frac{v4}{r4}=\frac{v2}{r2}+\frac{v5}{r5} $$  So now I have  6 equations in 5 unknowns... and if these equations are correct,  then there should be one redundant equation.  However, plugging them into a cas such as maple cannot find any unique values for v1-v5 in this system (an infinite number, in fact), suggesting that there are at least 2 redundant equations above.  Does this mean that there is no unique resistance for this circuit fragment, or what have I done wrong?


Why this not work. I suspect an expansion problem ...  \documentclass{standalone}  \newcommand{\foo}[1][foo]{#1} \newcommand{\Fbox}[1][bla]{\fbox{#1}}  \begin{document}  \Fbox[\foo[bla]]  \end{document}

LaTeX seems to be having problems handling nested optional arguments. I've included a minimal code example that generates the error:  \documentclass[12pt,oneside]{book} \begin{document}  \newcommand{\termbad}[2][]{#2#1} \newcommand{\termgood}[2][]{#2#1}  \newcommand{\up}[1]{#1} \newcommand{\dd}[1][]{#1}  \termgood{\up{Tart}}{Pop} \termbad[\up{Tart}]{Pop}      \termgood{\dd[Tart]}{Pop} \termbad[{\dd[Tart]}]{Pop} %\termbad[\dd[Tart]]{Pop}   \end{document}   If you run this code, it works. If you remove the % in the second to last line, it fails with:  Runaway argument?  Tart{Pop} \par \par \end {document}  !File ended while scanning use of \dd.   After further tinkering, I have discovered the problem: LaTeX is reading the ] for the inner optional argument as the end of the outer optional argument and then passing a malformed argument in. So it is passing in \dd[Tart as the optional argument to \termbad instead of \dd[Tart].  This still feels like a bug to me. Nesting braces in arguments works, brackets should as well. The following are workarounds:   Enclose the inner optional argument in braces (as in the line before %). Redefine your inner function to require its argument instead of using optional arguments. Redefine your outer function to require its argument instead of using optional arguments.   Any one of the three works around the issue.  (Reposted here; question was originally posted to stackexchange and then closed instead of being migrated.)


Is there a particular reason why Voldemort has two slits for a nose in the movie version? Did he lose his actual nose by some way or another?

The nose of Tom Riddle (as a student) was fine, as I have seen in the movies. But, Voldemort's nose doesn't look like a normal human nose. What really happened?


I am a new DSLR user. Whenever I click a picture using Manual mode the picture is pitch black. You cannot see anything. Which setting should I change? How can I overcome this problem? It's only like this in the manual mode.  Help!

I was taking photos a few days ago, and I had it set to Manual. After about four photos, the rest started coming out black. I could see through my eyepiece clearly, and it took the photo normally, but when I reviewed it they were all black.


So I'm looking for some advice. I'm running out of ideas.  I have an issue on 2 of my computers.  My MS Surface Pro 4, and Desktop PC. Downloads are interrupted in chrome and IE... Windows update is failing to download updates. Adobe Creative cloud cannot update...   I suspect a virus or malware. however I'm running Bitdefender on both (could this be the cause). I've also run malwarebytes. (Although I had to download on another computer, as it is showing a network error when downloading on either of these devices) Nothing is turning up any issues. I've tried Bitdefenders Repair CD to do an offline scan. I couldn't get Kaspersky or Windows defender to boot on my surface to try offline scans with them.   I have brought my surface to my office, and used the guest wifi. same issue so not the network.  Both computers are running windows 10 insider preview builds, but one is home(build 14942), one is pro (build 14959).  Any suggestions of what I can try? Any software I can run to narrow down the search area?  Thanks in advance  Martin

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I'd like to install the Brave browser, but curl cannot be installed.  The previous question suggested I should switch to another ubuntu mirror. I switched to the best server, yet nothing changed. Reading package lists... Done Building dependency tree        Reading state information... Done Package curl 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  E: Package 'curl' has no installation candidate  Updating gives the following: Hit:1 http://ppa.launchpad.net/micahflee/ppa/ubuntu focal InRelease Hit:2 http://archive.ubuntu.com/ubuntu focal InRelease Reading package lists... Done Building dependency tree        Reading state information... Done All packages are up to date.  apt policy ubuntu-desktop gives ubuntu-desktop:   Installed: 1.450.1   Candidate: 1.450.1   Version table:  *** 1.450.1 100         100 /var/lib/dpkg/status  Kulfy, thank you. I had to run these lines first, then it got installed apt remove -y libcurl4 apt install -y libcurl4 curl  Ruby, thank you. At this moment, the browser is being installed. I fixed the problem based on this answer  Not sure if your solution leads to the same thing, but all good now.

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


I've an internet connection of 50Mbps, but on speed test on my laptop over WIFI, it shows variable speed, sometimes 20Mbps or sometimes even less than 1Mbps. So I connected WAN cable directly to my laptop, so then it showing the speed of 50Mbps exactly. So I'm pretty sure it is my router's issue. But I want to check what's my router's max speed not the internet. How can I test this?

Is there a way to benchmark how fast my router is connected to my PC, independent of the internet?  I've had slower-than-usual internet-based benchmarks, and I'm having a hard time figuring out if it's because of a bad router-to-PC connection (interference, bad signal, etc.) or if it's indeed because my internet is actually slower.


I got enough Power Moons to charge the Odyssey before getting to the Showdown on the Inverted Pyramid (Sand Kingdom). When I charged the Odyssey, Bowser flew away and I was asked to choose a fork in the road.  It looks like I can still go beat the boss and get the multi-moon on the Inverted Pyramid, but Bowser’s airship is no longer there. Did I miss anything? (Power ups, power moons, etc.?)

I've just seen that in a speedrun: If you collect enough moons to move on to the next world, and cash them in at the ship, the broodal ship just leaves.  Does that mean that the Broodal fight wont happen, so you missed the triple moon it gives? Or if you go to the arena, even without the ship you will have the fight happen?  Clip where this happens :


This is a question from Cambridge, Downing sample test     Using the definition $\left( \begin{array}{c}  \text{n}\\  \text{k}\\ \end{array} \right) =\frac{\text{n!}}{\text{k!}\left( \text{n}-\text{k} \right) !} $   , prove that $ \sum_{\text{j}=0}^{\text{n}}{\left( \begin{array}{c}  \text{n}\\  \text{j}\\ \end{array} \right) =2^{\text{n}}} $   Of course I know how to prove this by considering the subsets, or by binomial expansion.  But how to do it by definition? No idea about it.

Prove that$$\overbrace{\binom n 0 + \binom n 1 + \binom n 2 + \cdots + \binom{n}{\frac{n-1} 2}} + \overbrace{\binom n {\frac{n+1} 2} + \cdots + \binom n {n-1} + \binom n n} = 2^n. $$   Background:  This problem came from the following link:    and I didn't understand why that was true in which no one on the page has proved it to be so. and i was wondering what was the proof on that


I want to create a list of all floats from -100 to 100 with step of 0.1 but it shows an error. nums = [range(-100, 100, 0.1)]      Traceback (most recent call last):   File "<pyshell#1>", line 1, in <module>     nums = [*range(-100, 100, 0.5)] TypeError: 'float' object cannot be interpreted as an integer  Please help!

Is there a way to step between 0 and 1 by 0.1?   I thought I could do it like the following, but it failed:  for i in range(0, 1, 0.1):     print i   Instead, it says that the step argument cannot be zero, which I did not expect.


As I've realized on  at the RPi SE, there are multiple .se domains that are ambiguous with the SEs on the site. I frequently see people refer to stacks as "Topic.SE" (RPi.se for example).   When I saw that the user that posted that answer on the linked post use rpi.se instead of rpi@se, I realized that people might mistakenly literally go to   Here's a few more examples of ambiguous .se domains:  rpi.se aviation.se chess.se academia.se so.se (StackOverflow I guess) beer.se drupal.se law.se photography.se webmasters.se   Should I/we encourage everyone to use "Topic.SE" or "Topic@SE"?

I've noticed across various stack exchange sites that when they refer to their own stack exchange on their site, they'll shorten the name to something similar to either:  EE.SE (Electrical Engineering Stack Exchange) OR Tex.Sx (LaTeX Stack Exchange)  Essentially they'll do XX.SE or XX.SX which has the possibility to generate some confusion for new users.    Have I not visited enough sites and just noticed an outlier or would it be beneficial for Stack Exchange sites to agree on a shortened name nomenclature?


I'm starting with Java and I'm trying to create one android bluetooth chat app but now Im facing this NullPointerException and seems like the null device is the problem but I still can't figure out how solve this. It was working all good until the bluetooth discovery and connection, then I started looking for chats tutorials and examples and made this one.  java.lang.NullPointerException: Attempt to invoke virtual method 'android.bluetooth.BluetoothSocket android.bluetooth.BluetoothDevice.createRfcommSocketToServiceRecord(java.util.UUID)' on a null object reference         at com.example.gabriel.eden.MainActivity$ConnectThread.run   @Override protected void onStart(){     super.onStart();     getPairedDevices();     buttonSearch.setOnClickListener(clicked);     newDevices.setOnItemClickListener(listItemClicked); }  private void getPairedDevices(){     Set<BluetoothDevice> pairedDevice = mBTAdapter.getBondedDevices();     if(pairedDevice.size() > 0 ){         for (BluetoothDevice device : pairedDevice){             arrayListPaired.add(device.getName() + "\n" + device.getAddress());             arrayListPairedBluetoothDevices.add(device);              ConnectThread connect = new ConnectThread(mBTDevice,MY_UUID);             connect.start();          }     } }   private class ConnectThread{      public ConnectThread(BluetoothDevice device, UUID uuid){         Log.d(TAG,"ConnectedThread: started");         mBTDevice = device;         deviceUUID = uuid;     }      public void run(){         Log.i(TAG, "RUN mConnectThread ");         BluetoothSocket tmp = null;          try {             Log.d(TAG, "ConnectThread: Trying to create InsecureRfcommSocket using UUID: " + MY_UUID);             tmp = mBTDevice.createRfcommSocketToServiceRecord(MY_UUID);         } catch (IOException e) {             Log.e(TAG, "ConnectThread: Could not create InsecureRfcommSocket " + e.getMessage());         }          mSocket = tmp;          //Connection to the bluetoothsocket         try {             //only return a successful connection or exception             mSocket.connect();         } catch (IOException e) {             try {                 mSocket.close();             } catch (IOException e1) {                 e1.printStackTrace();             }             e.printStackTrace();         }     }  }

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?


So I have a directory with file A and file B. I need to push file A to directory dirA and file B do directory dirB. The problem is that dirA should be hosted on GitLab and dirB on GitHub. Is there any way to do so?  This should work all time, so when I make some changes I can push them to proper repositories.

Is it possible to have 2 git repositories in one directory?  I'd think not, but thought I'd ask.  Basically, I'd like to check in my home directory config files (e.g. .emacs) which should be common across all of the machines I work on, but have a second repository for local files (e.g. .emacs.local), which contains machine-specific configurations.  The only way I can think of to do that is to have the local config in a subdirectory and ignore that subdirectory from the main git repository.  Any other ideas?


True or False  $$a\in \mathbb R\implies \sqrt{a^2} = a$$   a positive or negative, will always be equal to a, so for me it is true, but the teacher says that the expression is false, but I can not understand why?

Possible Duplicate:          The square root of a number squared is equal to the absolute value of that number. Why is $\sqrt{x^2} = |x|$? Why not just $x$? Please give me a reason and also help me prove it.


There are cases when I write a comment addressed to me just to say "yes you are right", "thanks, fixed" or "taken into account" etc.  It would be nice to have a simplistic way of doing so without adding a comment - like, have a button against each comment addressed to user pressing which sends a corresponding note to the comment author. Like, instead of saying "agreed", I press the corresponding button near comment and the message shows up ni Inbox and corresponding mark is displayed on the comment in the public.  This would both clean up the comments somewhat and improve the feedback (I would personally like to know that user who I replied to have appreciated the comment).  It is counter-prodctive to add "dismissed" mark because if someone does not agree with something they is expected to express it.

I'm fairly responsive to comments left on my answers. This often means updating an answer to incorporate new information or questions that have been added in the comments (or edits to the original question).  It would be useful to flag comments as 'addressed by edit', so that they can be deleted by the commentator, or highlighted for pruning by mods - I don't think this is in scope for the usual 'flag comment'.  More contentiously, it might make sense if comments flagged with 'addressed by edit' were automatically suppressed after a suitable period of time has passed - long enough to rule out silliness with duplicate comments being used to steal comment upvotes.  EDIT I'm not convinced that "This would mean that in the long run, you could delete any comments on your posts without involving others" would be a problem. It is a valid point, so the safeguard would be to have a veto, so that when a poster says 'addressed by edit' the commentator can say 'no it isn't'.  I can see there is still an argument that comments add to a SO users (offline) rep, however I believe mods clean-up posts anyway to remove comment noise, so I don't think anything is really lost.  Moving on to the concerns complicating the UI, I happily concede that a flag next to comments would be the wrong place. Presenting a list of comments plus checkbox at edit time would work, and should improve quality (as comments become prompts when editing).


How can I setup Cognito Forms to forward or send entries to my email address?

I have build a website for a finance company.  The Cognito Form is on the website as an application form.  I would like the information sent automatically to the finance company's email address (as soon as the form is submitted) without having to log into Cognito Forms. The finance company needs to know the exact moment the application for finance comes in. The finance company can not possibly log in to Cognito Forms 24/7 to check if there are any finance applications.


The Files application shows recent files, but the "Save as" window doesn't show recent locations used. This was a very useful feature in 16.04 LTS.  When I try to save a document in multiple locations, I now have to search for each one through the menu. How do I access the "recent locations" shortcut?

I was using 14.04 and upgraded to 16.04 yesterday.   In 14.04 I had recent folders on top of the sidebar of the Save as dialogue when I saved something from the net (Firefox if that helps). But that feature disappeared in 16.04 and I really want to have it back.   Here is a picture of what I'm trying to explain:  (the save as dialogue in 16.04 without the recent folders on top)


I'm writing a db update script which basically retrieve the current version number from the database then create a number of stored procedure if the version is valid. If the current version does not match the expected version then it should skip executing the code.  However I run into a problem when I write the script because CREATE PROCEDURE has to be the first statement in a batch, so it's not possible for me to insert if .. else statement before the create procedure statement.   I've also tried using GOTO but to no avail because GOTO doesn't span across multiple batches. Same thing applies to RETURN and RAISEERROR - the rest of the code will still execute.  Sample script:  IF @Version = '1.0' --doesn't work BEGIN     CREATE PROCEDURE dbo.uspCreateAccount     AS BEGIN     --The rest of the code goes here     END END   Can anyone provide some insight on this?

As part of my integration strategy, I have a few SQL scripts that run in order to update the database. The first thing all of these scripts do is check to see if they need to run, e.g.:  if @version <> @expects     begin         declare @error varchar(100);         set @error = 'Invalid version. Your version is ' + convert(varchar, @version) + '. This script expects version ' + convert(varchar, @expects) + '.';         raiserror(@error, 10, 1);     end else     begin         ...sql statements here...     end   Works great! Except if I need to add a stored procedure. The "create proc" command must be the only command in a batch of sql commands. Putting a "create proc" in my IF statement causes this error:   'CREATE/ALTER PROCEDURE' must be the first statement in a query batch.   Ouch! How do I put the CREATE PROC command in my script, and have it only execute if it needs to?


I have a question regarding annotating text data for classification.  Assume we have ten volunteers who are about to annotate a large number of texts into label A or B. They probably won't have time to go through all the text samples, but at least a significant portion of them.   Should we focus on generating new samples for each annotator? (They never see the same text samples as any other annotator) (quantity approach). Or should all annotators see the same samples and the annotator agreement is taken to account? (quality approach).   Thoughts,   will generate more unique samples than 2. (more training samples for a classifier) - and hoping that in the feature extraction part, the useful features will appear by themselves. will generate less unique samples, but with the annotator agreement taken into account. (less training samples for a classifier, but with higher quality)


I have just downloaded eclipse for php dev's and after extracting it from the archive I discovered that it has no installer since I'm guessing that ~/Downloads/ is not where Programmes potentially shared by all users are supposed to end up. Is it good practice to mv the whole folder into /usr/share/Eclipse/ and symlink it's executable in /usr/share/applications so Ubuntu realizes that Eclipse is installed?

I want to install the latest version of Eclipse but the Ubuntu Software Centre contains an older version.  Is there a PPA or some other way to install latest Eclipse? Please describe the steps for full installation.


I use a lighting web component to create multiple related records linked to a parent record. After this is completed I use the NavigationMixin to redirect back to the parent record. I am successfully redirected but the related list does not show the newly created records and I need to refresh the page again before they appear. Is there anyway I can force the page to be refreshed or to display these new related records when I am initially redirected? Below is the sample code of the final redirect navigateToParentRecord(){     this[NavigationMixin.Navigate]({         type: 'standard__recordPage',         attributes: {             recordId: this.recordId,             actionName: 'view'         }     }); }  Thanks

In Aura, we can do      $A.get('e.force:refreshView').fire();   to cause standard components to update.  How can we do an equivalent in LWC because sfdx refuses to publish .js code with $A in it saying the usage is disallowed in LWC?  For now i tricked it with   eval("$A.get('e.force:refreshView').fire();");   but that is obviously less than ideal....


I have a homework about implementing queues in java. I have written a code, but there is an error and I don't know how to fix it. Can please anyone help me with this?  Here is my code:  public class Radha {      public int num;     public Radha pas;      public Radha(int num){          this.num = num;      }         public void shfaq(){          System.out.println(num);      }      public static void main (String [] args){          Radha x = new Radha(1);         Radhe1 r = x.new Radhe1();         r.enqueue(1);         r.shfaq();       }      class Radhe1{          public Radha koka;         public Radha bishti;          Radhe1(){              koka.pas = null;             bishti = koka;          }          public void shfaq(){              Radha theLink = koka;              while(theLink != bishti){                  theLink.shfaq();                  theLink = theLink.pas;              }          }          public boolean bosh(){              return(bishti == koka);          }          public int iPari (){             if (bosh())                 System.out.println("radha eshte bosh");                     return(koka.num);         }          public void dequeue(){              if (bosh()){                 System.out.println("radha eshte bosh");             }             else{                 koka = koka.pas;             }          }          public void enqueue(int a){              bishti = bishti.pas;             bishti.num = a;             bishti.pas = null;          }      }  }

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 have configured master-master replication in mysql 5.7.22 and its working fine. I am using below settings for PK values. I found issue in their ID sequence and pk values missing their sequence values    1 2 3 5 6 8   its missing 4 & 7 because its replicate latest auto increment value from one server to another server so its skip the numbers. Is there any workaround through which we can maintain this sequence  Server A: auto-increment-increment=2 auto-increment-offset = 1  Server B: auto-increment-increment=2 auto-increment-offset = 2

Using OpenSUSE leap 15.1 10.2.29-lp151.2.9.1-x86_64 from vendor OpenSUSE (installed)  CREATE TABLE testtab2(     my_id2 INT AUTO_INCREMENT,     name2 VARCHAR(10),     comment2 VARCHAR(20),     PRIMARY KEY (my_id2) );   testtab.txt:  |Roger |hurray   | |George|today    | |Paul  |yesterday| |John  |last year| |Ringo |tomorrow |   LOAD DATA LOCAL INFILE 'testtab.txt' INTO TABLE testtab FIELDS TERMINATED BY '|';   works fine with linenumbers (my_id) 1-5  INSERT INTO testtab (name,comment) VALUES ('Beatles','band');   this gets linenumber (my_id) 8 - should be 6.  If testtab.txt have 8 records and using INSERT INTO 1 record this gets linenr (my_id) 16. This happens in other tables too - one moved from 199 to 256.  Anyone who can solve the problem?


Given any open cover of the set I need to find a finite subcover, how can I do it?

Let $S=\{\frac{1}{n}:n\in\mathbb{Z}\}\cup\{0\}$ be a subset of $\mathbb{R}$. I have to prove using the open cover definition that this is compact. Could you help me, please?


I had a problem: my folders and files did not open with a double click. I found here the answer to the question, but the description was not very detailed, and I could not use the advice.

Can't open a folder in windows 7 64bit, by double clicking, it shows me that the default option for opening folder is "cmd" (it's highlighted when i'm right clicking a folder, and the "open" option comes next). I've tried running some registry fixing tools, but it didn't fix it. Can someone suggest me what should I do.


1000000 1_000_000  Both these literals are modern ways to represent the same number, but the syntax coloring stops at the underscore. I hope this can be fixed. Turns out the answer is:  Stack Exchange does not have its own syntax highlighting engine. It uses , and is not necessarily using the latest release of that library. Therefore, any bugs and feature requests regarding syntax highlighting cannot be handled by Stack Exchange.

I noticed that sometimes my code gets highlighted in different colors when rendered.   What is syntax highlighting? How does it work? Why isn't my code being highlighted correctly? How do I report a bug or request a new language? How do I use syntax highlighting? What languages are currently available on Stack Exchange?


I'm using QGIS 3.12.   I have a list of coordinates in txt file, as follows  "longitude" "latitude"    48.819056, 2.127009    48.782213, 2.143340    48.801580, 2.355238   48.904471, 2.296038   How to plot this list of points on a layer in my project?

I have a map of a city and a .csv-file containing 700 geographic coordinates pointing to locations within that city.  How can I plot these 700 locations on the map?


I've a function in a library (so, that I cannot change) like this:  char mName[MAX_PARAM_NAME_LEN];  void IParam::InitBool(const char* name) {     strcpy(mName, name); }   I'd like to pass text as Text0, Text1 (and so on) "faster", writing directly inside the function, starting from a text and an integer, without store additional variables on my own; such as:  int mIndex = 0; InitBool("Text" + mIndex);   How would you do it? Wrap functions? Which one? Best approch? In C# thats pretty done, I find hard to do it in C++.

I thought this would be really simple, but it's presenting some difficulties. If I have std::string name = "John"; int age = 21;  How do I combine them to get a single string "John21"?


I was given a task to find  $$\lim_{x\to0}\frac{x-\sin{x}}{x^3}$$ at my school today. I thought it was an easy problem and started differentiating denominator and numerator to calculate the limit but the teacher then said we aren't allowed to use  L'Hopital's rule, but to "play around" with known limits and limit definition. I got stuck here since I can't really think of a way to do this, and according to my teacher, there are at least 4 ways. A subtle hint would be enough. Thanks.

I'm trying to solve this limit     $$\lim_{x\to 0} \frac{\sin x-x}{x^3}$$   Solving using L'hopital rule, we have:  $$\lim_{x\to 0} \frac{\sin x-x}{x^3}= \lim_{x\to 0} \frac{\cos x-1}{3x^2}=\lim_{x\to 0} \frac{-\sin x}{6x}=\lim_{x\to 0} \frac{-\cos x}{6}=-\frac{1}{6}.$$  Am I right?  I'm trying to solve this using change of variables, I need help.  Thanks  EDIT  I didn't understand the answer and the commentaries, I'm looking for an answer using change of variables.


I tried executing the following c code:  #include <stdio.h> int main()  { int i=2000,j=100;  printf("%d",(j,i));  }   I gave different values to i and j and found the output. I always get the output as the value contained in the second variable. Does the expression always give the last variable as a result or does it have any other meaning?


I can run taskmgr, Display, add column, select "command line", and I will see the complete command line of a process.  For what I check, this command line is quite long, and I can write it out (CTRL-C is ineffective). Is there a better way?

I'm looking for a tool or method to find out what command line parameters have been passed to a program, for example when it was run by another program (launcher-application scenario).


I am having confusion, where to put comma, in the following case after the word water:   There are roughly 1000 different words for “water,” as well as for “louse”.   Or should I use put comma after quotation mark? As in:   There are roughly 1000 different words for “water”, as well as for “louse”.

What is the rule for comma placement before a quotation mark? When should the comma go before and when should it go after the quotation mark?


Given the partitioning: $X =  \begin{pmatrix}{} x_1  \\ \ x_2 \end{pmatrix}$ for a normal random vector with mean $\mu =  \begin{pmatrix}{} \mu_1  \\ \ \mu_2 \end{pmatrix}$ and covariance matrix: $\Sigma =   \begin{pmatrix}{} \Sigma_{11} & \Sigma_{12}  \\ \ \Sigma_{21} & \Sigma_{22} \end{pmatrix}$ where $\Sigma_{22}$ is invertible. How can I understand the following mean,covariance of a distribution of a random variable $X_1$ under condition $X_2 = x$? I'm struggling with formula for both the mean and covariance which are given specifically as: $\mu_1 +\Sigma_{12}\Sigma_{22}^{-1}(x-\mu_2) $ and $\Sigma_{11}- \Sigma_{12}\Sigma_{22}^{-1}\Sigma_{21}$. I'm just getting into multivariate statistics, so I would preferably just try to get some intuition behind these two formulas if possible.

Suppose that $\mathbf{X} \sim N_{2}(\mathbf{\mu}, \mathbf{\Sigma})$. Then the conditional distribution of $X_1$ given that $X_2 = x_2$ is multivariate normally distributed with mean:   $$ E[P(X_1 | X_2 = x_2)] = \mu_1+\frac{\sigma_{12}}{\sigma_{22}}(x_2-\mu_2)$$  and variance: $${\rm Var}[P(X_1 | X_2 = x_2)] = \sigma_{11}-\frac{\sigma_{12}^{2}}{\sigma_{22}}$$  It makes sense that the variance would decrease since we have more information. But what is the intuition behind the mean formula? How does the covariance between $X_1$ and $X_2$ factor into the conditional mean?


How do I find which program is using port 80 in Windows?  I can't find it.

How can you find out which process is listening on a TCP or UDP port on Windows?


I've seen the other posts and here and elsewhere, I've checked the youtubes, and every answer seems to be for the last gen consoles. But how do I remove the Armor Vest from my character in GTA 5 for the PS4?   I know it's only cosmetic but it's bothering me.  On the PS4 there is no "options" button, I don't see the "inventory", and the menu is different than before.   And is there a way to alter your appearance once you're in game after you've transferred the character from the old system?  Anyone?

It's kind of hard to shop for clothes with a big bullet proof vest on.  Is there a way to take off the armor after missions, or at least hide it?


I very often take screen shots, and have my system configured to save them directly to the desktop, without the intermediate processes. This question has been asked a lot. For example, see the following:   However, none of the situations and solutions discussed there are applicable.  The questions above talk about 5-6 seconds to save. On my system it takes 15-20 seconds. This is a 2017 iMac; not a slow machine.  A lot of the discussion talks about Google Backup and Sync. I have never used these.  Some of the discussion talks about turning off anti-virus. As I test, I turned off Bitdefender. It made no difference.   Any other ideas? EDIT: several posters have suggested unchecking "Show Floating Thumbnails". This has never been checked on my system, as explained in my comment to an answer below. This suggestion does not solve the problem.

How do I disable this:    after taking screenshot?


Basically I am trying to recursively  list sub directories until I hit a directory where there are no more directories to be found. The problem here, is that when I pass the argument into the function, as it is given, the ls command doesn't work. Without the $var in quotations, ls treats the space separated string as multiple arguments.  Why is this happening and how can I avoid it?  #! /bin/bash function subdir_check(){     local var="$*"     ls -F -b "$var" | grep '/' | sed 's/\///g' } directory="$1" if [[ $(subdir_check $directory) != "" ]] then      pick=$(subdir_check $directory | rofi -dmenu -p 'Select Subdirectory')     directory="${directory}/${pick}"     while [[ $(subdir_check $directory) != "" ]]     do         pick=$(subdir_check $directory | rofi -dmenu -p 'Select Subdirectory')         directory="${directory}/${pick}"     done fi echo $directory

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


I'm learning to code java and at the moment I'm trying to make a basic game of "21".   There are two "do while" loops in the code:    where I want the player to choose whether he wants to draw a new card and  where I want the player to choose if he wants to play a new game when the last one finished.   However, it doesn't matter if I answer both questions with "Yes" or "No", the loop always breaks and "ends".  Is there something wrong in my logic?   Thanks a lot for the help.  import java.util.Scanner;  public class twentyOneGame {   public static void main(String[] args) {     int computerCard;     int playerCard;     int playerSumCards = 0;     int computerSumCards = 0;     int cardAmount = 0;     String keepPlaying = "Yes";     String keepGoing;       System.out.printf("Enter your name %n");     Scanner input = new Scanner(System.in);     String playerName = input.nextLine();      do {         do {              playerDraw playerdraw = new playerDraw();             playerCard = playerdraw.getPlayerCard();             playerSumCards += playerCard;              computerDraw computerdraw = new computerDraw();             computerCard = computerdraw.getComputerCard();             computerSumCards += computerCard;             cardAmount += 1;              System.out.printf("Your have %s card(s). Your total is %s. %n", cardAmount, playerSumCards);              input = new Scanner(System.in);             System.out.printf("Do you want to draw another card? Yes or No %n");             keepGoing = input.nextLine();          } while (keepGoing == "Yes" && cardAmount < 3);           if (cardAmount == 1) {             System.out.printf("Your total is %s %n", playerSumCards);             System.out.printf("The computers total is %s %n", computerSumCards);              if (playerSumCards > computerSumCards) {                 System.out.printf("Good job %s, you won! %n", playerName);             } else {                 if (playerSumCards == computerSumCards) {                     System.out.printf("It's a draw! %n");                 } else {                     System.out.printf("Oh no, the computer won! %n");                 }             }         } else {             if (cardAmount == 2) {                  System.out.printf("Your total is %s %n", playerSumCards);                 System.out.printf("The computers total is %s %n", computerSumCards);                  if (playerSumCards > computerSumCards) {                     System.out.printf("Good job %s, you won! %n", playerName);                 } else {                     if (playerSumCards == computerSumCards) {                         System.out.printf("It's a draw! %n");                     } else {                         System.out.printf("Oh no, the computer won! %n");                     }                 }             } else {                 if (cardAmount == 3) {                      System.out.printf("Your total is %s %n", playerSumCards);                     System.out.printf("The computers total is %s %n", computerSumCards);                      if (playerSumCards > computerSumCards) {                         System.out.printf("Good job %s, you won! %n", playerName);                     } else {                         if (playerSumCards == computerSumCards) {                             System.out.printf("It's a draw! %n");                         } else {                             System.out.printf("Oh no, the computer won! %n");                         }                     }                 } else {                  }             }         }         input = new Scanner(System.in);         System.out.printf("Do you want to keep playing? Yes or No %n");         keepPlaying = input.nextLine();          if (keepPlaying == "Yes") {             playerSumCards = 0;             computerSumCards = 0;         } else {             System.out.printf("Thanks for playing, %s %n", playerName);             break;         }      } while (keepPlaying =="Yes"); } }

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


Qt contains many classes and functions that are useful for a QML project, but not readily available. The existing solutions do not employ a method that is platform independent, thus it is unclear whether it will work for ubuntu-touch devices.  In order to add the functionality of a Qt class or one of its member functions, what steps need to be followed, and why do they need to be included?

According to Qt5 documentation:  all public slots of C++ classes that inherit from QObject, are accessible from QML Here what I did:  C++  class MyClass : public QObject {     Q_OBJECT  public slots:     void doStuffFromQmlSlot()     {         qDebug() << Q_FUNC_INFO;     }  public:     MyClass()     {         qDebug() << Q_FUNC_INFO;     } };   my main.cpp contains:  MyClass myClass; QQmlEngine engine; engine.rootContext()->setContextProperty( "myclass", &myClass ); QQmlComponent component( &engine, QUrl::fromLocalFile("qml/qtquick-01/main.qml") ); component.create();   QML  import QtQuick 2.0  Rectangle {     width: 360     height: 360     Text {         text: qsTr("Hello World")         anchors.centerIn: parent     }     MouseArea {         anchors.fill: parent         onClicked: {             myclass.doStuffFromQmlSlot();              Qt.quit();         }     } }   Actually the QtCreator seems to recognixe the exposed myclass object into the QML as it enables auto-completion of both class name (myclass) and the public slot doStuffFromQmlSlot(). When I run the application I unfortunately got the following error:  ReferenceError: myclass is not defined  Any clue on what I'm doing wrong?


I have a retail Windows 7 Home Premium license and installation CDs. I'd like to do a fresh install of Windows 10 on an old PC that's currently running Windows 10. If I wipe the machine and reinstall from scratch, will I be able to install Windows 10 and activate with my Windows 7 license, or can I somehow get my activation key out of my existing Wicked 10 installation? Or is it better to just use "Reset this PC"?

I've been using Windows 10 for a couple of month now (joined the Insider Preview).  Now my hard drive started ticking so I've bought a new SSD and I want to move the windows installation to the new hard drive, which has been connected to the computer (unpartitioned). I don't mind and I even prefer reinstalling it over again.   Since I have the free version of Windows 10 pro, can I still reinstall it anew? Does the windows 10 installation offer disk management and partition like the older Windows installations used to? How should I reinstall Winodws 10 x64 the easiest but still remain on free mode?


I have the following code and I want to center the text vertically next to the image.    .section_content {     width: 400px; }  .section_content > ul > li > img {     width: 40px;     height: 40px;     padding: 5px; }  .section_content > ul > li > a {     vertical-align: top; }  .section_content > ul > li {     list-style-type: none; }  .section_content > ul {     list-style-type: none;      padding-top: 45px;     padding-left: 5px; }

LinkedIn

GitHUb

Why won't vertical-align: middle work?  And yet, vertical-align: top does work.   span{   vertical-align: middle; }
      Doesn't work.


I am using Firefox 66.0.3, turned off autoplay settings, but I am still getting autoplaying news pages like the following:    How can I stop autoplay? Here are my settings:

Is there a way to let embedded videos (primarily Flash, but I'd prefer something that will also work with HTML5 video) automatically background load, but not start playing until explicitly started?  The typical use case where I want this ability is when opening a number of what I expected to be text pages in separate tabs using middle-clicks only to have something start yapping at me; at which point I need to click through all the new tabs to find and stop the offender.  I'd prefer not to completely block video download to avoid the startup delay if I decide to watch the video when I view the page its embedded in.


I have written a Apex class which is getting called in a trigger. Now I have written a test class for the Apex class. But it is not covering any lines. APEX CLASS public class ChangeOwnerClass{      public static void changeOwner(Quote quote){                  Opportunity opp = [Select ID, CreatedById, OwnerId from Opportunity where Id =: quote.OpportunityId];         System.debug(opp.OwnerId);         if(opp.OwnerId != null) {}             User user = [Select Id,ProfileId from User where Id=: opp.OwnerId];             System.debug(user.Id);             if(user!= null && user.ProfileId != null) {                 Profile profile = [Select name from Profile where Id =: user.ProfileId ];                 System.debug(profile.name);                 if(profile !=null && profile.name != null && profile.name == 'TriLink Sales & Service') {                     quote.ownerId = opp.CreatedById;                 }                          }         }     }  TRIGGER trigger ChangeOwner on Quote (before insert) {          for(Quote q: Trigger.new)         {             ChangeOwnerClass.changeOwner(q);         }             }  TEST CLASS @isTest public class ChangeOwnerTest {      @isTest static void changeOwnerTest(){         Opportunity opp = new Opportunity();         opp.Name = 'Test';         opp.LeadSource = 'Test';         opp.StageName = 'Identification';         opp.CloseDate = Date.newInstance(2020, 12, 14);         opp.OwnerId = '0056A00000264YcQAI';         insert opp;         if(opp.OwnerId != null) {}         User user = [Select Id,ProfileId from User where Id=: opp.OwnerId];         if(user!= null && user.ProfileId != null){             Profile profile = [Select name from Profile where Id =: user.ProfileId ];             if(profile !=null && profile.name != null && profile.name == 'TriLink Sales & Service'){                 Quote q = new Quote();                 q.Id = opp.Id;                 q.ownerId = opp.CreatedById;                 insert q;             }         }     } }  Could you please tell me what change needs to be done here?

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How is code coverage obtained and calculated? How do I increase my coverage?  Why can't I cover these lines? Why isn't the body of my loop or conditional statement covered?


On a table, with pgadmin (III) I see just emptiness in the geometry column of a table, while the layer is displaying properly in QGIS (2.14). Any idea on why and how to display the geometry in pgadmin ?

After loading a polygon shapefile into PostGIS, the geometry column (geom) is blank for several features. In one case, only a single feature has the geometry calculated and all others are blank. I'm using the PostGIS SHP and DBF loader v.2.0. I am creating a spatial index, and using COPY rather than INSERT. I have loaded several other point datasets and they geom column is populated just fine... (Otherwise, things are working just fine for the polygons: when I create a new feature, the geometry is calculated / geom field populated...etc.) Have I done something wrong when importing the data?  Solution by @ThomasG77 (in comments) PgAdmin3 [doesn't] display features that are too complex but they are present.  You can try SELECT length(ST_astext(the_geom)) from your_table to confirm or you can find "true" empty geometry with SELECT * from your_table WHERE the_geom IS NULL;.


I'm writing a python application that is supposed to run differently, depending on host/guest system context.   What I need is a function that tells where I am:  if IamRunningOnHost():     #start server if not running, connect to server else: #running on guest     #use different ip, terminate if server not running   Now the easiest way would be to detect some known file system differences between host and guest system or to have a config which I edit manually each time I switch system context.  Is there a cleaner and more universal way to differentiate whenever I am running inside of VirtualBox?   Edit1: My guest and host are both linux operating systems.  Edit2: I failed to mention, it has to be achieved via python call and without the need for root privileges. I also don't want to install additional software in the guest. I simply want to copy and run the application without the requirement of further system changes. The suggested duplicate "Detect virtualized OS from an application?" is therefore not helpful for me.

I need to detect whether my application is running within a virtualized OS instance or not.  I've found an article with some useful information on the topic. The same article appears in multiple places, I'm unsure of the original source. VMware implements a particular invalid x86 instruction to return information about itself, while VirtualPC uses a magic number and I/O port with an IN instruction.  This is workable, but appears to be undocumented behavior in both cases. I suppose a future release of VMWare or VirtualPC might change the mechanism. Is there a better way? Is there a supported mechanism for either product?  Similarly, is there a way to detect Xen or VirtualBox?  I'm not concerned about cases where the platform is deliberately trying to hide itself. For example, honeypots use virtualization but sometimes obscure the mechanisms that malware would use to detect it. I don't care that my app would think it is not virtualized in these honeypots, I'm just looking for a "best effort" solution.  The application is mostly Java, though I'm expecting to use native code plus JNI for this particular function. Windows XP/Vista support is most important, though the mechanisms described in the referenced article are generic features of x86 and don't rely on any particular OS facility.


It would be pretty helpful if the search fields (both quick search and advanced) would feature auto completion of   tags, once the [ and the first few letters are entered (maybe even including some typo fixing magic) advanced parameters by entering a simple : which could then be changed into something like is:, followed by sensible suggestions for that, in this example question, closed etc.

Hi,  Can we have a auto-complete feature for our search box, similar to Gmail's?  The Problem:   It's not easy to remember all the available search operators in the . There's no obvious direct link to go to the Search Options page. Newbie One only knows about it after reading the  page.   The Idea:  Example:   When we start typing click in the search box, a dropdown appears with list of operators stated in the . After we select/type an operator with colon (:), there should be a hint/list of possible values for that operator. When we start typing open square bracket ([) with a few letters, there should be a list of tags for us to choose from.   Sample mockup:     You can also think of it like Intellisense in Visual Studio / code-completion in some IDEs.   With this feature in place, I think the search functionality will be better than the major general search engines out there, as .  Note: The idea is not to make you type in your query faster. The idea is to let the (new) users know/remember such operators in a convenient way without the need to go to the Search Options page.  UPDATE: I included more info / idea here in response to Grace Notes's answer.


I have updated ubuntu from 16.04 to 18.04. The system has worked properly for one day.  After that it started to switching between airplane ✈ mode on and off continuously.

I have an HP Spectre x360 convertible laptop and I'm running Ubuntu 18.04. Every time I turn the screen sideways or in tablet mode and back, 'Airplane Mode' is activated. In fact, when I boot up and login, I have to manually turn off 'Airplane Mode' and turn wifi back on. I don't want to disable the gnome rfkill plugin like so: 'gsettings set org.gnome.settings-daemon.plugins.rfkill active false' because then I can no longer use bluetooth. Also, for some godforsaken reason, even when I DO disable the plugin, the gnome shell turns on 'Airplane Mode' anyway, which means that I have to go turn wifi back on EVERY time I log in. This is so annoying, I really liked where 18.04 was going but this is seriously breaking the whole gnome shell experience.


At the end of the Deathly Hallows part 2,Draco and Astoria are seen dropping their son off at platform 9 3/4. Lucius Malfoy never played an active role in the final battle though it's pretty clear he and his wife were death eaters. What happened to them at the end of the series? Did they go to Azkaban or were they let free because Narcissa lied for Harry?

All I can find about Lucius or Narcissa Malfoy, or their life after the Second Wizarding War, is that they were not sent to Azkaban and that they had a grandchild.  Is there any information about what happened to them and what they did after the Second Wizarding War?  Were they ostracized by friends because they left the Death Eaters publicly?  Were people scared to trust them?  Has J. K. Rowling given any information about what their life was like after the war?


I have a large file that's a couple hundred lines long. This file is partitioned into many parts by a specific identifier, lets say 'ABC'. This line 'ABC' appears 6 times so I want 6 output files. I'm familiar with split and awk but can't seem to create a command line that will do what I've described, any ideas?  Here's an example  ABC line 1 line 2 line 3 ABC line 1 line 2 ABC line1   I'd like three files where ABC is the first line in the new file and it ends before the next ABC is encountered.

I have a text file which I want to split into 64 unequal parts, according to the 64 hexagrams of the Yi Jing. Since the passage for each hexagram begins with some digit(s), a period, and two newlines, the regex should be pretty easy to write.  But how do I actually split the text file into 64 new files according to this regex? It seems like more of a task for perl. But maybe there's a more obvious way that I'm just totally missing.


I want the text to have this sort of colouring   And this is the text.

I know that for a mesh you can go into edit mode and select vertices and assign a specific material to them quite easily. I want to know if it is possible to do this with a Text object (which has no vertices).


I don't understand this code  print(*map(input().find,map(chr,range(97,123))))   This code is written by someone to find the position of each character's (a - z) first appearance when the user type in words. And if the character is not consisted in the word the position will be -1.  so for example if the input is  baekjoon   the output will be  1 0 -1 -1 2 -1 -1 -1 -1 4 3 -1 -1 7 5 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1   `I've written code for this but it is really long compared to the one at the top  a = [i for i in input()] result = 0  for i in range(ord('a'), ord('z')+1):   for j in range(len(a)):     if i == ord(a[j]):       result = j       break     else:       result = -1   print(result, end=" ")   With this code i get the same output but i think it's not well written code. So i really want to understand this code to improve my coding skill   print(*map(input().find,map(chr,range(97,123))))   what does that star do in front of map function and i just don't know what how that code works.

In the following method definitions, what does the * and ** do for param2?  def foo(param1, *param2): def bar(param1, **param2):


Electrons, Muons and Pauli Exclusion   Put in a possibly oversimplified way, lepton universality says that electrons, muons, and taus all behave in the same way except for mass effects.  The question is “Does this apply to Pauli exclusion?”  Due to the Pauli exclusion principle, only two electrons can be in the s orbital, and hence in the ground state of regular beryllium, two electrons are in the s orbital, and two electrons are in the p orbital.  My question is what happens in the ground state of dimuonic beryllium, with two muons and two electrons. Are all four particles in s orbitals, or are two in s orbitals and two in p orbitals?   A similar question can be asked about muonic lithium, which would be easier to create experimentally.  i.e., in muonic lithium, with one electron replaced by a muon, can all three leptons be in the s orbital?

In a normal atom, there is a limit of 2 electrons per obital due to the Pauli-Exclusion principle. I have seen people talking about replacing an electron with a muon, but since muons and electrons are distinguishable, would this then allow 2 electrons and 2 muons to occupy the same orbital, or would only 2 leptons be allowed to have the same set of quantum numbers?  For example, would a Beryllium atom with 2 muons and 2 electrons use only the 1S orbital, or would the 2S be used as well? Spectroscopic methods should be able to distinguish between the two.


I inherited the following code:      using (var dataAccessConnection = da.GetConnection()) //no opening curly brace here     using (var command = new SqlCommand(sql, dataAccessConnection.Connection))     {         command.CommandType = CommandType.Text;         using (var sqlDataReader = command.ExecuteReader(CommandBehavior.CloseConnection))         {             while (sqlDataReader.Read())             {                 rueckgabe.Add(new Myclass                                   {                                       Uid = Guid.NewGuid(),                                       ImportVersionUid = versionUid,                                       MyProperty = Convert.ToInt32(sqlDataReader["MyProperty"])                                         });                    }         }         command.Connection.Close();         dataAccessConnection.Connection.Close();     }   Looking at the code I expexted an opening curly brace after the using clause.  The code compiles  and does what it is expected to do.  The application behaves unpredictable. At some time it cant access the Database server.  Does this code make sense? Does  dataAccessConnection have the rigth scope?

Why does everyone tell me writing code like this is a bad practice?  if (foo)     Bar();  //or  for(int i = 0 i < count; i++)     Bar(i);   My biggest argument for omitting the curly braces is that it can sometimes be twice as many lines with them. For example, here is some code to paint a glow effect for a label in C#.  using (Brush br = new SolidBrush(Color.FromArgb(15, GlowColor))) {     for (int x = 0; x <= GlowAmount; x++)     {         for (int y = 0; y <= GlowAmount; y++)         {             g.DrawString(Text, this.Font, br, new Point(IconOffset + x, y));         }      }  }  //versus using (Brush br = new SolidBrush(Color.FromArgb(15, GlowColor)))     for (int x = 0; x <= GlowAmount; x++)         for (int y = 0; y <= GlowAmount; y++)             g.DrawString(Text, this.Font, br, new Point(IconOffset + x, y));   You can also get the added benefit of chaining usings together without having to indent a million times.  using (Graphics g = Graphics.FromImage(bmp)) {     using (Brush brush = new SolidBrush(backgroundColor))     {         using (Pen pen = new Pen(Color.FromArgb(penColor)))         {             //do lots of work         }     }  } //versus using (Graphics g = Graphics.FromImage(bmp)) using (Brush brush = new SolidBrush(backgroundColor)) using (Pen pen = new Pen(Color.FromArgb(penColor))) {     //do lots of work }     The most common argument for curly braces revolves around maintance programming, and the problems that would ensue by inserting code between the original if statement and its intended result:  if (foo)     Bar();     Biz();     Questions:   Is it wrong to want to use the more compact syntax which the language offers? The people that design these languages are smart, I can't imagine they would put a feature which is always bad to use. Should we or Shouldn't we write code so the lowest common denominator can understand and have no problems working with it?  Is there another argument that I'm missing?


I've been rejecting my fair share of plagiarized suggested edits, mostly tag wiki edits, on my two beta sites I'm involved in.  Here's the thing: It's way to easy for them to get through. For one to get through, all we need is two (three on SO) reviewers on the post that don't bother to punch the edit into Google in quotes - something I'm certainly guilty of not doing.  What if we could have the system alert subsequent reviewers to the problem after a reviewer rejected the edit as plagiarism? Then, only one person would have to do the long, back-breaking task of punching it into Google.  Here's what I'm thinking:  When I go to reject an edit, add a text field to the copied content reason, a place to indicate where the content was copied from:    Since we now have this information, we can show it to subsequent reviewers - along with a big red alert bubble:      The link would be clickable, opening a new tab with the allegedly-copied-from website. Then, I, as the subsequent reviewer, would be instantly alerted to the potential problem - allowing us to have a better filter for plagiarism.  I realize it's a big change - it would probably have a slight hit on performance. But it would have a huge hit on the amount of plagiarism that gets through - making the internet a better place.

A pet peeve of mine is people who copy and paste text from Wikipedia for tag wikis, don't source their text, and then get approved in the blink of an eye.    I'm aware that you can Improve a tag wiki , but I'm not quite there yet.  So my options are:   wait for the wiki to get approved anyways, go back and either add a source or clean up the text, or ... reject the edit, and hope that two other people notice the problem and flag the same.   You can guess which option happens much more often.  So, I have a few thoughts on how to handle this:   One or two (preferably one) "Copied content" rejection should immediately reject the tag wiki edit. Each "Copied content" rejection increases the number of votes required to approve the edit by 1 or more votes, in the hopes that others are given enough time to flag appropriately. Any "Copied content" rejection voids any previous approvals, effectively starting the review process over.     BONUS FEATURE:  Once an edit has been flagged as "Copied content", if you try to approve the edit, you get a warning first along the lines of "There are one or more "Copied content" rejection flags, are you sure you want to approve this?"  DOUBLE-BONUS FEATURE:  As above, but once any edit has been flagged for any reason, if you try to approve the edit, you get a warning first indicating that the edit has one or more rejection votes.  ...  Personally, my vote would go to #1 or #3, as #2 might be difficult to implement (but I have no idea what the code base looks like, so I could be completely wrong here).  The only problem with #1 I could see is that the "Copied content" flag would have to function differently for tag wiki edits than regular edits; otherwise, you could have people flagging everything as "Copied content" just to reject an edit quickly.  Option #3 could function as-is for both tag wiki edits and regular edits, since I don't think we wouldn't want copied content to be approved for either questions, answers or tag wikis.    Update 2013/02/04  After a week of giving the review queue another try again, I'd be in favor of Option #3 plus the DOUBLE-BONUS FEATURE.   It's a small sampling of data, but I pretty consistently came in as vote #3 on a Copied Content edit, would vote to reject, and then watch as the edit got its third approval vote (fourth vote in total) shortly afterwards.   If approval votes got cleared out from a Copied Content rejection and all future reviewers would see upfront that there is a rejection flag against the edit, this would go a long way to making sure the edits are handled properly.


I've been using the new minecraft launcher to play and old version, beta 1.3. I would like to use single player commands but one of the mod files needs to go into the bin folder. The new launcher doesn't create a bin though, so what should I do? (Someone has probably already asked, but I have no idea how they would word it so I asked on my own :)

I've recently changed to the new Minecraft launcher, and I have noticed a change in the .minecraft folder layout. I can no longer install mods just by copying it over into the versions/1.6.1 jar file, as this file refreshes every time it is launched.  For those who don't know what I am talking about, here is the new layout:    I am specifically trying to install Optifine, which does work with 1.6.1. Where do I drag in the mod files now? I can't seem to find a jar file that is suited to it, except in the version folder, but as I stated above, this refreshes every time.  After copying a recent version and renaming it in the version folder, I get this error in the development console:   Unexpected exception refreshing version list java.lang.IllegalArgumentException: Version '1.6.1' is already tracked     at net.minecraft.launcher.updater.VersionList.addVersion(VersionList.java:91)     at net.minecraft.launcher.updater.LocalVersionList.refreshVersions(LocalVersionList.java:44)     at net.minecraft.launcher.updater.VersionManager.refreshVersions(VersionManager.java:47)     at net.minecraft.launcher.Launcher$2.run(Launcher.java:164)     at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)     at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)     at java.util.concurrent.FutureTask.run(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)     at java.lang.Thread.run(Unknown Source)


Is there any way I can set shortcuts of Alt+Space and then C to close and Alt+Space and then X to maximize the window?  It was perfect in Ubuntu 16.04 but removed in 18.04. Please suggest any way to get that shortcut back in Ubuntu 18.04.  I looking for shortcut in right click context menu on titlebar as per the screenshot.    Any help is appreciated.

On Ubuntu 16.04 LTS I have used simple keyboard shortcut to set property Always on Top (Nautilus window as example):   Alt+Space,    t After next Alt+Space or right mouse click I see that window was set to Always on Top.     In standard Ubuntu 18.04 LTS with GNOME Shell I can press Alt+Space:    but it does not react to t.  Seems to be a real .    How to enable such menu accelerators/mnemonics in standard Ubuntu 18.04 LTS?


When I flag a question as "doesn't belong here", the new 'off-topic' subcategories are great, but there's a little disconnect between the top-level blurb and the options actually displayed beneath. The headline is:     This question does not appear to be about programming, within the scope defined in the help center   and the options presented are:    All those options are about questions that the OP might feasibly have thought would be ok on SO. There isn't currently an option for 'has nothing to do with programming at all and wouldn't even be on topic on another stackexchange'.  Could an option be added to cover plain 'off-topic' questions?   Or should we treat such posts as spam even without an 'advertising' aspect?  Edit: I didn't realise 'Other' is still available in the Close vote options, which changes things somewhat (I was under the impression one of these options would have to be picked for the close message). So I am happy with the options as-is, it's only a little confusing for <3k rep users who go to flag, not a problem as such.

I have less than 3000 rep on StackOverflow. Now that the new closing changes are live, I cannot supply a custom off topic message:    I can enter a custom off topic flag message without issue here on meta, though it only has three canned off topic reasons, rather than five.  I'm not sure if this is the same for users with enough rep to vote to close directly, but the lack of a custom message eliminates the ability to use the correct flag reason in some cases.  For example, I wanted to flag , which is simply off topic on SO. However, I can't use a custom message, and none of the canned ones are appropriate.    appears to be the most up to date official information on custom reasons, and indicates that they are remaining in play for now.  supports that.  If this is by design, how should I flag such questions? This is not a case worth bothering the mods over, so I don't want to use a custom diamond attention flag.


When looking at questions on StackOverflow these days I can't help but notice that most questions don't get a "proper" answer anymore. Instead, they are lots of comments to the question which try to answer it. I even had it that when I wrote a "proper" answer I was getting downvotes because I could have written a comment. Now I don't really mind the downvotes, as everyone can vote as he or she pleases, however it got me thinking if I'm doing things the wrong way.   As far as I understand the system, comments are for asking clarification questions and answers are where you put your answer in. The whole reputation system works around this assumption. Also from a usability point of view burying the answer in a thread of comments which is only shown after some clicking doesn't seem right either.  So are there some guidelines on when to put answers into comments instead of doing a "proper" answer that I just missed or did I just happen to see a pattern where no pattern exists and the majority of questions is still getting "proper" answers?

I was browsing through some StackOverflow posts, and I noticed that often, comments had small bug fixes indirectly unrelated to the question. However, in some of these cases, the small bug that the commenter thought had nothing to do with the question turns out to be the right answer. My question is: When you have a tiny bug fix that you are not sure will fix the problem, do you put it in a comment or do you answer the question.


Is this triangulation of klein bottle right? I need to make a 10 vertices triangulation of klein bottle and i don't know almost anything about triangulation but tried to do one anyway and not sure if it's right. What i know is triangles must not connect more than one vertice or one edge. And an edge only be edge of one or two triangles. But AF edge is edge of four triangles if i get that right, so i don't know what am i supposed to do. (there is an F on the right middle too i forgot to write it)

I stumbled upon the following triangulation of the Klein Bottle in page 76 of the book Topology and geometry for physicists by Charles Nash and Siddhartha Sen.    Below the figure, it says "the triangulation $K$ consists of eight $0$-simplexes[...]".  I think this is not an eight-vertex triangulation, but rather a nine-vertex triangulation of the Klein bottle. I also know, thanks to the great comments under  question, that an $8$-vertex triangulation of the Klein bottle is a minimal one, hence the one portrayed in the book isn't minimal.  Am I correct?


I've been trying to use the heatmap plugin on QGIS (2.8.2) on Ubuntu(14.04) but the drop down for the output formats doesn't get populated.   Selecting the drop-down allows me to press OK on the plugin popup which gives "GDAL driver error: Cannot open the driver for the specified format".   I've installed GDAL according to . The drop down gets populated and works as expected in Windows. How can get the same to work on Ubuntu?  Update : I've tested on a different Ubuntu (14.04) machine and it worked as expected, so the problem seems to be occurring on only some machines

In QGIS 2.8, the heatmap plugin got CRS broken. I updated to 2.10, now in the plugin the dialog is broken: it does not let you choose the format.  I render layers for atlases with heatmap style. But I need to export it to GeoTIFF, and I don't see a way to do this.  Updating the QGIS is not easy in Ubuntu, since it works normally when installed from a PPA, but installing from sources, or downloading debs is  very painful.  Is there a workaround?  A command line example will do too.  edit here's a screenshot. The format list is empty, and if I write file extension manually as I did here, it still does not allow, showing a message that format is not chosen.    Meanwhile in another dialog, format choice works correctly:    Versions:


A collegue of mine has created a model with SketchUp and I want to import it into blender now. He created several formats from the model(*.3ds, *.dae, *.obj) which I can import. However, I always do not seem to get the correct dimensions for the objects after the import. Also, depending on which format I choose to import, the dimensions are different.  So, there are two options now. Either, the dimensions get broken when he does his export. Or Blender fails to import correctly.   How can I rule out the second option? How do I import respecting the dimensions of the object from either *.3ds, *.dae or *.obj?  The current situation when importing from *.ds looks like this: One of the models should have dimensions of about 2,10m length and 1,10m width. In Blender's object mode:   In edit mode with edge length enabled:    Why are the dimensions so different? Even the ratio of the sides is off in object mode.  edit: When I import from *.dae the dimensions in edit mode are correct but not the ones shown in object mode. What is the difference between the two in the first place?

I just found out about the Mesh Display : Length feature in the "N" panel (thanks to ) that allows one to measure the length of a face or vertice.  But my first encounter with this tool gives me complex feelings of love and hate, see how, as I was trying to measure the aspect ratio of this TV screen, I am getting WIDTH = 20.33 and HEIGHT = 37.57.  These values seem awfully wrong, since my betrusted eyes tell me the height should be shorter than the width.    I have tried measuring the single vertices as well, to identical results.


I have the following circuit:    I have to solve for VO. I know that the input voltage to the left op amp is -1 at both terminals and -2 for the right op amp. I also know that the input current to both is 0.  However, I don't know where to start to find VO. Can someone point me in the right direction?

– Schematic created using   I am attempting to solve the above circuit for V0. Current and Voltage variables are from me. Thus far I've used KCL to say that $$i_3 = i_2 + i_1$$ and by ideal op amp function, $$ V_1 = 1V $$ $$V_3 = 2V $$  From there I say that $$ \frac{-1}{10k} +  i_2 = \frac{2-V_0}{40k}  $$  But that doesn't really get me any closer to finding V0, what am I missing?


I'm beginner in PHP and was wondering what's the difference between this  $variable = "text";  if($variable){     echo $variable;  }   and this  $variable = "text";  if(isset($variable)){     echo $variable;  }

It seems like my code works to check for null if I do  if ($tx)    or   if (isset($tx))   why would I do the second one when it's harder to write?


Is there a technical term for the relationship between a word and its equivalents in other languages? I thought of cognate, but don't think it quite works, as cognates could include words like chief and chef which aren't in fact synonymous, and would exclude words which have the same meaning in different languages but have no etymological connection (like "hombre" and "man" in this case). Obviously "equivalent" does the job, but is there a more precise linguistic term? Something like transynonym, perhaps?

According to Google (I'm not sure which dictionary source they use) the meaning of synonym is:     a word or phrase that means exactly or nearly the same as another word   or phrase in the same language, for example shut is a synonym of   close.   I want to know if there is a similar word to describe when two words or phrases from different languages are used to refer to the same thing or idea.  The word cognate almost suffices except, Wikipedia says this about the word:     In linguistics, cognates are words that have a common etymological origin.   and      Cognates do not need to have the same meaning, which may have changed as the languages developed separately.   So what word would I use when trying to explain that I have several words from different languages that have the same (synonymous) meaning, but they might have different origins. English and Chinese words for the same concept for example, most certainly will not be cognates.  Here is an example sentence where I might use the word I seek:     Chinese "饥饿" and Arabic "جوع" are ______ for the English word "hunger".   The word "translations" would actually work here, but I am looking for a more linguistic term for the actual concept that these words refer to and that links them together.


Is there any reason to use a remote control with a ceiling fan (that most come with), which requires a battery and can get lost, when a simple dimmer switch can be installed to regulate the speed? Is it, for some reason, bad to use a dimmer switch with a ceiling fan? This assumes the fan does have a separate wall switch and is not directly wired with a chain switch, like some old ones used to.

I have a ceiling fan on our bedroom's vaulted ceiling. Since we don't want 7' pull-cords, the speed is stuck at full-tilt, which is no good. The fan has separate switches on the wall for lights and fan on/off, though, so I tried putting a dimmer switch on the fan. Can that do any damage to the fan's motor, or is there anything else I'm not thinking of that could be a problem? I've noticed the fan makes a little bit of a groaning noise when I have the rheostat down, but since I've never heard the fan at slow speeds, maybe that's normal.


I get blocked because my questions have been closed several times without a clear reason for closing them. Why were my questions closed?     (now closed and deleted)   (now closed and deleted)   (now deleted)

Questions can be closed or marked as duplicates.  What does it mean for a question to be "closed"? What does it mean for a question to be marked as a "duplicate"? Who can close a question? What are the reasons for closing a question ? Is closure the end of the road for a question? When are closed questions eligible for deletion?   Related        For more information, see "" in the .


I am travelling to United States and on my return will be transitting through Toronto Pearson International and transit hours is 3 hours 41 min. Do I need a visa in Toronto Airport? I am a Nepalese Citizen and I hold U.S visitor visa for 5 years.

I'm passing through Canada, on my way to somewhere else. I'm staying only a short time.   Is there a website, or some other way of find out out if I need a visa?


I have a Gun Mettle campaign coin and have currently done 3 contracts. Two right when it came out then a third yesterday. I think I read something stating two contracts will be available per week, but when (i.e. what day(s) of the week) do they refresh?

I completed the two contracts I was given (Scout and Heavy), and earned two of the 'Teufort' weapons for turning them in.  I expected to get some new contracts so I could continue to earn some more of the schmancy new weapons, but I can't seem to find out how to get more.  Do I need to buy the ticket again to unlock more contracts? If not, how are contracts assigned?


Whenever both my roommate and I use the wifi in a certain room in our apartment, it slows dramatically for me. It doesn't slow for him. If he uses it in another room, it's fine; if I use it in another room together with him, it's fine; it's just in this particular room.   Does anyone know of a reason why this is?

Whenever both my roommate and I use the wifi in a certain room in our apartment, it slows dramatically for me. It doesn't slow for him. If he uses it in another room, it's fine; if I use it in another room together with him, it's fine; it's just in this particular room. Does anyone know of a reason this could be?


I've just answered a question wrongly, but unlike on the regular site, there's no option to delete my incorrect answer.  Although fairly minor, it would save me having to find a computer or use safari (which is far more fiddly)

There is currently no way to delete questions or answers in the iOS app, even with the required Trusted User privilege. We can edit and vote, but not delete.  Can this option please be added to the app?


When I try to use the define projection tool to change the projection of a layer it will not work for some reason. I am not sure what to do about this. I am trying to change it do GCS_WGS_84    Removing the dash in the layer name did not help, here is the full error message:  Executing: DefineProjection CULT_ARE GEOGCS['GCS_WGS_1984',DATUM['D_WGS_1984',6378137.0,298.257223563]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]]

I have shapefile named `band-tailed_pigeon.shp which is fine and no problem on displaying or geoprocessing on Desktop but in ArcPy when I try to merge some layes to it I am getting this error   ExecuteError: ERROR 000354: The name contains invalid characters Failed to execute (Merge).  I tried to do the proccess with a simple name like sample.shp which it works but I HAVE TO keep the same name as we are using them in several projects. Here is the code which I have FinaloutLocation = "E:\\GIS\\Data\\Final\\band-tailed_pigeon.shp" inFeaturesToMerge = [dissolve_1, dissolve_2, dissolve_3, dissolve_4, dissolve_5] arcpy.Merge_management(inFeaturesToMerge, FinaloutLocation)


I just started with using the (Windows) command line tool for working with npm. And I end up quite often on StackOverflow when I'm stuck with some error and the solution is often to add [something] to the Path Environment variable.   But what exactly is the path environment variable? How do I add variables to it? Are these variables added permanently? How can I read/print this Path Environment variable. I suppose it's some kind of an array.   Basicly can you give me a heads up about what the PATH environment variable is, what it does, why it exists and how to (ab)use it.

Questions about    setting environment variables the PATH   are very common here, and in most cases the answers are very similar to each other. In the future it would be nice to have a good Q/A for this.  So the question is: What are environment variables, like the executable PATH, and how can I change and use them on major operating systems?  A good answer would include a simple explanation of what environment variables and especially PATH mean to the OS, as well as simple guidelines on how to set and read them accordingly.


Can any Java proficient / expert suggest me what is the optimistic way of checking null reference or objects before using it to avoids NullPointerException?  In my code I've more than 100 fields and most of them are required in order to pass value in request, but I need to perform null checks every time before passing it in request to avoid NullPointerException  I have shown below a little piece of code where I'm checking for null values every time for each field (lets say of more 70 times in my one file) which looks not good, code become very ugly and unreadable. Is there any way by which we can write method and perform null object checks through it?  Basically I'm looking better, Optimistic and faster way for doing this, Any quick help is much needed.  if(amount != null && amount != "" && !amount.isEmpty())         AIMRequest.put("x_Amount", amount);  if(currency != null && currency != "" && !currency.isEmpty())         AIMRequest.put("x_Currency_Code", currency);  if(expDate != null && expDate != "" && !expDate.isEmpty())         AIMRequest.put("x_Exp_Date", expDate);  ...........so on

I use object != null a lot to avoid . What is an alternative to: if (someobject != null) {     someobject.doCalc(); }


can anyone please help me - i'm not able to see any wifi enable option in ubuntu 14.04 and i'm not able find what the problem is ? /I don't think it depends on laptop any how mine is ASUS X550CC./ please help me.

On this site I see hundreds if not a thousand questions being asked about issues with a Wireless LAN adapter not being detected/recognized by Ubuntu. Some mainstream adapters appear to be utterly broken in Linux support, while others just require some simple steps to get it to work.  The options to get it to work appear to be infinitely huge and I have no clue where to get started!  What is considered 'best practice'? What order of things to try is most efficient in terms of time, effort and imposes minimal risk to my Ubuntu installation? Please help me save time and guide me what to do, step by step.


There are a lot of images not visible to me.          The issue is actually very weird. The images are appearing on a machine but not on another. Both have different ISPs having different IP addresses.  I know the question has been asked before:      But the answers say that the bug has been fixed.

As I have seen in other posts, i.stack.imgur.com is blocked by numerous companies' firewalls including my own. I have started the process to get the restriction lifted but to increase the likelihood of it being granted, have only requested that i.stack.imgur.com be unblocked.  Staying within the context of SO, imgur and the hosting arrangement SO has with them, are there any other sub-domains/domains that I should be requesting be unblocked? i.e. p.stack.imgur.com or *.stack.imgur.com?  I'm not sure if images can still be embedded/hotlinked in posts from other image hosts or not but if they can I'm not interested in unblocking those hosts, just the addresses used by SO for imgur.  Cheers :)


Let $f\in Hol(\mathbb{C}\backslash\{a_1, \dots, a_N\})$ where ${a_1, \ldots ,a_N,\infty}$ are the poles of $f$. Show that $f$ is rational function.  I've tried to define $g(z):=\frac{f(z)}{\prod_{i=1}^{k=N}(z-a_k)}$ and show that $g$ has the form $\frac{1}{P(z)}$ where P(z) is polynomial

Let $g$ be meromorphic on a region $R$ of $\mathbb{C}$, where $R$ is all but finitely many points of $\mathbb{C}$---that is, $R$ = $\mathbb{C}\setminus S$ for some finite set $S$. Suppose $\lim_{z \rightarrow s} |g(z)| = \infty$ for all $s \in S$ and $g$ takes infinity to infinity. Then, somehow $g$ is rational.  Any help would be appreciated.


I have this:  avconv version 0.8.16-6:0.8.16-1, Copyright (c) 2000-2014 the Libav developers built on Sep 16 2014 23:10:48 with gcc 4.7.2  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'film.mp4':   Metadata:     major_brand     : mp42     minor_version   : 0     compatible_brands: mp42mp41     creation_time   : 2013-07-09 17:41:04   Duration: 00:00:15.04, start: 0.000000, bitrate: 6132 kb/s     Stream #0.0(eng): Video: h264 (Main), yuv420p, 1280x720 [PAR 1:1 DAR 16:9],                                                               5951 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc     Metadata:       creation_time   : 2013-07-09 17:41:04     Stream #0.1(eng): Audio: aac, 48000 Hz, stereo, s16, 189 kb/s     Metadata:       creation_time   : 2013-07-09 17:41:04   and want to down quality to standard PAL - how to do with ffmpeg/avconv?  As a result I want mp4/webm/ogg - something html5 compliant - but as light as possible (that's why I downscalling into PAL)

What list of commands should I do in ffmpeg/mencoder/some_other_CLI_app to get a video in all the right formats to use ?  i.e. Is there a subtlety that prevents there being a mechanical tutorial that says  VIDEO=video.mp4 TYPE=$(ffmpeg --find-information-about-the-video ... ) ffmpeg ... > video.mov ffmpeg ... > video.flv ffmpeg ... > video.webm ffmpeg ... > video.h.264 ...   Then copy and paste the Video for Everybody code into your page?  My goal is to have an embedded video in my personal webpage hosted by me.  HTML5 with flash fallback is preferred, so the simplest way seems to be Video for Everybody.  But that page leaves the most complicated part, encoding the video into all the different formats, to the reader to figure out by reading .  Surely this isn't necessary.  I could provide a list of commands for a user to blindly convert an audio file into a bunch of different formats.  Hopefully an ffmpeg guru could do the same for video.


Why is this sentence wrong?     He went to home.   is it correct in this way?     He went home

I'm a little bit confused over the difference between the following sentences.   I went home. I went to home.  Could someone please explain the difference.


I installed GDebi package installer.  I tried to configure it step by step but have not been successful.  I have used the command:  sudo apt-get install -f   with the output:  Reading package lists... Done Building dependency tree Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 24 not upgraded.    I also tried:  sudo dpkg --configure -a   And:  apt-get dist-upgrade   which gives the error:  Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?   What should I do?

I'm trying to run this command in the terminal:  sudo apt install software-properties-common   This is the error message I get:  E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)   E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend),     is another process using it?


please don’t use any calculus in your answers I was reading the derivation of the work energy theorem in my textbook and it goes like this: $$W = Fs\Rightarrow  W_{net} = mas$$  Since $v^2 - u^2 = 2as \Rightarrow as = \frac{v^2 - u^2}{2}$, substituting in the original equation, we get: $$W_{net} = \frac{mv^2}{2} - \frac{mu^2}{2}$$ Which is delta K.E.  But where did the $\cos(\theta)$ go which is there in the original equation of the work??  Shouldn’t the derivation be : $W = Fs\cos(\theta)$  And then we do the same as before and we should get: Net work $= (1/2)m(v^2 - u^2)\cos(\theta)$ , where theta is the angle between the NET force and the displacement, right?  What is wrong with my reasoning? I know this probably isn’t correct because let’s take a simple case: $v = \theta$ and $u$ is a non-zero positive integer. Let’s say $\theta = 180^\circ$ i.e., according to my derivation, we would expect the work done to be negative, since $\cos 180 = -1$. But when you do $v^2 - u^2$, you would get a negative value itself which would then give us a positive net work which is incorrect. I think part of the wrong reasoning is that whenever we use the work equation, we only plug in the MAGNITUDES of the force and displacement as the positive or negative work is only decided by the term cos(theta). But then how do I get $v^2 - u^2$ as negative? If $u$ is let’s say $10$ m/s then $v^2 - u^2$ would be $-100$. I can’t just write +100 for that. Please clear my confusion.

I asked many people why work is scalar. But the questions and the answers just cycles.   My question : Why is work a scalar quantity?   Their answer : Because it is the dot product of Force and Displacement. So it is a scalar quantity.   So I asked,  My question : Why is work the dot product of force and displacement and not the cross product?   Their answer : Because it is a scalar quantity and not a vector.  So can anyone please tell me why work is scalar apart from this cycle of questions and answers? Is there any other logic which can answer both questions?   Edit : $W=Fs\cos\theta$. So $Fs\cos0 = -Fs\cos180$. So shouldn't work be a vector? This confusess me.


I have some lemma (let's call it lemma 4) in my main text, but I prove it in the appendix. Therefore, I want to restate the lemma in the appendix again as lemma 4. How can I achieve this?  Thanks!

Suppose I have some theorem in the paper  Section 1 Theorem 1.1. Let ...  And then later in the paper I want to recall the theorem by reprinting it  Section 4 We recall Theorem 1.1: Theorem 1.1. Let ...  What's the proper way to do this?


Try , for example.  And click on any one of the tags, it will result in a page not found error.

If you search for something on "all sites" (using the searchbox at the top of , you'll reach the search results, e.g.  .  If you click directly on a tag on that page, e.g.        You get 404 Page Not Found error, e.g.     Steps to reproduce   Go to  and enter e.g. "keyforge" into the "Search all sites" field. Arrive at  Click on the "keyforge" tag below a search entry. Reach  (404 page not found)   Expected behaviour  Reach   System Info  Happens in both Firefox and Vivaldi browsers on Windows 10.