I am trying to draw a wheel-like figure like this. I had used xfig.    I wonder whether I can also use LaTex tikz or other ways to get similar figure with the additional criterion        the area enclosed by the four red rectangulars/squares --- should have been filled in with a gray shaded but still transparent color (like tunable transparency 10%, 30%, 50%, 70% for each wing of the 4 wings of the wheel) or so.      Do any experts know how to do this?  Thank you! (I will accept the answer very soon)

I have a large collection (hundreds) of partially quite old xfig pictures. Though I really like the xfig program I would like to move to some more up-to-date picture format like TikZ. So I would like to ask if someone has a good idea for an automatic conversion tool. Ideally, some shell srcipt or so... Then problem (?) is that many of the xfig pictures have LaTeX overlays. EDIT: this might be too long for a comment on Mark's answer, so I post it here as an edit: Here is a sample of a xfig which simply produces an error FIG 3.2  Produced by xfig version 3.2.5b Landscape Center Metric A4 52.00 Single -2 1200 2 3 0 0 3 0 7 50 -1 -1 0.000 0 1 0 3 1 1 4.00 60.00 150.00 7650 3375 6975 4275 7650 5625 0.000 1.000 0.000  the script gives some tikz command requesting an error  Package pgf Error: Arrow end type ``triangle 45'' unknown.  So, of course, I can edit now by hand several arrows and so, but I would like to have it more automatic... :(


I find it rather hard to travel through my system using nautilus and much prefer using the cd etc commands in Terminal to get around my system, but I find that sometimes I do need to look at a list of files and folders in nautilus as ls just isn't doing it for me and maybe there is such a large number of files that it would be much simpler if I could just have them all listed in a GUI instead of having to get ls to redirect the output into a file that I would then have to read.  But then what I find is that I have very quickly found the location of the directory which contains the files I want, in Terminal, and then I have to go back into nautilus and slowly move to that location through the GUI, so I am wondering if there is any way in Terminal, once you have used cd to get to your target directory, to launch nautilus and have it auto-navigate to that location (so that it opens the directory you have used cd to get to in nautilus)?    OS Information:  Description:    Ubuntu 14.10 Release:    14.10   Package Information:  nautilus:   Installed: 1:3.10.1-0ubuntu15.1   Candidate: 1:3.10.1-0ubuntu15.1   Version table:  *** 1:3.10.1-0ubuntu15.1 0         500 http://gb.archive.ubuntu.com/ubuntu/ utopic-updates/main amd64 Packages         100 /var/lib/dpkg/status      1:3.10.1-0ubuntu15 0         500 http://gb.archive.ubuntu.com/ubuntu/ utopic/main amd64 Packages

I was wondering if anybody knew a command that would allow me to open a Nautilus (if that's the right name for the Ubuntu graphic/window explorer) window from the command line at the current directory that the user is at.  So, if I open a command line, and type:  cd /home/myUser/some/long/path/to/a/directory   Then, I'd like to be able to issue some command:  nautilus open-sesame   And have a graphic window opened to /home/myUser/some/long/path/to/a/directory. Is this even possible?


I just got a new Yosemite HD. I am trying to get a page count on my pages documents. The directions say to go to the box in upper left corner, select 'word count' and select 'page count' on the pull down menu but all I ever see is '425 word count' on any document. No pull down menu and beyond changing to 'show' or 'hide' nothing else happens. Thanks for any help given.

I often write short articles and am limited to 100 words per document.   Can I find word counts in pages 5.2.2?


My girlfriend once had a friend pop round her house and he brought his friend with him (both male). I replied "txt me when they're gone and I will come round," as it was early days in our relationship and I am little jealous and we had a minor falling out over something.   She sent me a txt saying "they have gone" and a couple of unrelated things. At the end of the txt she said "I have butterflies."   I see the expression having butterflies to mean you fancy someone or have a crush on them. I wouldn't want her to have a crush on her other friends: is that what "having butterflies" means?

How did the phrase "butterflies in stomach" originate or what is the story behind this phrase?


I would like to create a circuit in which a Reed switch is able to switch current between two LED. Is this possible without any IC or others components?  One led is on and one off, until the Reed switch is activated. I saw this working with 2 different load (led and lamp / led and motor) and I'm thinking If the same is possible with 2 LEDs.  5V used in the circuit.  I know there are 2 kind of Reed switch, and I do not care about which to use if it solve the problem. I anyway prefer to use the NO one.

this circuit is a occupancy light circuit i want to know the working of the transistor regarding base,collector and emitter in the transitor


I'm currently trying to store 5 user input values into an array of size 5. I'm having trouble looping the scanf and printf functions into my loop as well as storing the values into an array. I've tried debugging, but am unsure on where to put the breakpoints. .data .balign 4 m1: .asciz "User number:"  .balign 4 scan_p: .asciz "%d"  .balign 4 number_read: .word 0  .balign 4 return: .word 0  .balign 4 a: .skip 20  .balign 4 i: .word  .global main main:         LDR R1, address_of_return                STR LR, [R1]                                      LDR R3, addressOfA                  LDR R4, addressOfI         MOV R5, #0         STR R5, [R4]  loop:         LDR R5, [R4]         CMP R5, #5         BEQ end                  ADD R6, R3, R5, LSL #2          LDR R0, address_of_m1              BL printf                                 LDR R0, address_of_scan_p          LDR R1, address_of_number_read           BL scanf                                  STR R1, [R6] // Store a[i] = *address_of_number_read                                                  ADD R5, R5, #1         STR R5, [R4]         b loop  end:         LDR R1, address_of_return         LDR R1, [R1]         BX LR  address_of_m1: .word m1 address_of_scan_p: .word scan_p address_of_number_read: .word number_read address_of_return: .word return addressOfA: .word a addressOfI: .word i  .global printf .global scanf  Getting a segmentation fault 139

It's been a while since I last coded arm assembler and I'm a little rusty on the details. If I call a C function from arm,  I only have to worry about saving r0-r3 and lr, right?  If the C function uses any other registers, is it responsible for saving those on the stack and restoring them? In other words, the compiler would generate code to do this for C functions.   For example if I use r10 in an assembler function, I don't have to push its value on the stack, or to memory, and pop/restore it after a C call, do I?  This is for arm-eabi-gcc 4.3.0.


I'd like to correlate such variables as:  X- 1.Unemployed, 2.Student, 3.Employed, 4.Pensioner  Y- Knowledge marked as points from 0 - 16.   I want to see if any of these groups have tendency to score higher points from each other. Which test should I use? Is there an online calculator I could put the data in?

I have a nominal variable (different topics of conversation, coded as topic0=0 etc) and a number of scale variables (DV) such as the length of a conversation.   How can I derive correlations between the nominal and scale variables?


I have a link on my page, that if clicked, will generate a popup via Ajax. (The popup code is not under my control)  Now i want to Add functionality, via my code jQuery, on a link of this popup.  This popup is not printed in source code after page is loaded. Obviously the jQuery can't find this link.  How can i do, to add a click() trigger functionality on this link in this ajax popup?

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


By using the complex representations of sine and cosine, show that $$\sum_{m=0}^n\sin m\theta =\frac{\sin\frac{n}{2}\theta\sin\frac{n+1}{2}\theta}{\sin\frac{1}{2}\theta}$$   So I am not too sure how to go about this proof. I tried to substitute sine for its complex representation but I can't see how to evaluate the sum?

How can we sum up $\sin$ and $\cos$ series when the angles are in arithmetic progression? For example here is the sum of $\cos$ series:  $$\sum_{k=0}^{n-1}\cos (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \cos \biggl( \frac{ 2 a + (n-1)\cdot d}{2}\biggr)$$  There is a slight difference in case of $\sin$, which is: $$\sum_{k=0}^{n-1}\sin (a+k \cdot d) =\frac{\sin(n \times \frac{d}{2})}{\sin ( \frac{d}{2} )} \times \sin\biggl( \frac{2  a + (n-1)\cdot d}{2}\biggr)$$   How do we prove the above two identities?


My refusal letter states that I provide more information on where my monthly expenditure of £200 comes from, I though did explain in my application letter that I am a student and all my support comes from my uncle since he sponsors me throughout my university education. The monthly expenditure is what I use to get by as a student whilst in school. I got a letter of sponsorship from him explaining he will cover my costs.(bank statements included)  As I reapply what other information or documents should I provide to satisfy the ECOs and what mistakes should I watch out for?

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


I am trying to use the (lowercase) lambda from the stix package without using the rest of stix. There is this question: . But I do not know how to get lower case lambda.  The code \renewcommand{\lambda}{{\usefont{U}{stixextrai}{m}{n}\symbol{3}}} gives capital lambda, and there is a list of codes here: . However, I cannot seem to find the right number for the symbol I want.  Does anyone know the number/have a list of the numbers for symbols? Thanks in advance.

Is there a general way to change the font of a particular symbol without switching packages?  For example, suppose I'm using Computer Modern for my entire document, but I want the "subset" operator to look as it does in mathabx.  How can I redefine it to appear in this way?


I have downloaded a shapefile of Stockholm . I'm trying to convert the shapefiles to GeoJSON with the ogr2ogr command line tool. It does not work with the following error:     Export to vector file failed.   Error: creation of data source failed (OGR error:Failed to create GeoJSON datasource: test.geojson.)   The method that I'm using is as follows:   Open the Adm.shp file as a layer in QGIS Right click on the layer and select "Save as..." Save as GeoJSON   I've tried using different projections and such without success. Does anyone have an idea what could be wrong?

I'm trying to convert Shapefiles from the  website into a GeoJSON file for use with Google Maps API. I'm using QGIS to facilitate but I can't get the projection/coordinates right. So far I've tried Google Mercator (EPSG:900913) and WGS 84 (EPSG:4326) with no luck. I'm using the OpenLayers to verify results and it keeps placing Texas near the  Gulf of Guinea (0 lat, 0 lng).


TL;DR Version  Can you explain the concept of dependency injection to an 'enthusiast programmer' with a fundamental understanding of programming. i.e. Classes, functions and variables.   What is the purpose of dependency injection, is it purely a readability / ease of programming concept or does it provide compile time benefits also?  My original more waffly version!   My coding skills are reasonably rudimentary. (it isn't my primary skill, but it does sometimes come in handy to proof of concept something) I can hack stuff together and make things work, but I'm always perfectly aware that there are a host of better / more efficient ways of doing things.   Primarily I bounce things around between functions and classes and variables! (like what I learnt on my c64 a long time ago!)   Dependency injection seems to be everywhere lately, and while I think I kind of get it, I feel like I'm missing a point (or something)   The problem seems to be when I try to google around to understand what it is at a fundamental level, it very quickly gets very complicated and my head hurts (I'm a bear of very small brain and big words confuse me!)  So I'm hoping someone can explain dependency injection to a five year old! What is it, why do I need it, how does it make my coding better. (ideally working in concepts of functions, classes and variables!)   This is largely language independent, it seems to be a thing that all languages use, but my language of choice is usually C# (typically ASP/MVC though some native Windows / Console) though I've recently started poking around with Nodejs also.   Actually it seems this is a duplicate of this question -    (which fared much better than my version! - that's what I get for waffling)

There have been several questions already posted with specific questions about , such as when to use it and what frameworks are there for it. However,  What is dependency injection and when/why should or shouldn't it be used?


I have written a condition in code where if the value of Object is null, it should initialize a new object, but I am getting null pointer exception at the comparison statement itself. as per my knowlwdge we van compare two null values. Not sure what a I missing. Below is my code public class TrieNode {    static final int Alphabet_Size = 26;  class Tried { Tried children[] = new Tried[Alphabet_Size]; boolean isEndofWord;     Tried()    {      isEndofWord = false;      /*for(int i=0; i<Alphabet_Size; i++)                   children[i] = null; */             } };  static Tried root;     public void insert(String key)  {   Tried note = root;   int index;   int itr;    for(itr=0; itr<key.length(); itr++)  {         index = key.charAt(itr)-'a';                  if(note.children[index]==null)       // Getting Null pointer Exception here         {             note.children[index] = new Tried();         }          note = note.children[index];   }   note.isEndofWord = true; }        public boolean search(String key)     {   Tried note = root;   int index;   int itr;    for(itr=0; itr<key.length(); itr++)  {   index = key.charAt(itr)-'a';     if(note.children[index]==null)        return false;          note = note.children[index];      }       return (note!=null && note.isEndofWord); }   public static void main(String[] args) {   TrieNode tr = new TrieNode();   String keys[] = {"the", "their", "Aakash", "Aayush"};    for(int i=0; i<keys.length; i++)    {     tr.insert(keys[i]);    }   }  }  I Have tried adding null values for all the indexes in array(see the commented part of code) but even that is not helping

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?


Why doesn't new return NULL on failure? Why does it throw an exception only on failure?  As it returns a pointer to the object on successes, why not on failure? Is there any specific reason for this behaviour?

I know that according to C++ standard in case the new fails to allocate memory it is supposed to throw std::bad_alloc exception. But I have heard that some compilers such as VC6 (or CRT implementation?) do not adhere to it. Is this true ? I am asking this because checking for NULL after each and every new statement makes code look very ugly.


I would like to typeset something like     f \colon X \leftrightarrows \mcolon g   where \mcolon is a mirror-image of \colon as regards spacing. How would I do this?

Using \colon gives correct spacing for a map $F\colon C\to D$ in one direction. But writing $L\colon C\rightleftarrows D\colon R$ for a couple of maps in both directions (e.g. for an adjunction) gives disturbingly asymmetric spaces near first and second colons (like if D were a map from R, not the other way round). Probably, it should be fixed (e.g. some other command should be used) — but how?


For me, Stack Exchange is the best thing since , and I want to know more about Stack Exchange. What's the programing language of Stack Exchange?

What tools and technologies are used to build the Stack Exchange Network?  See also:


So I have a UTF8MB4 database on phpMyAdmin for MySQL, and I'm using PDO in PHP for interacting with my database, and I really want to know, just to be 100% sure that the 'bindValue' function really escapes data, I've heard that the SQL Query and the data is sent differently but I want to know if it's true, is there any way 'bindValue' can be bypassed where SQL injection can occur?  Example Code:  $db = new PDO(...);  //Notice how I'm not sanitizing $_GET, is this okay? $query = $db->prepare("SELECT * FROM table WHERE Username = :username"); $query->bindValue(":username", $_GET["username"]); $query->execute(); echo "Rows: " . $query->rowCount();  while($row = ...) {     echo $row["Username"]; }

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I'm photography enthusiast, But I'm unaware of the difference between my camera's macro mode vs zooming in with a telephoto zoom lens  What difference does it make when I zoom in with a telephoto lens onto a small flower, vs just switching into Macro mode in the camera to take the picture of that small flower?  Could someone please clarify?

Background  I have a Panasonic DMC-FZ20, however I would imagine this question applies to most point-and-shoot cameras with a built-in macro mode.  I accidentally left my camera in macro mode while taking some landscape shots today. Most of the pictures look "ok" from an initial glance, but I wonder if I actually have lost any potential sharpness in these images due to my mistake.  Question  In light of the above I'm curious as to what macro mode actually does in cameras such as mine. Is it perhaps simply biasing the auto-focus, or is something else mechanical happening in the lens?


I'm working through Stanley's enumerative combinatorics textbook and am stuck on the following problem:   Fix $ n \in \mathbb{P}$. In how many ways (as a function of n) can one choose a composition $\alpha$ of $n$, and then choose a composition of each part of $\alpha$.  My approach was to use that there are $2^{n-1}$ compositions of $n$, and then the composition is $n=a_1+...+a_k$ so that I can pick $2^{a_i-1}$ compositions for each one, so that I have a total of 2^{2n-(k+1)} compositions.   The only thing is that I have this k inside of my function which is independent of n.   Any ideas on how I can fix this?

Fix $n\in P$. In how many ways (as a function of n) can one choose a composition $\alpha$ of n, and then choose a composition of each part of $\alpha$?


So preface, I work in engineering so I'm familiar with the basic principals of most fields in physics, but specialise in Civil Engineering so my knowledge of thermal physics is poor and I haven't studied it since high school.  I have this recurring problem at work where I boil a kettle and pour myself a cup of tea. During the brewing process, I sometimes get interupted by a collegue who wants me to solve a quick problem, taking no more than 10 minutes of my time. I like to drink my tea at my desk while browsing the web so my tea will sit untouched for this time. I take my tea with milk.   So my question:  If I have already brewed my tea and have 10 minutes or so where I know I will not be able to drink it, should I;  1. Add the milk immediately after brewing   2. Add the milk immediately before drinking  To maximise the temperature of the drink at the time of drinking.     To me this is a closed system and it shouldn't matter what temperature the tea is when the milk is added as the same amount of time will elapse overall and the start values for each liquid is the same.  But also if I add the milk early, it has more time to 'warm up' from fridge temperature.  But if I don't add the milk early, then the tea is at a higher start temperature and intuitively to me will drop in temperature at a faster rate.   The tea can probably be assumed to be at around 95C at the start and the milk 4C from the fridge.

This is a bit of dispute between work colleagues. An answer would be greatly appreciated.  My argument is as follows:  If you add X amount of milk at a temperature of M to a mug at room temperature R before adding X amount of water at temp W, the result would be a cooler cup of tea than if you'd added the hot water first. This would be due to the milk reducing the overall temperature of the mug in the time that has been in it resulting in the addition of boiling water having less of an effect and resulting in a slightly cooler cup of tea/coffee.   Conversely, if you add the hot water first, due to the mug being heated, the effect of adding the cool milk will be less and therefore the end result will be a hotter cup of tea.  My Colleagues arguement is simply that it would not make a difference but without any form of justification.   If anyone can give real scientific light to this issue it would be greatly appreciated :)


With millions of users searching for so many things on google, yahoo and so on. How can the server handle so many concurrent searches? I have no clue as to how they made it so scalable. Any insight into their architecture would be welcomed.

I'm trying to build a web application that is similar to Youtube (it's not a knock off), but I guess I don't know how video is served on the internet very well.  I know how to build regular database driven web applications, but nothing like the scalability of Youtube. All of the applications I have built before have all been run on one server with the files stored on the same box as the web server.  How does one decouple the application server from the file storage from the media server? I would more or less want four machines (clusters of machines):   Application servers -- Present the web page, handle user uploads, link the user's flash player to the correct media server etc. Database shards -- Store user information, check favorites, etc. File storage -- Store the media files Media servers -- Serve the media files   How do I hook all of this together? Which technologies should I leverage? Where do I go to learn more about architecting this?  How does Youtube's embeddable flash stuff work? I want to embed my flash player on other websites and have it tie into my architecture.  Note: I have looked into:   But I still don't get the overall picture of how this stuff ties together. If someone can explain in high level terms how all of this stuff works?  Are there dedicated client servers running internally to shuffle around all of this stuff between the application servers, file storage, etc. Is it all via HTTP using JSON, what is going on here!  Thanks!


Consider this problem: Let $(X,d)$,$(Y,\rho)$ be two metric spaces (no further hypothesis). Prove a function $f:(X,d)\rightarrow (Y,\rho)$ is continuous if and only if for every compact $K\subseteq X$ the restriction of $f$ on $K$ is continuous.    Now the => part is fairly simple since the restriction of a continuous function is also continuous.  What about the <= part? If we choose a convergent sequence $x_n\rightarrow x$ we need only show $f(x_n)\rightarrow f(x)$, but how does compactness come into play?

Let $(X,d)$ be a metric space,then prove that $f$  is continuous on $X$ iff $f$ is continuous on every compact subset of $X$.   If $f$ is continuous on $X$ then its restriction on each compact subset will be continuous, and conversely if $f$ is continuous on each compact set then for $x\in X$ the set $\{x\}$ is compact and thus $f$ must be continuous at $x$ , as $x$ was arbitrary $f$ will be continuous on $X$.


Let $$ Tx(t) = \int_{0}^{1}K(t,s)x(s) ds, \quad x\in C[0, 1],  $$ be an operator, where $K(\cdot,\cdot) $ is a continuous function on $[0,1]\times[0,1]$. Prove that $T \in \mathcal{L}(C[0,1])$ (bounded linear) and calculate the norm of T.  I would like to ask you for some help as I have no idea how I should approach the problem, the operator topics seem somewhat abstract to me.   (There is no norm candidate provided as opposed to other problems you may find, I would like to know how to figure out one, and as far as the first part of the question goes, does it suffice to show either continuity or boundedness? Which one is easier, intuitive? I would appreciate some explanation.)

If we define on $C([0,1])$ the operator $$ Tf(x) = \int_{0}^{1} K(t,s) f(s) ds$$ where $K$ is a continous function on two variables. I want to show that:  $1)$ $||T|| = \displaystyle\max_{t} {\int_{0}^{1} |K(t,s)| ds} $  $2)$ When $K(t,s) = \displaystyle\min(t,s)$, to prove that $T$ is compact  Thanks.


In MATE there are default shortcuts to switch workspace, by default Ctrl+Alt+arrows keys in the shortcuts manager.  I would like to add other shortcuts to switch workspace (Ctrl+Alt+hjkl)), while keeping the original ones. For this I need the command which is run when we switch workspace.  Does anyone know it?  EDIT: I found a way to switch workspaces from the terminal (wmctrl -s $(wmctrl -d | grep "*" | awk '{print $1+1}')), but it does not work with shortcuts. I open a .  EDIT 2: @Zanna, @N0rbert, @EricCarvalho, @karel, @DavidFoerster: before marking this question as duplicate, did you read both questions !? And did you saw that I ask both questions ?  I asked here, if there was a command to switch workspace, and danzel helped me to find it (not you Zanna, is it why you marked it as duplicate !?). But this command did not work with shortcuts. The other question is "how to make this command work with shortcuts" ?  So yes I think both are different !

As explain in this , I want to add shortcuts to switch workspaces (in Mate).  I found a way to switch workspace for the terminal: wmctrl -s $(wmctrl -d | grep "*" | awk '{print $1+1}').  But this command line does not work when I add it in the shortcut manager. Does any one know why ?


Is there a button in QGIS that will allow me to create parallel lines?  I do not mean by using a script, or distance from.   I usually use ArcMap, and in ArcMap you just begin editing, select parallel lines, and click on the line you want to parallel from.  There is also a perpendicular and right angle option. I use these a lot at work to create "perfect" lines around buildings.  Can you do this in QGIS, and if so how do you do it?  The question, "Creating parallel lines at particular distance from lines which are part of a shapefile," does not answer my question. I do not want to do distance from.  In fact I do not want to parallel form line features.  I want to parallel form polygon Features.  Say I am drawing a square with a polygon, I want to be able to make the first line of the square, then right angle from that line, and then right angle until I complete the square.  (Making a perfect square)    Now that I have made a square around a building, I need to draw the boundary of the site.    So I would start by paralleling off of the building lines.    I do this at work on ArcMap all day.  It creates beautiful maps for my clients.  I am trying to find out if I can do this on QGIS.    Again, this is editing polygons, not lines. In ArcMap this editing tool is a toolbar called ****Feature Construction****

I am using QGIS 2.18 . I have shapefile which contains multiple lines. After processing certain data processing , I need to draw parallel lines at different distances from existing lines. For example I have 32 lines in existing shapefile. I want to draw parallel lines at distance of 50, 100, 170, 500,400 from line ID no. 3 ,6,20,25,31 in one go. Is there any method or plugin in QGIS for doing same?


I am looking at my reputation today, it shows on my reputation tab that I got 295 rep today, here is the image:  As you can see, I got 295 reputation, but when I look at my achievements drop-down in the top right corner, it shows that I only got 291 reputation, as you can see below:  I personally think this is a bit confusing... I don't think it's meant to be like this, right??..

I've noticed this a few times where the reputation in the user dropdown    doesn't match the reputation in the user profile    It doesn't appear to be a caching issue, and I've refreshed plenty of times.  There have been similar problems brought up on Meta before, but this seems different.  Edit: The -30 difference appears to be because in the User Profile some rep that was marked removed is subtracted out, but it's not subtracted out of the dropdown reputation.


I was issued a Schengen visa for 90 days validity with multiple entry. Initially I planned for tourism to France and Switzerland and accordingly I have written the purpose as tourism only and I will be travelling as well for a week and coming back to India. First I am using for tourism for one week and travelling back to India.  Now, I also need to travel again to Schengen area to the same countries for business purpose for one week again. Can I use the same visa or do I need to get a new one?

I am holding an Indian passport. I have a multi-entry Schengen visa which is valid for 6 months. I am planning to travel in mid Feb to Spain (on a business trip) via Netherlands for a week. On my way back I am planning to stay in the Netherlands for 4 days as a tourist. Do I need to apply for a tourist visa or can I use the Schengen visa which I applied for Spain?


I'm referring to the popover menu that opens when clicking the little down arrow next to the file name in some apps.  I use that extensively—it would be convenient if there were a keyboard shortcut to open it, but I haven't found one yet.

Preview shows the currently opened document’s name in its title bar. When hovering over this name, a arrow appears at the right. After a click, there is a dialogue where you can chance the file name, the file tags, the directory and set the file as protected. This is quite handy if you want to add a tag without opening the file's preferences from the Finder view.  How can I open this dialogue using keyboard shortcuts?  Thanks for help.


I am studying the proof of the density function of the normal distribution. In one of the steps, the demonstration goes from $\int_{-\infty}^{\infty}\int_{-\infty}^{\infty} e^{-(y^2 + x^2)/2}dydx$ to $\int_{0}^{\infty}\int_{0}^{2\pi} e^{-r²/2}rd\theta~dr$ The explanation is that the author changed variables to polar coordinates: $x = r\cos\theta$, $y = r\sin\theta$, and $dydx = rd\theta~dr$ My question is: how did it come to $dydx = rd\theta~dr$ ? I tried the following: $\frac{dx}{d\theta} = -r\sin\theta$ $\frac{dy}{dr} = \sin\theta$ $\frac{dx}{d\theta}\frac{dy}{dr} = -r\sin\theta \sin\theta = -r\sin^2\theta$ $dxdy = -r\sin^2\theta d\theta dr$ I do not know how to go from $-r\sin^2\theta d\theta dr$ to $rd\theta dr$. Someone could help me to see where I am doing it wrongly?

I get the graphic explanation, i.e. that the area $dA$ of the sector's increment can be looked upon as a polar "rectangle" as $dr$ and $d\theta$ are infinitesimal, but how do you prove this rigorously?    1. Geometrically, the exact area would be $$\frac{(r+dr)^2d\theta}{2} - \frac{r^2d\theta}{2}$$$$= (r + \frac{dr}{2}) dr d\theta  $$$$= r dr d\theta + \frac{dr^2 d\theta}{2}.$$  How do we get rid of $\frac{dr^2 d\theta}{2}$? Is it too insignificant in value compared to $r dr d\theta$ so that it vanishes? If so, is it the reason it gets ignored? And what's more, geometrically speaking, why would the two areas - $dx dy$ and $r dr d\theta$, be equal?  2. Approaching it algebraically, setting $$x = r\sin\theta$$$$y = r \cos\theta$$  gives $$\frac{dx}{d\theta} = r\cos\theta,  dx = r\cos{\theta} d\theta$$$$ \frac{dy}{dr} = \cos\theta,  dy = \cos\theta dr. $$  Multiplying both equations, side by side, gives $$dxdy = r\cos^2\theta dr d\theta.$$  Again I get an extra term, which is $\cos^2 \theta$. In both cases I am unable to derive that $dxdy = rdrd\theta$.  What do I do wrong in my reasoning? It all makes me think that I'm getting something essential terribly wrong.


I'm on a fresh installation of Ubuntu and planning to install i3wm. Unfortunately, the brightness is completely stuck on the maximum, rendering it basically torture to use during the night. Neither the brightness keys on my keyboard nor the brightness slider on the top right dropdown do anything. The brightness keys do show that the brightness is decreasing on the slider but it doesn't actually change at all. Please help! I'm using a Lenovo Flex 5 14. Edit: It's definitely not the laptop itself's problem because the brightness buttons worked when I was on Windows and when I shut down the computer, the space around the Shut Down prompt is darker.

To work around  (changing LCD brightness via hotkeys impossible), I'd like to have one command line query for increasing and one for reducing the brightness of my LCD. I could then map a hotkey to each one of this queries.  The problem is: I don't know how to increase and reduce the LCD brightness on the command line. Do you?


I have some files inside a directory structure with multiple folders that have more than one dot. For example, "x.y.jpg" or "x.yz.01.jpg". How can I   list all files with more than one dots in their names in the directory structure and delete the extra dots except the one before the extension?   Please note the extensions vary among one, two and three letters.  I was hoping I could do this with a windows script.

I have about 3500 recorded phone calls and they are all labelled   yyyy_mm_dd_hh_mm_mobilenumber.3gp  I want to remove the underscore from the name so searching through them is easier  How would I do this, i.e which program or caommand is the easiest to do this.  I am using Windows 7.


Yesterday, I placed a Zygarde on the GTS, and I asked in return for a Ho-oh. To my surprise today, I got the Ho-oh, it was shiny, and it had 5ivs! (all in the good places!)  I checked to see the Ho-oh's summary, and it said     Travelled from time and Space from Johto to get to Kalos   What does this mean? is my Ho-oh (gulp) ..not legit?

I have been playing Pokemon Diamond a few years ago and I remember that I have some pokemon which were cheated. A while ago I purchased Pokemon Black 2 and Pokemon Y and wanted to get all my old pokemon to the newest edition, in this case Y.  Before doing so I would like to find out which pokemon were legitimately catched or acquired via events and which ones were cheated. Is there any service or way to do so?


I can't seem to be able to prove Kuratowski's Theorem using the Axiom of Choice, although they are equivalent assertions. Kuratowski's Lemma: Every partial order has a maximal chain. Axiom of Choice: For every set X of disjoint nonempty sets there exists a set Y such that for every set $Z \in X, Y \cap Z$ is a singleton. My attempt: Consider any chain $C_0$ of the partial order. If $\exists x \in X \setminus C_0$ which is comparable with some element of $C_0$, let $C_1 := C_0 \cup \{ x \}$. Iterate this process . If at some point we cannot find such an x, then we have found a maximal chain. Suppose we can find such an $x$ infinitely, then the sets $i\geq 1 \Rightarrow X_i := C_{i+1} \setminus C_i$ are disjoint singletons. Hence by axiom of choice there exists $Y$ for which $X_i \subseteq Y$. Inorder to finish the proof, I need to prove something of the form "If a is comparable with some element of $C_0$, then $\exists j$ s.t. $a \in C_j$". I can't seem to prove this. P.S: x is comparable with y iff $x R y \lor y R x$.

I need to show that Hausdorff Maximal Principle is equivalent to the Axiom of Choice. Suggested is to use Tukeys Lemma.   So far I have that Hausdorff Maximal Principle states that whenever < is a strict partial order of a set A, there is a maximal chain C $\subseteq$ A.   and  Tukeys Lemma states that $F \subseteq P(A)$ is of finite character if and only if for all $X \subseteq A : X \in F$ iff every finite subset of X is in $F$.   This is coming from my book Kunen Foundations of Mathematics.   I also understand a chain to be a totally ordered set, if for all x,y, in X, either $x \leq y$ or $y \leq x$. A chain has at most one maximal element.   I am really stuck on how to relate these two to each other. I think I have an idea of how to show equivalence from Tukey's Lemma to Axiom of Choice. But I am stuck when it comes to showing that the Hausdorff Maximal Principle is equivalent to Tukeys Lemma. Any help or references is greatly appreciated. I have also been reading up on this website:


is there any way to replace lubuntu with ubuntu 14.04 or 15.04 in a dual booted device (windows 8 and lubuntu 13). when i searched some answers told me to desable secure boot, but i cant see it in my bios. please help.

I know this may sound stupid, but I was having a problem with my ubuntu, it wasn't loading.   So I was googling solutions and one of them was purging something and installing something   so I did it. The proccess took a couple hours, and it didn't work. It turns out it was something to do with my graphics card (which I fixed), but when I loaded it up, I had lubuntu.   Is there any way of reverting back to ubuntu?   Or is lubuntu better to keep? I have no idea, please help.


I am fairly new to photography and I have read many "beginners guides" and watched youtube tutorials. One thing that remains elusive to me is how to properly pick what f-stop to use.   I use a 35mm, 55mm f1.8, and a 24-70mm f4 lens with my Sony A7.   For portraits, I generally try to pick lower f-stop like between (1.8-6f). For more general use like taking pictures of animals I usually pick between (6f-10f).   The issue I primarily run into is that when I take a picture with a lower f-stop, it looks great in my viewfinder. However when I go home to load it on a larger screen, I find that a lot of elements I am trying to capture is actually out of focus.   How do I know how much room I have to play with before a subject goes out of focus? It seems to change with f stop, how close I am to the subject(s), and the focal length I am using.   I understand the concept that I am basically focusing on a "slice" of space in front of me and when I lower the f-stop, this slice of space becomes narrower. I can't figure it out and I end up getting disappointed when I view the pictures on a large screen.

I can use a DoF calculator, or crunch the heavy math by hand if I really want to know exactly what my DoF is going to be... but most of the time knowing exactly is actually overkill, and taking the time to pull out a DoF calculator is impractical. I'm wondering if anyone knows of a 'rule of thumb' that is common for quickly figuring out a rough estimate of what my DoF will be when I'm in the field...


I have installed BY ITSELF Ubuntu into a computer (replacing Windows 8 altogether). There is no other operating system in this computer. Now I want to remove it and reinstall windows 8 and I have no idea how to do it. this is NOT a dual boot system. For the time being Ubuntu is the only operating system in it. Everything I have read so far points to removing from a "Dual Boot" system.This is not a dual boot system I have. It only contains Ubuntu, which I would like to remove.

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


I would like to generate an output similar to the one that can be found in the foto, any ideas?

Since I have only little experience in Latex, I'm not sure how to create a specific table as shown in the example screenshot. Is such a table even possible with Latex and if yes, where do I need to start? Or is the layout maybe not the best choice and I should setup the layout of the table in another way?


A geometry student wants to draw a triangle inscribed in the ellipse $x^2+4y^2=16$. What is the area of the largest rectangle that the student can draw?  I know the final solution is $16$, but I am not sure of how to get that answer.

The actual problem reads:      Find the area of the largest rectangle that can be inscribed in the ellipse    $$\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1.$$   I got as far as coming up with the equation for the area to be $A=4xy$ but then when trying to find the derivative I don't think I'm doing it right.


3:2 feels more suited for the modern way of watching photos, like on a laptop or any form och wider screen model. Why do they keep making the 4:3 ratio?   - This is an excellent thread, and I have both read and upvoted it since it takes the historical part behind this in to exceptional depth.  Why do they keep using this 4:3 ratio? Is there something blocking compact cameras from using 3:2, like their size?

The most common width to height ratio rates in the "old good" paper photography seems to be 3:2, which was adopted by today's DSLRs. Early (non-professional) digital cameras adopted 4:3 aspect ratio, which was the industry standard for computer monitors and for consumer TV sets. Prints are often 5:4 (as in 4"x5" or 8"x10"). Wide-format monitors are 16:9. Does anyone have any idea where and why these aspect ratio conventions were adopted in the first place?


What is the effect of increasing your ram in blender?  Especially in the speed of rendering

What would reduce the render time? Should I get a better GPU or more RAM?


I have created a singleton class, And Here is code  static DPGameManager *sharedManager = nil;   + (DPGameManager *)sharedManager   {       static dispatch_once_t singletonPredicate;       dispatch_once (&_singletonPredicate, ^(){                sharedManager = [[DPGameManager alloc]init];   });   return sharedManager;   }  DPGameManager *m1 = [DPGameManager sharedManager];   DPGameManager *m2 = [DPGameManager alloc]init];   DPGameManager *m3 = [DPGameManager alloc]init];     m1, m2, m3 are three different objects.     But we should not be able to create three different object  for a singleton class.     How can we achieve this.?      Or is This fine to create different object for a Singleton class.

My singleton accessor method is usually some variant of:  static MyClass *gInstance = NULL;  + (MyClass *)instance {     @synchronized(self)     {         if (gInstance == NULL)             gInstance = [[self alloc] init];     }      return(gInstance); }   What could I be doing to improve this?


I am writing a scientific paper that was sent to a language revision (proofreading) service. Unfortunately, the whole process runs via a web portal so that it is not possible for me the reply to the proofreader. For the sentence (simplified version)     A is ten times as high as B.   a revision was suggested:     A is ten times higher than B.   However in my opinion, the first sentence means A = 10 x B, whereas the second sentence means A = 10 x B + B (or A - B = 10 x B). Thus, the correct version would be:     A is nine times higher than B.   Questions   Is as high as appropriate for academic texts? If not, what is an alternative? (Am I wrong with my opinion described above?), edit: answered    Context  The sentence is from a paper on air pollution. A and B refer to concentrations of air pollutants at two distinct locations.

Suppose John has 5 sweets. Is there any difference between the following two sentences?     Jack has 3 times as many sweets as John.      Jack has 3 times more sweets than John.   I prefer the first construction and would know unambiguously that Jack has 15 sweets in this case. However in the second construction I would be inclined to think that Jack has 20 sweets, since it seems to suggest 15 sweets in addition to the original 5.


A Photocamera with default FAT32 formatted SD card was used and works in camera. It worked with Windows which can read and write the SD card. Someone plugged the card into Mac and formatted it to Mac extended journaled format.  But never wrote data on it.   Now the SD Card does not show any picture / JPG anymore in Mac. And Windows says "device needs to be formatted first". Is there any chance how to get most of the picture / data back?   For example format to FAT32 and try to undelete data by using special recovering tools.   Thanks for your experience

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


I am producing an animation where there is a tv set playing an episode from the Twilight Zone series.  As you can see on the picture, the image on the screen is crisp and clear, but as I will dim the light in the room, I need to have a glow coming from the screen.  I have tried to use an emission shader for the screen, a point light in front of it, a cube as projector, but all these solutions are ruining the image, rendering it grey or even totally white.  What do you suggest I could do to have the screen glowing and keep video that is playing looking good?

I am making a skydome and I have a texture hooked up with an emission shader for it, however, since the dome is blue it only emits blue light. Is there a way that I can have the whole sky illuminated and have the light reaching the rest of my scene be a different colour?


I have freshly installed 14.04 on an rlg laptop. after installing, the wifi is not working and I dont also have wired access to internet. the output of lspci -knn | grep Net -A2 is :   03:00.0 Network controller [0280]: Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b] (rev 01)     Subsystem: Hewlett-Packard Company Device [103c:1510]     Kernel driver in use: b43-pci-bridge   could you please help me activate the wifi?

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


What is the good way to avoid LaTeX interprete % as comments in \directlua ?  Or in this case one must use an auxiliary file ?

Can someone explain what happens here:  \documentclass{article} \usepackage{luacode} \begin{document}  \begin{luacode*} tex.print("xx\%a","yy\\%b","zz\\\%c") \end{luacode*}  \end{document}   The result is xxyy%b zz%c. (The xx,yy,zz is clear.) The \%a is "ignored", the \\%b and the \\\%c results in the "same" %b (or c). What is the preferred way to get a % in the PDF output? Why is the \%a ignored? What does TeX see after returning from the lua call?


My application was working normally but then when I added the splash screen an error has been appeared and I don't know what to do or how t solve it   the error is   java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setOnClickListener(android.view.View$OnClickListener)' on a null object reference   my MainActivity  public class MainActivity extends AppCompatActivity {  private final int SPLASH_DISPLAY_LENGTH = 4000;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);      setContentView(R.layout.activity_splash);       new Handler().postDelayed(new Runnable() {          @Override         public void run() {             Intent splashIntent = new Intent(MainActivity.this , SplashActivity.class);              MainActivity.this.startActivity(splashIntent);             MainActivity.this.finish();         }     },SPLASH_DISPLAY_LENGTH);         // Find the View that shows the numbers category     TextView numbers = (TextView) findViewById(R.id.numbers);      // Set a click listener on that View     numbers.setOnClickListener(new OnClickListener() {         // The code in this method will be executed when the numbers category is clicked on.         @Override         public void onClick(View view) {             // Create a new intent to open the {@link NumbersActivity}             Intent numbersIntent = new Intent(MainActivity.this, NumbersActivity.class);              // Start the new activity             startActivity(numbersIntent);         }     });   and the activity_splash    <?xml version="1.0" encoding="utf-8"?>   <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@color/category_phrases" tools:context="com.example.android.miwok.SplashActivity">  <ImageView     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:src="@mipmap/nemo"     />  <TextView     android:layout_width="match_parent"     android:layout_height="wrap_content"     android:text="HELLO NEMO"     android:textColor="#FFF"     android:textSize="40sp"     android:layout_alignParentBottom="true"     android:layout_marginBottom="30dp"     android:layout_marginLeft="40dp"     android:fontFamily="casual"     android:textStyle="bold|italic"      />     SplashActivity   public class SplashActivity extends AppCompatActivity {  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_splash); } }   anything to solve it?

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 am a student at technical university.We are currently studying Calculus and I am really curious about why we are using Euler's Number.

I've heard a lot about this number $e$. Why is it so important? How does it fit into the 'bigger picture' of mathematics? How is it calculated and used?


I have a text file, which has random amount of characters, numbers, spaces and new lines. I'm trying to figure out how to find the "length" of this file. For example: if the text file contains "This is an example." the lenght should be 19. I tried using both sizeof(text_file) and strlen(text_file), but they don't give me the desired output.  What I also tried was this:   void test(FILE *f){     int i;   i=0;   char ch;   while( ( ch = fgetc(f) ) != EOF ) {    printf("%c",ch);    /*This is just here to check what the file contains*/    if(ch!='\0')            {        i=i+1;    }   } printf("------------------\n"); printf("The length of the file is\n"); printf("%d",i);   /*For some reason my length is always +1 what it actually should be*\ }   Is there an easier way to do this and why does the code above always give +1? I guess there is something wrong with the if statement, but I don't know what.  Any help is really appreciated thanks in advance.

How can I figure out the size of a file, in bytes?  #include <stdio.h>  unsigned int fsize(char* file){   //what goes here? }


let $S$ be the union of disjoint sets $A_1, \dots , A_k$. Let $R$ be the relation consisting of pairs $(x,y) \in S \times S$ such that $x,y$ belong to the same member of $\{A_1, \dots, A_k\}$. Prove that $R$ is an equivalence relation on $S$.  To answer the question I did the following, I am not sure if it is correct.  Reflexive   For any $x \in A_i$, $(x,x) \in R$ and this also hold for any $y \in A_i$, so therefore reflexivity holds  symmetry  For any $x,y \in A_i$ where $x = y$, then $(x,y)=(y,x) \ in R$ therefore symmetry holds  Transitivity  given $(x,y),(y,z) \in R$ then $x=y$ and $y=z$ so therefore $x=z$ and Transitivity holds  I don't know if the above counts as a valid proof but that is what i was able to come up with.

I'm not exactly sure how to go about doing this question. I've attempted it but I'm not exactly sure if it's correct.  Question: Let $S$ be the union of disjoint sets $A_1, \cdots, A_k$. Let $R$ be the relation consisting of pairs $(x, y) \in S \times S$ such that $x, y$ belong to the same member of $\{A1, \cdots, A_k\}$. Prove that $R$ is an equivalence relation on $S$.  The three axioms are: reflexivity, symmetry, transitivity,  I have a brief idea of how to do the first 2, however, for transitivity, I don't have any ideas. Could anyone help out on this please?


I have a small project consisting of a Google maps satellite open layer with two new shapefiles overlaid on it. I have then used print composer to add a grid and some labels. I have also selected lock layers for map items and draw map canvas items in the map tab. However, when I come to import the exported map in to another document, the layers have shifted and the map has zoomed in to an offset position. This occurs in both pdf and image formats. How do I ensure the map I produce in print composer does not alter when saved for export?  I hope someone can help as I have noticed another user asked . Thanks in advance

I am a beginner using QGIS (1.8.0 Lisboa) on a Mac (OS X 10.6.8 Snow Leopard). I work on a file with two layers in the following sequence (top to bottom):    a vector polygon layer with a few outlines of various buildings in France and Italy (CRS: EPSG:4326 - WGS 84 - "on the fly" re projection is activated ) a Google satellite layer uploaded via open layer plugin.   Sometimes when changing the scale (scrolling in and out) the Google layer updates a little wrong in size or position compared to the polygon layer. But as soon as I "pan" the map everything reconstructs right. Now the problem I have concerns the print composer.  The result of any kind of export - pdf, or image or svg - of my map (vector layer + Google layer in the background) differs from what is shown in the preview of the print composer: the vector layer and the Google layer positions are mismatching and in a different scale. I can send some pictures showing screenshots of the print composer preview and the final results if required.  I tried almost everything:    new files with different CRS settings "cache" update preview "render" update preview different paper sizes,  different scales,   The problem appears only using an open layer map (Google, OpenStreetMap...). If I try the same using two vector layer (shapefile) - one with the buildings, another one with the city in background - everything works out great.  ...exasperating! Since it is a real important research project I would be very grateful for some help and tips.


Good day, I have scene in blender with many objects (picture below) and want create a normal map of this scene from camera view. Is it possible make it in blender (I found only way to create normal map for one object and need make uv map). Mybe it possible if I export scene in different program, like 3d max?     Example of normal map I need (made in Photoshop with nvidia plugin)

This may be a long shot, but after researching fruitlessly for about two weeks, I wanted to ask here in the hopes that someone who is a bit more knowledgeable about Blender and computer vision can assist me or at least point me in the right direction. The problem is, I would like to know how I can acquire the normal map specific to a camera and then transform it based on another camera.   The scenario is, let's say we have stereo cameras; Camera A and Camera B. We would then want to obtain the normal map A' that comes from transforming the normal map of a view point A (Camera A) to another view point B (Camera B). Then perform matching in two normal maps: A' and B, similar to SURF or SIFT for finding the correspondences between these two normal maps.   The limitations I have encountered are:  1) How to acquire the normal map (camera specific) without baking? 2) How to transform that normal map (once acquired) to Camera B?   I assume using opencv to find the correspondences between the two normal maps would be the easiest part, so these two questions are most important for me at the moment. Also tips on how to apply this in cycles/Sverchok would also be very much appreciated.


I understand how before you would need to do a stock split when the company value surges since it is not easy for a "poor" diversified investor to have a $2000 stock in his portfolio, but these days you can buy a , so I see no point in stock splits. But recently AAPL announced a stock split and its .

I've been trying to find out some more information about fractional shares, and how they work. I understand conceptually, you own x% of a share rather than x "full" shares, but I'm curious about how such a system is implemented.  As I understand it, in a "traditional" purchase of shares, the role of a broker is to act as an executor on your behalf, and does not hold any assets themselves. In the case of a fractional share, is this then not the case? For example, the broker holds the complete shares, and then just ensures that they keep an internal record of each partial owner in their system? So there would be no external record of partial ownership?  Thanks!


I'm trying to construct several GLMMs with my thesis data and I can't solve this question. I have data on pollinator abundance and fruit set from plant individuals sampled at six study sites and during two consecutive years. The problem is that not all individuals (plants) were sampled in both years. My question is: How should i use "Year", as random effect or as fixed effect? I constucted three candidate models and compared the AIC: a) Response variable ~Predictor variables + (1 | year/plant) + (1 | site/plant) b) Response variable ~Predictor variables + (1 | year) + (1 | site/plant) c) Response variable ~Predictor variables * year + (1 | site/plant) Option a) had the lowest AIC, but I read in some papers that is not correct use a variable with less than five levels as random effect...so, anyone could help me? Thanks! Raquel

I'm trying to construct several GLMMs with my thesis data and I can't solve this question. I have data on pollinator abundance and fruit set from plant individuals (with different treatments - related to a pest infection -) sampled at six study sites (spatial replicas) and during two consecutive years (time replicas). The problem is that not all individuals (plants) were sampled in both years (because of lack of bloom). My question is: How should i use "Year", as random effect or as fixed effect? I constructed three candidate models and compared the AIC: a) Response variable ~Predictor variables + (1 | year/plant) + (1 | site/plant) b) Response variable ~Predictor variables + (1 | year) + (1 | site/plant)  c) Response variable ~Predictor variables * year + (1 | site/plant) Option a) had the lowest AIC and the highest R2, but I read in some papers that is not correct use a variable with less than five levels as random effect ... so, anyone could help me?


I accidentally deleted a note from 'Notes' in my iPad4 which contained information I couldn't afford to lose. Is there any way that I can retrieve this note please?

iPhone has a default "Notes" app which allows us to store notes. Stored notes can be deleted by hitting the "Delete Note" button:    How do we recover a note that is accidentally deleted?  Is there anyway to undo the delete?


I read sort algorithms that Java used in Arrays, so I opened jar files and read what java used when we call  Array.sort();, so I found Java to check if the array's length is less then 286 and use quick sort otherwise use merge sort?     static void sort(int[] a, int left, int right,                      int[] work, int workBase, int workLen) {         // Use Quicksort on small arrays         if (right - left < QUICKSORT_THRESHOLD) {             sort(a, left, right, true);             return;         } .....

I was asked this question during an interview. They're both O(nlogn) and yet most people use Quicksort instead of Mergesort. Why is that?


Does anyone here know of a suitable verb for making something "exoteric"? I am trying to find a word that adequately encapsulates "making an idea more accessible to the broader community." I like the adjective "exoteric" for this, but am wondering if there is a verb that can be used instead. (Note, I use "make accessible" quite a bit in this sort of situation, which is why I am looking for a succinct verb that I can use instead.)

A company issues a new regulation and wants to make the new regulation more broadly known and understood  by all of its employees.  What do we say the company does?  (The company ... its new regulation.)  Is the word "socialize" appropriate to fill the blank above? I am looking for a word that has the property of "efforts" to ensure the regulation is known by all and understood thoroughly instead of merely making it public, so words like "announce" and "publicize" are not sufficient.


I am curious to know if any way exist to see my deleted history like favorites. I did not found any related answer. One more thing, I talked about all history. I can see one at a time if I browse  the question but no one will remember all link which had been deleted.

What circumstances can cause a question or answer to be deleted, and what does that actually mean?    How can a post be deleted? When can't I delete my own post? Can I still see my post even after it's deleted? Can I see a list of my deleted posts? How can I undelete one of my posts? What does deletion mean for a post? How do votes to delete work? What are the criteria for deletion? What else should I know about deleted posts? If I flag my question with a request to delete it, what will happen?       For more information, see the articles about  and  in the .


What is the most reliable way to check if a string is a number or not?   var checkForNumber = (arg) => {    if (typeof arg === 'number') {      return arg + ' is a number'    } else if (Number(arg)) {      return arg + ' is a number'    }   return 'Not a number';  };   checkForNumber('a')

I'm hoping there's something in the same conceptual space as the old VB6 IsNumeric() function?


There is a  that didn't receive a proper answer. How can I find a security group's dependencies?  These include EC2 instances, but other services also create dependencies, like the load balancer and even relationships with other security groups. Is there a way to systematically list every single dependency?  Thanks!

Amazon EC2 won't let me delete a security group, complaining that the group still has dependencies. How Can I find what those dependencies are?  aws ec2 describe-security-groups doesn't say.


My party has a chaotic evil paladin in it. He is constantly trying to kill other members of the party and it's getting really annoying.  Is it even possible for him to be a chaotic evil paladin, according to the rules?

I'm looking through the PHB and I notice that none of the Classes explicitly state an Alignment or Race limitation.  There is flavor text, but there is nothing that looks like a rule. I see some stuff scattered around, e.g., Alignments lists Paladins under Lawful Good. This seems like an actual rule since it doesn't say "Many Paladins" or "Most Paladins" but very definitively "Paladins". I know that Paladins are Lawful Good in older revisions, but assuming I knew nothing about D&D, is there a definitive (RAW) grid somewhere in the PHB or supplemental documentation?  Or is a Neutral Good Tiefling Rogue perfectly acceptable?


How can I get this date format? yyyy/MM/dd, I currently receive this format at exit 14.08.2017   This is my code:  dataGridView1.Rows[n].Cells[0].Value = DateTime.Parse(ev.Attribute("Start").Value).ToShortDateString();   Please look at my code, in other similar cases, I could not find the same situation..  Thanks everyone

How can I format a date as dd/mm/yyyy or mm/dd/yy ?   Like in VB format("dd/mm/yy",now)  How can I do this in C#?


I need to know how to solve this equation where x and y are both variables Find integer Solutions. $$ \frac{1}{x} + \frac{1}{y} = \frac{1}{2} $$ from what I know I need at least 2 equations to solve for 2 variables. So I need a Hint

Write down the set of distinct solutions and prove your list is complete. $x$ and $y$ are positive integers.  I have rewritten it as $\frac{(x+y)}{xy} = \frac1p$, but I don't understand where to go from here?


I'm trying to create NPCs that allow individuals to upgrade their enchanted books beyond what is normally acquirable in survival mode. Basically the idea is that they can take two enchanted books of the same level and trade them for an enchanted book of the next level up. (E.g. 2 enchanted books with unbreaking I in exchange for 1 enchanted book with unbreaking II) The following code is the one I have been using to summon the villagers but there are a few issues that I  have encountered. /summon Villager ~ ~ ~  {Offers:     {Recipes:[         {maxUses:1000,             buy:{id:enchanted_book,Count:1,Damage:0,tag:{StoredEnchantments:[{id:34,lvl:1}]}},             buyB:{id:enchanted_book,Count:1,Damage:0,tag:{StoredEnchantments:[{id:34,lvl:1}]}},             sell:{id:enchanted_book,Count:1,Damage:0,tag:{StoredEnchantments:[{id:34,lvl:2}]}}         }     ]}, Silent:1 }  Firstly, I keep getting the "data tag parsing failed" error when trying to execute this command in chat. I'm assuming this is because it is too long to execute in chat since I do not have this issue when using a command block. Secondly, after summoning the Villager with the command block, the interface is what I want, accepting two books for one.  But when I put in the two unbreaking I books, I do not get the unbreaking II book out. It is as if the game detects the two books I have as different from the ones required by the Villager.  Anyone can help me identify what is wrong with my code, or tell me if what I am trying to do is not possible. Thanks!

I am trying to build a custom Adventure Island. At this moment I am trying to limit the allowed items on this island. I'm trying to do this by filtering on a certain enchantment which is not item-specific.  For example.   When you want to filter an wooden sword with a custom name, you use this command:  /testfor @p[r=5] {Inventory:[{tag:{display:{Name:"Custom Sword"}}}]} <   When you want to filter a wooden sword with a custom name and specific enchantement, you can use:  /testfor @p[r=5] {Inventory:[{tag:{display:{Name:"Custom Sword"},ench:[{id:16,lvl:1}]}}]} <   But how can I filter on items with a specific enchantment on ANY item? I tried:  /testfor @p[r=5] {Inventory:[{tag:{ench:[{id:16,lvl:1}]}}]} <   But this ain't work. Does anyone know how to solve this issue?


English alphabet is inadequate for its sounds. This makes us to make spelling mistakes and miscommunication. Why the world is not favoring spelling reform that will help us to use the English language with ease and the second language learners to learn it easily and quickly.

As is commonly known, English is quite notorious for having a writing system that is far removed from the actual way it is most commonly pronounced. I understand that there are important historical reasons dating back to the Norman invasions, and the influence of French in medieval English courts and elites.  My question is historical. Was there ever a movement or attempt at reforming the spelling system in order to bring it closer to phonetics?


Truthfully, I have generated a bricks texture to simulate lights on my spaceship... But now I want to export the whole project to marmoset for the actual render... but I can't export the lights. Is there a way I can tell Blender to take the texture map and turn it into a flat image based on the UV map? Thanks guys!

I have a sphere having a planet material MADE WITH NODES, and I want to convert this material into an image texture; because this material is made with nodes and only works in Blender, but I want to use in another software. This is my sphere material :   For Example : This is Jupiter :  And this is the texture :  In this case I used a downloaded image for Jupiter to be the material but I want the opposite, I want to change the material to image texture Like The shape of Jupiter texture. Is there anyway in Blender that can achieve my goal ? This is the file with my sphere material .  Textures Needed :  Albedo / Color / Diffuse Normal Map Roughness Glossines  I am using normal nodes and I am not useing the new Principled-shader


Im trying to use my South Korean Visa credit card at the gas pump and it is asking for my zip code. What am I supposed to do? Is there a generic ZIP code I can use?

In the USA, many  fuel dispensers that accept credit cards require a  that corresponds to the billing address of the credit card.  In Canada, for instance, we have , so it's not obvious what you're supposed to type in since the gas dispensers have only numeric keypads.  Entering '00000' or '90210' seems to always result in failed authorization.  Is there a zip code that works for credit cards with foreign billing addresses?


I asked this question before but did not get an answer, I tried solving it myself and I think I'm heading somewhere, I just need a push in the right direction.  Let $\phi: R \to S$ be a homomorphism of commutative rings. Suppose that $\phi$ is surjective and that $R$ is a principal ideal ring (Meaning all the ideals are principal ideals, spanned only by 1 term).  Show that $S$ is also a principal ideal ring.  My "psuedo" solution  We know that $R/ker(\phi)$ is isomorphic to $Im(S) = S$ ($\phi$ is surjective).  We also know that $ker(\phi)$ is an ideal, and we know that if $R$ is a principal ideal ring and $I$ is a prime ideal then $R/I$ is also a principal ideal ring.  So I wanted to show that $ker(\phi)$ is a prime ideal, that would solve the question. But it doesn't have to be...Let's look at $ab \in ker(\phi)$:  $ab \in ker(\phi)$ implies $\phi(ab) = 0$ which implies $\phi(a)\phi(b)=0$ which implies $a \in ker(\phi)$ or $b \in ker(\phi)$ IF AND ONLY IF $S$ has no zero divisors. We we're not given that. it could be possible to find $\phi(a),\phi(b) \in S$ such that their product is zero and neither of them is zero.  And that is where I am stuck.

I was working on a worksheet for class and came across this problem:      Let $\varphi:R\to S$ be an onto ring homomorphism with the property that every ideal of $R$ is principal. Show that the same must be true for $S$.    I honestly do not know how to do this one!


I had been learning calculus. So what I was thinking about is what us differentiation if $(x)!$. I know. 'n 'th derivative of $x^n$ is $x!$ but it isn''t helping me to solve this problem.

is the factorial of fractions and negative numbers defined? If yes, then what is its graph? Also please find its domain.  Our teacher said the factorial of a fraction is the fraction itself. He also said the graph is continuous but could not determine the derivative of $x!$.


Is there any specific name for the barcode-like graph shown above?  The vertical axis does not correspond to any number and (as far as I can tell) the graph only serves to illustrate spread in the data.    The graph appears in the  in nonlinear time series analysis.  The numerous short impulses represent the test statistic computed under the null hypothesis.  The single long impulse near the center shows the observed value.  (Obviously, one cannot reject the null hypothesis here.)  The mean (cross $\times$) and the standard deviation (of the null distribution) is represented by the horizontal line.

Is there an official name for this extremely simple plot, in which vertical lines indicate the distribution of some samples in a range?


I can totally see why content coming in, unfortunately, sometimes, is really getting out of control. Like here  or  (or not right now, but maybe again in a few hours).  It makes sense then, to lock things contentwise. That is also great for existing content that shall never be changed any more, like that world famous .  But then: I would very much like to simply vote on some of these posts. And I really do not see a good reason to prevent the voting to take place.  Voting data is meta information. Just counters, that reflect the level of appreciation by the community (or lack thereof). The number of votes doesn't relate at all to the content that needs to be protected, or sadly, prevented from being added.   Thus: can the "model" for "locking postings" be made more fine granular? Or at least: changed to allow voting?

Current Situation  When a moderator locks a question or answer, they can choose between different types of post notices: content dispute, off-topic comments, historical significance, wiki answer, or no notice. , but that it works this way is not clear to moderators and it is also not clear what effect a given notice has. The only way to find out for sure is to ask somebody who is not a moderator or use a sock. (This is due to moderator powers possibly overriding the effect of locks.)  Feature Request  Store the effects of a lock separately independent of the post notice. In the interface for locking a post, provide moderators with a checklist regarding the effects of the lock, for example:     This lock prevents:         answers   votes   flags   comments   edits      For questions, also add an option to apply the same lock to all answers to the question. For the canned lock reasons, automatically provide an appropriate choice as defaults.  At the very least make it clear in the dialogue what detailed effects a lock has.  Rationale  Post locks are used rarely, but when they are it is often for important reasons such as avoiding a divide of the community, an escalation of events, or similar. Thus, locks are a tool which moderators have little experience with, but whose correct use (i.e., choosing the right type of effects and knowing what the effects are) may be crucial. Moreover, many locks are used for special cases with individual needs, which in turn require individual locks.  In a specific example, there is a question on Academia, which lead answers and comments, whose appropriateness for the site is subject to a Meta discussion. To avoid further potentially inappropriate comments, answers, etc., I wished to lock question for the remainder of the Meta discussion. I chose content dispute as a lock reason, since it seemed most appropriate notice, however this only prevented edits to the question – which makes sense in other cases but not here. After I noticed this, I chose a historical lock (which I knew to be affecting everything) and removed the post notice (because it was not appropriate). The latter action lead to comments on answers being allowed (), which was not the desired effect either.  Related Questions    – This seems to be partially addressed: The different locks already do have different effects. However, my request goes further than this.  – This is about customising the notice not the effect.  – This would be addressed with this.


I am struggling to understand this. According to truth tables, if $P$ is false, it doesn't matter whether $Q$ is true or not: Either way, $P \implies Q$ is true.  Usually when I see examples of this people make up some crazy premise for $P$ as a way of showing that $Q$ can be true or false when $P$ is something outrageous and obviously untrue, such as "If the moon is made of bacon-wrapped apple-monkey carburetors, then I am a better wakeborder than Gauss."  $P$ is clearly false, but $P \implies Q$ is true no matter what the state of $Q$ is, and I don't understand why.  Are we saying "If $P$ is false, then all bets are off and $Q$ can be anything, either true or false, and not contradict our earlier claim, and if it isn't false, it must be true"?  Otherwise why can't we say that if $P$ is false, then we can't make any claims one way or the other on whether or not it implies anything at all?

I am studying entailment in classical first-order logic.  The Truth Table we have been presented with for the statement $(p \Rightarrow q)\;$ (a.k.a. '$p$ implies $q$') is: $$\begin{array}{|c|c|c|} \hline p&q&p\Rightarrow q\\ \hline T&T&T\\ T&F&F\\ F&T&T\\ F&F&T\\\hline \end{array}$$  I 'get' lines 1, 2, and 3, but I do not understand line 4.      Why is the statement $(p \Rightarrow q)$ True if both p and q are False?  We have also been told that $(p \Rightarrow q)$ is logically equivalent to $(~p || q)$ (that is $\lnot p \lor q$).  Stemming from my lack of understanding of line 4 of the Truth Table, I do not understand why this equivalence is accurate.       Administrative note. You may experience being directed here even though your question was actually about line 3 of the truth table instead. In that case, see the companion question  And even if your original worry was about line 4, it might be useful to skim the other question anyway; many of the answers to either question attempt to explain both lines.


I read this book about 1988-89. Sci fi, dealt with an alien space station (out in deep space) that humans stumble upon, long abandoned by a possibly insect-like race, human sized (they can tell from the shape of the chairs and such) and the station is full of ships. If you get in one and press a button it will go on an indeterminable round trip to another star. It could be a day, could be months and months. People get paid 'rewards' for taking out a ship and if they return with valuable destinations (another station or something of interest) they are paid quite well.  It's written from the perspective of one of these would-be 'gold rush' guys who wants to try his hand... he ends up almost landing in a black hole or something like that.  Any help identifying this book? Author/title etc? I would love to read it again :)  Thanks a bunch!!

I am looking for a novel that I'd love to re-read it with my wife (my 13-year old self must be proud of me I guess). Key Plot points The plot was about humanity finding an alien station on an orbit of Earth. (I'm not sure if it wasn't Moon itself). On this station there were thousands of ships ready to travel so there rose a company that paid people to get on those ships and explore the galaxy. The problem was humans didn't understand how to steer those ships so they had to rely on preset targets. Of course there was no telling where particular ship was to go and fair amount of them never returned. Chronology and other relevant information I read it as an early teenager back in early 2000s. It was Polish translation of a foreign (possibly English) story. I think (not sure) that the book wasn't new at the time. It was just one of those books you dig out in a library and take to see if it's good. I don't recall cover either and even if I did it'd be of the Polish version. Additional information could be that the narration was led along the psychoanalytics of the main protagonists where he relives his memories from inside the station and his journeys.


I want to develop a logistic regression model. There are 1000 cases in the dataset and there are only 180 'Yes'. Therefore, the proportion is 18%.  I was told that I should have at least 500 Yes in the dataset in order to build a good logistic regression model. How can I handle this problem? Do I need to have at least 500 Yes??

Okay, so I think I have a decent enough sample, taking into account the 20:1 rule of thumb: a fairly large sample (N=374) for a total of 7 candidate predictor variables.   My problem is the following: whatever set of predictor variables I use, the classifications never get better than a specificity of 100% and a sensitivity of 0%. However unsatisfactory, this could actually be the best possible result, given the set of candidate predictor variables (from which I can't deviate).   But, I couldn't help but think I could do better, so I noticed that the categories of the dependent variable were quite unevenly balanced, almost 4:1. Could a more balanced subsample improve classifications?


How $\sqrt{x}$ can be a function when $\sqrt{4}$ is equal to $-2$ and $2$?

Why $f(x) = \sqrt{x}$ is a function (as I found in my textbook) since for example the square root of $25$ has two different outputs ($-5,5$) and a function is defined as "A function from A to B is a rule of corre- spondence that assigns to each element in set A exactly one element in B.", so $f(x) = \sqrt{x}$ is not a function?


The thing is, I have tons of 1d-data that is distributed around multiple different mean points, I'm searching for a general way of identifying this little clusters and somehow spreading them.   I've implemented KDE distributions fits for this. My first idea was to search for some way of finding local maxima of the KDE distribution, but that would not be very effective, because it would be depending of the bandwidth of the distribution fixed.    Here is one example.  I'm looking for a general method, that would give me in this example the mean and standard deviation of this three clusters (but it could be more or less than three), considering only themselves, using maybe scipy.stat or sklearn.  Thank you !  Update: Gaussian Mixture might work really well for me, the main problem is just the shape of the of the fitting data, it is a matter of implementation.  from sklearn.mixture import GaussianMixture from scipy.stats import norm import numpy as np  mean=34 std=10  xpdf=np.linspace(20,50,1000).reshape(-1,1) y=norm.pdf(xpdf,mean,std) y=np.array(y).reshape(-1,1)  model=GaussianMixture(1).fit(y) ypdf=np.exp(model.score_samples(xpdf))  plt.hist(y,bins=100,density=True) plt.plot(xpdf,ypdf,'-r') plt.show() ```

I have one-dimensional data. I want to find possible natural cutting points (strong slopes) within the data.  For instance, if the data is  1, 2, 3, 2, 2, 3, 4, 2, 80, 90, 80, 85, 91   there would be a cutting point between values (1-4) and (80-91)  I mapped a histogram which gives me an idea, but I'm curious whether a better method exists (especially for large amounts of data, 100k+).   If the distribution of the values in the example above was a function, it would have the highest slope right before 80.  If it helps, I am using R  PS: My data are not necessarily normally distributed, nor are they ordered.


Is there a reliable way to make a full desktop backup of all apps, app settings, files from an Android running Oreo?  I have tried using SDK and using the adb backup command. It seems to backup all the data but restore doesn't work. I have also noticed that backups made a few hours apart can be wildly different in terms of file size, which implies that it doesn't work consistently.  Is there something similar to the itunes back for iphone which works reliably? Thanks

I know I'm asking for the close-to-impossible -- as a real full-backup certainly requires root permissions. But still there are many folks around not wanting to root their devices -- afraid of voiding their warranties or bricking their devices, or just not having their devices supported by any rooting method.  I also know there were a lot of questions asked already on this topic, and I checked all of them having the backup tag -- none covers the entire topic, all just have pieces, and especially people new to Android (but other non-power-users as well) would have a hard time figuring out the best way.  So I want a detailed canonical answer to the question:  Not involving root-solutions, how to achieve a backup as close as possible to a full backup?  Please do not give simple one-liner answers like "Use app xyz [full-stop]." If mentioning an app (and I doubt a single app would be the answer here), include what parts are covered by it -- as well as ideas on how to fill the gaps it leaves. (And to make it absolutely clear: I know the first thing coming to mind is Titanium Backup -- I use it myself, but this does not apply here: This question is strictly about methods for non-rooted devices!) Moreover, the answer should be as generic as possible in terms of applying to a wide range of devices (i.e. it should not be restricted to one device or manufacturer).  I already mentioned having investigated all questions here tagged backup. These will certainly be helpful providing details for answers here, so I will list up the topmost ones concerning my question:            All these provide some details for my question (so feel free to get inspired by them) -- but I feel there are still details missing. Also it would be helpful to have a summary -- say, an answer including the full description of "the maximum possible".  A last criterium: While I'd consider cloud-based solutions legit, I'd favour local solutions. If you can provide both: all the better. But some people value privacy quite high (I'm one of them), and thus would not trust their data to some cloud service.    Thanks to Ryan, we now have a solution for a really complete backup of all apps and their data -- which I didn't dare to hope for! The only disadvantage: His solution only works for less than 10% of all Android users; namely those whose devices are running at least with Android 4.x.  So again, I ask the close-to-impossible: Any solutions applicable at least on Gingerbread (2.3.x) or, better, even Froyo (2.2.x) -- so they cover the majority of current devices? These solutions may involve multiple tools (try to keep it as simple as possible though; think of your mother to follow your instructions ;)  And keep in mind: NO ROOT!    To further motivate high-quality answers (and hopefully avoid low-quality ones), I will be a harsh one here: As I rarely do, I will down-vote answers not fitting the mentioned criteria on one end -- but on the other end, I will setup a bounty for the best answer (which cannot be done immediately, but earliest after 2 days).


I have discovered something odd with the mkdir command when it is being used in a Makefile and it behaving differently between OSX and Ubuntu 20.04. Just wondering if this is expected behaviour, or have I discovered a bug? The suspect command is: mkdir -p -m 0755 ./output/themes/simple/{css,javascript,webfonts,image} This command works perfectly at the bash/zsh command line, creating the directories: output/themes/simple/css output/themes/simple/javascript etc. On a OSX machine using the zsh shell. When running the above command in a Makefile it works as expected creating the separate subdirectories. However, using the same Makefile on a Ubuntu 20.04 desktop (the file is on a server and both machines can see it) the command is creating the following: output/themes/simple/{css,javascript,webfonts,images} It is as if the command is seeing the last component of the directory path as a string and not enumerating it as it does on the command line. Make on Linux is:  GNU Make 4.2.1 Built for x86_64-pc-linux-gnu Copyright (C) 1988-2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later  This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.  Make on OSX is:  GNU Make 3.81 Copyright (C) 2006  Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. This program built for i386-apple-darwin11.3.0  I do not think it is difference between shells, mkdir is not a builtin on the bash Ubuntu provides. Work around is to separate the mkdirs into separate commands, but I was quite surprised that the make/mkdir did not work correctly on the Linux box. Any thoughts? Cheers Jim

all,  I have found that the same Makefile works well in Mac OS X, but does not work in Ubuntu. The snippet is as following:  start:     @echo $(seperator)     @if [[ "$(PROJECT)" == "" ]]; then \          echo " Project powered by CodeMate!"; \      else \          echo "  $(PROJECT)"; \      fi     @echo $(seperator)   and make complains:  /bin/sh: [[: not found   Any idea?  Cheers,  Li    Updates:  I have changed the above conditional Bash statements to:  if test "$(PROJECT)" = ""; then \   then things work fine. So what is wrong with "[["?


Yesterday I asked this question on SO,  and soon after it was closed as off-topic and migrated to Programmers (the history is here, ).  I don't see anything wrong with that question and I sincerely believe this tag and migration was just plain wrong. The explanation - "Without a language tag or some example code, it's not going to get much attention here." is meaningless, since most of design-related questions on SO is without language tag and/or example code. Also number of DDD-related questions on SO is way higher than on Programmers (there are only 191 questions tagged with DDD on Programmers). If I believe that it wasn't fair, can I do something about that?  And in general - if I believe that someone did something wrong, can I challenge it?  P.S. I'm new to meta, I'm not sure if my nagging belongs here, but I'd like to know what's wrong; I did search first and I couldn't find anything that answered my question.

I have just answered a question on .  The nature of this error means that it requires DBA access to diagnose and resolve.  So I think it is more suited to ServerFault, and voted to close it accordingly.    Except that I wasn't offered the choice of selecting a more approprate Trilogy site.  I think the reason for this is that the question was .  But it was migrated by an SF moderator, Chopper3, and no other voters.  By  Chopper is "no Oracle expert", and I think he has made an error here.    I'm not launching an ad hominem attack, and I'm fine with moderators having super powers.   I just think that we ought to be able to bounce migrated questions back, even if the previous migration was ordained by a moderator.    @AdamDavies suggests I post a comment on the original site.  That indeed was the first thing which occurred to me.  However, comment is not an option. I don't know whether this is  a reputation thang (I don't use SF much) or because the question was closed by a mod.  I have also flagged the question with the SF moderators, so we'll see.


I'm trying to create a single button circuit for the purpose of both powering on a microcontroller (probably an arduino) and then allowing the microcrontroller to control its own power (power itself off) and accept further presses of the same button as input ( functionally like the power button on a smartphone: Hold it down when the phone's powered off and it starts. Push it again when the phone's operating and it will bring up your power menu ).  From research it seems MOSFETs might be the way to go, and from reading I've planned a circuit. I have no experience with MOSFETs though (my first batch are on order now), and am not aware of the potential pitfalls. Attached an example circuit regarding which I have a couple of questions.    The intention is: when the button (a momentary switch ) closes the circuit initially, current is allowed to pass through M3 ( P-Channel MOSFET with no voltage at the gate ) through M1 ( N-Channel MOSFET with voltage currently applied to the gate ) and through to VIn. In the MicroControllers setup routine, it asserts D1 high, applying voltage to the gates of both M3 and M2, closing M3 and the startup circuit, and opening M2 which is now the persistent power circuit. The micro-controller can then choose to shutdown by asserting D1 low, which will shut off M2 and cut off the power.  Now the circuit is open and the power is on, the switch can be used as an input to D2.  1) Obviously... should this circuit work in theory?  2) Do I need to protect the MOSFETs against initial power burst with capacitors to ground or equivalent?  3) Is controlling M3 and M2 with the same voltage that they are allowing to pass like trying to pull yourself up with your own shoelaces? Should I buffer the supply in some way?  4) The example circuit at  shows a resistor connecting the gate to GND. Is this necessary? Should current be allowed to flow past the gate leg of a MOSFET?  5) Is introducing an input voltage to a digital input of a microcontroller before it has programmed its inputs and outputs safe? (Connection to D2 on power up).  ---------- Edit 1 ----------  The duplicate question does provide an alternative (and it would seem quite robust circuit ) that achieves what Ive laid out above ( I hadn't found that answer in searching... Sorry ) My aims though with this question are:  1) To establish if this, or a corrected version, is a feasible circuit without the extra step of the regulator. Most arduinos and equivalents already have one on board, without the enable pin.  2) To understand a little more about MOSFETs.  From answers and comments below @Dave Tweed and @Joe Hass, is the the Threshold Voltage subtracted from the voltage across source and Drain then? Ie. If I supply 10V and the nMOSFET has a a threshold of 5V I can expect 5V at drain going to Vin? (And this doesn't happen in reverse with pMOSFETs?)  @Jon Watt thanks for the example. That answers most of what I'm looking to do, minus the digital input signal. A question though that may seem obvious, is R2 essentially a pull down resistor to keep the gate low when no input is applied from CTL?  Ideally this would be a standalone modular power circuit which you could put on a board and interface with any particular uC setup, with just Vin, Gnd, Vout, Shutdown and Input pins. Whether Shutdown and input are high or low logic doesn't really matter.  Also, in case the detail helps, for my particular application at the moment, I'm looking to have absolute power shut off, as this is for devices that should retain their charge over a long time and will only be sporadically used (once a day). So no sleep mode draining even minimal resources.  If I can understand the threshold problem, and nobody thinks this is beyond possibility, I'll have another go at drafting some potential circuits.

This is similar to other questions, but I feel it is different because of the reuse of the "power" button.   I want a "latching" Momentary Power button.  Behavior:   User Pushes momentary button, holds down as long as necessary and the device powers up. Between Power On and Off the same button will be re-used for other functions  When it is held down for 5 +/- seconds the MicroController will turn itself off.    Design Constraints:   Battery provides between 3.7V to 2.9V during it's usable life The Voltage regulator requires Vin +/- 0.3V on the Enable Pin, 3.1V output. MicroController operates at 3.1V MicroController Output Pin High state is 2.7V Max   Debouncing: In this case I'm not concerned about debouncing the switch, if the user doesn't hold it down long enough for the MicroController to set it's Digital Output pin  High the device doesn't power on.  I've worked up the following schematic, which kind of works.    It assumes 3.7V from the battery. Uses an Analog Input for the Power button, which then uses the variation in voltage to determine if the button has been pressed. In the current design the difference is 0.12 V (from 3.4 to 3.52), but the MicroController has a 12 bit ADC so that shouldn't be a problem, in addition I can adjust the sensitivity range of the ADC.   Questions:  What is the difference between reality and the simulator?  Is there a better way?  How can I get a greater voltage difference on the button input? I've tried many different combinations but they increase the voltage range above the 3.6V Input High Maximum specified in the datasheet.  I'm not excited about the "Leakage current" when the uC Controlled Power Pin is Low, any suggestions?   Thank you for any ideas/suggestions/answers.