Minimal BASH-like on LUKS-encrypted install after format of secondary SSD

Question: I can't load ubuntu after I formatted the old SSD I used to have Windows on and that I thought had nothing to do with Ubuntu's boot. The Ubuntu partition is LUKS encrypted and in GRUB I am able to list the following (only the 1TB disk I have ubuntu on is connected as I disconnected the old one):
grub>ls
(proc) (memdisk) (hd0) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1)

Using ls on the partitions i get the following:
Device hd0: No known filesystem detected - Sector size 512 byte - Total size 976762584 KiB

GPT1:
Partition hd0,gpt1: Filesystem type fat, UUID ______ - Partition start at 1024KiB - Total size 524288 KiB

(hd0,gpt1)/ contains a efi/ folder, which contains ubuntu/ and Boot/. ubuntu/ has a grubx64.efi file in it, while Boot/ contains bootx64.efi.grb and bootx64.efi
GPT2:
Partition hd0,gpt2: Filesystem type ext*, Last modification time _____ UUID ______ - Partition start at 525312 KiB - Total size 1750016 KiB

(hd0,gpt2)/ contains:
lost+found/ (empty), efi/ (empty), grub/
and a lot of linux files which from other guides i tried to look online seem important to restore the boot such as:
vmlinuz-6.2.0-20-generic, initrd.img-6.2.0-20-generic, vmlinuz, initrd.img, and others.
GPT3:
Partition hd0,gpt3: No known filesystem detected - Partition start at 2275328KiB - Total size 974486528 KiB

I tried the following:
>set root=(hd0,gpt2)
>set prefix=(hd0,gpt2)/
>linuxefi /vmlinuz-6.2.0-20-generic
>initrdefi /initrd.img-6.2.0-20-generic
>boot

And it seems like it starts (black screen with waterfall of white text) while it always gets stuck at
[1.8xxxxx] i915 0000:00:02.0: enabling device (0000 -> 0003)

Do I have to once again bulldozer the system and reinstall everything or am I missing something? Thank you in advance :)
Answer: Using this guide, in particular the "Via Live Image" part:

created a live Ubuntu USB, booted into it via "Try Ubuntu".

installed boot repair:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install boot-repair

Using "Disks" I mounted the unmounted partitions of my disk and unlocked the encrypted data partition (Boot-repair could not fix the problem before doing such)

Launched boot-repair and followed its instructions to restore the boot

I will leave this question/answer here as I couldn't find any guide specifically for the scenario I was in, hoping this will be helpful to someone in the future. Boot-repair is a great tool!


independ service from database / EDM model - test web service by nunit

Question: Hey,
I have service and EDM model - Model1Container :
public class Service1 : System.Web.Services.WebService
    {

        Model1Container modelDataBase = new Model1Container();

        [WebMethod]
        public List<Person> getData()
        {
            using (modelDataBase = new Model1Container())
            {
                var a = from aa in modelDataBase.Person
                        select aa;

                return a.ToList();
            }
        }
}

and I want to test this web service with nunit. But I find problem - in service I use model from production database, but in test I want to test service with development database.
How can I independ service from database ?
public class TestClass
    {
        Model1Container model = new Model1Container();

        [TestFixtureSetUp]
        public void SetUp()
        {
            using (Model1Container model = new Model1Container())
            {
                Person p = new Person()
                {
                    name = "Michal",
                    surname = "Nowak",
                    age = 12,
                    dateOfBirth = new DateTime(1987, 12, 3)

                };
                model.AddToPerson(p);
                model.SaveChanges();
            }
        }

        [Test]
        public void TestGetData()
        {
            WebService1.Service1 service = new WebService1.Service1();
            var actual = service.getData();
            Assert.AreEqual(1, actual.Count);
        }
    }

Answer: Add a property setter to your service and inject your own model container before executing the test.
You would also need to refactor your service so that it doesn't init the container in the service method. (Or only inits if it's null)


jQuery Hover Drop-Down-Menu Full Width Size

Question: I have a vertical menu in my Website. Now i need a dropdown system in some links.
I've see this example on the internet: http://jsfiddle.net/4jxph/3018/
But i want a full width submenu. The Dropdown System of Sony is what I want.
Dropdown system by Sony: Sony
I've always craetet a full width size dropdown menu.
My Code: http://www.jsfiddle.net/3aK9k/4.
So what i want, when i hover the content so the submenu and again to the menu link which slidedown the submenu than the submenu should be there without some moves.
I hope I've explain what i want to do. I think it is possible but that overwhelmed my knowledge of JS and jQuery.
Can anyone tell me how to that?
Comment: What do you mean by **without some moves**?
Comment: One more question - Do you want exact output as the `sony.de` link given?
Comment: @Zword with "without some moves" i wanna say that the content have no animation.
Comment: I want this exact proportion to the drop-down menu of Sony, it need not be the same code. @Zword
Comment: So you dont want slidedown animation?
Comment: I want the slideDown animation for the Container by hovering the link. When you hover the Container and back to the link which Displays the Container then shouldnt the Container have the slideDown Effect again.
Comment: Check my answer and tell if any changes are needed
Answer: HTML

Home

        DropDown 1

Item1

Item2

Item3

Item4

        DropDown 2

Other

Other Test

jQuery
var stop = true;
var hovered;
var timeout;

$('.nav').hover(
    function(){
        clearTimeout(timeout);
        stop = true;
        hovered = this;
        timeout = setTimeout(function(){
        if($(hovered).hasClass('nav_menu_link_drop')){
            $('.content').css('z-index',0);
            $(hovered).next('.content').css('z-index',5);
            $(hovered).next('.content').slideDown(350);
            timeout = setTimeout(function(){
                $('.content').not($(hovered).next('.content')).slideUp(350);
            },200);
        }
        else
            $('.content').slideUp(350);
        },400);
    },
    function(e){
        stop = false;
        clearTimeout(timeout);
        setTimeout(function(){
            if(!stop)
                $('.content').slideUp(350);
        },500);
    }
);

$('.content').hover(
    function(){
        stop = true;
    },
    function(){
    }
);

$('#nav_menu').hover(
    function(){
    },
    function(){
        timeout = setTimeout(function(){
            $('.content').slideUp(350);
        },200);
    }
);

FIDDLE
Comment: @Selfproblemmade I was just working with the first fiddle, but I can take a take a shot at the second fiddle tomorrow.  That is if your question still needs an answer.
Comment: This look exactly like i've imaged
Comment: jeah that will be great :)
Answer: I have made slidedown in the fiddle which works exactly like sony.de:
Updated Fiddle(New)
HTML

Home

DropDown1

DropDown2

CSS
html,body{
    width:100%;
    height:100%;
    margin:0px;
    padding:0px;
}
#menu{
    position:relative;
    width:100%;
    height:80px;
    font-family:sans-serif;
}
#menu,#menu ul,#menu>ul>#mainMenu>li,#menu div{
    display:inline-block;
    margin-top:0px;
}
#menu >ul {
    position:absolute;
    top:0px;
    z-index:100;
    list-style:none;
    padding:0px;
    font-size:18px;
    height: 80px;
    width: 100%;
    background: none repeat scroll 0% 0% #FFA500;
}
#menu ul>#mainMenu>li{
    padding: 29px;
}
#menu ul>#mainMenu>li:hover{
    background: none repeat scroll 0% 0% rgba(0, 0, 0, 0.4);
    color: #FFF;
    transition: all 0.2s ease 0s;
}
#menu .submenu{
    position:absolute;
    bottom:0px;
    width:100%;
    background-color:white;
    border:1px solid black;
}

jQuery
var preClass="";
$('#menu>ul>#mainMenu>li').hover(function(){
    var curClass = $(this).attr('class');
    if(preClass!=curClass){
        $('.submenu[class*='+preClass+']').stop()
    .animate({'bottom':'0px'});
        $('.submenu[class*='+curClass+']').stop()
    .animate({'bottom':''+(-$('div[class*='+curClass+']').height())+'px'});}
    preClass=curClass;
});

$('#mainMenu').mouseleave(function(){
    preClass="";
    setTimeout(function(){
    if(preClass=="")
    $('.submenu').stop().animate({'bottom':'0px'});
    },350);
});

$('#menu').mouseleave(function(){
    preClass=""
    $('.submenu').stop().animate({'bottom':'0px'});
});

$('.submenu').hover(function(){
    preClass = $(this).attr('class').replace("submenu ","");
    $(this).css({'bottom':''+(-$(this).height())+'px'});
},
function(){
    if(preClass!=curClass){
    $(this).stop().animate({'bottom':'0px'});
    }
});

Fiddle with delay added like sony.de
Comment: @Selfproblemmade check the **New fiddle** in my answer.Tell if it works for you.If it works i will update my answer according to the new fiddle code
Comment: Just tell me `On switch links do you want slide down?` - ***Yes*** or ***No***
Comment: @Selfproblemmade ok i will try one more fiddle by what i have understood.Guess it will be the fiddle you want
Comment: @Selfproblemmade check my new answer with new fiddles added
Comment: this ist that what i exactly mean, hover the content and hover the link which slidesDown the content. The container slides down again this shouldnt be so
Comment: Just clarify what do you mean by "content" , "link" & "container" in the above comment
Comment: yeah can you add a slideup(350)?
Comment: when you leave the container or the link.
Your function should run like that :/  http://jsfiddle.net/3aK9k/25/
Comment: look at the link, i've change the fiddle
Comment: THIS LOOKS VERY GOOD the first Fiddle is that what i exactly want. Do you changed something in CSS?
And there is something wrong... :( When you hover a Dropdown link the and hover an other one, the container slidesdown, but when you do this again, there is no slidedown effect
Comment: @Selfproblemmade I am really not getting it clear when you want slidedown-slideup and when you dont.If its clear I can surely make the changes that will give the output you want
Comment: @Selfproblemmade you urself told in the first comment that the container shouldn't slide down again
Comment: It really looks like I want it, but when I go from one link to the other with the mouse, the content of the container swich and the container comes with a slide down, but if I do that again is no longer slide down there. **I want a slideDown and slideUp, YES!**
Comment: @Selfproblemmade but thats how its displayed in the very first fiddle
Comment: the new fiddle was ok http://jsfiddle.net/Zword/Fg2p2/1/, but i want the slidedown effect just when you hover the other link not by the same.
Comment: let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/49076/discussion-between-selfproblemmade-and-zword)
Comment: That's it man, i know you hate me :) because it took so long.
Comment: No @Selfproblemmade I dont hate u.Alwys glad to help
Answer: You can achieve that with only CSS. Cleaner, simpler.
Live demo here : http://jsfiddle.net/4jxph/3031/
Here's the modified CSS :
body {
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
background-color: #333333;
}

#container {
    margin: auto;
}

#header {
    background-image: url(images/header.png);
    background-repeat: no-repeat;
    height: 42px;
    width: 490px;
    margin-bottom: 20px;
}

#button {
    height: 32px;
    width: 184px;
    margin: auto;
}
#button:hover .file_menu {
    max-height: 100000px;
    opacity: 1;
}
ul, li {
    margin:0;
    padding:0;
    list-style:none;
}

.menu_class {
    border:1px solid #1c1c1c;
}

.file_menu {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    width:100%;
    border: 1px solid #1c1c1c;
    transition: all .2s;
}

.file_menu li {
    background-color: #302f2f;
}

.file_menu li a {
    color:#FFFFFF;
    text-decoration:none;
    padding:10px;
    display:block;
}

.file_menu li a:hover {
    padding:10px;
    font-weight:bold;
    color: #F00880;
}

Because you want it, here's the JS solution (cleaner than other answer):
var link = $("li[class^=nav_menu_link_drop]");

$(link).hover(

    function(){
        var content = $(this).next('div[id^="content"]');
        $(content).stop(true).slideDown(350);
    },
    function(){
         var content = $(this).next('div[id^="content"]');
         $(content).delay(350).slideUp(350);

    }
);

Is that doing the job ? http://jsfiddle.net/3aK9k/27/
Comment: i wanna the submenu in 100% width
Comment: It's 100% of window width there. Hmm no you're right, I guess I forgot to save : see it there > http://jsfiddle.net/4jxph/3031/
Comment: Yep sorry, I thought I gave you the last version : http://jsfiddle.net/4jxph/3031/
Comment: but i want a slideDown(350) and slideUp(350) animation  by displaying the submenu!! When you add this you will get the bounty
Comment: It's easy with CSS transitions. I'm on it.
Comment: can you add a delay? after leaving the mouse
Comment: I think we can't do that in pure CSS.
Comment: So, ok i've tried your CSS in this: http://jsfiddle.net/t3ADE/
But this doesn't work.. :( Why?
Comment: Because it's not what I told you :) See there, no more JS : http://jsfiddle.net/3aK9k/24/
Comment: Why would someone need JS for that ?
Comment: Read the topic of my question and my request by adding a bounty
Comment: Edited my answer with a clean JS solution.
Comment: Bugs ? Which bugs ? By the way : you didn't ask clearly what you're looking for, you didn't post any code in your question (as requested by SO guidelines), so you should be happy someone answers you :)
Answer: Check your needed code jSFiddle
Download code file from Box
HTML Code

Home

        DropDown 1

File

Edit

View

Insert

Modify

Control

Debug

Window

Help

        DropDown 2

2 File

2 Edit

2 View

2 Insert

2 Modify

2 Control

2 Debug

2 Window

2 Help

CSS Code
* {
margin: 0;
padding: 0;
}
#nav_menu {
    position: absolute;
    display: block;
    height: 80px;
    width: 100%;
    background: orange;
}
#nav_menu li {
    list-style-type: none;
    text-decoration: none;
    vertical-align: middle;
    height: 80px;
    display: inline-block;
    position: relative;
}
.nav_menu_link {
    color: black;
    font-size: 18px;
    height: 0;
    font-family: Arial;
    vertical-align: baseline;
    position: relative;
    display: inline-block;
    height: auto;
    padding: 29px;
}
.nav_menu_link:hover {
    background: rgba(0, 0, 0, 0.4);
    color: #FFF;
    transition: all .2s;
}
.nav_menu_link:hover .arrow.down {
    border-top-color: #FFF;
}

#content1:hover {
    display: block !important;
    width: 100%;
    height: auto !important;
    position: absolute;
}
#content2:hover {
    display: block !important;
    width: 100%;
    height: auto !important;
    position: absolute;
}
#content1, #content2 {
    width: 100%;
    height: auto;
    background: gray;
    display: none;
    position: absolute;
}

#file_menu {
    border: 1px solid #1c1c1c;
}

#file_menu li {
    width: 100%;
    height: 30px;
    background-color: #302f2f;
}

#file_menu li a {
    font-family: Arial;
    font-size: 14px;
    color:#FFFFFF;
    font-weight: bold;
    text-decoration:none;
    padding:5px 10px;
    display:block;
}

#file_menu li a:hover {
    color: #F00880;
}

JQuery
var link1 = $(".nav_menu_link_drop_1");
var link2 = $(".nav_menu_link_drop_2");
var content1 = $('#content1');
var content2 = $('#content2');

$(link1).hover(
    function(){
        $(content1).slideDown(350);
    },
    function(){
        $(content1).slideUp(350);
    }
);

$(link2).hover(
    function(){
        $(content2).slideDown(350);
    },
    function(){
        $(content2).slideUp(350);
    }
);

Comment: This looks pretty good but when you hover the submenu and hover the link which slides down the submenu the container should be constant
Comment: Assuming you change .nav_menu_link_drop_1 and 2 to .nav_menu_link_drop, you could simply do $('.nav_menu_link_drop').next().slideToggle(); You don't need to write the same code two times.
Answer: If I got you right you don't want the animation, for that simply set the animation time to 0. You dont need .stop() and you should consider using .hover() instead of mouseenter and mouseleave. Here is a link: http://api.jquery.com/hover/
Example:
$(link1).hover(
    function(){
        $(content1).slideDown(0);
    },
    function(){
        $(content1).slideUp(0);
    }
);

Here is your fiddle with updated code: http://jsfiddle.net/3aK9k/2/
EDIT: I just noticed but you have invalid html your div-tag is inside the ul-tag put it in your li... seriosly CHECK your markup... thats not the only wrong thing i noticed...
EDIT: Uhm... OK... maybe you should rethink your approuch, only because it works you shouldn't use invalid html
Comment: Look pretty good. But when i hover a link for the first time then should the content comes up with a duration of (350). When i hover the content and hover the link again then there should be no duration of slideDown or even no animation. I've add an animation duration, but this should only apply for the first time you hover a link: http://jsfiddle.net/3aK9k/4/
Comment: [http://jsfiddle.net/3aK9k/8/](http://jsfiddle.net/3aK9k/8/) do you mean something like that? But like I said you should check you markup and take a different approuch!
Comment: your fiddle code is the same you name in your answere, there is no difference. Please read the requirement of my Question, and on my comment to your answere.


Should the plastic walls of a shower kit have air bubbles?

Question: We had a corner shower installed awhile ago in our basement.
The kit came with thin acrylic walls that were glued to the waterproof gyprock behind.  However, there are air spaces between the lines of glue which allows the walls to move in certain places.  We have been having a problem with this shower leaking and were wondering if this movement was perhaps breaking the seal that the caulking makes between the floor of the shower and these walls.  The shower sits on a raised wooden platform built for the base of the shower, but there is also a bit of movement in the floor as an adult is in the shower.
I had heard from someone that on these showers you did not need to caulk the place where the acrylic walls meet the base, but that just seems wrong as I would expect mould to grow with pooled water behind the walls.
We were thinking of replacing the walls with a one piece firm acrylic piece and keeping the existing floor and glass sides and door.  Any thoughts on the best way to fix this leaky problem?

Leak Location
Answer: Proper shower systems should have a lip behind the base. Better systems apparently also have a gasket. So, in theory, no you don't need to caulk them. Bad ascii diagram:
<code> ++  +
 ||  | <----+ bottom of wall panel
 |+--+
 +---+
     | <----+ shower pan
     |
     +--------------------------------+
</code>
The idea is that any water that gets behind would shed down the lip and into the shower pan.
The catch is a) I'm not sure all shower systems are this well engineered and b) showers are more than water...there is dirt, grime, soap, hair, dead skin, other nasty body and soap residue. So, yea, it will still get grimy and is why most people still caulk it.
Comment: Part of the reason for this question is that although it was caulked originally, we had some water coming out of the side of the shower as shown in the picture below. Perhaps it is an engineering issues with how the shower was put together but if I do not know how leaving uncaulked would not just mean that the water would pool and come out the whole in the pic.

http://imgur.com/Vnv1v
Answer: You are absolutely right that the floor will move independently of the walls. The movement when an adult steps in is not as much as a full bath of water, say, but it is still enough that you need a flexible seal of some kind to avoid water pooling and mould growing.
I asked a similar question which @ChrisF answered very well which suggested that caulk should be flexible enough to cope. That is what I did, and so far I have had no leaks (I have taken the panels off to check every now and then)
Comment: I think the way to proceed will be to clean up all the old caulk and put something down that is more flexible. I will report how things go.


Tell kubectl to use /etc/hosts for looking up hosts

Question: When executing into a pod I get following message
Error from server: error dialing backend: dial tcp: lookup k8s-worker-node-a on 192.168.1.1:53: no such host

Is it possible to tell kubectl to use /etc/hosts to lookup machines as I have saved them inside there.
Comment: Can the API server resolve that hostname? It's insufficient for just your workstation to know the hostname, since the API server must be able to contact `kubelet` on the Node to construct the URL used to view the logs (which is what I bet you are trying)
Comment: @MatthewLDaniel This is the solution, post it as an answer so I can award it to you. Thank you very much! (But you lose your bet, I am trying to do a DNS lookup to check my if everything is working fine in my cluster ;) )
Comment: You're very kind to think of awarding the answer, thank you!
Answer: Can the API server resolve that hostname? It's insufficient for just your workstation to know the hostname, since the API server must be able to contact kubelet on the Node to construct the URL used to view the logs
Turning up the verbosity of kubectl will show the actual handshaking that goes on between your machine, the API server, and the kubelet on the Node, which is how we discovered a similar misconfiguration in our cluster.


button to save or update sql database

Question: I have a button and I want it to save data to the sql database if Dropdownlist5 has no value in it, but if Dropdownlist 5 has a value in it, I want the button to update the existing data in sql.  The problem is when Dropdownlist 5 has a value selected it just creates a new entry in the sql database and does not update the existing entry in sql.
<code>protected void Button1_Click(object sender, EventArgs e)
    {
        if (DropDownList1.SelectedValue == "" ||  DropDownList2.SelectedValue == "" || TextBox1.Text == "")
        {
            Label1.Text = "Fill In All Fields";
        }
        if (DropDownList5.SelectedValue !=null)
        {
            SqlConnection con = new SqlConnection("Data Source=ucpdapps2;Initial Catalog=OnCallWeb;Integrated Security=True");
            con.Open();
            SqlCommand comm = new SqlCommand("Update Dispatcher_Roles set Name = '" + DropDownList1.SelectedValue + "',Position = '" + DropDownList2.SelectedValue + "',Roles = '" + TextBox1.Text + "',Status = '" + DropDownList3.SelectedValue + "',DispatcherCovering = '" + DropDownList4.SelectedValue + "' where Name='" + DropDownList1.SelectedValue + "'", con);
            comm.ExecuteNonQuery();
            con.Close();
            ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "alert('Successfully Updated');", true);
            ClearAllData();
        }

        else
        {
            SqlConnection con = new SqlConnection("Data Source=ucpdapps2;Initial Catalog=OnCallWeb;Integrated Security=True");
            con.Open();
            SqlCommand comm = new SqlCommand("Insert into Dispatcher_Roles values ('" + DropDownList1.SelectedValue + "','" + DropDownList2.SelectedValue + "','" + TextBox1.Text + "','" + DropDownList3.SelectedValue + "','" + DropDownList4.SelectedValue + "')", con);
            comm.ExecuteNonQuery();
            con.Close();
            ScriptManager.RegisterStartupScript(this, this.GetType(), "script", "alert('Successfully Added');", true);
            ClearAllData();
            Label1.Text = "";
        }
    }
</code>
Comment: Use `!string.IsNullOrEmpty(DropDownList5.SelectedValue)`. A SelectedValue is never null in webforms.
Comment: Try using `DropDownList5.SelectedItem`.
Comment: So you're saying that `if (DropDownList5.SelectedValue !=null)` produces an unexpected result?  When this happens in your debugging, what value do you observe `DropDownList5.SelectedValue` to have?
Comment: .SelectedItem did not resolve the issue.  The debug shows on click that an entry is being Inserted.  What I am looking for is if Dropdownlist5 has an item selected in the dropdown list  I want the button to trigger the Update command and not the Insert command.
Answer: VDWWD comment resolved my issue.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).

button to save or update sql database


Angular logic for repeater

Question: I have a simple repeater setup like so
<ion-item ng-repeat="location in data.posts">
  {{location.title}}
</ion-item>

And of course for every array I get a title inside an ion-item. Now for the tricky stuff.
data is coming from some JSON I'm pulling in. I want to access something deeper into the array but I don't know how to get it. In javascript I would access it as
location['custom_fields']['coupon_relationships']

Which coupon_relationships is another array for any amount of items. I merely want to be able to count the amount of items in there and print out the integer. Then I want to do logic so that the word coupons follows unless there is only 1 at which point I want the word to be coupon. I know I can do this all via javascript but I'm trying to learn the features of AngularJS. Is all this possible via Angular html?
Comment: it would help if you could post a small snippet of the json
Answer: It's difficult to tell if this is exactly what you're interested in from your question, but you might try something like:
<ion-item ng-repeat="location in data.posts">
  {{location.title}} -
  {{location.custom_fields.coupon_relationships.length}}
  {{location.custom_fields.coupon_relationships.length != 1 ? 'Coupons' : 'Coupon'}}
</ion-item>

Answer: John's answer would be best for angular 1.1.5+ (that's when they added the ternary operator in templates)
If you are running an old version you could do something like this:

            {{poll.custom_fields.coupon_relationships.length}}
            Coupons

controller:
function PollCtrl($scope) {
    $scope.polls = [
        {
            custom_fields:
                {
                  coupon_relationships:
                     [
                       'one here', 'another','fffff','ffffff'
                     ]
                }
        }
     ]
}

codepen

Angular logic for repeater


Storing comsumable dry goods in your car in the summer?

Question: I live in South Florida where the summer sun has no mercy.  I drive a new van and I've taken steps to keep the inside cooler during the day. I live in the van for weeks at a time and need to store things in the van.  I don't hang out inside the van from 11am to 4pm unless it's parked in the shade or unless the AC is turned on.  At night i have a very large and powerful vent fan and have no issues sleeping in the van even in July and August.  However, my goal and concern here is with keeping some items in the van when parked in the sun.  I can't afford to run my freezer every day.  Items include dry good and things like Herbal supplements, Teas, instant coffee and  Olive oil. These are not things that are generally very sensitive to some warmth and humidity.. but I want to see what I can do to offer them a safe storage in my van.  Here's what I've done so far:

Install a large aluminum and glass solar panel on my roof, this the space directly above the place i store these things and blocks the sun.
Open  large vent opening under the solar panel where heat escapes.
Install reflective mirror vinyl where the solar panel does not cover.
Install reflectix insulation a 1/2 inch below the roof metal
Install a sealed plywood ceiling
Placing said items in an insulated bag
Placing the insulated bag in a highly insulated and sealed Freezer (that is usually off)

These updates make a huge difference, but still the inside of a metal van who's exterior can get so hot you can fry an egg so it's not like the cabinets inside my insulated, air conditioned Cinder Block and Wood house were it's always below 80F.
So I am wondering...
I need to test and confirm this with a thermostat , but any idea how hot it might get inside that insulated bag/freezer in a van set up as described parked in the Florida sun?
Does it sound like these items are going to go bad or worse be dangerous for consumption if stored as describe .. I mean, tea and herbs are dry leaves and roots.. what if the temp inside the bag is 90 F degrees? is it even possible it could be 90F inside that bag?
Comment: [Seasoned Advice/Cooking.SE](https://cooking.stackexchange.com/) could help with the food safety/freshness concerns.
Comment: This does not strike me as a home improvement question per [network guidelines](https://diy.stackexchange.com/help/on-topic) (even though it may relate to _your_ home--the van--it mostly involves food).
Comment: Try [Lifehacks.SE](https://lifehacks.stackexchange.com)
Comment: yeah. tough one, but where can i get help with this?
Comment: [The internet](https://www.google.com/search?q=food+storage+guidelines&rlz=1C1ZCEB_enUS850US850&oq=food+storage+guidel&aqs=chrome.0.0j69i57j0l4.4320j0j7&sourceid=chrome&ie=UTF-8)?
Comment: I'm voting to close this question as off-topic because this just isn't a DIY.SE question...
Comment: It's about improvements to a home, how is it any different from someone asking how to build a root cellar, for example?  It's not about food, its about how to make DIY modifications to a home (which happens to be a van.)
Answer: I'm going to treat this question as "how do I keep my home cool when it's a tiny home (often vehicles) and solar gain is my enemy"? Because that would be on-topic here.
Solar gain is your enemy
And to be clear, it is an order of magnitude worse than any other source of heat, even ambient temperature.
From the sun's perspective, it casts 100 watts on every square foot - from its perspective - and that includes the top and sides of your van.  This is then reduced by your vehicle's albedo, or its reflectivity.  Black vehicles have low albedo, and a pure white can have as high as 92%.  Also some of the surface heating transfers to the air near the skin of your van,   But with 100 w/sf, there's plenty left to heat up your van.  Windows absorb almost all of it, and cause the sun to heat up things in the interior of your van, where the heat can't leave.
Get it in the shade
Top of the list is place your vehicle in shade. What am I saying? Top of the list is get out of Florida... Mark Twain once said "the coldest winter I ever spent was a summer in San Francisco" and he's referring to the coast effect.  Santa Cruz, Eureka, Portland, Seattle... Seattle still has to deal with solar gain, but only 3 days a year ;) But I digress....
In shade... I'm saying that there's a huge difference between attaching something to the surface of your vehicle and stood off above your vehicle.  The difference is airflow beneath it that carries the heat away, which is what makes it shade instead of attempted insulation. Solar panels are a great plan, but you need to stand them off significantly.  That will reduce your high speed fuel economy somewhat, because you are also increasing the aerodynamic "wetted area".
You might also consider deployable shades or solar panels on the sunny side - I assume you can select which side of the street to be on.  Again don't forget the objective is shade and to create easy rising airflow for the hot air the shades collect, so a series of angled surfaces with gaps between them is just fine.  Figure out the sun's angle etc.
Increase albedo
After your shading options are exhausted, you want to make sure everything is lily white, and have the albedo/reflectivity conversation with your coating supplier.
Windows have basically 0 albedo, so you really need to address those - the best option is place them in shade.
Insulate like crazy
Metal is a good conductor of heat, so the car's body will carry heat some distance beyond the area actually in sunlight.  Also, even shaded areas are subject to ambient air temperature.
Of course you don't have 24" to give up for a deep layer of fiberglass batt, so you need to go for the most efficient insulation you can obtain, and you need as much as you can possibly have.
Storing temperature-sensitive dry goods
As for storing dry goods, once you've done your best to make your space temperate, your best bet is to put it in some sort of heavily insulated box.  We'd also put as much "thermal mass" in there as possible.  The best thermal mass known is water (coincidentally). So freeze-friendly water-based things, like commercial ice packs, are a good choice for "thermal mass".
As a bonus, water also has a phase transition (freezing/thawing) at a semi-convenient temperature, and that gives it a huge amount of additional thermal mass if you're willing to cross the zero degree C line, however if you do that, you have to worry about condensation/sweating on your dry goods.
In a perfect world, your well-insulated box would have a small Freon-cycle machine to chill the box furth-- wait a minute.  Did you say you have a freezer and you just don't run it?  Run it!  You have a solar panel  for Pete's sake, I bet that panel is "dumping" lots of excess energy you can't store.  Use it for this.
If you don't run your freezer much because you have to run your van's engine to power it, then your solar system needs a lot of work.  Let's have a conversation about that.
Comment: Re sun: I figured that's what you meant but I thought it was a little unclear.  I think the OP should get an decent used cooler and a basic [remote thermometer](https://www.grainger.com/product/48TA33?cm_sp=Product_Details-_-Products_Based_on_Your_Search-_-IDPPLARECS&cm_vc=IDPPLARECS). Put the sensor in the sealed cooler.  Reset the min/max memory and tape the reader to the underside of the van or something.  Leave in a worst case scenario parking spot through the hottest part of the day.  Then check the max temp.  I doubt ice or anything is needed.  It just needs to keep things at room temp.
Comment: "From the sun's perspective, it casts 100 watts on every square foot - from its perspective - and that includes the top and sides of your van." To be clear,  the watts per area is a function of the angle of incidence.  It's not 100 watts per sq ft of surface area of the van.
Comment: I think the part about the box is the key here.  I'm not sure a freezer is even needed.  I wonder if a good cooler, left closed and out of the sun would be good enough to keep dry goods in a safe temperature range.  As long as the van isn't tightly closed, maybe.
Comment: @JimmyJames yes, I mention "from the sun's perspective" twice. I agree sufficient thermal mass could make up for a freon engine, but *since he's already got one, and the solar panels too*, he just needs the bits to get them to work together.
Answer: I would not worry about tea and herbs going bad but loosing thier flavor or strength. We seal our tea , coffee, cocoa in canning jars in our motor home we don't run the AC unless we are in it, I would look up solar car window fan. My uncle Lived in Mojave and he had those in his cars the fan kept the inside of the vehicle cool with the unit in the window. (The unit rolls up and is locked in place with the window the opening was secure) this may be the way to go. He started doing this after some papers on his dash caught fire. The fans only last a few years but they were not very expensive.


Rails 3 ActionMailer: normal and inline attachments in the same email?

Question: I'd like to create an html email with a normal attachement (a pdf file), and an inline attachment (an image) as well. These two attachment types work perfectly individually, but don't seem to live well together: the normal attachement disappears (at least in Outlook) as soon as there is an inline attachment.
Is it a bad thing to mix attachment types?
Answer: Yes it is a bad idea to mix attachment types as this is a documented issue currently with Action Mailer. Refer to https://github.com/rails/rails/issues/2686 for more details.


Convexity and Conditional expectatuon

Question: Let $(\Omega, F, P)$ be our probability space. Denote $\Omega^{(n)}$ to be a partition of $\Omega$ with $n$ components/sets such that each component has equal probability measure. Denote the resulting generated sigma-field by $\sigma(\Omega^{(n)})$. Suppose $X$ is an $\mathbb{R}^d$-valued random variable and $f:\mathbb{R}^d\to\mathbb{R}$ is a convex function.
Is the following true?
$$
\mathbb{E}[f(\mathbb{E}[X:\sigma(\Omega^{(n)})])] \leq \mathbb{E}[f(\mathbb{E}[X:\sigma(\Omega^{(n+1)})])]
$$
I've done some numerical experiments and it seems to suggest the above is true. However, I can't seem to find any reference on the internet.
Answer: It seems that simple counterexamples abound. You might want to check the following: Assume that $\{A,B,C,D\}$ is a partition of $\Omega$ with $$P(A)=P(D)=\tfrac13\qquad P(B)=P(C)=\tfrac16$$ and consider the equipartitions $$\Omega^{(2)}=\{A\cup B,C\cup D\}\qquad\Omega^{(3)}=\{A,B\cup C,D\}$$ and the random variable $$X=3\mathbf 1_B-9\mathbf 1_C$$ Then $$E(X\mid\sigma(\Omega^{(2)}))=\mathbf 1_{A\cup B}-3\mathbf 1_{C\cup D}\qquad E(X\mid\sigma(\Omega^{(3)}))=-3\mathbf 1_{B\cup C}$$ hence $$E(E(X\mid\sigma(\Omega^{(2)}))^2)=5\qquad E(E(X\mid\sigma(\Omega^{(3)}))^2)=3$$
Comment: In my experiments, the expected value $E[X] \geq 0$. Do you think this would make a difference?
Comment: Nope: consider $X_x=X+x$ and $f_x(t)=(t-x)^2$ instead of $X$ and $f(t)=t^2$.

Convexity and Conditional expectatuon


Coefficients of the first fundamental form.

Question: I have the following exercise:
Let $f:\mathbb{R}^3\rightarrow \mathbb{R}$, and let $S$ be a surface. Let $p$ be a regular value of $f$, and $S=f^{-1}(p)$. Determine the coefficients of the first fundamental form.
I think that since I have to work with partial derivatives, I can use the Theorem of the Implicit Function. However, I am not sure how to approach this exercise. Any help would be appreciated.
Comment: The first coefficient of the first fundamental form depends on a coordinates. I suppose you need to find some local coordinates first.
Comment: @whpowell96 no I do not., If I am not wrong the basis is the partial of f in all of the points x_i in p?
Comment: So use the implicit function theorem: Say the surface is locally $z=\phi(x,y)$. Relate the partial derivatives of $\phi$ to those of $f$ and finish. Post the answer when you're done.
Comment: @TedShifrin I was thinking of the first fundamental form as the matrix of inner products of a basis of the tangent space. These are obviously constructed from partial derivatives of $f$ via the IFT map, but I personally find it easier to interpret from a linear algebra POV. I think I may have accidentally implied that $f$ is a parameterization of the manifold instead of the $f^{-1}$ so I will delete my previou comment.
Comment: @whpowell96 But neither gives a parametrization. Yes, linear algebra will construct a basis for the tangent plane given a basis for the normal space, but this doesn't give local coordinates or parametrization.
Comment: @TedShifrin Thank you for your comment. I see my mistake now. In my head I was equivocating "parameterization" and "local representation in *some* coordinates."
Answer: By definition of the inverse image, $f^{-1}(p) = \{(x,y,z) : f(x,y,z) = p\}$, so $f(x,y,z) - p = 0$. Now, since p is a regular value, it means that one of its partial derivatives is nonzero. Without loss of generality, we can assume that the partial derivative with respect to z is nonzero.
And by the implicit function theorem, there exists $\phi: U \subset \mathbb{R}^2 \rightarrow \mathbb{R}^3$ such that $\phi(u,v) = (u,v,h(u,v))$, where h(u,v) is a local parameterization at a point.
If we consider the composition $f \circ \phi = f(u,v,h(u,v)) = p$,
Now, differentiating partially with respect to u and using the chain rule  $f \circ \phi$ , we obtain
$\frac{\partial h}{\partial u} = \frac{-\frac{\partial f}{\partial x}}{\frac{\partial f}{\partial z}}$
and
$\frac{\partial h}{\partial v} = \frac{-\frac{\partial f}{\partial y}}{\frac{\partial f}{\partial z}}$
and if I do the partial derivative of $\phi$
$\frac{\partial \phi}{\partial u} = (1,0,\frac{\partial h}{\partial u}) = (1,0,\frac{-\frac{\partial f}{\partial x}}{\frac{\partial f}{\partial z}})$
and
$\frac{\partial \phi}{\partial v} = (0,1,\frac{\partial h}{\partial v}) = (0,1,\frac{-\frac{\partial f}{\partial y}}{\frac{\partial f}{\partial z}})$
And the coefficients would be equal to
$E = \langle \frac{\partial \phi}{\partial u} \cdot \frac{\partial \phi}{\partial u} \rangle = 1 + \left(\frac{-\frac{\partial f}{\partial x}}{\frac{\partial f}{\partial z}}\right)^2$
$F = \langle \frac{\partial \phi}{\partial u} \cdot \frac{\partial \phi}{\partial v} \rangle = \frac{\frac{\partial f}{\partial x}}{\frac{\partial f}{\partial z}} \cdot \frac{\frac{\partial f}{\partial y}}{\frac{\partial f}{\partial z}}$
$G = \langle \frac{\partial \phi}{\partial v} \cdot \frac{\partial \phi}{\partial v} \rangle = 1 + \left(\frac{-\frac{\partial f}{\partial y}}{\frac{\partial f}{\partial z}}\right)^2$
Comment: Good. It looks like you've solved your exercise. :)
Comment: Yes, this is fine. Proceed. What are the partial derivatives of $\phi$?
Comment: @TedShifrin thanks


How do I change hotkeys?

Question: I am trying to change the hotkeys for Age of Empires II: HD (version > 5.0), but I can't get it to work.
I download this mapping file (.hki, selecting HD5.0+ at the top left side) and I copy it into my game folder: C:\Program Files (x86)\Steam\SteamApps\common\Age2HD\profiles\. However, this folder already has three profiles (player1.hky, player2.hki, player3.hki). I tried saving it as player4.hki as well as overwriting player3.hki, and using player0.hki but in none of these cases the actual new mapping was used - but it did seem to change slightly.
The thing is that I am trying to install an AZERTY layout, and still Q and A and Z and W (among others) are switched, even after installing these new files.
Can anyone provide a guide on how to correctly install these files, even when player*.hki files already exist? Which digit should be appended to the file name? A new one, 0, the latest one, and so on.
When I try to change the hotkeys in-game, I can't complete the process because of duplicate keys. Even though there are clearly duplicates in a single list (e.g. Q for house and barracks):

When I try to change both of those to A, I get a message that one of those was cancelled. So I am not able to put in duplicates.
Comment: Is your Windows keyboard set to AZERTY or QWERTY? and if you try to enter something into a input field in the game, what keyboard does that use?
Comment: @Nzall It's set to AZERTY and I can type in chat just like I normally would, in AZERTY.
Comment: Can't you just set hotkeys from the game client?
Comment: @BenCraig Yes and no. Even though the defaults contain some duplicates (e.g. q for house and barracks), whenever you try to add duplicates yourself (e.g. a for house and barracks) you get an error that you cannot use duplicate keys...
Comment: @BramVanroy House and Barracks are from different menus, so that would make sense to me. Similar to how archery range and mill are both W. I cant check right now, but I feel like it wont let you put stuff from the same menu as duplicates, but as long as theyre not from the same menu it should be fine.
Comment: @BenCraig I know they are, however in-game they are all under 'Villager Build'. (If you launch a game and then go to options > Hotkeys.)
Answer: There's a really good tool for this online.
Essentially, AoE reads the hotkeys/bindings from the root installation directory and will set the keyboard to whatever that file reads. This site allows you to easily edit them in a nice-ish UI. Download it, replace and boot - should all work :)

How do I change hotkeys?


How to assign values to this array?

Question: New to SOAP. VS auto-generated a Reference.cs from a SOAP .wsdl file,
<code>[System.Xml.Serialization.XmlElementAttribute("longID", Order=6)]
public Xmember[] longID
{
    get
    {
        return this.longIDField;
    }
    set
    {
        this.longIDField = value;
    }
}

public partial class Xmember
{
    private ulong longIDField;
    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute(Order=0)]
    public ulong longID
    {
        get
        {
            return this.longIDField;
        }
        set
        {
            this.longIDField = value;
        }
    }
}
</code>
when I call and pass a value like
<code>ulong myID = 123;
objXmember[0] = myID;
objXmember[1] = 0;
objXmember[2] = 0;
objXmember[3] = 0;
objXmember[4] = 0;
objXmember[5] = 0;
</code>
got

"cannot implicitly convert type ulong to 'Xmember'"
Comment: When you assign a value to an element of an array, the value's type must match the type of the array's elements. See duplicate.
Answer:
New to SOAP. VS auto-generated

This has zero to do with soap and is a basic C# question.

"cannot implicitly convert type ulong to 'Xmember'"

You try to assign numerig numbers to elements that are defined as being of type XMember. It tells you taht.
The code you provide says so itself:

public Xmember[] longID

So, per basic C#, you must assign new elements of Xmember:

objXmember[1] = new XMember() { longID = 123 }

The code may come from SOAP, but at the end you have a basic "assign item to array" problem that is pure C# syntax.

How to assign values to this array?


Make error on Kubuntu

Question: When im running make for building oxygen-transparent theme , I receive the following error :
<code>kde@wilsonzaizai-Satellite-L510:~/oxygen-transparent/build$ sudo make install
[ 0%] Built target oxygentransparentstyle_automoc
[ 5%] Built target oxygentransparentstyle
[ 5%] Built target kwin3_oxygen_transparent_automoc
[ 18%] Built target kwin3_oxygen_transparent
[ 18%] Built target kwin_oxygen_transparent_config_automoc
Linking CXX shared module ../../lib/kwin_oxygen_transparent_config.so
/usr/bin/ld: cannot find -loxygenstyle
collect2: ld returned 1 exit status
make[2]: *** [lib/kwin_oxygen_transparent_config.so] Error 1
make[1]: *** [decoration/config/CMakeFiles/kwin_oxygen_transparent_config.dir/all] Error 2
make: *** [all] Error 2
</code>
What is -loxygenstyle ?
Answer: -loxygenstyle means that it must be linked to the "oxygenstyle" library,  which is not currently installed on your system.
If you search for liboxygenstyle on packages.ubuntu.com, you will find that it is provided by the package with the name "kdebase-workspace-dev", install it and retry.

Make error on Kubuntu


how to handle empty response body in android fast networking library?

Question: how to handle an empty response body in android fast networking library?
I know in retrofit we have void, but how to handle in fast networking.
POST request, request content type JSON, empty response body with Http code.
retrofit equivalent:
<code>@POST("/path/to/get")
Call<Void> getMyData(/* your args here */);
</code>
my code is below
<code>    @Override
    public Single<Response>  checkPhoneNumberAvailabilityApiCall(CheckPhoneNumberAvailabilityRequest checkPhoneNumberAvailabilityRequest) {

         return Rx2AndroidNetworking.post(ApiEndPoint.getEndPoint(ApiEndPoint.ENDPOINTS.CHECK_PHONE_AVAILABLE_API))
                .addHeaders(getHeaders(GENERAL))
                .addJSONObjectBody(convertToJSON(checkPhoneNumberAvailabilityRequest))
                .build()
                .getObjectSingle(Response.class);
    }
</code>
Answer: I have no experience in Retrofit yet, but hope it helps
<code>AndroidNetworking.post(YOUR_ENDPOINT)
                .addHeaders(YOUR_HEADER)
                .addJSONObjectBody(YOUR_JSONOBJECTBODY)
                .build()
                .getAsJSONObject(new JSONObjectRequestListener() {
                    @Override
                    public void onResponse(JSONObject response) {
                        if (response.toString().isEmpty()) {
                            //handle empty body
                        } else {
                            //do logic with json value
                        }
                    }

                    @Override
                    public void onError(ANError anError) {
                        //print log error code
                        Log.e("FAN_ERROR", "ERROR CODE : "+ anError.getErrorCode());
                        //print log error body
                        Log.e("FAN_ERROR", "ERROR BODY : "+ anError.getErrorBody());
                    }
                });
</code>


Can BlackBerry virtual goods be transferred between devices?

Question: I am developing a BlackBerry app in which users can purchase virtual goods (such as sounds and images) using their BlackBerry App World login details.
If the user changes their phone to another BlackBerry, are they able to transfer these virtual goods to their new phone without having to re-purchase them?
Answer: BlackBerry App World allows to re-download purchased application when a user changes device. I think the same approach will work for digital goods.


Flume setup in local

Question: Can I do setup of flume on my local machine?
I can only see setup guides for flume on a cluster environment.
I have to setup flume and have to integrate it with morphline.
Comment: Welcome to Stackoverflow. Please, read these links to improve your question: [Tour](http://stackoverflow.com/tour) | [How to ask](http://stackoverflow.com/help/how-to-ask) | [Minimal, Complete and Verifiable Example](http://stackoverflow.com/help/mcve)
Answer: Installing Flume in local is straightforward. Just download the flume distribution from CDH repo and set all the environment variables like HADOOP_HOME,JAVA_HOME etc and configure the flume configuration file.

Flume setup in local


Calling a function which belongs to another class

Question: I'm just wondering if there is a way to call a function from another class which is not a derived class.
For example...
If I have class Square which has a function colour, if I have another class Triangle, totally unrealated to Square, can I somehow call the colour funciton of Square on a Triangle object?
I'm wondering if friend can be used here, but from what I have read, it can't, unless I've misunderstood what I've read.
What is the best way to implement this without creating an inheritance relationship?
Comment: What's your color function doing in Square if it makes sense to apply it to a Triangle? More generally, when you find yourself wanting to do this, your function is in the wrong class (or shouldn't be in a class at all).
Answer: If what your seeking to do is something like this:
Square s;
Triangle t;
t.colour(); // invoke Square::colour() on a Triangle

I'm sorry but you can't, unless you declare a function in Triangle which simply mimics what Square::colour does.
A wise option if you really need that function to be shared is to declare it as a standalone templated function like this:
template<typename Shape>
void colour(Shape s){
  //Do stuff
}

then in order to allow this access to the inner guts of Triangle and Square, make void colour<Triangle>() and void colour<Square>() friends of the appropriate classes.
Comment: yay for templates and static polymorphism
Answer: The answer is no, your request is not possible.  The colour method is encapsulated within square and will not apply to an unrelated object of a difference class.  Either inherit (from shape - I know you said no inheritance), or re-implement the colour method for square as well.
Answer: No, sorry to bum you out. But i would recommend using a base class 'shape', and derive shapes from this class.
class Abc //Abstract base class
{
    public:
        virtual ~Abc();                             //destructor
        virtual double Color();
        virtual double Area() const = 0;                  //pure virtual, MUST be overridden
    private:
        //specific variables that apply to all shapes
};

class Square : public Abc //derived class from pure virtual class
{
    public:
        Square();
        virtual double Color();
        virtual double Area() const; //redefine color here
        ~Square(){}
    private:
        //square vars here
};


Low voltage over C wire at thermostat

Question: Similarly to this question of the same name, I am reading low voltage over the R,C wires at the thermostat. Unlike that question, however, the voltage is unusably low. I am only reading 2V over R,C which is low enough that my Nest 3.0 thinks the power is completely disconnected. All of the other connections (R,Y, R,G, and R,W) read 28V. I have a 2nd thermostat downstairs (the one previously measured is upstairs, closest to the furnace in the attic), and it has the same problem/measurements.

If I go over to the furnace (York Furnace Model P3HUB16L06401D) and measure the voltage across the wires, not only is everything else 28V, but R,C is also 28V.

The two new Nest thermostats I am installing are replacing two older traditional thermostats that didn't have any backlight/special features, so they didn't use the C wire. The C wire was already connected on the furnace side, but it was left loose on the thermostat end, so if there are issues with the original C wire installation, it could have easily gone unnoticed until now. It's hard to see in the first set of images, but on the thermostat side, all of the wires are coming out of the same brown casing seen in the furnace.
What could cause the C wire to have such a low voltage on the thermostat end of the wire, but allow all of the other wires in the casing, and even the end of the C wire at the furnace, to behave normally? Could the C wire alone somehow have gotten damaged somewhere in between the furnace and the thermostats & now the whole set of wires needs to be reran & replaced? I do not believe it is the issue mentioned in this question where the insulation is shoved into the connection, as the following images show the insulation has plenty of clearance. I also made sure the connection was tight.

Edit:
The problem is indeed what is mentioned in @JPhi1618's answer below. The original technician only hooked up the C wire to the furnace, and not the outbound wires to the thermostats inside the zone controller. You can see in the image below that the C wire is just wound around the outgoing wires for zones 1 and 2 on the left side.
Comment: Is running a new thermostat cable an option?
Comment: Is that green wire touching the red wire base?
Comment: @gbronner Ha, sure looks like it, but if it was, the question would be "Why is my AC fan always running no matter what?"
Answer: The only thing that could be happening in this case is a broken wire, or a bad splice.   A solid, continuous wire will have voltage on the other end, even if its partially damaged.  A damaged wire will not have the current carrying capacity (amps) that a good wire does, but it will show voltage.  Also, since this is alternating current, the 2 volts you're measuring is most likely an induced phantom voltage.
What has probably happened is there is a splice somewhere in the wire, and the person that spliced it didn't think the blue wire was important.  Follow the wire as far as you can coming from the air handler and see if you can find it.  Also, gently tug the wires coming out of the wall near the thermostat.  A small amount of wire could have been added near the thermostat if it was relocated.  An inspection camera might help you see in the wall if that's the case.
The other option is that the splice is hidden and inaccessible because of an accident when the house was built.  There are devices that can "add" a C-Wire over the existing thermostat wires, so that would be an option for you as well.
Nest power adapter: https://www.amazon.com/Google-Nest-Power-Connector-Accessories/dp/B093TRFQWP/ (you'll have to check to make sure this works with your model, link provided as an example of what to look for)
Comment: "the person that spliced it didn't think the blue wire was important" was indeed the problem. I added an image of the zone controller to the question where the technician only hooked up C to the furnace and not the outbound zones. So fixing it would be as easy as plugging in the C wire to those

Low voltage over C wire at thermostat


Asymptotics for an expression

Question: I have a rather silly question, I guess.
Suppose $(1+x)^{2y}\sim 1$ as $y\to\infty$.
Does this imply $x\sim 1/y$ as $y\to\infty$?
Comment: So $x$ is a function of $y$? The answer is no anyways. For example, if $x(y)=0$, this claim is true. Also, $$\lim\limits_{y\to\infty}\left(1+\frac1y\right)^{2y}=e^2\neq0$$
Answer: Suppose that $x=x(y) \to 0$ as $y\to +\infty$. Then
$$
(1 + x)^{2y}  = \exp (2y\log (1 + x)) = \exp (2yx + \mathcal{O}(yx^2 )).
$$
So if you want
$$
\mathop {\lim }\limits_{y \to  + \infty } (1 + x)^{2y}  = 1,
$$
you need that
$$
\mathop {\lim }\limits_{y \to  + \infty } xy = \mathop {\lim }\limits_{y \to  + \infty } x(y)y = 0,
$$
i.e., that $x=o(1/y)$ as $y\to +\infty$. So $x$ must tend to $0$ faster than $1/y$ does.

Asymptotics for an expression


enterprise application packaging & deployment with netbeans 7

Question: I'm having issues with deployment of my enterprise application. I have my entities in a separate project (as class library) and my remote interfaces as well. So I have theses projects linked to each other in multiple ways:

ejb module
war
entities (class library)
remote interfaces (class library)
enterprise app client

Everything worked fine for a while, meaning the dependencies were fine at some point, then suddenly I can't deploy anymore and I have this error:
remote-project.clean:
(...)
FacadeRemote.java:3: package entities does not exist
followed by a long list of  cannot find symbol
This only happens when I try to deploy, clean and build works perfectly and I haven't changed anything in the dependencies, not knowingly at least.
I think this is related to netbeans because I've fixed it earlier by reverting changes (not made by me) to some private.properties files (no such luck this time). One of the lines I removed was javac.debug=true which might be a lead but I've tried to disable debugging without success.
I'm not comfortable with EAR packaging so I'm probably missing something important, any help is appreciated.
Thanks
Answer: I had pretty much the same problem with netbeans/glassfish setup. I had ejbs in a separate module as jar, and deploying the project form netbeans into glassfish caused similar errors. I notied that if I clean the glassfish deployment manually, and build the project manually, and then, yep, still manually deployed it into glassfish it worked ok.
My solution? Installed eclipse for java ee, added the glassfish connector, and deploying from eclipse to glassfish never presented this errors
Comment: Indeed manual deployment works, I can use that for now. That confirms that the issue is with netbeans, I'll keep searching that way.
Comment: Well good luck with that, but there's slim hope. I had the same issue back on netbeans 5.x. I'm guessing you're using netbeans 7 or whatever the current version is. Since they didn't fix it across 2+ major versions, I don't think you'll find a fix for it.
Answer: Disable the "Compile on Save" feature in the EAR project.


How to use the same toggle comment with two different ID/Classes

Question: I want to make an expanding sidebar, I was able to make the sidebar expand but but I need to cover the original button that was pressed.
I would like to have an area at the side where I can click to close the sidebar.
I'm almost there. The problem i'm having is that the close id when clicked does not seem to trigger the toggle.
here is my code

$("#icon-menu-mobile,#exit").each(function() {
  $(this).click(function() {
    var effect = 'slide';
    var options = 'left';
    var duration = 500;

    $('#panel').toggle(effect, options, duration);
  });
});
#panel {

  position: absolute;

  top: 0px;

  width: 100%;

  height: 100%;

  background-color: rgba(0, 0, 0, 0.3);

  display: none;

  z-index: 999;

}

.panelcontent {

  position: relative;

  top: 50px;

  width: 70%;

  height: 100%;

  background-color: #cccccc;

  float: left;

}

#icon-menu-mobile {

  width: 36px;

  height: 30px;

  cursor: pointer;

  font-size: 24px;

}

#icon-menu-mobile,

#exit {

  position: static;

  float: right;

  width: 30%;

  height: 100%;

  cursor: pointer;

}

 ☰

      Some text here to fill it out

      Click here to exit

As you can see after clicking the burger menu you can't close it with the side close button.
I'm guessing that the toggle only works from the first id clicked and that id needs to be clicked again to toggle again.
Is there a way to have two id's activate the same toggle?
Answer: Here's a working example: http://codepen.io/anon/pen/pgGPrm
I think you were attaching the same event to both, so it wouldn't slide to the opposite direction, i've split it up into:
$("#icon-menu-mobile").click(function() {
    var effect = 'slide';
    var options = 'left';
    var duration = 500;

    $('#panel').toggle(effect, options, duration);
});

$("#exit").click(function() {
    var effect = 'slide';
    var options = 'right';
    var duration = 500;

    $('#panel').toggle(effect, options, duration);
});

EDIT: actually upon further inspection, it doesn't seem to matter if they are together or not. the thing that fixed it was actually including jQuery-UI in my codepen. are you sure you are properly including jQuery-UI? otherwise you get an error after the initial slide, which prevents the second slide from working
Comment: I think I do. is this it?

Very odd, the demo works fine but on my site it only opens. The close does not work...
Comment: try `
`
Comment: awesome! glad I could help


Convert modal to IHierarchicalEnumerable

Question: I am having some class like
public class Employee
{
    public List<Employee> ChildOrg{get; set;}
    public string name {get; set;};
    public string id{get; set;};
    public string parentid{get; set;};
}

Now in project I am having the object of Employee that contains the actual hierarchy to display in TreeView.
Now to give this object TreeView i need to give IHierarchicalEnumarable type reference.
So how can i convert my Modal to IHierarchicalEnumrable and give it to TreeView?
I already used following link.
http://www.codeproject.com/Articles/19639/Implementing-IHierarchy-Support-Into-Your-Custom-C
In above link i am specially confused about "GetChildern" and "GetParent" method i am unable to understand how it can fit in my requirement where i am already having hierarchy.
I am unable to understand please help me to understand how it works.
Answer: Finally found out how I can use IHierarchicalEnumerable.
Please check out following. Modified my model class like this:
public class Employee : IHierarchyData
{
    public EmployeeCollection ChildOrg { get; set; }
    public string name { get; set; }
    public string id { get; set; }

    public IHierarchicalEnumerable GetChildren()
    {
        return ChildOrg as IHierarchicalEnumerable;
    }

    public System.Web.UI.IHierarchyData GetParent()
    {
        return null;
    }

    public bool HasChildren
    {
        get { return ((this.ChildOrg != null) && (this.ChildOrg.Count > 0)); }
    }

    public object Item
    {
        get { return this; }
    }

    public string Path
    {
        get { return this.id; }
    }

    public string Type
    {
        get { return this.GetType().ToString(); }
    }
}

Added new class as follows:
public class EmployeeCollection : List<Employee>, IHierarchicalEnumerable
{
    public IHierarchyData GetHierarchyData(object enumeratedItem)
    {
        return enumeratedItem as IHierarchyData;
    }
}

And used recursive function to create hierarchy.


Django-behave - no behave tests

Question: Does someone has expiriences with django-behave? I can not run behave tests.
I have newests versions of 'behave' and 'django-behave' installed. 'django_behave' is in my INSTALLED_APPS and in my settings.py i also added TEST_RUNNER = 'django_behave.runner.DjangoBehaveTestSuiteRunner'.
I have working django project. Some files and directories of it goes like so:
mysite/
      mysite/
             settings.py
             ...(other)
      example_app/
                  features/
                          example.feature
                          steps/
                               example.py

When I prompt 'python manage.py test' in a command line I can see that test are performed normally, without behave things.
   What I am missing?
Comment: Is this still an issue? - What version of python are you using?
Answer: try
python manage.py test example_app

Django-behave - no behave tests


Comsuming RESTful service in javascript

Question: I am trying to consume my newly setup RESTful WCF service, located at
[http://18.104.22.168/api/api/v1/public.svc/getoperators]
I accessed it using some third party tools, which I grabbed from
http://code.google.com/a/eclipselabs.org/p/restclient-tool/
https://addons.mozilla.org/en-US/firefox/addon/restclient/
and my results look like I expected:
{
   "Results":
   [
       "golden arrow",
       "jammie",
       "myciti"
   ]
}

All fine and well.  When I just type the url into my web browser, the response is
<ResultList xmlns="http://schemas.datacontract.org/2004/07/Developer_Portal"xmlns:i="http://www.w3.org/2001/XMLSchema-instance"><Results xmlns:a="http://schemas.microsoft.com/2003/10/Serialization/Arrays">golden arrowjammiemyciti</Results></ResultList>

Not what I expected, but I assumed  this was normal, and tried to comsume service in Javascript (here is fiddle)
http://jsfiddle.net/JmTe4/11/
It responds with an error.  At this point I'm stumped: what do I need to do to get the desired response in javascript?
Comment: You can only call the domain the JS came from, to prevent XSS. E.g. script located on jsfiddle.net will not be allowed to call your domain/ip.
Comment: Two things: 1) Same Origin Policy, 2) "Accepts" request header tells the server what format it should return.
Comment: I just tried the same javascript from a local html page, and added the line
Accepts: "application/json",
to the ajax request on line 16. This didn't seem to make any difference.
Answer: Couple of things.  Some of which were already mentioned by other members.

AJAX calls via XMLHttpRequest will not work across domains.  In other words, your AJAX code cannot call 184.108.40.206 from jsfiddle.net.  They are different domains.
Your browser is returning XML since it is sending "Accepts: text\html" as a header.  jQuery will resolve this issue as it uses application\json in the request (unless you specify otherwise).

So issue 2 is already fixed.  Issue 1 can be resolved by using JSONP.  You should just need to add ?callback=? to the end of your url.  However, read through the documentation on jQuery's site for a full overview.
Go to this URL and search the page for "JSONP" http://api.jquery.com/jQuery.getJSON/
Comment: You can use jsonp , only if its supported by server
Comment: If you check the fiddle, I've already used dataType: "jsonp", which automatically adds ?callback=? ... this should solve cross domain problem?
Comment: If I check the we console it says syntaxerror:invalid label followed by a hyperlink "getoperarors:1" that contains the elusive response I am looking for.  So the correct data is returning, but with some error.
Comment: After some browsing I think it's the server that doesn't support the jsonp callback.  I'll edit the service and get back to say if it worked :)
Answer: The problem was in the server webconfig. I had to add
<binding name="webHttpBindingWithJsonP" crossDomainScriptAccessEnabled="true" />

Thanks for your suggestions guys, they probably solved some other problems I would have come across anyway. :)
Comment: https://github.com/jpillora/jquery.rest#basic-usage might make your life abit easier

Comsuming RESTful service in javascript


Where can I find an item that can be disenchanted to learn "resist fire?"

Question:
Possible Duplicate:
Where can i find an item to to give me the Fortify alchemy enchantment?

Is there anywhere that I can find an item that is enchanted with fire resist other than hoping for it to pop up in random loot?
Fire breathing dragons keep kicking my ass so I want to learn the enchantment to put on my shield and boots.
Comment: I realize that Resist Fire and Fortify Alchemy are not the same effect, but I'm afraid if I *don't* close this, it opens the door for 20 other questions of, "where can I find X echantment?". What would be better would be a single question asking about non-random loot suitable for disenchanting.
Comment: @RavenDreamer Fair enough :)
Answer: For the most part, it's random loot. The one placed Resist Fire piece I can think of -- Ancient Helmet of the Unburned -- can't be disenchanted. Of course, that might also be the solution, since it grants 40% resistance. You get it in a dungeon during a College of Winterhold quest. Otar's also nice (30% resist against all elements).
But if you're not ready for some tough bosses, you can either get lucky with loot, or just visit armor sellers until one of them sells it.
Or you can create a potion, since this has a very specific, time-limited purpose. Any pairing of the following will work: Bone Meal, Dragon's Tongue, Elves Ear, Fire Salts, Fly Amanita, Mudcrab Chitin or Snowberries.


Watson AlchemyLanguage - How do I set the parameters for a CombinedCall

Question: Unfortunately I can't properly tag this question since tags for AlchemyLanguage don't already exist.
I'm trying to retrieve multiple extracts from Watson using a combined call.
Issuing calls for individual data extracts works as expected, but when I attempt to setup params for a combined call only null is returned for each extract.
According to the examples utilizing JSON it seems that 'extract':'sentiment' is the required pairing.
None of these calls work:
params.put(AlchemyLanguage.EXTRACT, AlchemyLanguage.SENTIMENT);
params.put(AlchemyLanguage.EXTRACT, AlchemyEndPoints.AlchemyAPI.SENTIMENT);
params.put(AlchemyLanguage.EXTRACT, DocumentSentiment.class);
params.put(AlchemyLanguage.TARGET, AlchemyEndPoints.AlchemyAPI.SENTIMENT);
params.put(AlchemyLanguage.TARGET, DocumentSentiment.class);
params.put(AlchemyLanguage.TARGET, AlchemyLanguage.SENTIMENT);

CombinedResults results=service.getCombinedResults(params).execute();
System.out.println(results.getSentiment());

null
Answer: You need to use the extract parameter as key and list the functions you want to use.
AlchemyLanguage service = new AlchemyLanguage();
service.setApiKey("API_KEY")
Map<String, Object> params = new HashMap<String, Object>();

params.put(AlchemyLanguage.EXTRACT, "authors,concepts,dates,doc-emotion,entities,feeds,keywords,pub-date,relations,typed-rels,doc-sentiment,taxonomy,title");

CombinedResults results=service.getCombinedResults(params).execute();
System.out.println(results);

For more information on how to configure each of the functions listed in the extract parameter see the API Reference.


Will Thunderbird become the default mail client in the near future?

Question: I just want to know if there is a plan to replace Evolution with Thunderbird until 12.04
Comment: Any answers to this question would be speculation.
Comment: Aha! We actually have a video of this discussion (see my answer)
Answer: Thunderbird is now the default email client, starting with 11.10 Oneirc Ocelot.
This was discussed briefly at the Ubuntu Developer Summit. Here's the blueprint with notes and here is the summary from the Thunderbird Unity mailing list:

Currently the etherpad from the
  session [0] lists these high-level
  requirements:

styling improvements
CD space
e-d-s/calendar integration
upgrade reliability (enigmail + binary extensions)

This decision should be made sometime around the Alpha period of 11.10.
Comment: Not to mention Ubuntu-One Support?
Comment: There's support for that somewhere, but according to the notes and memory from the session it wasn't a hard requirement for switching.
Answer: Currently there is no plan for this. If this is something you want to see you should request it on the Ubuntu Brainstorm. One potential brainstorm idea you might wish to advocate is Idea #27000
Comment: Thunderbird has one major problem with its incompatible address book format that has kept it out of opportunities like this for years.
Answer: Oneiric (11.10) has been released few days ago.
Now it's a fact: Thunderbird is the default email client.

Take a look here. Oneiric (11.10) could be first step for Thunderbird to become the default client.


Join 4 tables and collecting count from each table

Question: I am trying count total column from each table with one common key. I can do with union statement. how i can use join
Query :
SELECT count(id) As WOWcount FROM `wow_track` where author_post_id='882' union SELECT count(*) As Followcount FROM `FolllowUserPost` where postID='882' union SELECT count(*) As CommentCount FROM `f9pix_comments` where post_id_fk ='882' union SELECT count(*)  As ViewCount FROM `viewPhotosTrack` where postID='882'

I have used following Query :
SELECT COUNT(a.author_post_id) AS WOWcount, COUNT(b.postID) AS Followcount, COUNT(c.post_id_fk) AS CommentCount, COUNT(d.postID) As ViewCount
FROM wow_track a
LEFT JOIN FolllowUserPost b ON a.author_post_id = b.postID
LEFT JOIN f9pix_comments c ON b.postID = c.post_id_fk
LEFT JOIN viewPhotosTrack d ON c.post_id_fk = d.postID
WHERE a.author_post_id='882'

But it displaying wrong count
Answer: You can use an INNER JOIN query
SELECT COUNT(a.author_post_id) AS WOWcount, COUNT(b.postID) AS Followcount, COUNT(c.post_id_fk) AS CommentCount, COUNT(d.postID) As ViewCount
FROM wow_track a
LEFT JOIN FolllowUserPost b
ON a.author_post_id = b.postID
LEFT JOIN f9pix_comments c
ON b.postID = c.post_id_fk
LEFT JOIN viewPhotosTrack d
ON c.post_id_fk = d.postID
GROUP BY a.author_post_id

Comment: its fetch following error #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '*) AS WOWcount, COUNT(b.*) AS Followcount, COUNT(c.*) AS CommentCount, COUNT(d.*' at line 1


How to automatically add projects to Eclipse PDT build/include path for code completion?

Question: I used Eclipse PDT (Kepler with PDT 3.2.0) as my main IDE and there is something I could find how to do.
I'm working on a big Zend application, with a couple of hundreds of modules on it. To make it easier to code, I add to Eclipse each of these modules as a separate project. They are also logically arranged on Working Sets.
I would like to make it so that the classes of all of the open projects on the workspace appear as code completion automatically on the other projects. Right now it only recognizes the classes on that same module, or I have to create a library based on the local folder and manually add to each project, which makes building very slow.
Answer: I am not aware of a setting that can solve this, but there is some other options.
You can add the bin folder for each project to the build path: Project preferences -> Java Build Path -> Libraries -> Add Class Folder. This is a painstakingly slow process to do through the gui, so you might want to add the line <classpathentry kind="lib" path="/NAME_OF_PROJECT/bin"/> to the .classpath file - one line for each project - and work some copy-paste.
If you add new modules relatively often, you might want to automatize this. You could of-course write some hack-script that modifies the .classpath file, but a more proper way will be to create your own classpath container. Take a look at this blog post, that describes how to create one. You should be able to get it working in less than a day, if you have experience with Plugin development.


Unable to load Windows(8.x) Partition in Ubuntu

Question: I have a HP Laptop with Windows 8.1 installed and there seems to be some problem with the hard disk, due to which Windows never boots up. It just hangs at start up. I'm trying to recover some important files in my hard disk. I booted up my laptop using an Ubuntu Image. I was initially unable to mount the NTFS partition in Ubuntu. I got some error stating the partition is not clean. I ran the command 'ntfsfix' and it seemed to resolve some problems. After this, I was able to mount it using the following commands
sudo mkdir /media/c

sudo mount -t ntfs-3g /dev/sda1 /media/c

Now the NTFS filesystem is mounted, but it shows only two directories - "recovery" and "System Volume Information". Any idea why the other files in my NTFS filesystem are not shown?
I read that there is a problem mounting NTFS filesystems when Windows Fast-Boot/Hybrid shutdown mode is enabled(which is the default in Windows 8). Is this causing all the directories not being displayed? Any idea how I can recover other files from my hard disk?
I tried the solutions listed in Unable to mount Windows (NTFS) filesystem due to hibernation, and I can mount the disk, but as mentioned above, it shows only 2 directories: "recovery" and "System Volume Information". How can I access the other files in the NTFS disk?
Any help would be much appreciated!
Comment: possible duplicate of [Unable to mount Windows (NTFS) filesystem due to hibernation](http://askubuntu.com/questions/145902/unable-to-mount-windows-ntfs-filesystem-due-to-hibernation)
Comment: Then it looks like there is no more Windows on this disk. You can use `testdisk` to recover files.
Comment: Thanks for your suggestion, but I've already tried the options in the link you've listed. My problem is that I'm seeing only 2 directories in the mounted disk.
Comment: I retracted the vote. Did you try to look into this disk in Windows? Are there any other partitions beside sda1? Maybe there are no other files there, or they are located in another partition.
Comment: Thanks for the quick response @Pilot6. I'm unable to boot up Windows in my laptop. That is why I'm trying to boot it with Ubuntu and see if I can recover some critical files in the disk. There are no partitions other than sda1 when I run the command 'sudo fdisk -l'.
Answer: You've probably followed this answer and that's a dangerous thing to do.
Ubuntu can easily recover data from a crashed Windows provided you don't have any hardware or Windows file system (NTFS) errors.
To get rid of NTFS errors you need to have Windows check your drive with chkdsk /f before attempting recovery under Ubuntu.
The "best" thing you can do under the circumstances you now have is to:

Stop working on the original disk
Make a full sector-by-sector copy of your disk onto a new disk using ddrescue
After you've booted from the Ubuntu Live CD (the newest stable version is recommended) type the following commands:
sudo apt-get install gddrescue
sudo ddrescue --binary-prefixes --cluster-size=64 --sparse --timeout=20s /dev/XdY /dev/AdB /media/ubuntu/ddrescue.log

where XdY and AdB are the drive letters for the source and target drive. Ensure you don't copy the empty disk on the full disk. Examples are sda, sdb, hd0, hd1, ... Ubuntu doesn't work with Windows drive letters but with disks and partitions.  If you're unsure, ask!
If the copy doesn't give you the data you need, continue to the next step.
Use testdisk on the copy to recover some files
If you cannot recover enough, execute Step 2 again and continue to step 4.
use photorec on the fresh copy to recover some more files.

That's it!  You will not be able to recover everything but let's hope that 87.5% is enough.
Answer: Sorry for the necropost. Actually, it looks like this user may have mounted the wrong partition because I get the same result when I mount the FIRST partition of a Windows drive, which is, in fact, the boot partition for Windows. In order to get to the C: Drive, you will have to type the following into your terminal emulator:
sudo mount -t ntfs-3g -o ro /dev/sda2 /media/c

The location of your C drive may vary. You might want to look for the largest partition of the drive by typing
sudo fdisk -l

Then, you can replace the "sda2" in the command above with the C drive partition and find the files you were looking for. Windows might not boot, but you will be able to access the files you intended to access earlier.


Ubuntu 16 Mouse increase speed

Question: I want to make the mouse speed faster. But the "Mouse and Touchpanel" settings window seems to do nothing (does it actually do anything? it shows completely wrong values and changes there change nothing)
What can I do to increase mouse speed?
Questions like this are asked and answered (e.g.) here
They advice to use
xset

or
xinput

further, using dconf doesn't work, because there is no such entry on my system.
xset does not change anything on my system. xinput does not offer any option for mouse speed/sensitivity on my system:
Device Enabled (139):   1
Coordinate Transformation Matrix (141): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
libinput Accel Speed (276): -1.000000
libinput Accel Speed Default (277): 0.000000
libinput Accel Profiles Available (278):    1, 1
libinput Accel Profile Enabled (279):   1, 0
libinput Accel Profile Enabled Default (280):   1, 0
libinput Natural Scrolling Enabled (281):   0
libinput Natural Scrolling Enabled Default (282):   0
libinput Send Events Modes Available (260): 1, 0
libinput Send Events Mode Enabled (261):    0, 0
libinput Send Events Mode Enabled Default (262):    0, 0
libinput Left Handed Enabled (283): 0
libinput Left Handed Enabled Default (284): 0
libinput Scroll Methods Available (285):    0, 0, 1
libinput Scroll Method Enabled (286):   0, 0, 0
libinput Scroll Method Enabled Default (287):   0, 0, 0
libinput Button Scrolling Button (288): 2
libinput Button Scrolling Button Default (289): 274
libinput Middle Emulation Enabled (290):    0
libinput Middle Emulation Enabled Default (291):    0
Device Node (263):  "/dev/input/event6"
Device Product ID (264):    1203, 12556
libinput Drag Lock Buttons (292):   <no items>
libinput Horizonal Scroll Enabled (265):    1

So is there any way to increase the mouse speed?
... why is the mouse support so bad? oO
Answer: From your xinput output, you may want to consider changing Accel Speed to something > than the current value of -1.000000. The largest value for this parameter is 1.0, which is maximum acceleration, and will likely give you the increased mouse speed that you're seeking.
As an example, I'm using -.1 for my acceleration value.
To temporarily (for the session) set a new value, use the following command: sudo xinput set-prop <n> 276 -.1, where <n> is the property value of the mouse/touchpad determined by running xinput list (it appears that you've already done this, but the device is not listed in your output).
To permanently set this value, you'll need to edit the libinput.conf file located in /usr/share/X11/xorg.conf.d. Option details/syntax are available on this site (e.g., AccelSpeed).
Comment: I have "Accel Speed" set to 1.0, but it is anyway too slow and I can't set higher value, unfortunately, `xset` and `xinput` don't work at all
Comment: The acceleration has this value on purpose. I strongly dislike mouse acceleration, as it makes the mouse move with different speeds at different times.
Comment: I have two monitors with high resolution, but my mouse speed is too slow.  I try to set `Accel Speed` to a value `> 1` but I get `Error of failed request:  BadValue (integer parameter out of range for operation)`. `< 0` doesn't get it work.

Ubuntu 16 Mouse increase speed


Pass additional parameter to Python pipe (pipetools)

Question: Is it possible to pass additional parameter to pipe, for example:
We have:
v= (s > pipe | a | b | c)

this is the same as
v= c(b(a(s)))

How is it possible to use pipe with something like:
v= c(b(a(s), d))

Comment: Why not just use `v= c(b(a(s), d))`? What does `pipe` give you?
Comment: [Pipetools](https://pypi.python.org/pypi/pipetools) attempt to simplify function composition and make it more readable  - it's a good reason to write clear and readable code.
Comment: Well: 1. that's *less* readable to the overwhelming majority of Python users; and 2. did you actually *read* that documentation, which gives examples of using `partial`s to achieve this?
Comment: `odd_sum = pipe | xrange | partial(ifilter, lambda x: x % 2) | sum`  Sorry I'm new in Python, but as I can see `partial` doesn't accept parameter from pipe, `ifilter` accepts incoming parameter and `partial` uses only 2 arguments: what `ifilter` returns and `lambda x: x % 2`, or am I wrong?

I tried constructions like
`v= (s > pipe | a | b(d) | c)`
and
`v= (s > pipe | a | b(s, d) | c)`
doesn't work
Comment: Reread the partial and pipe documentation. What does *"doesn't accept parameter from pipe"* mean, it's just for creating general callables with some parameters preset. It's not clear why you ever thought those *"constructions"* would work.
Comment: 1. Doesn't work because function b accept 2 parameters
2. Formally 2nd case works but it doesn't pass to b result of a(s), just passing init s value.

I need to pass to b(var1, var2) one argument from pipe (which is the result of a(s)) and another variable from general scope
Comment: Please give a [mcve] of the code you're trying to write and the problems with it. It is certainly possible to write a `partial` that allows `b` to be called with a single argument from the pipe and another argument set from scope, it's not clear from your comments why you're failing to achieve that.
Answer: Library author here, randomly found this question now, but maybe it will still help someone.
If you need partial application where the pipe input has to go in front of, or in the middle, of the partially applied arguments, you can mark the space for it with the X object. So for your example, you would do:
from pipetools import pipe, X

...

v = s > pipe | a | (b, X, d) | c

This is enabled by the xpartial function and can also be used outside of a pipe. More information in the docs
Answer: According to the example here http://0101.github.io/pipetools/doc/#automatic-partial-application-in-the-pipe
you can use v= s > pipe | a | (b,d) | c
which equals to v= c(b(d, a(s)))
I do not know how to get v= c(b(a(s), d)) or if that is supported by the pipetools package
Answer: Stumbled upon only this answer, and in case someone needs another use case,
>>> from pipetools import pipe,X

>>> def multArgs(x,y):
       return x+y+1

>>> 1 > pipe | (multArgs,2) #4


Why can't I use weapons during the quest 'Dangerous Minds' in Fallout 4?

Question: Whenever I start the quest 'Dangerous Minds', my weapon automatically lowers itself and is unusable. The item is still equipped as it shows in my Pitboy but it will not raise no matter what button i press (I play on Xbox One). I have tried going back to before the mission starts and equipping different weapons but nothing seems to work. How do i raise my gun again?
Comment: @Timelord64 This question was asked by someone else...
Comment: @Zaibis I think that Timelord was correct in removing the tag *after* the answer accepted indicated that it was not a platform-specific issue. For future use, it doesn't make sense to keep a question tag that no longer accurately indicates a possible aspect of the problem. This is just my opinion.
Comment: @Timelord64: why you rmeoved the xbox-one tag? its pretty much what theese tags are for if platform related behaving is expected. I was going to even remove the part out of the post to get in as tag but now I'm courious why you did the opposite?
Comment: @Zaibis, what makes you think the xbox one tag is even appropriate? This is not an issue you are having with the actual console, itself. It is a problem with the game. Console tags are to be used if you are asking about either the console, itself, or a feature exclusive to that console. Your question applies to all versions, and so it should not used. Im not sure why you would think it is xbox specific, though. You have even accepted an answer that states 'thats how it is suppose to be'
Comment: @Timelord64: I never even played the game. jsut wondering. Since "or a feature exclusive to that console." OP sounds to me like he is assuming, he experiences an bug, what might be platform depending! so xboxone specific behaving. and even after clearifying it is not a bug, the OP's initial intention was xbox one related. I learned on other SE pages this belongs to a tag and not written info. So independend about the tag is appropiate or not... In anyway the information about plattform doesn't belong into text. Or is that different on gaming SE page?
Comment: @nukeforum: I'm fine with that. But shouldn't be the platform information then be removed from the text, too?.... or even in ANY case?
Comment: @Zaibis Well, I would agree, but in this case, the author is clarifying the statement "...button i press."[sic] by saying that s/he is playing on some kind of console. I don't think it's imperative to remove all mention, but I think the tag does some work in driving people away from an answer if it doesn't match their platform.
Comment: @Zaibis If you feel like this issue needs attention, you should post in the meta about it.
Answer: The quest is making you relive Kellogg's memories. You can not use your weapons during this sequence.
http://fallout.wikia.com/wiki/Dangerous_Minds


Why are different cursors used when hovering over buttons in Gmail?

Question: In the Gmail interface they are not consistent in which cursor they use on button/link hover.
They use the "hand" pointer for:

Links in the sidebar(mail, contacts, inbox, starred etc..)
The mails
The consistent Google toolbar(top)
Settings
Chat expand and dropdown "more" buttons

They use the regular cursor for:

The mailtoolbar(Archive, spam, delete, +/- importance etc..)
The search button
The compose mail and new contact button
The send invite button

What are the reasons behind these choices and inconsistency (most specifically the send invite button) in some cases?
I have not collected data on these inconsistencies across other google products.
Info: I am using the preview theme, but it seems to be the same across all themes
Comment: In addition - when you hover over a mail for 2 seconds you get a popup with buttons identical in style to the mail toolbar but for which the cursor is the *hand*, not the pointer!
Answer: The hand cursor icon is used for controls that provide navigation-like interaction. The regular cursor icon is retained when the interactive items are not for navigation, e.g. command/action buttons.
The distinction between navigation and navigation/action can sometimes be subtle in apps like Gmail, but it is an important one and can drive user expectations and behaviour. I suspect divergence from this design style within Gmail is a mistake rather than a systematic choice.
Comment: Very well spotted!
Answer: Just walked round my Gmail and pretty well every link has a hand cursor including the mail toolbar.  The exception is the Send Invite button. I suspect that there are either weirdnesses going on either with the browser (as I write I'm using IE8 with XP) or cacheing.
Of course it wouldn't be unheard of that the Gmail developers are doing some kind of A/B testing to see if anyone notices.
Answer: Dog barks when you bother it, cat miows then you bother it, and almost all animals produce sound on being bothered.
What's the point? I tell you. Hovering effect is in use just as an indicator, or a kind of visual feedback. So, up to here, consistency doesn't matter.
However, I think we should first define consistency. I think we can divide it into two major categories. Graphical Consistency, and ** Perceived Consistency**. What you're talking about is graphical consistency. But in real world, what matters is that you should be able to get feedback and react. That's the point. Now, if you can get that in one application with 10 different hovering effects (an inconsistency in graphical design), you still feel consistency in your mind.


Cannot find error: angular.js:38 Uncaught Error: [$injector:nomod]

Question: Please help to resolve this error. I can't resolve this issue.
\layout\sidenav.controller.js
angular.module('app.layout', [])
.controller('SideNavController', SideNavController);

function SideNavController(){
  var vm = this;
  vm.name = "sideNav"
}

app.module.js
angular.module('app', [
  /* AngularJS modules */
  'ngMaterial',
  'ngSanitize',
  'ngAnimate'
    /* app.feature modules */
  'app.layout'
  /* cross.app modules */

])
.config();

angular.js:38 Uncaught Error: [$injector:nomod] http://errors.angularjs.org/1.5.5/$injector/nomod?p0=app(…)(anonymous function) @ angular.js:38(anonymous function) @ angular.js:2070b @ angular.js:1994(anonymous function) @ angular.js:2068(anonymous function) @ app.config.js:1
app.module.js:7 Uncaught SyntaxError: Unexpected string
angular.js:38 Uncaught Error: [$injector:nomod] http://errors.angularjs.org/1.5.5/$injector/nomod?p0=app(…)(anonymous function) @ angular.js:38(anonymous function) @ angular.js:2070b @ angular.js:1994(anonymous function) @ angular.js:2068(anonymous function) @ app.run.js:1
angular.js:38 Uncaught Error: [$injector:modulerr] http://errors.angularjs.org/1.5.5/$injector/modulerr?p0=app&p1=Error%3A%20%…ogleapis.com%2Fajax%2Flibs%2Fangularjs%2F1.5.5%2Fangular.min.js%3A21%3A332)(…)(anonymous function) @ angular.js:38(anonymous function) @ angular.js:4587q @ angular.js:322g @ angular.js:4548bb @ angular.js:4470c @ angular.js:1746yc @ angular.js:1767ee @ angular.js:1652(anonymous function) @ angular.js:30863b @ angular.js:3166Qf @ angular.js:3456d @ angular.js:3444
\index.html
<!DOCTYPE html>

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link href="/stylesheets/style.css" rel="stylesheet">
  <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
  <link rel="icon" href="data:;base64,iVBORw0KGgo=">

  <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/angular_material/1.1.0/angular-material.min.css">

  {{vm.name}}

\angular.config.js
angular.module('app')
.config(configure);

function configure() {

}

\angular.run.js
angular.module('app')
.run(runBlock);
function runBlock() {

}

Answer: You are missing a , after ngAnimate
angular.module('app', [
  /* AngularJS modules */
  'ngMaterial',
  'ngSanitize',
  'ngAnimate',
    /* app.feature modules */
  'app.layout'
  /* cross.app modules */

])


Google Chat API: Delete message from bot gives a 401 error

Question: This is the code i'm trying to use for deleting messages posted through a webhook to a chat room (I grab messageID when I create It with this same request but POST method and sending message in a text variable):
<code>var WEBHOOK_URL2 = "https://chat.googleapis.com/v1/spaces/<SPACE>/messages/<MESSAGEID>.<MESSAGEID>?key=<KEY>&token=<TOKEN>%3D";
  var options = {
    'method' : 'delete',
    'muteHttpExceptions' : true,
  };

  var response = UrlFetchApp.fetch(WEBHOOK_URL2, options);
  Logger.log (response);

</code>
The response is
<code>"error": {
    "code": 401,
    "message": "Request is missing required authentication credential. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.",
    "status": "UNAUTHENTICATED"
  }
</code>
As commented, creating messages works with those credentials (key / token from chatroom webhook) Maybe i am missing something from the documentation at https://developers.google.com/hangouts/chat/reference/rest/v1/spaces.messages/delete ?
Thank you in advance,
Answer: That error usually occurs because the request lacks the access token or that access token wasn't validated. I assume that you are using Apps Script for this task. If my assumption is true, you'll find this reference useful; it summarizes the OAuth 2.0 protocol for Google APIs using JavaScript. For obtaining access tokens, please refer to this other guide for a complete step-by-step. Please, follow those steps on your request routine and don't hesitate to write back if you need more help.


Default spinner is not crescent but lines for Android Ionic 4

Question: I added ion-refresher in a Ionic 4 project like this :
<code><ion-refresher slot="fixed">
    <ion-refresher-content></ion-refresher-content>
</ion-refresher>
</code>
But for Android platform the default spinner showing up is lines not crescent.
Answer: you can specify the spinner shape you want just follow this link
Comment: Thanks, Ali for the immediate response. But I want it for ion-refresher spinner.
And in my case the issue is ion-refresher-content is not taking up the spinner platform specific like crescent for Android as default.