Unable to start scan on Azure Purview for Azure Synapse Analytics Serverless Pool

Question: I have

Azure Synapse Workspace/Analytics setup ( that has built-in serverless pool)
Have Purview account ([Orange-account]) , in which having Purview Studio acccess
I have registered my Synapse Analytics on Purview Studio
I have created database mango in serverless pool
I have granted "Synapse Administrator" access to the [Orange-account]( in Synapse workspace)
Executed this from mango database
CREATE USER [Orange-account] FROM EXTERNAL PROVIDER
Executed this from master database
EXEC sp_addrolemember 'db_owner', [Orange-account]

I am trying to initiate a Scan - so that I could fetch all meta data information from Azure Synapse Serverless pool database mango. But I am unable to create the scan event - as it gives permission issue.
Sharing more details with snapshot below

Snapshot of Sources tab in Purview Studio looks as below

I dont see any database listed in the "Database Name" drop down

I entered the database manually and tried "Test Connection" ; that ends up with
Error: (3867) Failed to access the Azure SQL data warehouse. The given credential has not been applied or does not have permission on the target database.Learn more


What else can be causing this access issue here?
Comment: Have you solved the problem? It still does not work for me.
Comment: no luck yet. still not working
Answer: At ths time the only the dedicated pools is supported . Please see here . Working is in progress for supporting serverless also.
Comment: This https://learn.microsoft.com/en-us/azure/purview/register-scan-synapse-workspace says that "Azure Synapse Workspace scans support capturing metadata and schema for dedicated and serverless SQL databases within them. It also classifies the data automatically based on system and custom classification rules.". Yet it still does not work for me
Answer: The latest docs recommend the following...
"Add the Azure Purview account MSI (represented by the account name) as sysadmin on the serverless SQL databases by running the command below in your SQL script:"
<code>CREATE LOGIN [PurviewAccountName] FROM EXTERNAL PROVIDER;
ALTER SERVER ROLE sysadmin ADD MEMBER [PurviewAccountName];
</code>
More info here: Using Managed identity for Serverless SQL databases
Answer: I have followed this link and have gotten a successful scan:
https://learn.microsoft.com/en-gb/azure/purview/register-scan-azure-synapse-analytics
You might want to check that

You have assigned Purview MSI to Reader in both Synapse
You have assigned Purview MSI as Blob Storage Reader at the Storage resource
You have created the user/login for Purview MSI and added it to db_reader on your dedicated/serverless pool

Good luck!
Answer: I think you need to grant your Purview account read access first.


Ubuntu swap ctrl with alt wirless keyboard - big problem after reboot

Question: i have problem with my keys swap.
I'm using "gnome-tweak-tool" tool and everything is good.
Keys are working properly. Problem is when my keyboard is going offline or after laptop reboot.
I have checked in tool to swap keys but keys are returning to standard functions.
Can i do something with this?
Answer: You can use xbindkeys instead, this not only allows binding keyboard keys but you can also bound mouse buttons.
sudo apt-get install xbindkeys
bind keys to other keys..
If you want a key on your keyboard to call a different key on your keyboard, you will need an extra piece of software as xbindkeys does not support this on it's own. I know of two programs which we can use, xdotool and xte. I prefer xte so I'm going to use that.
Install it:
sudo apt-get install xautomation
The syntax for xte is like this:
xte 'command key/mousebutton/xyCoordinates'
Examples:
<code>To call a single key press: xte 'key keyName'

To call a key combination: xte 'keydown keyName' 'keydown secondKeyName' 'keyup keyName' 'keyup secondKeyName

To call a mouse button: xte 'mouseclick buttonNumber' (We'll discuss finding button numbers a little latter)

To move the mouse: xte 'mousemove xCoordinate yCoordinate'

And more! Read man xte
</code>
Now that you know the command for simulating key presses you can call it from your xbindkeys script, like this:
"xte 'key b'"
Control+b
As you might guess, this calls xte 'key b' when we press Ctrl+b, which would enter a b into any document you might be currently working on.
I thing to note however is that xbindkeys and xte don't always work very well together. Sometimes you have to press the keys exactly at the same time to get output, other times it works just fine.
Other options are Xev and xmodmap
These two comes pre installed in ubuntu.
Xev "creates a window and then asks the X server to send it events whenever anything happens to the window (such as it being moved, resized, typed in, clicked in, etc.)."
xmodmap is a "program is used to edit and display the keyboard modifier map and keymap table that are used by client applications to convert event keycodes into keysyms."


Subfolders in visual studio code c++

Question: So I am currently learning C++ and working through a book. The chapter I am on involves separating functions and such in different files instead of all keeping them in the main file. So for this I wanted to create a subfolder to keep all these files in, instead of having them sprawled through the main folder (Programming in C++) Here is a screenshot of the directory overview and the Chapter 4 folder is the subfolder I am trying to work out of.

c_cpp_properties.json file:
<code> {
    "configurations": [
        {
            "name": "Win32",
            "browse": {
                "path": [
                    "${workspaceFolder}",
                    "C:\\MinGW\\lib\\gcc\\mingw32\\6.3.0\\include\\c++"
                ],
                "limitSymbolsToIncludedHeaders": true
            },
            "includePath": [
                "${workspaceFolder}"

            ],
            "defines": [
                "_DEBUG",
                "UNICODE",
                "_UNICODE"
            ],
            "compilerPath": "C:\\MinGW\\bin\\gcc.exe",
            "cStandard": "c11",
            "cppStandard": "c++17",
            "intelliSenseMode": "clang-x64"
        }
    ],
    "version": 4
}
</code>
tasks.json file:
<code>{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "build hello world",
            "type": "shell",
            "command": "g++",
            "args": [
                "-g", "helloworld.cpp"
            ],
            "group": {
                "kind": "build",
                "isDefault": true
            }
        },

        {
            "label": "build the main grader file",
            "type": "shell",
            "command": "g++",
            "args": [
                "-g", "main_grader.cpp"
            ],
            "group" :{
                "kind": "build",
                "isDefault": true
            }
        }
    ]
}
</code>
I have tried numerous different ways but I can not figure out how to give the settings file the right path or whatever it needs to be able to run the simple hello world program inside the Chapter 4 folder in the main_grader.cpp file.
The error I continue to receive is:
<code>g++.exe: error: main_grader.cpp: No such file or directory
g++.exe: fatal error: no input files
compilation terminated.
The terminal process terminated with exit code: 1
</code>
How could I properly link the sub folder to my main (programming in C++) folder to be able to run the code?
Answer: I think you missing the env variable "${workspaceFolder}\myFolder\*.cpp" in the args list.

Subfolders in visual studio code c++


FXML Load Exception no resources specified

Question: I am starting to build a program with SceneBuilder and JetBrains IDE, i want to internationalize the program so i made a properties file. Everything works fine on the SceneBuilder but when i try to run the program with JetBrains i get this exception
    /usr/lib/jvm/java-8-oracle/bin/java -Didea.launcher.port=7532 -Didea.launcher.bin.path=/home/paulo/idea-IC-163.12024.16/bin -Dfile.encoding=UTF-8 -classpath /usr/lib/jvm/java-8-oracle/jre/lib/charsets.jar:/usr/lib/jvm/java-8-oracle/jre/lib/deploy.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/cldrdata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/dnsns.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jaccess.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/jfxrt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/localedata.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/nashorn.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunec.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunjce_provider.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/sunpkcs11.jar:/usr/lib/jvm/java-8-oracle/jre/lib/ext/zipfs.jar:/usr/lib/jvm/java-8-oracle/jre/lib/javaws.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jce.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfr.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jfxswt.jar:/usr/lib/jvm/java-8-oracle/jre/lib/jsse.jar:/usr/lib/jvm/java-8-oracle/jre/lib/management-agent.jar:/usr/lib/jvm/java-8-oracle/jre/lib/plugin.jar:/usr/lib/jvm/java-8-oracle/jre/lib/resources.jar:/usr/lib/jvm/java-8-oracle/jre/lib/rt.jar:/home/paulo/mysql-connector-java-5.1.41/mysql-connector-java-5.1.41-bin.jar:/home/paulo/ProjetoOrcamentos/WorkManager/out/production/WorkManager:/home/paulo/idea-IC-163.12024.16/lib/idea_rt.jar com.intellij.rt.execution.application.AppMain sample.Main
Exception in Application start method
Exception in thread "main" java.lang.RuntimeException: Exception in Application start method
    at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182)
    at java.lang.Thread.run(Thread.java:748)
Caused by: javafx.fxml.LoadException: No resources specified.
/home/paulo/ProjetoOrcamentos/WorkManager/out/production/WorkManager/sample/sample.fxml:16

    at javafx.fxml.FXMLLoader.constructLoadException(FXMLLoader.java:2597)
    at javafx.fxml.FXMLLoader.access$100(FXMLLoader.java:103)
    at javafx.fxml.FXMLLoader$Element.resolvePrefixedValue(FXMLLoader.java:421)
    at javafx.fxml.FXMLLoader$Element.processValue(FXMLLoader.java:363)
    at javafx.fxml.FXMLLoader$Element.processPropertyAttribute(FXMLLoader.java:325)
    at javafx.fxml.FXMLLoader$Element.processInstancePropertyAttributes(FXMLLoader.java:235)
    at javafx.fxml.FXMLLoader$ValueElement.processEndElement(FXMLLoader.java:767)
    at javafx.fxml.FXMLLoader.processEndElement(FXMLLoader.java:2823)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2532)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2441)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3214)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3175)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3148)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3124)
    at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:3104)
    at javafx.fxml.FXMLLoader.load(FXMLLoader.java:3097)
    at sample.Main.start(Main.java:13)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139)
    ... 1 more

This is the code i have so far
public class Main extends Application {

    @Override
    public void start(Stage primaryStage) throws Exception{
        Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"));
        primaryStage.setScene(new Scene(root, 1200, 1000));
        primaryStage.show();
    }

    public static void main(String[] args) {
        launch(args);
    }
}

FXML File:
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.Cursor?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.HBox?>

<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1">
   <top>
      <HBox spacing="20.0" BorderPane.alignment="CENTER">
         <children>
            <Button mnemonicParsing="false" text="%newWorkButton">
               <cursor>
                  <Cursor fx:constant="CLOSED_HAND" />
               </cursor></Button>
            <Button mnemonicParsing="false" text="%dbButton" />
         </children>
         <padding>
            <Insets bottom="15.0" left="15.0" right="15.0" top="15.0" />
         </padding>
         <BorderPane.margin>
            <Insets />
         </BorderPane.margin>
      </HBox>
   </top>
</BorderPane>

I know that the problem occurred while trying to load the properties file, but why it is working in the SceneBuilder and it doesn't work when i try to run it?
PS: The problem happens when %newWorkButton or %dbButton appears because that is the part where it uses the property file.
Answer: I am answering my own post because i was able to find the answer a few days ago.
As you can see in Main i had this line loading the fxml:
Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"))

But since i am using a property file i need to load it too, so this is what i did:
 ResourceBundle resources = ResourceBundle.getBundle("Language/lang_pt");;

 Parent root = FXMLLoader.load(getClass().getResource("sample.fxml"),resources);

Answer: I'm having a similar issue.  I just found this and realized that I had forgotten to load my ResourceBundle and my app is blowing up on an i18n resource.  I found my answer on this post:
javaFX application error: No resources specified
Comment: Please don't share a link here. Because after some year link will be broken or not available. So please share your solution here.
Answer: you must replace "/" with "." like this
 ResourceBundle resources = ResourceBundle.getBundle("Language.lang_pt");

Comment: This is not the problem.You can use "/" or ".".


Proof that $x^2$ is not uniformly continuous on $\mathbb R$

Question: This is my attempt. My instructor said it was incorrect. I would like to know exactly where my mistake is.
Suppose $x^2$ is uniformly continuous on $\mathbb R$.
So, $\forall \epsilon > 0 \ \exists \delta > 0 \ \forall x,y \in \mathbb R \ s.t. \ if \ |x - y| < \delta \ \text{then} \ |f(x) - f(y)| < \epsilon$
In this case, $|x - y| < \delta \ \text{and} \ |x^2 - y^2| < \epsilon$
$|(x - y)(x + y)| < \epsilon$
$|(x - y)| |(x + y)| < \epsilon$
$\delta|x + y| < \epsilon$
Notice, $|x + y|$ is unbounded on the real line. So $x$ and $y$ can be made arbitrarily large. So there will not always be a $\delta$ that will make all values of $x$ and $y$ less than an arbitrarily small $\epsilon$.
Therefore, $x^2$ is not uniformly continuous on $\mathbb R$.
Answer: The intuition is not bad, but it is incorrect. From $|(x-y)(x+y)|<\varepsilon$ you cannot go to $\delta|x+y|\le\varepsilon$. Indeed, by applying $|x-y|<\delta$, you have $|(x-y)(x+y)|<\delta|x+y|$. So you have that one expression (say $|(x-y)(x+y)|$) is bounded by two different estimates ($\delta|x+y|$ and $\varepsilon$) but you cannot conclude anything about wich one is bigger.
A correct approach is trying to find a concrete value of $\varepsilon$ for wich for any $\delta, you have the oppose inequality.
For example, take $\varepsilon=1$ and try to prove that for any $\delta>0$ you always can find $x,y\in\Bbb R$ such that $|x-y|<\delta$ and $|x^2-y^2|\ge 1$. And to do that, your intuition about the factor $(x+y)$ will helps you.
Answer: There is no single mistake. Even if every step were correct, which is not the case, this doesn't have the right logical structure to be a proof that the function $f(x)=x^2$ is not uniformly continuous. For that you need to show that there is some $\epsilon>0$ such that no matter what $\delta>0$ you choose, there are points $x_\delta,y_\delta\in\Bbb R$ such that $|x_\delta-y_\delta|<\delta$, but $|x_\delta^2-y_\delta^2|\ge\epsilon$. For example, you could let $\epsilon=1$ and for each $\delta>0$ show how to find points $x_\delta$ and $y_\delta$ such that $|x_\delta-y_\delta|<\delta$, but $|x_\delta^2-y_\delta^2|\ge 1$.
I mentioned that not every step is correct: in particular, $|x-y|\cdot|x+y|<\epsilon$ and $|x-y|<\delta$ do not imply that $\delta|x+y|<\epsilon$.
That said, I suspect that you do have a reasonable intuitive understanding of why $f(x)=x^2$ is not uniformly continuous on $\Bbb R$.
Answer: Your intuition as to why it's not uniformly continuous is correct, but your proof doesn't make any sense. Start with the definition of not uniformly continuous, which is what you're trying to prove.
There exists $\epsilon_0>0$ such that for all $\delta>0$ there exists $x,y$ with $|x-y|<\delta$, but $|f(x)-f(y)|\geq \epsilon_0$.
In this case, just choose $\epsilon_0=1$. Then for every $\delta$, try to come up with $x,y$ such that $|x-y|<\delta$, but $|x-y||x+y|\geq 1$. Let $x$ be arbitrary and pick $y=x+\delta/2$. Then $|x-y|=\delta/2<\delta$ is satisfied and
$$
|x-y||x+y|=\frac{\delta}{2}\left(2x+\frac{\delta}{2}\right).
$$
If $x$ is sufficiently large....
Comment: Honestly, I like all of the answers I got, but I think this one was the most complete. Really though, all of these answers were great. Thank you all!
Answer: Do it with sequences
Let
$$x_n=n \;\; and\;y_n=n+\frac 2n$$
we have
$$\lim_{n\to+\infty}|x_n-y_n|=0$$
But
$$\lim_{n\to+\infty}|x_n^2-y_n^2|=4\ne0$$
thus
$x\mapsto x^2 $ is not uniformly continuous at $\Bbb R$.
We proved that with $\epsilon=3 $ and any $ \eta>0 $, we take $ n $ such that $ \frac 1n<\eta $ and check that
$$|x_n-y_n|=\frac 1n <\eta$$
but
$$|x_n^2-y_n^2|=4+\frac{4}{n^2}>3$$


How to install aptitude without an internet connection?

Question: I've just installed Ubuntu 11.04 and there no internet connection.
Firstly I've tried sudo apt-get install aptitude, but it says that there's no installation for this.
Then I downloaded on USB memory apt_0.8.3ubuntu6_amd64.deb package (as I understood that this package has aptitude installation) and installed it. Then I tried sudo apt-get install aptitude and again no success.
How to install aptitude without internet connection?
Comment: If you installed `aptitude` from `deb` file, why do you also want to install it from repositories?
Comment: Because I don't know meaning of apt-get command, please just say what to do. Thanks
Comment: You should ask yourself why do you need `aptitude`. If you really need it and you really installed it from deb, just run it.
Comment: I need aptitude to configure internet connection(by manual) and of course I've tried to just run it.
Comment: @megas `aptitude` has nothing to do with configuring an internet connection.  It is just another package installer, like `apt-get`.  It is its own package, not part of the apt package, which is why installing the apt package did not help.  You want `aptitude_0.6.3-2ubuntu4_amd64.deb`
Comment: It's for manual, by this manual i suppose to setup vpn connection
Answer: To install aptitude without internet you first need to have it with all of its dependencies.

Go to: http://packages.ubuntu.com/natty/aptitude to grab aptitude and all of its dependencies.
Put all the deb packages inside a folder and when on the PC you want to install aptitude go to the folder in the terminal and do sudo dpkg -i *.deb

It will install aptitude with all of the dependencies in that folder.
NOTE - I am also one of those that enjoys Aptitude over apt-get, not only because you do everything from one single command but when you do a show, search or install it is more human friendly than the other.
Answer: You install .deb package using dpkg, see here for example: http://www.cyberciti.biz/faq/ubuntu-linux-how-do-i-install-deb-packages/
Also, read this article for installing packages from a CD, without an internet connection:
https://help.ubuntu.com/8.04/add-applications/C/offline.html


Does Indy support raw TCP sockets on Windows?

Question: I'm a C++ programmer, but my question is about the Delphi network socket library Indy.
Essentially as Microsoft crippled raw sockets with WinXP SP2 so that TCP data cannot be sent over them, does this then also apply to Indy? One of my friends recommended it to me rather then using the WinSock API.
If not, then is the only way to use raw TCP sockets using the WinPCap API?
Answer: If it doesn't, I know that synapse for Delphi does.  The latest version now supports D2009 and it is being actively supported.
Comment: Synapse is a very great tool. Moreover if you plan to do mutithreading and blocking sockets on a *big* server ( = handle thousand of connexions) keep in mind that, from my experience, synapse is far more stable than Indy. And far easier to understand and modify the code to fit your needs too :) :)
Comment: That doesn't mean much. Indy 10 has 4 files IdRaw*.pas in Core. But some restrictions are imposed by Windows (not all versions though), see "Limitations on Raw Sockets" at http://msdn.microsoft.com/en-us/library/ms740548%28VS.85%29.aspx. Presumably these restrictions are independent of the Delphi library used to call the WinSock API.
Answer: As you can see from the other answers there are a lot of Delphi libraries to simplify network programming. However, AFAIK they all provide a friendlier layer over the WinSock API (on Windows, over the standard socket API on other OSs) and thus are not able to do anything that the WinSock API isn't able to do. In particular they may or may not support raw socket access, but if the OS fails to send data over the socket the libraries will only return errors as well.
For more information about the limitations of raw sockets on most recent Windows OS versions see this MSDN page, in particular the section "Limitations on Raw Sockets". It states quite clearly that

To get around these issues, it may be required to write a Windows network protocol driver (device driver) for the specific network protocol.

Neither of the Delphi network programming libraries comes with its own network protocol driver AFAIK. And neither will help you with permission issues on limited user accounts, or the interference of the Windows Firewall.
As you mention WinPcap in your question you know it is capable of doing what you want. There are Delphi wrappers for it, like Magenta Systems Internet Packet Monitoring Components. However, as a C++ programmer you may be better off to use the library directly from C++, as Delphi adds nothing in regard to the socket programming you want to do. In particular you won't need the extra layer to hide platform differences that some of the Delphi libraries provide, as you will be programming directly against the libpcap API.
Answer: you should check ICS components

ICS is a free internet component
  library for all Delphi, C++Builder,
  BDS and RAD Studio versions (win32).
  It includes TCP, UDP, raw sockets,
  clients, servers, as well as many high
  level protocols such as FTP, SMTP,
  POP3, NNTP, HTTP and more.

http://www.overbyte.be/
Answer: Indy works quite well.  I use it quite a bit with few problems.
If your looking for more basic socket interaction you could use these other components:

TTCPClient
TCPServer
TClientSocket
TServerSocket

All of these components also ship with Delphi.
Don't know about winpcap directly, but I believe there is a delphi wrapper for it.  I don't currently know where I've seen it but it shouldn't be hard to find using Google code search.
Comment: Yes but does indy support raw tcp sockets in windows?
Comment: Maybe ask yourself : "am I definitely sure I have to use raw sockets ?" Because it really seems to be a big matter to solve (see other answers). You may gain a lot of time if you find a solution that doesn't need raw sockets.
Answer: I would rather prefer synapse over than Indy, it's architecture is more simpler thus easier to understand.
Comment: Yes, it does, but it is subject to OS restrictions on such sockets.
Comment: So, does Indy support raw sockets or not?


Is swiping up/down better than swiping left/right for changing months on a calendar?

Question: I have created a custom View to display a Calendar in Android.
The display is always 1 month. I'm using a swipe to the sides to switch months. Now I have seen some other Apps (including the installed stock Calendar from Google) that change to the next month by swiping down.
Is there a reason why they use this instead of to the sides? which one is more intuitive for the user? I personally like the one to the sides much more but was kinda confused that even the Google calendar uses up/down.
This is the kind of View im talking about:
Comment: Is there any reason not to support changing the month with both types of swipe?
Comment: I turned your title into a question; hope I've accurately captured the essence of your question. Feel free to revert or change if not.
Answer: With the google calendar on android, you can scroll down from one month to the next and view a whole month - but here's the key: - it's seamlessly attached top and bottom to the previous and next month without having to think about overlapping parts of the week, or having gaps, or having repeated parts of the week, or greying out days that do not belong to the month which is supposed to be displayed.
In effect, it is a stream of data rather than explicitly chunked into one month or another.
And that for me is a compelling reason to go from month to month vertically rather than horizontally - because my life is not split up month by month - I work Monday to Friday and then there's the weekends. I shouldn't need to be concerned with months breaking midweek.
Example from my phone:
Comment: +1 for "because my life is not split up month by month [...] I shouldn't need to be concerned with months breaking midweek"
Comment: Ok, now where is the google calendar on my Android phone? I would dearly love to use it instead of the app that Samsung seems to think I need...
Comment: @MarjanVenema This isn't to defend Samsung, but their calendar app does something similar - if you tap on a day of the week outside the currently-viewed month, it does a vertical scroll to that month.  'Course, that doesn't help when the month starts on Sunday or ends on Saturday...
Answer: I've seen it both ways. One argument in support of swiping/scrolling vertically between months is that, because of the way dates are listed in columns according to the day of the week (Monday, Tuesday, Wednesday etc.), being able to simply follow that column down from month to month is slightly less disorientating that scrolling horizontally and then finding your place again.


Is $\Bbb{Q}\backslash\Bbb{R}$ a subset of $\Bbb{Z}$?

Question: I reached an unexpected conclusion with the answer I got from the exercise below. From the expression's valuation, it seems to be true. I distrust my answer (I am still so painfully clumsy with these concepts) but, I don't yet know if and where I miscalculated.
Your always appreciated insight is welcome. Thank you.
Answer: You correctly note that $\Bbb{Q}\cap\Bbb{R}=\Bbb{Q}$. That is to say, that $\Bbb{Q}$ is a subset of $\Bbb{R}$. From this it follows directly that $\Bbb{Q}\backslash\Bbb{R}$, the set of all elements of $\Bbb{Q}$ that are not in $\Bbb{R}$, is empty. So indeed $\Bbb{Q}\backslash\Bbb{R}=\varnothing$, and indeed the empty set is a subset of every set, in particular of $\Bbb{Z}$.
A minor remark on your notes; you write
$$\Bbb{Q}\backslash\Bbb{R}\subseteq\Bbb{Z}\quad =\quad(\Bbb{Q}\cap\bar{\Bbb{R}})\subseteq\Bbb{Z},$$
which doesn't make sense semantically. What you (probably) mean is that the two logical statements are equivalent. You can express this by writing
$$\Bbb{Q}\backslash\Bbb{R}\subseteq\Bbb{Z}\quad\Leftrightarrow\quad(\Bbb{Q}\cap\bar{\Bbb{R}})\subseteq\Bbb{Z}.$$
The same goes for the chain of 'equalities' (actually equivalences) that follows. If you prefer to write a chain of equalities, you could write
$$\Bbb{Q}\backslash\Bbb{R}=\Bbb{Q}\cap\bar{\Bbb{R}}=\ldots=\varnothing,$$
and then note that $\varnothing\subseteq\Bbb{Z}$, and conclude that $\Bbb{Q}\backslash\Bbb{R}\subseteq\Bbb{Z}$.
Comment: Thank you kindly


How to show $ \sup \inf g(x,y) \leq \inf \sup g(x,y)$?

Question: Came across this little practice exercise, and I couldn't properly convince myself of this relation:
Let $X,Y \subset \mathbb{R}^n$ and $g:X\times Y \rightarrow \mathbb{R}$. Show that
$$\sup_{y \in Y} \inf_{x \in X}g(x,y) \leq \inf_{x \in X} \sup_{y \in Y} g(x,y).$$
My thinking was starting with $\inf_{x \in X}g(x,\overline{y}) \leq\sup_{y \in Y} g(\overline{x},y)$, but does that even hold for all $\overline{x} \in X$ and $\overline{y} \in Y$?
Answer: Well silly me, I think I've found a decent explanation. First note that
$$ g(\overline{x},\overline{y}) \leq \sup_{y \in Y}g(\overline{x},y)$$
for all $\overline{x} \in X$ and $\overline{y} \in Y$. Then take the infimum wrt $X$ on both sides, giving
$$ \inf_{x \in X}g(x,\overline{y}) \leq \inf_{x \in X}\sup_{y \in Y}g(x,y) $$
which now holds for all $\overline{y} \in Y$. Thus we can take the supremum over $Y$ on the lhs to give the desired result.
Comment: Let me strongly recommend to replace each formula similar to $$ g(x,y) \leq \sup_{y \in Y}g(x,y)$$
 by its correct formulation $$ g(x,y) \leq \sup_{z \in Y}g(x,z).$$
Comment: Good point, I've incorporated that now.
Comment: Could you explain why the inequality $\le$ does not change when you take the $\sup$ on the lhs (last line) ?


Unformat NTFS formatted LVM partition

Question: I accidentally formatted my LVM partition as NTFS. Now my data is lost.
How do I unformat?
Answer: Look like fsck.ext4 saved my day. Although it spammed my terminal, i got my drive fixed.

Unformat NTFS formatted LVM partition


apt-get is broken (Ubuntu 10.04 Server)

Question: I cannot install any package in the server, as I am newbie with server. In the morning I found that some, I am not able to install any package from command line in the server. Now every package is now manually downloaded packages and then installed in the server.
Can anyone please tell me what is the issue and how could it be resolved?
OS: Ubuntu 10.04.4 LTS (64 Bit)
Below is the error:
iam@ubuntu$ sudo apt-get install pidgin
Reading package lists... Done
Building dependency tree
Reading state information... Done
pidgin is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 102 not upgraded.
32 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Traceback (most recent call last):
  File "/usr/bin/apt-listchanges", line 33, in <module>
    from ALChacks import *
  File "/usr/share/apt-listchanges/ALChacks.py", line 32, in <module>
    sys.stderr.write(_("Can't set locale; make sure $LC_* and $LANG are correct!\n"))
NameError: name '_' is not defined
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "UTF-8",
    LANG = "en_IN"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up shared-mime-info (0.71-1ubuntu2) ...
/var/lib/dpkg/info/shared-mime-info.postinst: line 13: 21935 Segmentation fault      update-mime-database.real /usr/share/mime
dpkg: error processing shared-mime-info (--configure):
 subprocess installed post-installation script returned error exit status 139
dpkg: dependency problems prevent configuration of libgtk2.0-0:
 libgtk2.0-0 depends on shared-mime-info; however:
  Package shared-mime-info is not configured yet.
dpkg: error processing libgtk2.0-0 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of chromium-browser:
 chromium-browser depends on libgtk2.0-0 (>= 2.20.0); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing chromium-browser (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of chromium-codecs-ffmpeg:
 chromium-codecs-ffmpeg depends on chromium-browser (>= 184.108.40.206~); however:
  Package chromium-browser is not configured yet.
dpkg: error processing chromium-codecs-ffmpeg (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of chromium-browser-l10n:
 chromium-browser-l10n depends on chromium-browser (= 18.0.1025.151~r130497-0ubuntu0.10.04.No apport report written because the error message indicates its a followup error from a previous failure.
                                     No apport report written because the error message indicates its a followup error from a previous failure.
                                                               No apport report written because MaxReports is reached already
                                             No apport report written because MaxReports is reached already
                           No apport report written because MaxReports is reached already
         No apport report written because MaxReports is reached already
                                                                       No apport report written because MaxReports is reached already
                                                     No apport report written because MaxReports is reached already
                                   No apport report written because MaxReports is reached already
                 No apport report written because MaxReports is reached already
                                                                               No apport report written because MaxReports is reached already
                                                             No apport report written because MaxReports is reached already
                                           No apport report written because MaxReports is reached already
                         1); however:
  Package chromium-browser is not configured yet.
dpkg: error processing chromium-browser-l10n (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libevdocument2:
 libevdocument2 depends on libgtk2.0-0 (>= 2.14.0); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing libevdocument2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libevview2:
 libevview2 depends on libevdocument2 (>= 2.29.5); however:
  Package libevdocument2 is not configured yet.
 libevview2 depends on libgtk2.0-0 (>= 2.20.0); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing libevview2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of evince:
 evince depends on libevdocument2 (>= 2.29.5); however:
  Package libevdocument2 is not configured yet.
 evince depends on libevview2 (>= 2.29.No apport report written because MaxReports is reached already
                     No apport report written because MaxReports is reached already
   No apport report written because MaxReports is reached already
                                                                 No apport report written because MaxReports is reached already
                                               No apport report written because MaxReports is reached already
                             No apport report written because MaxReports is reached already
           No apport report written because MaxReports is reached already
                                                                         No apport report written because MaxReports is reached already
                                                       5); however:
  Package libevview2 is not configured yet.
 evince depends on libgtk2.0-0 (>= 2.16.0); however:
  Package libgtk2.0-0 is not configured yet.
 evince depends on shared-mime-info; however:
  Package shared-mime-info is not configured yet.
dpkg: error processing evince (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of firefox:
 firefox depends on libgtk2.0-0 (>= 2.20.0); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing firefox (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gcalctool:
 gcalctool depends on libgtk2.0-0 (>= 2.18.0); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing gcalctool (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgdict-1.0-6:
 libgdict-1.0-6 depends on libgtk2.0-0 (>= 2.18.0); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing libgdict-1.0-6 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gnome-utils:
 gnome-utils depends on libgdict-1.0-6 (>= 2.23.90); however:
  Package libgdict-1.0-6 is not configured yet.
 gnome-utils depends on libgtk2.0-0 (>= 2.18.0); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing gnome-utils (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gtk2-engines-pixbuf:
 gtk2-engines-pixbuf depends on gtk2.0-binver-2.10.0; however:
  Package gtk2.0-binver-2.10.0 is not installed.
  Package libgtk2.0-0 which provides gtk2.0-binver-2.10.0 is not configured yet.
 gtk2-engines-pixbuf depends on libgtk2.0-0 (= 2.20.1-0ubuntu2.1); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing gtk2-engines-pixbuf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libedataserverui1.2-8:
 libedataserverui1.2-8 depends on libgtk2.0-0 (>= 2.14.0); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing libedataserverui1.2-8 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgail18:
 libgail18 depends on libgtk2.0-0 (= 2.20.1-0ubuntu2.1); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing libgail18 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgtk2.0-bin:
 libgtk2.0-bin depends on libgtk2.0-0 (>= 2.20.1-0ubuntu2.1); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing libgtk2.0-bin (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libgtk2.0-dev:
 libgtk2.0-dev depends on libgtk2.0-0 (= 2.20.1-0ubuntu2.1); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing libgtk2.0-dev (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libnotify-dev:
 libnotify-dev depends on libgtk2.0-dev (>= 2.10); however:
  Package libgtk2.0-dev is not configured yet.
dpkg: error processing libnotify-dev (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of network-manager-gnome:
 network-manager-gnome depends on libgtk2.0-0 (>= 2.16.0); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing network-manager-gnome (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openoffice.org-core:
 openoffice.org-core depends on libgtk2.0-0 (>= 2.10); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing openoffice.org-core (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openoffice.org-draw:
 openoffice.org-draw depends on openoffice.org-core (= 1:3.2.0-7ubuntu4.4); however:
  Package openoffice.org-core is not configured yet.
dpkg: error processing openoffice.org-draw (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openoffice.org-impress:
 openoffice.org-impress depends on openoffice.org-core (= 1:3.2.0-7ubuntu4.4); however:
  Package openoffice.org-core is not configured yet.
 openoffice.org-impress depends on openoffice.org-draw (= 1:3.2.0-7ubuntu4.4); however:
  Package openoffice.org-draw is not configured yet.
dpkg: error processing openoffice.org-impress (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of pidgin:
 pidgin depends on libgtk2.0-0 (>= 2.18.0); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing pidgin (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Setting up update-manager (1:0.134.12.1) ...
locale: Cannot set LC_CTYPE to default locale: No such file or directory
dpkg: error processing update-manager (--configure):
 subprocess installed post-installation script returned error exit status 245
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of update-notifier:
 update-notifier depends on libgtk2.0-0 (>= 2.14.0); however:
  Package libgtk2.0-0 is not configured yet.
 update-notifier depends on update-manager; however:
  Package update-manager is not configured yet.
dpkg: error processing update-notifier (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of xulrunner-1.9.2:
 xulrunner-1.9.2 depends on libgtk2.0-0 (>= 2.18.0); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing xulrunner-1.9.2 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of xulrunner-1.9.2-dev:
 xulrunner-1.9.2-dev depends on xulrunner-1.9.2 (= 22.214.171.124+build1+nobinonly-0ubuntu0.10.04.1); however:
  Package xulrunner-1.9.2 is not configured yet.
 xulrunner-1.9.2-dev depends on libnotify-dev; however:
  Package libnotify-dev is not configured yet.
dpkg: error processing xulrunner-1.9.2-dev (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                            dpkg: dependency problems prevent configuration of icedtea6-plugin:
 icedtea6-plugin depends on xulrunner-1.9.2; however:
  Package xulrunner-1.9.2 is not configured yet.
 icedtea6-plugin depends on libgtk2.0-0 (>= 2.8.0); however:
  Package libgtk2.0-0 is not configured yet.
dpkg: error processing icedtea6-plugin (--configure):
 dependency problems - leaving unconfigured
Setting up libgweather-common (2.30.0-0ubuntu1.1) ...
No apport report written because MaxReports is reached already
                                                              locale: Cannot set LC_CTYPE to default locale: No such file or directory
dpkg: error processing libgweather-common (--configure):
 subprocess installed post-installation script returned error exit status 245
No apport report written because MaxReports is reached already
                                                              dpkg: dependency problems prevent configuration of libgweather1:
 libgweather1 depends on libgtk2.0-0 (>= 2.11.0); however:
  Package libgtk2.0-0 is not configured yet.
 libgweather1 depends on libgweather-common (>= 2.24.0); however:
  Package libgweather-common is not configured yet.
dpkg: error processing libgweather1 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openoffice.org-style-galaxy:
 openoffice.org-style-galaxy depends on openoffice.org-core (>= 1:3.2.0~beta); however:
  Package openoffice.org-core is not configured yet.
No apport report written because MaxReports is reached already
                                                              dpkg: error processing openoffice.org-style-galaxy (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openoffice.org-common:
 openoffice.org-common depends on openoffice.org-style-default | openoffice.org-style; however:
  Package openoffice.org-style-default is not installed.
  Package openoffice.org-style-galaxy which provides openoffice.org-style-default is not configured yet.
  Package openoffice.org-style is not installed.
  Package openoffice.org-style-galaxy which provides openoffice.org-style is not configured yet.
No apport report written because MaxReports is reached already
                                                              dpkg: error processing openoffice.org-common (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 shared-mime-info
 libgtk2.0-0
 chromium-browser
 chromium-codecs-ffmpeg
 chromium-browser-l10n
 libevdocument2
 libevview2
 evince
 firefox
 gcalctool
 libgdict-1.0-6
 gnome-utils
 gtk2-engines-pixbuf
 libedataserverui1.2-8
 libgail18
 libgtk2.0-bin
 libgtk2.0-dev
 libnotify-dev
 network-manager-gnome
 openoffice.org-core
 openoffice.org-draw
 openoffice.org-impress
 pidgin
 update-manager
 update-notifier
 xulrunner-1.9.2
 xulrunner-1.9.2-dev
 icedtea6-plugin
 libgweather-common
 libgweather1
 openoffice.org-style-galaxy
 openoffice.org-common
E: Sub-process /usr/bin/dpkg returned an error code (1)

While typing command in terminal, command is not auto-completing.
Comment: Just a tidbit, include your errors in your questions, in case your pastebin links go down.  That way the errors are included *in* the question here.
Comment: Is this post related to the same problem? http://ubuntuforums.org/showthread.php?t=2079574
Answer: I hope you are not mixing up several topics.
First, your report states:
apt-get install pidgin
[...]
pidgin is already the newest version

Meaning: Pidgin is already installed.
Do you really need Pigdin on your server? Also, do you need Chrome?
Second: You have some dependancy problems.
Check that your /etc/sources.list is clean. A lot of good tips on how to solve dependancy probems can be found here: How do I resolve unmet dependencies after adding a PPA?. Try with a very minimal sources.list:
###### Ubuntu Main Repos
deb http://in.archive.ubuntu.com/ubuntu/ lucid main
deb-src http://in.archive.ubuntu.com/ubuntu/ lucid main

###### Ubuntu Update Repos
deb http://in.archive.ubuntu.com/ubuntu/ lucid-security main
deb-src http://in.archive.ubuntu.com/ubuntu/ lucid-security main

Then do sudo apt-get clean or sudo apt-get autoclean
Continue with solutions from the link above.
If satisfied, you can extend your sources.list line by line. Tip: Ubuntu Sources List Generator
Third: Not autocompleting might be a problem of your shell. Check if this resolves if you do chsh -s /bin/bash or try another shell. (More)
Fourth: Try installing a proper Locale (some locale errors appeared above):
sudo apt-get install language-pack-en-base
sudo dpkg-reconfigure locales

apt-get is broken (Ubuntu 10.04 Server)


What's wrong with the plumbing setup under this kitchen sink?

Question: A plumber came to my house to unclog my kitchen sink. As he was leaving, he glanced at the plumbing under my kitchen sink and said something was not done correctly, but I don't remember what he said was not done correctly. Can anyone spot any obvious problem with the piping under this kitchen sink? Thank you!
Comment: Too much pipe or fittings space could cause the disposal to not hang plumb. It also could also just be the sink sheet metal is warped to one side a fraction. As long as all gaskets and seals are leak proof it wouldn't be a serious problem.
Comment: Out of interest, exactly what and where was the blockage? Directly related to the plumbing in the pic?
Comment: I could be mistaken, but it also looks like the garbage disposal is wedged in at a bit of an angle.
Comment: @Tim The plumber came and stuck a sewer machine snake into the [cleanout hole](https://i.stack.imgur.com/Bhk3C.jpg) at the side of the house
Answer: The correct plumbing is one P-trap for both sinks like this:

The horizontal slopes down to the P-trap by 1/4in per foot, and is above the exit into the wall.
There should be no chain of P-traps as your picture seems to suggest. Trapping each sink separately and joining the drains after the traps is allowed.
IRC 2017:

P3201.6 Number of Fixtures Per Trap
Fixtures shall not be double trapped.

When emptying the far sink (the one further from the exit), so not when just running the tap, the velocity and siphoning can empty both traps, and there might not be enough residual trickle to re-fill the near trap (the one near the exit, second in chain) through the far sink, exposing the home to sewer fumes through the near sink.
Comment: What is the problem with having 'too many' traps?
Comment: Flow is impeded to such an extent that debris tends to build up, causing clogs.
Comment: @MikeBrockington a) OP wondered what the plumber meant. Trap chain not allowed in NA. b) when emptying the far sink (far from exit) there may not be enough residual to re-fill the near trap (near exit, second in chain) through the far sink, exposing the home to sewer fumes through the near sink. c) what **isherwood** wrote
Answer: The disposal side of the sink is "double-trapped" since there is another P trap in the other sink outlet, that this one empties into.
There should not be a trap between the two sink halves. The only way to correctly have a trap per sink bowl would be if they each directly connected to the drain, NOT one output connecting to the other input.
Comment: The trap between the two sinks serves no useful purpose whatsoever, so I'm really curious how this came to be. Why did anyone go through the pain of installing an extra P-trap just to isolate two drains that are both open to the atmosphere right next to each other…
Comment: @TooTea  Seems obvious to me that the trap is there in order to deal with the difference in level between the start and end of that segment of pipe. But may also be related to the sink on the left having a right-angle fitting - maybe no straight out fitting was available?
Comment: It may not be the *correct* way - but I don't see anything wrong with it like that. If either trap is going to get clogged, it'll be the disposal unit one, which means the other sink would still be usable at that time. I'd prefer two traps, both joining the waste pipe *after*, and so separate till into the final waste.
Comment: @tim, sequential traps slow flow and result in more debris accumulation. They're likely to cause more problems than they prevent. Thus, illegal.
Comment: @isherwood Good point. The aerator side of that second trap would have plenty unless extra water was run. 2 traps are bad. Having the disposal drain through 2 traps even worse.

What’s wrong with the plumbing setup under this kitchen sink?


Do horses spawn in desert biomes?

Question: I made a survival world that is just a giant desert, and I found saddles and horse armors. I was wondering if I could find any horses in the desert.
Answer: In the wild, no.
According to Minecraft wikia:

Horses spawn in plains and savannas in herds of 2–6.

However, villages naturally generate with stables and animal pens containing horses.

Do horses spawn in desert biomes?


Runescape 3: New account and Character Creation?

Question: Is Runescape 3 will you be creating a new character or can you continue on with your Character from Runescape 2.
Comment: Runescape 3 has not been released yet, so this is unanswerable.  I am voting to close based on that.
Comment: Normally, I would agree, but it's not really a new game so much as an unreleased update that has been in beta for months, and Jagex has announced the answer to this question about 17 times. I mainly hesitate to close because of the beta status.
Comment: @murgatroid99 A cursory scan showed it was more like a new game than just an update.  If it is just an update, then I withdraw the objection.
Comment: Ahh ok, I understand know. I thought it would be a new game. Sucks it isn't. I need a fresh start after I forgot my account info and I can't get i back.
Comment: @fbueckert The switch to Runescape 3 is quite expansive, but it will still be the same underlying game. It's basically just an interface update, a client update, a graphical update, an audio update, and new content all released at once into the existing game.
Comment: @Wojtek'Charkz'Hordyniec You know, if you need a fresh start you could just create another account. I'm pretty sure inactive accounts lose their names, so you could even get your name back eventually.
Comment: Yeah, I don't mind a fresh start as the last time I played it still had the old combat system. I don't like the recovery system that Ryunescape runs. Compared to like the Blizzard system. I never managed to recover my account with them. I mean I never remember my answer to a secrete I created in late 2008 :L
Comment: @murgatroid99 They were talking about a beta program, and I don't know of any major update to an MMO that doesn't do that through a test server, not a beta program.  That threw me off.
Comment: I don't know; I don't play other MMOs. But Runescape likes to do betas for major updates.
Answer: It's been confirmed that you keep your account information, characters, and items.
Runescape 3 isn't a new game, just a major update.


Calculate launch angle of projectile

Question: I'm creating a game and am having trouble designing aiming system for AI.
How do I calculate all angles at which the projectile can be launched from point $T_0(x_0,y_0)$ with launch velocity $v_0$ to reach the point $T_1(x_1,y_1)$ given the gravity $G$ and air resistance $d$?
If $d$ is 0.1, the projectile loses 10% of its speed every second.
Note, the projectile doesn't have to stop at $T_1$, it just needs to pass through the point.
Answer: The hard part is your air resistance.
You have a differential equation:
$\ddot{\boldsymbol{x}} = \begin{pmatrix}0\\-g\end{pmatrix} - d \dot{\boldsymbol{x}}$
So for the $x_1$ coordinate we get $x_1(t) = c_1 \frac{e^{-d\cdot t}}{d} + c_2$
and for $x_2$:
$x_2(t) = \tilde c_1 \frac{e^{-d\cdot t}}{d} -\frac{gt}{d} + \tilde c_2$
Now you need to bring your angle in:
$\dot{\boldsymbol{x}}(0) = v_0 \begin{pmatrix}\cos \alpha\\ \sin \alpha\end{pmatrix}$
With that and $\boldsymbol{T}_0$ you get the constants. Then you simply have to check if $\boldsymbol{T}_1$ is part of the trajectory. But I think you know how to do that.
EDIT:
Sorry you have to use $T_0$ and $T_1$ to get the constants since you want to know $\alpha$. Then you can calculate $\dot{\boldsymbol{x}}(0)$ (analytically) and then alpha.
Comment: Thanks for this answer. However, unless I'm mistaken, an angle is required to calculate the trajectory. Testing every single trajectory is what I was trying to avoid. I need to get the angle from the point $T_1$
Comment: Oh yeah sorry for that I didn't read your question correctly. When I wrote the answer I thought you wanted to check if $T_1$ is part of a specific trajectory. But actually only a minor change is required to get $\alpha$. Use $T_0$ and $T_1$ to get the constants instead of $T_0$ and $\dot{\boldsymbol{x}}(0)$ then you can calculate $\alpha$ using $\dot{\boldsymbol{x}}(0)$
Comment: While the drag law you use for air resistance is physically appropriate, I'm not sure it makes sense based on the problem statement (i.e. the speed decreasing by a factor of $d$ every second).
Comment: True, but I'm pretty sure that's what he wanted since he said air resistance.

Calculate launch angle of projectile


What are the little pedestal things for?

Question: I keep finding little pedestals usually in people's house that I can look at and they seem to all say the name of an enemy on them. What are they for? How do they work?
Answer: These pedestal are for mini figures of Mario enemies.
You can get the figures at the crane mini game,  in the south east part of the village.


Why doesn't my pressure tank fill as expected?

Question: I have a shallow well (1 hp pump) that feeds into a tank, and then travels another 200 feet to the house. If I turn on the pump, the tank does not fill up with water. If I let the air out of the tank it will fill properly. The gauge on the tank holds steady at 28 lbs of pressure.
I have a new pressure switch [30-50], and the new check valve never loses pressure. The prime gauges both read about 6 lbs with pump running.
Can anyone tell me if the problem is the tank, or is there something else I should pay attention to?
Comment: Either your pump is seriously broken or your ability to explain what's happening is. What's at 6 PSI? Where are those gauges plumbed in to? Where is the gauge that's "steady at 28 PSI" connected to? What's the water pressure at the house, pump running, pump stopped, pump starts? Can you post some pictures?
Comment: If the pressure will not go above 28 psig. as you said then you have problems at the pump or it's related accessories. Also you need to answer Ecnerwal's questions.
Comment: Hmm I was having some trouble here and was hoping to get some advice.   I was'nt askng to be lectured or to be judged.i by myself put this system in to code24 yrs ago so I do no alittle about it,second of all these words that are wrote for some strange reason are not the words that I typed in when I wrote this question how they were changed I don't no but I do agree about what gauge is what when I wrote this there was more detail didn't read it til now but since you don't have any kind of help ive been without water for nearly a month so ill wait for hopefully some other advise and rewrite
Comment: air pressure in the tank is set at 28 2 lbs below cut in pressure in the lines is enough for it to travel 200 ft up hil to the shower but not enough to operate the shower just trickles the tank is empty
Comment: one gauge is on te pump 1 gauge is in the line to the house past the pressure tank and cut of valve there basically no pressure anywhere water wont go in the tank unless all air is out. since the pup was strong enough to push water 200 ft up hill and flow alittle without any help from the pressure tank I thought that it was ok ??
Comment: havent figured out how to add pic
Comment: See if the instructions here help any: https://diy.meta.stackexchange.com/questions/523/how-can-i-add-an-image-to-a-question-answer
Comment: Feel free to edit the question and add more detail. Someone edited the question to improve the formatting, it's possible something was lost in translation.
Answer: 6 PSI amounts to 15 or 16 vertical feet rise, at most. 200 feet sideways and 15 feet up, not 200 feet up.
As such, I'd have to say your pump appears to be in need of service or replacement, based on what can be gleaned from what you've written. No water is going into the tank because the pump is evidently unable to make 30 lbs of pressure, much less 50. 6 PSI is not a functional well pump.
You described this as a shallow well pump - is it in fact a jet pump (recirculating, 2 pipes to the well), or is it in fact a straight shallow well pump (pure suction, one pipe to the well, less than 27 feet to the water surface)? A jet pump introduces a few more things that could be screwed up.
If you are facing replacement and it's a jet pump, I'd strongly suggest moving to  submersible, as they are much more efficient than jets, (you could replace a 1 hp jet with a 1/2 or 3/4 submersible and pump more water in most cases) and with today's technology, also more reliable.
Comment: thank you all for the advice but ill have to put this on hold ive got to go out of state my mother is failing will continue when I return,thanks again.


Garage upgrade from 20 AMP to 50 AMP

Question: I bought a house recently and I have some experience with electrical but I am not fully sure what would be the best course of action since I've never had a detached garage where the cable would be buried between the house and the garage.
I already have a 20 amp breaker in the main panel and a subpanel with 2 breakers at 15 amps in the garage. They are currently wired with a 12/3 gauge cable.
I would like to upgrade to a 50A breaker on the main panel so that I could have in the garage sub-panel:

20A 120v breaker
20A 240v breaker
15A 120v breaker

Would you all be able to help me try to figure out what I should do?
My current plan was to buy about 100 feet of 6/3 Romex and use the currently buried conduit to pass the new wire and install on the current main panel a 50A breaker.
My main panel is 200A, currently in NJ in case anyone knows any code problems that I should be aware of.
Where the conduit leaves the house:
Comment: Are you sure that the existing cable is in a continuous conduit run? What size and type is that conduit, for that matter?
Comment: 1/2 inch plastic? that's not a typo? I'm amazed anybody got 12/3 UF into that, and you'll need something bigger to get 6 AWG wies run.
Comment: One continuous conduit from the house to the garage, but from main panel to the external wall of the house where the conduit starts it's on the ceiling of a finished basement. I am not sure of the conduit size but I think it's 1 1/2 in or 1in.
Comment: Can you measure it and get back to us? Also, is there room for a junction box where the conduit enters the house at?
Comment: What type of conduit is it? *i.e.* is it plastic or metal?
Comment: Plastic, but it's a 1/2 inch conduit. And yes I have plenty of space to put a junction box. The conduit is about 60 feet
Comment: I always go up at least one size above the minimum conduit diameter required because my time is worth more than $1/hr.  When pulling wire (use water-based wire pulling lube, NO substitutes), it's a lot easier and faster if there's enough room to fold wires over, wrap with duct tape, etc.  Having dug a trench, I also like to put a spare conduit in for Ethernet, phone lines, whatever so I won't have to dig it all back up.
Comment: The obvious question to me would be what are you actually using this supply for? and hence what is the realistic maximum load.
Comment: @Bordoni -- yes, can you provide us the square footage of the garage + nameplate info for any fixed/major equipment you'll be putting in? (dust collector, A/C or heater, that sort of thing)
Comment: Planning on putting a Ductless Inverter Unit for cooling and heating, a dust collector, and a table saw. It's not a big garage 350SQFT.
Comment: I take it the mini-split is oh, a 6kbtu (1/2 ton) unit or so, given the size of the garage?
Comment: The smallest I can get for the brand I wanted is 12kbtu, I wish they had a 9 or 6 but o well.
Comment: @Bordoni -- can you get us brand/model info for the mini-split, as well as at least the HP rating on your dust collector then?
Comment: Yes for sure, MR Cool 12000 BTU for the Mini-Split and the dust collection would be a 1.5HP or 1.75HP depending on what I can accomodate.
Answer: Buried conduit is considered wet location. Romex typically refers to NM cable, which isn't approved for wet location.  Depending on conduit size you might be able to run 6/3 UF if you can find in quad (not flat) form, but it could be very hard to pull.
Also 6/3 costs about $2.50/ft, you would be better running 3@ #6 THWN at 0.54/ft and #10 ground @ 0.40/ft. (Actual price at my local Lowes). It would be cheaper and much easier to pull. You would need at least 3/4" conduit.
Protect the feeder with a 60A breaker in your main panel, and use a panel in the garage with a 60A or greater main disconnect, and ground rods. Buy a panel with many more spaces than you think you will ever need.
250 feet does have some voltage drop considerations, but the 40A load you describe will not create a problem even if full load at once.
Edit: I see you added it is 1/2" pvc, you'll never get #6 to fit, the largest wire you could legally fit is #10 THWN protected at 30A. I also see you added it's only 60 feet, voltage drop should not be a problem.
Answer: "Romex" (brand name) is usually used to refer to NM/B cable, which cannot be run in conduit that runs outdoors. It its not rated for wet locations, and all exterior conduits are wet by definition and in reality.
It's also a huge pain and requires huge conduit to run the UF cable (similar to NM/B, but waterproof, with a gray jacket, typically) in conduit.
Use THWN wires in conduit. If you don't want to run conduit the whole way, use a junction box at the end of the conduit to transition from wires in conduit to cable not in conduit.
Edit: if you want 50A service to the garage, you'll need to dig a new trench for new, larger conduit to the garage, since your conduit is 1/2" PVC. Be aware that your conduit MAY not actually extend the whole way - you may just have two shrt sections where the present cable goes into and comes up from the ground, with the UF cable "direct buried" with no conduit in between. That is a legitimate install method with UF cable (the conduit is "protection from physical damage" at the ends where it comes up) but less desirable (no ability to remove and replace the wire without digging it up - also less protection in the ground than wire in conduit.)
Comment: @Bordoni since you're from Brazil, _please_ take your time and be sure to ask _plenty_ of questions to ensure that you're doing things to _American_ (I presume that's where you are now) standards! (Not that there's anything _wrong_ with Brazilian standards, just that they're _different_.)
Comment: Ah, yes, after a more careful reading, I see that you are in NJ, @Bordoni. Do take care, take your time, read lots of Q&A here and make sure you do things safely. Sounds like you've got the background, you just need to learn some new rules.
Comment: Thank you so much! Yes, it's a UF cable, I was wondering why that cable was diff then the other ones. All of my EXP comes from Brazil where some of these standards are diff, completely diff names.
Answer: You don't 'technically' need to have a 50 amp drop from the main panel to support what you want in the garage:
<code>20A 120v breaker
20A 240v breaker
15A 120v breaker
</code>
You can do that with the existing wiring.  You only need 50 (55) amps from the main if you are going to be drawing from all those circuits at their maximum, at the same time.
It is a misnomer to think you need to 'add em all up' and the supply to the sub panel must be that much or greater.

Garage upgrade from 20 AMP to 50 AMP


TouchID for Mobile Web

Question: I had a quick question which after doing a lot of research I still cannot find.
Is it possible for me to create a mobile website that can call on iPhone TouchID, as long as the site is opened in iPhone browser itself, for authentication and login?
Answer: As far as I know TouchID is for local authentication only. In other words it cannot authenticate any remote action. Also it can only be called with native code within the application itself, not a browser.
However what you can do is to create a UIWebView contains what you intend to display in the application, and call native method to require Touch ID authentication. Then send out HTTP request with the authentication result. Some security issue may occur with this approach, but that is off the topic.

TouchID for Mobile Web


Google Nest E - incorrectly wired? (UK)

Question: I've just installed a Nest E in place of our old thermostat and it doesn't appear to be working correctly. The Nest E and the Heat Link both communicate with each other fine but when the power is switched on at the mains, the boiler doesn't power up.
I've attached a photo of the old thermostat and the Nest E wiring.
The old thermostat is an EPH RF1A-OT and the boiler is a Worcester Bosch Greenstar 4000.

I do have limited knowledge but having followed the guidance I believe everything seems correct (though guidance wasn't brilliant).
Have I wired it correctly?
Would really appreciate any advice. Thanks.
Comment: No strain relief, and that's not a GND terminal! Switch off and call an electrician.
Comment: Problem solved.
Answer: Turns out it was a blown fuse within the boiler itself, no other issues with wiring.
Comment: No issues - apart from using the protective earth conductor as switched live, which is potentially hazardous!
Answer: According to the installation manual:
https://nest.com/support/images/misc-nest-thermostat/nest-thermostat-e-install-guide.pdf, page 7:

"High-voltage wires If your thermostat is labeled 120V or 240V,   or
has thick wires with wire nuts, or has   L1 and L2 terminal blocks,
your system   is high voltage and isn't compatible with   the Nest
Thermostat."

The NEST thermostats are compatible with 24V systems. You are connecting it to 230V (see the print on the thermostat next to the N sticker), so you will most likely damage the thermostat if you power it up like that.
Comment: This is for US systems.

Google Nest E - incorrectly wired? (UK)


Should button positions ever rearrange depending on available functionality?

Question: In this example I have 4 product types. (Left hand tabs). There are some option buttons within those products (colour, fabric, Fingers and 'on sale') which, on selection will trigger additional option choices to the user.
However, some buttons are only ever applicable to certain products. (You wouldn't have a button to allow the user to choose how many glove fingers their gloves have if they're looking at Scarves, for example). So we're hiding those non-usable buttons in that instance.

download bmml source – Wireframes created with Balsamiq Mockups
However, we now end up with big gaps in the page. So, my question is - is it better to hide the buttons and leave a gap, or should the other buttons shuffle up and rearrange themselves so that they're all aligned?
The trouble with option A is that it leaves the visual UI a bit incomplete, like the CSS is broken. However the buttons are always in a consnstent position so if I tab between products I know the 'Colour' button is always in the same place.
The trouble with B is that, while it looks neater, constantly moving buttons around breaks the consistency of the system.
Which option is the least worst for the user? Or is there a 3rd option I've not considered? (I don't want to keep the buttons but grey them out, because I don't like the idea of showing a 'disabled' button that cannot be enabled by the user in any manner at all - it suggests temporarily disabled, not 'completely unavailable forever')
Comment: Can't you put all the "universal" buttons to the right and the article-specific buttons to the left of them? (In this example, you would have Fingers, Colour, Fabric, On Sale.) That way, the gap will always be to the left of the visible buttons.
Comment: I don't think simply removing the button doesn't cause any usability issues (I doubt any users with think "oh there used to be a fingers option here, why dont these scarves have that option"), it is a common filtering design. However, if it proves to be problematic perhaps try disabling instead of removing.
Comment: Option C: disable the buttons that don't apply to selected product. (I'd edit your post Jon and include option C to see what people say about that.)
Comment: @obelia yeah, I considered that, but I don't like disabling something that can never be enabled. It's a pointless button greyed out forever. Is that really the better option?
Answer: When I look at similar websites, they just show what is relevant. The "buttons" are placed in context and not as a button toolbar, which leads to less bonding of the location.
Answer:
The trouble with B is that, while it looks neater, constantly moving buttons around breaks the consistency of the system.

Consistency
Two things one must remember about consistency:

Consistency has different dimensions. Maintaining consistency in one dimension will pretty much always break it in another. In your example, option B breaks spatial consistency, but maintains layout (gaps) consistency.
Consistency has its origins in cognition - by delivering similar things in a similar way, the brain has to 'think' less due to the similar patterns.

One key problem with consistency is that it is used as an automatic reasoning mechanism by designers, without actually running a proper cognitive analysis (which I'll attempt next)
Spatial orientation

The argument against option B is that of positional (spatial) consistency, the outcome of which is spatial disorientation. But for spatial disorientation to happen, spatial orientation has to happen first, which means users has to memorise the position of screen elements.
Spatial orientation (memorising position) happens and strengthen in two principle ways:

Subjective importance - you will remember where your city is on the world map, but not where Uganda is on the world map (unless Uganda is somehow important to you).
Repeated usage - for example, most Mac users will remember that the 'close' button is on the top-left of the window.

Now ask yourself if you can remember (hoping you are not in your kitchen):

Where the kettle is in your kitchen.
The placement (ie, order) of each and every button on your microwave.

I suspect you'll remember the former but not the later (perhaps with the exception of the start/stop button).
What's more, being of visual nature and on screen, when interacting with controls:

There is always a feedback mechanism between the eye and the operating hand - your brain (subconsciously) inspects the label of the button as you approach it. This is different from the cold and warm tap position, which with time become part of muscle memory (and your eye may ignore the blue/red colours).
There is no muscle memory as you are interacting with a dynamic display.

Conclusion
Essentially, the chance that any users will:

Remember the position of these buttons
Approach a button without inspection

is extremely unlikely.
So option B is all good.
Answer: You should definitely not use option A, in my opinion.
There are a number of problems with using option A, for example:

The gap implies they should be given visual separation, when in fact
the options are related.
What happens when the options grow and you have multiple gaps? It will take a lot of space with gaps of white space.
What happens when you have more options removed than presented? You'll have floating elements in the page.

Your point about option B being inconsistent - the group of buttons are consistent in relation to the other groups of UI elements, so I don't think this is a problem.


A simple second order differential equation

Question: When I try and solve the equation:
\begin{equation}
\frac{\partial^2 \psi}{\partial x^2}=-k^2\psi
\end{equation}
I get a solution in the form of:
\begin{equation}
\psi=Ae^{-ikx} +Be^{ikx}
\end{equation}
which I believe is right, but I often see the answer written as:
\begin{equation}
\psi=Asin(kx)+Bcos(kx)
\end{equation}
which I believe is just obtained using Euler's formula but I feel like if that's the case, then the sin terms would cancel out. Can someone explain how to go from the first form to the second.
Answer: Let $$\psi=Ae^{-ikx} +Be^{ikx}=A\Big(\cos(kx)-i\sin(kx)\Big)+B\Big(\cos(kx)+i\sin(kx)\Big)$$ Now expand and group together the $\sin(kx)$ and the $\cos(kx)$.
So $$\psi=(A+B)\cos(kx)+i(B-A)\sin(kx)=C \cos(kx)+D\sin(kx)$$ In the two expressions you wrote, $A$ is no more $A$ and $B$ is no more $B$ .


how select two radio button with one click?

Question: choose?

<input id="id_1" type="radio" value="1" name="349">Google
<input id="id_2" type="radio" value="2" name="349">chrome

<input id="id_3" type="radio" value="3" name="349">Microsoft

<input id="id_4" type="radio" value="4" name="349">IE

When the key is pressed Google, Chrome button is selected at the same time.
Thank you!
Comment: You can't select two radio button, you want `checkbox`
Comment: 2 solutions : use different name of radio button. One for the browser second one for the compagnie. Or use checkbox with a lot of control
Comment: What to do? How to do it?
Comment: Do you want that when Google radio is selected, automatically Chrome should be selected ?
Comment: @hamed The question is not clear, add the current behaviour and expected behaviour
Comment: yes ,That's exactly what I want!
Comment: Why dont you use check box?
Comment: Why don't you just change `Google` to `Google Chrome` ?
Comment: I want that when Google radio is selected, automatically Chrome should be selected. I want not use checkbox
Answer: If you want easy answer then go with jquery solution and don't forget to change the name of radio button or else it will be difficult with same name... See here Demo
I have added jquery onclick event and on click of google, selecting the another radio button. See fiddle for more info..hope it will help
Comment: check fiddle plz..i already mention that..i want my answer clean that's why i added jsfiddle..
Comment: @Leothelion You just mentioned in your [previous comment](http://stackoverflow.com/questions/32220725/how-select-two-radio-button-with-one-click#comment52325022_32220948), that the other answer without code is low quality one, and you have committed the same mistake now.
Comment: @PraveenKumar, thanx for checking my history..but i have provided jsfiddle..please check that comment back as there were no code lines or jsfiddle but in my answer i have proivded jsfiddle with code and also mention that what i did in that fiddle..m wonder why can't you see difference between my answer and that answer.
Comment: well let me tell you one condition..i want to center align my div with display:table-cell, how can i..and if user will post make it center..then this is the answer?? or use vertical-align:middle please..this will be the answer..i don't know why you are pointing to my answer when its clear with jsfiddle..
Answer: There are two solutions :
you need to change only two radio buttons
 - Google Chrome
 - Microsoft IE
and in this case you can make 2 radio buttons.
second solution, you can use jquery with same html.
if id_1 clicked then also id_2 should be checked and so on with 2nd Microsoft IE.
Comment: well its not the answer..but the comment..come with proper solution and please don't post such low quality answer without any code..
Answer: Radio button is supposed to be allowing only a single selection. You have got a few solutions here:

Have a sub radio button.

Radio button with a different name.

Have checkboxes instead of radio buttons.

Checkboxes are really used for multiple selections.

Snippet
This would demonstrate all the solutions:

Radios

    <input type="radio" name="comp" name="comp"> Company: Google

<input type="radio" name="comp-g" id=""> Chrome

<input type="radio" name="comp-g" id=""> Chrome

<input type="radio" name="comp" name="comp"> Company: Microsoft

<input type="radio" name="comp" name="comp"> Company: Apple

Checkboxes

    <input type="checkbox" name="comp" name="comp"> Company: Google

<input type="checkbox" name="comp-g" id=""> Chrome

<input type="checkbox" name="comp-g" id=""> Chrome

<input type="checkbox" name="comp" name="comp"> Company: Microsoft

<input type="checkbox" name="comp" name="comp"> Company: Apple


Grep command linux regular expression

Question: command: grep kishan /etc/passwd
output: kishan:x:1000:1000:Kishan Kotadiya,,,:/home/kishan:/bin/bash
I want just the user full name "Kishan Kotadiya" can you help me with that?
thanks in advance.
Comment: This is yet another fantastic example of a poorly asked question.  Could you please visit the [Help Center](http://stackoverflow.com/help)?
Answer: You can use this awk one liner, replaces your grep too:
awk -F'[:,]' '/kishan/{print $5}' /etc/passwd
Kishan Kotadiya

Answer: You could use cut on the output to get the 5th : separated substring, then reverse it, strip the 3 leading chars (which are , characters) and then reverse the string back to its original order.
grep kishan /etc/passwd | cut -d: -f5 | rev | cut -c 4- | rev

Grep command linux regular expression


Linear transformation $T:\mathbb{R}^3 \rightarrow \mathbb{R}^3$ with two vectors and finding a result

Question: My title is bad but I'm not quite sure how to ask this in English as it is not my first language.
I have a linear transformation $T:\mathbb{R}^3 \rightarrow \mathbb{R}^3$ with vectors $x = (4,6,2)$ which in $T(x) = (8,10,4)$ and vector $y = (2,2,4)$ which in $T(y) = (6,-2,4)$. Find $T(2,6,-8)$.
I know how to do this with three vectors, but its strange that I can't seem to figure out with two vectors. Should the third vector I use be some result through the use of vectors x and y?
Any help is appreciated, thank you!
Answer: Hint: $(2, 6, -8) = 2 \cdot (4, 6, 2) - 3 \cdot (2, 2, 4)$.


Can I put the burner head in the oven during self cleaning?

Question: My renter moved out an left a grimy mess.  The filth on the stove top actually backed-up into the nooks and carnies of surface burner head, and seems almost impassible to clean.
Since the surface burner heads (figure 1) do not have an enamel coating, I was wondering, is it safe to stick them in the oven during the self clean cycle?
If so, would I be able to put the enameled surface burner caps (figure 2) and grates in as well?
Figure 1: Burner head designs make them hard to clean:

Figure 2: Burner caps have a flat enameled surface and are generally easier to clean:

Images sourced from amazon
Comment: Ugh! Some people. Too bad you can't put the whole range in for self clean!
Answer: The self-clean temperature won't get high enough to melt the metal -- and the burner pieces are subject to pretty high heat anyway.  I have cleaned aluminum and enameled parts in a self-clean cycle and the only time I have had problems is with large surface-area part (think a frying pan or something) -- in this case you might warp the metal by subjecting it to such high heat.  I think the pieces you have will be just fine.
Comment: Tried it last night, both the burner head and the burner cap came out clean and undamaged!!!!  I'm trying it with the burner grates now!  :-)
Comment: I put all three - burner heads, caps and grates - in a self cleaning cycle once a year with no problem.
Answer: That's not paint, it's an enamel. I think that any of the flame-contact steel parts should be just fine (sometimes there are aluminum parts, which I'd feel less comfortable with).  Magnets stick to steel not to aluminum, that's how you can tell.
Comment: The "burner head" is an aluminium alloy; the "burner cap" is steel with an enamel. The cap is a smooth surface and thus easier to clean than the head; hence my main concern is about the burner head.
Answer: In my experience I actually forgot about my non stick frying pan in when I turn the self clean on and there was absolutely nothing left except a small pile of ash.
Comment: This does not provide an answer to the question. Once you have sufficient [reputation](https://diy.stackexchange.com/help/whats-reputation) you will be able to [comment on any post](https://diy.stackexchange.com/help/privileges/comment); instead, [provide answers that don't require clarification from the asker](https://meta.stackexchange.com/questions/214173/why-do-i-need-50-reputation-to-comment-what-can-i-do-instead). - [From Review](/review/late-answers/138295)
Comment: As it's currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


Load types from DLL in run time

Question: I need to execute a method in an assembly loaded during runtime. The assemblies that I'm going to load are plugins that contain interface implementations.
This is the loading class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Reflection;

namespace Stub.Logic {
    public class DllReader {
        private static List<Type> connectionTypes = new List<Type>();

        public static void LoadConnectionTypes(string path) {
            DirectoryInfo dllDirectory = new DirectoryInfo(path);
            FileInfo[] dlls = dllDirectory.GetFiles("*.dll");
            foreach (FileInfo dllFileInfo in dlls) {
                Assembly assembly = Assembly.Load(dllFileInfo.FullName);
                connectionTypes.AddRange(assembly.GetTypes());
            }
        }

        //public static Connection GetConnection(string connectionTypeName) {
        //    return new Connection();
        //}
    }
}

I'm getting this error:

Could not load file or assembly '..\Plugins\MqConnection.dll' or one
  of its dependencies. The given assembly name or codebase was invalid.
  (Exception from HRESULT: 0x80131047)

This is the loaded assembly:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.IO;
using Stub.Logic;

namespace MqConnection {

    public class MqConnection : Connection {
        // Stuff here...
    }
}

What am I doing wrong?
Answer: Assembly.Load takes an Assembly name, not a file path. Use Assebmly.LoadFrom instead

Load types from DLL in run time


Proper use of libvlc_media_open_cb

Question: I'm trying to use the libvlc_media_new_callbacks function to play media from memory using libvlc. This function expects pointers to four callback functions: Open, Read, Seek, and Close.
Declare Function libvlc_media_new_callbacks Lib "libvlc.dll" (Instance As Ptr, OpenCB As Ptr, ReadCB As Ptr, SeekCB As Ptr, CloseCB As Ptr, Opaque As Ptr) As Ptr

Dim opaque As Ptr = SomeOpaqueValue()
Dim handle As Ptr = libvlc_media_new_callbacks(instance, AddressOf MediaOpen, AddressOf MediaRead, AddressOf MediaSeek, AddressOf MediaClose, opaque)

The Read, Seek, and Close callbacks all work fine if I don't specify an Open callback but that means libvlc won't know how long the media is.
When I do specify an Open callback it gets invoked with the correct opaque parameter but the other callbacks get a null pointer instead. This makes it impossible to know which stream the callback should be working on.
Have I misunderstood the purpose of the open callback?
Here are my callback functions:
Shared Function MediaOpen(Opaque As Ptr, Buffer As Ptr, ByRef BufferSize As UInt64) As UInt32
  Dim r As BinaryStream = Streams.Lookup(Opaque, Nil)
  If r = Nil Then Return 1 ' invalid Opaque

  Buffer = Nil  ' Not sure what to do with this parameter
  BufferSize = r.Length
  Return 0
End Function

Shared Sub MediaClose(Opaque As Ptr)
  If Streams.HasKey(Opaque) Then Streams.Remove(Opaque)
  If Streams.Count = 0 Then Streams = Nil
End Sub

Shared Function MediaRead(Opaque As Ptr, Buffer As Ptr, BufferSize As Integer) As UInt32
  Dim r As BinaryStream = Streams.Lookup(Opaque, Nil)
  If r = Nil Then Return 0 ' invalid Opaque

  Dim mb As MemoryBlock = Buffer
  Dim data As MemoryBlock = r.Read(BufferSize)
  mb.StringValue(0, data.Size) = data
  Return data.Size
End Function

Shared Function MediaSeek(Opaque As Ptr, Offset As UInt64) As Int32
  Dim r As BinaryStream = Streams.Lookup(Opaque, Nil)
  If r = Nil Then Return 1 ' invalid Opaque
  If Offset > r.Length Then Return 1 ' invalid offset

  r.Position = Offset
  Return 0
End Function

Comment: Just a guess: Could it be that you need to return a value from Open, and that value will be passed to the other calls instead of the opaque value?
Comment: The documentation says to return zero for success and non-zero otherwise, which I'm doing.
Answer: According to the docs, you have to allocate a buffer and return its address in the open's Buffer parameter (you need to change it into a ByRef parm for that!). Then you'll get that same buffer ptr passed in the other functions.
Ideally, you'd set
Buffer = r

in MediaOpen. But Xojo won't let you. Instead, you need to maintain a Dictionary in which you store r and then associate that with a value you can assign to the Buffer parm.
Here's an example (not tested):
Static Property OpenedBuffers as Dictionary
Static Property OpenedBufferID as Integer

Shared Function MediaOpen(Opaque As Ptr, ByRef HandleOut As Integer, ByRef BufferSize As UInt64) As UInt32
  Dim r As BinaryStream = Streams.Lookup(Opaque, Nil)
  If r = Nil Then Return 1 ' invalid Opaque
  if OpenedBuffers = nil then OpenedBuffers = new Dictionary
  OpenedBufferID = OpenedBufferID + 1
  OpenedBuffers.Value(OpenedBufferID) = r
  HandleOut = OpenedBufferID
  BufferSize = r.Length
  Return 0
End Function

Shared Function MediaRead(Handle As Integer, Buffer As Ptr, BufferSize As Integer) As UInt32
  Dim r As BinaryStream = OpenedBuffers.Value(Handle)
  ...

Shared Sub MediaClose(Handle As Integer)
  Dim r As BinaryStream = OpenedBuffers.Value(Handle)
  OpenedBuffers.Remove (Handle)
  If Streams.HasKey(r) Then Streams.Remove(r)
  ...

Hope that helps
Comment: I'd already set up a Dictionary to associate the `Opaque` value with the correct stream. So basically all I did was copy the `Opaque` parameter into `HandleOut` parameter and it worked!

Proper use of libvlc_media_open_cb


Is this drywall mud peeling under the paint?

Question: I just bought my first house, and before moving in I've been doing a little bit of small-scale DIY stuff. I just removed an awkwardly-placed walk in closet in the primary bedroom, and the paint on side wall it was connected to started peeling (no big deal), but then I noticed the peeling was pretty thick. Maybe they put mud and paint over wallpaper? I thought the side wall might be plaster before I took apart the closet wall (which was added by the last owner). For context, the house was built in 1910, but I think the closet was added in 2000/2001.

I also can't totally tell what's beneath the peeling. It looks like maybe it's just wood? There's this screw that's now exposed:

How can I patch this? I was thinking maybe I can cut a straight line in it and peel to there, then sand the edge, mud over it, sand, prime, and paint. Would that work? What kind of mud should I use? I've never patched a wall before, and I'm going to practice a little first just by patching some holes from where the closet shelves were drywall anchored in (to a different wall that is drywall). Any help is appreciated – thank you!
Update: I looked closer at what looked like wood and noticed what looked like a leaf design. I scraped away and found plaster:
I think I'm going to at least start by scraping away at the rest of the wall and then either applying a skim coat myself or call a plasterer to do it for me. Thanks for the help!
Comment: @AloysiusDefenestrate I'm doing an at-home test today to get an idea if there's lead!
Comment: It looks to me more like multiple layers of paint over multiple layers of wallpaper.
Comment: It was probably someone just slapping paint on the wall without doing any prep work.  Prep work is about 80 or 90% of a good paint job.  Remove all loose paint, sand, clean, dust, wipe down, clean again and then you might do a good paint job.
Comment: That sure does look like wood to me.  What happens if you poke it with a screwdriver?
Comment: Standard warning about lead paint: don't sand it without professional-style abatement measures. Flakes are reasonably okay if you clean up and don't have infants chewing on them. See the EPA website for more info.
Comment: @Huesmann I poked pretty hard with a utility knife and it seems solid (no rot). Assuming it is wood (I might peel a little more to be sure), is it fine to just mud over it? The wall is pretty even, and I'd like to avoid redoing this entire wall if I can help it.
Answer: There isn't any mud in your picture.   It looks like someone has painted over wallpaper, wallpapered, then painted over it again.    This is a nightmare amount of work - to the point where I would contemplate rehanging drywall.
There isn't a right way to get rid of this mess or an easy way out.   You have to take off all layers to start over - even a flat layer will fail over time.     What you end up with is drywall terribly messed up after.   Hence might as well rip out the sheet and put up new drywall as new drywall will require less mudding and work.
Comment: Circa 1910 likely horse hair  and wood lath plaster was involved or even steel mesh.  I  agree  to consider redry- walling. A good place to learn the skills is doing a closet
Comment: It turns out the thing that looks like wood is actually more wallpaper… I scraped it away and found plaster
Comment: Wallpaper can get very very wood like and thick if it has a few coats of paint on it.   Especially lead paint and oil based.    I still think it is a waste of time.     Also the more you work on it you may need to remediate which if you have to remediate a closet for lead (and you have no children around eating walls) it is a complete hassle and waste of money.


Vim command line: last sign color differs

Question: I am using a slightly modified version of the wombat256 colorscheme. There is this tiny black thing at the end of the command line that drives me crazy.
Does someone know why it doesn't use the command line color and is black instead? As far as I know there is no special color setting for the command line (it should have the same colors as "Normal").

Here is my slightly modified version of the wombat256 color scheme:
<code>" Vim color file
" Original Maintainer:  Lars H. Nielsen (firstname.lastname@example.com)
" Last Change:  2010-07-23
"
" Converting for 256-color terminals by
" Danila Bespalov (firstname.lastname@example.com)
" with great help of tool by Wolfgang Frisch (email@example.com)
" inspired by David Liang's version (email@example.com)

set background=dark

hi clear

if exists("syntax_on")
    syntax reset
endif

let colors_name = "wombat256fixed"

" General colors
hi Normal       ctermfg=254     ctermbg=234     cterm=none      guifg=#f6f3e8   guibg=#242424   gui=none
hi Cursor       ctermfg=none    ctermbg=241     cterm=none      guifg=NONE      guibg=#656565   gui=none
hi Visual       ctermfg=7       ctermbg=238     cterm=none      guifg=#f6f3e8   guibg=#444444   gui=none
" hi VisualNOS
" hi Search
hi Folded       ctermfg=103     ctermbg=238     cterm=none      guifg=#a0a8b0   guibg=#384048   gui=none
hi Title        ctermfg=7       ctermbg=none    cterm=bold      guifg=#f6f3e8   guibg=NONE      gui=bold
hi StatusLine   ctermfg=7       ctermbg=238     cterm=none      guifg=#f6f3e8   guibg=#444444   gui=italic
hi VertSplit    ctermfg=238     ctermbg=238     cterm=none      guifg=#444444   guibg=#444444   gui=none
hi StatusLineNC ctermfg=243     ctermbg=238     cterm=none      guifg=#857b6f   guibg=#444444   gui=none
hi LineNr       ctermfg=243     ctermbg=234     cterm=none      guifg=#857b6f   guibg=#242424   gui=none
hi SpecialKey   ctermfg=244     ctermbg=236     cterm=none      guifg=#808080   guibg=#343434   gui=none
hi NonText      ctermfg=244     ctermbg=234     cterm=none      guifg=#808080   guibg=#242424   gui=none

" Vim >= 7.0 specific colors
if version >= 700
hi CursorLine                   ctermbg=233     cterm=none                      guibg=#121212
hi MatchParen   ctermfg=7       ctermbg=243     cterm=bold      guifg=#f6f3e8   guibg=#857b6f   gui=bold
hi Pmenu        ctermfg=7       ctermbg=238                     guifg=#f6f3e8   guibg=#444444
hi PmenuSel     ctermfg=0       ctermbg=192                     guifg=#000000   guibg=#cae682
endif

" Syntax highlighting
hi Keyword      ctermfg=111     cterm=none      guifg=#8ac6f2   gui=none
hi Statement    ctermfg=111     cterm=none      guifg=#8ac6f2   gui=none
hi Constant     ctermfg=173     cterm=none      guifg=#e5786d   gui=none
hi Number       ctermfg=173     cterm=none      guifg=#e5786d   gui=none
hi PreProc      ctermfg=173     cterm=none      guifg=#e5786d   gui=none
hi Function     ctermfg=192     cterm=none      guifg=#cae682   gui=none
hi Identifier   ctermfg=192     cterm=none      guifg=#cae682   gui=none
hi Type         ctermfg=192     cterm=none      guifg=#cae682   gui=none
hi Special      ctermfg=194     cterm=none      guifg=#e7f6da   gui=none
hi String       ctermfg=113     cterm=none      guifg=#95e454   gui=italic
hi Comment      ctermfg=246     cterm=none      guifg=#99968b   gui=italic
hi Todo         ctermfg=245     cterm=none      guifg=#8f8f8f   gui=italic

" Links
hi! link FoldColumn     Folded
hi! link CursorColumn   CursorLine

" new setting for current line number
hi CursorLineNr ctermfg=208 ctermbg=233   cterm=none    guifg=#FD971F    guibg=#121212   gui=none

" highlight ColorColumn
hi ColorColumn ctermbg=233 guibg=#232323

" vim:set ts=4 sw=4 noet:
</code>
Comment: oh.... It seems I never wrote such a long command till the end of command line...  my focus is always on the beginning of the line.. :)
Comment: Cannot see your screenshot
Comment: just double checked it - I can see the screenshot right under the text.
Answer: This looks like a bug, that was fixed with patch 7.4.627
Comment: Thanks for the hint. I'm on 7.4.617-1 atm, so I will wait until a new package arrives.
Comment: Installed 7.4.663-1 today (arch) and the problem is gone. Thx!