I have this client.java class and when i call the method sendMsg() it gives me this error: Attempt to invoke virtual method 'void java.io.OutputStream.write(byte[], int, int)' on a null object reference. How to fix it?  import android.os.AsyncTask; import android.util.Log; import android.widget.EditText;  import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.net.Socket; import java.net.UnknownHostException;    public class Client extends AsyncTask<Void,Void,String> {     private String dstAdress;     private int dstPort;     private String msg;     private  OutputStream outStream;     private EditText et;      public Client(String adress,int port,String msg){         dstAdress=adress;         dstPort=port;         this.msg=msg;     }     @Override     protected String doInBackground(Void... arg0){         Socket socket=null;         String received="";         try{             socket=new Socket(dstAdress,dstPort);             outStream= socket.getOutputStream();             outStream.write(msg.getBytes());             //publishProgress();               byte[] buffer=new byte[1024];             int bytesRead;             InputStream inputStream=socket.getInputStream(); //citeste de pe socket             while((bytesRead=inputStream.read(buffer))!=-1){                 String str=new String(buffer,0,bytesRead,"UTF-8");                 Log.d("TAG",str);                 received +=str;             }          }catch(UnknownHostException e){             e.printStackTrace();          }catch(IOException e){             e.printStackTrace();         }finally{             if(socket!=null){                 try{                     socket.close();                 }catch(IOException e){                     e.printStackTrace();                 }             }         }         return received;     }      @Override     protected void onPostExecute(String result) {         super.onPostExecute(result);         Log.d("TAG", "Received: " + result);     }      @Override     protected void onProgressUpdate(Void... values) {         super.onProgressUpdate(values);         et.setEnabled(true);      }     public void sendMsg(String msg){         try{             outStream.write(msg.getBytes());         }catch(IOException e){             e.printStackTrace();         }      }  }


How can I use any game controller on my PC with Batman Arkham Origins?

I have an Elecom Wireless Gamepad, and a Windows 7 PC (64bit). I bought Batman: Arkham Origins through steam. My Elecom didn't work, so I borrowed a friend's USB Xbox controller. It doesn't work either.  In the steam interface, in the Store, it says that Batman: Arkham Origins has full controller support. Has a huge graphic advertising it.  When I run Steam in "Big Picture" mode, I can use my XBox controller to navigate around.  But when I start the game, there is absolutely no response to either controller.  How can I use a controller in Batman: Arkham Origins for PC?


prove that if n is an odd integer then n^2 has a remainder of 1 when divided by 8

I am not sure how to prove that if $n$ is odd then the square of $n$ has a remainder of $1$ when divided by $8$.


Clicking on inbox message regarding subsequently deleted comment brings user to page with broken top bar

This particular case is minor and perhaps unworthy of note, but I suspect it applies to a larger pattern (e.g. all "phantom" inbox messages, or perhaps even the general case of broken internal links).  I received an inbox message notifying me of a comment,    which was subsequently deleted. (There's —an issue whose fix appears to have regressed.)  Clicking the inbox message brings me to the appropriate page, except none of the top bar's dropdown menus appear to be functioning. The StackExchange button links to SE's home page, while the inbox and achievements buttons appear to have lost their "click" event handlers (and therefore don't respond). On the left, the missing event handler; on the right, the normal case:


Yosemite: Reduce bandwidth usage of single applications

Is there a way on MacOS notebooks to prevent applications accessing the internet? Like block all and except Chrome? As I have a limited data volume on a mobile data stick. This should be just the case while on that stick, not while I am in a Wifi. It should not throttle bandwidth.


How to stop Mission Control from rearranging screens?

If I have arranged Finder to the left of the desktop and Slack to the right, and have Sketch further to the right, there's a reason for that. It's an organization strategy to make my work easier and keep track of the many windows I have open. BUT, macOS rearranges them if I click on the application icon from the Dock and rather than swiping over to the screen in the specified order, it moves it next the Desktop.  Is there a way to stop that from happening? A way to pin screens to the desired position?


Why can't I open my Nikon D3400 raw files in Photoshop CS5.1?

I have images taken in RAW on my Nikon D3400 and Photoshop CS 5.1 won't read them. I downloaded both the version of Adobe Camera RAW for Photoshop CS5 and the new updated version and also the DNG converter. It still won't open. When opening in Photoshop, it says the file is from a  camera model not supported by Camera RAW.


I have heard even passive smokers are subjected to many health issues even though they don't smoke directly. What are the issues related to health that can occur in the passive smokers, and does it includes any long term effects on health?


How to create half circular-window hole on the wall without resulting ngon?

how to create half circular-window hole, I think it called arched window? I only know using knife project, but it will make ngon, and I must cut it one by one into tris/quad.  so, do you know another way to window hole for arched window without resulting ngon?


Is there any command like "*" in dos to indicated all in bpy?

I'm going to select multiple objects in blender with script the name would be [cube101, cube102, cube103, cube104, cube105......] is there anyway to simplify the long script with [cube10*] to tell blender the objects I want are "something + *" ?


If $a^3=e$, then $a$ has a square root. I have that $a^3=aaa=e$ and applying $a^{-1}$ twice on both sides of the equation gives us $a=a^{-1}a^{-1}$ and so $a=(a^{-1})^2$. Thus $a$ has a square root. Is this correct? Is there another way to do this?


Which waves are produced during tuning fork vibration?

In my book, it is written that transverse waves are produced during physical motion of tuning fork.   But vibration of tuning fork produces sound which are compressional in nature .  Please tell me the correct answer and reason behind it.


Windows 10 dual boot won't boot to GRUB (boot error url)

I have been having issues trying to get my dual boot to work. Specifically, windows won't boot to GRUB. Even after the first restart my computer didn't boot into GRUB In addition, I have tried to boot ubuntu using the normal boot manager. I go "Boot From EFI File" -> a very long set of characters -> EFI -> ubuntu and the error reads "No valid file selected in the selected file system". I am running Windows 10 on an HP Specter and trying to boot into Ubuntu 20.04. I have tried many things like changing the boot order, however there is no windows or Ubuntu option to choose from. I have disabled secure boot. I have redownloaded Ubuntu several times. I just ran the boot repair and it gave this url:  and was told to post it on the forums for help. Thank you for any help, I have been struggling with this for weeks.


Does a USB HDD contain info on previous mounts?

I have an external hard drive (usb) , I suspect that it might have been mounted into another computer on a precise date and time.  Is there any way to see the log (from the hdd) and verify if it was mounted in that precise moment or if any file was copied?


How do I prove this statement about greatest common divider?

$$2\gcd(a, b) \le \gcd(2a,2b)$$ I'm pretty sure it has something to do with Bezout's lemma or it could use prime factorization, but unsure on how to go exactly about it. Please help! Full Disclosure: This came up on a midterm and something like this may be on the final so I want to make sure I have it down for next time.


YA novel about dystopian future with non-human overlords and teenage heroes

I read a YA novel in the early 2000s that I think takes place on Earth some time in the future. The human race has been enslaved by some other race, possibly aliens. If I remember correctly, humans were kept as slaves for some purpose and then exterminated at age 16, and I think some girls were kept to breed.  I remember scenes of a band of teenagers walking around sewers fighting these aliens who bled a blue "ichor." The only thing I distinctly remember about the book was that it was the first place I saw the word "ichor."  This is a pretty sorry description; but does anyone have a clue what this book was?


Georeference Plug-in not Opening in QGIS?

for some reason georeference plug in will not open. I click on it and nothing happens. I have never had any issues with it before. I have also just installed version 2.6.0 to see if that solves issue but it doesn't.


How could I change the SQL Server 2008 R2 Express Default Collation for the whole server and a particular database?  Is there a way to do it using visual interface of SQL Server Management Studio? In the Server Properties window (and in the corresponding Database Properties window), this property is not available for editing.


In Kali 2018 , I deleted it , after which I made it again by writing the  . But it's still not getting updated  . What else should be written and why ? What if i dont write (what if there is no sources. List in the system)  And it's doing ftp from some Taiwan center , how can I change it?


I found some old answers, but I think it is justified to ask this for 18.04. I had Windows 10 + 18.04 as dual boot. I tried to change an empty NTFS drive to ext4 and everything collapsed. I don't know whether it was me or gparted a bit too difficult to use. Everything died and the laptop was useless.   I installed Windows 10 in an empty partition and somehow the process brought back most of the drives. I still have an NTFS and ext4 drive to recover. I tried partition recovery wizards on Windows 10. Most of them are pricey.   Is there any tool we can use from an Ubuntu live USB which bring back these 2 or at least the NTFS partition back ? Thanks.  PS : The lost partitions remain untouched under a 176 GB unallocated space.    Update 1 :  This is where I am now, how to proceed ?


How do i apply ownership and permissions recursively onto a directory using another directory as reference in linux

Folder A has correct ownership and permissions on all its files/subfolders. Folder B exact same content but with ownership and permissions messed up. Need to apply chmod/chown using Folder B as reference on everything under FOlder A.


If Harry Potter had a concealed weapon wouldnt his struggles have been much easier to overcome?

Okay, lets say theoretically HArry had a Desert Eagle handgun each year, and even had it magically upgraded to not jam or break and the proffesors never confisccated it(I added this part to thwart troll answers) Given that any human within 500 feet wouldnt hear a gunshot before a bullet would hit them or have the ability to react quickly enough to dodge one if they saw him shoot at them, on top of the fact they wouldnt expect him to use an unforgiveable curse and so they definitely wouldnt expect HArry Potter to be packing heat wouldnt he have been able to resolve the problems/antagonist in  most books much faster, easier, and would have even been able to avoid being captured a couple of the times he was captured in the book? If he used a silencer with a his invisibillity cloak couldnt he have assassinated people like Bellatrix Lestrange and other death eaters without being caught?by them or the ministry of magic? Technically couldnt Dumbledore have even done this before Harry even started school? Seems like it would have saved a lot of innocent lives, potential danger, time, etc.  Heres the information about how fast a bullet travels and human reaction time etc.     The average bullet travels at 2,500 feet per second (around 1,700 mph). If you reacted to the sound of the gun going off and required 0.20 seconds (twice that of the fastest Olympic sprinters) to react, then you would need to be at least 500 feet away to successfully dodge a bullet. The problem is that sound travels at 768 miles per hour (1,126 feet per second)—about half the speed of the bullet. In this case, the bullet would hit you before you even heard the gun fire off.


Is it wise to install WAMP on Windows VPS in order to make use of already written PHP application?

I got a request to put one web application written in PHP+MySql that runs normally on Linux machine (which is set up as web server) to Windows VPS.  I did some research and found out I could install WAMP and host the application via that practically the same way as I had it on my Linux machine, but since I don't have experience with this I'm asking you guys if this is a "valid option" or it's not suggested at all?


If a ribosome is made of protein, yet is used in protein sysnthesis, what created the first ribosome?  What created the ribosomal RNA?


Summation of Central Binomial Coefficients divided by even powers of $2$

Whilst working out  the following summation emerged: $$\sum_{m=0}^n\frac 1{2^{2m}}\binom {2m}m$$ The is equivalent to  $$\begin{align} \sum_{m=0}^n \frac {(2m-1)!!}{2m!!}&=\frac 12+\frac {1\cdot3}{2\cdot 4}+\frac{1\cdot 3\cdot 5}{2\cdot 4\cdot 6}+\cdots +\frac{1\cdot 3\cdot 5\cdot \cdots \cdot(2n-1)}{2\cdot 4\cdot 6\cdot \cdots \cdot 2n}\\ &=\frac 12\left(1+\frac 34\left(1+\frac 56\left(1+\cdots \left(1+\frac {2n-1}{2n}\right)\right)\right)\right) \end{align}$$  and terms are the same as coefficients in the expansion of $(1-x)^{-1/2}$.  Once the solution  $$ \frac {n+1}{2^{2n+1}}\binom {2n+2}{n+1}$$ is known, the telescoping sum can be easily derived, i.e.    $$\frac 1{2^{2m}}\binom {2m}m=\frac {m+1}{2^{2(m+1)-1}}\binom {2(m+1)}{m+1}-\frac m{2^{2m-1}}\binom {2m}m$$  However, without knowing this a priori, how would we have approached this problem?


Clipping raster with vector layer using MapInfo?

With MapInfo 12, i would like cut my raster layer .tab with one of my vector layer.   How to do this basic task with MapInfo?   Is it possible with mapinfo to convert .tab raster table toward any standard formats (ecw, tif, etc)?


How to print variables without spaces between values

I would like to know how to remove additional spaces when I print something.  Like when I do:  print 'Value is "', value, '"'   The output will be:  Value is " 42 "   But I want:  Value is "42"   Is there any way to do this?


Is it insider trading when I already own stock in an ETF and then the ETF adds the company I work for?

Let's say I own shares in the MSCI World ETF. Company X, where I am an employee, is currently not part of it. What happens when in ie a year Company X gets added to the ETF - Is my owning stock in it considered insider trading? If so, would it mean I need to sell my existing share in this ETF or should no longer buy more of it?


Custom xkb layout in which one key creates two unicode code points

I am writing a new custom keyboard layout for Xorg, but there is one particular glyph which does not exist in Unicode. It is, however, easy to create it by using a standard letter plus a combining diacritic mark.  For example, if I want the letter v with a macron below, the sequence U0073+U0331 creates the character that I want.   In my xkb layout definition, I can specify a single Unicode point (here altgr+d is bound to ḏ and altgr+shift+d to Ḏ):  key <AC03>  { [         d,          D,        U1E0F,        U1E0E ] }; // d with macron below   But I don't seem to be able to specify a 'combined' Unicode glyph for a single key:  key <AB04>  { [         v,          V,  U0076+U0331,  U0056+U0331 ] }; // v with macron below   Is it possible to create a system-wide xkb definition like this?


Why do we use casting to allocate heap memory by malloc in C?

I got very curious to know why we use casting to allocate heap memory by malloc in C language like instructions below: #include<stdlib.h>  int main() {     double *var = (double*) malloc(sizeof(double));     return 0; }  Does malloc function return an appropriate address? If so, why do we use casting? Thanks for answering.


Capitalisation of two-word surname in bibliography

I've created the following entry (in Jabref):  @ARTICLE{Key,   author = {Pico Della Mirandola},   title = {Title of Paper},   journal = {Working Paper, Institute},   year = {2013},   owner = {User},   timestamp = {2013.08.05} }   That shows the following, however Mirandola, Pico Della, 2013, Title of Paper, Working Paper, Institute., which is no good as the surname has been broken up. After reading , I changed the Jabref entry to having a lowercase della which keep the surname together: della Mirandola, Pico, 2013, Title of Paper, Working Paper, Institute., but I'm just using this name as an example: the capitalisation in my document. I need it to show Della Mirandola, Pico, 2013, Title of Paper, Working Paper, Institute.  I'm sure sure if this approach is using bibtex, biblatex or natbib or whatever, but I have to use a .bst file to format my bibliography as I need to follow a specified format, so I want to continue creating the .bbl file automatically in TexnicCenter like this:   \bibliographystyle{elsart-harv} \bibliography{C:/jabrefBib}   and just citing the references in the document as usual (\cite{Key}). How can I implement a workaround for this to get the surname right?


in python,what is the difference below, and which is better

I have written a code like this,and they are all works for me,but what is the difference? which is better?   class Demo1(object):     def __init__(self):         self.attr = self._make_attr()     def _make_attr(self):         #skip...         return attr  class Demo2(object):     def __init__(self):         self.attr = self._make_attr()     @staticmethod     def _make_attr():         #skip...         return attr


Invisible software updates list in Software Updater

Today I received an update notification for three updates but update manager doesn't say what updates are they.    Does anyone have a clue what this is about? How am I to check what is to be updated?


I am trying to install log4db2 utility in db2 for procedure logging but I am getting error mentioned below

DB21034E The command was processed as an SQL statement because it was   not a valid Command Line Processor command. During SQL processing it   returned: SQL0601N The name of the object to be created is identical   to the existing name "LOG_CONF_BP" of type "BUFFERPOOL".   SQLSTATE=42710   How to remove pre-existed "LOG_CONF_BP" of type "BUFFERPOOL" in db2 database? Is there any other way to define logging for my stored procedures?


Is the set of proposition symbols necessarily a countable set?

I am busy latedays with "Logic and Structure" of Van Dalen in order to get some familiarity with logic.  Proposition symbols are introduced (on page 7) as members of an infinitely countable set $\{p_0,p_1,p_2,\dots\}$.  My first thought was: why not just a set without any further specification?  Uptil now I could not find a satisfying answer.  Let me mention that I did find a proof (on page 44) that every (syntactically) consistent set of propositions is contained in a set of propositions that is maximally consistent, and in that proof it is used that the set of proposition symbols is countable.  That however can also be proved if there is no countability, but then by application of the lemma of Zorn.  So I wondered if the countability is there because this (i.e. Zorn/axiom of choice) must be avoided for some reason.  I really don't know...  So my question is:     Is there a special reason/motivation to go for an (infinitely) countable set of proposition symbols?


I am trying to get my regex expression to work to no avail:  All I want to do is find the image tags in an html string so I can replace them:  This is what I think should work:  var regex = new Regex(@"");  return regex.Replace(content, "
(See Image Online)
");   And it does work partially, but it seems to be stripping out more than just the image tag.  This is an example of what I want to match:  <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAM0AAAD  NCAMAAAAsYgRbAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5c  cllPAAAABJQTFRF3NSmzMewPxIG//ncJEJsldTou1jHgAAAARBJREFUeNrs2EEK  gCAQBVDLuv+V20dENbMY831wKz4Y/VHb/5RGQ0NDQ0NDQ0NDQ0NDQ0NDQ  0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0PzMWtyaGhoaGhoaGhoaGhoaGhoxtb0QGho  aGhoaGhoaGhoaGhoaMbRLEvv50VTQ9OTQ5OpyZ01GpM2g0bfmDQaL7S+ofFC6x  v3ZpxJiywakzbvd9r3RWPS9I2+MWk0+kbf0Hih9Y17U0nTHibrDDQ0NDQ0NDQ0  NDQ0NDQ0NTXbRSL/AK72o6GhoaGhoRlL8951vwsNDQ0NDQ1NDc0WyHtDTEhD  Q0NDQ0NTS5MdGhoaGhoaGhoaGhoaGhoaGhoaGhoaGposzSHAAErMwwQ2HwRQ  AAAAAElFTkSuQmCC" alt="beastie.png">


I'm trying to make a new directory in PuTTY, but the error is coming that the permission is denied

Command sequence: atlas:/> cd etc atlas:/etc> mkdir dir1 mkdir: cannot create directory `dir1': Permission denied atlas:/etc> mkdir dir1 mkdir: cannot create directory `dir1': Permission denied atlas:/etc> mkdir dir1. mkdir: cannot create directory `dir1.': Permission denied atlas:/etc>   How can I get out from this problem?


How to use field widget to create field in code?

Is there possibility to use field widgets to create these kinds of fields? I can't find any information how to use it while form creating.  I found something like this  but I'm looking for another widgets info (how to use it).  In addition, I don't use the entity type in this case (custom structure).


Sort lines based on a variable-width number at a fixed position

I'm trying to sort a file using the Sort command but its not working:  The file contains lines like:  photo1 photo11 photo12 photo13 photo17 photo18 photo19 photo2 photo22 photo23 photo25 photo26 photo27   I'm using the command, sort -k6 Photos so that it start sorting after the string "photo", can someone tell where I'm going wrong??


How to stop DDOS from unique ip addresses?

I have a problem with a LAMP server where Apache keeps getting lots of request "POST / HTTP/1.1" but always from new IP addresses. Blocking the IPs using iptables obviously won't help. Any ideas how to block or even reduce this traffic? I cannot install a squid proxy or similar in front of Apache, nor can I install an external firewall. Do I have to contact the ISP where the server is hosted?


Android Studio shortcuts are not working

I use Android Studio in Ubuntu and everything was working fine. Since two weeks that shortcuts stopped working, Ctrl+C, Ctrl+V, Ctrl+Z. I tried to change Keymap in Settings but without success.  What could be the possible problem?


Dynamically generated input fields cannot be filled

I have encountered an issue with my code, while developing a project. I dynamically add a login form to a certain div in the DOM-Tree. It is all nice and fine, all elements are generated and all attributes are added, but I cannot access either of the fields, let alone submit it. Can somebody please spot the issue within? loginArea.click((e) => {     e.preventDefault();      loginArea         .empty()         .append(             $(document.createElement('form'))                 .attr({id: 'user__loginform'})                 .append(                     $(document.createElement('p'))                     .addClass('user__action')                     .text('Please enter your credentials!')                 )                 .append(                     $(document.createElement('input'))                     .prop({                         type: 'email',                         id: 'login_mail',                     })                     .attr({                         placeholder: 'Please enter a valid e-mail adress!',                         required: true,                         form: 'user__loginform'                     })                 )                 .append(                     $(document.createElement('input'))                     .prop({                         type: 'text',                         id: 'login_pw',                     })                     .attr({                         placeholder: 'Please enter a password!',                         minglength: 9,                         maxlength: 16,                         required: true,                         form: 'user__loginform'                     })                 )                 .append(                     $(document.createElement('input'))                     .attr({                         form: 'user__loginform',                         type: 'submit',                         value: 'Login'                     })                 )         ) });  Thank you a lot in advance EDIT: Incorporating the input I have received, I have shortened the function to this, and added .off() at the end. This seems to solve the issue I had, as for now the dynamically generated input can be filled out. signupArea.click((e) => {     e.preventDefault();     let formTemplate = `
             <form id="user__registform">
Please enter your preferred credentials!
                 <input type="email" id="regist_mail" placeholder="Please enter a valid e-mail!" required="required" form="user__registform">                 <input type="text" id="regist_pw" placeholder="Please enter a password!" minglength="9" maxlength="16" required="required" form="user__registform">                 <input form="user__registform" type="submit" value="Register" class="user__regist--submit">             </form>
     `;     signupArea.html(formTemplate);     signupArea.off(); });


verb or adjective in "The blue page is *stapled* to the red page"?

Consider the following sentence.     The blue page is stapled to the red page.   Although "stapled" is (apparently) past-tense, nonetheless the above sentence is clearly expressing something about the present. What gives? In particular, would it be wrong to label "stapled" as past-tense in that sentence?  (note: Er, actually the OP's question involves the difference between a passive construction and a construction with a predicative adjective -- F.E.)


The use of \usepackage[T1]{fontenc} makes my font terribly light. How to solve it?

I'm aware that the use of \usepackage[T1]{fontenc} is advised to prevent a lot of inconveniences on the output. However, it makes my font too light, which I confirmed by generating a pdf with the same source text without the fontenc package.   This is my preamble   \documentclass[10pt, oneside, twocolumn, notitlepage]{article}  \usepackage{sectsty} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage[brazil]{babel} \usepackage[a4paper,margin=1.5cm]{geometry} \usepackage{graphicx} \usepackage{amsmath} \usepackage{amssymb} \usepackage{caption} \usepackage{float} \usepackage{siunitx}    I use miktex on windows to compile. How do I solve it?   Sorry if I'm not presenting some relevant information or if the answer is obvious, I know nothing of the programming aspects of the typesetting system.  Thanks!


iOS 10 remember to "not trust this computer"

I have a 2015 MBP for work, which I connect my iPhone (6 plus, iOS 10) to charge, and I don't want to trust the computer, ever. However, I must click "Don't Trust" every single time I connect for charging. This is asymmetric to the "Trust" selection, which remembers my decision.  Does anyone know if it's possible to stop the 'Trust/Don't Trust' modal from appearing every time, and have the machine not be trusted?  If possible, can you please tell me how? If not possible, can you please provide proof or evidence that lead you to this conclusion?  Finally, I am not concerned with arguments or opinions about this feature. Only what is outline above.


I am interested in learning category theory, but I am concerned about its applications. I know its extremely important in functional programming but I want to know how this theory applies to the natural sciences like physics or biology etc. Moreover, how good is category theory in abstract theoretical mathematics? Why do we need this highly abstract theory in doing mathematics?


Unnumbered equations: Any difference between \begin{equation*} and \[?

Is there a difference between defining an unnumbered equation with  Option 1:  \begin{equation*} ...  \end{equation*}   versus  Option 2:  \[ ...  \]   If there are differences, they are not apparent in my use of the commands.


How can I redefine \int to put a negative space after the integral sign, but keep the limits properly set?

I'd like to modify the \int command such that it adds an automatic negative space, e.g. \! after the integral sign. Preferentially, I'd like to be able to not edit any of my code, so cleverly redefining \int seems like my best option. Unfortunately, naive implementations get the limits wrong:  \documentclass{article} \usepackage[intlimits]{amsmath} \usepackage{ifthen}  \newcommand{\diff}[2][]{   \ifthenelse { \equal {#1} {} }   {\ensuremath{\mathop{\mathrm{d} #2}}}   {\ensuremath{\mathop{\mathrm{d}^#1 #2}}} }  \begin{document}  This is what I would want: \begin{equation}  \int_0^\infty \mspace{-4mu}\diff[3]{\boldsymbol r} f(\boldsymbol r), \end{equation} but with this ``user code", containing no negative spacing explicitly: \begin{verbatim}  \int_0^\infty \diff[3]{\boldsymbol r} f(\boldsymbol r), \end{verbatim} which for comparison with the above gives: \begin{equation} \int_0^\infty \diff[3]{\boldsymbol r} f(\boldsymbol r), \end{equation}  mostly because this gives me the option to remove it or change the spacing when I see fit. \end{document}   Which results in:


What are good starting settings to store for exposure bracketing shots?

I started experimenting with the Custom Functions (C1,C2,C3) on my Canon 7D and I decided a useful one to have may be setting it up for exposure bracketing. So it's a quick switch if I ever need it, as opposed to going through the menu to set it up.  I realize the settings would vastly depend on the situation, but do you have any suggestions for some good all round settings to program in as a starting point?    Examples: 1 stop vs 1 1/3 vs 2 stop brackets / ISO choices / Metering mode / shooting mode and so on.


So I'm guessing I'm missing something fairly simple here but I am trying to read a file line by line, tokenizing the buffer as I go. I have pasted the basics of what I'm trying to do with my code. I have never had issue with strtok, so I'm guessing it has to do with the buffer that I'm using. Any nudges in the right direction? I read that strtok isn't a great option, but it's the only thing I'm familiar with (I suppose I could write my own function) It reads the first token as it's supposed to every time. It doesn't seg fault until I try to find the second token with "strtok(NULL," ");"  I don't know why this was downvoted as a duplicate. Yes, there are answers out there that tell the basics of what I'm trying to do, but I want to understand the problem, not just cut and paste." I'd prefer to know WHY there is a seg fault and why my code is behaving as it does. No need to downvote when I'm asking specific questions not pointed out directly in other posts.  const char *file = "path/to/file/file.txt"; void tokenize();  //Eventually file will be command line opt FILE *open_file(const char *file);  int main(int argc, char *argv[]) {     tokenize(); }  void tokenize() {     FILE *fp;     fp = open_file(file);     char buffer[BUFSIZ];      while(fgets(buffer,BUFSIZ,fp) != NULL)     {         //puts("========================================");         //puts(buffer);         //puts("========================================");          char *data = strdup(buffer);         char *token;         token = strtok(data, " ");         //puts(token);         while(token != NULL)         {             token = strtok(NULL, " ");              puts("++++++++++++++++++++++++++++++++++++++++++++++");             puts(token);             puts("++++++++++++++++++++++++++++++++++++++++++++++");         }     } fclose(fp) }  FILE *open_file(const char *file) {     FILE *fp;     fp = fopen(file, "r");      if(fp == NULL)     {         perror("Error opening file");     }     return fp; }


Extract the value using regular expression in jmeter

I need to extract 'Processed & Soft Cheese1' from the below response:  1.)"departments":["Processed & Soft Cheese1"],  I am trying departments":["(.+?)", but it doesn't work.  Can some one please help to create regex for the same


In EveryCircuit, they have a component called a "Current Source". For example, here is a circuit I've created with a 2A current source:    Is there a such thing as a 'current source' in the real world, or is this an abstract component that helps one regulate current (for example, without having to do a voltage source + resistor).


Mouse's special buttons are compatible with the hotkeys?

Is there a way to map eg. F5 (for a browser refresh) to a button on my mouse (logitech g600)?


Decrease available inventory item on Cognito Form, removing it when zero

I want to limit inventory quantities on a sales form, so that it can start at say 100 and count backwards as applicants submit orders and then shut down that particular option when it reaches 0.    Is this possible with Cognito?


18.04 slow boot, stopped on "Started login service"

I have fresh installed Ubuntu 18.04 on a new machine and I have compared its boot time to an old machine running 16.04.  The time between the grub menu selection and the login prompt is significantly longer in the new 18.04, which is strange taking into account that the new machine performance is significantly higher than the old one.  In order to support RAID, I had to install Ubuntu server and the ubuntu-desktop package on top of it, I don't know if this can be related to the issue.  Apparently it waits for a few seconds after displaying the last message on the text console "Started login service".  These are some reports:  $ systemd-analyze time Startup finished in 17.552s (firmware) + 2.418s (loader) + 2.571s (kernel) + 21.544s (userspace) = 44.086s graphical.target reached after 14.278s in userspace  $ systemd-analyze blame | head -n 10          13.254s NetworkManager-wait-online.service           5.622s apt-daily.service           1.660s apt-daily-upgrade.service            720ms fwupd.service            316ms systemd-logind.service            277ms dev-md0.device            213ms systemd-timesyncd.service            186ms NetworkManager.service            178ms systemd-resolved.service            100ms systemd-journal-flush.service   Any ideas about what could be causing this delay and how to speed it up?


Why, exactly, does kryptonite hurt Superman?

To my understanding, kryptonite is a rock that is from the planet Krypton. Superman is also from planet Krypton. Yet somehow kryptonite weakens Superman and can even kill him.  How does this work? Why exactly does kryptonite hurt him? Isn't his entire home planet made of kryptonite?


Is there any software for speech to text ? I want to make random notes.  From searching i can only find the opposite, text to speech.  Thanks.  EDIT:  The question which has been linked to mark this as a duplicate suggests  as the solution. However,  has not had a release in more than one year and is quite buggy and unusable in newer releases of Ubuntu. Therefore, alternatives must be sought, requiring newer answers to this question.


How to choose an optimal number of latent factors in non-negative matrix factorization?

Given a matrix $\mathbf V^{m \times n}$,  (NMF) finds two non-negative matrices $\mathbf W^{m \times k}$ and $\mathbf H^{k \times n}$ (i.e. with all elements $\ge 0$) to represent the decomposed matrix as:  $$\mathbf V \approx \mathbf W\mathbf H,$$  for example by requiring that non-negative $\mathbf W$ and $\mathbf H$ minimize the reconstruction error $$\|\mathbf V-\mathbf W\mathbf H\|^2.$$  Are there common practices to estimate the number $k$ in NMF? How could, for example, cross validation be used for that purpose?


How to change browser url without page refreshing

Please let me know how it can be possible to change url without page refreshing and without using hash tag.


Transfer Fallout 4 save game from PS4 to PC

I played Fallout 4 for a pretty Long time on my PS4. In January I built a gaming PC and now would love to continue my save game from my PS4.  I already did this with skyrim using a Special converter.  If anyone knows a way how to do this I would be realy happy!


How 'java.lang.NullPointerException:void android.support.v7.app.ActionBar.setElevation(float)' on a null object reference'

My code:  tabLayout.getTabAt(0).setIcon(R.drawable.ic_airport_shuttle_black_24dp) tabLayout.getTabAt(1).setIcon(R.drawable.ic_fingerprint_black_24dp) tabLayout.getTabAt(2).setIcon(R.drawable.ic_add_circle_outline_black_24dp) //remove Actionbar Shadow ActionBar actionBar = 'getSupportActionBar' actionBar.setElevation(0)   Stack trace:  java.lang.NullPointerException:void android.support.v7.app.ActionBar.setElevation(float)' on a null object reference'


I'm getting an NullPointerException when im trying to sort my arraylist with "ObjectEpisodes" in it.  The null pointer appears when im trying to sort the ArrayList but then some of the objects dont have a date to sort on. I'm getting those information via JSON and API calls.  What is the best way to handle those null pointers?  My Object implements Comparable:          public Date getDateTime() {             return convertDate(getAirdate());         }            public Date convertDate(String date)         {             SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");             Date inputDate = null;             try {                 inputDate = dateFormat.parse(date);             } catch (ParseException e) {                 // TODO Auto-generated catch block                 e.printStackTrace();             }             return inputDate;         }          @Override         public int compareTo(SickbeardEpisode another) {             return getDateTime().compareTo(another.getDateTime());         }   Here is were i call Collections.sort(episodes):  private static List<ObjectEpisodes> parseEpisodes(String url) {         List<ObjectEpisode> episodes = new ArrayList<ObjectEpisode>();          String json = download(url);          try {             JSONObject result = new JSONObject(json);             JSONObject resultData = result.getJSONObject("data");             Iterator<String> iter = resultData.keys();             while (iter.hasNext()) {                 String key = iter.next();                 JSONObject value = resultData.getJSONObject(key);                 ObjectEpisode episode = new ObjectEpisode(value);                 series.add(serie);             }         }         catch (JSONException e)          {             e.printStackTrace();         }          Collections.sort(episodes);          return series;     }


Positive definiteness of difference of inverse matrices

Let $A$ and $B$ be two $n \times n$ symmetric and positive definite matrices.   If $A \prec B$, then is it true that $B^{-1} \prec A^{-1}$?  Here, $A \prec B$ means that $B-A$ is positive definite.


Definition of multivariable function classes doubt

I was given this example by my teacher: $f(x)=\begin{cases}        0 & (x,y) = 0 \\       \frac{x^2y^2}{x^4 + y^2} & (x,y)\neq (0,0)\    \end{cases} $ He proved diferentiablity for all $\mathbb{R}^2$. Then he went to prove wether the function was class $C^1$ or not. He used $y=x^2$ to prove it wasn't. And that's what put me in doubt. Doesn't diferentiability in $\mathbb{R}^2$ imply it's partial derivatives are continuous, therefore $C^1$. Am I missing something in this example?


In the case of a ball swinging in circular motion on a rope, w/out gravity or air resistance, what is the force pulling outward on the rope?

I'm thinking it is either the tension due to the ball, or the ball's centrifugal force. But the thing is, are these two forces the same in the conditions I've set (no gravity, no air resistance)?  After all, the centripetal force would be due to the tension on the ball from the rope. Since the centrifugal force is essentially the opposite of the centripetal force, then it would be equal to the tension on the rope from the ball, right?


install openstack in rhel 7 without subscribe to RHN

my question is  is it possible to install openstack on rhel7 without subscribing to the Redhat network?  I'm receiving an error of a missing dependency on phython-greenlet and so far the only solution I found is subscribe o the Redhat Network  Thanks


Expectetion of $Y^{\alpha}$ with $\alpha >0$

Let $Y$ be a positive random variable.  For $\alpha>0$ show that  $E(Y^{\alpha})=\alpha \int_{0}^{\infty}t^{\alpha -1}P(Y>t)dt$.  My ideas:  $E(Y^{\alpha})= \int_{-\infty}^{\infty}t^{\alpha}f_{Y}(t)dt$  =$\int_{0}^{\infty}t^{\alpha}f_{Y}(t)dt$    =$\int_{0}^{\infty}(\int_{0}^{t^{\alpha}}dy)f_{Y}(t)dt$


Can't use VM VirtualBox "VT-x is disabled in the BIOS for all CPU modes"

I can't use VirtualBox. When I tried to create a ubuntu in it, after powering the virtual box on it gives this as output. Failed to open a session for the virtual machine Ubuntu GNOME.     VT-x is disabled in the BIOS for all CPU modes   (VERR_VMX_MSR_ALL_VMX_DISABLED).      Result Code: NS_ERROR_FAILURE (0x80004005) Component: ConsoleWrap   Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}   Please help me fix this.


This post is linked to . The post has many answers, but none are satisfactory. So I am reposting it, since the original post became dormant. When does the top block start to slide assuming sufficient friction between the two and zero friction between the bottom block and the ground?


Access gnome-shell messaging tray using keyboard

Is there a keyboard shortcut to access the gnome-shell messaging tray? E.g. For responding to incoming IM, etc.


I am trying to write a code to generate random numbers of length l each consisting of a letter and its probability selection where the percentages sum to 100. For example : If I give Random(10,[("X",50),("Y",40),("Z",10)]) should give me "yxxzyyxzzx" i.e 10 random numbers in any fashion(it need not be of 50% of X and 40% of Y and 10% of Z,its just that the sum should be 100(50+40+10)). Similarly Random(5,[("X",50),("Y",40),("Z",10)]) should give me "XXYZZ"   I tried the following code :  from random import choice def Random(length,weightedchoice):      string=""    for count in range(length):           string+=weightedchoice([("X",50),("Y", 40), ("Z", 10)])    return string


Java language is inaccurate for calculations?

I tried the following for loop:  for(double i = 0.0; i<=0.001; i+=0.0001)     System.out.println(i);   And I get the following output:     0.0   1.0E-4   2.0E-4   3.0000000000000003E-4   4.0E-4   5.0E-4   6.000000000000001E-4   7.000000000000001E-4   8.000000000000001E-4   9.000000000000002E-4   My questions are:   How do these extra .000000000000001s come? Will these extra numbers always come, or is there some problem in my code? Do these errors occur only in the Java language, or any other programming languages too? Is double suitable for for loops?


How to perform logistic regression with unbalanced classes?

I will be doing a logistic regression to determine if a number of variables influence whether or not a patient received a certain health care service. I will likely have approximately 500 or so observations, and there will likely be far more zeros (patient did not receive service) than ones (patient did receive service).  In the event that I have a very small amount of ones (I am guessing I will have maybe 20-30), what would be the best method to account for this?


Short story about an invention that transmutes matter and Earth becoming unrecognisable because of it, but people still don't see that as an issue

I encountered this story sometime between 1960 and 1990.  An invention was made that could convert any matter into useful materials, but with the loss of most of the mass. No one understand how or where the mass disappeared, but no one cared much. In a series of vignettes, people keep asking, "Won't this be a problem someday?" A child who was taken to see an enormous granite quarry that was being used as stock for the converter asked this, and his father just laughed heartily.  But there was a row when the Antarcticans converted so much water as to lower sea level (yeah, I know, that's ironic now). Over the course of many generations, no one even remembered what the Earth used to look like, as so much of it was converted, and records were lost because the old ones were also converted.  At the end of the story, the Earth is down to 2/3 of its original volume and there is still no awareness of any problem.


For your continued efforts in reviewing posts, even though the system sometimes messes up and doesn't let you actually review things and keeps displaying them over and over and over. So also, for your patience in putting up with the glitches in the review panel too! Haha  Anyways, a gold reviewer badge: 20000 reviews, over 4000 actioned  I just multiplied both numbers by 20. Think those numbers seem challenging? Is anyone up near those numbers or should it be multiplied by 10 instead? I prefer the higher amount because it would be gold and something harder to work for. :) But we also have to consider the longevity of when all these posts are eventually reviewed and it's only new posts being created.  Anyways, my stats for those who are interested (I wouldn't get the badge to start because I only have ~2000 actioned):  Upvoted            189 Downvoted          11 Edited             926 Commented          127 Voted to Close     44 Flagged            447 Reviewed           21609   As far as the name of the badge, I really like "The Owl is Watching" but not sure if that would be too long. Sounds snazzy though. Ideas?    Personally, I was on a quest to try and clear out all the posts in a single tab before it started showing me the same things over and over (and over) and then it got frustrating because I wasn't even making progress. Quest denied. :(    Lately I've noticed a massive build-up of unreviewed posts. When the review panel was first implemented, there would only ever be maybe 50 unreviewed posts at a time (in a given tab) for my monthly view. Now I log in and there's a thousand or two thousand pending. I think a lot of people quit reviewing after the first badge, so having a gold badge with a high threshold would really improve activity in the review panel and keep people going to improve the community.


We all know that Americans say:     Sara is going to the hospital   While in the UK, they would say (and Americans would never say):     Sara is going to hospital   I'm wondering what the history of this difference is given that in AE, the usage of the "the" modifier seems extraordinarily arbitrary: Americans would say:     Sara is going to school   to mean that Sara is going to be enrolled in school. While they would say:     Sara is going to the school   to mean that Sara is going a particular school building (not enrolled).  To me this intuitively suggests some sort of lack of "personal" connection with the concept of a hospital which is not there when it comes to concepts like "school" or "church".   Now for the leap: does this perhaps have anything to do that in the US, healthcare has been a private entity (until recent occurrences), and not generally regarded as a personal right (but rather, a privilege)?  I know this is a stretch, but this could be an explanation for the "impersonal" way in which AE uses the word — unless my history is all wrong here?  No politics here, just curious about the root of this difference.


How to change the direction of type in Illustrator?

I'm trying to create a coffee logo, saying "COFFEE HOUSE", but I can't seem to figure out how to change the type direction into somewhat of a "U" shape. Here's a picture for reference:   I want to add the word "HOUSE" right under coffee, so it satisfies the circle shape. Like this:    Can someone help me? I know it's a simple task but I'm a complete newbie when it comes to Illustrator. Please and thank you :)


Let $X,Y \in L^1$ and   $$\mathbb E(X \vert Y)=Y$$ $$\mathbb E(Y \vert X)=X.$$  Is it then true that $X=Y.$  This question came up because I can show it for $X,Y \in L^2$ by just computing $E((X-Y)^2)$ but I fail to see whether it also holds by just assuming integrability.


Does anyone know if there's a way to get an Android phone to reboot into recovery mode, from the Android command line?  Note:  I do NOT have adb access.  I do NOT know the magic power-on sequence to do it from the boot loader. I've tried the common things and nothing works.  I DO have root. (And can enter commands directly on the device using a terminal emulator.)  I know it's possible, somehow, because applications like ROM Manager do it. But how?


Regex to swap A and B in multiline text, with a various number of occurrences of A or B

I have a multiline text, in which I want to swap the names of Leibniz and Newton :  1) Either Leibniz or Newton or both have invented calculus.  2) Newton claimed he was the first.  3) Newton lived in England, and Leibniz lived in Germany.  4) Leibniz and Newton are the same person, said Leibniz..   5) Leibniz and Newton are not the same person, said Newton about Leibniz.   So I created (with help of examples in S.O.) the following regex :  (Leibniz|Newton)(.+)(Leibniz|Newton)   to be replaced with  $3$2$1   The result is that the names are swapped in lines 1 and 3 only :  1) Either Newton or Leibniz or both have invented calculus. (OK)  2) Newton claimed he was the first.   3) Leibniz lived in England, and Newton lived in Germany. (OK)  4) Leibniz and Newton are the same person, said Leibniz..   5) Leibniz and Newton are not the same person, said Newton about Leibniz.   Where did I go wrong ? I only understand that my regex works only if the lines contain one A AND one B, but not if there are less (0) or more (2, 3, etc...) occurrences of A OR B.  I would be very grateful for a small explanation (if it is not a chore).  Thanks in advance


Multiple-choice question about properties of an entire function

Let $f$ be an entire function such that $\lvert f\rvert$ approaches infinity as $\lvert z\rvert$ tends to infinity. Then   $f(1/z)$ has an essential singularity at $0$. $f$ cannot be a polynomial. $f$ has finitely many zeros. $f(1/z)$ has a pole at $0$.   Option 2 is false, what about 1, 3, 4?


Is there an idiom like ‘the quæstion raises itself, whether …’?


Can a creature with Hexproof be affected by a spell like Sleep?

Let's suppose I have  in play, equipped with .  My opponent plays .  Does Emrakul, the Promised End get tapped or does Hexproof prevent that?


Can mundane equipment be bought between sessions in Adventurers League play?

When playing in D&D Adventurers League, are players allowed to buy mundane gear out of the PHB between sessions or does this have to happen in front of a DM?  I have read that mundane gear not marked as treasure on an adventure is not able to be kept after the session. Is there anything to let future DMs know my character bought those caltrops and did not illegally salvage them from a dungeon?


java.net.connectexception: Connection refused: no further information via server,

If I connect to my server via any of the ips (moo1210.tk:25561 or localhost:25561) I get a java.net.connectexception: Connection refused: no further information error, its allow on the firewall and its being port forwarded, what should I do? The server type is a 1.7.10 forge server.


Display Tag Excerpt tooltips when editing a question

When editing a post, the tag excerpt tooltips (that you get when viewing a post) are not available.   You do get the live tag preview (that you get when asking a question) for any new tags you add, but sometimes you want to check the tag wiki for the existing tags to make sure they are correct. As it stands you have to remove the suspect tag and re-add it to see the tag info.  (I've found  and  but these are not quite the same question)


Possible duplicate comment deletion is over-zealous

I've just had two comments on  deleted. One was the standard possible duplicate comment, which gets deleted when the post gets marked as a duplicate.  The other was another comment indicating a potential alternate duplicate; . It was something along the lines of:     A better duplicate might be  but it was closed as a duplicate of the first question   I've done some science. It appears as though the word "duplicate" is not enough; I wrote "duplicate test comment" on  but it didn't get deleted (I did it manually).  However, on  I wrote "possible duplicate test comment [test](some question)", this comment was deleted.  At a guess, all comments that have the word duplicate in them and a link to another question are deleted once the question is closed as a duplicate. This might be solely comments that are owned by someone who voted but I'm unable to test.  This shouldn't happen. Comments pointing out separate linkages can be incredibly useful and make the web1 a better place.  1. Pun intended; please tell me someone noticed ;-)?


The  and  and  forces require particles like  and . But in case of gravity there is no such particle found.  Every mass bearing object creates a gravitational field around it, and whenever another mass bearing object enters its field the gravitational force comes into operation.  If all other forces of nature have some particles associated with them why should gravity be an exception?  And if there is no such particle, what exactly is the  and how does it spread over an infinite distance and cause the gravitational force to operate?    Note: I am a high school student and have not studied .


So we have something like:  \documentclass{article} \setcounter{secnumdepth}{2} \setcounter{tocdepth}{2} \usepackage{amsmath}  \begin{document}  \tableofcontents  \section{Brushless Motor Fundamentals} \subsection{Brushless Motor Operation} \subsubsection{DC Motor Operation} Torque is generated in DC motors from the magnetic force, also known as the Lorentz force, which is produced when an electric current is passed through a coil in a magnetic field. This force is given by $F=q[E+(v\times B)]$, where $F$ is the force perpendicular to the coil, $E$ is the electric field in the coil, $B$ is the magnetic field, and $v$ is the velocity of the charged particles in the coil. From mechanics, torque is $\tau=F\times r$.  \section{Brushless Motor Fundamentals 2} \subsection{Brushless Motor Operation} \subsubsection{DC Motor Operation 2} If the electrical force is ignored and the remaining magnetic force is used, with the assumption that $v$ is perpendicular to $B$, we find that $\tau=qvBrsin\theta$.  \end{document}   How to show subsubsections and paragraphs in TOC?


Can I use Google Maps as a layer in ArcMap?  Is it possible?


I want to ask about using UART to send data from uC to PC. So I have some questions.  I wonder what is the maximum of the UART bit rate?  What factors affect the UART speed? For example does using DMA affect the bit rate?   Which Microcontrollers have the UART bit rate more than 30 Mbit/s? If many, like what?


Domain Controller etiquette after a crash between Server 2003 & Server 2008

I have 2 domain controllers on a non-Internet connected network running Windows Server 2008 R2. They running RAID 5 on a 8 Hard Drive server. Sometime last week the Boot Sector became corrupt on DC1 and I was unable to recover the server. I am not going to have to rebuild the server. I have been reading about the changes from Server 2003 to Server 2008. DC1 was the main domain controller and now that it won't but it is all falling to DC2. I know that in previous versions of Windows Server you had to make on the primary and one the secondary. Since DC2 does not see DC1 anymore is there anything I need to do to DC2 as it is now the one in control? I am thinking some kind of meta data clean up but I can't find any hard information on what procedure to do. I understand as of Server 2008 domain controllers are on an equal footing and provide replication to each other so they should be the same correct?


What is the correct pronunciation of the word "solder"?

I have been listening to a podcast where the host pronounces the word solder as "sodder" or "sod-der", even "saw-der". Same thing happened when the lecturer of one of my EE classes pronounced the word solder. As for me I pronounce the word solder as "sole-der" with a distinct L and a longish O.


What does the dot product of two vectors represent?

I know how to calculate the dot product of two vectors alright. However, it is not clear to me what, exactly, does the dot product represent.  The product of two numbers, $2$ and $3$, we say that it is $2$ added to itself $3$ times or something like that.  But when it comes to vectors $\vec{a} \cdot \vec{b}$, I'm not sure what to say. "It is $\vec{a}$ added to itself $\vec{b}$ times" which doesn't make much sense to me.


Regex issue for getting second group from string

I tried with below Regex  Input string = \nAddress 123 Abc st. Phone (123) 456-7890\nLine2\nLine3\nCity";  Regex  Regex rg = new Regex(@"Address(.*)Phone.*\n(.*)City", RegexOptions.Singleline);   But when I have used given regex at that time in the output I got below result set.  for first group = 123 Abc st. for second group = null.  My expected output is as below but from above regex, I got only result set one but not the second one.  expected output  Group 1 = 123 Abc st.  Group 2 = Line2\nLine3


Why is the expected value (mean) of a variable written using square brackets?

My question is told in a few words: Why do you write $E[X]$ in square brackets instead of something like $E(X)$? Probably it is not a "function". How would you call it then? This question also applies for $Var[X]$.


On user profile page: Hats appear correctly positioned ...    until the page is scrolled...     App Version: 1.4.1 Device: iPhone 6 OS Version: Version 9.1 (Build 13B143)


My wife is Ukrainian citizen with Romanian residency permit. We have tickets for a flight Madrid-Heathrow-Seoul:     jue 05/01/2017  Iberia  IB 3160   Turista    09:10 Madrid Adolfo Suárez Barajas Terminal: 4  10:40 Londres   Heathrow Terminal: 5     jue 05/01/2017  British Airways     BA 0017   Turista    13:00 Londres Heathrow Terminal: 5  08:55 Seoul Incheon   >Internacional    I want to understand if she needs a transit visa or not.  My understanding so far is that there is the DATV visa which can be used if you will not go through UK border control, but:   I don't know if this is the case or not (we will not have to recheck-in our luggage, but is there any other Border Control that we might have to pass - i.e. if the terminals will change and not both flights will depart from Terminal 5?) According to  "You don’t need to apply for one if you have: an EEA family permit".   Which seems to be the case.  So in this situation she is not required any visa at all?


Question involving discriminant of quadratic congruence in elementary number theory.

While trying exercise (9.1) of David Burton Elementary Number theory I got struck on this problem.      Problem is -> Let p be an odd prime and gcd(a, p) =1. Establish that quadratic congruence$ ax^2 +x +c\equiv 0 $ is solvable iff $ b^2-4ac$  is either 0 or quadratic residue of p.    My attempt-> Assuming $ b^2 -4ac$ = 0 ,I proved solution must exist. Also  $ b^2-4ac$ cannot be negative as I proved $ ax^2 + bx +c \equiv 0 $ ( mod p) is equivalent to $ y^2 \equiv d $ ( mod p)  where d = $ b^2 -4ac$  and y = 2ax+b .So , if d is negative then $ y^2$ is negative if solution exists which is a contradiction.      But I am unable to prove that solution does exists if d> 0 ie it is positive.    Please help.


I am willing to buy a new mtb.But i am totally confused about which brake to choose.I want to do daily communication by my mtb. and also often want to do stunts.in this circumstances which kind of brake is best for me???


Lookup and return value based on sub-string match

Is there a formula or script that will match sub-strings from one column in another column and return the full value of the sub-string match? e.g.  Input  COL_a            COL_b name             201284_blah_year.ext address          407284_blah_name.xml journal          501283_blah_journal_entries.ott journal_entries  701284_blah_type.dat year             401184_blah_journal.ext type             301287_blah_address.txt   Desired output  COL_a            COL_b name             407284_blah_name.xml  address          301287_blah_address.txt journal          401184_blah_journal.ext  journal_entries  501283_blah_journal_entries.ott  year             201284_blah_year.ext  type             701284_blah_type.dat


Reputation and inbox notification shows up again after refresh

This was asked before too. .  Currently I am facing the issue of appearance of reputation notification in above toolbar.  I can see the reputation notification, for every page refresh even after clicking and viewing the notification.  current browser: Chrome Version 36.0.1985.143 m


Splitting a command syntax across a \newenvironment definition

This question is a direct follow-up to the question  I asked yesterday.   The following example is once again a counter-intuitive one, to demonstrate what I wish to achieve. I'm trying to split the parbox syntax across the begin code and end code of a newenvironment. Using begingroup and endgroup does not seem to work here, and is producing an error.  \newenvironment{mybox}{\parbox{10cm}\begingroup}{\endgroup}   Is this possible in LaTeX?  Just to elaborate a bit on my specific need, I need a lot of centered, framed boxes to highlight some "warnings" and "best practices". For this, I thought of the following environment:  \newenvironment{mybox}[2]% {%   \begingroup \centering \fbox \begingroup \parbox{10cm} \begingroup #1 \hspace{5pt}   {\large \textbf{\textsf{#2}}} \hfill \\ }% {%  \endgroup \endgroup \\ \endgroup \vspace{5pt} % }   One of the arguments is for switching between the texts "Warning" and "Best Practices", and the other one is to provide a special symbol for each type (like a star or as shadowed box)


Will we ever stop receiving CMB photons on earth?

If there is a lamp $1$ meter away from me which is switched on at time $t_1$ and switched off at $t_2$, I'll start receiving the light at time $t_1+\frac{1}{c}$ and stop receiving it at $t_2+\frac{1}{c}$. So there is only a finite time $t_2-t_1$ during which I'll get the light. CMB photons were created at a finite time in the past- the time of recombination when it was $380,000$ years old. If this moment can be compared with the switching on of a cosmic lamp, then from that moment, the CMB photons have started travelling towards us. Will we ever stop receiving these CMB photons here on earth? If not, why?


Flag Comment form z-index / opacity issue

I had tried flagging a comment in Stack Overflow, which was the last one before the answer input form area and I noticed a strange z-index issue:    This thing happens even in Meta. I just checked it now. The reason being there are a few inline styles, which make it display that way. It was hard to replicate, but it was possible:    Is this a known bug, or?


Can we define the energy density of gravity field? If so, what is the formula, and the newtonian approximation? In newtonian mechanics, we can easily obtain the gravitational potential energy. But if the mass gets bigger, and is necessary to use GR, things gets more complicated. What is the potential energy in this case? I am not well-aware about tensor or those sort of things, so please explain in easy words.


How can I trim this wall to the roofline? Thanks in advance.


Excel: I want to extract characters from 1 column and paste these into a separate column

Looking at the image below I want to extract the Lats and Longs from the "geohash,latitude,longitude" column.  I can't just use the function RIGHT(C2,LEN(C2)-8) because the Lats & Longs are different lengths and I'll have to go through the entire column E manually adding any numbers that have been removed.


Null Pointer Exception with Unknown source (Ud.f)

I have an App published in google app store and i get strange log about a crash from an unknown source.  This happens on devices like Xiaomi Redmi Note 5 Pro (whyred), 3840MB RAM, Android 9.  I try to find the same issue reported anywhere but i couldn't.  java.lang.NullPointerException:       at com.baruchi.simpletime.main.Ud.f (Unknown Source:43)     at b.j.a.h.k (Unknown Source)     at b.j.a.v.m (Unknown Source:13)     at b.j.a.v.w (Unknown Source:77)     at b.j.a.h.k (Unknown Source:7)     at b.j.a.v.m (Unknown Source:13)     at b.j.a.v.w (Unknown Source:77)     at b.j.a.m.m (Unknown Source:4)     at b.j.a.k.onSaveInstanceState (Unknown Source:8)     at androidx.appcompat.app.m.onSaveInstanceState (Unknown Source)     at com.baruchi.simpletime.main.MainActivity.onSaveInstanceState (Unknown Source)     at android.app.Activity.performSaveInstanceState (Activity.java:1599)     at android.app.Instrumentation.callActivityOnSaveInstanceState (Instrumentation.java:1444)     at android.app.ActivityThread.callActivityOnSaveInstanceState (ActivityThread.java:4872)     at android.app.ActivityThread.callActivityOnStop (ActivityThread.java:4214)     at android.app.ActivityThread.handleSleeping (ActivityThread.java:4340)     at android.app.ActivityThread.access$2400 (ActivityThread.java:200)     at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1772)     at android.os.Handler.dispatchMessage (Handler.java:106)     at android.os.Looper.loop (Looper.java:201)     at android.app.ActivityThread.main (ActivityThread.java:6810)     at java.lang.reflect.Method.invoke (Native Method)     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:547)     at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:873)


For $(x,y)\in R^2$, consider the series $\lim_{n \to \infty} \sum_{l,k=0}^n \frac{k^2x^ky^l}{l!}$. Then the series converges for $(x,y)$ in $ \\ 1.(-1,1)\times(0,\infty)\\ 2. R\times(-1,1) \\ 3. (-1,1)\times(-1,1) \\ 4. R\times R $   I considered the series separately. The series $\sum_{k=0}^n {k^2x^k}$ converges for $x<1$ and the series $\sum_{l=0}^n \frac{y^l}{l!}$ converges in (0,$\infty$) and in $[-1,1]$. I don't how to solve further, can we apply Able's test here?


How to shrink /home and extend /root partitions

I want to shrink my /home to about 15G, and then extend my / to fill up that remaining space.  How can I do this?  In GParted, I can't seem to shrink /home because there is no free space after it I assume  The same goes for extending /


How to automatically sync files in WinSCP?

Is there a way to do that in WinSCP?  only discusses scripting, while I want a simple GUI solution.


If $\lim_{n\to\infty}a_n=a$ and $a_n>0$ for all $n$, then we have $ \lim_{n\to\infty}\sqrt[n]{a_1a_2\cdots a_n}=a $?

The question is motivated by my  to the question: . In that answer, a lemma was used but I don't remember where I saw it. I'd like to recover a proof.  Question: How should I prove the following lemma?     Lemma. If $\lim_{n\to\infty}a_n=a$ and $a_n>0$ for all $n$, then we have    $$ \lim_{n\to\infty}\sqrt[n]{a_1a_2\cdots a_n}=a. \tag{*} $$     Attempt. I found that it suffices to show that $$ \lim_{n\to\infty}\frac{a_1+\cdots+a_n}{n}=a $$ which turns out to be not easy for me. I tried directly manipulating by definition but failed. How should I go on?


How to set environment variable for BACI compiler and interpreter?

I have installed executable files for  compiler and interpreter in my Ubuntu system.  But now every time I have to compile my .cm file I have to go to the program folder and run ./bacc and ./bainterp.  Can anyone tell me how to set environment variables for these programs, so that I can use them like by simple typing bacc / bainterp from any directory (just like we use gcc)?


Same problem as .  I want to run a whatsapp backup since I want to completely restore my phone to factory and not restore from backup. My iphone is:   Updated to latest iOS 13.2.2 No whatsapp update available (version 2.19.112) Deleted whatsapp data in icloud Toggled whatsapp under "iCloud" and rebooted in between Verified my internet is working fine 100mbps+ Used wifi & cellular* Have 4GB+ available in iCloud Have 25GB available on iPhone Backup size estimated at 2.38GB Seems like separate bug, it won't back up under cellular ("waiting for wifi") even though iCloud drive is on under cellular.


What strategies and tools are useful for finding memory leaks in .NET?

I wrote C++ for 10 years. I encountered memory problems, but they could be fixed with a reasonable amount of effort.  For the last couple of years I've been writing C#. I find I still get lots of memory problems. They're difficult to diagnose and fix due to the non-determinancy, and because the C# philosophy is that you shouldn't have to worry about such things when you very definitely do.  One particular problem I find is that I have to explicitly dispose and cleanup everything in code. If I don't, then the memory profilers don't really help because there is so much chaff floating about you can't find a leak within all the data they're trying to show you. I wonder if I've got the wrong idea, or if the tool I've got isn't the best.  What kind of strategies and tools are useful for tackling memory leaks in .NET?


Trying to track down a sci-fi story about Venus

The story was written with the notion that Venus was covered with watery clouds, so it must be hot and humid there.  I remember the protagonist had to deal with mold or spores that would sprout instantly on anything exposed to outside air.  I think there were hostile trees, too, that could lash out with its branches to catch and eat anything that came nearby.  "jack catch trees", maybe?


Fedora 23: how to take screenshot with context menu window opened on the screen

I need to take a screenshot that records my Eclipse IDE menu item status. For example, if I clicked the "Project" menu and there comes a list of menu items. I need to record those menu items.  The problem is when the menu item list window (which works like a context menu window) has the focus, the screenshot function is not working. I tried everything on this  and nothing works as long as the menu items window is opened. Any mouse click will close the context menu window, so I cannot use mouse either. However if there is no context menu window opened then screenshots works fine.  How can I record the screen with context menu window displayed?


Questions and answers are all skewed - can't read

I'm using a Samsung Galaxy S3 Android version 4.0.4 and Stack Exchange version 1.0.51. After one of the updates (not sure which one) all of the questions and answers appear skewed. Sometimes they are just blank, or all squished together. I basically can't even use the app.  Attached is an example:


In the sentence, "Close your eyes, for just a moment..." which is more correct:  "For just a moment;"  "Just for a moment?"


Changing the default location of Receiving files of bluetooth

Hi I am user of Samsung Galaxy S4, I want to know how can I change the default location of the Received files to SD Card instead of the phone storage?


Badge earned info overflows out of div on Stack Overflow 'User Activity' page

If you go to your user profile on Stack Overflow (and presumably other SE pages) after earning a new badge the box that tells you about it has out of bounds content:    As you can see, the text at the bottom is cut off.  Here is my system information:  Chrome 69 Windows 10 1920x1080   And for clarity, this is the URL I am seeing this on - while logged in as that user:   If there's anything else you need to know let me know :-)


How can i use a video as a screensaver on Lubuntu 19.04?

I want to use a .mp4 video as a screensaver, any suggestion?


When it comes to the dbo schema:   Is it a best practice to avoid using the dbo schema when creating database objects? Why should the dbo schema be avoided or should it? Which database user should own the dbo schema?


Related:   From PHB, p.204;     A spell’s effect expands in straight lines from the point of origin. If no unblocked straight line extends from the point of origin to a location within the area of effect, that location isn’t included in the spell’s area. To block one of these imaginary lines, an obstruction must provide total cover   However, from the text of the  spell,     The fire spreads around corners.   In the case of someone hiding around a corner, I would personally rule that they have total cover. Does this mean that the flame from a fireball will ignore total cover? Or does it only apply to one specific condition under which a creature can have total cover from another (for instance, if the creature was inside of a welded steel box)?


What is the formula for Combination with repetition?

What is the number of ways we can choose three letters from $\{A,B,...,Z\}$ if repetition is allowed?      This is not a permutation.  Is there any formula to solve this kind of problems?


Dropping a table with a non-printable character in its name

I have a legacy table with a name containing non-printable characters (CHAR(31), to be specific).   The non-printable character is beside a underscore, and I've discovered that the shortcut CTRL+SHIFT+_ creates the CHAR(31) character (which means "US" - Unit Separator). The previous developer could have hit this combination by mistake, and created the table with this weird character in it.   When we issue a SELECT command against the table, it returns results. But when we try to issue any DDL against it (DROP, sp_rename, etc), the character causes a problem.  Examples:   DROP TABLE Table_Name;   Raises:     Msg 15225 - No item by the name of 'Table_Name' could be found in the current database 'MyDB', given that @itemtype was input as '(null)'.   EXEC sp_rename N'Table_Name', N'NewTableName';    Raises:     Msg 102 - Incorrect syntax near '_Name'.    I already duplicated the table with the correct name, and have corrected it on the dependent objects. The remaining step is just dropping it from the database.   Just an insight: when we copy+paste from SQL Server to Notepad++, it shows the hidden character ("US") on the middle of the table name, beside the underscore:


Stuck trying to make a css grid navbar - positioning elements

I've been trying to make a navbar with css grid. However des pite my best efforts the elements refuse to align according to the grid I have set. Please look over this html and css and help me identify my problem.
             home

             work

             contact
        and this is the corresponding css for the navbar  body {     font-family: 'Roboto', sans-serif;     font-size: 14px;     margin: 0;     padding: 0; }  a {     text-decoration: none; }  nav {     display: grid;     grid-template-columns: repeat(12, 1fr);     grid-template-rows: 1fr;  } .container> div:nth-child(odd){     background: #000;     padding:1em; }  nav.container {     height: 100px;     background: #e59033;     align-items: center;     align-text: center;     border: 1px solid #000; }  .1 {     grid-column: 5; }  .2 {     grid-column: 6; }  .3 {     grid-column: 7; }   According to me this seems fine but for the life of me I can't figure out where I am going wrong.


I usually hear people ask others "What's up？" when they first meet each other.  But what does this sentence mean?   Does it mean "How are you?"  or "What are you doing?'  And if asked with such phrase, how should I answer?


Why we cannot brute force Elliptic Curve private key?

I am learning ECC, I am confused a bit how it works for now. To my understanding, G is the starting point, k is how many times you apply the dot operation. And Q is the public key, which is the final point after you apply k times dot operations, like this  Q = kG   And then Q is the public key, and k is the private key. We assume it's really hard to find k given Q and G are known. The thing I don't understand (or I misunderstood) is, if the creator of this pair of key, can calculate k times of G to get Q easily in a reasonable amount of time, why can't attacker do the same? I can start from 1 dot operation, then 2 dot operations .... and eventually, I will hit a point that's the same as Q, and because the creator already did this in a reasonable amount of time, so I guess I can do it too (as they need to do k times of operation for thing like Diffie–Hellman)? And if k is super huge, doesn't it take the creator to take a super long time to generate and use it for key exchange? But I don't think it will be that easy, otherwise, it will be useless, just not sure which part I missed.


How can I extract images from a pdf file?

I have a pdf file that consists of an image per page.   Are there any command line programs that can extract these images?


Command prompt as SYSTEM user (Windows 7)

How can I get a command prompt as the SYSTEM user on Windows 7?  Context: I'm testing a computer startup script, and I need to figure out the behavior of a command when run as SYSTEM rather than my user account.  I've seen ways to do this with at and psexec, but those methods only appear to work on Windows XP or Windows Vista.  I'm using Windows 7 Pro SP1.


I recently built a computer and installed ubuntu on it. The wireless i put into it was taken out of a HP Pavilion Slimline s5-1024 Desktop. I checked on the internet and the wireless card is  Ralink corp RT5390 wireless 802.11n 1T/1R PCIe.  Every time i get on my computer, it acts as if everything is ok, but i cant find my home internet and most of the options are dark so i cant click on them. I am very new to all of this and i would just like my wifi to work. would installing a driver for it help? Do i have to get a different adapter?


Show that $\binom{n}{3} = \binom{n-1}{2} + \binom{n-1}{3}$  My solution   Formula: $\binom{n}{k} = \frac{n!}{k!(n-k)!}$  $LHS = \binom{n}{3} = \frac{n!}{3*2(n-3)!} = \frac{n(n-1)!}{3*2(n-3)(n-4)!} = $  $ = \frac{(n-1)!}{3*2(n-4)!}*\frac{n}{n-3} = \binom{n-1}{3} * \frac{n}{n-3} $  So i got one term right. Anyone know how i could continue from here? :)


How did Suren Manvelyan create the macro pictures of eyes?

I came across some really cool  today. How did he manage to get these photos? I couldn't find any EXIF information anywhere, and I don't have enough experience with macro to figure out how he did it.  It's obvious that the light has a lot to do with the result. How and what kind have been used? And what kind of camera equipment?


What makes this line of code execute?  The code gives an output of 11, but I was expecting  it to be 1  package methodcalling;  public class MethodCalling {  public static int cakes = 1; public final static int UNIT = 10; static{cakes += UNIT;}      // what makes this line of code execute  public static void main(String[] args) {     System.out.println(cakes); } }


Execute a method corresponding to a received String

I'm new to Java and I want to execute a method corresponding to a String I receive. In Python I would just do this   myString = "create" options = {     "create": self.create,     "delete": self.delete,     "list_jobs": self.list_jobs } options[myString]()   Is this possible in Java?


Sorting dictionary keys for the equal values

I have a dictionary which is formed by using counter:  c = collections.Counter() for y in all_years:  # iterator     c[y] += 1 d = dict(c.most_common()) print(d)   /All years contain list of 250 year values/  The result: {1995: 9, 1957: 7, 2003: 7, 2000: 7, 2001: 6, 1975: 6, 2014: 6, 2009: 6, 1994: 5, 1999: 5, 2010: 5, 2002: 5, 1997: 5}  Is it possible to sort this dictionary for the equal values by year: e.g. {1995:9,1957:7,2000:7, 2003:7, 1975:6, 2001:6, 2014:6 etc}


We gave our passport for stamping and it looks like it returned with threads coming out lose. My passport has only 2 threads remaining.  We are travelling to a couple of countries before going to India (And then get visa stamped).  Did anyone visit the consulate and can they fix it? It should work with a glue but I dont want to mess with passorts.


When Superman goes back to visit his home planet (using his ability to travel through time, I guess), is he:    an exceptionally strong and athletic Kryptonian? just an average Kryptonian male? a weakling on account of spending a lifetime in the comparative microgravity of Earth?   A possibly related question: why is Superman so muscular? What kind of weights does he lift to stay in shape?  The answers to  are all about Superman's superpowers on Earth compared with other visitors from Krypton; I'm asking about Kal El without his superpowers.  Clarification: I'm asking about the "classic"  Superman, say late Golden to early Silver Age, roughly 1945-1960. (Yes, I know the concept evolved during those years.) I'm not sure what that would be in terms of "numbered Earths", those came along after my time. I'm pretty sure the Kryptonians of that era had no superpowers in their native milieu, nor would Kal El if he were deported in space-time to his native world.


I moved from France to Italy, and it seems like my Play Store is stuck in France. The Operator is recognized correctly as Vodafone on the play store, but I still see the app recommendations in French and some Applications which should be available only in Italy are not downloadable (This item cannot be installed in your device's country)  How do I get play store to recognize that I have moved to a different country. My phone is a factory unlocked Galaxy SIII GT-I9300 with stock OS, purchased in France.


My app is getting crashed when logging out ? In Logcat it shows NullPointerException, null object reference

This is class file code to like and count photo likes. I'm getting null pointer exception      //likes counter      firebaseFirestore.collection("Posts/" + blogPostId + "/Likes").addSnapshotListener(new EventListener<QuerySnapshot>() {         @Override         public void onEvent(QuerySnapshot documentSnapshots, FirebaseFirestoreException e) {              if (!documentSnapshots.isEmpty()){                  int count = documentSnapshots.size();                 holder.updateLikesCount(count);              }else{                  holder.updateLikesCount(0);              }          }     });   This is Logcat Details :   Process: com.example.suraj.photoblog, PID: 24823     java.lang.NullPointerException: Attempt to invoke virtual method 'boolean com.google.firebase.firestore.QuerySnapshot.isEmpty()' on a null object reference         at com.example.suraj.photoblog.BlogRecyclerAdapter$1.onEvent(BlogRecyclerAdapter.java:107)         at com.example.suraj.photoblog.BlogRecyclerAdapter$1.onEvent(BlogRecyclerAdapter.java:103)         at com.google.firebase.firestore.zzi.onEvent(Unknown Source)         at com.google.android.gms.internal.zzevc.zza(Unknown Source)         at com.google.android.gms.internal.zzevd.run(Unknown Source)         at android.os.Handler.handleCallback(Handler.java:742)         at android.os.Handler.dispatchMessage(Handler.java:95)         at android.os.Looper.loop(Looper.java:157)         at android.app.ActivityThread.main(ActivityThread.java:5601)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:774)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:652)


How to convert NPN transistor to PNP transistor?

I am making a circuit using a 4 pin hall sensor with arduino. It turns out that the hall sensor outputs a negative voltage as output, which arduino cannot read, so I will need a PNP transistor, I don't have one but I have a bunch of NPN (BC547) laying around. Is there any way I can make a PNP transistor or add circuitry to make the NPN into PNP? Thanks in advance. For more info about the hall sensor, the first pin is +ve second is Normally open third is Normally closed and fourth is -ve   Turns out that I have a pnp transistor with my Snap Circuits kit. I cracked it open, soldered some wires and now, it looks like this  Take a look at my Schematic above and tell if I need another resistor or somethin


Convert multiple rows into one with comma as separator

If I issue SELECT username FROM Users I get this result:   username -------- Paul John Mary   but what I really need is one row with all the values separated by comma, like this:   Paul, John, Mary   How do I do this?


I put my program in startup applications because of this. The directory /var/log is taking around 36 GB space.   Can I delete syslog and syslog.1 file which are taking the highest percentage of storage in /var/log directory?


Left Join on Linq query when also using the Where clause on joint table

I can see this question has been asked a few times but I am puzzled as to how to implement for myself.  I am using SQL Lite and i am trying to join 2 tables but sometimes the 'linked' row in the 2nd table does not exist.  This is my code:  return from address in DB.Connector.Table<InformedWorkerModel.Tables.Address>()        join addressHistory in DB.Connector.Table<InformedWorkerModel.Tables.AddressHistory>()         on address.AddressRef equals addressHistory.AddressRef         where addressHistory.CustomerRef == customerRef         select new InformedWorkerModel.Tables.Address        {            Address1 = address.Address1,            Address2 = address.Address2,            Address3 = address.Address3,            Town = address.Town,            County = address.County,            Country = address.Country,            PostCode = address.PostCode,            AddressRef = address.AddressRef,            AddressId = address.AddressId        };   On Googling i can see a solution if I do not use a 'where' clause.. but i am..


iMac not letting me downgrade to mavericks via USB

I already asked this question but because I didn't sign up it won't let me respond to anyone, but here it is again *with more info.  I made the mistake of installing Yosemite without backing up my HDD. Fortunately, I do have most of my actual files and programs saved to my external HDD, but that leads to another problem.  I use a lot of 3rd party apps to make music, and they are not compatible with 10.10 i.e. Pro Tools etc. I formatted my HDD in an attempt to start over but it keeps reinstalling Yosemite from the Internet.  I've made several USB boot drives but when they go to load up it just gives me "international no" sign (see image below).  Can someone please help me as my work/life is tied in to my studio. Oh also my external HDD is now all of a sudden read-only NTFS instead of Mac read/write enabled.  *****I made the USB several different times using first an app that was recomended and the second time using disk utility and the restore option with the dmg as my source and the usb as my destination...  I also tried several different versions of mavericks.  PLEASE HELP.


how to add "create node form" in a block?

I just wanted to know how to add "create node form" in a block  when i  copy the source code and make a block out of that code, only public could post from that. when i am posting as a user it says timeout and tells us to refresh the page. plz someone give me solution.  SO i tried to add the following code in page.tpl.php  $form = node_add('nodetype'); print drupal_render($form);


A Significant Performance Drop after using lambda expression to override a Comparator. Why?

EDIT: This is actually a question on leetcode. So the benchmarking is performed by leetcode.  Somewhere in my program, I have to sort a list of Map.Entry<Character, Integer>. Originally, I used the traditional way to override the Comparator for the sort. Then, I also tried another approach with lambda expression.  However, the performance with the use of lambda expression is way worse than the original approach (4x ms vs 1x ms). All the codes in the two program are the same. The only difference is this one line.  Original Code:  list.sort(new Comparator<Map.Entry<Character,Integer>>()    {      @Override      public int compare(Map.Entry<Character,Integer> o1, Map.Entry<Character,Integer> o2) {        return o2.getValue().compareTo(o1.getValue());   } });   New Code:  list.sort((o1, o2) -> o2.getValue().compareTo(o1.getValue()));


How to align the view or a camera to a certain face or object

Is there a way to align the view or a camera to be perpendicular to a specific face or object using it's normal? The thing I am trying to acheive, is to use the view to unwrap a face, so I can use it later for neighboring faces unwrap, but I'm trying to do this precisely, not by eying it.


How can I get a link for a specific answer on Stack Overflow? Like the url of the answer. Is there a place to do that or a specific way? And if you think there's a share button, I don't see one anywhere?


I also just bought a TV worth $1400 with a best buy credit card. I only want to pay for the TV and never use this card again. Can someone tell me what I should do after I pay for my TV? How will not using this card affect my credit score?


If you call a British citizen a Briton, a French citizen a Frenchman and a citizen of Canada a Canadian...  and considering that someone from Asia is and Asian and someone from Africa is a African.  What do you call someone from the United States of America?  It can't be an American, as most Americans live outside the United States in the rest of North and South America.  If there is an official term, will people understand you when you use it?


How can I install  beta ?   I see on their website that they only offer a 64-bit installation files, but the sources are open.   I can't use the usual ./configure && make. So, what can I do ?


My mother was raised in a family that had  placed extreme importance on filial piety.   Is had superfluous, wrong, or correct?  I can see arguments in both directions:   Perfect past (raised) requires pluperfect (had placed). Reflexive participle makes raised imperfect, even though it's a completed action, therefore placed is sufficient.


Why is breaking symmetry important, when initializating the weights of a Neural Network?

In the beginning of the training process of a Neural Network, it's parameters, for example the weights in a Fully Connected Layer, have to initialized. There is a wide variety of schemes, how you can do that.   One of the simplest one is a constant initialization: All weights are set to the same value.  The output of each neuron in the forward pass is then of course the same. But how bad is that? Given that there are other layers and regularization is used, shouldn't that mitigate this process and still allow the network to learn properly?  In this context I also often hear the phrase: "We don't do constant initialization to break symmetry" - but what that does actually mean, why do we want that?


I had this problem from my last question: Given that: $X \sim \text{Uni}(a,b)$. Then why does this say that: $-X \sim \text{Uni}(-a,-b)$ and in general how can I prove such claims? Please show a formal explanation to help me understand every step. My book only has this definition of the density function: $$f_X(x) = \begin{cases} \dfrac{1}{b-a} &x \in [a,b] \\ 0 & \text{otherwise}. \end{cases}$$


Newsletter open and click tracking use http. Can i configure it that it uses https with our certificate? Can this cause block bounces?

We recently saw that a particular domain (lets say it is recipient.com operated by recipient ltd) of newsletter recipients block our newsletter quite often. Therefore we asked the operating company of that domain what is wrong with our newsletters.  Recipient LTD told us:        Use  and that this is the reason why   our newsletter are regarded as spam or virus and get blocked.   Only refer to valid, trusted URLs in your e-mails and make sure that   there is no risk of confusion. Don't link to a phishing site and don't   quote or forward links to malware or spam. Also not as an example or   for fun!   For security reasons, our servers do not allow unencrypted   transfer of executable formats such as those used by viruses, worms   and Trojans.         Examples: ade, adp, app, asp, bas, bat, bhx, cab, ceo,   chm, cmd, com, cpl, crt, csr, der, exe, fxp, hlp, hta, iframe, inf,   ins, isp, its, js, jse, lnk, mad, maf, mag, mam, mar, mas, matte, mde,   mim, msc, msi, msp, mst, ole, pcd, pif, reg, scr, sct, shb, shs, vb,   vbe, vbmacros, vbs, vsw, wmd, ws, wsc, wsf, wsh and xxe.Because spam or virus sender often use links with ids to cover the real target of that url.          Furthermore we saw that we created every link in our newsletter with https but it gets wrapped like:   http://click.ourdomain.com/?qs=65a074a335071185581e968250a74788b72109cb3c4eec81f11a111eac1696522ec229b01733cb96b9ede10b706c1ae6a688533974ef5952   (we selfhost the dns entries and do not use a subdomain or different domain to send our emails)   The open tracking looks like this:  http://click.ourdomain.com/open.aspx?ffcb10-fec41577776c0078-fe5f1077716c047d7713-fe4615111564047e701470-ff5f17757d-fe5a11727c61027d7217-ffce15  Questions:   How can we configure salesforce to wrap these links in https? Has anybody else experienced problems that the tracking functionality (opens,clicks,...) of newsletters causes block bounces?


I am trying to tie together some pieces of grammar here. Specifically: What is proper full-stop and comma notation in combination with parentheses?  The issue shows when abbreviations are involved as in these sentences:     He measured all the properties (though not height, width, depth etc.).      He measured all the properties (though not height, width, depth etc.), which might be of use.   At the closing parenthesis, there are the weird-looking .). and .), constructions. Is this actually correct notation?   The answer on  concludes that the full-stop in the first sentence can both be inside or outside the parenthesis depending on which part of the text, it is tied to. I would therefore keep it outside in the example above.


Moving Object Interception / Projectile Collision

I am using Unity to attempt to have missile A launch at incoming missile B and blow it up. However in order to do this accurately, A must be able to take into account B's current velocity, direction and distance in order to calculate where it needs to aim in order to succesfully hit it. How do we go about this using the below as an example?


Ubuntu 16.10 - deleted files don't go to trash and keep taking space

The trash seems to be empty, but the partition's trash folder (.Trash-1000) shows the deleted files and they keep taking up space. Is this a bug in the new version (16.10) released today? Everything was working fine a few hours ago before upgrading to the new 16.10 edition.


Evaluating goodness of fit for Bernoulli glm

I am trying to fit a model estimating the success probability of the Bernoulli distributed random variable with the logistic link function.  However, I am stuck with testing the goodness of fit of my model.  I know I cannot use the usual chi-squared test, which compares "LRT statistic for a test with null parameter space of dimension p and the alternative of dimension n(saturated model)" with (n-p) chi-squared distribution since asymptotic normality of the parameter of a saturated model cannot be achieved. Also, the note says that "For Bernoulli and binomial models with small counts we cannot expect both Pearson and Deviance residuals to be Normal".  At this stage, it seems all I can look at is Cook`s distance. How could I perform any further goodness of fit test/residual analysis in this case then? Are there any other general methods that I am not aware of?


How to check opened/closed ports on my computer?

How to check the opened/closed ports on my computer?  I used netstat -a on command line.   Does the port status "LISTENING" indicate that the port is open? Is any port, that is not shown in the output, closed?


Something that has never happened to me.  Brewed early Sunday and hit 80+% efficiency.  I used Wyeast London Ale that was fully bloated when pitched.  Over 36 hours later zero activity.  No krausen, No air lock movement...nada.    It is a heavier beer (1.080) and I did not have time for a starter so it is possible that the yeast is working but not enough to show anything visable.  I am going to check the gravity when I get home, but in case nothing changed what is the best course of action?  Should I buy another Wyeast pack?  Dry yeast?  etc?


Render view does not match final render (Cycles Render)

I have a shot put together with a model that is textured to my standards and lit to match my scene and I like the way it looks in the render view.  My issue is that this does not match what shows up in the render.  (The positioning is a little different, but you get the idea).   Anyhow, I've been tinkering around in the settings and can't get it to look right. I'm pretty new to this program and was wondering if I may just have some of my settings messed up or if it's an issue with my laptop rendering. Any thoughts?  Thanks, Joel  Here's my node setup for the material.


$ {L}_{1} $ Regularized Unconstrained Optimization Problem

I am encountering an unconstrained minimization problem. The problem is of the form  $$\min_x \frac{\|x-a\|_2^2}{2}+\lambda\|x\|_1$$  where  $x,a \in R^n$ and $x$ is the optimization variable. $\lambda \in R$. The problem can be separated in each coordinate as follows,  $$\min_{x_i}  \frac{(x_i-a_i)^2}{2}+\lambda|x_i|$$  I found in some resource that the optimal $x_i^*$ has the form  $ x_i^* = \operatorname{sign}(a_i)\max(0,|a_i|-\lambda)$. I am having a hard time understanding why is it optimal solution for the problem. Hope anyone helps.  Thanks.


In chrome Gnome is not working (Although GNOME Shell integration extension is running, native host connector is not detected.) in Ubuntu 20.04

I have uninstall the firefox and installed chromium after that i am getting the message Although "GNOME Shell integration extension is running, native host connector is not detected. Refer documentation for instructions about installing connector." I dont know whether it work without firefox on chromium or not. I am new to linux as i throw away window for their monopoly and appreciate ubuntu . so please help me.


Redirect parent window from an iframe action

What JavaScript do I need to use to redirect a parent window from an iframe?  I want them to click a hyperlink which, using JavaScript or any other method, would redirect the parent window to a new URL.