Tuesday, 1 October 2013

Ubuntu Button is too slow

Ubuntu Button is too slow

When I push Ubuntu Button, it sometimes takes the menu up to 10 seconds to
appear. Or at least 4 seconds in average.
How do I make it faster?

Describe explicitly the $M$-measurable functions in case $M$ is one of the following $\sigma$-algebras:

Describe explicitly the $M$-measurable functions in case $M$ is one of the
following $\sigma$-algebras:

Describe explicitly the $M$-measurable functions in case $M$ is one of the
following $\sigma$-algebras:
(a) $M=\{\emptyset,X\}$
(b) $M=2^{X}$
(c) For certain disjoint sets $E_1,...,E_N$, $X=\cup_{k=1}^N E_k$, and $M$
is the algebra (in fact, $\sigma$-algebra) generated by the collection of
sets $\{E_1,...,E_N\}$.
Here's my book's definition of $M$-measurable:
Suppose $f:X\to[-\infty,\infty]$. Then $f$ is $M$-measurable if for all
$t\in[-\infty,\infty]$ the set $f^{-1}([-\infty,t])$ belongs to $M$. Inn
other words, $\{x\in X|f(x)\le t\}\in M$.
Of course, the form of the inequality $f(x)\le t$ is arbitrary.
Thanks.

Monday, 30 September 2013

Static IPv6 address in Windows unused for outgoing connections

Static IPv6 address in Windows unused for outgoing connections

I'm running a Windows server and trying to get it to use a static IPv6
address for outgoing connections to other IPv6 hosts (such as Gmail). I
need this because Gmail requires a ptr record, and I can't set one for
random addresses.
The static address is configured on the host, but it also has a temporary
privacy address as well as a random address from the router it seems. By
default Windows uses the privacy address; it seems this is the expected
behavior (and it makes perfect sense for people/users that did not set a
static address, but I did!).
I've tried disabling the privacy address with:
netsh int ipv6 set privacy disabled
This indeed gets rid of the privacy address, but I still have the random
address that the router assigned. To disable this, it was said I needed to
disable "router discovery" using this command:
net interface ipv6 set interface 14 routerdiscovery=disabled
Upon doing this, all IPv6 connectivity is lost. If I do this while pinging
Gmail, it will report "Destination host unreachable" as soon as I enter
the command. In the static IPv6 configuration, I did configure the default
gateway and prefix length, so I don't see why it's unable to connect.
Probably has something to do with the lack of ARP in IPv6 and somehow
being unable to resolve the router's MAC, but I wouldn't know how to fix
this.
Finally I've tried disabling the DHCPv6 lease with these commands:
netsh interface ipv6 set interface "IDMZ Team" managedaddress=disabled
netsh interface ipv6 set interface "IDMZ Team" otherstateful=disabled
Which was to no avail; the host continues to obtain and use the
router-assigned IPv6 address.
The router is a FritzBox 7340, which shows me all the IPv4 and IPv6
addresses that the host (identified by MAC) utilizes, but I'm unable to
change the assigned address. Maybe this could be done over the telnet
interface of the router somehow, but again, I wouldn't know how to do this
even if it's the way to go.
In short, any of the following would probably solve my problem:
Change Windows' source address selection behavior.
Have Windows not get an address from the router and not generate a privacy
address;
Have the router hand out a static address and make Windows use that as
source address.
Recover connectivity after disabling router discovery on Windows.
Alternatively I might use some (batch, perl, ...) script to throw away all
IPv6 addresses except the desired one, but this feels rather hacky. If
it's the only way (or less hacky than another hacky solution), it might be
an option though.
Thanks!

Biggest ellipse included in a convex polygon

Biggest ellipse included in a convex polygon

Considering a N edges convex 2D polygon called P. Let's name its vertices
$\{p_1, p_2, ..., p_N\}$ described in a counter-clockwise order, with $p_i
= (x_i, y_i)$
What would be, and how would one compute(preferably without optimization
algorithm) the ellipse of biggest area E included in this polygon?

Why and when we should use arugment.length in ember.js

Why and when we should use arugment.length in ember.js

Below code is taken from here. But I do not understand, why at the time
that the author use fullName as computed property, he did the check for
setter with argument.length instead of value.length, which may more
related to the value variable that is assigned to the function. I wonder
what is the difference and why he is using arugment.length in this case?
App.Person = Ember.Object.extend({
firstName: null,
lastName: null,
fullName: function(key, value) {
// setter
if (arguments.length > 1) {
var nameParts = value.split(/\s+/);
this.set('firstName', nameParts[0]);
this.set('lastName', nameParts[1]);
}
// getter
return this.get('firstName') + ' ' + this.get('lastName');
}.property('firstName', 'lastName')
});
var captainAmerica = App.Person.create();
captainAmerica.set('fullName', "William Burnside");
captainAmerica.get('firstName'); // William
captainAmerica.get('lastName'); // Burnside

why textchanged and selectedindexchange events don't post correct values in asp.net?

why textchanged and selectedindexchange events don't post correct values
in asp.net?

how to use selected index changed event of drop down list in asp.net??when
I set auto post back ==true, dropdown reload again and select value
changed to first index. i have problems like this problem in text changed
event of textbox that I know only auto post property. but auto post back
not correct solution.

Sunday, 29 September 2013

Stack level too Deep - Rspec

Stack level too Deep - Rspec

I've seen tons of these questions, but none of their solutions are working
for me. I have a single test like so:
describe RolesController do
describe "#delet" do
context "When the user is logged in" do
let(:user) {FactoryGirl.create(:user)}
let(:admin) {FactoryGirl.create(:admin)}
let(:adminRole) {FactoryGirl.create(:adminRole)}
it "Should allow admins to delete roles" do
sign_in admin
put :destroy, :id => adminRole.id
end
end
end
end
Simple, simple, simple. Yet I get the typical error:
1) RolesController#delet When the user is logged in Should allow admins
to delete roles
Failure/Error: Unable to find matching line from backtrace
SystemStackError:
stack level too deep
#
/home/adam/.rvm/gems/ruby-2.0.0-p247/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:23
and I'm all like ... what? Again I have read dozens of questions on this
and it seems to be something with factory girl but I cannot see what the
issue here would be. I have tons of other tests that instantiate factory
girl based object like this with no issue.