Problem with the Synaptic Package Manager for Ubuntu 16.04 LTS

For the last two years, I have not been able to do handle any changes, update or install new software as there is a major issue with the Synaptic Package Manager and also a similar situation occurs are the terminal level. I cannot even update nor upgrade Ubuntu. Everything seems to be blocked by the following errors: E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/www.iri.upc.edu_cuik_ubuntu_dists_xenial_main_binary-amd64_Packages E: The package lists or status file could not be parsed or opened. E: _cache->open() failed, please report.  W: Target Packages (partner/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:45 and /etc/apt/sources.list.d/xenial-partner.list:4  W: Target Packages (partner/binary-i386/Packages) is configured multiple times in /etc/apt/sources.list:45 and /etc/apt/sources.list.d/xenial-partner.list:4  W: Target Packages (partner/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:45 and /etc/apt/sources.list.d/xenial-partner.list:4  W: Target Translations (partner/i18n/Translation-en_CA) is configured multiple times in /etc/apt/sources.list:45 and /etc/apt/sources.list.d/xenial-partner.list:4  W: Target Translations (partner/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:45 and /etc/apt/sources.list.d/xenial-partner.list:4  W: Target DEP-11 (partner/dep11/Components-amd64.yml) is configured multiple times in /etc/apt/sources.list:45 and /etc/apt/sources.list.d/xenial-partner.list:4  W: Target DEP-11-icons (partner/dep11/icons-64x64.tar) is configured multiple times in /etc/apt/sources.list:45 and /etc/apt/sources.list.d/xenial-partner.list:4  What should I do to repair this issue?


I have not been able to find a working example in QT creator or gallery to use SQLite offline storage API for an Ubuntu touch application.


Why isn't there a uniform probability distribution over the positive real numbers?

Apparently, the solution to the  is that a uniform probability distribution over the positive real numbers doesn't exist. Can anyone explain why this is the case and what probability distributions can exist over the positive real numbers (it seems that this would be quite limited, given that such a simple distribution is impossible)?


Is it better do upgrade system from existing Ubuntu installation, or to install a fresh version?

So far every time I have uninstalled a new version of Ubuntu I have done a clean install of the system, and after that I have installed all programs all over again, but now I am thinking as I have a quite many programs installed currently on my Ubuntu version:  Is it "safe" to update my version of Ubuntu to the latest 13.10 or it is the best to use the 'old school' way and to install a fresh installation and then try to install and transfer all data and programs that I had in previous version? What is better option?


I'm trying to render a scene where a large amount of the scene is visible, but blender has a performance feature where it culls objects when they start to get a certain distance from the camera, whether it be the actual render camera or user camera. Is there any way to remove this? I'm including a picture of the rendered scene.  EDIT> I found out right after posting this how to fix the problem.


In every keyboard that I have used, the keys are arranged so that the keys are staggered a small increment to the left from the previous row. Q is above and slightly to the left of A, and A is above and slightly to the left of Z. This pattern continues across the entire board. Case in point:    What is the motivation behind this design? I would think that a column layout would be easier to type on - and indeed, many ergonomic keyboards seem to go with a column layout, where Q is directly above A and so on.


Accessing the web page's HTTP Headers in JavaScript

How do I access a page's HTTP response headers via JavaScript?  Related to , which was modified to ask about accessing two specific HTTP headers.     Related:


Can I use the Google font 'Lato' for a logo design?

I am creating a logo and would like to use the Google Font 'Lato', can I use this font in my logo design or are there copyright/limitations I need to worry about? I can't find anything online other than that it is an open source font that can be used in anyway you want (maybe that's my answer but I just want to make sure). Also, is it a bad idea to use a web-based font for a logo?


Looking for proper name of 1970s film the TV Show Continuum was based on

I'm trying to find the correct name of the movie that the Continuum TV show was loosely based on.  The movie's premise was a futuristic group of individuals who go back in time, and take bodies that are about to die.  They put them in storage to populate Earth or another planet later on in the future.  In one scene, an airplane lost an engine, and they were about to crash, when the future group of people pulled the plain into time portal, to extract the individuals off the plane and put them in stasis and replace them with dummies.  The only exception is a child who later becomes a detective.  During the extraction something goes wrong, and one of the future people lost their phaser/laser gun, and the leader of the group has to go back in time later on and remove the item before a paradox ensues.    Can anyone identify this movie?  Thanks


What is the significance of the "wheel" group?

I've commonly seen references to a wheel user group online as well as when setting up my sudoers file.  Does naming a group wheel imply something special about the group or is it just a name for a generic group used in the same manner that foo and bar are thrown about?


Agreement between subject and verb in a number of / the number of

3 sentences:-  A number of such incidents has/have been reported by the local residents so far. The number of such incidents is/are very low. The number of elephants in Kerala has/have been dwindling.  What is the correct form of verb in the sentences, and why?


Please take care when flagging answers as "low quality."

When flagging an answer as "low quality" you see some explanatory text that reads:     This answer has serious formatting or content issues and might not be salvageable.   An effort should be made to improve answers before they're flagged for removal.  I don't mean to discourage any "low quality" flagging at all, so if an answer is old and the user hasn't been back for a while, go ahead and flag it.  But if an answer is only a few hours old and has no downvotes or comments (meaning no one made an effort to communicate that improvement was needed) then I'm hesitant to just delete it.  Moderators just don't have time to look at every low-quality answer on the site.  We need everyone in the community to use the tools at their disposal (downvotes, comments, edits) to deal with these.  Please use flagging for deletion as a last resort.  Naturally this is open for discussion, so feel free to voice your opinion if you disagree with me.


How can I display frequently traveled routes?  I think this has been asked before in a question I am unable to relocate which was about how to display multiple overlapping routes on a map, so that frequently traveled routes (with many overlaps) are bright, and single routes are dim. I believe they were trying to re-create an effect from a map they had found elsewhere, and there was an image of that map included in the question.  The answer used transparency and blending modes to create a beautiful effect, where overlapping lines appeared to glow.   The solution looked something like this, except that the lines followed roads in the basemap. They may also have been categorized with a red-yellow-green color scheme.    The basemap in the solution (and possibly also in the question) was a dark grayscale map, similar to ESRI Gray (dark) or CartoDB Dark Matter.


Proving that if $V$ is an inner product space and $U_1, U_2$ are subsets, then $U_1 \subset U_2$ if and only if $U^{\perp}_2 \subset U^{\perp}_1$

Suppose $V$ is an inner product space and $U_1, U_2$ are subsets, then I'd like to show that $U_1 \subset U_2$ if and only if $U^{\perp}_2 \subset U^{\perp}_1$. I can show the first forward direction, by first taking $w \in U^{\perp}_2$. Then, $w$ must be a vector where $<w, u_2> = 0$ for all $u_2 \in U_2$. But, since $U_1 \subset U_2$, then $<w, u_1> = 0$ for all $u_1 \in U_1$. Hence, $w \in U^{\perp}_1$.   I am not sure how to show the opposite direction. My proof is as follows:  Take $u_1 \in U_1$. Now, let $w \in U^{\perp}_2$. Then, $<w,u_2> = 0$ for all $u_2 \in U_2$. But, $U^{\perp}_2 \subset U^{\perp}_1$, and so $w \in U^{\perp}_1$ as well. Hence, $<w,u_1> = 0$ for all $u_1 \in U_1$. After this, I am not sure how to complete the proof. Am I in the right direction? Thanks!


How can I reliably and accurately identify the passive voice in writing or speech? I'm not interested in advice about whether or not to use it yet... I just want to know for sure what it is, so that I don't look as stupid as .


I'm looking for the best JavaScript editor available as an Eclipse plugin. I've been using Spket which is good. But, is there more better one?


Possible wrong interpretation of a passage

Concerned paragraph:  [Background: a master and his servant (a water tubewell technician) have been living happily for several years. The master owns seven farms spread across a large river. The master "became familiar with this ubiquitous man, who not only accompanied him on his tours of inspection, but morning and night could be found standing on the master bed rewiring the light fixture or in the bathroom poking at the water heater". Now, on this one day, the servant has hesitatingly said this to his master]  [i've redacted the proper nouns for these people's names with "the master" and "the servant" to avoid confusion]     “Sir, as you know, your lands stretch from here to the Indus, and on these lands are fully seventeen tube wells, and to tend these seventeen tube wells there is but one man, me, your servant. In your service I have earned these gray hairs”—here he bowed his head to show the gray—“and now I cannot fulfill my duties as I should. Enough, sir, enough. I beg you, forgive me my weakness. Better a darkened house and proud hunger within than disgrace in the light of day. Release me, I ask you, I beg you.”   Question asked related to this quote     The servant's comments primarily serve to:    flatter the master by mentioning how vast his lands are. boast to the master about how competent and reliable the servant is. emphasize the servant's diligence and loyalty to his master. notify the master that the servant intends to quit his job tending the tube wells.     My question:  Notice the lines of the paragraph: "now I cannot fulfill my duties as I should" and "Release me". Don't they clearly indicate that the servant intends to quit his job? Hence, option 4 should clearly be correct.  However, option 3 has been given as correct by KhanAcademy, saying that option 4 is incorrect because "The servant doesn’t say he intends to quit his job, asking instead only for help doing it"  So, my question is:     Isn't the above a clear example of misinterpretation of the paragraph by KA?     All options with KhanAcademy's explanations - for reference   Even though it initially highlights the vastness of the master’s lands, it primarily focuses on the servant’s dedication and service to the master. This emphasizes not that the servant is competent and reliable but that the servant feels he is no longer able to adequately fulfill his duties. The main purpose of the servant’s comments is to highlight the labor and service he has provided for the master over the years. the servant says “there is but one man, me, your servant” to take care of the tube wells on all the master’s vast lands and that the extensive work has resulted in the servant earning gray hairs on his employer’s behalf. The servant doesn’t say he intends to quit his job, asking instead only for help doing it.


Is it possible to add an email just below the authors in this code also is it possible to make the output come as a two column paper.  \documentclass[11pt,oneside,a4paper]{article} \usepackage{hyperref}   \title{Hello} \author{User1 \and User2}    \begin{document} \maketitle  \section{Introduction} A1 \section{Literature Review} A2  \section{Conclusion} A2  \end{document}


Why is my storage not using all of its storage?

My phone says it has 8GB of memory but its only allowing me to use 4GB, why is this? I have already searched this in google but nothing has come up.


Differences between "mandatory" and "compulsory"

What is the difference between mandatory and compulsory? Are they synonyms? Can they be used interchangeably especially with regard to something you must do?   Writing the essay is a mandatory task.  Writing the essay is a compulsory task.


Why are my `addEventListen` buttons only working once?

I have three functions all of which contain contents.innerHTML = 'some HTML';.  These functions are to rewrite the innerHTML of the div with an id of contents when called.  I also have three buttons on the nav bar which are specified at the top of each functions innerHTML. I.E the buttons themselves are also being rewritten along with the rest of the HTML when a function is called.  These buttons each have their own separate id and therefore they each have a document.getElementById('button-id'); in the JS file.  I then use the following event to call each function:  buttonName.addEventListener('click', () => {   functionCall(); });   My problem is that my buttons work only once. After I've clicked any of them once they do not work again. I feel like the reason is staring me in the face but I just can't see it.  HTML:

    JS:  const displayUser = () => {   content.innerHTML = `

Back

Username

Settings

    --- MORE NON NAV RELATED HTML ---   `; };   All three functions look exactly the same as this in terms of the nav HTML.  displayLists(); // load page with displayLists  const logoutBtn = document.getElementById('logout-btn'); // nav links const userBtn = document.getElementById('user-btn'); const settingsBtn = document.getElementById('settings-btn');  logoutBtn.addEventListener('click', () => {   displayLists() }); // change to lists page  userBtn.addEventListener('click', () => {   displayUser() }); // change to user page  settingsBtn.addEventListener('click', () => {   displaySettings() }); // change to settings page


Total number of answers should not reflect the deleted ones

After some answers are deleted (and show up as gray shaded in users with enough reputations), the total numbers of answers shown on the question page still includes those that are deleted. For example,  at the moment has two remaining answers and two deleted answers, and the total still says four. This is strange. I think it should reflect and subtract the deleted answers.


How to get from Nice to Monaco by public transport?

What's the simplest and cheapest way to get from central Nice, France to Monaco by public transportation?


Is Ubuntu's archive signing key available via HTTPS somewhere?

I'm writing a program that needs to download GPG keys for various distributions to do unattended net installs. To do this securely and in an automated way, I need to download the key via HTTPS, which means "gpg --recv-keys" isn't an option. Other distributions (e.g., Fedora) make their keys available on their websites via HTTPS (e.g., ), but I can't find the Ubuntu key file anywhere on ubuntu.com. Does anyone know where I can get it via HTTPS?


Does there exist an $n$ such that $3^n$ starts with $2019$

Does there exist a natural number $n$ such that the first four digits in the decimal representation of $3^n$ is $2019$?  I know to estimate the last few digits of any exponent by reducing modulo $10^k$, but how to obtain the first few digits? Note that computational tools are discouraged. Instead pure analysis must be used to arrive at the conclusion. Any hints? Thanks beforehand.


Sql like statement - Returns wrong result

I know the title is not good i don't know how to explain that.   I have table like  Id    AvaibleSports 1     [1] 2     [1] 3     [2],[10] 4     [4],[10]   I know this is not the best way to store information but this is all i have right now. I need to filter rows based on avaible sports value.  For example when i filter for "1" i must get records 1 and 2. When i filter for "10", i need to get 3 and 4 back.  I tried to filter with like statement like this:  select Id, AvaibleSports FROM myTable wHERE AvaibleSports like '%[10]%'   but this is also returning records containing [1].   I also tried to filter like   select Id, AvaibleSports FROM myTable wHERE AvaibleSports like '%10%'   This is returning correct result for 10 but wrong result for 1.   How can i filter this correctly?


BBWC: in theory a good idea but has one ever saved your data?

I'm familiar with what a BBWC (Battery-backed write cache) is intended to do - and previously used them in my servers even with good UPS. There are obvously failures it does not provide protection for. I'm curious to understand whether it actually offers any real benefit in practice.  (NB I'm specifically looking for responses from people who have BBWC and had crashes/failures and whether the BBWC helped recovery or not)  Update  After the feedback here, I'm increasingly skeptical as whether a BBWC adds any value.  To have any confidence about data integrity, the filesystem MUST know when data has been committed to non-volatile storage (not necessarily the disk - a point I'll come back to). It's worth noting that a lot of disks lie about when data has been committed to the disk (). While it seems reasonable to assume that disabling the on-disk cache might make the disks more honest, there's still no guarantee that this is the case either.  Due to the typcally large buffers in a BBWC, a barrier can require significantly more data to be commited to disk therefore causing delays on writes: the general advice is to disable barriers when using a non-volatile write back cache (and to disable on-disk caching). However this would appear to undermine the integrity of the write operation - just because more data is maintained in non-volatile storage does not mean that it will be more consistent. Indeed, arguably without demarcation between logical transactions there seems to be less opportunity to ensure consistency than otherwise.   If the BBWC were to acknowledge barriers at the point the data enters it's non-volatile storage (rather than being committed to disk) then it would appear to satisfy the data integrity requirement without a performance penalty - implying that barriers should still be enabled. However since these devices generally exhibit behaviour consistent with flushing the data to the physical device (significantly slower with barriers) and the widespread advice to disable barriers, they cannot therefore be behaving in this way. WHY NOT?  If the I/O in the OS is modelled as a series of streams then there is some scope to minimise the blocking effect of a write barrier when write caching is managed by the OS - since at this level only the logical transaction (a single stream) needs to be committed. On the other hand, a BBWC with no knowledge of which bits of data make up the transaction would have to commit its entire cache to disk. Whether the kernel/filesystems actually implement this in practice would require a lot more effort than I'm wiling to invest at the moment.  A combination of disks telling fibs about what has been committed and sudden loss of power undoubtedly leads to corruption - and with a Journalling or log structured filesystem which don't do a full fsck after an outage its unlikely that the corruption will be detected let alone an attempt made to repair it.   In terms of the modes of failure, in my experience most sudden power outages occur because of loss of mains power (easily mitigated with a UPS and managed shutdown). People pulling the wrong cable out of rack implies poor datacentre hygene (labelling and cable management). There are some types of sudden power loss event which are not prevented by a UPS - failure in the PSU or VRM a BBWC with barriers would provide data integrity in the event of a failure here, however how common are such events? Very rare judging by the lack of responses here.   Certainly moving the fault tolerance higher in the stack is significantly more expensive the a BBWC - however implementing a server as a cluster has lots of other benefits for performance and availability.  An alternative way to mitigate the impact of sudden power loss would be to implement a SAN - AoE makes this a practical proposition (I don't really see the point in iSCSI) but again there's a higher cost.


Why isn't everthing in a superposition state?

I know that a superposition is a state in which there are 50% and 50% (other % also) chances of two things to happen so why am I not in a superposition state? Example, I am at rest and i now choose to be in motion so there can be a 50-50% chance of myself that i will be walking or running, so I think I am in a superposition state so can't we say that everything in this universe is in a superposition state?


Find the id and text of the clicked  tag with jquery

I have some list tag in my HTML page .I want to find the text and id of list tag separately. Since my list is created in the run time so I cant figure out how to get the id and text value.  I have tried this  $("#users li").click(function(e)  {       console.log($(this).text());      console.log($(this).id); });   But it is not triggering any click event.  HTML part

Online Users

   jquery part  $(function () {     var socket =io.connect();     var $users =$('#users');      socket.on('get users',function(data){     var html='';     for(var i=0;i<data.length;i++){          html+='
'+data[i]+'
';     }     $users.html(html);     });      $($users).click(function(e)     {      console.log($(this).text());     console.log($(this).id);    }); }


For some reasons I cannot open some dragon claw doors. I have the right dragon claw for the door, and I am putting the right code in but the door does not open, it just shoots poison darts at me.  It happened with the sapphire claw and one other, but I forget the color.


If $f$ is holomorphic in $\{|z|<1\}$ \ $\{0\}$ and doesn't get values in $(-\infty ,0]$ then $0$ is a removable singular point

Let $f$ b a holomorphic in $\{|z|<1\}$ \ $\{0\}$. I want to show that if $f$ doesn't get values in $(-\infty ,0]$ then $0$ is a removable singular point.  I am not sure where to start, but since $f$ is never equal to $0$ then I can probably work with $\frac{1}{f}$ which is also holomorphic in the same domain.   From Riemann's theorem, I know that if $f$ is bounded in a neighborhood of $0$ then it is a removable singular point.  However I don't think it gets me anywhere here.  Help would be appreciated


When I try to use try_files with ?$args at location /api/v1 I get error 404. Without it it's working properly. Any idea?    Nginx Configuration  server {     listen  80;     server_name domain.com;      index index.php;     root  /home/ec2-user/dev.domain.com.br/webroot/default/web;      location / {         try_files $uri $uri/ /index.php?$args;     }      location ~ \.php$ {         fastcgi_pass    127.0.0.1:9000;         fastcgi_index   index.php;         fastcgi_param   SCRIPT_FILENAME  $request_filename;         include         fastcgi_params;     }      location /api/v1 {         alias /home/ec2-user/dev.domain.com/webroot/apiv1/web;          # Works, but don't parse args.         try_files $uri /api/v1/index.php; ## << WORKING          # Do not work. Error 404.         try_files $uri /api/v1/index.php?$args; ## << ERROR          location ~ \.php$ {             fastcgi_pass    127.0.0.1:9000;             fastcgi_index   index.php;             fastcgi_param   SCRIPT_FILENAME  $request_filename;             include         fastcgi_params;         }     } }


Why doesn't my bitmask program work? And how can i reset / set a bit and then print the number

int main() {      unsigned int nr, mask;      printf("nr = ");   //for eg. if i use number 11111111 or 00111111 it prints 0.      scanf("%hu", &nr);      if ((nr & 0b00001000) == 0)         printf("0\n\n");     else         printf("1\n\n");  mask = 0b00001000;      if (nr & mask)         printf("1\n");     else         printf("0\n");      printf("%x", nr);      return 0; }  I can set a reset a bit using a mask like this 00001000 & nr(10101010) with the "1" placed so the 4th bit will be rest, but again it doesn't work ( I don't know why). But I have no idea how to print the number after.


Nested cross validation for model selection

How can one use nested cross validation for model selection?   From what I read online, nested CV works as follows:   There is the inner CV loop, where we may conduct a grid search (e.g. running K-fold for every available model, e.g. combination of hyperparameters/features) There is the outer CV loop, where we measure the performance of the model that won in the inner fold, on a separate external fold.    At the end of this process we end up with $K$ models ($K$ being the number of folds in the outer loop). These models are the ones that won in the grid search within the inner CV, and they are likely different (e.g. SVMs with different kernels, trained with possibly different features, depending on the grid search).  How do I choose a model from this output? It looks to me that selecting the best model out of those $K$ winning models would not be a fair comparison since each model was trained and tested on different parts of the dataset.  So how can I use nested  CV for model selection?   Also I have read threads discussing how nested model selection is useful for analyzing the learning procedure. What types of analysis /checks can I do with the scores that I get from the outer K folds?


excavator badge did not add in my account

In my dash board i am seeing the recommendation "excavator"  -Edited first post that was inactive for 6 months.  I have edited      But i did not receive the badge. I am little bit confused on this excavator badge.   Can any one help me to understand why i did not receive this badge ?


There are infinitely many irreducible polynomials in $\Bbb{F}_p[X]$

I can intuitively understand that there are infinitely many irreducible polynomials in $\Bbb{F}_p[X]$, where $p$ is a prime number, but I'm having a hard time actually proving it. What proof strategy should I take for this?


Could giving an alternative approach to proving an established result be worthy of publication?

(I don't believe this is a duplicate to , because not only am I using a different proof, but also an axiomatisation that could perhaps be seen as controversial) I am a post graduate student of pure mathematics that hasn't published anything yet. Hypothetically, let's say that there's an established result in mathematics that was stated and proven using a popular axiomatisation. Let's say that if you state and prove the same result using a different (non-standard) axiomatisation, then the result becomes (perhaps debatably) more elegant. Is it possible for paper like this to be worthy of publication? If so, are there any specific journals that you think might be more likely to accept such a paper? Slightly more detail: The established result uses ZFC as axiomatisation, my approach uses ZFC + Atoms as axiomatisation. The result that I'm restating and reproving concerns general mathematical structures.


How can I add abstract to table of contents

I believe it is correct to add the abstract to my TOC but I don't know how.  talking about adding the abstract chapter to the TOC. I'm using Lyx and if I output to .tex file this is what I see.  \documentclass[english]{report} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \setcounter{secnumdepth}{3} \setcounter{tocdepth}{3}  \makeatletter %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% User specified LaTeX commands. \usepackage{babel}  \makeatother  \usepackage{babel} \begin{document}  \title{My Title}   \author{My Name}  \maketitle \tableofcontents{} \begin{abstract} %% This isn't a chapter!   My Abstract isn't a chapter.    Abstract is created with begin{abstract} unlike in questions I LINKED to and have been marked as a duplicate. In that example abstract is a chapter. Does this affect the correct use of getting my Abstract into the TOC?       Assuming that the abstract and acknowledgement contents is typeset using a \chapter*{...},    Well it isn't, So what do I do in my case?


grub is always reset at each boot Ubuntu 18.04

Grub directly loads windows 10. So i tried to change it in efibootmgr.  I find that the boot option is reset every time at boot.  Please help  Edit: List of disks and partitions.  Device         Start       End   Sectors   Size Type /dev/sda1       2048    923647    921600   450M Windows recovery environment /dev/sda2     923648   1128447    204800   100M EFI System /dev/sda3    1128448   1161215     32768    16M Microsoft reserved /dev/sda4    1161216 345789868 344628653 164,3G Microsoft basic data /dev/sda5  345790464 347625471   1835008   896M Windows recovery environment /dev/sda6  347627520 557340671 209713152   100G Microsoft basic data /dev/sda7  557342720 767055871 209713152   100G Microsoft basic data /dev/sda8  767055872 783056895  16001024   7,6G Linux swap /dev/sda9  783056896 976771071 193714176  92,4G Linux filesystem


I want to run a command everyday but I am not sure how to do it correctly with the cron task.  I understand this is the code I need to know:  * * * * * command to be executed - - - - - | | | | | | | | | ----- Day of week (0 - 7) (Sunday=0 or 7) | | | ------- Month (1 - 12) | | --------- Day of month (1 - 31) | ----------- Hour (0 - 23) ------------- Minute (0 - 59)   If I do this * * * * * this mean it runs every minute, right?  What about everyday, particularly each day at 1AM?  Is it this 0 0 * * * for running the command everyday?


I have tried to remove all the headers before chapter 1 and it works on all of the pages but 1. I have around 10 pages before chapter 1, and page 7 adds the header.  Here is my code so far:  \makepsmarks{ase_report}{%   \renewcommand\chaptermark[1]{%     \markboth{%       \ifnum \value{secnumdepth} > 1       \if@mainmatter %        \@chapapp\ \thechapter: \ %       \fi       \fi       ##1}{}}%    \renewcommand\tocmark{\markboth{}{}}%   \renewcommand\lofmark{\markboth{}{}}%   \renewcommand\lotmark{\markboth{}{}}%   \renewcommand\bibmark{\markboth{\bibname}{\bibname}}%   \renewcommand\indexmark{\markboth{\indexname}{\indexname}}%   \renewcommand\sectionmark[1]{\markright{##1}}%   \renewcommand\subsectionmark[1]{\markright{##1}}%   \renewcommand\subsubsectionmark[1]{\markright{##1}}% }   I am using frontmatter and mainmatter. Front matter is defined on page 1 and front matter is defined in the beginning of chapter 1. I hope you can help me.  Note: What I see in the header is "0.0" and nothing more.


"AWT-EventQueue-0" java.lang.NullPointerException" Error During ChangeListener Execution

i am getting Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at  this.commaPos = Name.indexOf("   "); line of my project. The concept is that i have 5 JButtons of ships, and when you click, you place the ship on a Board for a battleship game. Lot of time now i am stuck at this. Any ideas ? Thank you. !  EDIT: I changed the name of String name to String nname. Now i get the same error at the next line. this.commaPos = nname.indexOf(",");   public void stateChanged(ChangeEvent event)   {      JButton currentButton = (JButton)event.getSource();       System.out.println("STATE CHANGED");     String nname = currentButton.getName();     this.commaPos = nname.indexOf(",");     int x = Integer.parseInt(nname.substring(0, commaPos));     int y = Integer.parseInt(nname.substring(commaPos + 1));      checkDeletable(x, y);      if (currentButton.getName().equals(""))       return;     if (this.shipSelected == null) {       return;     }     this.shipSelected.setPos(x, y);      clearOldCoords();     boolean valid = getShipCoords();     paintShip(valid);      if ((currentButton.isFocusOwner()) && (valid))       placeShip();   }   Here i use the change listener:  {  for (int y = 0; y < 10; y++) {         for (int x = 0; x < 10; x ++) {             this.myBoard[x][y] = new JButton();             this.myBoard[x][y].setMargin(margins);              this.myBoard[x][y].setToolTipText(x + "," + y);             this.myBoard[x][y].setName(null);             this.myBoard[x][y].setIcon(this.sea);             this.myBoard[x][y].addChangeListener(this);             this.myBoard[x][y].addMouseListener(this);              myBoard.add(this.myBoard[x][y]);          }     } }


Difference between apt-get and apt-cache

Being a new comer in Ubuntu environment, I am bit confused between the apt-get and apt-cache. Can anyone explain what is difference between apt-get and apt-cache. And when to use the apt-get and apt-cache?  Thanks in Advance!


i can't understand this, can someone help me out with the explanation?

The following is a Template classes tutorial from learncpp.com :  main.cpp  #include "Array.h"  int main() {     Array<int> intArray(12);     Array<double> doubleArray(12);      for (int count = 0; count < intArray.getLength(); ++count)     {         intArray[count] = count;         doubleArray[count] = count + 0.5;     }      for (int count = intArray.getLength()-1; count >= 0; --count)         std::cout << intArray[count] << "\t" << doubleArray[count] << '\n';      return 0; }  Array.h  #ifndef ARRAY_H #define ARRAY_H  #include <assert.h> // for assert()  template <class T> class Array { private:     int m_length;     T *m_data;  public:     Array()     {         m_length = 0;         m_data = nullptr;     }      Array(int length)     {         m_data = new T[length];         m_length = length;     }      ~Array()     {         delete[] m_data;     }      void Erase()     {         delete[] m_data;         // We need to make sure we set m_data to 0 here, otherwise it will         // be left pointing at deallocated memory!         m_data = nullptr;         m_length = 0;     }       T& operator[](int index)     {         assert(index >= 0 && index < m_length);         return m_data[index];     }      // The length of the array is always an integer     // It does not depend on the data type of the array     int getLength(); };  #endif   Array.cpp  #include "Array.h"  template <typename T> int Array<T>::getLength() { return m_length; }   Error : unresolved external symbol "public: int __thiscall Array::getLength(void)" (?GetLength@?$Array@H@@QAEHXZ)  Explanation : In order for the compiler to use a template, it must see both the template definition (not just a declaration) and the template type used to instantiate the template. Also remember that C++ compiles files individually. When the Array.h header is #included in main, the template class definition is copied into main.cpp. When the compiler sees that we need two template instances, Array, and Array, it will instantiate these, and compile them as part of main.cpp. However, when it gets around to compiling Array.cpp separately, it will have forgotten that we need an Array and Array, so that template function is never instantiated. Thus, we get a linker error, because the compiler can’t find a definition for Array::getLength() or Array::getLength().  What does the explanation mean? i am having a hard time understanding the explanation provided by Alex(learncpp's creator).


Why won't a Stealth Bomber fire on cities anymore?

My stealth bomber won't fire on an enemy. It fired in the previous turn and now it won't attack my enemy's city. Does anyone have any ideas as to why this is?


What's the term for siblings born 1+ years apart on the same day?

What is the term for two siblings born on the same calendar day, one or more years apart? I know there's a term, and I'd know it if I saw it, but I can't for the life of me remember it.


What is the distinction being made with regards to truth and falsity in these two sources?

I'm currently studying logic and I'm confused about what is meant by the truth or falsity of statements within an argument. From Daniel J. Velleman's, How to Prove It, pg.9:  "Although we have no guarantee the conclusion is true, it can only be false if at least one of the premises is false ... We will say an argument is valid if the premises cannot all be true without the conclusion being true as well."  Having then read a  about the validity of an argument, I am told the following:  "The following argument is of the same logical form but with false premises and a false conclusion, and it is equally valid: All cups are green.  Socrates is a cup. Therefore, Socrates is green."   I feel that there is some distinction being made here between the terms "truth" and "false" in the two instances that I'm not quite grasping. In the wikipedia article I believe "false" refers to the general truth of each individual statement i.e. we know all cups are not green in reality so this is a "false" statement. However in the Velleman book I am not sure what he means by the "truth" or "falsity" of the premise and conclusion. In sentential logic what is meant by the "truth" or "falsity" of a statement – the "empirical truth" of the statement, or does it refer to some other notion of "truth" and "falsity"?


Solve summation $\sum_{i=1}^n \lfloor e\cdot i \rfloor $

How to solve $$\sum_{i=1}^n \lfloor e\cdot i \rfloor $$    For a given $n$.    For example, if $n=3$, then the answer is $15$, and it's doable by hand. But for larger $n$ (Such as $10^{1000}$) it gets complicated . Is there a way to calculate this summation?


If value present, order posts by two consecutive custom fields

Basically on my site I have a bunch of song lyrics and in a static page I want to show them listed by album  and album position of the song and I have two custom fields with that data, sd_album_title and `sd_album_track_n. Plus some of the songs don't have an album yet, so both values are void, and I wish to list those ones at the foot of the others, sorted by alphabetical order.  The latest thing I tried at least to sort everything by the two field is this one:  $key = 'sd_album_title'; $themeta = get_post_meta($post->ID, $key, TRUE);  add_filter( 'pre_get_posts', 'my_get_posts' ); function my_get_posts( $query ) {     if ($themeta != '') {         $query->set( 'post_type', 'lyric' );         $query->set( 'meta_key', 'sd_album_title' );         $query->set( 'orderby', 'meta_value' );         $query->set( 'order', 'ASC' );         $query->set( 'meta_query', array(               array(                     'key' => 'sd_album_title'               ),               array(                     'key' => 'sd_album_track_n',                     'value' => 'target_value',                     'compare' => '>=',                     'type' => 'numeric'               )         ));     }     return $query; }  $getlist= 'my_get_posts'; $posts = get_posts( $getlist );   And my intention was to put an else at the end of it with an array ordered by title for the other songs, but it returns nothing as it is. Could something like this work with some corrections or am I on a totally wrong path?


What is the use of the synchronization preamble in Ethernets?

In the context of Ethernets, what is the purpose of the synchronization preamble field from the beginning of an IEEE 802.3 frame? I'd take a guess that it was meant to distinguish packets from noise in the early days of the Internet. But why was it assigned a length of 7 bytes(more than the source/destination address fields)? Was the aim reliability?


I have one-line that I want to call using alias.  while printf '%s ' "$(df -P / | awk 'NR==2 { print $(NF-1) }')"; do sleep 30; done  I tried to escape ' like \' but it didn't work.  What is the correct syntax to use above one-liner in alias?


Number of solutions for the given equation in finite field of order 32.

Let $F$ be a field of order 32. Find number of solutions $(x,y)\in F\times F$ for $x^2 +y^2 +xy =0$.   I have figured out that non zero elements of this field forms a cyclic multiplicative group of order 31 and charecteristic of $ F $ must be 2. Have no idea how to proceed further.


How many different (circular) garlands can be made using $3$ white flowers and $6m$ red flowers?

This is my first question here.   I'm given $3$ white flowers and $6m$ red flowers, for some $m \in \mathbb{N}$. I want to make a circular garland using all of the flowers. Two garlands are considered the same if they can be rotated to be the same. My question is: how many different garlands can I make?  I tried an approach in which I divided the question into three parts:   No. of ways in which the white flowers are all together No. of ways in which two white flowers are together No. of ways in which no two white flowers are together   Can you please help?  The answer is $3m^2+3m+1$ in the book that I saw  Thanks


Given a Fourier series $f(x)$: What's the difference between the value the expansion takes for given $x$ and the value it converges to for given $x$?

The question given to me was: Find the Fourier series for $f(x) = e^x$ over the range $-1\lt x\lt 1$ and find what value the expansion will have when $x = 2$?  The Fourier series for $f(x)=e^x$ is $$f(x)=e^x=\sinh1\left(1+2\sum_{n=1}^{\infty}\frac{(-1)^n}{(n\pi)^2+1}\left(\cos(n\pi x)-n\pi\sin(n\pi x)\right)\right)$$  My attempt to compute these values: $$f(2)=\sinh1\left(1+2\sum_{n=1}^{\infty}\frac{(-1)^{n}}{(n\pi)^2+1}\right)$$  $$f(0)=e^0=\sinh1\left(1+2\sum_{n=1}^{\infty}\frac{(-1)^{n}}{(n\pi)^2+1}\right)$$  The answer given was: The series will converge to the same value as it does at $x = 0$, i.e. $f(0) = 1$.  Could someone please explain to me the difference between:      What value will the expansion take at a given $x$ and the value the series converges to for a given $x$?    Many Thanks


A way to simulate slower pcs using my application

We are looking for a way to emulate a slow PC, using any virtualization technology. Our goal is to cap the network speed and simulate a CPU with fewer GHz.


My current time in Windows7 is set to UTC +8 (Kuala Lumper). For some reason, the time is always 8 hours ahead. Curiously though, my applications seem to be using the 'right time' that is it is not 8 hours ahead. For example, the local time now is 12pm, windows time is reporting 8pm. If I send an email to myself via outlook, the time shown is 12pm. So only the windows time is off kilter.  I can fix this by syncing the time with the Internet Time Servers but it jumps back to the wrong time every few hours.  I have been having this problem since I dual booted my win7 with linux ubuntu if it helps.


Let $K=\mathbb Q[i]$. Show that $K(\sqrt[4]{1+i})$ does not lie in any cyclotomic extension of $K$.

Note this question was previously discussed , but I think the question is not fully answered. The problem comes from  Remark 2.7 of  by Keith Conrad. Let $\alpha=\sqrt[4]{1+i}$. I think $K(\alpha)$ is actually the splitting field of $x^4-(1+i)=(x-\alpha)(x+\alpha)(x-\alpha i)(x+\alpha i)$ over $K$. Hence $K(\alpha)$ is a Galois extension over $K$ (as it is the splitting field of a separable polynomial) and the Galois group is abelian since it is a group of 4 elements. In fact, $\text{Gal}(K(\alpha)/K)\cong\mathbb Z_4$; try the $K$-automorphism induced by $\theta(\alpha)=\alpha i$, which has order 4. Therefore $K(\alpha)$ is an abelian extension. But how do we show that $K(\alpha)$ does not lie in any cyclotomic extension of $K$?


My question is as simple as the title. Is it true that $\text{Hom}_R(R,M)$ is isomorphic to $M$? In which $R$ is a commutative ring with unit, and $M$ is an $R$-module. I actually made a proof, I just want to confirm it's right and I'm not missing anything, I don't know why but at first I had the intuition it would be false. Since $R$ is always a free module over itself, generated by the unit $1$, all elements of $\text{Hom}_R(R,M)$ are of the form \begin{align} f_m:R &\rightarrow M\\ 1 &\mapsto m \end{align} for each $m\in M$. We clearly have $$(rf_m+f_n)(1) = m+n = f_{rm+n}(1) $$ which implies $rf_m+f_n = f_{rm+n}$ for any $m,n\in M$ and $r\in R$. This implies that the following map is a homomorphism (and since it is also clealy bijective, it is an isomorphism) \begin{align} M &\rightarrow \text{Hom}_R(R,M)\\ m &\mapsto f_m \end{align} showing that $M\cong \text{Hom}_R(R,M)$. Is this correct?


Runs fine but all the time fields for each game in the games list update to the final values such as all 4 "Vic park" games all show 2145 instead of 4 separate times.  class Game:     time = 0     team1 = ""     team2 = ""  class Field:     def __init__(self, numTimes = 0, name = "", daysAvail = 0):     self.numTimes = numTimes     self.games = [Game()] * numTimes     self.name = name     self.daysAvail = daysAvail  fieldList = [] fieldList.append(Field(4,"Vic Park", 5)) # 5 = monday and wednesday 0000101 base 2, lsb is monday, msb sunday fieldList[0].games[0].time = 1800 fieldList[0].games[1].time = 1915 fieldList[0].games[2].time = 2030 fieldList[0].games[3].time = 2145 fieldList.append(Field(2,"Bannerman Park", 5)) fieldList[1].games[0].time = 1800 fieldList[1].games[1].time = 1915


Filling holes in polygons automatically using QGIS

Is there an option in QGIS to fill holes in polygons automatically by setting parameters e.g. maximum area, distance between borderlines? I want to delete/fill holes that a very "thin"/small.


In what sense does a gradient point in the direction of maximum increase?

Maybe an example will help.  $F(x,y)= x^2 + y^2$.  Now the gradient would look like $<2x , 2y > or  2xi + 2yj$ where $i$ and $j$ are unit vectors of the $x$ and $y$ axis.  This vector field spans every quadrant.  The gradient is sort of a place holder to build a vector field.    Certainly it does not point in one direction so in what sense is it pointing in the maximum direction? The maximum direction of what?    If you don't mind a little extra question on the side, but relevant, since it was the source of my original confusion.  Is directional derivative is a dot product with the gradient and a unit vector pointing in any direction you choose but if the angle between the gradient and the unit vector is 0 , the cosine is 1 so that means that unit vector was pointing in the direction of the gradient ?   Since the directional derivative is a number only  of what utility is it other than this observation ? I may be missing the boat on directional derivative.


$x^{q^n}-x$ is a product of all monic irreducible polynomial in $\mathbb{F}_q[x]$ of degree dividing $n$?

I don't know whether the following statement is true or not: $x^{q^n}-x$ is a product of all monic irreducible polynomial in $\mathbb{F}_q[x]$ of degree dividing $n$ Note that we are not assuming $q$ is prime (so it's some power of some prime). I already know that if $q$ is a prime then the statement is true. But I don't know if this general version is also true. Could you explain this to me? Thanks in advance.


Event Not triggered after Ajax Response Jquery

I have a country drop down, and on change of it I return a div containing the same country drop down with additional fields.  I replace this entire div using the below code. But after the replace of div is done, the on change event stops working further. How can I fix this ?      $("#country).on("change", function(){         var str = $("#myform").serialize();         $.ajax({             type: 'POST',             data:str,             url:'../changeme',             success: function(data){                  debugger;                  var html = $.parseHTML(data);                 var arrSelector = $(html).find('div[data-refresh=true]');                 var i;                 for(i=0;i<arrSelector.length;i++)                 {                      $('#' + arrSelector[i].id).replaceWith($($(data)).find('#' + arrSelector[i].id));                 }             },             done:function(data){              },             error:function(data){              },             complete:function(data){              }         });     }); },


I recently watched A Series Of Unfortunate Events, and I was puzzled by the expression "Josephine, Schmosephine". The narrator explains that when you don't care about something or someone, you repeat their name, changing the first syllable by "schm-".  Is this a real thing? I haven't been able to find anything about that on the Internet (and it's not the easiest thing to Google).


I'm a symphony i110 user.unfortunatly I deleted some sms which was important.now how can I get those back?


My Drupal site has been compromised.   Although I applied all modules updates and update my Drupal core to 7.35, it is still compromised.  What would the next logical step to take be?


Are there any biological obstacles prohibiting lighter-than-air organisms?

Why there are no organisms that use cavities filled with lighter-than air substances (e.g. hydrogen) to fly and remain in air?  Given that there are a lot of fish and algae that use similar cavities to float, it is surprising that no organism utilized the same mechanism to fly.


Density of square root of sum of squared independent uniform random variables

Let $X \sim U(-1, 1)$ and $X \sim U(-1,1)$. We want to find density function of $W = \sqrt{X^2 + Y^2}$. I got stuck and I have no idea, where I am making a mistake. This is my approach. Let $F$ be a cumulative distribution function of $W = \sqrt{X^2 + Y^2}$ \begin{align*} F(w) = P(W \le w ) &= P(\sqrt{X^2 + Y^2} \le w) \\ &= P(X^2 + Y^2 \le w^2) \\ &= \iint \limits_{x^2 + y^2 \le w^2} \frac{1}{4} dxdy \\ &= \int \limits_{0}^{w^2} \int \limits_{0}^{2 \pi} \frac{1}{4} d\theta dr \\ &= \pi \frac{w^4}{4} \end{align*} So, the density: $$ f(w) = F'(w) = \pi w^3 $$ But if I run a simulation: X <- runif(100000, -1, 1) Y <- runif(100000, -1, 1) R2 <- X^2 + Y^2 R <- sqrt(R2)  hist(R,  prob=TRUE)   Where am I making a mistake?


Why do I need 50 reputation to comment? What can I do instead?

Users with less than 50 reputation points cannot write comments on questions and answers that they don't own.  Why does this limit exist? But I want to contribute now. What should I do instead? But I can't write a good answer without more information! Shouldn't I be allowed to post comments if I have reputation on a different site? But I saw a new user posting a comment! How did they do it? Why do I need 50 reputation to comment on my own post?   See also:    in the Help Center


Why is the notation $\frac{\partial f}{\partial x}$ used?

I am wondering why the notation $\frac{df}{dx}$ isn't used for partial derivatives, because it seems to me like someone could tell that it was a partial derivative if they knew that $f$ was a function of several variables, so no need to use a different notation.


unable to access the var variable, scopes in js

I tried with 2 scenarios , In one I could access data variable and other couldn't. need clarification for clearing my scopes concept Scenario 1 : data not accessible    function test() {   var data = "from Test";   secondFunction(); }  function secondFunction() {   return function() {     console.log(data);   }(); }  test();     Scenario 2: data is accessible    function test1() {   var data = "from Test1";   var secondFunction1 = function() {     return function() {       console.log(data);     }()   }   secondFunction1(); }  test1();


"Can't locate DateTime.pm" error in perl

while running script i am getting below error:   Can't locate DateTime.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/ve   my code is :  #!/usr/bin/perl  use DBI; use POSIX qw(strftime); use DateTime;  my $dbh = DBI->connect(     "dbi:mysql:dbname=agilefant-test",    "agilefant-test",     "Agilefant-test",     { RaiseError => 1 }, ) or die $DBI::errstr;  my $datestring = strftime "%Y %m %d %X", gmtime; my $fourteen_days_from_now = $datestring->add(days =>14);  my $sth = $dbh->prepare("Insert into backlogs (backlogtype, id, description, name, backlogSize, baselineLoad, endDate, readonlyToken, startDate, rank, status, parent_id) values ('Project' , '200', 'Sanchit Testing', 'Maintenance agilefant', NULL, NULL, ('$fourteen_days_from_now'), NULL, ('$datestring'), NULL, NULL, '34')"); $sth->execute() or die $DBI::errstr; $sth->finish();   As from previous questions it different coz i cant upgrade my system as i dont have rights and also and i want to set End Date as after 14 days from current date. So need help for that also.


Please Forgive me for any mistake in the proposal of the problem in advance. Please feel free to edit it.  Problem       Find the roots of the following cubic equation $x^3-3x^2+3=0$.   My Approach     After removing the second degree of $x$ we get $y^3+1-3y=0$ where $y=x-1$.    Then     Taking $y=u+v$ and then cubing both sides I got $y^3-(u^3+v^3)-3uvy=0$. Now after equating the coefficients I got $u^3+v^3=-1 , u^3v^3=1$.   After This I formed the quadratic equation     The quadratic equation formed is $t^2+t+1=0$. The roots are $\dfrac{-1+i\sqrt3}{2}$ and  $\dfrac{-1-i\sqrt3}{2}$.   After this I take     $r\cos\theta=\dfrac{-1}{2}$ and $r\sin\theta=\dfrac{\sqrt3}{2}$ I got $\theta=60^\circ$.    However I don't know how to approach further.Please tell me if I am on the right track or not.  Note:-I use Cardano's Method.  Any help is welcome.  Note:-This Question is different from the duplicate as this problem states the problem after we form the quadratic equation and try to get the cube roots of a complex number.


How to change color of fonts in this code?

\documentclass[12pt, french]{article} \usepackage{lmodern} \usepackage{amsmath} \usepackage{amssymb} \usepackage{mathrsfs} \usepackage{amsthm} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{babel} \usepackage[utf8]{inputenc} \usepackage[margin=3cm]{geometry} \usepackage[x11names]{xcolor} \usepackage{framed, etoolbox} \colorlet{framecolor}{VioletRed4}    \begin{document}             Soit f une application linéaire alors:     \[\forall x,y\in G,\ f(x)=f(y)\iff x=y\]   \end{document}


biblatex: Cite commands with the same author prints authors name twice

I'm using biblatex 1.4b, and Biber 0.9. However, I think the problem is with my settings, not with the versions of those programs.  I'm trying to cite a single author, and produce their name, followed by the dates of two papers, using the authoryear-ibid style, and natbib compatability. Here's my biblatex preamble:  \usepackage[style=authoryear-ibid,natbib=true,backend=biber]{biblatex}   What I want is for the following command: The works by \citet{Blau81, Blau88} ... to produce: The works by Blau (1981; 1988) ... however, what I'm getting is: The works by Blau (1981); Blau (1988)...  I know that biblatex knows they're the same author, since in the bibliography they fall under the same name (i.e. after the first instance of the name, there's just a dash instead of the name)  What am I doing wrong here? I've also tried it with the commands \cite and \cites, and neither produces what I want.   (crossposted with comp.text.tex)


"I'm a student and I work at Burger King" or "I'm a student and work at Burger King"?

Is is necessary to use the Subject Pronoun in the sentence below?     I'm a student and I work at Burger King.   or     I'm a student and work at Burger King.   Which one is correct according to the English grammar and what does it demand in cases like this?


dual boot ubuntu 14.04 and windows 8 not working

so i installed ubuntu 14.04 on a windows 8 pre-installed hp laptop.  the problem is when i boot the computer it takes me straight to windows and NO grub is shown.  i tried following this:  and used boot-repair which threw this error    i am completely lost with this eufi stuff, can someone help me with an easy solution to have grub working on this laptop where i can choose Ubuntu or windows 8?  PS: i cant seem to get this working on my hp. i disabled fast startup and secure boot and ran bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi and still no Grub :(  the solution that this question was marked as duplicate is not working for me


I am a LaTeX rookie and would like some help!  Have problem with not getting a picture/logo in the document.  I am using TexWorks on Mac OSX with pdfLaTeX as compiler.  Here is my code. The pic is is the same directory as the .tex file.  \documentclass[12pt, a4paper, oneside, draft]{report}  \usepackage[T1]{fontenc} \usepackage[swedish]{babel} \usepackage[utf8]{inputenc} \usepackage[]{graphicx} \begin{document} \begin{figure} \includegraphics{logga.png} \end{figure} \end{document}   I have tried a lot of things but never got it to work..  I am thankful for all the answers!


How to create bounding boxes that are not orientated to the north?

I want to create bounding boxes around polygons, the bounding boxes will then be used in a ST_Hausdorffdistance to determain the squarness of every polygon. My first choice is using the ST_Envelope function but the problem with this is that all the envelopes are orientated to the north. The result is the following image.  The following image is how I would like it to look.  This is created with the Minimum bounding geometry tool in ArcGIS. Is there any possibilty to do this in PostGIS? I tried doing it with the Box2D function in PostGIS, but I can't seem to find the way to save the geometry to the geom column?


I don't understand why escape velocity is necessary

I have read multiple explanations of escape velocity, , and I don't understand it.  If I launch a rocket from the surface of the Earth towards the sun with just enough force to overcome gravity, then the rocket will slowly move away from the Earth and we see this during conventional rocket launches.  Let's imagine I then use slightly excessive force until the rocket reaches 50 miles per hour and then I cut back thrust to just counterbalance the force of gravity. Then my rocket will continue moving at 50 mph toward the sun. I don't see any reason why I can't just continue running the rocket at the same velocity and keep pointing it towards the sun. The rocket will never orbit earth (by "orbit" I mean go around it). It will just go towards the sun at 50 mph until it eventually reaches the sun. There seems to be no need whatsoever to ever go escape velocity (25,000 mph).  Answer: just to clarify the answers from below and the other linked question... Escape velocity is not necessary to leave the earth, unless the object has no thrust or other means of propulsion. In other words, if you throw a baseball, it has to go escape velocity to leave the earth, but if you have a spaceship with engines, then you leave the earth at any speed you want as long as you have the fuel necessary.


How to put a certain string into *if* and check if it is a certain word

I am trying to scan a string and put it in an if like so: (this is just an example part of the whole program)  Scanner scan=new Scanner(); System.out.print("Enter the word..."); String a=scan.nextLine(); if (a=="Hi") System.out.println("Hello!") Else System.exit(0);   So im checking if the user said "Hi" , but it doesnt work like this, I want a way to do it.  I have just started learning java so my questions might seem a little amateur but your answers will help a lot.


Approximation of real number to the power of irrational

Say I have two numbers, $c\in\Bbb R^+\,,q\in\Bbb{R\setminus Q}$.  Is there a way to approximate the value of $c^q$?  This question bugging me because of how simple it sound in compare to how complicated it is. First I want to understand what a power of irrational number is, when talking about $\Bbb R^+$(I use this domain for sake of simplicity) we have very well defined actions for power a rational number, we can even use some theorems to get $c^{a/b}=\sqrt[b]{c^a}$, but when I am dealing with irrational number I can not do this.  I know that we have some definition for this because the solution of the equation $2^x=3$ is irrational.  So what exactly does it mean to take something to a irrational power and is there a way to approximate a numeric value for this?


Automatically generate thumbnails for all subfolders of a directory in Windows 7?

Is there some way to get explorer to generate thumbnails without actually having to navigate and scroll through every folder?  All I could get was a command prompt script that would load an explorer window for all subfolders, however only images that were visible would have thumbnails created.


I have a visitor UK visa valid until October 2017.  I also want to apply for a Tier 4 student visa. My studies in the UK start in September 2017.  If I apply for the student visa in June, will they simply issue an overlapping student visa, or will they cancel my visitor visa and I will not be able to come to the UK until September?  I am worried because in a similar situation with Schengen visas, my existing visa was canceled.


Wrappers Impact on Overall Code Coverage?

If a given wrapper doesn't have any method(even no get;set;) that class won't get listed under 'Overall Code Coverage' section in the developer console. Does this mean such Apex wrappers do not impact on the 75% threshold too? In case if it get considered, just for the sake of code coverage we have to add getter and setters utilizing unnecessary additional characters. That doesn't make any sense.


Does “gay” still include the meaning “merry”?

Dictionary.com lists , with “merry, lively” as the first entry.  Microsoft  for listing  (a real place) as his hometown:   Xbox Live considered the term gay absolutely inappropriate in any context.     As a non-native English speaker, my question is whether in contemporary English, does gay always mean homosexual? Are British and American English the same in this respect?


Deriving the sin and cos addition formulas using Euler's formula

I am trying to figure out the quick way to remember the addition formulas for $\sin$ and $\cos$ using Euler's formula:  $$\begin{align} \sin(\alpha + \beta) &= \sin \alpha\;\cos\beta + \cos\alpha\;\sin\beta \\ \cos(\alpha + \beta) &= \cos \alpha\;\cos\beta - \sin\alpha\;\sin\beta \\ \sin(\alpha-\beta) &= \sin\alpha\;\cos\beta - \cos\alpha\;\sin\beta \\ \cos(\alpha-\beta) &= \cos\alpha\;\cos\beta + \sin\alpha\;\sin\beta \end{align}$$  I'm now convinced of why it is true that $e^{ix} = \cos(x) + i\sin(x)$ but I don't know how to use this to derive these four rules.


I have a data set on which I want to run a machine learning algorithm. Some of the columns are skewed.   If I apply a transformation (let's say log) to those columns and I want to display the matrix of correlations, should I do it before or after transforming the skewed columns, or should I not do it all?  Does it become meaningless after this transformation?  (original:)       J'ai un jeu de données avec des colonnes "skewed" sur lequel j'applique de l'apprentissage automatique , après une transformation log sur ces colonnes , si je veux la matrice de corrélation dois-je la faire avant ou après la transformation ou ne pas le faire du tout ? perd-elle tout sens après cette transformation?


I set up up a new laptop with Ubuntu 18.04.1 and try to customize it so that it "feels like mine". In addition to the normal system settings, gnome-tweaks already provided some more configuration options, but I miss the option to specify the layout of workspaces. Some versions of Ubuntu by default had the workspaces distributed in a row, others in a grid and in Ubuntu 18.04 they are all in one column. I really prefer the grid, but found no way to configure that. Even the keyboard shortcuts to move windows one workspace to the left/right are gone, but instead there is the option to move them one monitor to the left/right.  Any ideas about how to restore this behaviour?  Thanks, Philipp


"Is it proved that ...?" vs. "Has it been proven that ...?"

Searching The New York Times, I found 22,100 results for "is it proved" and, therefore, I argue that that phrase is likely correct English.  But on History Stack Exchange a user edited the following sentence, written by me, "Is it proved that the United States didn't have a third atomic bomb to drop over Japan?" transforming it into this other sentence, "Has it been proven that the United States didn't have a third atomic bomb to drop over Japan?"  The user has left this comment "... corrected minor errors with spelling and grammar."  In reference to the context where those sentences had been written, can anybody explain why the sentence I wrote is wrong and, particularly, why the proofread version is correct or more appropriate in comparison with mine?


What are a few examples of noncyclic finite groups?

I just want to make sure that every group $\mathbb{Z}_n$ for any $n$ is cyclic. Further, every group of prime order is cyclic because it is isomorphic to $\mathbb{Z}_p$. I think I have a handle on that, but what other finite groups are there that aren't cyclic? In particular, I'm looking for examples that aren't direct products of groups, just simply groups like $\mathbb{Z}_n$, not $\mathbb{Z}_a \times \mathbb{Z}_b$, etc.


argmin doesn't work in algorithmic table

I'm using \DeclareMathOperator*{\argmin}{argmin} for getting the argmin parameter. Every thing is Ok expect if I type it inside algorithmic table, it fails to show the correct output. In the below picture, the scenario is shown    The code for this picture is   \documentclass{article} \usepackage{algorithm,algpseudocode,float} \usepackage{amsmath}  \DeclareMathOperator*{\argmin}{argmin}   %----------- \makeatletter \newenvironment{breakablealgorithm}   {% \begin{breakablealgorithm}    \begin{center}      \refstepcounter{algorithm}% New algorithm      \hrule height.8pt depth0pt \kern2pt% \@fs@pre for \@fs@ruled      \renewcommand{\caption}[2][\relax]{% Make a new \caption        {\raggedright\textbf{\ALG@name~\thealgorithm} ##2\par}%        \ifx\relax##1\relax % #1 is \relax          \addcontentsline{loa}{algorithm}{\protect\numberline{\thealgorithm}##2}%        \else % #1 is not \relax          \addcontentsline{loa}{algorithm}{\protect\numberline{\thealgorithm}##1}%        \fi        \kern2pt\hrule\kern2pt      }   }{% \end{breakablealgorithm}      \kern2pt\hrule\relax% \@fs@post for \@fs@ruled    \end{center}   } \makeatother  \begin{document}   $$ a = \argmin_s $$  \begin{breakablealgorithm}   \caption{XXXXXXXXX}   \begin{algorithmic}[1]     \State{$\text{A} = \argmin_s B$} \end{algorithmic} \end{breakablealgorithm}    \end{document}   My question is now why it doesn't work properly inside the algorithm.


Old giant robot movie where an (ejected) pilot fires a discarded robot fist by connecting wires

I saw it very early in my childhood, between about 20-25 years ago.   Live action    People were piloting giant robots (can't remember just how big)   I believe they were moving their feet and hands while being in upright position to control the robot (similar to Pacific Rim)    People on the streets had the surgical white masks (China or Japan probably) I think the robots were fighting it out in arenas, but not sure about this part     There was a robot that would fire its own fists as a projectile. The protagonist pilot ended up on the ground outside his robot (I believe it was destroyed/damaged). He hid behind one of these discarded previously fired fists. He then tinkered with the exposed wires from the robot fist and finally managed to active it. The fist either flew at the (bad) robot, or it fired some missiles at it.  I don't even know in what language the movie was...  Thank you


Find out whether $\sum_{k=1}^{\infty}\left(\frac{1+\cos k}{2+\cos k}\right)^{2k}$ converges absolutely, conditionally or diverges.

I need to find out whether the following series converges or diverges. If it converges I also have to discover whether it is an absolute convergence or a conditional one. $$\sum_{k=1}^{\infty}\left(\frac{1+\cos k}{2+\cos k}\right)^{2k}$$ Root test did not help me much since $\lim_{k\rightarrow\infty}\left(\frac{1+\cos k}{2+\cos k}\right)^2$ may equal anything from $0$ to $4$. Comparison tests also did not work well. I guess this series is convergent, though. But I still have no idea how to prove it.


I have recently installed UBUNTU 12.04 but can not connect to the net as my wireless adapter has no drivers yet. I found some documentation on it, but I am such a noob I don’t know what to do with all this. The adapter is the Linux driver for tplink-wn725n nano wireless adapter  Is there anyone who could explain to me what I have to do with this information? ----.  someone else in another thread mentioned to try:sudo apt-get install linux-backports-modules-cw-3.6-precise-generic but I dont know how I can do that if my machine is offline. Can any of this stuff be downloaded on one machine and transfered with a USB disk?


How can I check the health of my hard drive?

I had a bad experience on an old Dell computer where shortly after installing Ubuntu on it, the hard drive failed due to excessive loading/unloading cycles. What is the best way to check the health of my hard drive in Ubuntu? Can it be done from the command line?


Is there any way to get access to an attachment Gmail regards as a virus?

Gmail seems to have deleted the attachment of an email I had sent to myself a while after I sent it. The reason Gmail hints at is that the file is detected as a virus (it's not): is there any way to get access to that file?    The "Learn more" link redirects me to , which says:     What happens if a virus is found?      If Gmail detects a virus on an attachment, we reject the message and   notify the sender. If a message that’s already in your account has an   infected attachment, you won’t be able to download it.      If an attachment you're trying to send is infected with a virus, Gmail   will display an error message to tell you, but it won't clean the   file. To send the message without that attachment, click the link in   the error message that says Remove attachment and send.      If Gmail detects that you're trying to send an infected attachment,   try running your anti-virus software in case your hard drive is   infected. If you don't have anti-virus software, you might consider   purchasing or installing one of the popular applications so you can   protect your computer and information from viruses.   If I try to forward the email, I cannot forward the attachment:    Is there anyway I can retrieve access to my file?


Access to earlier data dumps (Looking for May 2014 data dump)

The latest September 2014 Stack Exchange data dump is available at .  I am interested in previous data dumps, and in May 2014 data dump (the one that was published before the September one) in particular.  Is it possible to get the torrent file for that dump? Is it still available?  UPDATE: Is there anyone who has a torrent for the May 2014 dump?


Algebraic inequalities with equality condition

Let $a,b,c$ be positive real numbers such that $abc(a+b+c) =3$. Prove that $$(a+b)(b+c)(c+a)\ge 8$$ and determine when equality holds.


Cannot Delete FileStream Group from Sql Server 2008

We have migrated all our varbinary(max) column data to Azure Blob Storage and so we want to remove the old filestream columns that remain in our Sql 2008 database and the filestream filegroup but when we try to we are getting the error:   Msg 5042, Level 16, State 11, Line 2 The filegroup 'FileStreamGroup' cannot be removed because it is not empty.   However when we run this:  exec sp_helpfilegroup 'FileStreamGroup'   It is returning this:   groupname           groupid    filecount FileStreamGroup     2          0   So the file count is 0 but it won't let us remove it, has anybody else had this problem and how on earth do you completely remove the filestream from the database.  In addition this query:  select * from sys.tables t  join sys.data_spaces ds on t.filestream_data_space_id = ds.data_space_id    Returns 0 rows so no tables are using any filestream data if I understand this correctly.


How can I combine two or more querysets in a Django view?

I am trying to build the search for a Django site I am building, and in that search, I am searching in three different models. And to get pagination on the search result list, I would like to use a generic object_list view to display the results. But to do that, I have to merge three querysets into one. How can I do that? I've tried this: result_list = [] page_list = Page.objects.filter(     Q(title__icontains=cleaned_search_term) |     Q(body__icontains=cleaned_search_term)) article_list = Article.objects.filter(     Q(title__icontains=cleaned_search_term) |     Q(body__icontains=cleaned_search_term) |     Q(tags__icontains=cleaned_search_term)) post_list = Post.objects.filter(     Q(title__icontains=cleaned_search_term) |     Q(body__icontains=cleaned_search_term) |     Q(tags__icontains=cleaned_search_term))  for x in page_list:     result_list.append(x) for x in article_list:     result_list.append(x) for x in post_list:     result_list.append(x)  return object_list(     request,     queryset=result_list,     template_object_name='result',     paginate_by=10,     extra_context={         'search_term': search_term},     template_name="search/result_list.html")  But this doesn't work. I get an error when I try to use that list in the generic view. The list is missing the clone attribute. How can I merge the three lists, page_list, article_list and post_list?


Ratio of two independent normal : cumulative sum

Given two independent normal variables, $X\sim N(0, \sigma^2_X)$ and $Y\sim N (0, \sigma_Y^2)$, find the probability that $\frac{X}{Y} < 1$.   I seem to prove: $Z = \frac X Y \sim $ Cauchy distribution with pdf $f_Z(z) = \frac{1}{\pi} \frac{\frac{\sigma_X}{\sigma_Y}}{z^2 + \frac{\sigma^2_X}{\sigma^2_Y}}$ (I'm not sure though).   Anyway, help would be appreciated.  EDIT Note that the ratio follows Cauchy distribution is something I stumbled on while trying find the probability. As aleady noted on comments, this is not mandatory, and can be done by other technique. The linked question only wants to prove the distribution is Cauchy necessarily.


In quantum mechanical tunneling particle doesn't scale the potential but instead find a short route to cross barrier. Then why is tunneling only possible in case of finite square well potential and not in infinite well.


I do this in my code:  Directory.Delete(MapPath("..\\Directory1"),true);   Now I got this error: System.IO.IOException: The directory is not empty.    What do I wrong anyone a idea?


Trying to remember a story about a guy that goes back in time and brings mythical creatures to the future

I am trying to remember the title of a story where a man is sent back in time to collect extinct animals for his era's zoo. For some reason, he only locates and brings back mythical creatures. I read it in the 1980's.


Regex find string after key inside qoutes

Input:     blalasdl8ujd "key":"value", blblabla asdw   "alo":"ebobo",blabla"www":"zzzz"   or     blalasdl8ujd key [any_chars_here] "value", blabla asdw   "alo":"ebobo", bla"www":"zzzz"   I'm tring to extract value having only key and knowing that value is covered with "  Following regex key.*"(.*?)" returns the last match covered with " ("zzzz"). I need to fix it to return first.


How does a Beastmaster Ranger acquire his Animal Companion?

There seems to be very little in the PHB about how a Beastmaster Ranger is supposed to acquire his animal companion.    Initially we have:     Choose a beast that is no larger than Medium and that has challenge rating of 1/4 or lower....   If the initial companion dies:     If the beast dies, you can obtain another one by spending 8 hours magically bonding with another beast that isn't hostile to you, either the same type of beast as before or a different one.   In either case, where does the animal come from?  Does the Ranger have to either purchase or find a wild beast wherever he happens to be adventuring, or can he somehow call a creature of the desired type to him?  Does he automatically make the creature non-hostile and bond to it immediately the first time (since there is no mention of needing to do that explicitly in the initial description of obtaining an animal companion)?  Is the Handle Animal skill sufficient to make a wild beast non-hostile for long enough to bond to it?


How do you pass a boolean value to wp_localize_script

What is the best way to pass a boolean  into wp_localize_script as from what I can see everything is interpretted as strings.  I have a backend user options form for a plugin, when the values are returned I am using them for a jQuery script, one of them is a boolean, the user selects true or false from a dropdown, using wp_localize_script outputs these as strings (not booleans) "true" or "false" which will fail that parameter in the script.   <?php    $options = get_option('ng_slicknavmenu');   // Add PHP plugin variables to the $params[] array to pass to jQuery   $data = array (     'ng_slicknav_menu'         => $options['ng_slicknav_menu'],     'ng_slicknav_parent_links' => $options['ng_slicknav_parent_links'], // this is a boolean true/false     'ng_slicknav_speed'        => $options['ng_slicknav_speed'] ,   );    // Pass PHP variables to jQuery script   wp_localize_script( 'slickinit', 'phpVars', $data );   This is how I am doing it at the moment in my js init file     if( phpVars.ng_slicknav_parent_links === "true" )         $links = true;     else         $links = false;   jQuery(document).ready(function($){  ng_slicknav_speedInt = parseInt(phpVars.ng_slicknav_speed, 10);  jQuery(document).ready(function($) {             $(phpVars.ng_slicknav_menu).slicknav({                 allowParentLinks: $links,                 duration:ng_slicknav_speedInt,             });             });  });   But is there a better way?  I have tried some solutions from  ...  'ng_slicknav_parent_links' => ($options['ng_slicknav_parent_links']) ? true : false,   and  'ng_slicknav_parent_links' => (bool)$options['ng_slicknav_parent_links'],   But the answer does not work. The answers there for both result in a string of "1" for both values which is incorrect.


How to work out days, months and years difference with two dates in JavaScript?

Can someone explain how the milliseconds works and some documentation. I am trying to work out, given two dates, what is the years, days and months difference between the two dates. Ideally I would want to round off the number so no decimals. Is this possible in JavaScript without any libraries?  This is my code so far. I have tried doing 1000 * 60 / 365 and a few combinations but I do not know what those represent - I may try hours too.          var date1 = new Date(a); // 01/03/2008         var date2 = new Date(b); // 22/03/2016         var timeDiff = Math.abs(date2.getTime() - date1.getTime());         var diffDays = Math.ceil(timeDiff / (1000 * 3600 * 24));          var diffMonths = Math.ceil(timeDiff / (12));          var diffYears = Math.ceil(timeDiff / (365));          console.log(diffDays);         console.log(diffMonths);         console.log(diffYears);   I managed to work out days difference but I still do not understand it fully.


Two nonabelian two dimensional Lie algebras are isomorphic

Let $\mathfrak{g}$ and $\mathfrak{h}$ be two-dimensional non abelian Lie-algebras. Show that they are isomorphic.   Suppose that $\{E_1,E_2\}$ and $\{F_1,F_2\}$ be basis for $\mathfrak{g}$ and $\mathfrak{h}$ respectively. Since both $\mathfrak{g}$ and $\mathfrak{h}$ are nonabelian, $[E_1,E_2] \ne 0$ and $[F_1,F_2] \ne 0$. Suppose that $[E_1,E_2]=aE_1+bE_2$. If $a=0$, then dividing by nonzero $b$ we have $[E_1,\frac{1}{b}E_2]=E_2$. If $a \ne 0$, then dividing by $a$ throughout we have $[E_1,\frac{1}{a}E_2]=E_1+\frac{b}{a}E_2$. Then $[E_1+\frac{b}{a}E_2-\frac{b}{a}E_2,\frac{1}{a}E_2]=[E_1+\frac{b}{a}E_2,\frac{1}{a}E_2]=E_1+\frac{b}{a}E_2$. So to start with, we can choose $\{E_1,E_2\}$ and $\{F_1,F_2\}$ such that $[E_1,E_2]=E_1$ and $[F_1,F_2]=F_1$.   Now define $\phi: \mathfrak{g} \to \mathfrak{h}$ by $\phi(aE_1+bE_2)=aF_1+bF_2$. Then $\phi$ is linear, one-to-one and onto. Moreover, we have $\phi([E_1,E_2])=\phi(E_1)=F_1=[\phi(E_1),\phi(E_2)]$. Thus, $\phi$ is an isomorphism.   I was wondering if I could do this more directy, without any assumption on the Lie brackets of both sides. If I do that and define $\phi$ as above, then I just have to show the nice behavior of $\phi$ with the Lie brackets. Now $\phi([E_1,E_2])=aF_1+bF_2$ but I don't know how to show that $[F_1,F_2]=aF_1+bF_2$.  Thanks for the help!!


Im trying to make eyes for a stick figure model in Blender, so I need to convert some faces from square to round. How do I do that?


Is operation $x*y = \frac{xy}{x+y+1}$ associative?

In Charles Pinter's A Book of Abstract Algebra, Chapter 2: Operations, Section B. Properties of Operations, Question 7 part ii, an operation * is defined on the set of real numbers: $x * y = \frac{xy}{x+y+1} $ I need to find if it is associative, so: $$ \begin{align*} x*(y*z) &= x* \frac{yz}{y+z+1} \\\\ &= \frac{\frac{xyz}{y+z+1}}{x+\frac{yz}{y+z+1}+1} \\\\ &= \frac{\frac{xyz}{y+z+1}}{\frac{xy+xz+x+yz+y+z+1}{y+z+1}} \\\\ &= \frac{xyz}{xy+xz+yz+x+y+z+1} \\\\ \end{align*} $$  Then the same answer for $(x*y)*z$. This is not the same as the answer given at the end:   What have I overlooked?


Is it still bad to use swap on a modern SSD?

I have a Samsung 960 Pro SSD with Ubuntu 18.04  is it safe to put the swap file on there or would it hurt it in the long run,  I heard some people saying that new SSDs don't suffer from that issue anymore, is this true?


Stretch an Excel table in PowerPoint over multiple slides?

I work in a business where most people run on PowerPoint and wouldn't know what to do with an Excel sheet if it bit them. I need to regularly update a spreadsheet and put it into PowerPoint, but it takes up about 7 slides, requiring me to manually choose the slide breaks and moving things onto the following slide.  I feel that there must be a way to put a single table in PowerPoint (2007) and have it stretch over several slides automatically, but I can't figure out how. This question was previously asked but the answer does not cover the actual question:        Does anyone know how to do this?


I have a text field that has nothing in it. I created a formula to check if it is null, but it keeps coming up that it exists.  IF(ISNULL({!textfield}),"Null","Exists")   There isn't a hidden space or anything like that in the field. It doesn't matter what field type I am referencing, everything comes back as "exists".


Can I know who have done serial voting to me?

Yesterday,  I don't know how but i got up vote in all  my questions and answer in Mathematics, Physics, Chemistry and Ask Ubuntu Stack Exchange. Due to i got total around +310 reputation.   Today that serial voting was revised in Mathematics and Physics S.E. So I want to know which user has done this serial voting, Is it possible?


How to get bash to stop escaping $ during tab completion?

I have this on the command line:    ln -sf $PWD/wine-   and then I hit Tab to complete the filename.  In earlier versions of Ubuntu, this worked just fine to complete the wine- filename (and as a side-effect $PWD would be expanded at that time).  But now it turns it in to  ln -sf \$PWD/wine-   which isn't what I meant at all and doesn't complete anything as the file does not literally start with $.  How do I get completion back to the less broken behaviour?  set tells me these are my current settings:  BASHOPTS=checkwinsize:cmdhist:expand_aliases:extquote:force_fignore:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor


filepath comparsion through if condition

I am getting the two different path that are basically file path , injected through xml by spring ioc..  private String FilePath1; //it consists path c:\abc folder private String FilePath2; //it consists of c:\abc\def   now I need to check that if they two are equal then they should go inside the condition otherwise not  please advise how to achieve this..  what I have tried is ..  if (FilePath1 =! FilePath2) {  filemove(mcrpFilePath, zipfileName); //i want if two file paths are not wqula then it                                     // should go inside filemove }


Find the sum of the series $\frac{1}{2}-\frac{1}{3}+\frac{1}{4}-\frac{1}{5}+\frac{1}{6}-\cdots$

My book directly writes-  $$\frac{1}{2}-\frac{1}{3}+\frac{1}{4}-\frac{1}{5}+\frac{1}{6}-\cdots=-\ln 2+1.$$  How do we prove this simply.. I am a high school student.


Suppose $\mu(X)<\infty$. Show that if $\ f\in\ L^q(X,\mu)$ for some $1\le q<\infty$ then $\ f\in\ L^r(X,\mu)$ for $1\le r<q$   In the solution the assistant wrote this:  If $1\le r<q$ then $q/r\ge 1$. Let p be the dual exponent to $q/r$ (i.e. $\frac{1}{q/r}+\frac{1}{p}=1)$  then by Hölder Inequality  $\int_{X}|f|^rd\mu\le\underbrace{(\int_{X}|f|^qd\mu)^{r/q}}_{??????}(\int_X1^pd\mu)^{1/p}<\infty$  for me the middle part doesn't make sense (it is not the hölder inequality) can somebody show it ?  instead of this can't we say (only in this case) that   $\int_{X}|f|^rd\mu\le (\int_{X}|f|d\mu)^r$ then  $(\int_{X}|f|d\mu)^r\le ((\int_{X}|f|^qd\mu)^{1/q}(\int_X1^pd\mu)^{1/p})^r<\infty$  ?


Does bounty reward offered to the first answer or first edited answer

In a question, if Answer A is the first answer but has been edited after Answer B has been posted. To which answer the bounty reward goes after the Grace period?


Visiting the USA from the UK on a passport with 3-months expiration

I last visited the US in August 2017 and flew into Fort Lauderdale from the UK. I applied for my ESTA in June which was granted, and travelled to the US on my passport (an e-passport) which expired in October 2017 (roughly, 3 months left on said passport at the time of travel). I was aware there was a requirement for passengers to be in possession of a passport with a minimum of 6-month expiry from certain countries for entry into the US, but when I looked online, the UK was exempt from this:     Are one-year passports issued by the U.K. government valid for travel?      Yes, the passport is valid for travel to the United States.      The fact that it may not be valid for at least six months beyond your date of departure from the United States will not affect your eligibility to travel.      The United States has an agreement with the United Kingdom automatically extending the validity of a passport for six months past the passport’s expiration date. Therefore, your passport need remain valid only for the duration of your stay in the United States.      If you are traveling visa free, and your passport is valid for less than 90 days, you will be admitted only until the date the passport expires.   (Source: )  When I reached the automated security station where I was required to scan my passport, I received a message on the screen stating my passport did not have long enough left on it for the machine to process it. So I was ushered past the machine and into the immigration queue (the same queue which I would have joined if the machine had validated my passport).  I explained my situation to the immigration officer, and he said "We may have a problem here." I was tired and jet-lagged, and didn't fully grasp the situation, nor did I really question it. He went to speak to somebody in the back-room, came back, and permitted me entry into the US, but stated my ESTA is only valid until my passport expiration.  I don't understand what the problem could have been? And how having at least 6-months expiration on my passport would have cleared the problem. The ESTA lasts for two years, so surely the same situation could apply to somebody with 6-months expiration on their passport.


Enable the VLQ flag option on upvoted posts for users with good flagging history

On posts with a positive score, the very low quality flag option isn't enabled. This is great for many instances - if a post is +7, it's most likely high quality. We don't want unexperienced users flagging those.  However, this brings with it a problem when flagging link-only answers. Relatively often, a link-only answer will have a positive score - the link is useful. If the score is just +1, I downvote it, flag, and move on. If it's +2 or above, though, I'm kinda stuck.   I could use a custom flag, but 10kers don't get to see those - meaning the mod workload just got that much heavier. I could flag it as NAA, but it is an answer. It's just very low quality.  So, I propose that the VLQ flag option be reneenabled on positively-voted posts for users with x helpful flags - maybe 500? 1000? 50? The details can be worked out.  Opinions? Huge, gaping holes in my reasoning?


Force cellular modem to transmit at maximum power

I want to force my cellular modem to transmit at maximum power so that I can see if that is the cause of microSD card crashes that I have been experiencing in an embedded application.  My modem is a ublox U-260, and the AT command manual for it is .  I know that the modem "throttles" its transmission power based on the intensity of the received signal (from the cell tower) so you can force the modem to transmit at maximum intensity by putting it somewhere with poor cell reception.  I have been unable to get my cell reception to be bad, however, as there are a number of cell phone towers nearby.  So, seems to me there are two options:   Physical solution: Attenuate cellular signals arriving from cell tower to modem via some type of physical solution Software solution: Force the modem to transmit at maximum power levels regardless of strength of received signal by configuring it to do so via AT command (software solution)   So, anyone out there know how to implement one of these solutions?  I have tried building a faraday cage around the modem by lining the enclosure that it's in with aluminum foil and attaching an alligator clip to mains ground.


Can I copy Steam game files from a Mac onto a PC?

I have a very slow Internet connection at home and cannot download large files there. However, I have a Macbook and fast Internet at school. Is it possible to download a game to my Macbook, then transfer the files to my home PC? Are the files different for Macs and PCs?  I did see  about general Steam file transfer from PC to PC, but it says nothing about Macs. I wasn't sure if the files are the same or not.  Edit: I just found  and it sounds like a direct download isn't possible, but maybe saving a few gigs of data by copying asset files would work.


I need a function to remove ) character from end of a string. for example, hello,world) should be converted to hello,world.  I have written this :  char *a="hello,world)"; int a_len=strlen(a); *(a+a_len-1)='\0'; printf("%s", a);   but nothing is shown in the output.


How to ignore first line of content in curl standard output?

When I use curl -s to access a text file, it will display the entire content. Is there any way to ignore the first line of content?  Test text file link:  curl -s https://raw.githubusercontent.com/Automattic/_s/master/languages/readme.txt


Is it possible to run Windows 10 installed on a external HDD in different computers?

Super User community.  TL;DR: I have MacBook Pro Retina 13" as my laptop computer, and also a desktop computer in my home. Desktop has AMD HD 6950 GPU, will I suffer performance?  As I'm a developer, now I need to have Windows 10 in both of my computers. I already have it on my desktop, there is no problem with that (although it is Windows 7), however I never altered booting options in a Mac until now (I had used virtual machine software in OS X).  The thing is, I want to use same HDD in both computers. I've bought an SATA SSD and an external hard drive connection box -did I made something intelligent or dummy here?-, as Mac's 128 GB Flash Drive does not fulfill my needs. The desktop also has its own HDD (not an SSD).  I know it is possible to install Windows 10 to this SSD and run on both devices, but the problem is, does driver difference make any kind of problem? I have an AMD HD 6950 graphics card in my desktop, will my kids be able to play games without any hassle?  Performance is no object in Mac, SSD will be connected via SATA3 to desktop and USB to Mac.  Thank you.  EDIT: Oh, I forgot the Windows version (probably it doesn't matter), it's Windows 10 Enterprise.


What is the name of this springy type oscilloscope probe accessory?

Exactly what it says on the tin.    How is this pictured accessory called? The obvious place to look for a name would be the probe manual, but it looks like they decided to add the accessory to the package after making the manual, since it's not on the component list.


Addressing a former office-holder by that office's title

When is it appropriate to use an "expired" honorific to address or refer to a person?   In the U.S., former state governors are occasionally referred to as "Governor So-and-so", although they have not held that office for several years. I see this happening most often when the former governor is actively campaigning for a new office (usually U.S. President), and my impression is that it's done only by someone with an interest in the campaign (for or against) rather than a (relatively) neutral party like a newspaper.  Certainly this could be used as a jab: in a political campaign for high office, addressing one's opponent by a former title — lower than one's own — could imply that the opponent is not qualified for the new job. It could also be used the other way around, to remind listeners that a candidate one supports used to hold an important title.  I'm curious whether there are formal rules for this in the U.S., or at least style or journalist guidelines, for various offices. Are ambassadors, for example, entitled to some sort of emeritus honorific?


Consider a financial system, where the customer demands a financial statement consisting of | opening_balance | amount_credited | amount_debited | closing_balance | remarks. Two approaches to doing this are:  Store the above details (opening_balance, amount (+/-), closing_balance) during transaction entry  Just record the amount(+/-) & remarks and get my final statement from performing window queries in SQL (specifically LEAD() and LAG() functions)   Challenge: Consider 5 entries 1, 2, 3, 4, 5. There are high chances that middle entries will change at any time. For example, if the transaction_amount of 2nd entry changes, then it will affect the closing_balance, in return it will affect the opening balance & closing_balance of 3rd entry, and so on, sort of a chain. Which approach better suits the current scenario? PS. I'm using Django, but I don't really care about this, because my concern is the concept of implementation


How can I reset a Mac's password from Single User Mode?

My sister bought a used MacBook about 6 months ago and she has lost her password.  Here is the procedure I tried to use to reset the password:   Boot into single user mode (press Command-S at power on) Type fsck -fy Type mount -uw / Type launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist Type dscl . -passwd /Users/username password, replacing username with the targeted user and password with the desired password. Reboot   But when I try the step 4, it says launch_msg(): Socket is not connected.  I would like to know what command to enter in the single user mode to know what version the Macbook is running and the right command to reset the password. Thank you.


How to see Newest Questions in (alpha 0.1.50) iOS app?

When I start the (alpha 0.1.50) iOS app on iOS 7, the Questions tab shows Active Questions (see below).  I would far prefer to see the Newest Questions but have not been able to find a way to configure this.  Is it possible, in the current alpha of the iOS app, to switch the Questions viewed to be sorted by Newest?


Why is it "to start laughing" and not "to start to laugh"?

Why do we use:        to start laughing      instead of,        to start to laugh      And what is the construction verb + (verb + ing) called?


MVC how to add pagination for large result sets

right now I am returning a list in my model to the view. The list contains 300k items.  I am doing something like this

                 First Name	                 Last Name	                 E-mail	                 Role

             @foreach (var user in Model) {
                     @user.FirstName	                     @user.LastName	                     @user.Email	                     @user.UserRole.UserRoleName
             }

   So ye problem is that it takes forever to load the page to display the 300k items, plus all the scrolling is a problem. Is there a nicer solution in MVC to handle this and add automatic pagination etc ?


Shortcut in mv command to rename file without changing its directory

I would like to be able to do this  mv /long/path/to/file/old.txt /long/path/to/file/new.txt  without typing the directory twice. I imagine something like  rename /long/path/to/file/old.txt new.txt  Is this possible?


Let a statement P is "X is true if and only if Y is true". What is the negation of P? I am little confused. It seems that digital equivalent of this statement is P = X and Y. Hence negation of P is (not X) or (not Y) i.e. Either X or Y is false. Am I right guys?


Why are people asking Stack Overflow questions on Meta Stack Overflow?

It's happened quite a few times.  a recent one. So I'm wondering, what is the scenario? Are they scrolling down to the link of sites, clicking meta and posting? Are they googling for some result, that gives them a post on meta and then they ask?


I've seen a mathematical example where a wave was made from same source in water and air. but in both medium frequency was same but wavelengths were different in each medium. we know that velocity of a wave = frequency * wavelength. if the velocity of a wave changes from medium to medium(wave;in two different medium but made from same source) why doesn't the frequency change (in case of a wave which is made from same source)?


In the Annie Award-winning Family Guy episode "Barely Legal", at one point Meg sits in the dark obsessing about Brian turning the light on and off. Is this a reference to something?


Can Nikon SLR lenses be used on Fujifilm X series cameras?

I want to buy a FujiFilm X-series camera, and wonder if I will be able to use my Nikon (Nikkor) lens with it.


Can't find the release for this wiring harness connector

I am unable to unlock any "tabs". The video text just says use a slot screwdriver to release the locking tabs. Any help is appreciated.