I know that I should implement hashCode() and equals(), however in reality I have no idea how to do it. I have a following class:    public class Dog {     private Integer id;    private Integer age;    private Instant dateOfBirth; }   And now, I would like to be able to check if some list of dogs is subset of another list of dogs.  ArrayList<Dog>   Two dogs I consider as equals when they have the same age, id, dateOfBirth   Ofcourse, it seems to be easy to implement equals:    public boolean equals(Dog dog) {   return (dog.id == this.id && dog.age == dog.age && &this.dateOfBirth.equals(dog.dateOfBirth)); }   However, I have no idea how to implement hashCode to maintain equals-hashcode contract ?

What issues / pitfalls must be considered when overriding equals and hashCode?


I used this   to produce printing service. As the result I get map with too many elements in the legend. Is it possible ti show classes that are visible in the current map extent using python script?

Using ArcGIS Desktop, is there a way for the legend, to only show the subitems that are displayed on the map?


In vakil's notes, exercise 6.3.L state that morphism of schemes $X\rightarrow Y$ are determined by their induced maps.And not determined by their underlying map of points. By Yoneda's lemma, $X\rightarrow Y$ determined by $h_X\rightarrow h_Y.$ What's the example that they are not determined by their underlying map of points.

I am just beginning to learn scheme theory. This question is aimed at getting a feel for something so apologies in advance for the lack of precision.  I am struck by the following difference from the theory both of varieties and smooth manifolds:  In the categories both of varieties and of smooth manifolds, a morphism is completely specified by what it is doing on the topological spaces, since the elements of the structure sheaf (regular functions for varieties, smooth functions for manifolds) are determined by their pointwise values.  But in the category of schemes, to specify a morphism $f:X\rightarrow Y$ we need to separately specify the underlying topological map $f:X\rightarrow Y$ and the sheaf map $f^\#: \mathcal{O}_Y\rightarrow f_*\mathcal{O}_X$.  In spite of this, it seems to me that the topological map puts strong constraints on the sheaf map. For example, if $X=\operatorname{Spec}B,Y=\operatorname{Spec}A$ are affine schemes, the morphism is determined by a ring homomorphism $A\rightarrow B$; the topological map is how the primes contract under that ring homomorphism. If I know how all the primes are contracting, this does not leave the homomorphism a lot of room to wiggle. I request help in thinking about exactly how much room there is:     "How many" different morphisms are possible between schemes $X,Y$ with the same topological map $f:X\rightarrow Y$? "How different" can they get? What kinds of conditions on $X,Y$ limit this flexibility?   (For example, if $X,Y$ are integral, in which case elements of the structure sheaves are "determined by their pointwise values" in the residue fields $\kappa(p)$, does the topological map force a particular sheaf map as it does for varieties and manifolds?)


lately whenever i try to update through the terminal I get this message  E: could not open lock file /var/lib/apt/lists/lock  - open (13: permission denied) E: unable to lock directory /var/lib/apt/lists/ E: could not open lock file /var/lib/dpkg/lock  - open (13: permission denied) E: unable to lock administration directory (/var/lib/dpkg/), are you root?   I am using ubuntu 14.04.1 and apt-get had been working just fine until now

I get this error whenever I try to install programs using the terminal:  home@ubuntu:~$ apt-get install myunity E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?   Also I'm unable to install updates using the terminal.


So I'm trying to create a simple list class that implements the addFIrst and addLast algorithm to be more specific like this:  public class Node {      private int item;     private Node link;      public Node(int item, Node link)     {         this.item=item;         this.link=link;     }      public int getItem()     {         return item;     }      public Node getLInk()     {         return link;     }      public void setItem(int item)     {         this.item=item;     }      public void setLink(Node link)     {         this.link=link;     } }  public class LIsta {      private Node head;      public LIsta()     {         head=null;     }      public void insertFirst(int item)     {         Node n=new Node(item, head);         head=n;     }      public void insertLast(int item)     {         Node temp=head;         while(temp!=null) temp=temp.getLInk();         Node n=new Node(item, null);         temp.setLink(n);     }      public void Print()     {         Node temp=head;         while(temp!=null)         {             System.out.println(temp.getItem());             temp=temp.getLInk();         }     }  }  public class Main {      public static void main(String[] args) {         // TODO Auto-generated method stub          LIsta list=new LIsta();         list.insertFirst(5);         list.insertFirst(3);         list.insertFirst(2);         list.insertLast(8);         list.Print();     }  }   However it gives me an error whenever I try to call the insertLast() method more specifically in the line:  temp.setLink(n);   It says: Null pointer access. The variable temp can only be a null at this point.  Any Ideas?

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


Get:1 http://in.archive.ubuntu.com/ubuntu bionic InRelease [250 B] Err:1 http://in.archive.ubuntu.com/ubuntu bionic InRelease                        Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) Hit:2 https://packages.microsoft.com/repos/vscode stable InRelease              Get:3 http://security.ubuntu.com/ubuntu bionic-security InRelease [250 B]       Err:3 http://security.ubuntu.com/ubuntu bionic-security InRelease                 Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) Err:4 http://ppa.launchpad.net/webupd8team/java/ubuntu bionic InRelease           Cannot initiate the connection to ppa.launchpad.net:80 (2001:67c:1560:8008::15). - connect (101: Network is unreachable) Could not connect to ppa.launchpad.net:80 (91.189.95.83), connection timed out Err:5 http://dl.google.com/linux/chrome/deb stable InRelease                      Cannot initiate the connection to dl.google.com:80 (2404:6800:4007:80a::200e). - connect (101: Network is unreachable) Could not connect to dl.google.com:80 (172.217.160.142), connection timed out Err:6 http://in.archive.ubuntu.com/ubuntu bionic-updates InRelease                Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:3:1::f). - connect (101: Network is unreachable) Could not connect to in.archive.ubuntu.com:80 (43.255.166.254), connection timed out [IP: 43.255.166.254 80] Err:7 http://in.archive.ubuntu.com/ubuntu bionic-backports InRelease   Cannot initiate the connection to in.archive.ubuntu.com:80 (2403:8940:3:1::f). - connect (101: Network is unreachable) [IP: 43.255.166.254 80] Reading package lists... Done E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/bionic/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) E: The repository 'http://in.archive.ubuntu.com/ubuntu bionic InRelease' is not signed. N: Updating from such a repository can't be done securely and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) E: The repository 'http://security.ubuntu.com/ubuntu bionic-security InRelease' is no longer signed. N: Updating from such a repository can't be done securely and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

So I am on my college network which requires me to sign in to the browser before I start using the internet. I do so succesfully but on a clean install of Ubuntu, when I try to do sudo apt update, I get the following output:  $ sudo apt update Get:1 http://in.archive.ubuntu.com/ubuntu xenial InRelease [2,847 B] Err:1 http://in.archive.ubuntu.com/ubuntu xenial InRelease                     Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [2,854 B]     Err:2 http://security.ubuntu.com/ubuntu xenial-security InRelease              ... Get:3 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease [2,855 B]    Err:3 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease ... Get:4 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease [2,857 B] Err:4 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) Fetched 11.4 kB in 0s (18.3 kB/s) Reading package lists... Done E: Failed to fetch http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?) ... E: Some index files failed to download. They have been ignored, or old ones used instead.   But when I do wget http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease, I get this output success:  2017-04-01 05:34:57  http://in.archive.ubuntu.com/ubuntu/dists/xenial/InRelease Resolving in.archive.ubuntu.com (in.archive.ubuntu.com)... 91.189.88.162, 91.189.88.149, 91.189.88.152, ... Connecting to in.archive.ubuntu.com (in.archive.ubuntu.com)|91.189.88.162|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 246846 (241K) Saving to: ‘InRelease.3’  InRelease.3         100%[===================>] 241.06K   110KB/s    in 2.2s      2017-04-01 05:35:00 (110 KB/s) - ‘InRelease.3’ saved [246846/246846]   Clearly I have internet access from my browser and on wget but when I do sudo apt (or apt-get) update I get this error.  PS: This question is not similar to other threads as their solutions do not seem to work on mine        As I have found out, this problem is happening only to me, not others on the college network. Despite setting up the network according to instructions, this still happens. Any more help would be appreciated  EDIT: So as it turns out, 50% of us in the college are facing this issue, while 50% aren't despite having no issues with the hardware and sudo apt update before the last week. Thanks to @David Foerster for helping me throughout all this time.  As it stands, the issue has been raised to our college's networking department :)


I think if our eyes are good there are not many situations where we naturally percieve a shallow DOF. How is it that lenses create this? What happens for shallow DOF to happen in photos and on movies?

I'm wondering, technically, why and how does the out of focus areas blur more when using a bigger aperture. I think it'd help a lot if I presented a problem that's been driving me nuts for a long time:  I've read that the f-number of the human eye varies from about f/8.3 in very bright light to about f/2.1 in the dark. But from what I've tested, I always see out-of-focus areas with the same amount of blur.  Which leads me to ask: how does this aperture thing work, why does it create a blur from the technical point of view, and does it also apply to eyes, or is it just a "failure" in the camera lenses we've come to like and never wanted to "fix"?


I tried to mt7610u on 16.04 and it worked but I can't get the WiFi to load. It just says "device not managed":     sudo apt-get install git build-essential linux-headers-generic git clone https://github.com/Myria-de/mt7610u_wifi_sta_v3002_dpo_20130916.git cd mt7610u_wifi_sta_v3002_dpo_20130916 make sudo make install sudo cp RT2870STA.dat  /etc/Wireless/RT2870STA/RT2870STA.dat   my lsusb:  $ lsusb Bus 002 Device 002: ID 8087:8000 Intel Corp.  Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 8087:8008 Intel Corp.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 006: ID 0bda:0139 Realtek Semiconductor Corp. RTS5139 Card Reader Controller Bus 003 Device 005: ID 04f2:b3fd Chicony Electronics Co., Ltd  Bus 003 Device 004: ID 13d3:3402 IMC Networks  Bus 003 Device 003: ID 1d57:ad17 Xenta  Bus 003 Device 002: ID 148f:761a Ralink Technology, Corp.  Bus 003 Device 007: ID 04f3:010c Elan Microelectronics Corp.  Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   my rfkill list all:  0: hci0: Bluetooth     Soft blocked: no     Hard blocked: no 1: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no 2: asus-wlan: Wireless LAN     Soft blocked: no     Hard blocked: no 3: asus-bluetooth: Bluetooth     Soft blocked: no     Hard blocked: no 4: phy1: Wireless LAN     Soft blocked: no     Hard blocked: no

I recently got a wireless adapter (TP-Link Archer T2UH V1). After plugging it in, I found out that the drivers for Linux are not native on Ubuntu. They do, however, have the drivers available for download (in the form of compilable/ makefile). What I am not sure of is how to install these drivers. I know that I need to build the drivers, place things where they need to be, and tie things together with the kernel. I am not sure how to do this, however, and need some help.  TL;DR: I need to know the terminal commands to install these drivers.  Driver/Device info:   Output of lsusb:  Bus 003 Device 004: ID 148f:761a Ralink Technology, Corp.


"You cannot ride the roller coaster if you are under $4$ ft tall, unless you are older than $16$ years old."   $q$: ride the coaster  $r$: under $4$ft tall  $s$: older than $16$  It was my understanding that "unless" translates to "if not" therefore I came up with: $$\neg s \to (r \to \neg q).$$  However, the book gives this as the answer:  $$(r \land \neg s) \to \neg q.$$  Which makes sense, however I don't see where the "and" comes from. Does "unless" mean something different in this context?

You cannot ride the roller coaster if you are under 4 feet tall unless you are older than 16 years old.   Let:   $P$ stands for "you can ride the roller coaster" $Q$ stands for "you are under 4 feet tall" $R$ stands for "you are older than 16 years old"   Is this logical expression correctly translated?  $$P \rightarrow (Q \wedge R)$$


I try to weld my dupe hammer carefully - honest I do. I'm well aware which tags I can use it in, and I do not agree that .   I do, however, sometimes wonder whether I've used it appropriately. I try to keep an eye on most questions where I've used it to keep an eye out for the OP (or someone else) commenting along the lines of "That's not a duplicate"/"That's not answering my question"/"You're an idiot" and sometimes I've just re-opened the question.  I wish there was some feedback loop in place like there is with questions/answers (and to a lesser extent, comments) where the community can be proactive in telling me I've been an idiot-with-a-dupe-hammer.  I wondered what people might think about some (or all) users being able to provide me with feedback when I dupe hammer. Perhaps something as simple as a "good call"/"bad call" button next to the close-as-dupe message.  There could be some feedback to the closer, such as >3 "bad call" and the user gets an inbox message along the lines of     3 users have indicated that they think your close as duplicate is incorrect.   Is this a useful feature, or pointless?

I propose to let users vote on closing activities of moderators and other users with closevoting power.  Like this:       closed as exact duplicate by Michael Mrozek, waiwai933, Arjan, YOU, Yi Jiang 6 hours ago      This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question.   Make it like this:     closed as exact duplicate by Michael Mrozek, waiwai933, Arjan, YOU, Yi Jiang 6 hours ago   fair/unfair close? [agree] [disagree]      This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question.   Then the system will gather statistics and automatically grant more closing powers to those users who enjoy support of the community and revoke those powers from those mostly casting contradictory votes.  It would seem that granting the same powers to everybody has not resulted in balance but in public disorder. Perhaps it is reflective of American lifestyle (everybody has the right and means to shoot anybody), but it's not the best way to run a society by far.  What I'm trying to say is that while granting powers to everybody in advance is generous, the maturity to wheel these powers in a fair way must be proven. By introducing community feedback this assessment process can be automatized.


In QGIS i created a grid (via "create grid"), which i later split into layers of horizontal and vertical lines. Afterwards i calculated the respective cumulative line length for polygons using "Sume line length". The results i achieved differ especially for horizontal lines quite strongly (~ 25% less) from expected values (in the case where i could compare, based on another publication (values for China)).  One suggestion was, that the difference may be due to measuring planar vs. geodetic distance. Does anyone know how QGIS measures distance with this tool? May the result be subject to the projection I use?

My goal is to find the total length of roads per county for a particular state. You would think there would be a simple government spreadsheet with this information in it....  I cannot figure out how to find the summed lengths of a polyline layer(roads) in each county (polygon) in QGIS. I have tried using Vector-> Analysis -> Sum line lengths but it just reproduces the county shapefile with a length column, of which I have no idea what unit it is in.


He wasn't human, nor did he feel any affection towards anyone. Now that we know his body was human enough for him to reproduce, why did he do it? If he just wanted to carry his bloodline forward, why then and not earlier? If it was a mistake, why was he fooling around in the first place? Bellatrix was a married woman, so I can't imagine him wanting to indulge in shenanigans with her when he could've easily Imperiused anyone in to being with him, because he didn't necessarily require a partner that loved him. The above applies even if he was just feeling curious or missed the sexual activity.

In The Cursed Child,      Delphi is revealed to be Voldemort's daughter.   As she explains:      Delphi:  I am from the future. The child of Bellatrix Lestrange and you [(Voldemort)]. I was born in Malfoy Manor before the Battle of Hogwarts. A battle you are going to lose. I have come to save you. (Harry Potter and the Cursed Child - p.307 - Little, Brown - Act Four, Scene Eleven)   But why? Why did     Voldemort, of all people,   have a child in the first place?     He does not love, he considers himself supreme, he is arrogant, he does not need a right-hand man/woman, and he has absolutely every intention of immortality. Even with the Potter boy chipping away at his Horcruxes, surely he would feel no need for an heir?


I'm using a very simple tool on Windows called  which allows me to set screen regions and maximizes to that region. Is there similar software on OS X? The one's I've found only allows you to split 50/50 and requires you to press a special key.  Thanks, Dennis

I'd like to do something with my windows on OS X, where something includes options like re-arranging, moving, re-sizing, remembering positions, cloning across Spaces, etc. What options exist?  Rules   One app per answer. Use this format for the first two lines of your answer: ## [app name](link to website) [App Store](link to appstore) (price)    Check for duplicates before adding new answers.  If you find a duplicate, vote it down and encourage its poster to upvote the original entry instead (and remove the dupe). Include short description about what this Window Managing app does.  What makes this Window Manager app different than the others? Is it focused on re-sizing using only the keyboard? Is it focused on moving using only mouse gestures? Etc.


I have been using QGIS and my PC to make georeferenced maps for Avenza.  I have recently switched to a Mac Platform. It all seems to work same except when exported the PDF is not georeferenced.  All seems to be spatially correct when creating maps.    Is this an issue with how Mac downloads our georeferenced USGS imagery we use, which seems to be the only thing that doesn’t seem the same as the PC, or is there something else going on we don’t have setup correctly ?

Alright I actually did this successfully a few months back following these steps .    Now when I bring the map into Avenza, I get a "Map Not Referenced"  Now I have no clue what I am doing wrong.  I have tried and tried.  I have unistalled and reinstalled.  Tried to export as image then convert format.    A strange thing to note, I can not select reference map under Print Composer-> Export Settings -> Reference Map.


I'm doing a query to an sObject with Dynamic apex and I would like to store al keys and values in a map where the map contains the object field as key and the value of that field from my query looking something like this:  Map<String,String> mapFieldQueryValaue = new Map<String,String>();  List<sObject> objectList = Database.query('Select Id,Name from Account');  for(sObject record:objectList){       mapFieldQueryValaue.put(sobjectField[dinamyc inject object field Name],record.Name);      //the map content would look like (Name = 'testName',Email='test@email.com')    }   There's a way to store the FieldName as my key?

I am trying to create a map from a result of a SOQL query, this map contains the name of the fields as keys and the values of the query as values for example:     List accounts = [SELECT Name, Email FROM Account];   and the map Map has this structure:  key         value name        123  email       test@test.co.uk   any ideas please ?


The Fighter archetype "Champion" lists the skills "Improved Critical" and "Superior Critical", which state that my weapon attacks score a critical hit on natural 19-20 and natural 18-20, respectively. The description for either of these abilities don't explicitly state whether these attacks have the autohit properties of a natural 20 or not, though they could be interpreted to mean that. Given a single level 3 Champion fighter with no active magical effects fighting an enemy with infinite AC, would that fighter have a 5% chance to hit (nat 20 only), or a 10% chance to hit (nat 19+20)?

This question is in respect to the Champion's increased critical hit range.  On a roll of 18 or 19 (when this class feature becomes available), is the attack automatically a hit as it would be with a 20?


If you have a spell or ability that produces acid. Examples would be Acid Splash, or a Dragonborn's Breath Weapon in acid form. Could these be used against locks or other barriers such as doors, chained gates, metal bars, etc?

I am playing a wizard in a campaign with a lot of high seas scenes. I wanted to use Lightning Bolt on our enemies' sails and masts, but should it be done with some kind of roll? The PHB says:     A stroke of lightning forming a line 100 feet long and 5 feet wide blasts out from you in a direction you choose. Each creature in the line must make a Dexterity saving throw...   Sails are not creatures, so should I consider it an automatic success? Or can I not even aim the Bolt to attack their sails?  Though I am aware of the range of the Lightning Bolt, I think it would be a good as a pre-approach attack.


I alredy checked all th questions and nothing seems help , my problem is the database works fine with the emulator using the absolute path of the database :   String path = "/data/data/com.example.??/databases/database.db";  but when i export it as apk file the the device can't open or find the database with that path !   is that mean when i export it the real path will change ? or just i need to copy my database to specified folder in the device ,, ? can any one help me with this ,, thanks !

If your application requires a database and it comes with built in data, what is the best way to ship that application? Should I:   Precreate the SQLite database and include it in the .apk? Include the SQL commands with the application and have it create the database and insert the data on first use?   The drawbacks I see are:   Possible SQLite version mismatches might cause problems and I currently don't know where the database should go and how to access it. It may take a really long time to create and populate the database on the device.   Any suggestions? Pointers to the documentation regarding any issues would be greatly appreciated.


In this situation below What does “that's as good as it's going to get” mean?  A: Hey, B! #$#J3293~(babbling)?  B: What?  C: He(A) wants to ask you(B) to go to the dance party together.  B: that's as good as it's going to get, isn't it?  C: I'm afraid so.  I have no idea what it means.  Is that means "I'd love to?"  I need your help.

Is it meant as a compliment or is it more acceptance of a situation? For instance, having loved a partner who died and feeling that you could never feel that way about anyone again and then describing the person you have just fallen in love with you say it's as good as it gets.


I am missing a file. how can I do a search for it on the whole system? default windows search does not return a result. it concerns a .txt file. can I do a search for strings which refer to the content of the file? os: win 7 ult 64bit.

Back in Windows XP I knew that doing a file search and checking "Search file contents" (or whatever it was) I would get my results if I waited patiently.  In Vista, I felt I had absolutely no confidence that what I had typed had been thoroughly searched for, even with all the "Search non-indexed locations" etc. checked.  In Windows 7 I feel better and usually find stuff, but am suspicious when I don't. I'm not left feeling "confident".  I don't want (the weight of) Google Desktop.  I want a solid, brute file search utility. I found one I thought looked good recently (installed Windows 7 RTM last week and can't remember what it was called) but it still didn't seem to find files I placed as tests.


I'm compiling a project that has several header files, one of them is a general "utils" file with general-purpose functions.   When I include the header file for this utils file, compilation fails (see error below), but when I include the actual .cpp file, it works.   I am using a CMakeLists.txt file with CLion, on MacOS High Sierra.   A minimal equivalent project that fails in the same way:  main.cpp:  #include "util.h"  int main() {     print("Hello");     return 0; }   util.h:  #pragma once  #include <string> #include <iostream> #include <sstream>   template<typename T> void print(T thing_to_print);   util.cpp:  #include "util.h"  template <typename T> void print(T thing_to_print){     std::cout << thing_to_print << std::endl; }   CMakeLists.txt:  cmake_minimum_required(VERSION 3.7) project(example) set(CMAKE_CXX_STANDARD 11) set(CMAKE_VERBOSE_MAKEFILE ON)  SET(UTILS_MINIMAL_LIB_FILES util.h util.cpp) add_library(utils_lib_minimal ${UTILS_MINIMAL_LIB_FILES})  add_executable(main_test main.cpp) target_link_libraries(main_test utils_lib_minimal)   Build fails:  Undefined symbols for architecture x86_64:   "void print<char const*>(char const*)", referenced from:       _main in main.cpp.o ld:  symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)   However, when I change the include statement to :  #include "util.cpp"   The compilation completes successfully.  Any ideas?  Thanks in advance.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


While coding I always have to change the headers (<h1> <h2> <h3>) etc.. as I never like how they are styled, but where is the information for the header styles kept?  Obviously the headers are not styled in my CSS so I then thought that maybe it's something to do with the DOCTYPE or other code before <head> but removing all these didn't affect the header style at all!  So plain and simple; where is the header style defined?!

Are there any lists of default CSS stylesheets for different browsers? (browser stylesheets in tabular form)  I want to know the default font of text areas across all browsers for future reference.


The above image is what I have created so far, still prototyping, just got started scripting within Blender Would like to be able to collapse each box, which contains light properties, like the image below (from Luxcore). Does Blender have this option or do I have to build it from scratch?  I have looked through the code, but can't seem to make sense of it...

I have an add-on with rather a lot of UI options and am trying to find a way to clean it up so that not all the options need to be shown at once. I've noticed that some of the default tools have foldout sections, but I can't figure out what UI component I need to use to get the same behaviour.  Here is an example of what I'm talking about, showing the Color Picker panel open, but Color Palette and Options panels folded up. Is there a simple UI component I can use to emulate the behaviour and visual style of this in my add-on?


I would greatly appreciate any advice on how to preserve my php session variables once i do a https redirect like this:  $location = 'https://' . BASE_URL . 'billing.php'; header("Location: $location"); exit();

When sending the user to a checkout page, they are switched from http://sitename.com to https://sitename.com.  As a result, $_SESSION variables are lost.  The site has a valid SSL certificate which may or may not be of some use.


The magic SysRq key does not work on my Ubuntu 16.04 desktop. I imagine it's now disabled by default. My attempts to enable it did not work, and the only thing Google finds is a 2007 forum post from when it was apparently enabled by default.  Can I enable it? If so, how?  [Added the following after the first answer:]  According to  "In Ubuntu the combination of Alt+SysReq acts as "print screen" command." This is in fact the behaviour I observe on a non-hung system, even after doing sudo sysctl -w kernel.sysrq=1 I get some kind of screen capture on my desktop. Not what I want.  It's not practical to write to /proc/sysrq-trigger from a system that's basically hung, trying to get information to debug the problem.

On occasion, my laptop has become stuck so I've used the magic key combination of Alt + SysRq + REISUB to perform a safe reboot. However, it doesn't seem to work for me as when I press the B key to complete the magic key command it simply says, "resetting..." and doesn't do anything.  All of the other keys seem to work fine as it resets the keyboard layout, kills all tasks etc., but it doesn't seem to complete with a reboot.  I was under the impression that my laptop should reboot after the magic keys have all been pressed in the order of REISUB.


How do I delete a folder or an album from Photos?  Have searched internet for answer and tried using control, option and command keys.

I have a Macbook Pro running Yosemite, but no iPad or iPhone. Photos.app transferred the entire contents of my iPhoto libraries, but I cannot see how to delete an unwanted event.  Although I am using Photos.app, and iPhoto has now gone, the events are still referred to as iPhoto Events.    It is my belief that the lack of "iPhoto" as an app anywhere on my system means that I am running wholly on "Photos" despite the events being referred to as iPhoto Events.   Am I correct in this belief?


I'm making a document to organize my plants (hundreds of different species) and want to have specific info for each. Basically a simplified how-to-care guide for each species, including at least the following info in tables (some with icons for things like shade/partial sun/full sun, etc):  Germination (stratification, growing medium, watering, light requirements) Seedling (when to transplant, soil needs and types, watering, light needs) Harvesting (when to harvest, what parts to harvest, storing seed)  I already have something set up in Excel which will include this info in separate tables for each growing phase, but I love LaTeX and it's so much prettier. I thought there would be some examples I could use for inspiration, but searching here and on Google/CTAN doesn't give anything relevant. Do I basically have to create this from scratch? Any leads would be appreciated! Edit: Here's what I have so far in Excel -- I didn't make the separate tables yet; right now it's all in one box:  Basically I wanna add germination info, seedling, harvesting, etc. in separate tables to reduce the huge block of text it has right now, and make navigating easier. Ideally or Maybe: In the output, have one page for each plant that includes this above general info (picture, names, seed sources (the URLs in the lower table), and general description) as well as the germination / seedling plant / harvesting info on separate tables. So maybe four/five tables total.

I'm interested in learning about some nice-looking table samples. Colors can make a huge difference, and just providing some color to headers, background, or borders can dramatically change presentation. Any samples you're proud to share?  (BTW here's a sample I like, but unfortunately, not TeX...)


context: I am currently developing my first MVC application, I am following the examples in the book "Pro ASP.NET MVC Framework 2" by Steven Sanderson. I followed the first chapters and I have implemented a similar application to the "SportStore" full code  can be located at the following link   The application has two controllers  1 .- NavController designed to implement a user menu using a user control "Menu.ascx"  2 .- PostEntryController designed to list the post belonging to a particular menu option  The problem arises when running the application in debug mode NavController generated links do not work for some reason the PostEntryController is not instantiated.  When I examine the source code generated aspx file is shown as (PostEntry/Index.aspx)  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">   <link href="/MarsWeb/Content/Site.css" rel="stylesheet" type="text/css" /> <link href="/MarsWeb/Content/jquery.treeview.css" rel="stylesheet" type="text/css" />         <title>Posts</title>

Mars Ventas

Home

Ventas

Avance de Ventas

Browser

    Can anyone help me?  This is Global.asax  routes.MapRoute("PostEntry", "PostEntry/{action}/{MenuItemId}/{page}", // Matches ~/MenuId             new { controller = "PostEntry", action = "Index", MenuItemId = (string)null },             new { page = @"\d+" }         );          routes.MapRoute("MenuItem", "PostEntry/{action}/{MenuItemId}", // Matches ~/MenuId             new { controller = "PostEntry", action = "Index", MenuItemId = (string)null, page = 1 }         );          routes.MapRoute(null, "", // Only matches the empty URL (i.e. ~/)              new { controller = "PostEntry", action = "Index", MenuItemId ="0", page = 1}         );   When I write the url in the address bar I can access the url

In my applications, I often have to use relative paths. For example, when I reference JQuery, I usually do so like this:  <script type="text/javascript" src="../Scripts/jquery-1.2.6.js"></script>   Now that I'm making the transition to MVC, I need to account for the different paths a page might have, relative to the root. This was of course an issue with URL rewriting in the past, but I managed to work around it by using consistent paths.  I'm aware that the standard solution is to use absolute paths such as:  <script type="text/javascript" src="/Scripts/jquery-1.2.6.js"></script>   but this will not work for me as during the development cycle, I have to deploy to a test machine on which the app will run in a virtual directory. Root relative paths don't work when the root changes. Also, for maintenance reasons, I cannot simply change out all the paths for the duration of deploying the test - that would be a nightmare in itself.  So what's the best solution?  Edit:  Since this question is still receiving views and answers, I thought it might be prudent to update it to note that as of Razor V2, support for root-relative urls is baked in, so you can use   <img src="~/Content/MyImage.jpg">   without any server-side syntax, and the view engine automatically replaces ~/ with whatever the current site root is.


I assembled this mini tesla coil kit and the instructions say to plug it into a power source that's 15-20v 2amps. I'm just wondering how do I do that? As in how do I make something that produces this specific current? All I have is batteries. I tried looking it up but it mostly comes up with calculators for amps and things

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


I am unable to install gnome-tweak-tool in Ubuntu 17.10  ubuntu@ubuntu:~$ sudo apt-get install gnome-tweak-tool Reading package lists... Done Building dependency tree        Reading state information... Done Package gnome-tweak-tool is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'gnome-tweak-tool' has no installation candidate   How can I solve this?

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


I am trying to build an app that uses the device's camera, takes a picture in one fragment, and displays that picture in a separate fragment. My app uses a DrawerLayout and several fragments. In the main Activity class when I try to reference the ImageView I would like to edit within the xml file of one of my fragments I am met with a NPE:  ImageView imgTaken = (ImageView) findViewById(R.id.post_imageView);   I have been encountering these types of exceptions too frequently; I think there is something about using View objects that I am not familiar with. If anybody has any useful insight on why exactly I may be repeatedly finding my code not working due to a NPE, please feel free to enlighten me.  Thanks for the help!

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


I have this code -
Hello World
       This generates a simple html page on the browser. I want to generate a pdf file of this html page. I tried using fpdf.php with the following code:  require("fpdf.php"); $data = $this->fpdf->Open(); $data = $this->fpdf->AddPage(); $data = $this->fpdf->SetFont('Arial','',8); $data = $this->fpdf->Cell(80); $data = $this->fpdf->Cell(0,0,"Hello World",0,1,'R'); $data = $this->fpdf->Output("../pdf/"sample.pdf");   I want to give the HTML file as the input, and get the PDF document of that HTML page. Most of the libraries available either work as above or require payment. I tried finding a free API which helps me to do this but in vain. Can anyone help me out here?

I have an HTML (not XHTML) document that renders fine in Firefox 3 and IE 7.  It uses fairly basic CSS to style it and renders fine in HTML.  I'm now after a way of converting it to PDF.  I have tried:   : it had huge problems with tables.  I factored out my large nested tables and it helped (before it was just consuming up to 128M of memory then dying--thats my limit on memory in php.ini) but it makes a complete mess of tables and doesn't seem to get images.  The tables were just basic stuff with some border styles to add some lines at various points; : I actually had better luck with this.  It rendered some of the images (all the images are Google Chart URLs) and the table formatting was much better but it seemed to have some complexity problem I haven't figured out yet and kept dying with unknown node_type() errors.  Not sure where to go from here; and : this seems to work fine on basic HTML but has almost no support for CSS whatsoever so you have to do everything in HTML (I didn't realize it was still 2001 in Htmldoc-land...) so it's useless to me.   I tried a Windows app called Html2Pdf Pilot that actually did a pretty decent job but I need something that at a minimum runs on Linux and ideally runs on-demand via PHP on the Webserver.  What am I missing, or how can I resolve this issue?


I've been editing out tags from question titles for the past several hours, and I noticed that a lot of questions have that pattern, especially from new users. I don't know who and when decided that it's the way to go, but that is clearly:   Less readable; Obstructs readers' ability to quickly identify key words.   There should be automatic detection of that silly nonsense and notification, maybe even automatic decapitalizing if every or most (~>70%) words in the question title begins with a capital letter.

On  we try really hard to fix spelling, grammar, and capitalization mistakes in question titles in order to avoid the . But occasionally someone enters a question with an all-lowercase title ().  It would be useful if the system could nudge the user toward capitalizing titles property by showing a hint when the user appears to be capitalizing incorrectly. For instance:    As  and  note in comments, the feature should also try to detect and advise against Title Case and ALL CAPS.


Javascript objects. I am trying to understand the difference between the following ways of class declaration.  At a fundamental level is the difference between both of them? Is one advantageous over the other? if so, how?      1)         var Animal = function(){           this.run = function(speed){              console.log(speed)            };             this.eat = function(food){              console.log(food);            };           }          var dog = new Animal();  2)       var Animal = function(){};       Animal.prototype.run =  function(speed){              console.log(speed)            };        Animal.prototype.eat =   function(food){              console.log(food)            };

What's the difference between  var A = function () {     this.x = function () {         //do something     }; };   and  var A = function () { }; A.prototype.x = function () {     //do something };


Is it possible to both left and right justify paragraphs and the like when using \texttt or \tt ? I have never found an answer. Consider the example: \documentclass[12pt]{book} \usepackage{lipsum}  \begin{document} \begin{quote} \item \texttt{\lipsum[1]} \end{quote} \end{document}  which produces  Is there a way have the output right justified (as well as left justified)? I have not been able to figure this out without resorting to brute force. Thank you.

Here is my MWE. I wish for text with full justification, that is the text lines up perfectly with the right margin. I can not  find a simple answer to this, Please help.   \documentclass[oneside,12pt]{article} \setlength{\oddsidemargin}{0.25 in} \setlength{\evensidemargin}{-0.25 in} \setlength{\topmargin}{-0.6 in} \setlength{\textwidth}{5.5 in} \setlength{\textheight}{5.75 in} \setlength{\headsep}{0.75 in} \setlength{\parindent}{.5 in} \setlength{\parskip}{0.1 in}  \usepackage{lipsum}  \begin{document}  \ttfamily  \lipsum  \end{document}


I’m learning on how to code in Apex, and I’m trying to figure out how I can bulkify my code in a better way so that I won’t get SOQLExceptions. Scenario: Whenever I upload a lot of records using data loader to a child custom object called Inventory Snapshot, the system should check if there is a product record in the system. If there is a product record, then I should map the value with the Inventory Snapshot record. If not, then I should create a new Product record. This is my apex trigger code: trigger UpdateCreateProducts on Inventory_Snapshot__c (before insert, after insert) {     if(Trigger.isBefore){         FindOrCreateProducts.findProduct(Trigger.new);         FindOrCreateProducts.createProducts(Trigger.new);     } }  This is my apex class: publicclass FindOrCreateProducts {          public static void findProduct(List<Inventory_Snapshot__c> snapshotList){         List<Product2> prds = new List<Product2>();         for (Inventory_Snapshot__c inv: snapshotList){             prds = [Select Id,ProductCode from Product2 where ProductCode =:inv.Item_Number__c Limit 1];                 if (!prds.isEmpty()){                     for(Product2 prd: prds){                         inv.Product__c = prd.Id;                     }                 }         }     }                  public static void createProducts(List<Inventory_Snapshot__c> invList){         String prodDescr, newProdName, descr;         List<Product2> prds = new List<Product2>();         List<Product2> newPrds = new List<Product2>();         for(Inventory_Snapshot__c invt: invList){             prds = [Select Id,ProductCode from Product2 where ProductCode =:invt.Item_Number__c Limit 1];             if (prds.isEmpty()){                 descr = invt.Product_Description__c;                 Integer colonValue = descr.indexOf(':');                 System.debug('colonValue ' + colonValue);                 if (colonValue != -1){                     prodDescr = descr.substringAfter(':');                     newProdName = invt.Item_Number__c + ' : ' + prodDescr;                     System.debug('Product Name: ' + newProdName);                 }                 else{                     newProdName = invt.Item_Number__c + ' : ' + invt.Product_Description__c;                 }                 Product2 newProd = new Product2();                 newProd.Name = newProdName;                 newProd.Description = descr;                 newProd.ProductCode = invt.Item_Number__c;                 newPrds.add(newProd);             }if(!newPrds.isEmpty() && prds.isEmpty()){                 insert newPrds;                 for(Product2 prd: newPrds){                     invt.Product__c = prd.id;                 }             }         }      }        }  The code will work if I manually test, but won’t work if I’m inserting records using Dataloader. Can anyone help me out on how I should bulkify my code?

A general question asked from time to time on stack exchange is question of trigger bulkification.  Therefore I have 2 questions:   Which best practices are you using? What is the best way to handle updates of more than 200 records? (In case of more than 200 records the trigger is executed more than once.)


When I try to access the "HISTFILE" env var within a program, it isn't there  $ echo $HISTFILE /Users/drewgross/.bash_history $ python Python 2.7.10 (default, Oct 23 2015, 19:19:21) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.environ['HISTFILE'] Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/UserDict.py", line 23, in __getitem__     raise KeyError(key) KeyError: 'HISTFILE'   But if I set it directly, it is:   $ HISTFILE=wat python Python 2.7.10 (default, Oct 23 2015, 19:19:21) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.0.59.5)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.environ['HISTFILE'] 'wat'   It seems to be hidden for some reason. Why is that? Is there any way to access this var within my programs?

Bash seems to differentiate between variables which have been exported and those which have not.  example:  $ FOO=BAR $ env | grep FOO $ set | grep FOO FOO=BAR   set sees the variable but env does not.  $ export BAR=FOO $ env | grep FOO BAR=FOO $ set | grep FOO BAR=FOO FOO=BAR   set sees both variables but env sees only the exported variable.  I know that set is a bash builtin and env is not.  What are the differences between variables which are exported and those which are not?


I've got some issues with non-latin characters.  Query:  SELECT * FROM table WHERE name LIKE '%{$phrase}%'   PHP:  $phrase = $_POST['phrase']; //$phrase = strtolower/strtoupper($_POST['phrase']) made no differece   Demo database:  Asomething (in the db stored as Asomething) asomething (in the db stored as asomething) Äsomething (in the db stored as Ã„something) äsomething (in the db stored as Ã¤something)    Either I type a or A, I get what I want - both of results, but... if I type Ä, I get only one result containing uppercase. How can I get both of them?  Edited: I use collation utf8_general_ci

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


With some slow lens, and in some situation I tend to under expose. Situation like action where i need to freeze movement, I use obviously fast shutter.   When I open my RAW in Photoshop and I click the magic "Auto" correction, Photoshop increase exposure, 1 or 2 stop.   Then I notice "noise" .   My question is: is it better to increase on camera ISO, or post production action ? Or it is simply THE SAME ?   If I increase ISO i increase noise.  If I increase exposure in post production i increase noise....  Thanks

Suppose there are two photos taken in the following scenario:  Scenario 1 - Photo taken using ISO of 3200.  Scenario 2 - Photo taken using ISO of 100.  Both photos are taken in a medium light scenario. The photo in Scenario 2 is quite dark, while the photo taken in Scenario 1 looks good.  From my understanding, higher ISO gives a more grainy photo. So could a photo in scenario 2 (which appears quite dark) be modified in software (e.g. Photoshop) to increase the brightness, and be better than the photo taken with a higher ISO?


I really cannot figure out how to make the code below work. I am getting this exception:     UnboundLocalError: local variable 'u' referenced before assignment   user_a = "No selection" def if_statement():     user_choice = input("Pick 1 or 2\n")     if user_choice == "1":         user_a = input("What would you like A to equal?\n")         if_statement()     elif user_choice == "2":         print("A equals: " + user_a)         if_statement() if_statement()   Can anybody help me on this? I must specify that I am new to Python. Thank you in advance.

The following code works as expected in both Python 2.5 and 3.0:  a, b, c = (1, 2, 3)  print(a, b, c)  def test():     print(a)     print(b)     print(c)    # (A)     #c+=1       # (B) test()   However, when I uncomment line (B), I get an UnboundLocalError: 'c' not assigned at line (A). The values of a and b are printed correctly. This has me completely baffled for two reasons:   Why is there a runtime error thrown at line (A) because of a later statement on line (B)? Why are variables a and b printed as expected, while c raises an error?   The only explanation I can come up with is that a local variable c is created by the assignment c+=1, which takes precedent over the "global" variable c even before the local variable is created. Of course, it doesn't make sense for a variable to "steal" scope before it exists.  Could someone please explain this behavior?


Given an ellipse $x^2/a^2+y^2/b^2=1,$ where $a\not=b,$ find the equation of the set of all points from which there are two tangents to the curve whose slopes are (a) reciprocals and (b) negative reciprocals.   First I let $P(c,d)$ outside the ellipse,then assume the linear equation: $y=(x-c)+d;$ second, according to the problem, the line must touch the ellipse, so substitute $y$ for the equation of ellipse to get the intersection, then let $D(\text{discriminant})=0.$ After all of this, I have no idea how to continue.

For a given ellipse, find the locus of all points P for which the two tangents are perpendicular.   I have a trigonometric proof that the locus is a circle, but I'd like a pure (synthetic) geometry proof.


I am designing some key tags and am VERY new to illustrator. I currently just have a circle placed where I would like the hole, is there a way I can "cut that circle out so there is just a hole in the design that is transparent behind it?

I have an image (below) of two hands over a black circle. All three are currently separate paths with a fill but no stroke, all on the same layer.  How do I delete the shape of the hands from the black circle, so that afterwards I can delete the hands themselves, and just have the circle, with the shape of the hands cut out of it?


I am trying to write to the SD card using SAF on the android terminal. In my code, after creating a file on the SD card, I check the status of the file, but "NullPointerException" occurred at that time by some users. Despite being just after creating the file, I am struggling without knowing why it is null.   So is this, but now follows a code block Error occurs at "if(newFile.canWrite()){".:  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) { getContentResolver().takePersistableUriPermission(data.getData(),                         Intent.FLAG_GRANT_READ_URI_PERMISSION |  Intent.FLAG_GRANT_WRITE_URI_PERMISSION); }  try {     countDownLatch = new CountDownLatch(1);         new Thread(new Runnable() {         @Override             public void run() {                 try {                     Thread.sleep(300);                 } catch (InterruptedException e) {                     e.printStackTrace();                 }                 countDownLatch.countDown();             }         }).start();      countDownLatch.await();  } catch (InterruptedException e) {     e.printStackTrace(); } target_filename= String.valueOf(System.currentTimeMillis()); treeUri = data.getData(); DocumentFile pickedDir = DocumentFile.fromTreeUri(this, treeUri);  // Create a new file and write into it newFile = pickedDir.createFile("text", target_filename); for(int i=0;i<10;i++){    newFile=pickedDir.findFile(target_filename);    int wait_sd=0;    countDownLatch = new CountDownLatch(1);    do{    if(newFile.canWrite()){                wait_sd=10;                     }else{                         try {                             countDownLatch.await(500, TimeUnit.MILLISECONDS);                             wait_sd++;                         } catch (InterruptedException e) {                             // TODO 自動生成された catch ブロック                             e.printStackTrace();                         }                     }                 }while(wait_sd<10);              }

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


First, I want to mention that I am not really experienced with statistics and thus I would kindly ask you to explain the answer to me like you would to a 5-year old. Secondly, I have read a lot of questions and I am still a bit confused about my case. I've got the following regression set up: $$ln(Y) = a + b_1*x$$  Thus, the dependent variable (house prices) is log transformed and the independent variable (change in GDP) is merely a percentage.   How do I interpret the result (the coefficient = 1.857)?

If we have the following general regression:  $$ln(Y)=\beta_0+\beta_1 X_1$$  Then it can be interpreted as an increase of 1 unit in $X_1$ will increase $Y$ by $100 \times \beta_1\%$.  But what if the increase in $X_1$ is not 1 unit but say 0.5. Would it then be interpreted as "an increase in $X_1$ by 0.5 unit will increase $Y$ by $(100\beta_1 \times 0.5)%$?


The moment I try to install something, I get an error of insufficient disk storage. In the above screenshot, there is a mismatch of space left in root for reasons I can't figure out. Last time when I ignored the message of insufficient disk storage, I starting facing infinite loop issues. Can you please suggest a permanent fix for this.

My Ubuntu cloud server has left only 900MB of disk space.   I'll just empty the directory /tmp and wondering if there is any other location to clean up.


if $a\mid x$ and $b\mid x$ and $\gcd(a,b) = 1$, prove that $a\cdot b\mid x$  Well, I've started by saying that $x = q_1a$ and $x = q_2b$, and I know that $a,b$ are prime numbers. And, I'm not sure how to proceed from here.  Edit: The answer here is better than in the posts listed here

Prove: If $a\mid m$ and $b\mid m$ and $\gcd(a,b)=1$ then $ab\mid m$  I thought that $m=ab$ but I was given a counterexample in a comment below.  So all I really know is $m=ax$ and $m=by$ for some $x,y \in \mathbb Z$. Also, $a$ and $b$ are relatively prime since $\gcd(a,b)=1$.   One of the comments suggests to use , i.e., $aq+br=1$ for some $q,r\in\mathbb{Z}$. Any more hints?  New to this divisibility/gcd stuff. Thanks in advance!


I strongly believe this is a duplicate but I didn't find any answers. My rather simple problem is, that I want to have some part of my text on another textwidth. As seen in the picture below.

On meta, I've found the disscussion , but it doesn't answer my question.  When should I use the environment quote? When quotation?


I'm getting an UnicodeEncodeError: 'ascii' codec can't encode exception when I try to print a Unicode string on Linux. On Windows I do not get the error.  The code executed on Linux:      my_str = u'\u4ece\u5165\u5e93'     print "%r"  % my_str #output: u'\u4ece\u5165\u5e93'      print "%s" % my_str #output: UnicodeEncodeError: 'ascii' codec can't encode character u'\u4ece' in position 0: ordinal not in range(128)   On Windows I get:      my_str = u'\u4ece\u5165\u5e93'     print "%r"  % my_str #output: u'\u4ece\u5165\u5e93'      print "%s" % my_str #output: 从入库

When piping the output of a Python program, the Python interpreter gets confused about encoding and sets it to None. This means a program like this:  # -*- coding: utf-8 -*- print u"åäö"   will work fine when run normally, but fail with:     UnicodeEncodeError: 'ascii' codec can't encode character u'\xa0' in position 0: ordinal not in range(128)   when used in a pipe sequence.  What is the best way to make this work when piping? Can I just tell it to use whatever encoding the shell/filesystem/whatever is using?   The suggestions I have seen thus far is to modify your site.py directly, or hardcoding the defaultencoding using this hack:  # -*- coding: utf-8 -*- import sys reload(sys) sys.setdefaultencoding('utf-8') print u"åäö"   Is there a better way to make piping work?


I want to try models to classify the MNIST dataset. now, the parameters I can play with are:  Network architecture: Number of convolutional layers, Number of kernels (filters) for each convolutional layer, Size of each kernel on each layer, Number of hidden layers (fully connected), Number of units for each hidden layer, Usage of layers (like BatchNormalization and Dropout.), Usage of max pooling (or maybe other pooling strategies). Training hyperparameters: Learning rate, Optimizer (SGD with momentum, adam, etc), Number of epochs.  What is the best known network where these are the parameters I can play with? Thanks!

I'm interested in understanding which neural network architecture is currently the state of the art (sometimes abbreviated "SOTA") with respect to standard image classification tasks such as MNIST, STLN-10 and CIFAR. This is challenging because new results are published frequently, and it can be hard to keep up. Is there a resource or website which tracks the best results for these tasks?


I found this link  the code from jfbu is almost perfect, except I need grouping of three on each side of the decimal.  So This code      %% GROUPING BY FOUR GOING FROM THE LEFT TO THE RIGHT     %% 1234567-->{1234}{567}      \def\aegroupbyfourR #1{\romannumeral0\expandafter\aegroupbyfourR@a                     \romannumeral-`0#1\relax\relax\relax\relax\dummy }      % we first check here if "short", for technical reasons     \def\aegroupbyfourR@a #1#2#3#4{\ifx #4\relax         \expandafter\@firstoftwo         \else\expandafter\@secondoftwo         \fi         {\aegroupbyfourR@short #1#2#3#4}{\aegroupbyfourR@b {{#1#2#3#4}}}}      % space to feed the \romannumeral0. We need to check for emptiness     %       \def\aegroupbyfourR@short #1\relax #2\dummy {\if\relax #1\relax         \expandafter\@firstoftwo          \else\expandafter\@secondoftwo         \fi { }{{#1}}}      \def\aegroupbyfourR@b #1#2#3#4#5{\ifx #5\relax         \expandafter\@firstoftwo         \else\expandafter\@secondoftwo         \fi         {\aegroupbyfourR@c {#1}#2#3#4#5}{\aegroupbyfourR@b {#1{#2#3#4#5}}}}      \def\aegroupbyfourR@c #1#2\relax #3\dummy {\if\relax #2\relax         \expandafter\@firstoftwo          \else\expandafter\@secondoftwo         \fi % Notice that #1 is never empty in this branch         {#1}{#1{#2}}}   Needs to be modified to only three spaces.  $\aenum{+12504.312423593}$ -->   +12,504.312 423 593

I thought I was able to do something like this before, but I can't find my solution.  I would like to format my large numbers as follows:   12,504.3124 2359 3   I know I can use siunitx to partially set this up, but I'm not getting the results I want:  \documentclass{article} \usepackage{siunitx}  \newcommand\aenumA[1][4]{%%   \num[group-separator={,},        group-digits=integer,        ]}  \newcommand\aenumB[1][4]{%%   \num[group-digits=decimal,        ]}  \pagestyle{empty} \begin{document}    \aenumA{12504.312423593}    \aenumB{12504.312423593}  \end{document}   I would like a hybrid solution (commas in the integer part and spaces in the decimal).  I would actually also like to be able to group differently between the two: every three digits in the integer part, every four digits in the decimal part.  Is there a straight-forward way to do this with siunitx?  Or, do I need to split the number at the decimal and treat the two parts separately and then glue them back together?


I'm writing a journal paper, and in this paper, I have to produce many versions of the same graph as I look at the effect of varying different parameters on the variable of interest (in this case the profit).  The following is an example of two of the graphs which I would produce.  The LaTeX source code:  \documentclass{article}  \usepackage{pgfplots} \usepackage{fullpage}  \pgfplotsset{compat=1.7}  \pagestyle{empty}  \begin{document}  \begin{figure}[h!] \begin{center} \begin{tikzpicture} \begin{axis}[     xlabel=Promotion Limit,     ylabel=Profit,     legend columns=2,     legend style={at={(0.5,1.1)},anchor=south}     ]   \addplot+[mark=x,thick,blue]       table [x=promotion.limit,y=optimal,col sep=comma]       {promotion-limit.txt};   \addlegendentry{Optimal};   \addplot+[mark=o,thick,dashed,red]       table [x=promotion.limit,y=actual,col sep=comma]       {promotion-limit.txt};   \addlegendentry{Actual}; \end{axis} \end{tikzpicture} \end{center} \caption{Effect of varying the promotion limit on profit.} \label{figure:promotion-limit} \end{figure}  In Figure \ref{figure:promotion-limit}, we see the effect of varying the promotion limit on the profit.  \begin{figure}[h!] \begin{center} \begin{tikzpicture} \begin{axis}[     xlabel=Minimum Price,     ylabel=Profit,     legend columns=2,     legend style={at={(0.5,1.1)},anchor=south}     ]   \addplot+[mark=x,thick,blue]       table [x=minimum.price,y=optimal,col sep=comma]       {minimum-price.txt};   \addlegendentry{Optimal};   \addplot+[mark=o,thick,dashed,red]       table [x=minimum.price,y=actual,col sep=comma]       {minimum-price.txt};   \addlegendentry{Actual}; \end{axis} \end{tikzpicture} \end{center} \caption{Effect of varying the minimum price on the profit.} \label{figure:minimum-price} \end{figure}  In Figure \ref{figure:minimum-price}, we see the effect of varying the minimum price on the profit.   \end{document}   The contents of promotion-limit.txt are:  promotion.limit,optimal,actual 0,100,100 1,110,105 2,118,108   The contents of minimum-price.txt are:  minimum.price,optimal,actual 8,135,116 9,120,110 10,100,100   The result is:    Question: How do I define a style for these pgfplots, so that I can make changes to the code at a single location, and all the series of graphs will incorporate the changes?

Because I often use the same options for multiple axes in my LaTeX documents, I use the following code to simplify my life.  \documentclass{article} \usepackage{pgfplots} \newcommand{\linecolora}{blue} \newcommand{\marka}{o} \newcommand{\plotoptsa}{color=\linecolora,mark=\marka} \newcommand{\xlabela}{Test test 123} \newlength\figurewidth \setlength{\figurewidth}{\columnwidth} \newcommand{\axisoptsa}{width=100,xlabel=\xlabela} \newcommand{\axisoptsb}{ymin=-8,ymax=-3} \begin{document}     \begin{tikzpicture}         \begin{axis}[\axisoptsa,\axisoptsb]             \expandafter\addplot\expandafter[\plotoptsa] coordinates                 {                     (2,-2.8559703)                     (3,-3.5301677)                     (4,-4.3050655)                     (5,-5.1413136)                     (6,-6.0322865)                     (7,-6.9675052)                     (8,-7.9377747)                 };          \end{axis}          \end{tikzpicture} \end{document}   It works like a charm! However, if I change width=100 into the defined width=\figurewidth, I get Missing \endcsname inserted. error. Using  \expandafter\begin{axis}\expandafter[\axisoptsa,\axisoptsb]   does not help.


I'm just interested if there is a technical way to merge between animate package and movie15 package in order to get an interactive 3D slideshow (like that shown below in the link) with full features of movie15, like including .u3d files, rotating and zooming each 3D figure in each slideshow.    The above link gives an example of how to make an interactive slideshow, but without 3D capability of each slide that can be satisfied by using movie15 package  I have tried to find someone documents or information regarding this point, but I think either it is impossible or still nobody did that.  I think if it is possible, then it will be a great add-on that could help everyone.

I want to switch 3D views in my presentation. I have read in the movie15 package that it is possible with the command: (dice example from movie15.pdf page 16)  \movieref[3Dviewindex=N]{dice}{Click here}   But in this case I have to click with my mouse on a button. It is possible to bind the command on a key or to call the button via a key or combine this with the command \pause ?  Regards,  Grandement.


So, after waiting until today (Jan. 8) to try updating pgf for my MikTeX install(s), went ahead and gave it a try (first after backing everything up in my MikTeX root directories).   Install pgf using MikTeX update console. The package information for the update is v. 3.1, build 7 January, 16:11 EST 2019.   However, for any document using some of the PSTricks packages I use, updating pgf causes some compile errors. Here is an mwe, with the error message at the bottom:   \documentclass[12pt,letterpaper,oneside]{article}   %% uncommenting any of the following causes a compile error  % \usepackage{pst-node}  %  \usepackage{pstricks-add}  %  \usepackage{pst-func}   \begin{document}   here is some text...   \end{document}    If you uncomment any of the PS packages, you get the following error(s) -- here, after uncommenting pst-node:   Command Line:   latex.exe --enable-write18 --src "mwe_pgf.tex"  Startup Folder: E:\books\mark2019\misc code\mwe   This is pdfTeX, Version 3.14159265-2.6-1.40.19 (MiKTeX 2.9.6930 64-bit)  entering extended mode  (mwe_pgf.tex  LaTeX2e <2018-12-01>  (<snip>...  (\MikTeX\tex/generic/pstricks\pstricks.tex  (\MikTeX\tex/generic/pstricks\pst-fp.tex  `pst-fp' v0.05, 2010/01/17 (hv))  (\MikTeX\tex/generic/pgf/utilities\pgfutil-common.tex  (C:\Users\egc\Desktop\egc\text\MikTeX\tex/generic/pgf/utilities\pgfutil-   common-lists.tex))   (\MikTeX\tex/generic/pgf/utilities\pgfkeys.code.tex  (\MikTeX\tex/generic/pgf/utilities\pgfkeysfiltered.code.tex))   (\MikTeX\tex/generic/pgf/utilities\pgffor.code.tex  Runaway argument?  ] {pgffor.code.tex}   ! Paragraph ended before \ProvidesPackageRCS@i was complete.  <to be read again>                      \par   l.11    ?    Updated pgf now plays nice with tikz (as far as I can tell), but not PSTricks. Which creates an enormous problem for people who use the latter.   If anyone can confirm the issue at their end, I'll post a bug report. Until then, back to the old (but still working) pgf package for me.

Consider the following MWE:  \documentclass{article} \usepackage{pstricks} \begin{document} A \end{document}   It produces the error  Runaway argument? ] {pgffor.code.tex}  ! Paragraph ended before \ProvidesPackageRCS@i was complete. <to be read again>                     \par  l.11   How do I fix this?


I have an issue were vmware player doesnt start when i open it via the launcher. It just does nothing, no error message whatsoever. I got it running once, but now it wont open up.  Im using vmware 64 bit, already tried reinstall via the vmware installer.  Any ideas?

I upgraded to Ubuntu 15.10 and now if I want to open VMware Player it doesn't do anything. I also uninstalled and installed it again, still nothing.  What can I do?


Consider a set of $n$ points in the plane such that any three of them are contained in a circle with radius $r=1$. Prove by induction that all $n$ points are contained in a circle with radius $r=1$.

There are $n$ points on the plane. Any $3$ of them are inside of a unit circle. How to show that all points are inside of unit circle?  It is needed to prove that if there is a unit circle for each $3$  points which contains them, there is also a unit circle which contains all $n$ points.


I am new to Salesforce and trying to understand the concept of Delegated Gateway URL of Single Sign On. I understand that Salesforce will enable this feature after submitting the case and I have to configure in profile level "Is Single sign on" equals true. But under single sign on setting page -- Delegated Authentication section -- when and how to use these two settings:   Delegated Gateway URL    Force Delegated Authentication Callout   Thank you very much in advance and it will be great help if there is any small example you can share.

I am implementing SSO, the documents which are avaliable via Salesforce.com are hard to understand. Does anybody know an easy to understand document or blog where I can study and implement it. Thanks in adavance


When I click on a button, I want to get the id of the button that was clicked. How can I do that with JavaScript?  For example:  <input type="button" id="1" class="buttonID" value="answer" onClick=myFunction() /> <input type="button" id="2" class="buttonID" value="answer" onClick=myFunction() /> <input type="button" id="3" class="buttonID" value="answer" onClick=myFunction() />

Is there any way to get the ID of the element that fires an event?  I'm thinking something like:    $(document).ready(function() {   $("a").click(function() {     var test = caller.id;     alert(test.val());   }); }); <script type="text/javascript" src="starterkit/jquery.js"></script>  <form class="item" id="aaa">   <input class="title"></input> </form> <form class="item" id="bbb">   <input class="title"></input> </form>     Except of course that the var test should contain the id "aaa", if the event is fired from the first form, and "bbb", if the event is fired from the second form.


I'm writing my Phd thesis with parts chapters and sections. It is divided in two very different subjects of research and I'd like to have a clear separation in the document and in the Table of Contents. In particular I'd like to have two different List of Figure and two List of Tables at the end of each parts of the document and not all together at the end of the document. I think that I have to create some new environment but I'm not able to get my result.  To construct two different new figure environments I simply inserted:   \newenvironment{myfigure1}{\begin{figure}}{\end{figure}}    in all chapters of the first Part of the document and  \newenvironment{myfigure2}{\begin{figure}}{\end{figure}}   in all chapters of the second Part  Also I modified the main file as follows:     \newlistof{myfigure1}{List of Figure}   after the chapters of the first Part  and    \newlistof{myfigure2}{List of Figure}    after the chapters of the second Part in the main file.     Sorry for my naivety

I'm starting to accumulate a large and fairly unwieldy list of figures at the start of my thesis and want to split that list into two.  I want to have a list of the 'main' figures included in the front matter and another list at the start of the appendices . This second list should just include any figures that are part of the appendices.  I've found a few examples that detail how I could suppress the figures in the appendix but nothing that describes how I would be able to then list them at a later point in my work.  Any ideas?  Thanks!


I've created a view to display items with a certain content type. I'd like to display the terms in an associated taxonomy along with them. Many of these nodes have more than one term selected.  The output currently displays nodes one time for each taxonomy term assigned. How can I adjust this so that it displays each node once with every term associated with it?  Thank you!

I am using a view that has a contextual filter ("Content: Has taxonomy term ID") and a relationship ("Content: Taxonomy terms on node"); for some reason, I keep getting duplicated content. In the view settings I have "Distinct" checked.    Are there any other options I can look into?


After forking a GitHub repo, some commits were pushed to the forked repo, and as a result GitHub indicates that  "This branch is X commits behind Y.":    How can I fix it through the GitHub web interface?     I know how to do it through git: :  git remote add upstream https://github/upstream/repo.git git pull --rebase upstream master git push --force-with-lease origin master

I have a Github repository that I forked from some other project several months ago. It is now several months later and the original master repo has changed. I would like to update my repo to reflect those changes. Is this possible in the Github web interface? Or do I just need to delete the repo and re-fork it?


Let $f$ be an entire function and let for each $a\in \mathbb R$, there exists at least one coefficient $c_n$ in $f(z)=\sum\limits_{n=0}^{\infty}c_n(z-a)^n$, which is zero. Then    $f^{(n)}(0)=0$ for infinitely many $n\geq 0$ $f^{(n)}(0)=0$ for every $n\geq 0$ $f^{(2n+1)}(0)=0$ for every $n\geq 0$ There exists $k\geq 0$ such that $f^{(n)}(0)=0$ for all $n\geq k$   We know that $c_n=\frac{f^{(n)}(a)}{n!}$ for all $n\in \{0,1,2\ldots\}$. Thus for $a=0$, $c_n=\frac{f^{(n)}(0)}{n!}$. By hypothersis, atleast one $c_n=0$. After that I could not do anything. Please help!

Let $f:\mathbb{C}\rightarrow\mathbb{C}$ be an entire function. And assume that at each point, one of it's derivatives vanishes.  What can you say about $f$?  A hint suggests that $f$ must be a polynomial.


I am interested in and learning , which is a HUGE framework and the de facto standard for developing IT services, which you can also get certified for and has (I think) many learners out there.  How is my question different from the "possible duplicates"?  There are many sites about technology and IT, but not that much (or no side) about how to design, manage, organise IT services with a business aspect.   I asked my question about ITIL on the "project management" Stack Exchange site, but it doesn't fit there quite well (was said to me). And there are not many sites where my question could fit. (I haven't found any, but project management).  So on which site should I ask a question about ITIL?

In which Stack Exchange site can one find/ask questions about ITIL?  Some context:     The Information Technology Infrastructure Library (ITIL), is a set of practices for IT service management (ITSM) that focuses on aligning IT services with the needs of business.   Small enterprises do not need much effort in management, cooperation and understanding. But when they grow in to large enterprises is a different story, with the separation of duties, all hell breaks loose and things get confusing... ITIL may be a good starting tool to bring order in to chaos.


I want to prove that interchanging the entries of an $n \times n$ matrix will not change the result.But I don't know how. Please help!

I am having trouble proving that a matrix A and its transpose $$A^T$$ have the same eigenvalues. I tried to use the formula $\det(I\lambda - A)$ but am getting nowhere. Is anyone able to help?


When separate, meshes keep their materials. When I join them, some of them seem to lose material. Correct material still displays in the material properties panel. Assigning it again doesn't change anything, neither does finding image texture again. What can be wrong? How to join meshes without losing texture? (The object starts to look black)

I am making a tree, in which I have a texture for the central tree object or bark, and branches have a different texture.    I applied the branches on tree with particle system.  Till then the textures were fine.    Then I convert the particle system and delete the particle system.    Then ctrl+j join to the main bark texture with the branches, with the bark or central stem as parent.    Doing this, texture from my branch material disappears.    Please anyone help me out.  ASAP.!😊 Thanks


I know this questions has been asked a lot in variations, but I cannot get this specific problem solved. I have a folder structure like this: -A --reports -B --reports -C --reports -...  I want to delete all PDFs in each 'reports' folder, that is older than 14 days. Of course I could do this with a loop in a bash script, but a oneliner (will be executed in a k8 cron jon) would be much easier to maintain.

I have found the command to delete files older than 5 days in a folder  find /path/to/files* -mtime +5 -exec rm {} \;   But how do I also do this for subdirectories in that folder?


A recent update to Xorg broke my desktop, which now looks like this:     In short, the desktop background is not updating on the secondary display. (And if there is no secondary display, the primary display background stops updating.)  Looking into the history, I found that this happened right after upgrading two packages:   xserver-xorg-core xserver-common   These were upgraded to 1.9.0-0ubuntu7.3.  I'd like to downgrade these packages. How do I do that?  I've checked that both have another version in the maverick repo:  xserver-xorg-core:   Installed: 2:1.9.0-0ubuntu7.3   Candidate: 2:1.9.0-0ubuntu7.3   Version table:  *** 2:1.9.0-0ubuntu7.3 0         500 http://fi.archive.ubuntu.com/ubuntu/ maverick-updates/main amd64 Packages         100 /var/lib/dpkg/status      2:1.9.0-0ubuntu7 0         500 http://fi.archive.ubuntu.com/ubuntu/ maverick/main amd64 Packages   However, apt won't let me downgrade them:  ville@fluxx ~ % sudo apt-get install xserver-common=2:1.9.0-0ubuntu7 xserver-xorg-core=2:1.9.0-0ubuntu7  The following packages have unmet dependencies:  xserver-xorg-core : Depends: xserver-xorg but it is not going to be installed E: Broken packages   And this is the reason:  ville@fluxx ~ % sudo apt-get install xserver-common=2:1.9.0-0ubuntu7 xserver-xorg-core=2:1.9.0-0ubuntu7 xserver-xorg-core  The following packages have unmet dependencies:  xserver-xorg-core : Depends: xserver-common (>= 2:1.9.0-0ubuntu7.3) but 2:1.9.0-0ubuntu7 is to be installed E: Broken packages   Am I out of options here?

I just upgraded to Firefox 5 to find out that . I'd like to downgrade to Firefox 4 but haven't found a way to do this.  How do you downgrade to Firefox 4 on 11.04?  Thanks in advance.


I'm trying to solve a textbook exercise asking me to show that $G =\langle x, y \space | \space x^2=e=y^2 \rangle$ (where $e$ is the identity) is infinite.  I assume a natural strategy would be to try to show that $xy$, $xyxy$, $xyxyxy$ and so on are all distinct elements of $G$.  If we assume $(xy)^n$, $(xy)^m$ are equal, then we would get that $(xy)^{n-m} = e$, but I'm not sure how to go about showing that this holds only when $n=m$, and hence that every $(xy)^n$ is distinct.  I'd appreciate any help or hints you could offer.

My question is as follows:  Let $G = \langle a,b \mid a^2=b^2=1 \rangle $ be a group generated elements $a, b$ and the equation $a^2=b^2=1$. Prove that $G$ is infinite and non-abelian.  I got the following hint:  Let $\mathbb{F}_2 = \langle x,y \rangle$ be the free group on two letters. Let $H = \langle \langle x^2,y^2 \rangle \rangle$ be the normal closure of $ \{ x^2,y^2 \}$ in $\mathbb{F}_2$, i.e. the smallest normal subgroup of $\mathbb{F}_2$ containing $\{ x^2 , y^2 \}$. Then we have $G \cong \mathbb{F}_2 /H$, induced by the map $\phi : \mathbb{F}_2 \to G$, given by $\phi(x) = a$ and $\phi (y) = b$. If we can show that no power of $xy$ lies in $H$, then that's equivalent to showing that $ab$ has infinite order in $G$. Following from this, it also implies that $(ab)^2$ is not trivial, i.e. that $a$ and $b$ do not commute, showing that $G$ is not Abelian.  I further have some questions:  (a) Why the map $\phi$ is a homomorphism?  (b) To obtain $G \cong \mathbb{F}_2 /H$ we actually need $H \subset \ker\phi$. Why it is the case?  (c) Why no power of $xy$ lies in $H$?  Any help would be appreciated.


The Question:  Let $n=(6t+1)(12t+1)(18t+1)$, where $t\in \Bbb Z$ and $6t+1$, $12t+1$, $18t+1$ are prime, and $(a,n)=1$.  Show that $a^{n-1} \equiv 1\pmod n$.    My Thoughts:  This blatantly looks like Fermat's Little Theorem, but I can't seem to find a way to adapt the proof of it for this question.  In particular, the proof of FLT fails in the last step in this case when you divide by $(n-1)!$:  $$a^{n-1}(n-1)! \equiv (n-1)! \pmod n \implies a^{p-1} \equiv 1 \pmod n$$  is a false statement because $(n-1)!$ is in fact a multiple of $n$.  Any hints?

Suppose k is an integer such that $6k + 1$, $12k + 1$, $18k + 1$ are primes. Show that $n = (6k + 1)(12k + 1)(18k + 1)$ is a Carmichael number.  This is a question on a past exam that I find difficulty to answer. Can anyone help?


I have installed Ubuntu 16.04.1 LTS and then upgraded to Ubuntu 16.10. But it's now bloated with remains of 5 DE and manually installed languages. Also, Pantheon has messed up Unity's GTK files and it's now looking broken. So I want to reset Ubuntu 16.04.1. Can it be done with the ISO??

I think my Ubuntu is a bit broken from messing around with it.  Unfortunately during installation, I did not make a separate partition for /home. Now I need to re-install but want to keep my music and films.  Any ideas...


I'm running a PostgreSQL database server, version 10 on Linux, for multiple users. Today I found out by surprise that any user can see all other users' databases and their tables, columns and other properties, but not the data. I'm wondering why this is the case? Shouldn't a user be restricted to their own databases? Why is this access granted at all and how can I remove it?  The users were created with this command: createuser "user1"  The databases were created with this command: createdb -O "user1" "user1_db1"  I've read something about the CONNECT privilege in the Postgres documentation but I couldn't find out how to list all the privleges that a user currently has. An article suggests revoking all privileges and granting CONNECT only on the user's database. I don't want to do that before I know what other privileges the user possibly has. Also, is this required for each new database created for the user? The documentation doesn't seem to cover this topic at all.

I must be missing something with regards to setting up PostgreSQL. What I'd like to do is create multiple databases and users that are isolated from each other so that a specific user only has access to the databases I specify. However, from what I can determine, any created user has access to all databases without any specific grants being given.  Here is what I do on an Ubuntu Server 12.04:   apt-get install postgresql sudo -u postgres createuser -DRSP mike1 (Specifying the password for the new user) sudo -u postgres createdb data1 psql -h localhost -U mike1 data1 (Specifying the password for the user mike1 to login)   It seems that new user "mike1" has no problem connecting to database "data1" and creating tables etc. And this without running any GRANT command at all (and the owner of "data1" is "postgres" since I didn't specify an owner in step 3). Is this really how it is supposed to work?  What I'd like to do is grant mike1 full access to data1 and then repeat this for more users and databases, making sure that the users only have access to one (or possibly several) databases of my choice.


I have two databases in the same SQL Server instance. One is a test database with a smaller number of records and total size of 500GB. Other one is production database with a size of 2.2 TB. Both database are similar with same database objects. The server is enabled for parallel execution with MAXDOP = 8 and Cost Threshold for Parallelism = 20. There are 40 logical CPUs on SQL Server 2016 Standard edition.  When I run a somewhat complex query that has multiple joins and views, on the production database the query executes fast in parallel mode.  When I run the same query in the test database (on the same instance) the query runs in serial mode. Data in test database is static too.  I do not understand why it is not running in parallel mode.  From my research, since the test database is small compared to the production database, maybe the cost of the query in the test db does not exceed 20 (cost threshold for parallelism). How can I calculate the cost of the query to confirm?  I made the query run in parallel by removing a scalar function and replacing it with an inline function, but the same query runs differently in two identical databases, that is why I am confused. I have gone through the post which explains why SQL Server does not engage parallelism.  Estimated Subtree Cost is different in both. The one running in serial has a low value of 44. The parallel one has a higher value of 312.  Since the parallel one has to deal with more data, its individual node subtree cost is higher and adds up to 312. So maybe cost is the real issue?  My cost threshold for parallelism is 20 and the one running in serial has an estimated subtree cost of 44 (> 20). So shouldn't it run in parallel?

I have a very large query (~630 lines) that involves a lot of nested SELECT statements and pulls from multiple views. Our SQL server has parallelism set to 2 with a threshold of 95 (set that way because our DBA was optimizing it based on some other applications). This query has recently started taking 5-10 minutes to complete, up from usually less than a minute. While investigating the cause, we noticed that it never seems to trigger parallelism, always running serial, and suspect that may have something to do with its performance. What's weird is while experimenting, we even dropped the threshold back down to the default value of 5 seconds, and it still won't run parallel. What could be preventing it?  We've been doing the testing on a non-production environment that nobody else was using at the time, so this was the only query being run. Our DBA also tried things like clearing caches and plans, and even recycling the system, but it had no effect.  Update 1: Per comments, I've verified that stats are updated nightly but the problem persists. We're actually rolling back the code to an earlier version that didn't have such serious performance issues, but will continue to test this code because it was supposed to improve performance over the old code, and actually did in initial testing. Will update here accordingly.


I have tried to do apt-get update in my ubuntu system and has got the following error:  Please help  Hit:17 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease  Reading package lists... Done                                                    E: The repository 'http://ppa.launchpad.net/ubuntu-wine/ppa/ubuntu artful Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.

I am performing an update and its failing on the following:  The repository 'http://ppa.launchpad.net/izx/askubuntu/ubuntu xenial Release' does not have a Release file..   Running a local Ubuntu server 16.04


Is there a way to uninstall all packages that were installed in a span of time between 1 min? I tried using the synaptic package manager but I can't find any filter to be able to check only the packages that were installed at that time.

I installed and removed so many packages on my system.But it don't know when it was installed and when it was removed.  I want to know when the packages are installed on my PC.


I have a machine with Intel(R) Xeon(R) CPU E5520 visible as 16 logical cores (8 with HT). If I run something to eat CPU time (single threaded) top correctly reports 100% CPU usage for the process but only around 3-4% total usage.   Cpu(s):  3.6%us,  0.0%sy,  0.0%ni, 96.4%id,  0.0%wa,  0.0%hi,  0.0%si,  0.1%st    PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND  1567 www       20   0 65632   84    4 R  100  0.0   0:05.96 burnMMX   Surely the reported usage should be ~6.25% (1 of 16 cores).   Is it incorrect because it's a virtual machine?  How could I calculate a correct value?


When rendering a simple video in FullHD right now (one video track, one audio track), the encoding process takes about one second per frame. Let's say I'd like to render a 5-minute clip in 24fps:  5*60*24 = 7200 frames  1s per frame = 7200/60 = 120 minutes of rendering time.  It seems very slow to me. Is there a way to speed up this process? Mabye use different codec? Or maybe I should render to RAW file and then encode it using an external tool? Right now I'm using x.264 coded with default settings.

I'm putting together a video from the VSE. In the sequencer window it is rendering and scrubbing at near realtime yet during output it is taking around 3x longer.   The frames are taking 0.13 seconds each whilst the CPU is only utilised around 20%. I am rendering onto an SSD and using H.264 format 1280x720. Tile size options etc appear to have no or very little effect.  In short - is there any method to speed up the rendering of frames from the VSE?


I've been stuck on this one problem for a couple of days now with no clue on how to complete it. I need to prove the following logical equivalence:  (¬P ∧ ¬R) ∨ (P ∧ ¬Q ∧ ¬R) is equivalent to ¬R ∧ (Q ⇒ ¬(P ∧ ¬R))  If anyone could shed some light on this matter, please..

I am working with Logical Equivalence problems as practice and im getting stuck on this question. Can somebody help?  Im trying to show that The LHS is equivalent to the RHS  (¬P ∧ ¬R) ∨ (P ∧ ¬Q ∧ ¬R) is equivalent to ¬R ∧ (Q ⇒ ¬(P ∧ ¬R))  I have tried this so far:  (¬(P ∨ R) ∨ (¬Q ∧ P ∧ ¬R))  ¬(¬(P ∨ R) ∨ (¬Q ∧ P ∧ ¬R))  (P ∨ R) ∨ (Q ∧ ¬(P ∨ ¬R))  But im unsure how to carry on from here


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.

I have loaded my bike tours as .gpx files into QGIS.    It already looks quite nice but I was wondering if it might be possible to create something similar to the strava heatmap with tools of QGIS.     I have tried to generate points along the lines and use kernel density but it just does not look nice as a raster layer.  Any suggestions?


This is one of the two stories I read as a kid in the 1950's, early 60's which forever locked me into sci-fi.   Spoiler alert! I want to identify a short story about a spaceman who ended up marooned alone on an empty planet of ruins. I recall the planet as desert like, all sand and wasteland and no water, with all the inhabitants long gone.   He finds the ruins of a town and the ruins of a house that still has power and begins to respond to him with water, food, a bed. Slowly he begins to train the house to supply his needs,though it nearly kills and poisons him at first. He is elated to realize he will survive until the rescue ship arrives, never realizing that it is actually he who is changing.   When the ship arrives it ends with him raising his snout to the air and hooting a greeting... something like that.

This is a story that was read on BBC radio about thirty years ago, and this is about as right as I can remember it: The human pilot of a spacecraft is doing some reconnaissance on an alien planet. He crashes but survives. For some reason, no one will know where to look for him. He sees something in the distance that looks like a building of some sort. When he gets there, it seems to be a home. Very much like a human home. There's furniture, but it's strange and uncomfortable . There's food, but it's inedible. There's a faucet but what comes out of it seems more like acid. Everything looks as though it should be right, but it's not. He leaves the house, wanders and after a few days is desperate for water. But there isn't any water anywhere. He's close to death, crawling on the ground and then something happens. There are cracks in the soil and there appears to be water bubbling up from perhaps some underground stream. The water revives him. He goes back to the house and tries the food again. It's delicious and he eats enough to gain back his strength. Then he decides to try the water again. It's pure and wonderful. He takes a shower and the last line of the story is how refreshing the water is on his skin and something about him lifting his tail.


I have joined the Meta Stack Exchange community. Although I have not received any .  How can I get the bonus?

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.


I am rather sure that I set up hibernation correctly, and that the swap file I am using is being recognized and written to when I click hibernate. (/hibernate.img) In the corner of the screen, it says system snapshot, compression ratio, etc.  However, when I resume from hibernate, the top left corner reads "resuming from hibernate.img" but then the system just freezes. Every time.  Some of the tutorials mentioned using a specially compiled kernel, and I have not done this. The kernel is simply 3.2.0-25-generic.  I am using 12.04 64-bit. Any help would be great.

I have configured a new Ubuntu installation in a Notebook to use a swap file, instead of using a swap partition.   By default is not possible to get Ubuntu to hibernate using a swap file, so I tried , but it is specific to grub1, and Ubuntu now uses grub2.   Does anybody know how to do this?


I am planning to buy my first off-camera light equipment.   And am confused between a flash & an always on light source.  Can someone point me to a good online resource or share their experience?  My use cases   Outdoor portrait shoots  Studio like shoots indoors   Thanks!

If one were to want to get started with studio photography (I'm thinking things like portraits, headshots, perhaps pets, etc) what would be the considerations in choosing whether to go with continuous lighting vs. strobes for the lighting equipment?


I've got a gpkg file with country borders and I'd like to draw a dashed line for those borders. However, when I set the style as a dashed line in QGIS I get this:  The problem is that the overlapping portions (the vertical section above where the dashed line looks almost solid) show up incorrectly. Is there an easy way to fix this with QGIS/GDAL/something else?

Layers like municipalities, countries,... have features sharing the border of their neighbours: they share the same vertices (except for the features at the edges off course). I have a municipality layer, which I set with a dashed stroke style. However, for adjacent features, the borders are displayed as a solid line (see picture)  How can I display all borders with a dashed stroke style? Now it seems to overlap.