Traffic Violation Question

Question: If a police officer stops someone for a traffic violation and they don't have a driver's license and no identification at all, what is the charge?
Comment: The question is a bit ambiguous between a case when someone doesn't have a license or identification with them, and when someone doesn't have a license or identification at all.
Answer: It is hard to explain in plain English. The bottom line is that this is the misdemeanor driving without a license.
The worst case is driving with a revoked license: that is a gross misdemeanor. The second worst case is driving with neither valid ID nor a current or expired license. Under RCW 46.20.005, it is a misdemeanor to drive without a license.

Except as expressly exempted by this chapter, it is a misdemeanor for
  a person to drive any motor vehicle upon a highway in this state
  without a valid driver's license issued to Washington residents under
  this chapter.

But there is an exception which says that "other laws apply here":

This section does not apply if at the time of the stop
  the person is not in violation of RCW 46.20.342(1) or {former
  46.20.420 →} 46.20.345 and has in his or her possession an expired driver's license or other valid identifying documentation under RCW
  46.20.035.

Those other sections are about driving with a revoked license, a gross misdemeanor. If you have an expired license, this section does not apply (a more serious crime is involved). If you have valid ID, this section does not apply (a less serious crime is involved).
It is a traffic infraction and not a misdemeanor under RCW 46.20.015 if all of the following conditions are true: the person

Drives any motor vehicle upon a highway in this state without a valid
  driver's license issued to Washington residents under this chapter in
  his or her possession; (b) Provides the citing officer with an expired
  driver's license or other valid identifying documentation under RCW
  46.20.035 at the time of the stop; and (c) Is not driving while suspended or
  revoked in violation of RCW 46.20.342(1) or *46.20.420.

That means that you can drive with just a passport (state ID card, military ID etc), and the price is a traffic ticket. But you can reduce the penalty by getting a drivers license:

(2) A person who violates this section is subject to a penalty of two
  hundred fifty dollars. If the person appears in person before the
  court or submits by mail written proof that he or she obtained a valid
  license after being cited, the court shall reduce the penalty to fifty
  dollars.

In case you think you can just take your chances and at most get stuck with a traffic ticket, also note RCW 46.20.317:

The department is hereby authorized to place any unlicensed person
  into a suspended or revoked status under any circumstances which would
  have resulted in the suspension or revocation of the driver's license
  had that person been licensed.

If you're a frequent illegal driver, they can revoke your non-existent license, and now you're driving with a revoked license. The maximum penalty for a gross misdemeanor is 364 days in prison and $5,000 fine.
Comment: I would note that the driver could also be charged with the traffic violation that led to the stop in the first place.
Comment: Could you clarify: Does "driving without a valid driver's license" mean your valid driver's license is at home, or does it mean you don't have a driver's license?
Comment: If you're asking about 005, it should be read as "having not been issued", because if you *have* been issued a license, you are not guilty of 005. If you have been issued one but it expired, etc. then you committed a lesser offense.
Comment: Checkpoint stops are not in response to a traffic violation, so sometime there is only the license issue to contend with.

Traffic Violation Question


Thread - contention vs race

Question: The terms contention and race are used interchangeably when it comes to thread's state(at critical section). Are they same?
Comment: Welcome! Please [do not post the same question on multiple sites](https://meta.stackexchange.com/q/64068). Each community should have an honest shot at answering without wasting anybody's time. If you don't get a satisfying answer after a week or so, you may flag to request migration.
Comment: Cross-posted: https://stackoverflow.com/q/61919294/781723, https://cs.stackexchange.com/q/126013/755, https://unix.stackexchange.com/q/587920/9812.
Answer: These are two distinct phenomena.   Contention refers to the fact that when thread $A$ has accessed a resource $B$ needs to wait until $A$ frees it.
Race refers to the fact when both threads $A$ and $B$ want to secure access to a resource.  The fastest will secure it and thus lead to contention.
Comment: +1, although it's worth mentioning that a race does not necessarily lead to *observable* contention. This depends on how the processes are scheduled. For example if we use a single processor we might be able to guarantee that neither thread is ever blocked by the other, e.g. if A and B race to acquire a resource but both always manage to free it within a single scheduling quantum. Of course there could be contention elsewhere (e.g. in the caching protocol) but at least A and B will never need to wait for the other to free the resource.

Thread - contention vs race


PHP extension wrapper for C++

Question: I am new in this area of writing extension for PHP, however I need to create a wrapper class for C++ to PHP. I am currently using PHP 5.2.13. I read this article http://devzone.zend.com/article/4486-Wrapping-C-Classes-in-a-PHP-Extension, a tutorial on how I could proceed to wrap C++ class to communicate with PHP Zend however it is written to for linux system. Do you guys have any article or advice on how I could proceed to write a wrapper class to communicate with PHP?
Comment: This question has different answers by now
Answer: This is exactly what I've been doing lately. The tutorial you referenced is a good one (it was my starting point as well). Here's the basic process I've followed for wrapping my classes. Say you're wrapping your C++ class named Myclass:
Create php_myclass.h:

#ifndef PHP_MYCLASS_H
#define PHP_MYCLASS_H

extern "C" {
#include "php.h"
}

// Include your C++ class definition
#include "Myclass.h"

// Here is the struct which will represent the PHP version of your Myclass.
// It simply includes a pointer to a Myclass and a zend_object for PHP to
struct myclass_object {
    zend_object std;
    Myclass *myclass;
};

// Here is whatever your PHP class is going to be called in the userspace (the PHP code)
#define PHP_MYCLASS_CLASSNAME "Myclass"
extern zend_class_entry *myclass_ce;
extern zend_object_handlers myclass_object_handlers;
zend_object_value myclass_create_handler(zend_class_entry *type TSRMLS_DC);

// Later, this will be the array full of your Myclass's method declarations
extern function_entry php_myclass_functions[];

#endif /* PHP_MYCLASS_H */

Then define your php class in php_myclass.cpp:

#include "php_myclass.h"

zend_class_entry *myclass_ce;
zend_object_handlers myclass_object_handlers;

// I'm still a newb, but I think this is the function that handles memory management when
// the PHP class is deleted (goes out of scope, script ends, whatever)
void myclass_free_storage(void *object TSRMLS_DC)
{
    myclass_object *obj = (myclass_object*)object;
    delete obj->myclass;

    zend_hash_destroy(obj->std.properties);
    FREE_HASHTABLE(obj->std.properties);

    efree(obj);
}

// And likewise I believe this handles, as the name implies, mem management
// when your Myclass is instantiated.
zend_object_value myclass_create_handler(zend_class_entry *type TSRMLS_DC)
{
    zval *tmp;
    zend_object_value retval;

    // make room in memory for a new PHP Myclass object:
    myclass_object *obj = (myclass_object*)emalloc(sizeof(myclass_object));
    // fill that memory with 0s
    memset(obj, 0, sizeof(myclass_object));
    obj->std.ce = type;

    // some magic stuff (no idea)
    ALLOC_HASHTABLE(obj->std.properties);
    zend_hash_init(obj->std.properties, 0, NULL, ZVAL_PTR_DTOR, 0);
    zend_hash_copy(obj->std.properties, &type->default_properties, (copy_ctor_func_t)zval_add_ref, (void*)&tmp, sizeof(zval*));

    // make it so you can get an instance of this object in later code
    retval.handle = zend_objects_store_put(obj, NULL, myclass_free_storage, NULL TSRMLS_CC);
    retval.handlers = &myclass_object_handlers;

    return retval;
}

// First, we define some argument info for methods that take arguments (if we have any)
// This one means, obviously, one argument:
ZEND_BEGIN_ARG_INFO_EX(php_myclass_one_arg, 0, 0, 1)
ZEND_END_ARG_INFO()

// This one two args, etc.
ZEND_BEGIN_ARG_INFO_EX(php_myclass_two_args, 0, 0, 2)
ZEND_END_ARG_INFO()

// Here's where you tell PHP what methods your Myclass PHP class has.

function_entry php_myclass_functions[] = {
    // A special property at the end of this line for the constructor:
    PHP_ME(Myclass,__construct,NULL,ZEND_ACC_PUBLIC|ZEND_ACC_CTOR)

    // Normal methods look like this:
    PHP_ME(Myclass,methodNameNoArgs,NULL,ZEND_ACC_PUBLIC)
    PHP_ME(Myclass,methodName1Arg,php_myclass_one_arg,ZEND_ACC_PUBLIC)
    PHP_ME(Myclass,methodName2Args,php_myclass_two_args,ZEND_ACC_PUBLIC)

    // Three magic NULL values, no idea why they have to go here.
    { NULL, NULL, NULL }
};

// And now, define each of those Myclass methods you just instructed PHP
// to expose to the userspace:
PHP_METHOD(Myclass, __construct)
{
    Myclass *myclass = NULL;
    zval *object = getThis();

    // Create an instance of the class you're wrapping
    myclass = new Myclass();

    // Make object (which points to $this for your PHP object instance)
    // an instance of the struct that represents your php class
    myclass_object *obj = (myclass_object*)zend_object_store_get_object(object TSRMLS_CC);

    // Set the internal Myclass of this to the instance of Myclass you just made
    obj->myclass = myclass;

    // Done.
}

PHP_METHOD(Myclass, methodNameNoArgs)
{
    // Get the current instance of your PHP Myclass into myclass:
    Myclass *myclass;
    myclass_object *mo = (myclass_object*)zend_object_store_get_object(getThis() TSRMLS_CC);\
    myclass = mo->myclass;

    if (obj == NULL) {
        // error checking
        RETURN_NULL();
    }

    // Return the value of your myclass method using one of the RETURN_* macros
    // Here we'll pretend this one returns boolean:
    RETURN_BOOL(myclass->methodNameNoArgs());
}

PHP_METHOD(Myclass, methodName1Arg)
{
    // Now, let's pretend your Myclass::methodName1Arg(int) takes an int
    // and returns a std::vector (which you want to be an array)
    long param;

    // Get the current instance of your PHP Myclass into myclass:
    Myclass *myclass;
    myclass_object *mo = (myclass_object*)zend_object_store_get_object(getThis() TSRMLS_CC);\
    myclass = mo->myclass;

    if (obj == NULL) {
        // error checking
        RETURN_NULL();
    }

    // Here's how you parse parameters of your PHP method call.
    // The second parameter is "l" for long int. Read the tutorials online for more
    // on how to use this function.
    if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &param) == FAILURE) {
        RETURN_NULL();
    }

    // Get the real return value you want to translate for PHP
    std::vector retval = myclass->methodName1Arg(param);

    // Use the magic "return_value" (which is in every method behind-the-scenes)
    // and initialize it to be a PHP array:
    array_init(return_value);

    // Loop through the vector and build the array:
    for (std::vector::iterator i = retval.begin(); i != retval.end(); ++i) {
        add_next_index_long(return_value, *i);
    }

    // done. return_value is always returned for you.
}

PHP_METHOD(Myclass, methodName2Args)
{
    // "Left as an exercise for the reader" is coder slang for
    // "I *really* don't feel like typing anymore." :)
}

I hope this example code compiles, or at least helps. :) It was sort of hastily put together from real working code I have here, and if the find/replaces broke something, at least you might get an idea of what to do. There's plenty that's left out of this, read Sara Golemon's three-part extensions tutorial on http://devzone.zend.com/article/1021 for more. Good luck.
Comment: @ John Factorial
Thanks for the reply. I made my extension using ubuntu instead of window now and manage to build a extension with the help from the community and Sara book =)
But unfortunately I have face another problem. I tried to convert an memory intensive C++ application to php extension. It work fine in C++ but as an extension. The result from the extension always seem to be different each time i execute. I suspect because the object created is not cleared. Still trying to figure out this problem, do any body have any issue with the memory when building php extension?
Comment: As with all C/C++ code, memory-related issues abound and can have a variety of causes. Different results every time you run indicates some function may be returning a pointer to a variable that has gone out of scope, or in some other way accessing memory that is no longer valid. Also, PHP is often run in a multi-threaded environment, so that could be your problem. Impossible to know without code and a better description of your problem. I suggest you ask a new question about it.
Answer: The best "documentation" you'll find is the source code of PHP and is extensions (sorry). You'll find you have to dig into the sources (especially the headers of the Zend engine) as soon as you're doing something non-trivial.
Having said this, there are a few resources you might find useful to get you started. See these articles and Extending and Embedding PHP by Sara Golemon. See also pecl.php.net/support.php

PHP extension wrapper for C++


Using Scripted Expressions for Shape Key Drivers

Question: I am having trouble finding an example of how to use python scripts to drive shape keys, as opposed to using python scripts to move bones which animate the characters mesh through Bone Driven Shape Key animations. In other words - is there a way of changing the shape key values in the BGE during game play that is simper than accessing the bones which are tied (using Drivers) to the shape keys values?
Here is an example of Bone Driven Shape Key animations http://vimeo.com/21357304 if it is not clear what I am referring to (go to 15:20 on-wards).
Thanks guys!
Answer: I don't see a way of accessing the shape key value from within the game engine. A mesh object is copied to a KX_MeshProxy for use in the game engine, which only gives access to the mesh and materials. This would mean that we need to use either drivers or actions to animate shape keys within the game engine.
If you have a driver setup that uses the bone position to control the shape key then you need to move the bone to control the shape key. You can create an action that moves the bone and can easily be played in the game engine.
Without using a driver you can create an action that keyframes the shape key value and then play that action in the game engine. Use the Shape Key Editor instead of the Action Editor (both are subtypes of the Dope Sheet). Shape Key actions show up in the same list as normal actions.
If you don't want to play an action from start to finish then you will want to have a driver that simply sets the shape key value to an object's X location. You can add an empty just for this purpose and move it in small increments to set the shape key value to the value you want at the time you want it there.
Comment: Thanks for the insight. It is not possible then to perhaps create a Game Property, whose value can be changed in a script called from a BGE Logic Brick, and which is linked to the x-axis of the Driver graph for a Shape Key?  In the Drivers drop down list in the properties of the Graph Editor/Drivers panel there is the option to "Add Variable". There is the option to change the Driver Variable Type, for example to Single Property. It then needs a path, can this path not link to the Game Property variable being changed in the BGE script called by the Logic Block?
Comment: We can only access limited data within the bge. I think if you want fine control based on events you need to use a driver on the shape key value, it could be as simple as `value=empty.location.x` and you can change the empty's location by 0.001 to get the shape key value you want.
Comment: Thanks sambler. Here is a link I found in my research that might help others too: [link](http://blenderartists.org/forum/showthread.php?246315-mulitple-shapkeys-with-the-action-actuaor-in-the-bge/page2). The best solution can be found in the  infiniteShapeKeyDemo.blend file posted by MarcoIT. Their solution is basically what you just stated above. But I was hoping that since 2011 they may have updated the BGE to have more access to controlling the characters animations/shape keys.


Anyone know what style outdoor faucet valve stem this is?

Question: Trying to replace an outdoor faucet valve stem and handle, but can't find the manufacturer and model. TIA.
Comment: There's a good chance you could take that stem to a good hardware store and find a new handle to fit. And they would certainly have rubber bib washers to fit the other end.
Answer: This valve stem is from a standard sillcock similar to the one shown below from Lowe's. I doubt you'll find an exact replacement, maybe from a plumbing supply store. These units are usually just replaced. Go behind the wall from the other side and look for the other end. Depending on your plumbing, it should just unscrew and pull it out from the outside. Buy one the same size and reinstall it according to any directions.
Comment: @kreemoweet   The OP stated he's trying to replace it, not repair it. The dozen or so I've done went as stated in my answer.  Try writing your own answer and don't be so fast to DV.
Comment: Replacing a "frost-free" hose bib is frequently a large project, involving destruction of finished inside wall/ceiling surfaces. Not to mention the waste of time and materials. They are also often soldered in place, rather than screwed. It is always better to replace only defective components of the faucet, if at all possible.
Comment: Granted, sill cocks have gotten ridiculously expensive of late (as has everything), @kreemoweet, but replacement is often quite simple, too.


Android / Java Unit-Testing Clarification

Question: While looking up for unit testing for Android applications, I came across a lot of voices over how it is difficult to test-unit an Android app.
For example:
Dependency issue - why is this a problem for unit-testing in Android?
What would be "dependent" in this case that testing is impossible?
For example:
public String getName()
{
    mName = "Android";
    return mName;
}

Would this be hard to unit-test? If so, why? Is it because it "depends" on String class? But why can't it depend on String class as far as unit-testing is concerned? If my sample above and my understanding is off, please correct me.
Another issue I heard is:
"the android.jar is not on the machine! It's on the emulator, that's why it makes unit-testing on Android a living hell!"
But, why would it be a living hell if it is installed on the emulator?
Another issue I hear the most is this:
The Activity class. Some say it is a view, some say it is a controller because it handles creation of objects, too. That's why this is an issue. But I don't get it at all. Why would this cause problem?
Another thing I am trying to get my head around is:
Why in both Android and Java they need to "mock" a class to unit-test? Why? In Objective-C for example, I have never heard of a need such as this.
Thank you.
Answer: This is a lot of questions that you might consider splitting up, but here goes:

Dependency issue - why is this a problem for unit-testing in Android?

Really, this is as much of a problem for Android as it is for anything else.  Depending on how you architect your application, isolating from dependencies can easy or hard.  There's nothing in your getName example that makes it impossible or even difficult because that example is not actually dependent on anything besides the base libraries (the String class).

But, why would it be a living hell if it is installed on the emulator?

It's not really, it's just different than a lot of other platforms.  You have to run tests on a device or emulator which is a little strange.

The Activity class.

I think this is somewhat people creating their own problems coupled with a platform that doesn't try to prevent them from creating these problems.  Like I mentioned earlier, depending on how you architect your code, it's either going to be easy or hard to isolate it for unit testing.  I think a lot of difficulty comes into Android development because the Activity class is used for more than what it should be used for.  In most code I've seen it's used as a view, controller, model, and whatever else you'd want.

Why in both Android and Java they need to "mock" a class to unit-test? Why? In Objective-C for example, I have never heard of a need such as this.

In some ways mocking is the core of unit testing. It's not specific to Android or Java.  The point of unit testing is testing a single piece of code in isolation.  If you've seen tests before that aren't mocking dependencies they are not unit tests.  It sounds like you might want to read up on what exactly unit testing is - the wikipedia page is a good introduction: https://en.wikipedia.org/wiki/Unit_testing
I just searched for iOS mocking framework, and this was the first result: http://ocmock.org/.


Understanding the compilation/linking/upload process (so I don't have to use the IDE)

Question: I have started to play with and arduino UNO quite recently (without any prior experience with micro-controllers). I would like to use emacs instead of the IDE, and I'd also like to know what the IDE does under the hood, in order to be able to write my own makefile. The tutorials I've found are either outdated, or are presented as a series of steps without any explanation. I'd appreciate it if someone could explain to me how the whole compliation/linking/upload process works using gcc-avr and avr-dude, and how it is used by the IDE.
Comment: You can take a look under the hood by "Show verbose output during: ☑ compilation ☑ upload" Under File → Preferences.
Comment: Almost duplicate: [Compiling code via terminal](http://arduino.stackexchange.com/q/35280). See the links to arduino-builder and Sudar Muthu' Makefile in my answer to that question.
Comment: You can use Emacs in combination with PlatformIO. See also [my answer to a related question](https://arduino.stackexchange.com/a/88216/13174). I'm using `--ide vim` when initialization the project in my example, but that command also support emacs.
Answer: If you want an exact duplication of what the IDE does but want it driven from the command line, that's what Ino is for. The full Arduino build process involves copying a lot of files from a lot of places, and is generally not trivial to duplicate.
If you're ready to let go of .ino files and the Arduino libraries, you get a much simpler toolset. avr-gcc compiles, avrdude uploads, and you're done. Here's one of my makefiles from a simple project:
<code>CC=avr-gcc
CXX=avr-c++
CXXFLAGS=-Wall -Wextra -mmcu=atmega1284p -Os
CFLAGS=$(CXXFLAGS)
BINARY=ledmatrix
OBJECTS=

all: $(BINARY)
↹@avr-size $<

$(BINARY): $(OBJECTS)

clean:
↹@rm -f $(BINARY) $(BINARY).hex $(OBJECTS)

upload: $(BINARY).hex
↹@avrdude -c usbasp -p m1284p -U flash:w:$<:i

%.hex: %
↹@avr-objcopy -j .text -j .data -O ihex $< $@

.PHONY: all clean upload
</code>
If copying-and-pasting, be sure to replace all "↹" with tab characters.
EDIT:
I have created a repository with my buildsystem on Github.
Comment: The Arduino libraries would contain their equivalents, but they can be a bit erudite to read. I recommend finding a low-level AVR tutorial to work through that will explain to you the various registers and peripherals. Oh, and the datasheet. **Always** get the datasheet.
Comment: Thanks, your makefile is pretty much what i was trying to come up with. But i guess getting rid of the libraries means that i wont be able to use functions such as digitalWrite()? In that case, where should i look to learn their plain C equivalents?
Answer: Here is a high-level overview of Arduino's compilation process, for folks like me who found this post while hunting for one:
The compilation process
The arduino code is actually just plain old c without all the header part (the includes and all). when you press the 'compile' button, the IDE saves the current file as arduino.c in the 'lib/build' directory then it calls a makefile contained in the 'lib' directory.
This makefile copies arduino.c as prog.c into 'lib/tmp' adding 'wiringlite.inc' as the beginning of it. this operation makes the arduino/wiring code into a proper c file (called prog.c).
After this, it copies all the files in the 'core' directory into 'lib/tmp'. these files are the implementation of the various arduino/wiring commands adding to these files adds commands to the language
The core files are supported by pascal stang's procyon avr-lib that is contained in the 'lib/avrlib' directory
At this point the code contained in lib/tmp is ready to be compiled with the c compiler contained in 'tools'. If the make operation is succesfull then you'll have prog.hex ready to be downloaded into the processor.
https://www.arduino.cc/en/Main/Documentation


phpbb3 cache issues

Question: i have an issue with caching of templates in phpbb3. i have made changes to a template in the admin control panel and saved it, then cleared the template cache through the "purge cache" and i don't see changes reflecting on the forum, but the change WAS saved in the admin control panel. i next edited the template file manually (not through the admin control panel) and uploaded my altered template file and deleted all the files from the cache directory and i still see no changes. can anyone tell me is there anywhere else that the cache files are stored? also, when i try to delete the cache for a specific file through the admin control panel in the styles section and selecting the "cache" link the page says it was deleted but the cache seems to remain. can anyone tell me if there's more than one place that the cache files are stored?? thoughts??
Answer: I realize the is a very old post, but I've had the same problems this weekend, so apologies for bringing it back...
If you edit a style from the ACP and phpBB3 can't write to the whole style folder, it copies the entire style to the database, where it now overrides the files on the server. The "Purge Cache" button will now revert back to the version stored in the database
To fix this, go back to the ACP where you edited the style and click the "Export" button th get the modified version of the style in a file version, then click the  "Refresh" button. This will nuke the database version of the style.
Now, since you probably wanted those changes, replace the style files with the ones you just downloaded. Make any further changes to the those files, purge the cache again, and stay away from the "Edit" button in the ACP unless that's the only way you're going to edit the styles.

phpbb3 cache issues


Gamma smoothing of vanilla options

Question: I want to ask a question about the answer provided here: https://quant.stackexchange.com/a/35211/61083. I'm wondering if there is mathematical proof as to why it is working. Meaning if I reprice a  vanilla option of strike K, with a stripe of vanillas of strikes ranging from K1 to KN why the gamma would be capped when the option is ATM and close to expiry and not explode.
Comment: You can provide direct link to an answer using the share buttton below an answer. "The second answer" is not a clear reference because answers can be sorted in more than one way in Stack Exhange sites. Hope you get a good answer.
Comment: The link you have provided opens up a question, not an answer.
Comment: @Alper, I'm talking about the second answer that's been provided as a response to the question. In fact, I want to know if there's a mathematical proof as to why the gamma of the strip of vanillas is capped.
Comment: @Alper, thank you I will do so.
Answer: Gamma for vanilla options are always capped, the delta of an option can only move from 0 to 1, so these numbers are capped especially with the underlying having a minimum tick size in reality. If you're asking why the Gamma is smaller for spread-out strikes then it is that as time approaches expiry for an option, only one strike can really be in play at any one time so only the Gamma from that strike near the current underlying price will be most relevant.
Comment: In theory gamma can blow up, but as you say in practice it is capped due to tick size and that gamma is calculated using finite differences especially as time to maturity approaches zero and you're near the money.
Comment: @FridoRolloos, yes I was talking about the theoritical aspect of the Gamma here.
Answer: The gamma of an option as it approaches the expiry date becomes ill defined at $S_T = K$. However, if you approximate your option sitting at $K$ as a set of options with strikes ranging from $K-\delta_K$ to $K+\delta_K$, what you're doing is limiting the spike sitting at $K$ and replacing that whole gamma for a wider one sitting along all those strikes.
Here's just a toy example on how that looks when you replace the gamma of an option with strike $K$ to ten option of strikes from 95% to 105% and 1/10 notional. You can just plug in the BS formulas (for price and gamma) and reproduce it in python easily.

Gamma smoothing of vanilla options


How do I clean a Hammerite paint brush?

Question: I have recently painted using Hammerite metal paint. When I tried to clean the brush afterwards using White Spirit, I noticed it didn't work. Hammerite sells a specialized cleaning product, but I'd like to use a product that is useful in other situations too. Is there anyone who knows what kind of cleaning product might help?
Comment: Clean brushes with olive oil,works a treat.
Answer: The consensus of opinion on the Ultimate Handyman forum seems to be to use an old brush and throw it away after use.
A couple of alternatives are suggested:

Ordianry cellulose thinners will also work.

So presumably the Hammerite product is cellulose thinners based.
and

I wrap mine very tightly in plastic and stick them in my brushmate, as long as i use them every couple of months they stay reasonably soft, even if they go a little stiff a drop of hammerite thiners brings them back to life.

Which is something I do overnight (or a couple of days at most) when using gloss paint. It does keep the bristles soft for a while so saves on white spirit and having to find a clean brush for the next coat.
Comment: If I need to store brushes for a few hours to overnight, I'll wrap them tightly in plastic and throw, er, place them gently into the freezer. 10 minutes or so out of the freezer and they've thawed and are just as wet as when they went in, ready for fresh painting.
Comment: Yep, cellulose thinner did the job. Thanks for the response!
Answer: Its not cellulose, you need to use acetone, or MEK [evo stik cleaner or methyl ethyl ketone] might also work.
Answer: Online, I saw someone suggesting olive oil to clean the brush so I gave it a go. I only had a small area to do& was using a small brush. When finished, I wiped as much paint off the brush as possible on kitchen paper and then sat it in a little pot of olive oil& worked the oil into the bristles. I then washed it out with a generous amount of washing up liquid& rinsed in warm water. The brush is as good as new. I've done it twice& both times had a good result. Not sure if it'd be practical with a big brush.
Answer: The actual Hammerite cleaner/thinners is a chlorinated thinner.  But it is very expensive .
Acetone is a good alternative. This is often the base for nail varnish remover.
If you just need a little , then borrow your wife`s  nail varnish remover. I have also tried Cellulose thinners : not quite as good and the smell can be overwhelming , it is dangerous to inhale this stuff.
I buy 2 litre bottles of Acetone . Be careful not to let Acetone near plastics, as it can melt lots of plastics (that includes your TV remotes )  I lost one when a tin dribbled onto an old remote, just a sticky mess. So lock up your remotes.
Nail varnish remover will do the same.
You can use cheap Propyl Alcohol (rubbing alcohol) to clean sticky  labels off all kinds of stuff. Much cheaper than branded bottles. This will not damage plastics either.
Answer: The cheapest way is to mix nail polish remover with white spirits? Best cleaning method!
Answer: Hammerite is thinned/cleaned with xylene (AKA xylol). Judging by odor, it's probably the main (or only) ingredient in the special, ridiculously expensive proprietary Hammerite thinner. Xylene is available (or was until recently) by the gallon or quart at the big box stores. It's actually the only solvent I know of that works (and works well) with Hammerite. FYI I've not seen the brand "Hammerite" for sale in many years; I think they sold the rights to Rustoleum, who markets a similar product. I have many partial quarts of 20-year-old Hammerite. It's some funny stuff.

How do I clean a Hammerite paint brush?


How to investigate in a program of type /SUBSYSTEM:NATIVE that crashes with the RtlFreeAnsiString API?

Question: I compiled a very simple example of an application of type /SUBSYSTEM:NATIVE writing "hello world".
It is launched thanks to the "BootExecute" key. The program works without errors.
Then I compiled a more complex example: NDK Cli. The source code was written in 2006 for Windows 32bit. I compiled it with VS2022 for Windows 64bit. The executable program is generated without error and with "level 4" for warnings.
But the RtlFreeAnsiString API crashes the program that ends abruptly. Then the windows desktop is displayed normally.
With Procmon (during boot), the stack shows that the last call before the end of the program is RtlFreeAnsiString.
Procmon also provides the source code line through the PDB file.
The program ends abruptly after the RtlFreeAnsiString API.
0   FLTMGR.SYS  FltGetFileNameInformation + 0x1e54  0xfffff8046c1b6d34  X:\windows\System32\drivers\FLTMGR.SYS
1   FLTMGR.SYS  FltGetFileNameInformation + 0x1906  0xfffff8046c1b67e6  X:\windows\System32\drivers\FLTMGR.SYS
2   FLTMGR.SYS  FltGetFileNameInformation + 0x992   0xfffff8046c1b5872  X:\windows\System32\drivers\FLTMGR.SYS
3   FLTMGR.SYS  FltGetFileNameInformation + 0x71b   0xfffff8046c1b55fb  X:\windows\System32\drivers\FLTMGR.SYS
4   ntoskrnl.exe    IofCallDriver + 0x55    0xfffff80470a2eab5  X:\windows\system32\ntoskrnl.exe
5   ntoskrnl.exe    IoBuildDeviceIoControlRequest + 0x67e   0xfffff80470ae3b9e  X:\windows\system32\ntoskrnl.exe
6   ntoskrnl.exe    KeInvalidateRangeAllCachesNoIpi + 0x7ab4    0xfffff80470a21444  X:\windows\system32\ntoskrnl.exe
7   ntoskrnl.exe    PfFileInfoNotify + 0x2964   0xfffff80470a7dc14  X:\windows\system32\ntoskrnl.exe
8   ntoskrnl.exe    MmProbeAndLockPages + 0x314b    0xfffff80470a5323b  X:\windows\system32\ntoskrnl.exe
9   ntoskrnl.exe    setjmpex + 0x4545   0xfffff80470c216f5  X:\windows\system32\ntoskrnl.exe
10  ntdll.dll   LdrRscIsTypeExist + 0x2a8   0x7ffd4a616188  X:\Windows\System32\ntdll.dll
11  ntdll.dll   RtlGetExtendedContextLength2 + 0x3dc    0x7ffd4a61682c  X:\Windows\System32\ntdll.dll
12  ntdll.dll   RtlWalkFrameChain + 0x2a    0x7ffd4a65f3fa  X:\Windows\System32\ntdll.dll
13  ntdll.dll   RtlCaptureStackBackTrace + 0x42 0x7ffd4a65f372  X:\Windows\System32\ntdll.dll
14  ntdll.dll   _misaligned_access + 0x741  0x7ffd4a6f4eb1  X:\Windows\System32\ntdll.dll
15  ntdll.dll   _misaligned_access + 0xac65 0x7ffd4a6ff3d5  X:\Windows\System32\ntdll.dll
16  ntdll.dll   RtlGetCurrentServiceSessionId + 0xbcf   0x7ffd4a60817f  X:\Windows\System32\ntdll.dll
17  ntdll.dll   RtlFreeHeap + 0x51  0x7ffd4a607511  X:\Windows\System32\ntdll.dll
18  ntdll.dll   RtlFreeAnsiString + 0x17    0x7ffd4a661fb7  X:\Windows\System32\ntdll.dll
19  native_64.exe   GetFullPath + 0x19a, C:\MesData\informatique\2022\native_64\native_64_2\shell.c(63) 0x7ff7ee2245ba  X:\Windows\System32\native_64.exe
20  native_64.exe   RtlCliSetCurrentDirectory + 0x98, C:\MesData\informatique\2022\native_64\native_64_2\file.c(99) 0x7ff7ee221628  X:\Windows\System32\native_64.exe
21  native_64.exe   RtlClipProcessMessage + 0x22c, C:\MesData\informatique\2022\native_64\native_64_2\main.c(161)   0x7ff7ee2225cc  X:\Windows\System32\native_64.exe
22  native_64.exe   NtProcessStartup + 0x91, C:\MesData\informatique\2022\native_64\native_64_2\main.c(489) 0x7ff7ee222d11  X:\Windows\System32\native_64.exe
23  ntdll.dll   RtlUserThreadStart + 0x43   0x7ffd4a5e4873  X:\Windows\System32\ntdll.dll

In the few functions used during the error from the "main", I checked that there is no "cast".
I modified this source code to create a "test command" that does this:
ANSI_STRING as;
RtlInitAnsiString(&as, "pb RtlFreeAnsiString");
RtlFreeAnsiString(&as);

This program does not work in a hyperV VM because the keyboard is not "recognized".
I can use WinDbg with a kernel debugger session with 2 PCs.

How to identify the origin of the error with Windbg?
Today, some additional information.
My last test : I commented on the lines containing RtlFreeAnsiString with "//". It is now the RtlFreeUnicodeString function that triggers the end of the program.
To be able to compile/link this program, I was forced to produce with "dumpbin.exe" the file ntdll.lib.
Because the one provided by VS2022 is incomplete: it does not contain the NtDisplayString function, for example.
In addition I use the "include" files of 2006 (from NDK CLI) because I do not find the right include files for various functions used.
I also replaced the use of the GetProcessHeap function (not to be confused with GetProcessHeaps with a 's' at the end of the name) with the creation and use of a new "heap".
//DirectoryInfo = RtlAllocateHeap(GetProcessHeap(), 0, 4096);
2 questions:
So could the parameters passed to the functions of ntdll.dll W11 not be the right ones?
Can the porting from 32bit to 64bit be incriminated?
I don't know where to look or how to look.
Thank you for your ideas
I finally understood the origin of the anomalies related to the deallaction on the heap. I had never questioned the writing of the source code. The name of the author, the quality of the writing, the little compilation error when switching to 64bit, all this pushed me not to know where to look.
But by dint of searching, and rereading the definition of the APIs, I ended up finding that the RtlInitAnsiString and RtlInitUnicodeString functions do not give rise to a buffer release by the RtlFreeAnsiString and RtlFreeUnicodeString functions.
After this fix, the simple commands of the program work well.
It remains to correct some minor anomalies, such as the use of a memory address in the kernel, hard-coded, and valid only in 32bit.
Undocumented structures also generate errors. I don't think I could find a 64bit equivalent.
Various sites describing these undocumented APIs haven't helped me yet.
That's it, everything works pretty well for me now.
Comment: Maybe you should put the solution into an answer.
Answer: I used code written by distinguished programmers. The 32bit version of the code works very well.
I assumed that porting to 64bit could cause the anomaly.
Before implementing Windbg kernel mode, I read and reread the API documentation.
And the API documentation doesn't say you have to release the buffer.
The bug in the 64bit version comes from the following write:
RtlInitAnsiString(buffer, ...)
...
RtlFreeAnsiString(..,buffer,...)
Ditto for RtlInitUnicodeString and RtlFreeUnicodeString.
There you go. Resolved.


My 2008 Volvo xc70 dashboard shows steering wheel locked, car will not start, what can I do?

Question: My 08 xc70 is showing an image of a steering and pad lock, car won't start, what can I do?
Comment: And you can turn the steering wheel or not? These are the ones with the electric steering lock, right?
Comment: Is there a chance that the steering wheel was locked while there was tension on the wheel and now it can't unlock?  Does slightly turning the wheel help?
Comment: If it's a keyless start how's the transponder battery?
Comment: This might be interesting to you. It seems lots of people are having the issue.       http://www.volvo-forums.com/t11748-steering-lock-quotplease-turn-wheelquot.htm
Answer: That's a common issue with the steering column lock (SCL) on these cars. The SCL would need to be replaced, and this requires someone with a VIDA subscription as it requires a software download to the replacement module.
As a temporary workaround, try turning the wheel all the way either CW or CCW, hold it there, and only then attempt to start the car while holding the steering wheel. This workaround worked for some people.
When you have this fault, it's also possible that the steering wheel might lock while the car is in motion: understandably, that's dangerous. Should it happen make sure to file an NHTSA report!
Comment: Should it happen while in motion, OP may not have a chance to report it to the NHTSA!
Comment: @MooseLucifer Very true...


Upgrading 2-wire to Ecebee3

Question: I have a honeywell 2 wire thermostat (old) that has 2 wires R W that seem to be wired directly to the furnace (blower/burner??) but I  also have a control board with no wires attached to it. I tried wiring my ecobee to it but no power was received. DO I need to jumper something for power to the control board... remove the wires from furnace and connect to control board????
Comment: Your question is unclear. I understand that you have 2 wires from the old thermostat. Are there any other wires present, but not connected?
Comment: You need to run a new thermostat cable run between the furnace and the thermostat location, 5+wires. If that is not doable, will a new stat location work that you can get a multi conductor to.
Answer: The Beckett GeniSys™ Advanced Burner Control is used to control the operation of the furnace, and does not appear to supply an external C terminal.  However, you may be able to power the Ecobee using an additional 24Vac transformer.
If you have an A/C system that the Ecobee is controlling, you can power the Ecobee using the transformer in the A/C system.  Just connect the R wire from the A/C to Rc, and run a C wire from the A/C to the C terminal on the Ecobee.
If you're not controlling an A/C system, you'll have to use an external transformer (or if there's one in the furnace).  If there's a transformer in the furnace (in the control box with the CYGR terminals), then you should be able to use that (assuming it's connected to power on the primary side).  Simply run a (new or additional) thermostat cable from the furnace up to the thermostat. Then wire it as follows:

Remove any jumpers between R and Rc on the Ecobee.
Connect a wire from the R terminal on the control box in the furnace, to the Rc terminal on the Ecobee.
Connect a wire from the C terminal on the control box in the furnace, to the C terminal on the Ecobee.

Assuming the transformer in the furnace is powered, that should get you up and running.

WARNING: Ecobee is an expensive piece of equipment, make sure you verify proper input voltages. You may also want to contact Ecobee support, to verify this is an accepted installation method.

Upgrading 2-wire to Ecebee3


Relative Importance of categorical variables

Question: My question concerns management issues more than statistical theory.
I am searching for a way to measure the relative importance/influence of categorical variables in a logistic regression model with continuous and categorical variables.  Since the standard deviation of dummy  variables is hard to interpret, I am searching for a robust method which doesn't include the standard deviation. Usually I use the standardized coefficients to evaluate the influence of a variable.
Answer: Personally, I'm not a fan of using standardized coefficients for the purpose of estimating relative importance for the simple reason that variables are standardized prior to model building but the coefficients that are reported are conditional. Given that, the a priori standardization will be biased.
There are many other measures of relative importance. One quick and dirty heuristic that is strongly associated with more complex, multivariate variable decomposition approaches is simply to use the aggregate F- or chi-square statistics associated with each parameter, sum up their values, repercentage to 100% and rank order based on the magnitude of the resulting percentages.
Answer: I've found the relaimpo package in R to work well for categorical and continuous variables. I've always coded catagorical variables (-1,1) etc. The relaimpo package will compute the relative contribution of each factor to the overall variance explained by the model.
http://prof.beuth-hochschule.de/groemping/relaimpo/


Tile KDE Desktop

Question: Is there a way to automatically give each window (app) equal space in a KDE desktop, like Tiling in Windows?
Answer: KDE does not have the native tiling feature you're after, you may want to look into a tiling window manager like xmonad or ratpoison, or use the built-in workspaces.
Answer: Bug 165933 deals with tiling several windows. It's not reimplemented yet in KDE 4.
Answer: Not exactly what you are looking for, but a tiling window manager is coming in KDE 4.5, here's a demonstration. An early version is already avaiable if you are brave.
Answer: kwin in KDE 4.5+ has native tiling support.
Answer: Go to Window Behaviour in your KDE menu. Look around the tabs for the check box that tells KWin to tile your windows.

Tile KDE Desktop


Finding the largest region on which Laurent series converges

Question: I need to find the largest region on which $$f(z) = z^4 sin(1/z)$$ defined on $$\mathbb{C}/{0}$$ converges.
So for the Laurent series, I got $$z^3 - \frac{z}{3!} + \sum_{k\geqslant2}\frac{-1^{2k+1}}{(2k+1)!z^{2k-3}}$$ and found that zero is an essential singularity.
But I'm unsure on how to find the largest region of convergence. From other examples that I've seen, it can usually be found by looking at the largest annulus on which the function is holomorphic but I can't seem to see that in this problem.
Any help is appreciated.
Answer: $\sin z$ is an entire function and its power series converges for all complex numbers $z$. The Laurent series is obtained from this series by changing $z$ to $\frac  1 z$ and multiplying by $z^{4}$. Hence this series converges for all $z \neq 0$.


Can work on a system increase entropy?

Question: If you add Heat on a constant volume container, disorder will increase, so Entropy will increase.
But what if I do some work on a piston-cylinder? I'll give more kinetic energy to particles, so they gain more disorder, but they also occupy a smaller volume, thus particles would be more organized (less entropy).
Is this valid? Can work create entropy? I ask this because $$ dS=\frac{dq}{T}$$
By this equation it seems that entropy only depends on Heat, not in work.
Comment: $dU = TdS-pdV$... so?
Answer: Reversible work transfers no entropy and generates no entropy; when you adiabatically and reversibly compress a gas, for example, the entropy increase from the higher temperature exactly offsets the entropy decrease from the smaller volume, as you intuited. However, irreversible work generates entropy because it involves a gradient in some field (e.g., pressure, force, electric field, etc.). When this gradient drives a transfer of energy, entropy is created.
Comment: Yes, heat transfer consists of entropy transfer. Yes, reversible processes don't generate entropy (reversible heating only transfers entropy).
Comment: thanks so much for you answer. It was helpful. So the change of entropy on the system after a reversible and adiabatic process would be zero. So the entropy production is zero.  What about a diabatic reversible process? The change of entropy wouldn't be zero, right? So the entropy production wouldn't be zero as well, right? And if it was a cycle of diabatic reversible processes? The change and production of entropy would be zero?
Comment: so the entropy production during a diabatic reversible process is zero.  Reversible processes, either it be a cycle or just 1 process, don't generate entropy, it just can change or not. Right?
I got another question, if you would like to help me.
https://physics.stackexchange.com/questions/330960/why-do-we-consider-heat-transfer-from-to-reservoirs-a-reversible-process

Can work on a system increase entropy?


How to apply for a research funding for companies?

Question: I recently graduated from PhD and right now I am working in a consulting company. My manager asked me to write a proposal to get public funding to do research. The topic is computer science and semiconductor industry. Since the company is located in Germany, I can apply for funding institutes in Germany and Europe. However, I have difficulty in finding funding institutes to support research in the industrial section.
So, I am looking forward for your suggestions and help.
Answer: In  the US through our National Science Foundation, you'd need to partner with a university who would, at least in name, lead the project. All NSF programs have eligibility requirements, and those don't usually include private non-educational entities as leads. Also, you'd need to openly publish your results. In the end, due to the Bayh-Dole Act, the university probably has the right to patent and license for sale the results, but your company would probably not be able to do so itself.
I assume that the EU and Germany have similar constraints on government grant funding, but I'm not 100% sure. It would be worth looking at some prior EU and German grants and see if they do.
You could also look at trying to satisfy government contracts in the defense industry. There are whole multi-billion dollar defense contractors in the US (Raytheon, Lockheed-Martin, etc.) that do research on behalf of the military here to deliver much more than guns and planes and such. The government frequently wants algorithms (e.g., weather prediction, signal processing), etc. to satisfy our defense needs. I suspect that yours do, too.
Comment: Partnering with non-profit institutions is key. Also it is very important that you design your project in keeping with the call, rather than the other way. Also remember that, given funding will be public, there will be key rules and limitations in terms of industrial protection and exploitation of the research results.
Answer: In Germany it is typical to apply for public funding through the federal ministries such as BMWI or BMBF. You can look up funding programs at the BMWI Förderdatenbank.
You will find some information about the programs of the BMBF here (in german).
Usually the ministries have certain topics open which you can apply for with a consortium of different industrial and academic partners. At least that's how we get public funding.
See here for a currently open call for application.
Answer: The European research funding is managed trough the cordis platform. One of the current open programs is Horizon 2020.
Answer: the best way is to look at the financial and funding structure of the institution that you would like to ask for cooperation. This information or data are available through commissioner for information of public importance. You need to be aware, that there is law in Germany that if institution is funded 100% from Government, they are not allowed to make profit outside of institutional funding,
I suggest you to  find institution in countries of EU and Europe that give legal right to institution to  cooperate and accept grants and cooperation from a private sector. Usually, Czech republic or Poland, or maybe Serbia that is outside of EU but still in Europe have these laws, that basically gives full autonomy with who they will cooperate and how.


Can I use a regular 2512 SMD Resistor (0.001 ohm) for HLW8012 IC shunt Resistor

Question: Can I use a regular 2512 SMD Resistor for the shunt resistor as current sensing resistor for the HLW8012 power meter IC.
As per the data schematic, the manufacturer recommend to use a shunt resistor of 0.001 ohms.
Comment: You *can* use it - nobody is stopping you but you won't get the accuracy you might desire and there may be nuances you didn't expect due to not using a shunt with kelvin connections.
Comment: The resistance of typical PCB  foil (1 ounce/square foot) is 0.000500 ohms per square, any size square. If you are not familiar with thinking about PCB foil resistance, you should use a 4-wire Kelvin resistor for accuracy.
Comment: What they said. Note that implementing a really good shunt resistor can involve technologies indistinguishable from magic. You can get thermionic effects, current flowing non linearly in the connections, .... . Much of this does not matter at say 1% accuracy but may well do at better than that.
Comment: @Huisman Yes, I'm aware of that but I still don't know what the  components connected to GND , Which GND?. Can you explain better to me?
Comment: @Khaalidi As Andy aka shows in linked answer with red coloured wires, line is connected to GND. So, the label GND =/= 0V but the label GND = 220Vac. And the label 5V = 5Vdc + 220Vac.
Comment: I presume you are aware the whole circuit must be considered live? (https://electronics.stackexchange.com/questions/354606/power-supply-architecture-for-energy-metering-ic-hlw8012)
Answer: Indeed you can, at Sonoff they also wanted to save a few cents so they did this:

Image from this site.
Note how the sense wires partly go under the shunt resistor.
Note that if the solder connection isn't good / reliable this can influence the total value of the shunt resistor + solder contacts. That issue is avoided when using a 4-terminal shunt resistor.
Note that at 1 milli ohm, it is easy to get a little extra resistance here and there.
As Andy aka comments: accuracy might be compromised.
Maybe that can (partly) be compensated for by a calibration.
It depends on what your priorities are (accuracy / calibration and cost).
Answer: You can approximate a Kelvin connection with a 2 terminal resistor with a custom pad design that allows sensing of the voltage at the electrode of the resistor, rather than the pad of the board. Analog has a good guide to the different approaches you can take - here are some of the possible arrangements that were tested.
Optimize High-Current Sensing Accuracy by Improving Pad Layout of
Low-Value Shunt Resistors
The testing showed that trying to measure from a 2 pad arrangement, where the solder resistance is part of the sense element, produces significant errors once you get down to milliohm value shunts.

What is feasible is going to depend on what you can achieve in board resolution and the size of the terminals on the shunt resistor you are using, but a 2512 should allow you to use the following layout, which seems to have an acceptably small error.


find the point of contact using tangent's slope,and centre of thecircle

Question: A circle passes through the points(-1,1),(0,6)and(5,5).Find the points on this circle the tangents at which are parallel to the straight line joining the origin to its centre.
I solved the three equation using the three points to get the centre as (2,3).
I recognize that the slope of the tangent would be 2/3, also that the origin lies on the circle, but I don't know how to solve it further, please help.
Answer: Hints:
Take $A (0,6) ; B (-1,1) ; C (5,5) $. Now find a line perpendicular to BC passing through its midpoint $(2,3) $. Find a line perpendicular to AC passing through its midpoint $(\frac52, \frac {11}2) $.
From these lines, you will get the centre and equation of the circle. Now, write the tangent in slope form with slope determined by the two points: origin and centre $(2,3) $.
Comment: I got that, but how do I find the points?


Do working statisticians care about the difference between frequentist and Bayesian inference?

Question: As an outsider, it appears that there are two competing views on how one should perform statistical inference.
Are the two different methods both considered valid by working statisticians?
Is choosing one considered more of a philosophical question? Or is the current situation considered problematic and attempts are being made to somehow unify the different approaches?
Comment: I think there are many pragmatically-oriented applied statisticians who believe that either could be legitimately used, if used correctly, & will go w/ whichever is more practical in the case at hand. In this vein, I asked a question ([List of situations where a Bayesian approach is simpler, more practical, or convenient](http://stats.stackexchange.com/questions/41394/list-of-situations-where-a-bayesian-approach-is-simpler-more-practical-or-more)) attempting to elicit when the Bayesian approach might be simpler (since typically the Frequentist approach is, cf Shelby's #3).
Answer: I don't think it matters very much, as long as the interpretation of the results is performed within the same framework as the analysis.  The main problem with frequentist statistics is that there is a natural tendency to treat the p-value of a frequentist significance test as if it was a Bayesian a-posteriori probability that the null hypothesis is true (and hence 1-p is the probability that the alternative hypothesis is true), or treating a frequentist confidence interval as a Bayesian credible interval (and hence assuming there is a 95% probability that the true value lies within a 95% confidence interval for the particular sample of data we have).  These sorts of interpretation are natural as it would be the direct answer to the question we would naturally want to ask.  It is a trade-off between whether the subjective element of the Bayesian approach (which is itself debatable, see e.g. Jaynes book) is sufficiently abhorrent that it is worth making do with an indirect answer to the key question (and vice versa).
As long as the form of the answer is acceptable, and we can agree on the assumptions made, then there is no reason to prefer one over the other - it is a matter of horses for courses.
I'm still a Bayesian though ;o)
Comment: To give an example: Often one wants to know the P(model | data) ). Frequentist analysis gives you P(data | model) however (which then people often read as P (model |data). By assuming a prior probability P(model) you can get P(model | data) in Bayesian statsitics. But then you can debate what P(model) should be.
Answer: Adding to what Shane says, I think the continuum comprises:

Firm philosophical standing in the Bayes camp
Both considered valid, with one approach more or less preferable for a given problem
I'd use a Bayesian approach (at all or more often) but I don't have the time.
Firm philosophical standing in the frequentist camp
I do it like I learned in class. What's Bayes?

And yes, I know working statisticians and analysts at all of these points. Most of the time I'm living at #3, striving to spend more time at #2.
Comment: ... and if there are equal amounts of statisticians or practitiiners to be found at those stances then obviously the system is rigged towards frequentism, isnt't it? And if Bayesian methods are becoming more wide spread, wouldn't that implicitly tell us something of relevance? - Just some plausible reasoning... ;-)
Answer: I think Bayesian statistics come into play in two different contexts.
On the one hand, some researchers/statisticians are definitely convinced of the "Bayesian spirit" and, acknowledging the limit of the classical frequentist hypothesis framework, have decided to concentrate on Bayesian thinking. Studies in experimental psychology highlighting small effect sizes or borderline statistical significance are now increasingly relying on the Bayesian framework. In this respect, I like to cite some of the extensive work of Bruno Lecoutre (1-4) who contributed to developing the use of fiducial risk and Bayesian (M)ANOVA. I think the fact we can readily interpret a confidence interval in terms of probabilities applied on the parameter of interest (i.e. depending on the prior distribution) is a radical turn in statistical thinking. I can also imagine that everybody is actually aware of the ever growing work of Andrew Gelman in this domain, as pointed by @Skrikant, or of the incentive given by the International Society for Bayesian Analysis to use bayesian models. Frank Harrell also provides interesting outlines of Bayesian Methods for Clinicians, as applied to RCTs.
On the other hand, the Bayesian approach has proved successful in diagnostic medicine (5), and is often used as an ultimate alternative where traditional statistics would fail, if applicable at all. I am thinking of a psychometrical paper (6) where authors were interested in assessing the agreement between radiologists about the severity of hip fractures from a very limited data set (12 doctors x 15 radiography) and use an item response model for polytomous items.
Finally, a recent 45-pages paper published in Statistics in Medicine provides an interesting overview of the "penetrance" of bayesian modeling in biostatistics:

Ashby, D (2006). Bayesian statistics
  in medicine: a 25 year review.
  Statistics in Medicine, 25(21), 3589-631.

References

Rouanet H., Lecoutre B. (1983). Specific inference in ANOVA: From significance tests to Bayesian procedures. British Journal of Mathematical and Statistical Psychology, 36, 252-268.
Lecoutre B., Lecoutre M.-P., Poitevineau J. (2001). Uses, abuses and misuses of significance tests in the scientific community: Won't the Bayesian choice be unavoidable? International Statistical Review, 69, 399-418.
Lecoutre B. (2006). Isn't everyone a Bayesian?. Indian Bayesian Society News Letter, III, 3-9.
Lecoutre B. (2006). And if you were a Bayesian without knowing it? In A. Mohammad-Djafari (Ed.): 26th Workshop on Bayesian Inference and Maximum Entropy Methods in Science and Engineering. Melville : AIP Conference Proceedings Vol. 872, 15-22.
Broemeling, L.D. (2007). Bayesian Biostatistics and Diagnostic Medicine. Chapman and Hall/CRC.
Baldwin, P., Bernstein, J., and Wainer, H. (2009). Hip psychometrics. Statistics in Medicine, 28(17), 2277-92.
Answer: While this is subjective, I would say:
It is called the Bayesian/frequentist "debate" for a reason.  There is a clear philosophical difference between the two approaches.
But as with most things, it's a spectrum.  Some people are very much in one camp or the other and completely reject the alternative.  Most people probably fall somewhere in the middle.  I myself would use either method depending on the circumstances.
Comment: I would add that the debate is not just philosophical - there are definitely times where it makes a difference which method you choose to adopt - particularly when it comes to quantifying the "error"/"uncertainty" in your estimate/conclusion.
Answer: I would imagine that in applied fields the divide is not paid that much attention as researchers/practitioners tend to be pragmatic in applied works. You choose the tool that works given the context.
However, the debate is alive and well among those who care about the philosophical issues underlying these two approaches. See for example the following blog posts of Andrew Gelman:

Ya don't know Bayes, Jack
Philosophy and the practice of Bayesian statistics
Comment: I would argue that the "pragmatic" side really only care if the method is implementable, regardless of how philosophically brilliant it is.  I believe this is a major reason for many compromises.


Eclipse Doesn't Recognize my Android Device

Question: I have the samsung galaxy tab, when I plug it into to eclipse to run and debug my apps. Eclipse doesn't recognize the device. When I try it with my friend's Droid 2 it still doesn't work. Can someone please help me?
Comment: What environment are you developing under? OS X, Linux or Windows?
Comment: 1)Install usb drivers
2)Enable usb debugging on your device
I did all of the above but didnt work.
then i did the things in the following link http://stackoverflow.com/a/8705561/538408 and adb recognized my device
Comment: If you are developing under Windows you will have to get the drivers for each device and install them locally.
Answer: If you are developing with Windows, you might need to install the USB driver for our device. For Windows 7, here's how you do it:
To install the Android USB driver on Windows 7 for your device:

Connect your Android-powered device to your computer's USB port.
Right-click on Computer from your desktop or Windows Explorer, and select Manage.
Select Devices in the left pane.
Locate and expand Other device in the right pane.
Right-click the device name (such as Nexus S) and select Update Driver Software. This will launch the Hardware Update Wizard.
Select Browse my computer for driver software and click Next.
Click Browse and locate the USB driver folder. (The Google USB Driver is located in \extras\google\usb_driver.)
Click Next to install the driver.

Check this link for more information if you need it.
Comment: I had the same problem, an off brand "AVATAR" 7" tablet that wouldn't recognize. I found some other link: http://www.moborobo.com/ and that thing installs some "generic" driver that made it work.
Comment: I've tried this, but it's not working; the device in question is an extremely cheap tablet (a Time2 7" slate running ICS) not listed in the OEM driver list.  It's about the third Android device I have.  Looking at the link you included it seems it solves the problem if it's your *first* Android device, but not necessarily for subsequent devices.  I think it is the driver, though, because the device is showing a yellow warning triangle in the management console.  Any ideas?
Answer: Have you tried:
Settings -> Applications -> Development - Enable USB Debugging
Answer: In android 4.2.* The "Developer Options" menu item is gone!
Answer: The "Developer Options" menu item on 4.2.* is hidden.

Goto Settings -> About Phone.
Goto "Build Number" at the end of the Scroll list.
Tap on "Build Number" repeatedly (7 times).  On your third tap you should see message indicating that you only have 4 more taps to go to 'become a developer'.
Continue: 4 more taps.
Hooray, you are now a 'Developer', go back to the Setting page.
You should see Developer Option menu item in your setting list now.
Open Developer Options and check USB debugging > Ok

****it's work for me****
Reference : http://www.wugfresh.com/faq/how-do-i-enable-usb-debugging-on-android-4-2-the-developer-options-menu-item-is-gone/
Comment: worked, but for me: settings - about - software information - more - build number
Answer: download the samsung software Kies .it detects samsung deivces
Go to http://developer.android.com/tools/device.html and follow up
this solution worked for me
Comment: This works ... SOMETIMES. Then it stops working, for days at a time. It appears to be a bug in Samsung's customized OS, that they are/were *very* slow to fix. A brand new retail S3 (bought March 2013) has this bug out-of-the-box :(.
Comment: This just worked for me. Kies installed the drivers and Eclipse now lets me choose my device from Running Devices. I can now test my App on my tablet. +1
Answer: In addition to Settings -> Applications -> Development - Enable USB Debugging, click on the following option:
Revoke USB debugging authorization
And then plug the device again.
Answer: Addition to Tor-Morten's answer: Only checking the Developer setting for USB debugging may not be enough. The USB connection setting (Android 4.4: Settings -> Storage -> Option Menu -> USB computer connection) needs to be checked for either "Media device" or "Camera" before it will be shown in Eclipse's Android Device Chooser window.
Comment: That's the key man! It's new in 4.4.X. I was freaking out, thanks!
Answer: Maybe its a matter of how you plugged the device onto your computer. I'm using a mac and pluged the usb into one of the keyboard slots. It doesn't find anything even you've installed Kies with all its new drivers.
After plugging it directly into one of the slots at the computer the device has been recognized imediately.
Even it is a beginner mistake....maybe it helps :)
Comment: The same thing happens with the right-hand slot on iMacs (never works, ever, for Samsung devices) - my guess is this is a bug with the Apple hardware / OS X.
Answer: This is a fairly common problem.  You basically don't have the drivers you need for USB debugging.
There are a few different ways I've had to obtain drivers for phones.  The first way you should attempt is to go into the Android SDK and AVD manager and download the Google USB driver debug package.
This may or may not give you the driver you need.  If it doesn't you will have to do one of two things.  One, add the device details to the driver file you just downloaded.  Generally these will be posted on forums/boards discussing your phone type.  Secondly, you can download a different driver from another source like the phone manufacturer.
Comment: The Samsung drivers are available at http://innovator.samsungmobile.com/galaxyTab.do#01
Comment: Updated link: http://innovator.samsungmobile.com/cms/cnts/knowledge.detail.view.do?platformId=1&cntsId=9480 . Works like a charm for my Samsung Galaxy Tab 10.1 with Monodroid so it should work with Eclipse as well.
Answer: Make sure your account has admin privileges. I installed my Motorola drivers without elevating, and although the install ran smoothly it never associated them to the device. Once I ran as admin, worked like a charm.
Comment: That would be a solution if *nothing* recognised the device.  If only Eclipse fails to detect it, it may not be the solution.
Answer: If you are on Linux you can try on terminal the following steps. Don't forget to have your device plugged in. Use sudo if doest work.

adb kill-server
adb start-server
adb devices (see if device is recognized)
Answer: Ι had the same problem:
While i had activated the debugging options on my phone (Samsung Galaxy S Duos Black), eclipse couldn't find the device because the usb drivers failed to download or something and so in the Device Manager (win7) i saw only Android and CSC something, all yellow and with no installed drivers.
 I tried to download the Samsung drivers manually, but this failed to work.
What REALLY worked was downloading+installing Samsung Kies, connecting my device through usb and at first it failed again to put the drivers, then i disconnected the device, pressed some troubleshooting errors button that was on the main screen (NOT the lite version, the normal one), that took some time, re-connected the device and voila, the drivers were installed successfully and both the Device Manager and eclipse recognised the device.
Answer: I had the same problem with my LG G3 phone.
I tried to re-install the driver as explained here: http://developer.android.com/tools/extras/oem-usb.html
 Nothing helped. Fortunately on the very same page I have found the link to LG firmware site: http://www.lg.com/us/support/software-firmware
So I did the following:

Connect the phone to the PC using the USB cable
Uninstalled the Google's USB driver (My Computer->Management->Devices->Portable Devices->MyPhone: uninstall)
Download driver for my LG G3 phone (LG885) from the LG site
Install this driver
Got on the phone screen request to approve the new RCA key and allow debugging.
Try to Run an Android project in Eclipse.
PROBLEM SOLVED.
Answer: I Had the same problem.
I saw that the product was correctly defined under Device Manager, but Eclispe did not show the product in the target.
The easy way was to install Samsung Kies and to see that the following command:
...eclipse\adt-bundle-windows-x86_64\sdk\platform-toolsadb\adb device
gives me some output instead of only "List of devices attached".
once it recognizes the product, use "run configuration" choosing target "Active devices" under    "Launch on all compatible devices/AVD's" radio button.
still, you don't get the product on the list as expected but it works.
Good Luck!
Answer: I had the same problem on windows with my samsung galaxy device .. installing samsung kies solved the problem for me.
Answer: I had loads of problem getting this to work when I switched to a new computer.
I downloaded and installed Kies, but Windows 7 still didn't recognize my device.
My problem was the proxy my company use, Kies tries to download USB drivers in the installation, but fails silently and finishes the installation.
You might have this problem if your USB Driver folder in the installation is empty (i.e C:\Program Files (x86)\Samsung\Kies\USB Driver).
Solution for me: install Kies without a proxy.
Answer: Unload EasyTether extension.
This worked for me - look at the part about unloading the EasyTether extension. adb not finding my device / phone (MacOS X) I was able to connect my samsung galaxy note 2 to macbook pro snow leopard.
Answer: Download new USB driver for samsung/pc connection here:
http://developer.samsung.com/android/tools-sdks/Samsung-Andorid-USB-Driver-for-Windows
After enabling developer mode and USB debugging of course.
The phone should ask to accept the pc location as secure after USB driver upgrade.
Installing KIES did not fix the problem on my Galaxy Note 3.


How far could the roman empire expand?

Question: Assuming Rome never fell and the empire was never divided, how far could it have expanded? What would it take for them to have an empire whose size is similar to that of the british or Spanish empires? What advancements in science and technology would have to be made in order for this expansion to happen and how would they fix the communication problems?
Comment: By the 1st century CE the Roman Empire had reached its "natural" boundaries. The the south it was bounded by the Sahara. To the west it was bounded by the Atlantic. To the north it was bounded by the Rhine and the Danube, beyond which there were only fierce (and dirt-poor) barbarian tribes and land unsuitable for the kind of agriculture practiced by the Romans. To the east it was bounded by the Persian empire, easily as large, as rich and as powerful as the Roman empire; the war between the Romans and the Persians lasted for some seven or eight centuries, until both were defeated by the Arabs.
Comment: This...is a trick question. The Roman empire could expand as much as it expanded. It collapsed due to a host of issues to do with them having the size they had. If you remove the factors for the collapse, then pretty much by definition, you don't have the Roman empire - you have some different empire that shares a name and its borders don't correlate with the borders of the actual Roman empire. It's a bit like asking "how big could a balloon have become it it didn't burst?" - the answer is no bigger than what it was a moment before bursting.
Comment: Exactly the same as for British and Spanish empires. Also don't mistake "empire" with "land claimed by some country".
Answer: By the 1st century CE, when emperor Octavian put the kibosh on further expansion, the Roman Empire had reached its "natural" boundaries.

The the south it was bounded by the Sahara.
To the west it was bounded by the Atlantic.
To the north it was bounded by the Rhine and the Danube, beyond which there were only fierce (and dirt-poor) barbarian tribes and land unsuitable for the kind of agriculture practiced by the Romans. Emperor Trajan expanded the empire into Dacia in the 2nd century, but only because he basically had to.
To the east it was bounded by the Persian empire, easily as large, as rich and as powerful as the Roman empire; the war between the Romans and the Persians lasted for some seven or eight centuries, until both were defeated by the Arabs. Note that neither the Romans nor the Persians aimed to conquer the other empire; all the Romans wanted was Mesopotamia, and all the Persian wanted was the Roman Levant.

Furthermore, the question is profoundly misleading; "assuming [...] the empire was never divided" is an astonishing assumption. Assuming the empire was never divided is tantamount to assuming that the Roman leadership was stupid enough to condemn the rich and functional eastern part of the empire to partake in the chaos and dissolution into which the poor and disfunctional western part was sinking. The empire was not divided for fun: it was divided because, when it became clear that the western part was unsalvageable, the empire had to be divided if the eastern part was to survive as a functional state.
So, what is to be done?
You have two centuries, the 1st and the 2nd century of the common era, to effect fundamental changes in the course of history; by the 3rd century it will be too late.

You must formalize the position of the emperor.
Remember that most of the Very Important People whom we call emperors, Octavian, Claudius, Vespasian, Titus, Trajan, Hadrian, Marcus Aurelius, were not officially emperors. In their time, the empire was officially a republic, and those people ruled it by accumulating key positions; they were speakers of the Senate, and great tribunes of the people, and great priests, and commanders in chief of the army.
You must introduce an official mechanism for succession and for the transfer of power.
Since the empire was officially a republic, there was no mechanism for the transfer of power from an emperor to the next, and for the selection of the next emperor. Sometimes things went smoothly, for example during the glorious 2nd century, when five good emperors formed the strangest dynasty in history (they were not biologically related, but rather each of them adopted his successor); most of the times the transition from an emperor to the next was a messy affair.
You must do something to lengthen the life of good emperors (for example, Titus) and avoid stupid or plain unlucky emperors (for example, Domitian and Commodus). (I won't mention disasters such as Elagabalus, because as I said the 3rd century is already way too late.)
You must do something bold and decisive to stop the hemorrhaging of silver to the east.
The Roman empire traded with distant India, and with even more distant China, bringing in goods such as silk and cotton and spices and exporting mostly silver. Now, the Roman empire was not especially rich in silver, and this constant hemorrhage did nothing good to the finances of the empire.
You must do something to fix the massive imbalances in the economy of the empire.
The empire was a very diverse place, and especially the north-western parts of it had severe economic problems. Something must be done to prop up the western part of the empire, and most definitely something must be done to accelerate and facilitate economic activity.
You must arrange a tragic childhood accident for Paul of Tarsus.
The beautiful but intollerant new religion introduced by Paul on the basis of an obscure Jewish sect was a stress and a distraction which the empire could very well do without.

What is the goal?
The goal is to keep the empire functional and avoid the Crisis of the Third Century. If you avoid it, and manage to get into the 4th century with a functional Roman state, then you will be well placed to weather the Migration Period, and possibly find a way to integrate the migratory Germans into the empire, possibly even expanding the empire to the north into Germania.
Then, if you somehow handle the barbarian migration, you will have a functional empire by the 6th century, when the plague will come. If by that time you have successfully introduced measures of public sanitation and quarantine, and you keep the empire puttering along, then you can hope to have it develop the economic, social, political and technological features required to launch the Age of Discovery ahead of time and propel it into a world empire.
Not an easy task, but, you asked.
Answer: I've been five minutes thinking about answering your question or flagging it as primarily opinion-based. There are too many details to fully answer your question, but I can give you two points to think about.

The Roman empire stopped expanded voluntarily. It is not that they couldn't conquer more, is that they didn't want to. Why? Because it was not profitable. The Roman Republic conquered all of Italy against cultures as well developed as themselves, then absorved the Carthaginian empire, then the rest of the Helenistic empire that haven't been took by the Parthian empire. From then on, the rest of the world was a savage jungle without taming, inhabited by hostile tribes. The iberian peninsula was conquered because of the second punic war, the Gaul because of Ceasar's political ambitions, Britain for Claudius' whim. They lost a ton of money and resources turning those uncivilized territories in prosper Roman provinces. Taking a jungle and turning it into orchards and crops, making roads through forests and marshes, building cities... it all costs money, much more money than it can be extracted from the territory, even if the land is paved in gold. It took centuries before those provinces were prosper enough to make a profit. Spain took tonnes of gold and silver from America and ended poorer and less populated than it was in 1492. That's why the British empire didn't try to build up an empire "à la" Roman or Spanish style: instead they expended as little money as possible, building only a road from the gold mine to the harbour. The Roman empire couldn't gain any money from conquest, except against the Parthian empire, which takes us to the second point.
There wasn't enough technology gap between Rome and its enemies. The conquistadors benefitted from steel and horses - and virii, involuntarily; though disease didn't help with the conquest, it quenched any spirit of rebellion the natives could have had - while the British empire had modern fire weapons. Roman armies were undefeatable in open battle and they could take any fortress, but they needed big numbers to do so. They couldn't conquer vast territories with a few men like Spaniards or British did, which reinforces the first point: it was too expensive to conquer, for little gain. Cost-wise, their only option was Parthia, but Parthia was a tough nut to crack, its battle tactics and terrain being very unfavorable to Roman legions.

Now, if you want the Roman empire to grow bigger than it was the only sensible option is going the Alexander III way: eastward. Despite all the hype with the macedonian phalanx, it was heavy cavalry which granted Alexander the Great his victories throughout the world. He and his Companions pierced through the enemy lines, disecting their armies into little pieces, then turned around to smash them against the pikes of the phalanx. The problem is, it is the Parthians who had learnt the lesson, not the Romans. If Rome had to prevail in this fight, they needed to develop a much bigger and more powerful cavalry, including heavily armoured cavalry and cavalry bowmen.
Comment: True concerning the conquistadors, although if Moctezuma's brother Cuitláhuac had been in charge at the start rather than at the end things may have turned differently for a short while at least. Moctezuma was a priest who tried to defeat Cortes primarily with magic and enchantment. Cuitláhuac was warrior.
Comment: I don't understand the point you're trying to make with Spain. It ended up poor because it was spending all of the money it made from its American empire trying to maintain its European empire. It would have been more profitable to abandon the "civilised" provinces in the Netherlands in favour of the "primitive" ones across the Atlantic.
Comment: Also, the British fought enemies who had firearms which they didn't. They first encountered the rocket in (IIRC) Jaipur when it was used against them. They fought the Chinese in the Opium Wars, and we all know that they had gunpowder long before Europe.
Comment: @PeterTaylor The American empire generated gold, which is currency, which isn't wealth -- it can be traded for wealth, at best.  Wealth is food and useful stuff.  Currency is useful, but the Americas generated way more currency than is useful for Spain.
Answer: As you state, communication and transportation are the main limiting factors in keeping an empire vital and united.
Though recent discoveries confirm that the logistic of the Roman empire was quite effective (French oak boards have recently been found in a roman house in Rome), they were probably stretched to their limits when the empire reached its maximum size.
Spanish and British empires could rely on much better navigations techniques capable of crossing the oceans, while the Romans were still stuck with what was basically coastal navigation.
They also had more advanced weapons than the people of the countries they were conquering, while the Romans had only to rely on better tactics and strategies, but were using swords and bows like their counterparts. When you are using cannons and guns against spears and bows you can better use the small numbers you necessarily have.
Answer: Personally i think logistics would be the main problem. If you look at Britain it eventually started crumbling because it was spread out to thin.
It would become hard to to enforce an empire on colonies when you won't hear of them rebelling quite some time after the rebellion already started. Then the issue of moving your troops to the rebelling location fast enough to stomp it out before it spreads. With the downside of moving your enforcers creating new weak spots in your empire.
To fix this Radio would be the first real option if you plan on taking whole of Eurasia and Africa but that was still a long way down the road. Any other option would be splitting it up with the use of puppet governments who are able to handle their local problems themselves.
Answer: Consent
The Roman Empire (and British and Spanish Empires) took territory and ruled by conquest. If you're going to follow this path then you need to keep troops all over the place to suppress rebellion and maintain the peace. These troops need to be supplied, they need to be refreshed, they also need to be from somewhere else in the empire* so there's less risk of them changing sides in a rebellion.
All of this requires logistics.
However if you can get people to consent to being part of the empire, actively opt in to your way of doing things and the wealth or privileges it brings you can have a much larger empire, with local troops, and your logistics and communication needs are much reduced.
You'd also need improvements in navigation, the reason the British and Spanish empires could spread so far is that they had access to the Americas, Southern Africa, Australia etc. Places the Romans either couldn't get to or would struggle to get to consistently.

*standard Roman procedure
Comment: The Roman Empire took *some* territory by conquest. It took some other territory peacefully; for example, the Romans never "conquered" Massalia and southern Gaul (modern Provence), or Cyprus, or most of Asia Minor. Another large part of the territory was taken by "indirect" conquest, when the Roman defeated some power and then they (mostly) peacefully inherited all the possession of that former power; for example, Roman rule in Africa came with the defeat of Carthage, when everybody who used to be subject of that power simply transferred their allegiance to Rome.
Answer: I'm no historian, but I'll give it a try.
Firstly
One of more obvious reasons why Rome fell, its overflow of uncivilized tribals, germans especially. It's hard to keep your mostly civilized state when most of your citizens are just barbaric brutes. Fortunate Rome had its ways to deal with problems like that, look at the Gauls, they've started as conquered barbarians, but thought course of ages they've had become more civilized and and hellenized. It's probable that same would happen to germans, and it happened really, but not in big enough scale, there was simply way to much of them in to short period of time.
If you want to change that, just erase Attila, and then german tribes have no really big reason why attack the Empire all at once. Give it some time, and some ambitious general would conquer their land and later start integrating them.
Secondly
Now when we have all those germans under our yoke, we have shit tons of very war liking individuals. What we do with guys like that? We send them to some war, best to conquer someone. What would be next target? Probably finishing Albion (aka British Isles), later we don't have much to conquer in Europe, only things left are central Europe, with sparsely concreted slavs tribes, and skandinavia with snow, so nothing to search there. Same thing with Africa everything that was conquerable and wasn't sand was already conquered. So next, and only direction is Persia, with those pesky Sassanians, waging war there would be undeniable hard, but we have spirit of Great Alexander at our side, and those shitloads of angry german guys. After beating Persia, there would left no external dangers for Romans, save for some horsemen, but i propose to deal with them in byzantine way, pay some of them to fight rest.
Thirdly
Nice, we've got everything that was to be got, what now? Now we need to keep everything in check, the worst part. Fortunately Rome had some tries to that, splinting their empire and giving rule to several emperors. So just add extra sub-empire in persian land with somewhat Persian ruler, maybe some royal marriage or something? But most important thing we would have to do is to continue enforcing hellenization everywhere, like universalism later, and hope those weird fish guys from Judea stop spreading their dangerous ideas. Who in heavens would wont to have pacifist religion when you have such military?!
P.S. Sorry for not so good English

How far could the roman empire expand?


Styrofaom insulation for floor joists

Question: I have an old wood home raised several feet off the ground on brick pillars. At this point you can see the ground through some of the floors. I'm wondering if it would be effective to insulate the floor by putting foam panels across the joists to create an insulated air space (not looking for great insulation, just an improvement). Would there be a moisture concern? It is a waterfront home (on a bay, mildly salty). Am also considering skirting to enclose the area.
Comment: Where are you on this planet?
Comment: Northwest Florida.
Answer: That's one approach, but you might do better from a thermal standpoint to use fiberglass batts and housewrap. You could then lay 3/8" plywood over it all and not have to skirt it.
If you use foam, I'd tape the seams to create a better air/moisture barrier.

Styrofaom insulation for floor joists


Using the F1 in Jetech Keyboard

Question: I've bought Jetech keyboard in Amazon for my Macbook Pro (mid 2015)
https://www.amazon.fr/gp/product/B0173QD5L4/ref=oh_aui_detailpage_o05_s00?ie=UTF8&psc=1
It works well, but I can't figure out how to use Escape or F1,F2,ect.. Anyone used this can have some suggest? thanks indeed
Answer: It seems like the top row of keys on your mac are configured to behave as function keys only in combination with fn key (bottom left). Follow the steps below to change the setting

Choose System Preferences from the Apple menu.
From the View menu, choose Keyboard.
Click the Keyboard tab.
Enable "Use all F1, F2, etc. keys as standard function keys".
Close System Preferences.

Now the blue color functions in top row will act in combination with fn key and esc, f1, f2 etc will behave as standard function keys.

Using the F1 in Jetech Keyboard


Server Fault cookie/login issue?

Question: I'm a member of not only Stack Overflow but several other communities here.  While on Stack Overflow, I see that I'm a member of Server Fault and have 111 rep there; upon clicking to go there, though, I'm not recognized and advised to log in.  Haven't yet done much debugging on this.  Is this a known issue?
Comment: Pretty sure you still have to log into every site separately. There was talk about unifying this years ago, but I haven't seen any evidence it has happened yet.
Comment: Well, what I said wasn't entirely accurate. [They did introduce a unified log-in for the *.stackexchange.com sites a while back](http://meta.stackexchange.com/questions/260153/global-auth-is-dead-long-live-universal-login), but it doesn't apply to stackoverflow.com, superuser.com, and serverfault.com, presumably because they are hosted on different domains.
Comment: Cookie "acct" doesn't seem to exist there, as it does on SO, Music: Theory/Practice, etc.
Comment: I never log in at SO or any subdomain of stackexchange.com.  I may not have visited ServerFault recently enough (and it is a different domain), so my results may not be unexpected.  Does seem weird though.
Comment: Thanks for the link.  I see this is anticipated and "normal" behavior, however much it violates POLA.  ;-) I'll close the thread.
Comment: Cody, would it be of any benefit to leave this question, perhaps with you adding an answer?
Answer: If you logged in in the past year and a half or so, you should've been set up with a session on Server Fault as well... unless you did so when we had a bug that mistakenly expired unused sessions on SLDs you don't normally visit or you use a browser with third-party cookies disabled/unsupported. Or cookies get cleared. Or, or, or...
It's safe for you to log in on Server Fault and your session there should get linked up to your Stack Overflow one, so if you log out later, both will be invalidated.
Comment: Thanks, Adam.  I'm not sure how long it's been since I was on ServerFault (and cared whether I was logged in) before yesterday.

Everything looks OK now.
Comment: @Kevin_Kinsey Excellent, glad to hear it.
Comment: If thirdparty cookies are disabled in browser, we cannot login into serverfault (even with correct username and password), only option has been have to reset password every time on serverfault. Either make a separate db or merge them, don't use thirdparty cookies.
Comment: @mosh If you're logging in *on* Server Fault (that is, through serverfault.com/users/login), third party cookies aren't an issue. It's first-party at that point. If you can't log in, something else must be going on.
Comment: @AdamLear You are right, chrome had different passwords saved for stackoverflow and serverfault, and updating one would invalidate the other. The thirdpaarty cookies might be a red herring, but chrome shows a red checkmark saying cookies to stackoverflow blocked (when logging in to server fault). thanks.
Comment: @mosh What happens is that when you log in on SF, we go through the same flow as we do on other domains we own - we fire off requests to stack overflow, stack exchange, etc in an attempt to log you in there too via third-party cookies. It fails if you have them disabled, of course, but it doesn't affect your ability to log in on the domain you're actually on. :)
Comment: @adam, it works, now I have to use the same password (you should mention this on login failure). Third party cookies are very dangerous from privacy point of view and should never be allowed legally.

Server Fault cookie/login issue?


What is the record for the longest 5-set winning streak by a player across tournaments?

Question: What is the record for the longest 5-set winning streak by a player across tournaments? Nishikori is on an 8-match five-set win streak. Where does he stand in the all-time list for most consecutive 5-set wins across tournaments?
Answer: According to tennisabstract data, Björn Borg holds the male record in winning 5 set matches in a row. He won 13 over the course of 1976 to 1980.
Patrick Rafter won 12 in a row between 1995 and 2000 if we ignore losses by RET. If we do not ignore these, he won 11 in a row.
Lleyton Hewitt won 10 in a row between 2003 and 2006.
The following players won 9 at some point in their careers: Tomas Berdych, Nicolas Lapentti, Boris Becker, Dan Goldie.


Solve $10x+2x^2+x^3=20$ using only algebra and geometry?

Question: The cubic formula and modern math is not allowed, only algebra, geometry, and the like. Supposedly this problem was given to Fibonacci. Here is the whole paragraph I read:

In Flos Fibonacci gives an accurate approximation to a root of $10x + 2x^2 + x^3 = 20$, one of the problems that he was challenged to solve by Johannes of Palermo. This problem was not made up by Johannes of Palermo, rather he took it from Omar Khayyam's algebra book where it is solved by means of the intersection of a circle and a hyperbola. Fibonacci proves that the root of the equation is neither an integer nor a fraction, nor the square root of a fraction. He then continues:-
And because it was not possible to solve this equation in any other of the above ways, I worked to reduce the solution to an approximation.
  Without explaining his methods, Fibonacci then gives the approximate solution in sexagesimal notation as $18.104.22.168.33.4.40$ (this is written to base $60$, so it is $1 + 22/60 + 7/60^2 + 42/60^3 + \dots$). This converts to the decimal $1.3688081075$ which is correct to nine decimal places, a remarkable achievement.
Source: : Leonardo Pisano Fibonacci (short biography), School of Mathematics and Statistics, University of St Andrews, Scotland

This is just out of curiosity, I have no idea how this problem could be solved in terms of a circle and a hyperbola.
Comment: Try this automated GeoGebra [*applet*](http://www.geogebratube.org/student/m3809). It helps to show how he approached it, very clever! Regards
Comment: @Amzoti Thanks!
Answer: Well, it's actually pretty complicated... Because it's not just one circle and one hyperbola...
If you are really motivated, I think you may find this reading interesting : http://www.math.cornell.edu/~dwh/papers/geomsolu/geomsolu.html
Good luck ! I had once to learn how this work and it's pretty logical and impressive at the end, but not always as easy to understand as it seems at first sight. ^^'
PS : note that they don't discuss this equation in particular.
Comment: Thanks! I will upvote your answer when my voting limit is reset