I'm having issues with signond and gsignond conflicting or something, resulting in me being unable to use apt at all.   miclebrick@micles-workshop:~$ sudo apt-get autoremove Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt --fix-broken install' to correct these. The following packages have unmet dependencies:  kaccounts-integration : Depends: signond but it is not installed  signon-plugin-password : Depends: signond but it is not installed E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution). miclebrick@micles-workshop:~$ sudo apt --fix-broken install Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following additional packages will be installed:   signond The following NEW packages will be installed:   signond 0 upgraded, 1 newly installed, 0 to remove and 50 not upgraded. 3 not fully installed or removed. Need to get 0 B/153 kB of archives. After this operation, 596 kB of additional disk space will be used. Do you want to continue? [Y/n] Y (Reading database ... 448259 files and directories currently installed.) Preparing to unpack .../signond_8.59+17.10.20170606-0ubuntu1_amd64.deb ... Unpacking signond (8.59+17.10.20170606-0ubuntu1) ... dpkg: error processing archive /var/cache/apt/archives/signond_8.59+17.10.20170606-0ubuntu1_amd64.deb (--unpack):  trying to overwrite '/usr/share/dbus-1/services/com.google.code.AccountsSSO.SingleSignOn.service', which is also in package gsignond 1.1.0~r509+pkg4~daily~ubuntu18.10.1 Errors were encountered while processing:  /var/cache/apt/archives/signond_8.59+17.10.20170606-0ubuntu1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

For example:  $ sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: bsh : Depends: libjline-java but it is not going to be installed groovy : Depends: libjline-java but it is not going to be installed rhino : Depends: libjline-java but it is not going to be installed E: Unmet dependencies.   Try 'apt-get -f install' with no packages (or specify a solution).   I get the same or similar errors when I attempt to install clojure1.3, leiningen, and several other packages.   When I try the suggestion made in the error message, this is what happens:  $ sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   diffstat linux-headers-3.2.0-26-generic linux-headers-3.2.0-26 dh-apparmor dkms html2text libmail-sendmail-perl libsys-hostname-long-perl Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   libjline-java Suggested packages:   libjline-java-doc The following NEW packages will be installed:   libjline-java 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 23 not fully installed or removed. Need to get 0 B/72.0 kB of archives. After this operation, 129 kB of additional disk space will be used. Do you want to continue [Y/n]? Y (Reading database ... 226243 files and directories currently installed.) Unpacking libjline-java (from .../libjline-java_1.0-1_all.deb) ... dpkg: error processing /var/cache/apt/archives/libjline-java_1.0-1_all.deb (--unpack):  trying to overwrite '/usr/share/java/jline.jar', which is also in package scala 2.9.2-400 Errors were encountered while processing:  /var/cache/apt/archives/libjline-java_1.0-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  $ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  bsh : Depends: libjline-java but it is not installed  groovy : Depends: libjline-java but it is not installed  rhino : Depends: libjline-java but it is not installed E: Unmet dependencies. Try using -f.


My professor's lecture notes     When I use amsthm, the default behaviour is    The minimal working example is as follows:  \documentclass{article} \usepackage{amsmath,amsthm} \newtheorem{example}{Example}[section] % parent counter setting \newtheorem{definition}{Definition}[section] \begin{document} \section{Topological space: concepts and examples} \setcounter{definition}{-1} \begin{definition} Let $X$ be a non-empty set. The power set of $X$, denoted as $2^{X}$ is $\{Y|Y\subseteq X\}$ \end{definition} \setcounter{example}{-1} \begin{example} $X=\{1,2\},2^X=\{\{1\},\{2\},\{1,2\},\emptyset\}$ \end{example} \begin{example}[Euclidean topology] Let \end{example} \setcounter{example}{3} \begin{example} Let \end{example} \end{document}

I would like to know how to remove the dot that amsthm adds after the number of the theorem (it gives Theorem 1.1. instead of Theorem 1.1 ).   MWE:  \documentclass{article} \usepackage{hyperref} \newtheorem{theorem}{Theorem}[section]  \usepackage{xpatch} \makeatletter \xpatchcmd{\@thm}{\thm@headpunct{.}}{\thm@headpunct{}}{}{} \makeatother  \begin{document} \section{Introduction}  \begin{theorem} Let ... \end{theorem}  \end{document}   gives     while  \documentclass{article} \usepackage{amsthm} \usepackage{hyperref} \newtheorem{theorem}{Theorem}[section]  \usepackage{xpatch} \makeatletter \xpatchcmd{\@thm}{\thm@headpunct{.}}{\thm@headpunct{}}{}{} \makeatother  \begin{document} \section{Introduction}  \begin{theorem} Let ... \end{theorem}  \end{document}   gives    It turns out that if \usepackage{hyperref} is not included, then adding  \usepackage{xpatch} \makeatletter \xpatchcmd{\@thm}{\thm@headpunct{.}}{\thm@headpunct{}}{}{} \makeatother   fixes the problem, but when it is then the problem is still there.   I need to use amsthm but I don't want the dot to appear.  Thanks in advance.


I've been working on a few scripts that can build out all the pieces of an automation that I need to create fairly often.   I can create/update DEs, queries, email send activities, but I CAN'T seem to change the tracking destination in those email send activities.   It always defaults to "my tracking", and I've found changing it in the UI sets it with a "tracking category id" parameter, but I can't seem to set that via SSJS/api etc.  The point of this is to have as close to a "1 click install" as possible, and if I need to go into each send definition manually to change the tracking folder to the correct one it really gets away from that. Any thoughts?

Is it possible to specify the tracking folder when created an ESD  / EmailSendDefinition via the soap api?   Doesnt look like it is based off the Objects properties.


I understand how the gyms work with battling friendly gyms to raise the gyms level. Just wondered if anybody knows if there is a cap to the level it can reach? I presumed it would be level 6, but I've seen level 7 gyms around.  Thanks

What is the maximum gym level and how much prestige does it take to get to this level?  The highest I've seen is 4 and it was 10k/12k prestige, so I assume that there is at least 5.


The tool I'm using to manage references ( for OS X) doesn't seem to be capable of properly exporting  entries for use with biblatex. What is the correct biblatex format for an arXiv entry?  For example, Papers generates items like   @article{Altshuler2002,     author = {Altshuler, B},     title = {{Calculation of the observationally small cosmological constant in the model of six-dimensional}},     journal = {Arxiv preprint hep-th},     year = {2002},     url = {http://arxiv.org/pdf/hep-th/0206225}}  @article{Acemoglu2010,     author = {Acemoglu, Daron and Como, Giacomo and Fagnani, Fabio and Ozdaglar, Asuman},     title = {{Opinion fluctuations and disagreement in social networks}},     journal = {arXiv.org},     year = {2010},     volume = {cs.SI},     month = sep,     rating = {0},     url = {http://arxiv.org/abs/1009.2653v1}}   which, , should actually look like  @eprint{Altshuler2002,     eprinttype={arxiv},      eprint = "hep-th/0206225"     author = {Altshuler, B},     title = {{Calculation of the observationally small cosmological constant in the model of six-dimensional}},     year = {2002},     url = {http://arxiv.org/abs/hep-th/0206225}}  @eprint{Acemoglu2010,     eprinttype={arxiv},      eprint = "1009.2653v1",     primaryClass = "cs.SI",     archivePrefix = "arXiv",     author = {Acemoglu, Daron and Como, Giacomo and Fagnani, Fabio and Ozdaglar, Asuman},     title = {{Opinion fluctuations and disagreement in social networks}},     year = {2010},     month = sep,     url = {http://arxiv.org/abs/1009.2653v1}}   in order to take full advantage of biblatex.   Are these the correct BibLaTeX forms for arXiv entries? I'm having trouble reconciling  I find here, the output from  for generating BibTeX, and the —not to mention the seemingly arXiv-unaware output (above) that I get from Papers (or, for that matter, JabRef or Zotero).

This is a question about how to use bibtex to cite a preprint from Arxiv. Suppose I have:  @ARTICLE{BM:1999,    AUTHOR  = {First, Author AND Second, Author},    TITLE   = {The title of this article},    YEAR    = {2035},    JOURNAL = What exactly do I put here?,    VOLUME  = {},    NUMBER  = {},    PAGES   = {} }   Where exactly do I put the code of the article in arxiv? Suppose the code is arXiv:1234:5678v1  I am using   \bibliographystyle{alpha}  % (uses file "plain.bst")amsplain \bibliography{myrefs}    % expects file "myrefs.bib"   *EDIT:*Actually there is a BibTeX entry that is @unpublished which is the one I am using. I didn't noticed and I put @article in the example above. It has fields: author, title, note, month, year and key. So the question is more about whether to put the arxiv code of the article in note or in key.


To upgrade existing packages using apt-get in Ubuntu, the commands below are used $ apt-get update $ apt-get upgrade  What are the equivalent commands in snap to do the same thing to upgrade packages installed from snap store? I am using Ubuntu 20.

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


I have 3 selection fields as following:   selection field 1 selection  field 2 selection field 3   The selection field 1 and 2 are filled up through a simple MySql query. What I have to do is when user has selected one or several options from selection field 1 and 2, I need to perform an AJAX request to page2.php and then they will be returned some results. Fortunately this works well.  In page2.php there is a selection field with id select_field. The problem appears when I'm trying to reference this id from page1.php.  How can I resolve this problem?

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


I have only recently started using QGIS with no previous knowledge of it so I still struggle with the most basic functions. In particular, I need some help with the snap function. I'm currently employing QGIS to represent a natural gas distribution network for a small city. To do this, I have a line layer consisting of segments representing the actual pipes and a point layer representing every single user connected to the gas grid (which I geocoded from a .csv file with the MMQGIS plugin). The points in the point layer are located according to the address of the user, and thus slightly shifted with respect to the lines, which mostly run along the city streets (see image attached). For the purpose of my work, I need to "attach" every point in the point layer to the closest line in the line layer, simulating the connection between the network and the users. As far as I know, the snap function should be able to perform this task, but I have not been able to operate it properly so far. My question is, how do I snap a point layer to a line layer in such a way that every point snaps to the vertex/vertices of the closest line?   EDIT I'm using the latest release of QGIS which would be 2.18.3 with GRASS 7.2.0.

I would like to align multiple points to a line, or lines within a layer, using a specified tolerance or buffer around the line objects. Please refer to the sample sketch attached.  For the sake of this example, the points closest to the line in the BEFORE picture are within 5 map units of the line, while the outermost points are over 10 map units away. I would like to snap the closest points onto the nearest line, using a tolerance of 5 map units to achieve the result in the AFTER picture.


I just got some problems to determine the number of elements in one of my arrays. I got for example following code:  typedef struct {     char b[100];     int c; }abc;  typedef struct {     char qwe[50];     abc *poi; }def;  abc xyz[] = {     {"xyz", 10},     {"ijk", 20},     {"gdf", 30},     {"hfg", 40} };  abc uio[] = {     {"cde", 50},     {"ghi", 60},     {"hbc", 70} };  def mnb[] = {     {"kio", xyz},     {"mkl", uio} };   I know that I can determin the number of elements in the array mnb like this:  int count_mnb = sizeof(mnb) / sizeof(mnb[0]);   But how do I determine the number of elements in xyz? I want to use xyz as part of the first element of mnb and not just replace mnb by xzy. Something like this:  int count_xyz = sizeof(*mnb[0].poi) / sizeof();   But I couldn't figure how to do this.

How do I determine the size of my array in C?   That is, the number of elements the array can hold?


Lets say I have: public class ConcreteJob {     public void ExecuteConcreteJob(string someParam) { } }  I am used to execute it on Hangfire scheduler: var client = new BackgroundJobClient(); client.Enqueue<ConcreteJob>(job => job.ExecuteConcreteJob("test_string_param"));  Now I would like to replace concrete type ConcreteJob with its string representation "ConcreteJob". Use reflection and do something like this (very simple said): client.Enqueue<"ConcreteJob">(job => job.ExecuteConcreteJob("test_string_param"));  I am getting lost in all the reflection... Lambda as parameter makes this different from other threads on stack overflow. What I have so far: var jobType = Type.GetType("ConcreteJob"); MethodInfo methodInfo = typeof(BackgroundJobClient).GetMethod("Enqueue").MakeGenericMethod(jobType); var funcDelegateType = typeof(Func<>).MakeGenericType(jobType); dynamic lambda = Expression.Lambda(funcDelegateType,         Expression.Call(             Expression.Parameter(jobType, "job"),             jobType.GetMethod("ExecuteCleanup"),             Expression.Constant(UserPrincipalName))     ); methodInfo.Invoke(client, new[] { (Action)(lambda) });

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


Considering the fact that I'm a graduate student with a couple of publications, here is the email I've recently received from  (I found it in my spam folder):  Dear Dr. Robotocist, ------------> (I'm not a doctor!!!) Firstly, please excuse this unsolicited email. I’m sure that like me you receive too many as it is and so I’ll keep it brief. I was recently appointed as Commissioning Editor for Cambridge Scholars Publishing with a brief to expand the subject areas in which we publish books. As such I am in the process of developing a collection based in the field of Robotics. As I believe you already have some experience of academic and scientific writing, I wondered whether you would consider us as your publisher should you decide to put ‘pen to paper’ and write a book at some point in the future? We are also developing Editorial Advisory Groups to help ensure that we only publish high quality texts. If this is something that you would like to become involved in, please do let me know. As I promised, I have kept this message short, but would be delighted to talk or correspond more if you feel you would like to explore possibilities. Kind regards, Helen Edwards Commissioning Assistant  To me, this is a miserable fake thing, and I just wanted to know whether or not anybody has encountered this organization before.

. While the reasons for his doing this are not yet public, this is a real loss of a valuable service. Does anyone know of similar services available to the general public?  Edit:  is definitely relevant, but that approach is more appropriate for finding top journals rather than identifying bottom ones. I.e., following that method would probably exclude lots of valid, lower-tier journals. Are there any approaches to easily identifying a predatory publisher?


How can I select/copy sections of text (from the browser and also from an open editor) that automatically gets appended to a file?  Piping the contents of the clipboard will slow me down and I may as well paste it as I am doing now. The idea is to do nothing other than the copy operation (Ctrl+c) that would result in the selection being appended to the file of my choosing.

I have a rather large file, I need to copy the entire contents somewhere, but when I scroll down the page all the data I have selected becomes unselected. I could just copy and paste block by block, but I would find it much easier as there is a lot of data, to just be able to append the contents to the end of the current clipboard data. Is that possible?  That is so that I can have a keyboard shortcut which will enable me to copy this to the clipboard:  I am some nice new text.   When this is what is already there:  I am the old text.   And have it look like this when pasted:  I am the old text. I am some nice new text.   So there are 3 things that I would really like from this (I would have 3 separate keyboard shortcuts to do this):   Append the data to the end of the clipboard and have it put in a RETURN before it (as shown in the example above). Append the data to the end of the clipboard but have it so that there is not RETURN before it so that it would continue on on the same line initially. Have all this but so that the data is put at the beginning of the clipboard before all the data which is currently there.   I am running Ubuntu GNOME 16.04 with GNOME 3.20.


I have experience working in python but limited knowledge of Java Script. I need help loading in a external Geojson located on my computer into a leaflet map.  I read that I need to use a technique called JSONP in order to bypass cross-domain securities.  This is where I am stuck.  I got a map working by hard-coding a single data point, into the map, but I still have hundreds more so that is not a repeatable and viable option. Data This is the URL form of the geoJSON.  I don't explicitly want to use the URL form as this is just a sample data set as I work through this problem.  I have another data set that is only in JSON form.  I will have to convert it to geoJSON before I can use in leaflet.  If I am wrong in this knowledge, loading a json file into leaflet is my question. geojson  optional json (bringing this into leaflet is my end goal if it is possible)  This is my working code It has the map pulled up with the single point loading in as described above.     <title>A Leaflet map!</title>   <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"/>

        I have tried several tutorials on jsonp, but I just don't quite get the process yet.

I would like to load a geoJSON (polygon) file into my leaflet map. I have seen examples where geoJSON is embedded into the javascript code but I can't find any examples showing how it is done with an external file.        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">     <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />                  <div id="map" style="height: 100%"


I have just installed Ubuntu version 14.04, its unfortunate the libre office doesn’t show the buttons for minimising, closing and enlargement of the libre office. Would anyone help me to sort out.  Regards.

In Ubuntu 14.04, The title bar of my application goes under the main title bar of Unity.  In the image below, the selected window is of Download Manager, but its title bar is hidden under unity's top title bar.    I find this issue occurring with web apps and standalone apps.  Ideally it should look like this:


I want to make sure I am not re-inventing the wheel or heading down a silly path here.  I have to implement a "user area" on a larger site for a specific sub-set of user roles. I have created a custom module to manage some routing and and admin features of this.   One specific change I wish to make is a custom login and account page and set of associated routes. For example, rather than /user/login users login at /private/login and rather than /user/{id} they are directed to /private/user/{id} which I can then style with a different template.  To achieve this I have started extending specific forms and controllers and routes from the core/user module. Is this a sensible approach or is there an easier way to achieve this? In the worse case I could end up re-implementing core/user with minimal changes, which seems excessive.  EDIT - This has been marked as a duplicate of . However, unlike that question I do not wish to override ALL user routes. I want the default ones to remain intact. I have created my own secondary custom login page. Once logged in I want those users to be sent to a specific set of user pages that differs from the default set but I want the regular pages to remain.   More specifically I would like to restrict the routes available by user role.  An admin user could log in anywhere and go to /user/{id}. A 'volunteer' could log in and be taken to a "volunteer" user page with the path: /volunteer/user/{id}. I plan on adding at least one other type of user and user page in the future so there should be three sets of user paths and routes available.

I want change all /user, /user/* urls by /profile, /profile/* urls.  From a custom module, I copied all user routes (found in /core/module/user/user.routing.yml) to my custom .routing.yml file. I replaced all "user*" paths by "profile*".   Now, I have the following.   mycustommodule.register:   path: '/profile/register'   defaults:     _entity_form: 'user.register'     _title: 'Create new account'   requirements:     _access_user_register: 'TRUE'  mycustommodule.pass:   path: '/profile/password'   defaults:     _form: '\Drupal\user\Form\UserPasswordForm'     _title: 'Reset your password'   requirements:     _access: 'TRUE'   options:     _maintenance_access: TRUE  mycustommodule.page:   path: '/profile'   defaults:     _controller: '\Drupal\user\Controller\UserController::userPage'     _title: 'My account'   requirements:     _user_is_logged_in: 'TRUE'  mycustommodule.login:   path: '/profile/login'   defaults:     _form: '\Drupal\user\Form\UserLoginForm'     _title: 'Log in'   requirements:     _user_is_logged_in: 'FALSE'   options:     _maintenance_access: TRUE  mycustommodule.login.http:   path: '/profile/login'   defaults:     _controller: \Drupal\user\Controller\UserAuthenticationController::login   methods: [POST]   requirements:     _user_is_logged_in: 'FALSE'     _format: 'json'  mycustommodule.login_status.http:   path: '/profile/login_status'   defaults:     _controller: \Drupal\user\Controller\UserAuthenticationController::loginStatus   methods: [GET]   requirements:     _access: 'TRUE'     _format: 'json'  mycustommodule.logout.http:   path: '/profile/logout'   defaults:     _controller: \Drupal\user\Controller\UserAuthenticationController::logout   methods: [POST]   requirements:     _user_is_logged_in: 'TRUE'     _format: 'json'     _csrf_token: 'TRUE'  mycustommodule.cancel_confirm:   path: '/profile/{user}/cancel/confirm/{timestamp}/{hashed_pass}'   defaults:     _title: 'Confirm account cancellation'     _controller: '\Drupal\user\Controller\UserController::confirmCancel'     timestamp: 0     hashed_pass: ''   requirements:     _entity_access: 'user.delete'     user: \d+  mycustommodule.reset.login:   path: '/profile/reset/{uid}/{timestamp}/{hash}/login'   defaults:     _controller: '\Drupal\user\Controller\UserController::resetPassLogin'     _title: 'Reset password'   requirements:     _user_is_logged_in: 'FALSE'   options:     _maintenance_access: TRUE     no_cache: TRUE  mycustommodule.reset:   path: '/profile/reset/{uid}/{timestamp}/{hash}'   defaults:     _controller: '\Drupal\user\Controller\UserController::resetPass'     _title: 'Reset password'   requirements:     _access: 'TRUE'   options:     _maintenance_access: TRUE     no_cache: TRUE  mycustommodule.reset.form:   path: '/profile/reset/{uid}'   defaults:     _controller: '\Drupal\user\Controller\UserController::getResetPassForm'     _title: 'Reset password'   requirements:     _user_is_logged_in: 'FALSE'   options:     _maintenance_access: TRUE     no_cache: TRUE   From my website, when I go to the , I'm redirected to the correct page (the user view), but the URL change automatically to . I want keep the URL as . How can I do that? Is it possible?


TO ask a another question within 20 minute  on the Stack overflow not possible,

Why is it that people who have low reputation on Stack Overflow have to wait 20 minutes per question asked? I am trying to teach myself python programming and head the club at school - this website has been a magnificent resource. But, as I work on a problem the issues often come up quickly - so once more, what is the reason for the wait.   As an extra question, why is it that the limit is applied to IP addresses instead of accounts?


I'm trying to get familiar with subprocess.Popen mechanism.  In the bellow example, I try to run netstat then run grep on the output.   netstat = subprocess.Popen("netstat -nptl".split(), stdout = subprocess.PIPE) grep = subprocess.Popen("grep 192.168.46.134".split(), stdin = subprocess.PIPE)   However this does not result in a desired output.

How do I execute the following shell command using the Python  module?  echo "input data" | awk -f script.awk | sort > outfile.txt   The input data will come from a string, so I don't actually need echo.  I've got this far, can anyone explain how I get it to pipe through sort too?  p_awk = subprocess.Popen(["awk","-f","script.awk"],                           stdin=subprocess.PIPE,                           stdout=file("outfile.txt", "w")) p_awk.communicate( "input data" )   UPDATE:  Note that while the accepted answer below doesn't actually answer the question as asked, I believe S.Lott is right and it's better to avoid having to solve that problem in the first place!


Because of some unknown problems, I have hundreds of empty contacts group,I want to delete them all.  I try it on Mac and iCloud,they can just delete one group a time.  I haven’t found any good apps to do it in App Store,if you know one,please tell me.

I would like to have a script to delete all my groups in my Contacts. Somehow I got a kind of replication bug resulting in over 500 groups. Delete them one by one is not an option.  Tried this script, but it does not do the job, I have to enter to many group names and after a while the sript stops even when not all groups have been deleted.  tell application "Contacts"  repeat 50 times  set theGroup to group "MyGroupName"  delete theGroup  end repeat  save end tell   Any help will be much appreciated.


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

How can I project my Droid Incredible screen so I can demonstrate the smart phone to a room full of people?  Does anyone know how I can link the phone to a PC? To a TV?


As a software developer the concept of parallel processing usually meant faster processing because it meant things don't have to wait for the other processes to finish if they don't need to.  So how come the serial connection is looked at (arguably) as the future  while the parallel one as a thing of the past?

As far as my understanding goes, parallel data connections are faster than serial at the same frequency. However, when you increase the frequency in parallel you start getting bits 'cross-talking' and getting transferred onto the next bus. Serial however, since it's only a single bus line, can have the frequency increased to make it faster than parallel without a problem. Also, surely parallel is more expensive as it uses more lines.  So my question is, what actually is the benefit of using a parallel data connection over a serial one? Are there any? If not, why do we still use parallel connections?


I'm new to Linux and StackExchange. My English is pretty bad, and I'm sorry for mistakes.  What is the differences between `` and $()? Does it matter what to use and when?  I'll be grateful for explanation.

There are two syntaxes for command substitution: with dollar-parentheses and with backticks. Running top -p $(pidof init) and top -p `pidof init` gives the same output. Are these two ways of doing the same thing, or are there differences?


I am trying to load names of .mp3 files present in download and music directory with void function, it is showing ("getExternalStoragePublicDirectory" is deprecated): private void fillMusicList() {     musicFileList.clear();     addMusicFilesFrom(String.valueOf(Environment.getExternalStoragePublicDirectory             (Environment.DIRECTORY_MUSIC)));     addMusicFilesFrom(String.valueOf(Environment.getExternalStoragePublicDirectory             (Environment.DIRECTORY_DOWNLOADS))); }  Error in LogCat: 2020-06-20 17:57:21.220 8383-8383/? E/m.example.muzi: Unknown bits set in runtime_flags: 0x8000 2020-06-20 17:57:22.084 8383-8383/? E/AndroidRuntime: FATAL EXCEPTION: main  Process: com.example.muzik, PID: 8383  java.lang.RuntimeException: Unable to resume activity  {com.example.muzik/com.example.muzik.MainActivity}: java.lang.NullPointerException: Attempt to get  length of null array     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4205)     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4237)     at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)     at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)     at android.os.Handler.dispatchMessage(Handler.java:107)     at android.os.Looper.loop(Looper.java:214)     at android.app.ActivityThread.main(ActivityThread.java:7356)     at java.lang.reflect.Method.invoke(Native Method)     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)  Caused by: java.lang.NullPointerException: Attempt to get length of null array     at com.example.muzik.MainActivity.addMusicFilesFrom(MainActivity.java:77)     at com.example.muzik.MainActivity.fillMusicList(MainActivity.java:89)     at com.example.muzik.MainActivity.onResume(MainActivity.java:109)     at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1446)     at android.app.Activity.performResume(Activity.java:7939)     at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4195)     at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4237)      at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:52)      at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:176)      at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)      at android.os.Handler.dispatchMessage(Handler.java:107)      at android.os.Looper.loop(Looper.java:214)      at android.app.ActivityThread.main(ActivityThread.java:7356)      at java.lang.reflect.Method.invoke(Native Method)      at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

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


How do you call the volume region delimited by two parallel planes? I know the 2-dimensional analogue is called a strip. Apologies for this sort of naive question, but I can't seem to get an answer from any popular search engine.

Is there an established name for the region between two parallel planes? I can use sheet, layer, lamina... but I'd like to know whether there is an established name for it.


So I'm making a .Net Application and I have this textbox that is supposed to have the contents of your clipboard in it. But the Clipboard.GetText() does not import anything into the textbox, I've tried replacing it with "Hello World" and it works fine. Code snippet: bool running = true;      public void GetClipboard()     {         while (running)         {             CurrentCopied.Text = Clipboard.GetText();             System.Threading.Thread.Sleep(500);         }     }      public Main()     {         InitializeComponent();          ThreadStart CopyThreadStart = new ThreadStart(GetClipboard);         Thread CopyThread = new Thread(CopyThreadStart);         CopyThread.Start();     }

My clipboard is populated with text, but when I run  string clipboardData = Clipboard.GetText(System.Windows.Forms.TextDataFormat.Text);   I get back an empty string. I've toyed with various forms of the call including:  string clipboardData = Clipboard.GetText(); string clipboardData = Clipboard.GetText(System.Windows.Forms.TextDataFormat.UnicodeText);   But with the same result.  Am I missing something obvious?


During a DDOS attack, if we are finding IPs we want to block will we see better performance using a null route as opposed to iptables?  Null routing we would do something like:  ip route add blackhole <ip or range>   In iptables:  /sbin/iptables -A INPUT -s <ip or range> -j DR   Is there no difference? I would suspect route would work better, but am not certain.

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


I am trying to count all the lines in a txt file, I am using the StreamReader:  public int countLines(string path) {     var watch = System.Diagnostics.Stopwatch.StartNew();     int nlines=0;     string line;     StreamReader file = new StreamReader(path);     while ((line = file.ReadLine()) != null)     {         nlines++;     }     watch.Stop();     var elapsedMs = watch.ElapsedMilliseconds;     Console.Write(elapsedMs)     // elapsedMs = 3520  --- Tested with a 1.2 Mill txt     return nlines; }   Is there a more efficient way to count the number of lines?

Is there an easy way to programmatically determine the number of lines within a text file?


So like, I like, have like, a like, question, like, you know! Like, is there a, like, term, for, like, when someone, like, talks, like, like this, you know? PS: I'm also curious to know what other words and phrases are often used in conjunction with this style of speaking, e.g. "you know".

For instance, I have a friend who just can't help himself constantly saying "ok". He'll say things like "ok, now we're going to [...]" or "now we've seen that, ok", and I'm just wondering what this practice is called.  I used to think this sort of thing was called a "verbal tic", but according to :     Phonic tics are involuntary sounds produced by moving air through the nose, mouth, or throat. They may be alternately referred to as verbal tics or vocal tics, but most diagnosticians prefer the term phonic tics to reflect the notion that the vocal cords are not involved in all tics that produce sound.


I've been reading different articles and such and have come to the conclusion that I should send him:  -ai file  -eps file  -jpg file  -pdf file  -png file  Should I include anything else or is that sufficient?  And my other question is this: Should the jpg and png file be in CMYK or RGB and what should the resolution be, 72 dpi or 300 dpi?  Thanks for the input!   EDIT: Would it be better to save the JPG and PNG as 72 dip or as 300 dpi? What do you typically do?

What files should i put in a logo pack to give to clients? Should I put small, medium and large version of my logo as well as the vector file.


Sometimes when I have been struggling on a problem set for a while, I'll post a question on StackExchange, openly acknowledge that it's homework, and ask for hints (not the full solution).  Typically people give good advice and help me think about the problem in several different ways, and I end up learning a lot by asking the question.  Now the thing is, we are probably not supposed to ask the Internet for homework help.  But in my classes it is perfectly acceptable to go to TA office hours, where most of them will tell me the entire answer instead of giving hints.  Often I've seen TAs present the solution on the blackboard in front of about 20 students (because all the students need help on the same question).  We're also encouraged to "collaborate" with other students, who will usually tell you the entire answer instead of giving minimal hints to help you along.  Is it unethical to ask for homework help on StackExchange given that I learn a lot more than I would using officially sanctioned methods?  (If it matters, I post on math.stackexchange, and this is for classes like real analysis and abstract algebra.)

Say you have a homework assignment and you're struggling with it. You ask a question about some portion of it on a site like physics.stackexchange or math.SE or stackoverflow.com, etc.  You then cite the help you received in your homework, as well as including a link to the post which helped you.  Given that you are removing the "dishonesty" part of the equation, is this still considered cheating? Or would a professor just not give you credit for the part which they feel you didn't do on your own?


Question: how to delete all unmet dependencies? I'm just rage now and hate apt. >.< UPD: output of sudo apt install -f Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following additional packages will be installed:   libvdpau1:i386 The following NEW packages will be installed:   libvdpau1:i386 0 upgraded, 1 newly installed, 0 to remove and 13 not upgraded. 218 not fully installed or removed. Need to get 0 B/24,4 kB of archives. After this operation, 116 kB of additional disk space will be used. Do you want to continue? [Y/n]  (Reading database ... 203285 files and directories currently installed.) Preparing to unpack .../libvdpau1_1.3-1ubuntu2_i386.deb ... Unpacking libvdpau1:i386 (1.3-1ubuntu2) ... dpkg: error processing archive /var/cache/apt/archives/libvdpau1_1.3-1ubuntu2_i386.deb (--unpack):  trying to overwrite shared '/etc/vdpau_wrapper.cfg', which is different from other instances of package libvdpau1:i386 Errors were encountered while processing:  /var/cache/apt/archives/libvdpau1_1.3-1ubuntu2_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

I tried to upgrade Intel graphics in ubuntu 16.10 using the official installer. The last stage of unpacking libcairo2 produces an error (see figure).  When I do upgrade I get the same error also:   Preparing to unpack .../0-libcairo2_1.15.2-0intel1_amd64.deb ... Unpacking libcairo2:amd64 (1.15.2-0intel1) over (1.15.2-0intel1) ... dpkg: error processing archive /tmp/apt-dpkg-install-aYhdFd/0 libcairo2_1.15.2-0intel1_amd64.deb (--unpack): trying to overwrite shared '/usr/share/doc/libcairo2/changelog.Debian.gz', which is different from other instances of package libcairo2:amd64 Preparing to unpack .../1-libcairo2_1.15.2-0intel1_i386.deb ... Unpacking libcairo2:i386 (1.15.2-0intel1) over (1.15.2-0intel1) ... dpkg: error processing archive /tmp/apt-dpkg-install-aYhdFd/1-libcairo2_1.15.2-0intel1_i386.deb (--unpack): trying to overwrite shared '/usr/share/doc/libcairo2/changelog.Debian.gz', which is different from other instances of package libcairo2:i386 Errors were encountered while processing: /tmp/apt-dpkg-install-aYhdFd/0-libcairo2_1.15.2-0intel1_amd64.deb /tmp/apt-dpkg-install-aYhdFd/1-libcairo2_1.15.2-0intel1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   It seems that there is a conflict in thelibcairo releases; if yes, how to resolve it ?


Are all people who do mathematics applying (whether they know it or not) formal logic?   Does every statement someone may make about math, at its core, a formal statement in mathematical logic? (I'm not asking whether it can be translated into mathematical logic, but whether at its core it already is formal.)      Most of the time, when I hear my professors speaking about mathematics, they use natural language - with some precise terms thrown in. For example, one professor might say,     "All positive real numbers have $2$ square roots."   If we were to write down this statement formally, on the other hand, it might go something like this:     $\forall x(x\in\mathbb R^+ \implies \exists y \exists z(y\in\mathbb R \land z\in\mathbb R \land (y\neq z) \land (y^2 = x) \land (z^2 = x))$.   If I were to ask my professor if they really meant the second statement, they might squint at it for a second, tell me I'm using the exterior product incorrectly, then (after clarification) remark, "Well, I suppose you could write it that way, but you know what I meant." (The dialogue here is fictional, but reflects some of the responses I've gotten from professors when I tried to draw out extremely formal statements from them.)  What this brings me to is the question of, when they said the first statement, were they   expressing in natural language a formal statement in mathematical logic (such as the second statement, for example), or simply stating a truth about the positive real numbers?   I feel like most of my math professors would assert that they were merely stating a truth about the positive real numbers, not trying to express in natural language some convoluted formal statement of mathematical logic. It appears to me that not all of my professors have training in, or even care about, formal logic. This is incomprehensible to me, especially when I read about the foundations of math being entirely based on formal logic.     If mathematics is as its core formal, then how could one do any math without formal logic?   In an  elsewhere on the site, user Yuval Filmus stated that "From the point of view of the acting mathematician, foundations are only needed if they're your specialty."  He goes on to request of the asker, "please don't take this formal stuff too seriously. While entertaining and fruitful, it is only one way to look at math." But my response to this is:     Why? If they're the foundations for everything we do, shouldn't everyone care about them?   I realize this question was rather long-winded, but I hope I successfully expressed some of my confusion and frustration, and I would appreciate any advice in making sense of these topics.

I'm trying to wrap my head around the relationship between truth in formal logic, as the value a formal expression can take on, as opposed to commonplace notions of truth.  Personal background: When I was taking a class in formal logic last semester, I found that the most efficient way to do my homework was to forget my typical notions of truth and falsehood, and simply treat truth and falsehood as formal, abstract values that formal expressions may be assigned. In other words, I treated everything formally, which from the name of the course is presumably what I was supposed to do while solving problems.  On the other hand, I came out of the course more confused than enlightened about what truth refers to in mathematics. For example, on what levels are each of the following two statements "true"?        There are infinitely many prime numbers.   The empty function $f\colon \emptyset \to \mathbb R $ is injective.      For the first one, I can obviously see that there would be a contradiction if there were only finitely many prime numbers. To me, the classic proof by contradiction is not a "formal proof" or anything; it is merely a natural language argument that proves (in the everyday sense of the word "proves") why the statement must be true (in the everyday sense of the word "true").  On the other hand, I run into trouble when I try to think about the second one. The very concept of the "empty function" doesn't even feel like it makes sense, but if I think about it as the relation between $\emptyset$ and $\mathbb R$ containing no elements, and then try to write out the statement formally, I get (if I did it correctly)     $ \forall x \forall y ( ((x\in \emptyset) \land (y\in \emptyset) \land (f (x) = f (y))) \implies (x=y)) $   which I think has to be true in a formal sense (since the antecedent is always false?). But to be honest, I don't really know how to think about "truth" here; the situation feels much more confusing than with the first statement.  So, in conclusion, my questions are:     In what sense is each of the above statements "true"? And, more generally,      Is the notion of truth in (mathematical) logic just a formal value assigned to expressions? Or should I think of it as encompassing, but also generalizing, the intuitive notion of a true statement?   (Any insightful comments or answers are appreciated, even if they don't address all of my questions directly.)


I just bought a 120mm deep cool fan with a rating of 12v, 0.07A (70 mA)= 0.84watts  Currently I only have a 12v 2.5A (2500mA) DC adapter.  I'm a complete noob in electricals...so the question is-  Can i use that adapter to power my fan?..is the power too high and will it burn the circuitry inside the fan...or is it ok to use that adapter. Should I buy another adapter that matches the ratings of the Fan?  Thanks in advance.

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


I’d like to clear convey that the documents were all “sent on this day, the twenty-third of August”, which is today as of this writing. When would you use each of these constructions?   I sent all the documents 23 August. I have sent all the documents 23 August. I had sent all the documents 23 August.   Or is there a better way to write it so that it reads more clearly and will be better understood?  What about:   I did send all the documents 23 August.

Non-native speakers often get confused about what the various tenses  and aspects mean in English. With input from some of the folk here I've put together a diagram that I hope will provide some clarity on the matter.  I offer it as the first answer to this question. Consider it a living document. Input is welcome, and good suggestions will be  incorporated into the diagram.    Nota bene: What this is not is a discussion of whether there are  more than two tenses in English. , to which this question is not intended to supply arguments one way or the other.  Here, the aim is to provide an overview of what constructions English-speaking people use for conveying information about actions referring to past, present, and future, and to provide it first and foremost to precisely the people who are likely to use "tense" as a catch-all term in their search, rather than to linguists who know better.  Breaking News There is now an excellent ELU blog article titled  . It is highly recommended reading.


I have a VBScript file that extracts data from a SQL Server database table and then write the result in a CSV file. My problem is that each record gets written to the file one line at a time. I would like the recordset to be pasted into the CSV file in a similar way when using CopyFromRecordset in Excel VBA. Is there a way to do this? Here is my current code that reads the recordset one line at a time,  Set con = CreateObject("ADODB.Connection") Set rs = CreateObject("ADODB.Recordset") Set outFile = CreateObject("Scripting.FileSystemObject").CreateTextFile("C:\Users\JASON SAMUELS\Desktop\VBS\test.csv")  con.Open "Provider=SQLOLEDB.1;Password=pwd123;Persist Security Info=True;User ID=TEST;Initial Catalog=DemoDB;Data Source=JASONPC\SQLEXPRESS"  rs.Open "SELECT * FROM MyTable", con, 1,3  rs.MoveFirst  Do   'WScript.Echo rs("Name") & " " & rs("Surname")   outFile.WriteLine rs("Name") & "," & rs("Surname")   rs.MoveNext  Loop Until rs.EOF  rs.close con.Close Set con = Nothing

I can quite easily dump data into a text file such as:  sqlcmd -S myServer -d myDB -E -Q "select col1, col2, col3 from SomeTable"       -o "MyData.txt"   However, I have looked at the help files for SQLCMD but have not seen an option specifically for CSV.   Is there a way to dump data from a table into a CSV text file using SQLCMD?


This grew up in my water cup over night!   Length ~ 12mm Form - spiral made of dark dots It does not move Growing slowly   Can some one help identify it?

I found these "things" by chance on my wild strawberries which I grow in my organic garden. Basically, some strawberries are completely covered with them.    They're transparent, they have dots equally aligned and they don't move. I've tried searching for transparent slugs and worms and also faeces but to no avail.


Let $\mathbb{C}[x]$ denote the set of all polynomials with complex coefficients. Determine the cardinality of $\mathbb{C}[x]$ using an expression built up from cardinal operations, 2 and $\omega$. I would appreciate if someone could give me a hint, as I have no idea how to begin. Thanks!

What is the cardinality of the set of all polynomials with real coefficients? I know the power set of $\mathbb{R}$ is "more infinite" than $\mathbb{R}$, so to speak, but I'm unsure of how to prove that there does or does not exist a surjection onto $\mathbb{R}[X]$ from $\mathbb{R}$. Is it equinumerous with the power set of $\mathbb{R}$, or something else more exotic?


When I run sudo apt-get upgrade some of my installed packages also upgrading, but I don't want to upgrade them. Is there any way to avoid upgrade them.

Because of  I'd like to prevent apt-get upgrade and Update Manager from updating the "libgtk2.0-0" package.   How can this be achieved?


I want to transfer all my backed-up files(750GB) which are in a windows10 laptop to my freshly installed Ubuntu system. i have only got a 32GB pen drive and to transfer all the file using it will be a nightmare. Is there a way to connect the two machines? Both my machines are connected to a router. My windows10 laptop is connected via wireless Wi-Fi and my Ubuntu PC is connected via an Ethernet cable. My PC doesn't have a wireless driver. Another recent problem is, my laptop Ethernet socket doesn't work.

I have a desktop (Ubuntu 13.04 & Win 7 Home Premium) and a Laptop (Ubuntu 12.04), both having WiFi adapters. I also have a WiFi router connected to internet which both my computers can access.  I want to share files between my desktop and my laptop using WiFi (similar to Homegroup on Windows 7 but without using Ethernet cables).  How do I set-up that?  I want to share files using both OSs, if anyone have have information about sharing files with any of the OS please answer!


Writing in texmaker these lines  (the mount heigh is $1200m$). we saw it in \ref{chapter1}. width=6.02099737532808in           (inside tikzpicture environment)   all the dots (fullstop) get replaced by this symbol    When I compile the document then it behaves like a dot, and get rendered as a dot/fullstop. Even if it's not a problem thou, I would like to understand what this symbol means and if it has some reason to exist...  Anyone has a clue?  EDIT:  Compilable version:  \documentclass{book} \begin{document} (the mount heigh is $1200m$). we saw it in \ref{chapter1}. \end{document}

I am getting the following strange and somewhat annoying behavior in TexMaker for OS X 10.9:    It happens any time a period immediately follows a curly brace.  Why?  Is there any way to fix this...?  Thanks for any tips!


I read  and it is marked as .  There seems to have been no action taken from the "completion"  From the answer on related post:     I think people who have spent time on traditional forums expect a pin icon to mean that a post is "sticky", or always at the top, which is what these pinned items are. However, we also added a sentence in the hero image on the help center landing page that instructs users to begin by reading the pinned articles first. This should make it pretty clear that the pinned articles are the most important.    The bold part of the answer above never seemed to come to fruition.  So again -- Can these pins please be clarified on the actual  as to what they mean?

I was confused initially about what the pins mean next to a topic in the new help center.  "those articles are "featured" articles; they are meant to draw attention to the most important site policies or most frequently encountered issues."   If the pin is used to denote an important topic, it should at least be noted as such. Also a pin generally means to me that this is something that I personally selected.  Could their meaning be clarified somehow?


i have the following warning when compiling with "gcc -ansi -Wall -pedantic conc.c" what i"m doing wrong , please assist   Thanks,       conc.c: In function ‘main’:   conc.c:8:1: warning: control reaches end of non-void function [-Wreturn-type]   #include <stdio.h> void contract(char s1[], char s2[]); int main() {     char s1[] = "abcd";     char s2[] = "zzzz";     contract(s1,s2); }  void contract(char s1[], char s2[]) {     char temp = 'a';     int i = 0;     while (s1[i] != '\0')     {         temp = s1[i];         i++;     }     if (i != 2)     {         s2[0] = s1[0];         s2[1] = '-';         s2[2] = temp;     }     printf ("\n The first char string is %s \n the shorten one is %s \n",s1,s2); }

What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0?  There are numerous duplicates of this question, including:       — For C++, with a very good answer indeed.     Related:


I'm writing my thesis using the memoir class and natbib, with citations such that, at the first occurrence, the full list of authors is given, and "et al." from the second onwards:  \usepackage[authoryear, longnamesfirst]{natbib}   Since all chapters can be read independently, I was wondering whether there's a way to define the longnamesfirst option such that it applies for each chapter separately rather than the entire document...

I am writing my thesis as a collection of papers and I want to have the full bibliography at the end of the thesis. As there is several references that are used in more than one chapter, I would like to "reset" the longnamesfirst option of the natbib package at each chapter. To illustrate here is a MWE.  \documentclass[11pt,a4paper]{memoir} \usepackage[utf8]{inputenc}  \usepackage[round,longnamesfirst]{natbib}  \usepackage{filecontents} \begin{filecontents}{\jobname.bib}     @ARTICLE{ahuja2002,         author = {Ahuja, R.K. and Ergun, {\"O}. and Orlin, J.B. and Punnen, A.P.},         title = {A survey of very large-scale neighborhood search techniques},         journal = {Discrete Applied Mathematics},         year = {2002},         volume = {123},         pages = {75--102},         number = {1},         publisher = {Elsevier}     } \end{filecontents}   \begin{document}     \chapter{First chapter}         \cite{ahuja2002}\\     \chapter{Second chapter}         \cite{ahuja2002} $\leftarrow$ That guy should be ``longnamesfirst'' as well!     \bibliographystyle{plainnat}     \bibliography{\jobname}  \end{document}   I use the memoir document class for the thesis, so the question is tagged  as well.


Just wondering how do I add desktop shortcuts in Ubuntu. I know I cannot right click and add (like Windows or Linux Mint).  Thanks in advance

In older versions it was easy to create a launcher on my desktop. All I had to do is right click on my desktop and select the "create launcher" option.  How can I create such launchers now?


I have a single band raster file as drawn in the labeled image attached.  The size of raster is around 4k pixel in each x and y axis. Large part of this raster is empty. Only in small portions of the raster contains data as labeled. Is there any efficient way I can extract rectangular patches around the data portions of the large tif raster file? Any pythonic way using gdal or rasterio or some other package. What I have done so far: I have followed from sklearn.feature_extraction.imageway to extract 2D patches where there is data as follows. from sklearn.feature_extraction.image import extract_patches_2d im = imageio.imread(largeFilePath) # reading the large image x, y = np.nonzero(im) # taking xy locations with non zero values  # determining xleft, xright, yleft and yright of the non zero area in  raster  xl,xr = x.min(),x.max()  yl,yr = y.min(),y.max()   #Extraing the non zero area from my original raster only_desired_area = im[xl:xr+1, yl:yr+1]  # my desired window to extract  window_shape = (480, 480)  # 2D Ptaches extraction B = extract_patches_2d(only_desired_area, window_shape, max_patches=100)  Issue: This doesn't have georeference information because I haven't used gdal or rasterio


Are there graphing techniques (certain kinds of plots) that are similar to the Edward Tufte's box plots - shown below - but that consider the distribution of the data points?    But instead of a black line traveling vertically, I want a colored line (say red) where the intensity of the redness changes in relation to the frequency of data points at the location.  What I am picturing exactly is a vertical red line that does from 1% to 99%, with horizontal grey lines at 25% and and 75%, a black line at the median, with the color intensity of the vertical red line changing with respect to the number of times each data point along the vertical location was measured.  Any ideas?  Thanks, Tom

I need to draw 20 distributions in a single graph in R, and it doesn't look good (cluttered) to me with regular boxplot (20 boxes) even with boxwex=0.3. Could you suggest me how can I plot a kind of boxplot in R for the 20 distributions, with dots for median and just a line instead of box, like the one below. Please also suggest me if there is any R method that produces nice boxplots, specifically if you want to show several distributions in a single graph.   -----0----


I am trying to match a numeric value that is purely numbers to another value in my database that is the same numbers but has symbols etc (it's phone numbers).  How can I get MySQL to only match the regexp of the mainNumber column (which has symbols etc in it) to my value (just numbers)?  Below is my code:  $SQL = "SELECT entities.name         FROM entities_main_numbers            LEFT JOIN entities ON entities.id = entities_main_numbers.entityId         WHERE mainNumber = ?         LIMIT 1";     E.g. +44 (0)800 123 123 to match against 440800123123

I'm looking to find records in a table that match a specific number that the user enters.  So, the user may enter 12345, but this could be 123zz4-5 in the database. I imagine something like this would work, if PHP functions worked in MySQL. SELECT * FROM foo WHERE preg_replace("/[^0-9]/","",bar) = '12345'  What's the equivalent function or way to do this with just MySQL? Speed is not important.


The following bash does not print out var text, which is confusing to me. How to print the value of text?  text=D echo -e 'A\nB\nC' | while read aline; do text=$aline  done echo $text   the printout is D, but I want to print value C.

Please explain to me why the very last echo statement is blank? I expect that XCODE is incremented in the while loop to a value of 1:  #!/bin/bash OUTPUT="name1 ip ip status" # normally output of another command with multi line output  if [ -z "$OUTPUT" ] then         echo "Status WARN: No messages from SMcli"         exit $STATE_WARNING else         echo "$OUTPUT"|while read NAME IP1 IP2 STATUS         do                 if [ "$STATUS" != "Optimal" ]                 then                         echo "CRIT: $NAME - $STATUS"                         echo $((++XCODE))                 else                         echo "OK: $NAME - $STATUS"                 fi         done fi  echo $XCODE   I've tried using the following statement instead of the ++XCODE method  XCODE=`expr $XCODE + 1`   and it too won't print outside of the while statement. I think I'm missing something about variable scope here, but the ol' man page isn't showing it to me.


In my package.json, I have a regex to process only the files that contain '.integration.'  The command is the following:  "test:integration": "jest .*\\.integration\\..*"   How can I select files that DON'T contain  '.integration.' ?

I know it's possible to match a word and then reverse the matches using other tools (e.g. grep -v). However, is it possible to match lines that do not contain a specific word, e.g. hede, using a regular expression?   Input:  hoho hihi haha hede   Code:  grep "<Regex for 'doesn't contain hede'>" input   Desired output:  hoho hihi haha


I have a login application->(Login) that starts when i run the program in Netbeans, When login credentials are verified i hide the stage and start another stage->(Stardust).  I have a label in Stardust that is initially empty but after login should show the username. I have seen countless questions regarding this and most of the answers didn't even work for the one who asked so forgive me if you find this duplicate.  I have created a method for taking the username from Login into Stardust but when i try : label.setText(user); it gives a NullPointerException  as you can see when i am printing i get the name but it is not setting as label's text. Also if possible i would like this task to happen when this method is called.   //Requested Code  'static void launcher() {         Platform.runLater(new Runnable() {    public void run() {                     new Stardust().start(new Stage());         } }); }'     I called it like Login.launcher(); when login is successful in LoginController.java   public static void main(String[] args) {         Application.launch(Login.class);  }   is how i launch the Login from Stardust

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


I'd like to add linenumbers to my TeX-file. I found the packe lineno which I'm using as follows:  \usepackage{lineno} \linenumbers   Unfortunately line numbers are not added to the figure captions and table captions. Is there an easy way to also include captions to the line numbering?

Is there any quick script to add page and line numbers to each page of a pdf document?   I often enough get articles in pdf to review, with no page number. I end up writing them by hand to refer to each page when pointing errors. When referring an error, I end up counting by hand the lines from the beginning or from the end, or copying the context, to precise the location of the error. It would be much more practical to have a standard way to add line numbers to an existing document.   I could manage editing the LaTeX source to obtain this, but not when I receive a pdf. PDF format does not contain lines per se, so identifying them would require to cluster the $y$-coordinates of the letters, and adding those numbers in the margin would require to take the min of the $x$-coordinates and remove a fixed amount from it. Anybody did this script already, or seen another way?


So, after doing extensive research and youtubing on bicycle truing and wheel building, I decided to completely de-tension a rear wheel on one of my old bicycles and try bringing it back up to tension/round/true/dish.  But, I ended up taco-ing my rim pretty badly in my truing process and rounding two of the nipples.  I guess my spokes were too tight or something.  I was just turning, turning, and then boom, taco'ed.  Now I know, I guess.  So, I detensioned all the spokes again to try and start over, except this time, I noticed my rim was physically deformed.  it wobbles and is out of lateral true pretty badly with no spoke tension on it.  I tried bending the rim back into shape, and got it slightly better, but I think it's as good as it's going to get.  I can't really follow any of the youtube or online tutorials now, since my relative tension between spokes is going to be very disparate because of the rim, and all those tutorials assume (rightly so), you have a good rim to begin with.  I was hoping someone could list a methodical way of bringing such a rim back into tension/true/round/dish-ness.  Thanks everyone.

On two occasions (same wheel, loosened everything off and re-did the whole thing after the first time) as I've applied a final half turn to tighten the spokes round the wheel it's gone from being pretty laterally true (within about 0.5 mm) to badly out of true (probably a couple of mm or more out).  The simplest explanation would be that I've managed to mess up by missing spokes/over under-tightening some of them, but I'm fairly sure that's not the case.  What else could cause this?  This is a rear wheel with a fair amount of dish. I'm worried that I might be over-tightening. On both occasions I decided to do a final half turn as the non drive side seemed a little loose, but I was concerned the drive side might be over tight. Could this cause a sudden change in trueness?  I've got the wheel back to a reasonable state, but I'm no longer sure I have even tension in the spokes.


You know what I am talking about, right? I am following along a video on YouTube and when he clicked on a point, an xyz axis thing popped up on it and it is not doing the same for me. Help?

So I lost my move tool. When I select anything, the standard little 3D move tool interface with all the arrows is no longer visible. I started to use 'G' to overcome that, but now that no longer works. I can move stuff around with G in the UV editor, but it is really rigid and snaps to a grid. I can't use G at all anymore to move things in 3D View though.  I don't know what I pressed, but I messed something up pretty good.  Thanks


Are there any smartphones available in India with Ubuntu Mobile OS? If not, is it possible to install ubuntu touch in android tablets?

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


I'm taking a course and the instructor has beveled an edge and I cannot get the same result. My bevel only bevels on segment on one side then the rest, about 4 or 5 segments bevel on the other side. Other words the bevel is not beveling evenly on the top of a cylinder. Pictures below

First off I'll let you know I'm a total noob at blender I've used 3ds Max up until this point, but the company I'm working for at the moment needs me to use blender so I'm trying to make the transition over.  Literally all I'm making at the moment is a simple book and cannot understand how the bevel tool isn't working similar to how the chamfer tool would in 3ds Max.  I want a nice curved edge for the spine of the book however when I press control + B and try to bevel it bevels the edge unevenly with the new bevel pushing forward.    Is there a way I can get it to bevel evenly like it does in Max?


I came here to know why my flag was marked as Disputed flag, I read various other posts explaining wat is Disputed flag and I got understood what it is. But I am still not sure what happens to a Disputed flag? Can it change to a Helpful/Declined flag in future? (say based on number of Moderators vote for it or something like that)

In my flagging summary under the statistics, there is 1 flag listed as "disputed".  This is the first time I've ever seen a disputed flag in my summary, so I'm just curious, what is a disputed flag? How would you even dispute a flag? Is this the same as voting a flag as invalid?


Good day,  I'm using Apache as a reverse proxy for my Tornado app which runs on http://localhost:8090. I want Apache to proxy everything that arrives to /api/v2 through HTTPS to http://localhost:8090. Apache is also takes care of authentication, thus I need to forward the authenticated user name to my Tornado app. Hence using mod_rewrite.  I've added the following entry to Apache config:  <Location "/api/v2">     ProxyPass http://localhost:8090      # Next four lines are to set X-Forwarded-User     RewriteEngine On     RewriteRule .* - [E=RU:%{LA-U:REMOTE_USER}]     RequestHeader set X-Forwarded-User %{RU}e      SSLRequireSSL      AuthType Basic     AuthName "My site"     AuthBasicProvider external     AuthExternal pwauth     Require valid-user      Order deny,allow     Allow from all </Location>   This works wonders, except that I see the following error in my Apache log:  Request exceeded the limit of 10 subrequest nesting levels due to probable confguration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.   I've enabled the debug log for mod rewrite and I see indeed a strange thing - it looks like the rewrite happens 10 times in loop piling the request onto itself:  172.16.0.150 - admin [29/Jan/2014:19:01:06 +0200] [sm397/sid#7f8452235588][rid#7f840c0093b8/initial] (3) [perdir /api/v2/] applying pattern '.*' to uri 'proxy:http://localhost:8090/' 172.16.0.150 - admin [29/Jan/2014:19:01:06 +0200] [sm397/sid#7f8452235588][rid#7f840c01f638/subreq] (3) [perdir /api/v2/] applying pattern '.*' to uri 'proxy:http://localhost:8090/proxy:http://localhost:8090/' 172.16.0.150 - admin [29/Jan/2014:19:01:06 +0200] [sm397/sid#7f8452235588][rid#7f840c00d6a8/subreq] (3) [perdir /api/v2/] applying pattern '.*' to uri 'proxy:http://localhost:8090/proxy:http://localhost:8090/proxy:http://localhost:8090/' 172.16.0.150 - admin [29/Jan/2014:19:01:06 +0200] [sm397/sid#7f8452235588][rid#7f840c025e08/subreq] (3) [perdir /api/v2/] applying pattern '.*' to uri 'proxy:http://localhost:8090/proxy:http://localhost:8090/proxy:http://localhost:8090/proxy:http://localhost:8090/' 172.16.0.150 - admin [29/Jan/2014:19:01:06 +0200] [sm397/sid#7f8452235588][rid#7f840c029e28/subreq] (3) [perdir /api/v2/] applying pattern '.*' to uri 'proxy:http://localhost:8090/proxy:http://localhost:8090/proxy:http://localhost:8090/proxy:http://localhost:8090/proxy:http://localhost:8090/' 172.16.0.150 - admin [29/Jan/2014:19:01:06 +0200] [sm397/sid#7f8452235588][rid#7f840c02de48/subreq] (3) [perdir /api/v2/] applying pattern '.*' to uri 'proxy:http://localhost:8090/proxy:http://localhost:8090/proxy:http://localhost:8090/proxy:http://localhost:8090/proxy:http://localhost:8090/proxy:http://localhost:8090/'   Full log here:   How to fix it?  Thanks

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


we have submitted our article to a journal  but for a long time status is under review . what can we mention in our eamil to editor for condition the article?

I'd just submitted a manuscript to  Journal on Mar. 1st, 2015. Right after 1 month, its status changed to Under Review. I just waited up to Jan. 2016 and send a letter to editor-in-chief to clear the status of the paper and any potential problem due to this delay. He did say this after that 10 months!:     you are right with your criticism. However your paper deals with   research topics, where only a few of roboticist are familiar with.   Hopefully we can get now the final required review. Sorry for the   inconvenience.   Now, 2 extra months are passed, yet the paper's status is still Under Review.  They should have considered responsibility regarding the case. They could easily announce us about their inability to find any interested reviewer for the manuscript, and we would find the other journal. I'm frustrated a little bit. As a matter of fact, I am reluctant to withdraw the submission as they have wasted my time, NOTICEABLY, over the last year. I wonder if they have completely neglected it.   Is there any way to handle this case, and ask them POLITELY and REASONABLY, leading to the finalization of this manuscript's situation?  Thanks  Edit: After 2 weeks from sending an email to the editor about the manuscript, he has not still replied.


If I open a folder with VLC from Total Commander, with Right-Click -> Open with VLC, the selected context item stucks over my screen until restart. How can I remove it, or fix that it wont happen again. Happens in other scenarios as well.. Pretty annoying :(  OS is Windows 7 Ultimate SP1

Occasionally, I get part of an application lingering behind on my desktop:    This is part of a context menu for an application. It is always top-most, meaning that it is always on the screen, and I cannot click on it (it just clicks through it). It has happened before, sometimes with whole windows. It remains on screen even if the application it originated from is no longer running.  How do I get rid of it without rebooting?


In the code below why foo2 is null when printing its data at system.out.print?  public class Helper {     public void shadowCopy(Foo foo1, Foo foo2){         foo2 = foo1;     }      public static void main(String[] args) {         Helper h = new Helper();         Foo foo1 = new Foo(50);         Foo foo2= null;         h.shadowCopy(foo1, foo2);      System.out.println(foo2.data);// why  java.lang.NullPointerException?     }      public static class Foo {          public int data=0;         public Foo(int data){             this.data = data;         }     }  }

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


I have a restful variable that I want to set to a global variable in python.   This code works. It allows the rest of the script to read the_api      global the_api  auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) the_api = tweepy.API(auth) print(the_api)   This code does set the_api, but in other functions the_api is undefined... Why can't I vset the_api from within a function in python.  def initTweepy():     auth = tweepy.OAuthHandler(consumer_key, consumer_secret)     auth.set_access_token(access_token, access_token_secret)     the_api = tweepy.API(auth)     print(the_api)

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


I have installed Ubuntu 12.04 on my computer with Windows 8.1 pre-installed. But when selecting Windows to boot I get following error: error: unknown command 'drivemap' error: invalid EFI filepath  I ran boot-repair twice. The output can be found here:   Hope you can help me

I have installed Ubuntu 12.04 on my laptop with Windows 8 pre-installed. But when selecting Windows 8 to boot I get following error: error: unknown command 'drivemap' error: invalid EFI filepath  I ran boot-repair more than once.  The output can be found here:   Hope you can help me.


When I'm trying to launch Synaptic from Application Manager it asks me for password, I'm writing it ( I doube-checked though) and then the software close.  When I'm trying to launch it with sudo it doesn't work, and everytime when I'm trying to log in with su in terminal, I get Authentication failure and I'm writing the correct password. What's wrong??  Output for sudo -H synaptic  No protocol specified Failed to connect to Mir: Failed to connect to server socket: No such file or directory Unable to init server: Could not connect: Connection refused  (synaptic:32380): Gtk-WARNING **: cannot open display: :0

Tried to find some answer here: , but it didn't solve my problem.  $ sudo gedit Failed to connect to Mir: Failed to connect to server socket: No such file or directory. Unable to init server: Could not connect: Connection refused.  (gedit:4574): Gtk-WARNING **: cannot open display:   only gedit in terminal works fine. This is my local computer, not a remote system.


I tried connecting a few PCs to a domain and they all seem to be accessible, however there are no accounts on the domain. How do I add user to a domain using local admin cmd?

I have an access to system cmd (the one before you login to domain) and a non admin user located on domain. Since SYSTEM user is considered a higher privilege than admin in windows 7, how do I move one of my domain users to admin privilege on the same domain. I know that using: net localgroup administrators username /add will make this account an admin only locally on computer, usually even without connecting it to the network, which is completely useless help me with syntax or give an example of how to promote an already existing domain user to domain admin while having SYSTEM cmd available


I have downloaded an app on my phone because I want to take out information from it. It has pages (In image form, probably PNG) that I need on my computer. I went to storage and I clicked on the app, in "Space used" it says the app size is 57.27MB, but I want is the user data (Because when I first downloaded the app, the pages weren't there, but when I opened the app they gave the option to download the pages and I clicked the option to downloaded all pages). The user data is 288MB, and the total size of the pages is probably somewhere in 200MBs. So it means the pages are in "User Data." When I connect my phone to my computer (through USB) this shows up:    So if the images are in User Data, from which of those can I locate the "User Data" of the app? Note the app's name is Al-Muhaffiz and it was published by Mahad Al-Zahra Publications.

Could you list all possible directories where Android apps may store data, providing description what kind of data are stored in each directory?


Running Windows 10 with multiple monitors. I can maximize a program in a single monitor by clicking the little box in the top right, or by opening the menu in the program icon on the top left, or by using the window key + up arrow keyboard shortcut, or who knows how many other little shortcuts.  Is there a quick way to maximize a program or window across the whole desktop, including all connected/extended monitors? I'd prefer not to add any third-party software to do this.  I intend to use this mainly for two things: the occasional large spreadsheet, and for remote desktop connections when supporting users who also have multiple displays (mostly via the sccm client rather than the regular remote desktop program), so answers specific to those applications are helpful to me, as well.

I have dual monitors and I want to span my current window so that it appears as one giant window on both monitors. Does anyone know how to do this natively in Windows?


Let A = $Z$[$\sqrt{10}$] = {a+b$\sqrt{10}$$\mid$a,b $\in$ $Z$}.   Prove that any element in A an be written as a product of irreducible, but A is not a UFD.   Also a small question, I've proved that $4$+$\sqrt{10}$ and $4$-$\sqrt{10}$ are irreducible, but how to show that they cannot be associates?  Thank you so much!

I am wondering how to show that $\mathbb{Z}[\sqrt {10}]$ is not a UFD.    My only idea is to show that there are two factorizations of $10$, say, $ab, uv$ such that $a$ is not a unit times $u$ or $v$. In this ring $10=2\cdot5=\sqrt {10}\cdot \sqrt {10}$, so it suffices to show $2$ is not a unit times $\sqrt {10}$. Suppose $2=\sqrt {10}(a+b\sqrt{10})=a\sqrt{10}+10b$. Then $a=0$ since $\sqrt{10}$ is not rational. So $10b=2$, which has no integer solutions. So $\mathbb{Z}[\sqrt {10}]$ is not a UFD.  Is my reasoning correct? What are the flaws?


I have a code that is testing a batch, I am creating a contact and an Account , but the contact isn't getting linked to the account (c.AccountId = null). The same code is tested in Async window and it is creating a contact linked to an account.      Account account = new Account();     account.RecordType = AccountUtilities.RecordTypes.get('Corporate_Golden_Record');     account.Name = 'test corp';     account.phone= '01123123';     account.billingcity='London';     account.billingpostalcode='SW1635HJ';     account.billingcountry='United Kingdom';     account.billingstreet='address 1';     account.retailer_email__c= 'corp@test1223.com';     insert account;       //Insert contact for Account     Contact c = new Contact();     c.AccountId = account.ID;     c.FirstName = 'test';     c.LastName = 'test';     c.email = 'test@test.com';     c.RecordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByName().get('Contact').getRecordTypeId();     c.Language__c = 'EN';     c.birthdate = Date.newInstance(1992, 04, 12);     insert c;       system.debug('-- Contact : ' + c.Account.Name);     system.debug('-- Contact : ' + c.ID);      Test.startTest();     ...     Test.stopTest();

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How do I start writing my first unit test?  How do I unit test this code?  I need help writing this unit test.   Salesforce Stack Exchange looks for detailed, specific questions that the community can help you with, and can't write tests on your behalf. We feel that working with the resources below can help you get started, and we encourage you to make an attempt to write your test and return to SFSE with your specific questions when you encounter challenges you can't resolve.


Recently I've decided to find out how to configure the network in Ubuntu 20.04. Several years ago I used /etc/network/interfaces for this purpose, but now everything changed. As I've found for Ubuntu Desktop  does all the work and for Ubuntu Server, it's customary to use systemd-networkd. I also found  — the network configuration abstraction renderer. What is the motivation to use this piece of software? Is it more convenient to have one more layer between the user and the actual network configuration utility? Why I can't write configuration for NetworkManager on a desktop without any intermediate layer? I'd explored  and found such points:  No persistent generated config, only original YAML config Retains the flexibility to change backends/policy later or adjust to “apt purge network-manager” as generated configuration is ephemeral  I don't understand this idea. As a server user most of the time I have a static network configuration, that is why I prefer to use systemd-networkd and write configs for this solution. As a desktop user, I need to have the ability to connect to different Wi-Fi networks and apply different network policies for different connections (e.g. limit traffic for mobile connection). That is why I use NetworkManager on my desktop. For desktop and server I have completely different use cases, so, as a majority of users, I don't think that I'll ever switch from one tool to another. That is why some additional abstraction layer is useless. I agree that Netplan can be useful for some cloud use cases when you want to store configuration as a code in one place, but is it useful to have this tool in the default Ubuntu Desktop installation? I'll be happy if someone explain to me what is the purpose of Netplan in Ubuntu, especially Ubuntu Desktop.

As we all know, to configure the network, we can edit /etc/network/interfaces and execute /etc/init.d/networking restart.  Today I try to use Ubuntu 17.10 and I've found the network configuration had changed. Now we should edit /etc/netplan01-netcfg.yaml and execute netplan apply.  OK, this might be a bad question but I really want to know why Ubuntu did such a change. Is there a strong reason to explain all of changes like this one?


My root account is corrupt or something every time I log into it I just get a blank desktop. I can move my cursor and right click and I get a few options but that's it. I CANNOT open a terminal from this account. I can however use my guest account but it is very limited. I can't save anything and I cant use sudo. Which means that I can't create a new user account from the guest account. The only boot device I have is the flash drive that I used to install Ubuntu with in the first place. I've only been using this operating system for about a month so I'm not too familiar with all the bells and whistles. Is there anything I can do to fix this?

I've been messing around with Unity and broke something, how do I "start over"?


I have a trivial inheritance case following: class Person { public:     const char* name; public:     Person()         : name("Unknown person") {}          Person(const char* name)         : name(name) {} };  class Student : public Person { public:     Student()         : Person("Unknown Student") {} };  If I assign a child pointer to a parent pointer, it is totally legal: Student *s = new Student(); Person *p = s;  But if I do the other way, assigning a parent pointer to a child pointer, it would cause an error: Person *p = new Person(); Student *s = p;  The error is: invalid conversion from ‘Person*’ to ‘Student*’. An example where this might be useful is: I have a Person class, and depends on where this person will do in life, I will transform it into Student, Teacher, etc. Any suggestions?

Someone mentioned it in the IRC as the slicing problem.


I understand how light / matter bend spacetime but I'd like to understand WHY. Is there some kind of interaction?

This  explains how energy curves spacetime. But I would like to know why energy curves spacetime, is there something like particle interaction that produce this result?


I have downloaded NDVI MODIS 500m image i.e. MOD13A1. From the hdf format that i got i converted them into tif format using the HEG tool. The images that i got some are showing pixel values -32767 to 32768; some images are showing from -2000 to 10156. How do i use the scale factor 0.0001 in such case to get NDVI values from -1 to 1 .

I'm new to StackExchange and to remote sensing.  I am working with MOD13Q1 250m 16-day MVCs.  My goal is to use NDVI time-series to classify cropping pattern and crop type, then link this data to water issues and rainfall.  I am working with ENVI 5.1, which is also new to me.  I have used the Modis Reprojeciton Tool to reproject and mosaic two MODIS tiles covering Sri Lanka.  The data has been reprojected into WGS84_UTM_44N.  I output the data as a GeoTiff and have successfully loaded this into ENVI.    Here's my question:  the pixels in the reprojected/mosaicked raster for the NDVI band (which is what i will need for the time-series analysis) run from -32768 to 32767, not from -1 to 1.  Is this just some silly misinterpretation on my part, do I need to manipulate the raster somehow with ENVI, or have I distorted the data when reprojecting it?


I would like to edit this journal article title to make it sound better Which one is the best option? Cocktail of chemical compounds which robustly promotes cell reprogramming protects liver against acute injury or Cocktail of chemical compounds that robustly promotes cell reprogramming protects liver against acute injury Also, do I use 'promote' or 'promotes'?

When is it appropriate to use that as opposed to which with relative clauses?


I am using Texstudio to compose my assignment. However, I have a problem with it. After I used \section*{}, and the my first paragraph in section is indented to the very left. I want the paragraph starts with two space. How can I solve this problem?

I am just curious that the following format looks good to you or not? The preamble I used is just   \documentclass[12pt,a4paper]{article}  \usepackage{amsmath} \usepackage{amsthm} \usepackage{amssymb}   I don't feel it's so good because the first paragraph has no indent but the second does. If the first paragraph is much longer, than it's fine. But if not, it looks strange. Should I leave it, or you have suggestions for this?


I am trying to finish the achievements in Diablo 3 and one of them I can't complete since I have to buy the Spirit Stone.  The achievement is:      Shut Up and Take My Money!  I can't find it anywhere in 1.0.8. Any one got it? any one knows where to buy it?  Thanks

The "Shut up and take my money" Achievement requires that you buy one of each item from merchants.  There are a lot of items on the list that my class doesn't use, and I am unfamiliar with.  Is there one vendor, or a short list of vendors I can go to in order to buy one of each of these items types?  Also, since I plan on just selling many of them right back since they are of no use to me - generally, where can I buy each item the cheapest?


The kind of person who does not believe in the extreme sides and always weighs the pros and cons and comes to the conclusion that everything should be in moderation

In a paper, I need to mention something meaning "intermediate approaches" and looking for a suitable word or phrase for that.  For example:  Approach 1 is ...  Approach 2 is ... (Approaches 1 and 2 are the two opposite extremes of the possible approaches)  We have studied many intermediate approaches [between approach 1 and approach 2] and the results are shown in Fig. 1.


During my session a player come under the effects of the Dominate Monster spell during a combat. The player, rolled at advantage as written in the spells description, but failed the Wisdom DC both times. The Chronurgist Wizard used his Chronal Shift to reroll as a reaction, but we debated if the roll should be at advantage or not. I can't find anything online that would contradict other wise, and the closest thing I can find from the PHB states: ''When you have advantage or disadvantage and ''something in the game'', such as the halfling’s Lucky trait, lets you reroll the d20, you can reroll only one of the dice'' So, how would Chronal Shift be applied in this instance? Would the played roll again at advantage, or would they roll a further 1d20? I personally made the ruling as it being 1d20.

This might be a duplicate but I can't find it.  To be clear this has nothing to do with Halfling Luck trait. Or similar abilities that allow the reroll of a die that rolls a natural 1. (I was apparently incorrect though.)  This has to do with a situation such as the 's Fanatical Focus feature (Xanathar's Guide to Everything, p. 11), which lets you reroll a save that you fail:     Starting at 6th level, the divine power that fuels your rage can protect you. If you fail a saving throw while you’re raging, you can reroll it, and you must use the new roll. You can use this ability only once per rage.   Situation: Barbarian fails his save and is afflicted with . Now he has disadvantage on Constitution checks and saves. He is targeted with  and fails his save. Using Fanatical Focus, he chooses to reroll that save. He would obviously have disadvantage again since the curse is ongoing. I think we could all agree to that.  However, what if the disadvantage or advantage was only imposed for that effect? Such as a Sorcerer using the Heightened Spell  option:     When you cast a spell that forces a creature to make a saving throw to   resist its effects, you can spend 3 sorcery points to give one target   of the spell disadvantage on its first saving throw made against the   spell.   The ability says you "reroll that save", therefore I argue that you would have disadvantage again as it would still be the first saving throw against the spell albeit a meta-game solutioning of that resolution.  I was unable to find anything on Sageadvice.eu although it is getting harder to sift that data. And I did not find anything in the errata or the .  Is there anything to support this ruling in the rules that I missed?  This seems intuitive and intended however I see nothing that alludes to it.


This question might be flagged as a duplicate But it is not. Because the code sends email successfully  when using normal gmail account that ends with @gmail.com. The problem only happens when using G suit accounts that are custom and ends with @yourdomainname.com.   I am using this code to send email. My account has two-step verification so I created an app password for verification and use it to send email.   using (var mm = new MailMessage(PrivateSettings.SenderEmail, message.Destination))         {             mm.Subject = message.Subject;             mm.Body = message.Body;             mm.IsBodyHtml = true;             var smtp = new SmtpClient             {                 Host = "smtp.gmail.com",                 EnableSsl = true             };             var networkCred = new NetworkCredential(PrivateSettings.SenderEmail, PrivateSettings.EmailPassword);             smtp.UseDefaultCredentials = true;             smtp.Credentials = networkCred;                             smtp.Port = 587;                             smtp.Send(mm);                }   The above code sends email successfully  when I use my normal gmail account which is se.natnael.zeleke@gmail.com.   But when I use one of my G Suit account , connect@tatarri.com , to send email it fails and shows this error message.     So my question is; is their additional configuration that should be done for G suit gmail accounts.  Additional Info.  I configured both email accounts to use app password. connect@tatarri.com is also registered as admin in my G suit account.   Both email accounts have their IMAP enabled in settings.  I bought tatarri.com domain name from namecheap.  Thank you.

Instead of relying on my host to send an email, I was thinking of sending the email messages using my Gmail account. The emails are personalized emails to the bands I play on my show.   Is it possible to do it?