genetic algorithm library

Question: Does someone know a genetic algorithm library? Programming language is not so important. Could be C#, Python, Java, ... I would need it to find optimal decision tree solutions.
Comment: this: http://www.google.at/search?q=genetic+algorithm+library&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:de:official&client=firefox-a
Comment: I will take a look on: http://www.cpan.org/ too
Answer: Pyevlove
From the website:

Pyevolve was developed to be a complete genetic algorithm framework written in pure python.
Answer: You will find loads in C++ and Java. JGap is good.
Entirely depends on what is your requirement in GA implementation what level and type of mutation, crossover, selection, representation strategies need to be available, etc. just google for genetic algorithms alone you will find alot in your search. You might also need to be careful of the licenses some of them are only available for research purposes only and will not scale well in production environment. Your best bet is to implement your own - some of these libraries work like CMS specfic to specific contexts and requirements they are unable to cater to everyones needs.
GA is a global optimization strategy so they can be slow to work with - I wouldn't advise you to implement such algorithms in python unless you are using externally compiled libraries - a better language would be Java or C++.
Answer: I use Pygene which is really good.
Answer: GeneticSharp is a good option for C#.
The library supports several kinds of populations, generation strategies, selections, crossovers, mutations, reinsertions and terminations. There are a lot of these classic methods already implemented, like: roulette wheel selection, tournament selection, OX1 crossover, PMX crossover, RSM mutation, uniform mutation, elitist reinsertion, pure reinsertion, time evolving termination, fitness stagnation termination, etc.
You can extend the library for your need just implementing new classes of the available  interfaces of classic GAs method.
The library also supports .NET and Mono.
Answer: DEAP is a python package that allows for all kinds of evolutionary algorithm including the genetic algorithm. It is built as more of a framework which allows you to easily plug in your own selection, crossover and mutation functions.
https://github.com/deap/deap

genetic algorithm library


Should I be patient with this postdoc application?

Question: I applied to a postdoctoral position some time ago. In early September, I had a skype interview with the Prof., and I was told I had made it to the short list and that I may be invited to give a seminar as part of my application. Time passed and I didn't hear from the Prof. So, in early October, I emailed again just to check if I was still under consideration. I was told that yes, but there were some issues with scheduling. Now, its halfway through November and I have not heard back. I understand all Profs are busier than I can imagine, and, maybe, I should just be patient. I am really excited by the prospect of the job, and this is my first round applying to a postdoc position. So, I am wondering if this is the norm, if this happens sometimes. or if this never happens [and I should forget about the job :(].
Thanks
Comment: Are you facing any other deadlines? (If so, tell them.)
Comment: Some people are slow. Issues do arise. While it may not be best to give up, you should certainly follow up on any other options you have. After a month, you it is pretty reasonable to ask again, of course. Patience is good, but action on other fronts is better.
Comment: Getting hired as a postdoc can take much longer.  Sometimes it takes a year.  In the mean time, find some other jobs to apply for.
Comment: Thanks @Thomas. My one deadline is my graduation (in 2 months).
Comment: @Buffy, I have other leads, but this one is my preferred option. I will be jobless in 2 months, and I would like to have a job by then. Thanks
Comment: Thanks, @AnonymousPhysicist. I wouldn't mind if it takes a long time; I guess the lack of communication is what concerns me.
Answer:
So, I am wondering if this is the norm, if this happens sometimes. or
  if this never happens [and I should forget about the job

Yes, this happens. I have been in the exact same situation myself: application, shortlisted, interview, informal acceptation by the PI, but then the formal confirmation was postponed several times over a couple of months. This doesn't depend only on the PI, sometimes the administrative process gets stuck somewhere. I wouldn't say that it's the norm but it's not uncommon.
As long as the PI answers your emails and confirms that it's in progress, It's likely that you are going to get the job. It would be unwise to take it for granted though. Keep applying for other positions, and don't close other doors as long as it's not confirmed. From time to time, email the PI; in particular you should ask when the contract is supposed to start, and try to politely tell the PI that you cannot wait forever; if you have other job offers waiting for an answer, you can mention it, it might speed things up.
Comment: Thanks for sharing @Erwan. It makes me feel less anxious to hear someone with a similar experience, get a positive outcome.


RefineryCMS: overriding Devise Omniauth Callbacks

Question: I am working on an application that I am wanting to authenticate through a custom oauth provider I have setup on a different server.
I am trying to integrate this custom login using RefineryCMS. I have my routes setup, but for some reason it is still trying to follow the devise route built into RefineryCMS.
Routes.rb
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" }
devise_scope :users do
 match '/users/auth/:provider', :to => 'users/omniauth_callbacks#passthru'
end

Link for callback

<%= link_to "Sign in with Olympus", user_omniauth_callback_path(:olympus) %>

Olympus is the codename for the project for now.
Omniauth callback controller:
class Users::OmniauthCallbacksController < Devise::OmniauthCallbacksController
  def olympus
    auth = env["omniauth.auth"]
    ap auth
  end

  def passthru
    render :file => "#{Rails.root}/public/404.html", :status => 404, :layout => false
  end
end

The log via rails s once the link is clicked on:
Started GET "/users/auth/olympus/callback" for 127.0.0.1 at 2011-08-12 07:52:09 -0500
  Processing by Devise::OmniauthCallbacksController#failure as
  SQL (0.7ms)  SHOW TABLES
  SQL (0.6ms)  SHOW TABLES
  Page Load (0.3ms)  SELECT `pages`.`id`, `pages`.`depth`, `pages`.`parent_id`, `pages`.`lft`, `pages`.`rgt`, `pages`.`link_url`, `pages`.`menu_match`, page_translations.title as page_title FROM `pages` INNER JOIN `page_translations` ON `page_translations`.`page_id` = `pages`.`id` WHERE `pages`.`draft` = 0 AND `pages`.`show_in_menu` = 1 AND `page_translations`.`locale` = 'en' ORDER BY lft ASC
  Slug Load (0.1ms)  SELECT `slugs`.* FROM `slugs` WHERE (`slugs`.`sluggable_id` IN (1,3) and `slugs`.`sluggable_type` = 'Page' AND (`slugs`.`locale` = 'en')) ORDER BY id DESC
  Slug Load (0.2ms)  SELECT `slugs`.* FROM `slugs` WHERE (`slugs`.sluggable_id = 3 AND `slugs`.sluggable_type = 'Page') ORDER BY id DESC
  SQL (1.3ms)  describe `roles_users`
  Role Load (0.1ms)  SELECT `roles`.* FROM `roles` WHERE `roles`.`title` = 'Refinery' LIMIT 1
  SQL (1.4ms)  describe `roles_users`
  User Load (0.2ms)  SELECT * FROM `users` INNER JOIN `roles_users` ON `users`.id = `roles_users`.user_id WHERE (`roles_users`.role_id = 1 )
Redirected to http://localhost:3000/users/login

So its still trying to go through the Devise::OmniauthCallbacksController through RefineryCMS... Does anyone know how to get around this or maybe even override this devise controller?
I also would like to say that I am completely new to working with oauth providers/clients. I have worked with Facebook and Twitter but doing them from scratch is something I am new at. As well as working with Devise/Omniauth. So excuse my ignorance. Thanks!
Answer: Fixed routing issue by reading this article: http://groups.google.com/group/refinery-cms/browse_thread/thread/37917e227b26f5ca
The issue I am having now, is that it appears to not be connecting to my oauth provider to do the authenticating :(


Word to describe someone who is inspired

Question: Is there a single word to describe someone who is inspired by lots of things?
Or/and in awe of the world around them...
Thanks
Answer: poetic maybe?

Poetic is a word that describes your self expression. Being poetic is
  turning little things that no one would see right away and turning it
  into a wonderful meaning. To be poetic you must have a feeling of
  knowledge of things around you, taking things of your dreams and
  making it your papers reality. Urban Dictionary
Answer: Good question. English seems more attuned to recognizing multifaceted intellectual curiosity than multifaceted spiritual inspiration.
Darwin was said to have had an enlarged curiosity. But that's two words, and not an adjective. Polymath describes such a person, but I think there's no adjective polymathic.
Intellectually omnivorous is common but "spiritually omnivorous" sure isn't.
Native Americans, Pantheists, Deists and William Blake take inspiration from pretty much everything around them. Perhaps there.
You've got me scratching my head, thinking this is a word that needs to be invented. . .
Answer: The word poet might work in certain contexts:

Poet: One who is especially gifted in the perception and expression of the beautiful or lyrical.

(American Heritage Dictionary)


Are pedestrian walkways purely cosmetic, or do they help encourage walking instead of driving?

Question: Does creating a network of pedestrian walkways increase the number of citizens who choose to walk or take public transportation instead of drive?
Comment: I think I've seen pedestrians use walkways before.  Whether or not it encourages walking or public transportation, I don't know.
Answer: Pedestrians will use walkways instead of other methods. Presumable this depends on if the route is more convenient in some way and other factors, but built correctly they do help. For example, I've successfully connected the back of a dead-end residential area to the back of an adjacent industrial area and plenty of pedestrians would walk between the two zones. I also find connecting parallel roads via walkways wherever there's a bus stop on one seems to see decent usage.
I don't have the game available on this computer to show a screenshot, but if you look at this set of images (found via Reddit), which show a "Car free city", you can see that at the extreme a well designed walkway layout can drastically cut car usage.
Here's a great example image from that collection:


how to check if subform is opened in ms access

Question: I have a main form MYMAIN with two subforms in it MYSUBONE and MYSUBTWO.
I have "on current" events in each subform that update textbox in the other subform.
My problem arises when the forms are being loaded.  The "on current" event is triggered when the subform "MYSUBONE" is loaded (BEFORE "MYSUBTWO" is loaded) and it tries to update a textbox in MYSUBTWO which is still not yet loaded.  So error is triggered in the event procedure.
How do I check in my "on current" event procedure (in VBA?) for MYSUBONE to check if the MYSUBTWO subform is not yet loaded.
on-current-mysubone
if mysubtwo is not loaded then
update mysubtwo.textbox = ...
end if
I tried the "Isloaded" function in the sample database "Northwind" but doesn't seem to work.
how do i check if subform is not yet loaded?
Or could I just ignore error and use something like "if error, exit function"?
Comment: IsLoaded() doesn't work with subforms, as they are not part of the Forms collections -- only the main forms are in that collection.
Answer: One possible way to solve this problem would be to just ensure you know what order the subforms are loaded in. You can accomplish this by unbinding the subform controls and then manually loading them. Here is how to do it:

Add your subform controls to the parent form as normal.
Make sure you have your link fields, etc. set up how you want them.
In the subform properties>data tab, delete the value in the "Source Object" Field.

Add VBA to manually bind the controls when the parent form opens:
Private Sub Form_Open(Cancel As Integer)
    Me.sfB.SourceObject = "FormB"
    Me.sfA.SourceObject = "FormA"
End Sub

Answer: Subforms are actually opened before the main form is opened (including all their OnCurrent events). I don't think you can guarantee which order they are loaded in either.
I'd turn the problem around and do the update from the main form. If you really have to do the update from the Subform, move the update to a separate function in MySubOne. Then in the main form's OnCurrent, call the function in MySubOne. This will guarantee that both MySubOne and MySubTwo are already loaded.
Comment: This prevents the subforms from updating the opposite subform if their data change instead of the main form.
Comment: That's easily solved by putting in a call to the same function on the AfterUpdate event for the subform .
Comment: Also keep in mind that the OnCurrent event of a subform gets called twice when the parent form arrives on a new record. Sometimes you have to put in code to keep things in a subform's OnCurrent from firing twice. The usual method for this is to have a module-level variable in the subform's code to store the PK value of the last OnCurrent event. In the OnCurrent, check if the value of that variable matches the current PK value. If so, then skip the code (you're already on the second OnCurrent). If not, let the event fire and change the value of the variable. Messy? Yep!
Comment: is there a way to check if the retrieved subforms record count is 0 or null? something like (if forms!mysubtwo.[Record count] = 0? or forms!mysubtwo.[current record??] is null or = ""? if so, what is the correct syntax?
Comment: rtochip, off hand I don't know, but why don't you post that as its own question.
Answer: Don't know if it is yet useful, but for what's worth...
I'm displaying two grids with parent-child relationship. However, second grid displays at once all child records associated to all parent records in first grid. When one record is selected in first grid, I want to locate first corresponding child record in the second grid. I faced the same trouble as reference to second grid's (subform's) recordset fails when initially opening main form, as second grid has not yet been displayed. My workaround consisted on catching error 2455 and ignoring it, so it gives chance to continue until second grid is fully displayed.
Private Sub Form_Current()
Dim rsResults As Recordset
Dim stFilter As String

On Error GoTo ErrHdlr

'Locate first results record associated to current requisition
Set rsResults = Me.Parent.sfResults.Form.Recordset
stFilter = obRecord.GetFilter(Me.Recordset, vrPKFields, vrPKTypes)
rsResults.FindFirst (stFilter)

Exit Sub

ErrHdlr:
If Err.Number = 2455 Then
   Exit Sub 'When this sub form is first displayed, Current event
               'tries to reference another subform on the same parent.
               'However, such second subform is not yet open and
               'reference fails. This is the error number raised,
               'so it is ignored on purpose. After second subform
               'is displayed, code works correctly.
               'It had to be handled this way because there's no way
               'to know in advance whether subform is already open.
Else
   msgbox Err.number & " " & err.description
endif
exit sub

Answer: "is there a way to check if the retrieved subforms record count is 0"
if forms!myMainForm!mySubForm.form.RecordsetClone.RecordCount = 0 then....


Windows 10 doesn't show up on grub bootloader

Question: I have installed a linux distribution alongside windows 10. Now when I turn on my pc all what I see is the linux distro on grub bootloader. I thought that grub would make choosing an OS to boot from of the two possible.
Answer: It depends on the distro. For Ubuntu, for example, the setup screen should have looked like this:

If one accidentally picks the second or third option, it can wipe out the Windows partition. Assuming you've not done that, then the easiest approach is to reinstall Linux from Live media, assuming you've not done much to modify Linux after installing. If all goes well, you should have a menu similar to that below.

If the original Linux installation has destroyed Windows, then the only practical option is to restore from a recent image or from Windows installation media. [Recovering a deleted or modified partition is difficult, at best.]
Answer: After some time, I realized that I have booted the linux cd with UEFI while windows boots from BIOS legacy. I used the windows installation media to fix the MBR and then reinstalled kali with BIOS legacy and now both OSs are shown from grub. Though when booting the win installation media, I booted with UEFI to do the "bootrec.exe /fixmbr". Will this result in a problem in the future?


Selecting an exact number of words in Word 2007

Question: How would I go about having Word 2007 select an exact number of words from the cursor position? The count according to Non-Asian words would be particularly helpful.
Answer: You can use VB to do this. Place the following code into the VB browser (Ctl + F11). You can place it in the NewMacros folder and it will be available in all the new documents you create. Or you can place it in the ThisDocument for it to only be available in the document you are working with.
Sub SelectWords()
Selection.MoveRight Unit:=wdWord, Count:=10, Extend:=wdExtend
End Sub

Adjust the Count:= number to be the number of words you want selected.

To run the macro, open the marco window with Atl + F8 and run SelectWords.
Comment: Thank you for your response. I ran the macro and it did what it was supposed to, but it seems this method will only work for files that have nothing but English in them. When I use files that have both Japanese and English in them, it counts the Japanese characters (in groups), as well as the tags used by the translation program. Sentences are formatted like this: {0>Japanese text<}0{>English text<0}. Obviously this could become overly complicated, so what about limiting the selected text to a certain font?
Comment: The code was written to just count words. Surely the extra characters are confusing how it counts, so I understand why it didn't work. From your question, I did not realize there were Japanese characters within the sentences. Sorry, I am not sure how to get it to only count words with a certain font type.
Comment: Can you post an example? Maybe there is a way to figure it out using the special characters.
Comment: Yeah, sorry about the lack of information in my original question. Here is a simple example: {0>第6章<}100{>Chapter 6<0} What should be a word count of 2 is 14. The tags are formatted as subscripts if that makes a difference. The reason I thought this would be possible (without writing hundreds of lines of code) is that the word count function in Word has a line for Non-Asian characters that always gives the correct count.


Is the G in Elliptic Curve same for Bitcoin and Ethereum?

Question: Is the G of the elliptic curve the same for Bitcoin and Ethereum? If yes, then why can't we send bitcoin and ether to same public address? If no, then what's the reason behind implementing it like that? If they use the same method, then one can send both coins to same public address, right?
Answer:
Is the G in elliptical curve same for bitcoin and ethereum?

Yes Ethereum also uses the secp256k1 curve that is defined using the generator point:
Gx = 0x79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798
Gy = 0x483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8

If yes then why can't we send bitcoin and ethereum to same public address?

For a number of reasons. Firstly, Bitcoin and Ethereum define addresses differently. Bitcoin uses the bech32 format starting bc1 and Ethereum uses a hexadecimal string starting 0x. Secondly, Bitcoin addresses contain a checksum at the end of the address (to flag incorrectly typed addresses) whilst Ethereum addresses don't. Thirdly, Ethereum only encodes the last 20 bytes of the public key into the address. Fourthly it is not just a raw public key that is encoded in a Bitcoin address. Bitcoin uses a scripting language "Script" that it uses to outline the conditions needed for the coins to move which generally includes requiring at least one signature associated with a particular public key. These conditions are baked into the address.
So yes don't try sending Bitcoin and Ethereum to the same address, you will lose your coins.
Comment: The most important reason is that they are simply separate unconnected systems. Even if they used the same addresses, and the same scripting system, separate systems can't interact. They're just different currencies, protected by similar cryptography.
Comment: Ah, that's fair. I had interpreted the question as "why can't I send my BTC to my ETH wallet, or vice verse, if they use the same cryptography?", but your interpretation may make more sense. We'll need to wait for OP.
Comment: The way I understood the question was he wanted to send Bitcoin and Ether to the same address so the Bitcoin system told him his Bitcoin "balance" on that address and the Ethereum system told him is Ether "balance" on that address. That is theoretically possible (assuming addresses were defined exactly the same on both systems) if the Bitcoin system wasn't aware of the Ethereum system and vice versa?
Comment: Another reason why BTC/ETH transactions can't be intermingled: Bitcoin has a UTXO-based system, but Ethereum doesn't use UTXOs at all and just hardcodes the address balance into the blockchain.
Comment: @Zenul_Abidin The difference in accounting models does introduce interoperability challenges but is not specifically related to the Elliptic Curve Generator point relevant to this question.
Answer: According to the other answer they do share the same G, however there is a slight difference between the term address and the term public key. An address generally is derived from a public key. The public key is a pair of coordinates that we get from multiplying with the curve Generator. Because that is the case, technically it may be possible for you to use the same public key on both Bitcoin and Ethereum, but this does not imply you can use the same address. That is because an address takes a public key runs it through somewhat of a one-way function. This one-way function is fundamentally different on Bitcoin and Ethereum, because neither network should have to build software to support all the upgrades for the opposing network.
Since they are completely different networks and scripting systems,
simply sending Bitcoin to an ETH address will not succeed. Furthermore since interoperability between the two systems is also not a fundamental focus, there is little effort to create a wallet that would represent a valid address for both chains derived from the same public key, even though it might technically be possible.


Is there a way to clip a jpg layer in QGIS?

Question: I have a jpg image as a layer in QGIS but want to clip it to get rid of the white background is this possible? As it is not a raster file, when I convert it to a raster it losses its image quality!
Comment: Not possible. JPEG does not support transparency e.g https://graphicdesign.stackexchange.com/a/130824 Use another image format for this intent
Comment: I do not understand what you mean by ` As it is not a raster file, when I convert it to a raster it losses its image quality!`. What is not a raster file? JPEG image definitely is raster so I guess that you mean something else.
Answer: If you only want to get rid of the white background, you could add a NoData Value to your JPEG image (Layer properties - transparency - No Data Value) or set custom transparency (Layer properties - transparency - Custom Transparency options).
If you want to clip your jpeg, you can usually do it with the regular clip raster tools, if I'm not totally wrong. You just have to make sure that your jpg is georeferenced correctly.
If you want to export your jpeg to a tif without quality loss, I would suggest to use some image processing software (like photoshop or gimp) to export your jpeg to a Tiff, and then to georeference it in QGIS.
Hope this helps!


How do I get someone as a Friend in the Pokémon Global Link?

Question: On the Pokémon Global Link, you can have Game Pals on your profile, made up of Friends and Trade Pals. Trade Pals are pretty straight-forward, but I can't figure out how to add someone as a Friend. It says to add them in your Pal Pad in-game on the system they conect to the internet with, but I did that. My friend still isn't showing up in the roster though. Is there anything else you have to do?
Comment: Based on Nintendo's history of bass ackwards online friend-code systems... Did your friend(s) follow the same steps? Registering you in their pal-pad and connecting to the global link? (Ignore my previous comment, no idea why I was thinking of the dream world)
Comment: @Trent Yeah, we both did the same thing.
Answer: If you add a Friend Code manually (that is, entering the code number by number instead of adding a Friend Code using infrared), just adding the code isn't enough: You have to meet at the Wi-Fi Club. It's not necessary to trade or battle; just being online at the same time will do (it happened to me). Maybe it'll also work if you trade/battle using infrared, or something like that, but I don't really know for sure. You can check if you truly have a friend registered by checking your friend roster: if you can see their icon and name in color (blue or red), your friend is registered; if their name is gray, then it doesn't count as registered, since you haven't really connected in any way.


Block requests from *.appspot.com and force custom domain in Google App Engine

Question: How can I prevent a user from accessing my app at example.appspot.com and force them to access it at example.com? I already have example.com working, but I don't want users to be able to access the appspot domain. I'm using python.
Answer: You can check if os.environ['HTTP_HOST'].endswith('.appspot.com') -- if so, then you're serving from something.appspot.com and can send a redirect, or otherwise alter your behavior as desired.
You could deploy this check-and-redirect-if-needed (or other behavior alteration of your choice) in any of various ways (decorators, WSGI middleware, inheritance from an intermediate base class of yours that subclasses webapp.RequestHandler [[or whatever other base handler class you're currently using]] and method names different than get and post in your application-level handler classes, and others yet) but I think that the key idea here is that os.environ is set by the app engine framework according to CGI standards and so you can rely on those standards (similarly WSGI builds its own environment based on the values it picks up from os.environ).
Comment: @Alex Martelli: How would be on Django? http://stackoverflow.com/questions/35286042/redirect-appspot-com-to-custom-domain-google-app-engine-django
Comment: The `<link rel="canonical"` answer on that Q seems correct.
Answer: The code posted above has two problems - it tries to redirect secure traffic (which isn't supported on custom domains), and also your cron jobs will fail when Google call them on your appspot domain and you serve up a 301.
I posted a slightly modified version to my blog:
http://blog.dantup.com/2009/12/redirecting-requests-from-appid-appspot-com-to-a-custom-domain
I've included the code below for convenience.
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app

def run_app(url_mapping):
    application = webapp.WSGIApplication(url_mapping, debug=True)
    application = redirect_from_appspot(application)
    run_wsgi_app(application)

def redirect_from_appspot(wsgi_app):
    """Handle redirect to my domain if called from appspot (and not SSL)"""
    from_server = "dantup-blog.appspot.com"
    to_server = "blog.dantup.com"

    def redirect_if_needed(env, start_response):

        # If we're calling on the appspot address, and we're not SSL (SSL only works on appspot)
        if env["HTTP_HOST"].endswith(from_server) and env["HTTPS"] == "off":

            # Parse the URL
            import webob, urlparse
            request = webob.Request(env)
            scheme, netloc, path, query, fragment = urlparse.urlsplit(request.url)
            url = urlparse.urlunsplit([scheme, to_server, path, query, fragment])

            # Exclude /admin calls, since they're used by Cron, TaskQueues and will fail if they return a redirect
            if not path.startswith('/admin'):
                # Send redirect
                start_response("301 Moved Permanently", [("Location", url)])
                return ["301 Moved Peramanently", "Click Here %s" % url]

        # Else, we return normally
        return wsgi_app(env, start_response)

    return redirect_if_needed

Comment: Thanks, deployed your code (+1). I wonder why Google doesn't offer built-in solution for this, since they usually encourages good practices such as url canonicalization.
Comment: I wondered the same thing. It's actually quite annoying having to put this code into all my apps (and change the domains) :-(
Answer: def redirect_from_appspot(wsgi_app):
def redirect_if_needed(env, start_response):
    if env["HTTP_HOST"].startswith('my_app_name.appspot.com'):
        import webob, urlparse
        request = webob.Request(env)
        scheme, netloc, path, query, fragment = urlparse.urlsplit(request.url)
        url = urlparse.urlunsplit([scheme, 'www.my_domain.com', path, query, fragment])
        start_response('301 Moved Permanently', [('Location', url)])
        return ["301 Moved Peramanently",
              "Click Here" % url]
    else:
        return wsgi_app(env, start_response)
return redirect_if_needed

Comment: This code doesn't handle SSL or cron jobs. I've posted a slightly modified version in a new answer.
Comment: How would you integrate this with an application?
Comment: Got this working, but I don't think it's possible to make it work with static content, so that will still be accessible via appspot (and all the various version'd subdomains) :-(
Answer: You can redirect it to your custom domain (here example.com) by overriding the initialize method in your webapp2.RequestHandler base class the following way :
def initialize(self, *a, **kw):
    webapp2.RequestHandler.initialize(self, *a, **kw)

    if self.request.host.endswith('appspot.com'):
        self.request.host = 'example.com'
        self.redirect(self.request.url, permanent=True)

Answer: In case you are using webapp2, a slightly easier (depending on your use case) solution is possible using its DomainRoute.
If this is your URL map:
url_map = [
    ('/', HomeHandler),
    ('/about', AboutHandler),
    ('/admin/(.+)', AdminHandler),
    MailForwardHandler.mapping(),
]
application = webapp2.WSGIApplication(url_map, debug=True)

and the admin and mail should not redirect, then add the redirect routes as follows:
from webapp2_extras import routes

url_map = [
    routes.DomainRoute('appid.appspot.com', [
        routes.RedirectRoute('/', redirect_to='http://app.com', schemes=['http']),
        routes.RedirectRoute('/about', redirect_to='http://app.com/about', schemes=['http']),
    ],
    ('/', HomeHandler),
    ('/about', AboutHandler),
    ('/admin/(.+)', AdminHandler),
    MailForwardHandler.mapping(),
]
application = webapp2.WSGIApplication(url_map, debug=True)

This will, as specified, only redirect http, not https. It uses a permanent redirect (301), as desired.
You can also pass a function to redirect_to, as described in the documentation, which should make it easier when you have lots of rules.


Is it possible to give others access to Google Contacts without Google Apps?

Question: Is it possible for me to allow other Google users to view my contacts in Google Contacts, or perhaps only certain groups of contacts? Or is this a feature I'd need Google Apps for?
Answer: With the delegate option that's possible:

To delegate your contacts:

Go to Google Contacts.
Click the More pulldown menu immediately above your contacts list and select Manage Delegation Settings.
In the Add people text box, enter the email addresses of the users you wish to share your contacts.
Click Share & save to finish granting the specified users access to your contacts.

Reference.
Comment: You are correct. Then the answer to your question is: **No** and **Yes**
Comment: There's no such option in Google Contacts for me, and the link you reference is to the Google Apps version of Contacts. Is there any way to do this with the free, public version of Google Contacts?
Answer: As Jacob mentioned, to my knowledge, the only way to currently do this is via Google Apps accounts & Delegation. I don't think a way exists to do it with a standard account.
Your best bet might be to look for a CRM that syncs with Google Contacts - it might be a little overkill for your needs (depending on the context), but it might work. However, in my research it seems like a good number of the CRMs are based on Google Apps accounts only, so that could be a roadblock. But worth looking into further.
We're currently trying to solve this problem at FullContact (yes, I work for them, so take my recommendation with a grain of salt - I'm biased). Our cloud address book pulls in Google Contacts and lets you organize and create shared lists of contacts, then syncs directly back to Google Contacts. We'll begin releasing beta invites in the near future - but unfortunately, it doesn't solve your problem now.
At the moment, since I'm not aware of any add-on app that offers this functionality, the easiest path to your result would probably be to just upgrade to a Google Apps account and call it good.
Comment: The website you provided isn't working :(
Comment: Uh-oh - thanks! I'll update link.
Answer: I build Shared Contacts Manager exactly for this purpose. Please have a look. You can easily share Google contacts with your team with one click.


Sampling one shapefile with polygons of another using R?

Question: I have two shapefiles that partially overlap. One (the bigger one) consists of several polygons which represent fields I am interested in. The second, is a rectangular shape that overlaps about 30% of my first shapefile and hold information about soil texture. I want to clip my first shapefile to the extends of the second and then find out the soil texture for each of the polygons of the first shape.
I tried the merge function and the intersect function in Qgis so far. The merge seemed to be a shapefile consisting only of information of the soil texture but I could not find my fields in it. The intersection gave me an empty shapefile.
Can someone point me in the right direction by providing some procedure names (preferably in R) two achieve what I need. I think I am searching with the wrong keywords here but as a newbie that is what happens;)
Answer: I think you are looking for the Intersection tool available in QGIS.
In the following picture each feature of the blue polygon has a soil attribute and while the red polygon is the polygon of your clip.

Using the Intersection tool in QGIS (Vector -> Geoprocessing -> Intersection) or in Processing (open the Processing toolbox and type Intersection) the green layer is the resulting one:

Notice that the attribute table of the green layer is made up by each matching field of the intersection layers.

Hope this helps!
Comment: Thank you this works perfectly. Is there a way to clip one shapefile first so that only the ones that are fully within the second one are used for intersecting?
Comment: You can try to explore the Processing toolbox and create a model..


ISS error CS0433: name collision

Question: In our application we've run into an error numerous times where we get error CS0433, which complains about a name collison in two separate dlls.  This is an ASP.NET app developed in C# using webforms.  It always complained about A TimeLog page.  Anyone have advice for resolving this error?
Answer:  I found a link in the MSDN that describes this error.
To summarize, a naming conflict can happen between the file name of a page (TimeLogTab.aspx) and the class in the code behind (public class TimeLogTab).
The link recommends renaming one of them.  I changed my class to Time_LogTab and the error went away.
Answer: The error can happen intermittently: I'm using "Publish Web Site" for a VS 2005 Web Application Project with "Delete all existing files prior to publish" and then XCOPY-Deploy to the target IIS folder (which won't delete existing files there). Today I ran into that error for the first time (no new .ascx/.aspx files since weeks), but simply recompiling and redeploying the same project solved the problem.
The only difference: For the 2nd time, I hit the page causing the problem first. Now I'm wondering whether the exact click order really matters or rather whether an arbitrary unlucky click order effectively can crash an ASP.NET site?

ISS error CS0433: name collision


Confusion with formally unramified = immersion and formally smooth = submersion

Question: From this MO question I learned to tentatively think of formally unramified arrows as immersions and of formally smooth arrows as submersions.
I'm trying to semi-formally handwave myself into conviction about this but I'm getting the opposite identifications.
The setting is a commutative square as below posing a unique lifting problem. $$\require{AMScd} \begin{CD} P @>>> U\\ @VVV @VV{f}V\\ N @>>> X \end{CD}$$
Suppose we start in the category of topological spaces and let $P\rightarrow N$ be the inclusion of a point into an open neighborhood, and let all the other arrows also be inclusions into opens of a space $X$. Then our diagram really lives in the lattice of opens of $X$ containing the point $P$. Since we want to deal with infinitesimal neighborhoods, move to the pro-completion of this lattice and replace $N$ by some formal intersection which isn't really there to get a good notion. Now our square lives in the pro-completion with all arrows still "inclusions of opens".
The existence of a diagonal filler signifies that whenever an open $U$ of $X$ contains a point $P$, it also contains every infinitesimal thickening of it. (This fits perfectly with the intuition that open sets contain neighboring points.) Uniqueness follows from the fact all arrows are "on the nose inclusions", or, alternatively, from the fact we're living in the pro-completion of a lattice.
So open inclusions are tentatively right-orthogonal to the class of such infinitesimal thickenings of points. The same goes for open embeddings. Now since $N$ is infinitesimal, this lifting problem should only care about local proeprties of $f$. So let $f$ be a topological immersion, i.e a map which is locally-on-the-domain an embedding. I think being an immersion gives existence by precomposing with elements of a good open cover, but by the analogy suggested above, immersions correspond to unramified arrows whose property gives at most one filler.
What am I doing wrong here?
It seems my mistake must be in saying that open embeddings gives existence, but I don't see why they should give uniqueness (without necessarily existence) instead.
Answer: I can't precisely isolate the wrong step, but it might help to consider a concrete motivational example, where $X$ is the $xy$-plane, $N$ is a very small interval in the $x$-axis, and $P$ is the origin.  If $f: U \to X$ is the immersion given by inclusion of an interval in the $x$-axis, then you have a unique lift.  If $f: U \to X$ is the immersion given by inclusion of an interval in the $y$-axis, then there is no lift, and passing to an open cover won't help.


How to fix gaps in shelf without a table saw?

Question: I built this shelf for my office, I want to make it look as seamless as possible. I work with kids, only lightweight toys will go on this shelf. I was hoping some type of cover existed I could put over it. It needs one more coat of paint so I was originally thinking of just taping the middle parts together since I'm installing a bracket anyway. I included a picture, it's on every shelf, but easiest to see on the bottom. Does anyone have more official/sage options? Thank you.
Comment: Hello, and welcome to Home Improvement. Unfortunately, any answer to this question will be a matter of opinion. And, thanks for [taking our tour](//diy.stackexchange.com/tour) before posting; few newbies do.
Comment: @DanielGriscom the OP asked "how", not what's best. I think we can provide several "hows" and let the OP decide what he wants to do...
Answer: Option 1:

Disassemble the left portion of the shelf.
Cut all shelves to the same length as the shortest shelf.

It seems that you'll need to make a notch at the back edge of the shelf to wrap around the vertical support for the right side shelves.
It appears that the largest gap may actually be at the bottom - use this gap to shorten the rest of the shelves.
If necessary, cut the left-side back to match this length.

Reassemble, ensuring that the shelves on the left match up with the appropriate shelf-face on the right.

Option 2:

Move all the shelves on the right up or down a hole or two so they don't line up with the shelves on the left, thus hiding the fact that they don't meet up.
Arrange your storage so that this mismatched height becomes "necessary" due to the mismatched height of things stored.

Option 3:

Buy wider shelves for the right side so they butt up against the shelves from the left.

Material may not be available in stock form at your local supplier in the 1/4" - 1/2" wider width you need, you may have to buy something 1" or more wider, then rip the back edge down to get the exact width you need.
Ripping the back leaves the white melamine covering on the front untouched so it still looks nice, and it helps hide any slight wobble in your rip cut of a long board.

Finally:
None of these cutting options require a table saw. (The rip cut suggested in option 3 would be easier on a table saw, but it's not required.) As a matter of fact, a table saw is the exact wrong tool to make a crosscut on a long piece of wood like a shelf.
You would want to use a circular saw, jig saw (prepare for a shoddy looking, uneven cut) or even "just" a hand saw for these cross cuts. You could do the rip cut with a hand saw, too (been done that way for centuries before they invented electricity...) if you wanted to.
Answer: Shelf paper comes in a variety of textures , thicknesses, and patterns. Bring the shelf paper just to the front edge of each shelf. Do not wrap the product around the curved face. Then all you will see is the short vertical gap at each inside corner. For the bigger gap on the bottom shelf, just add a layer or two of wide tape before laying down the shlf paper. For all shelves, make sure each seam is not over the gap, but on the other way around.


Experimental support for construction grammar?

Question: I realize there are many different instantiations of Construction Grammar (CxG), and I'm not necessarily tied to any particular version yet. I was curious if there are experiments that support CxG, or if evidence of serial (as opposed to hierarchical) processing is considered sufficient?
Comment: One current attempt at grammar is concerned with *parallel architecture*, so I suppose that cover serial and goes farther.
Comment: Interesting. Ca you say more? I found a 2006 article from Jackendoff. Is that the canonical primer for this?
Comment: Do you have a particular model in mind for a purely serial processing algorithm, that doesn't build any kind of trees or similar structures as it goes? People have gone into elaborate detail with TG, connected HPSG to incomplete but functioning computer algorithms, made psycholinguistic predictions based on CxGs, etc. As far as I know (but I haven't looked into it much…), nobody's done anything like that for purely serial processing, and it's pretty hard to find evidence against "It might be possible to do things in some way I haven't really thought through".
Answer: First, one big thing you're going to run into, almost no matter who you read: Most people in CxG focus their arguments against Chomskyan transformational grammar and other major competing approaches,1 not against non-hierarchical grammar or purely statistical approaches or other things that far outside the theoretical linguistics mainstream. For example, Simpler Syntax (mentioned below) does have some argument for why syntax can't be totally flat (and can't be parasitic off semantic structure), but it has a lot more argument for, e.g., why semantics also has to be hierarchical, or why syntax can't be as complex as current Chomskyan theory implies.
Anyway, I don't have a complete answer here, but… since the Parallel Architecture came up in the comments, and it also happens to be the CxG-style approach I'm most familiar with, I can give a partial answer, focusing on PA.
First, the "parallel" in the name is not about parallel vs. serial real-time processing (despite what the comments imply). It's about constructions being comprised of three parallel, independently "generative", structures: semantics, syntax, and phonology.2 PA was developed by Ray Jackendoff and Peter Culicover, starting with their 2005 book Simpler Syntax. While that's a pretty solid book, you might prefer to start with either Jackendoff's 2010 Meaning and the Lexicon, which gives a lot more historical overview, or Culicover's 2013 Grammar and Complexity, which is more up-to-date and more rigorous—and also much more firmly in the CxG camp.3
One of the intended goals of PA was to come up with a theoretical grammar framework that can actually connect up to psycholinguistics, unlike mainstream Chomskyan grammar. For example, Culicover argues that the hard competence/performance divide (going back to 1950s Chomsky) needs to go away, and shows how it can. All three books mentioned above contain references to a variety of experimental work, as do other papers and books within the PA framework by both authors.
Jackendoff has also, since the late 2000s, been collaborating directly with psycholinguists to gather experimental work that's specifically relevant to his theoretical framework. I don't know much about any of those papers, but you can see the Experimental Articles section of his recent publications page for pointers. Also, I believe Gina Kuperberg has done some independent psycho-/neurolinguistic work that's relevant, and probably some of the other co-authors have as well. Taking a quick look at The Processing and Representation of Light Verb Constructions, it looks like this is relevant work, if not exactly what you're looking for.
Another good starting place is Adele Goldberg, maybe the 2006 book Constructions at Work. She has her own CxG approach, different from PA. Like Jackendoff and Culicover, or probably even more so, one of her major focuses has been working out how to connect formal linguistics to theories of real-time processing, language acquisition, and language evolution. And her papers, like theirs, tend to contain references to experimental results. For example, her original paper on statistical preemption4 goes into detail about what kinds of testable predictions it makes.
One last point: Most of the arguments are pretty indirect. Let me give an example: Various pieces of evidence (e.g., timing tests and distraction tests) show that there's a higher cost to processing whatever-is-going-on with linking wh words to gaps when the gaps are in subjects rather than in objects (in English). And there's some evidence implies that topicalized objects act like subjects in this regard. That isn't prima facie evidence for CxG. However, under Culicover's CxG-based model of real-time processing, the explanation is obvious, if a bit involved (I won't go into it, but see, e.g., chapter 5 of Grammar and Complexity); there might be a similar explanation in a linear processing theory, or in transformational grammar, etc., but it's not obvious (at least not to someone who specializes in CxG…), and nobody's yet offered one. So, that's some sort of evidence for a CxG approach. But how strong? What if many of the alternative theorists haven't even read Culicover's work (which is entirely plausible), so they don't even know they've been challenged to explain these results? What about frameworks that only have a handful of people working on them, so they can't be fairly expected to answer every challenge they hear about?5

1. And, as another unfortunate side effect, they expect you to know some of the arcane Chomskyan terminology.
2. Most other approaches, both CxG and otherwise, have a single core generative structure (usually syntax, but sometimes semantics, as in some cognitive grammar approaches), and the others are assumed to be isomorphic to it, or parasitic off it in some other way.
3. Simpler Syntax is careful to try to avoid any prior theoretical commitment to CxG, and draws on predecessors ranging from HPSG to Chomskyan GB, even though ultimately the conclusions are pretty CxG-flavored. Subsequent work, by both authors, draws much more on SBCG, HPSG, and other CxG and closely-related frameworks.
4. I can't remember the name of the paper—but the idea is covered in the 2006 book, so you probably don't need it.
5. And that's effectively the case for almost every alternative except mainstream (Minimalist Program) transformational grammar.
Comment: @zixuan You don't think he said _what_? The only thing I think I attributed to him here is the performance-competence thing, which is so well known that I didn't think I'd need to reference it. Do you not believe that Chomsky made such a distinction, or is there something else that I said or implied about him that isn't true?
Comment: Hmm, I don't think that Noam Chomsky said that.


In the Sopranos, what is the meaning of Chris Moltisanti staring at an anonymous young family in the street?

Question: In the Sopranos episode S05E12 titled "Long Term Parking" (at about 42 minutes), Christopher Moltisanti is apparently thinking about betraying his comrades and entering the Witness Protection Program, following Adriana's proposal. In the street, for some seconds, he looks at a young couple with kids. Does this influence his decision? How?
Answer: Though somewhat opinion based, I think it's relatively safe to assume that this seals Adriana's fate. Chris sees his future family life in the gas station: nagging kids, annoying wife, a beat up car and, most importantly, a very tired and fed-up looking husband. Chris's face says it all, this is not the future for him. His next move is to go to Tony, which leads to Adriana's demise. It was actually a slightly unsubtle way to eludicate his thought process.
Answer: You're talking about the episode "Long Term Parking".  In that episode, as Christopher is contemplating turning informant, he goes to buy a pack of smokes and sees a family of schmucks piled into an old beat up car.  Chris realizes that he doesn't want to be like them, working for a living and getting nowhere, so he decides against turning into a snitch.
Answer: Christopher knows that Adriana cannot have children. He's watching the scene thinking that this loser guy has a better life than him, that's why he turns to Tony.
Comment: Could you please back up your answer with
(a) details, and
(b) sources/citations and/or video evidence?
(Click "edit" under your answer to add in your explanatory details and citations.) Thank you!
Comment: In which episode did Adriana say that she couldn't have children?


What is the use of First() and Follow() in compiler design?

Question: I am completely aware of how to calculate first and follow, my professor has taught me that well , but he had not explained what is the need of First() and Follow(), so any explanation why we need them will help me very much.
Comment: FYI, there's a [really good answer](https://stackoverflow.com/a/20317336/6243352) to this over on Stack Overflow.
Answer: $FIRST$ and $FOLLOW$ sets are used by the algorithm which produces an $LL(k)$ parser from a grammar. They're also used in a number of other algorithms which analyze grammars, but most students will run into them when learning about top-down parsers.
Parsing is a tiny part of the work of producing a compiler, and in practice you can generate a parser using code-generation tools which avoid you having to know much about implementation details. So I'd say that th4e direct answer to your question is that $FIRST$ and $FOLLOW$ sets have very little to do with compiler design, but they are useful in the understanding of how particular parsing algorithms work.
Answer: $FIRST$ of a non-terminal would refer to the very first character of the strings that can be derived starting from that non-terminal. The $FIRST$ of a terminal would be the terminal itself.
The $FOLLOW$ of a non-terminal $A$ refers to the $FIRST$ of the non-terminal or terminal that immediately comes after $A$ in the dervivation rules.
They are used by parsing algorithms to determine which production to use for parsing a string. If we have a choice of multiple productions, and we wish to generate a string $x$ we would like to use the productions that can generate strings that start with $x$. This is where $FIRST$ can be used to identify such productions.
Comment: why are they important? what are there importance in compiling?
Comment: I have edited the answer


Looking for a short story about a posthuman conducting first contact with a primitive alien race on their planet

Question: I probably read this story 20 years ago.  I only remember random details about it.  The protagonist is a heavily modified human and he is conducting first contact with an alien species on their planet.  I believe they were doglike in their description.  They perform shows and the like for him (which he finds silly).  He worries or wonders about if he will have to call his Soldier equivalents to annihilate them (the Soldiers may be called "Shrikes").  He ponders that the Soldier equivalents are barely even human from his perspective.  He definitely looks down on the aliens.  His ship has a station or pod or something that performs as both a mother and a lover role for the protagonist. I believe he mentions that it has multiple breasts.
Comment: If you agree with an answer, please confirm it by clicking on the check mark.
Answer: This reminds me in many respects of Dinosaurs, a short story by Walter John Williams, first published in 1988.
The central character, named Drill, is a posthuman diplomat "the ultimate product of nine million years of human evolution". His task is to make diplomatic contact with a relatively primitive race called the Shar. Humanity have been sending out terraforming ships, and inadvertently they have begun assimulating Shar worlds, resulting in the losses of billions of their lives.
The humans have become extremely specialised.  In particular, in agreement with the question, the Warrior castes are called Shrikes:

Our terraforming Ships are very good at what they do," Drill said.
"They are specialists. Our Shrikes, our Shrews, our Sharks‑-each is a
master of its element. But they lack intelligence. They are not
conscious entities, such as ourselves. They weren't aware of your
civilization at all. They only saw you as food."

On board his ship is a barely sentient creature called "Surrogate" that Drill uses for sexual pleasure:

It was a human subspecies...
designed to comfort voyagers on long journeys through space, when
carnal access to their own subspecies might necessarily be limited.
Surrogate had a variety of sexual equipment designed for the
accommodation of the various human subspecies and their sexes. It also
had large mammaries that gave nutritious milk, and a rudimentary head
capable of voicing simple thoughts.

Drill is at first successful in calming the Shar politicians, but is bemused at their primitive emotional responses to his statements. He indeed monitors their broadcasts, but rather than finding them silly, he finds them "delightful".
In the end things turn bad when a Shar vessel destroys an Earth terraforming ship. Unfortunately

the responses of the humans have become so automatic that this will result in the total destruction on the Shars.
Comment: Also the unaccepted answer to this old question https://scifi.stackexchange.com/q/23407/28516 and accepted here https://scifi.stackexchange.com/q/175599/28516
Comment: Thank you!  I could remember everything about this story except the title. :)
Comment: @DavidW please mark the answer as accepted by clicking on the check sign.
Comment: Weird - I had no idea that Walter John Williams had a group of aliens called the "Shar" before the Dread Empires Fall series, which kicks off with the death of the last "Shaa".  Wonder why he has used basically the same name twice.
Comment: Clara, thank you so much!  That's definitely it


Calculating percentage of points per raster band (elevation, slope, aspect...) in QGIS

Question: I have a series of rasters expressing environmental variables, for example, elevation. I have used the tool 'add raster values to points' to classify the sites according to the bands (10) I have reclassified the DEM in. I am now looking to calculate the percentage of points for each elevation band, but I am not sure how to proceed. Is there a way to do this in QGIS? It seems like something that should be straightforward but I cannot seem to find a tool to do so.
I am running QGIS3.16.
Answer: You could use the Statistics by categories tool with your elevation band field as the Field to calculate statistics on to get a count of points in each band. Then calculate as a percentage of the total number of point features.
In the Statistics by category layer, use the Field Calculator to get the percentage
"count" / sum("count") * 100

After deleting unnecessary statistics fields -


Locking Sharepoint column after data is input

Question: How can I lock a column (in a list) from further changes after it is initially populated?  I want to lock down the "initial due date" and only allow changes to a "revised due date" column so we can track aging.  Is there a way for this to be done automatically ... without manual intervention?
Answer: I don't know what you mean by automatically, I think it is not possible out of the box. But, should be possible with little customisation: You can disable quick edit on the list and write a jquery to make the field as non editable and add it to a script editor in Edit form of the list. Check this: http://www.c-sharpcorner.com/code/816/make-a-sharepoint-list-form-field-read-only-with-jquery.aspx


What's the best way to kill a floater in Dead Island?

Question: I'm having mega trouble killing them: I've tried bombs, shotguns, etc. but they're still a nuisance!
Are there any tips or tricks to taking them out?
Answer: I found that melee weapons work the best. Charge in, circle strafe around it and swing away with a melee weapon.
Or if you are able to knock them over, stomping on its head will also do it.
Comment: I didn't know you could knock them over I keep getting thrown up on :(
Comment: It is possible, generally with a weapon with a large amount of force behind it.
Comment: hmmm I will try and let you know thanks for answering!
Comment: just be careful if you charge in as they have a spinning puke move that hurts a lot.  If you do a running leap kick, most of the time they get knocked down, then you can curb stomp them.
Comment: This works well if you have a weapon modified to do additional damage (fire, shock, blood) ... just make sure there aren't other zombies around to interrupt you.
Answer: Rush in, keep at their back, and keep up a constant barrage, to kill a Floater.
You rush in because once you're in close enough, they'll feel ready to perform their harder-to-dodge, horizontal spray attack. If you move in slower, you're more likely to be in front of them when they begin a horizontal spray. An angle in front of them is a danger zone with the horizontal spray. When you're away, they're firing projectile...acid, which is easy to dodge (projectile hitbox is smaller than the projectile visual). Rush in before they begin a horizontal spray. I was going to say to keep strafing them, but if you're hitting them that means that they're flinching and won't be turning; you don't want to come 'round back to their front again.
When a Floater is struck, they usually get staggered. It's important to note that I say "usually". For example, as an exception, the Floater has "super armor frames", i.e. they will not flinch from being struck, when the Floater does a horizontal spray attack. I don't know if it's just a bit or absolute, i.e. 100% unflinching or if you hit them with a forceful enough weapon, they flinch. Point is, it may be better to dodge rather than counter-attack in the face of Floater spit, because they may not flinch when you expect them to, despite the advice of "keeping up a constant barrage" being based on the knowledge that they flinch.
It's not as practical, but if you knock them down, on top of the usual benefits to knocking something down, there is a chance that the Floater will clip through the ground and die. Cause of death is assumed to be by a death-zone underneath the intended ground. Floaters are notorious, at least in my experience, to die in this way.
"If you do a running leap kick, most of the time they get knocked down" - spartacus, What's the best way to kill a floater in Dead Island? .
This assertion is what mainly spurred me to respond to this question, because it is erroneous. Here's my video response to spartacus, partly since I cannot respond to their comment directly. The video demonstrates that Floaters cannot be knocked down by the jump-kick, tackle, nor knock-out attack. I don't believe that running affects the effectiveness of the jump-kick. Same with the knock-out attack. I demonstrate the variations anyway.
"The EASIEST possible way for killing the floaters is the homerun baseball bat that has near 100% crit attack everytime." - TwistedChaos, https://gaming.stackexchange.com/a/62037/46216 .
This assertion is only partially erroneous and employs exaggeration. It is not easy to acquire a homerun baseball bat. The crit. bonus of the Homerun baseball bat is listed as +75%.
Good news and bad news: Homerun baseball bats cannot be found, but are made. They are developer's craft weapon no. 2. Developer's craft weapons are made via the developer's craft blueprints, which require a two-step process to retrieve, unlike simply finding a blueprint. On top of that, each developer's craft requires 5 diamonds to create. Diamonds are rare.
As one of the Dead Island Wikis says, the main damage dealt by the Homerun baseball bat is not the strike itself, but the sudden stop on any obstacle toward which the target is flung. This method of dealing damage is in contrast to most other Impact weapons which deal much of their damage upon initial impact on a critical hit. Homerun baseball bat initial impact damage is poor because they only appear at level requirement 1 which means sub-30 base damage. Point is, even on crit., Homerun baseball bats do not always kill, instead sometimes merely setting the opponent back a ways.
"Like the other developer weapons, the price to maintain the HomeRun Baseball Bat is very high." - deadisland.wikia.com.
Floaters will not engage in uncontrollable emesis upon being struck with a poison crit..
Fire-arms: I am writing this in contrast to the top-voted answer's emphasis on melee. Fire-arms let you keep distance, safer from the Floater's attacks. A danger of the main tactic of constant assault, is running out of stamina. Fire-arms do not cost stamina. Floaters are bullet sponges, but they flinch from bullets all the same. Besides, since I'm usually using a Heavy Pistol and only pulling out a shotgun to insta-kill tougher stuff, it's good to have something to really unload an auto rifle on.
Answer: Fire won't work vs. Floaters because they are almost always standing in water.
Poison doesn't seem to work (even with Plaguebearer), probably because that is the Floater's base elemental dmg.
Shock modded weapons seem to work the best of the elemental damage mods, and can be applied with a pistol or rifle at a safe distance. A Tesla Bomb knife might be able to do the trick, but I haven't tried in the higher levels, so I'm unsure if it is automatic --> one good possibility.
Impact mods/weapons (Shocking Crowbar, Heavy Duty Kanabo, Left Hand of Glova, or the Homerun Baseball Bat (developer's mod)) can be thrown/used and knock him down and then you can stomp on his head. --> this is nearly automatic, as long as you can get him down, you can rush in and stomp.
Explosives (Sticky Bomb knife, Deo-bomb, & Grenade) - These do the trick nicely, you just need to be careful in tight spaces like the Sewers of Moresby so that you don't hurt yourself in the process.
Vehicles care free and easy, you can either kill them or avoid them, your choice.
As for the best, it would be situational;
  - If you're in a confined space, try the impact+stomp route.
  - If you are at mid-range and have room to move, use a grenade/sticky bomb or two.
  - If you've got line of sight and distance, try a rifle/pistol with a shock/pride mod and just keep plugging away at him.
  - If you've got access to a vehicle, then by all means run him down (or go around him).
Answer: The EASIEST possible way for killing the floaters is the homerun baseball bat that has near 100% crit attack everytime.
Answer: 2 grenades or deobombs do the trick for me, especially when in a cramped space...
i always stock up and, of course, carry (lol) incendiary weaponry that i use against floaters specifically


Multi-level data query

Question: We want to find the relationship between supervisor's narcissism and subordinate's job commitment. We have collected data from 600 supervisors and 1800 subordinates reporting to them (three subordinates per supervisor). When we run the regression, will it be run on n= 600 or n = 1800. In other words, for every three subordinates, the supervisor's narcissism will be same. So can we really use n = 1800?
Comment: What approach? You don't need to input n in a regression problem. So what do you want to "use" n for?
Comment: It will run for n=1800. Use for what?
Comment: We have collected the Narcissism score from the Leader and the Job commitment from the team members. We wanted to know which of the following approaches we should take to do normal regression.

Option 1 - Keep the 1800 entries of Team members as-is and bring the Team leader scores against each of the team member enter (in which case, the leader score will be repeated for more than 1 member) and regress OR

Option 2 - Keep the unit of analysis at the leader level (600 entries) and average out the Team members scores and roll it up to the Leader level and do the regression.
Comment: @user2974951 - Sorry... our responses crossed as I was editing it while you posted the above. Does this help?
Comment: Given that you have multilevel / hierarchical data you should use a multilevel / hierarchical model. So a GLM with supervisors as random effects or something, which means 3 samples per supervisor.
Comment: Thank you ! let me try using GLM. Will require your help again.
Comment: Alas I do not know SPSS so I cannot help you there. Anyway, you will find lots of posts on this site already on the same subject.
Comment: @user2974951 Thanks.
Answer: SPSS Statistics has both the MIXED and GENLINMIXED procedures which can be used to model hierarchical data such as yours. All 1800 cases will be used (assuming no missing data).

Multi-level data query


Why is a date being reformated to numeric value when passed into data frame?

Question: I've created a data.frame by populating it with NA values
date_base <- rep(NA, df_length)
x <- rep(NA, df_length)
y <- rep(NA, df_length)

df1 <- data.frame(date_base,x,y)

I then cycle through some data and populate each row individually (hence the need for pre-populating the data.frame. Yes I could use rbind, but I thought this would be easier this way).
The first column is to contain dates which are formatted as 'yyyy-mm-dd'. These are obtained from another data.frame 'in_data' which is pulled from a database. I ensure they are dates using the as.Date function.
in_data$date_base <- as.Date(as.character(in_data$date_base),"%Y-%m-%d")

For each row I simple set:
df1$date_base <- end_date

Where end_date is a value from in_data$date_base. I've checked the data type of end_date and it's Date[1]
However once populated I check df1$date_base and they are numeric representations of the date: 14487, 14517, 14548 instead of 2009-08-31, 2009-09-30, 2009-10-31
If instead of creating the data.frame with NA's I prepopulate with dates like:
date_base <- rep(as.Date(as.character('1970-01-01'),"%Y-%m-%d"), length(unique_dates) * versions_len)

then the resulting dates in df1 maintain the 'yyyy-mm-dd' format in df1.
Why does populating the data frame with NULL values have this effect? Is this a bad practice to pre-populate a data.frame? If it is, what is best practice?
Thanks for your help.
Answer: I think it could be as simple as making the first column a date initially as follows:
date_base <- as.Date(rep(NA, df_length))

When you set it as NA it creates it by default as a logical type rather than a Date. Here is a link to a previous question which describes this in more detail: NA in data.table
Comment: `NA` is logical, not integer.


How is voltage difference of input terminals zero in open loop ideal op amp?

Question: An ideal op-amp has infinite open loop gain. This means that the input voltage difference approaches zero. What causes the difference to go to zero in the absence of negative feedback?
Comment: There is nothing that makes the inputs of an ideal (or real) op-amps equal in the absence of feedback.
Answer: The input voltage between the + and - inputs is approximately zero volts (1st order approximation) for a closed-loop configuration (negative feedback) as long as the opamp is not saturated.
In an open-loop configuration, there is nothing stopping you from inputting a non-zero value. The input will be limited by the input protection diodes going to the power supply rails. Using an opamp in an open-loop configuration is normally not a useful application for opamps. Some like to use opamps in an open-loop configuration as comparators, but the speed performance is not very good compared to a dedicated comparator.
Answer: As mentioned in the comments, "Nothing makes the inputs zero in open loop."
The infinite open loop gain part of the ideal model for an op-amp is not very useful. The discussions around the so called requirement that the input difference must be zero is a distraction. A finite gain leads to better understanding. The equation:
$$V_{\text{out}}=A_{\text{VOL}}V_{\text{D}}$$
has meaning only if \$A_{\text{VOL}}\$ is finite.

simulate this circuit – Schematic created using CircuitLab
The diagram shows a zero-order approximation of an op-amp. It shows two parts: a device that subtracts the inputs and a device that amplifies the difference, plain and simple. There is no mechanism or magic that requires or makes the inputs zero.
However there are some limits set by the power supplies (VCC and VEE).
$$\frac{V_{\text{CC}}}{A_{\text{VOL}}}>V_{\text{D}}>\frac{V_{\text{EE}}}{A_{\text{VOL}}}$$
Whether open loop or closed loop, the equation holds for analog operation between the limits. But there is nothing restricting \$V_{\text{D}}\$'s range necessarily.
Answer: I think you may be under the misapprehension that infinite open loop gain means that the inputs can never be unequal. That is wrong. There's no rule that constrains the input potentials of an op-amp. There's nothing that says those two inputs can't be very different.
Negative feedback simply means that one of the op-amp inputs is now under control of the op-amp itself, from its own output. Initially, the two input potentials may in fact be very different, but the op-amp quickly responds to bring the difference in input potentials towards zero, and settle when they eventually become equal.
With negative feedback, some fraction of the output potential is fed back to the inverting input, which has interesting consequences. If the op-amp's output results in the two input potentials being different, the op-amp responds by changing its output in the direction required to reduce that difference. It continues to adjust its output until the two inputs are identical, but this does not mean that the inputs can never be  unequal. All it means is that the op-amp tries to make them equal, to the best of its ability.
With no negative feedback (the loop is open), there's no such self-adjustment taking place. Both inputs are now under your control, not the op-amp, and you may set those to inputs to whatever potentials you desire. The op-amp will simply multiply the difference in inputs by some very large value (its open loop gain). Of course, if the op-amp were ideal, this would mean infinite output potentials, and the universe still exists only because there is thankfully no such thing as an ideal op-amp.


Detecting(and locating) rogue DHCP server on a local area network

Question: How would we detect and locate a rogue DHCP server on our local area network?
Comment: Hi.No, the question should be abstract and should not be limited to a single scenario on a particular network, so it can be discussed in broad terms.It is ment like this.
Comment: In order to get a good answer I would suggest you add some more information. How big a network is it? What type of network equipment do you have? What have you already tried?
Answer: You can use an nmap script for locating a server that will send DHCPOFFER (so long as it's in your broadcast domain):
nmap --script broadcast-dhcp-discover

This will give DNS domain name, your IP, who offered it, lease info..all of the fun stuff.
You can also include a list of hosts that have anything to do with port 67:
nmap --script broadcast-dhcp-discover -p67 [your network CIDR]

Comment: I have tested this and I believe it is incorrect. First, the script exits after the *first* DNS server responds. If you're looking for a rogue DNS, then your normal server may sometimes respond more quickly and you'd get a false negative. Second, the nmap script broadcast-dhcp-discover uses a fixed MAC address (0xDE:AD:CO:DE:CA:FE), and a rogue DNS server would simply ignore requests from that address. Third, doing an nmap scan of your network CIDR will only work if the rogue server happens to chose the same IP network as you (and why would they?)
Comment: I agree with @hackerb9 . This isn't really going to do what has been asked as it doesn't keep sending responses to find as many DHCP servers as possible, only waiting until the first one replies.
Comment: You can see all replies if you open another terminal and run there tcpdump, for example  sudo tcpdump -nelt udp port 68 | grep -i "boot.*reply"
Answer: The answer to this will largely depend on how good the management software on your network is.
Assuming that it's reasonable, I'd say that this wold be done by looking at the MAC address of the packets from the rogue server and then reviewing the management interface for your switches to see which port that MAC address is connected to.  Then trace from the port to the physical port and see what's connected...
If you have no way to map from MAC address --> switch port --> physical port this could be a bit tricky, especially if the person running the server doesn't want to be found.
You could do a quick ping sweep of your network using nmap (nmap -sP -v -n -oA ping_sweep [your network here]) that'd give you a map of IP addresses to MAC addresses, then (assuming your rogue is on there) you could port scan the IP address and see if it tells you anything about it (e.g. machine name from SMB ports)...
Comment: This answer how to locate, not how to detect. You can use snort \ any other IDS \ custom script to detect and alert
Answer: Just found the rogue dhcp server on my home lan by the classic method of trial and error. Looking at the network properties I found that some dhcp clients got an ip address in the rogue 192.168.1.x range instead of the 192.168.3.x range that I configured in my dhcp server.
First I suspected a dev pc that hosts some virtual machines; the configuration is complex and who knows there might be some dhcp server in one of those vm's. Just pull the network cable and see if that dhcp client now gets a valid ip address. No improvement, too bad.
Now I suspected the "smart" tv, its a samsung and that brand is known for spying on viewers. Pulled its network cable. No luck, though.
Then, after some looking around I thought of that little old adsl modem with 4 ethernet ports I got some months ago from a friend to replace a broken ethernet switch. Pulled the 12 volt adapter cable. Bingo! The problem dhcp client now gets a valid ip address! I also realized that the dhcp trouble in our house started a while ago.
Agreed, I was not smart enough to fiddle with tools like nmap and/or wiresnark. But did Sherlock Holmes not succeed with Deduction and Induction?
PS
With a straightened paper clip I did a factory reset on the old adsl modem to make the default linksys password work, and disabled the dhcp server on it.
Answer: You can use wireshark to listen for dhcp replies to requests then go to your switch's arp table to find the address and location. You can do this with most configurable switches.


Making bootable usb in Mac OS 9?

Question: So I have an old G3 imac with mac os 9.2 and mac os 10.1.5  installed on it. I would like to use this computer to make a bootable ubuntu usb stick. However when I followed the instructions for using terminal in os x,it did not work.I dont know if the computer is just too old. I am new to linux. Is there any way that I can use this computer to create a bootable usb?
Comment: Have you followed the [instruction](http://www.ubuntu.com/download/help/create-a-usb-stick-on-mac-osx) on ubuntu.com? Can you tell us which steps didn't work?
Answer: I believe that this thread has the answer you are looking for:
can't make bootable usb on mac
Looks pretty straight forward.

Making bootable usb in Mac OS 9?


How do I access Wine applications from Unity?

Question: I just did a clean install of 11.10. This is my first time using Unity. I installed Wine and successfully used it to install IrfanView. I can't figure out how to launch IrfanView from Unity. Do Wine programs not show up in Unity, and if not, how do I access them?
Answer: Usually you can launch the program by typing the first few letters of the application's name into the Unity dash. In your case, you would begin typing "IrfanView" and if the application created any desktop shortcuts / start menu icons, then they should show up when you type the first few letters.
If that fails, you can try opening up Wine's "C drive" and find the application's executable. You can find most Wine applications in ~/.wine/drive_c/Program Files. Almost all Windows applications install to C:\Program Files, so you should see a folder for your application in there. Once you find the application, you can launch it by simply double-clicking it.
Comment: I think wine apps will shown in dash after some time
Comment: Huh, it doesn't show up at all on the dash. I am able to launch it from the Wine directory. I tried installing a couple of other apps, with the same result - they run, but don't show up in the dash. Since I haven't used Wine with Unity before I don't know if this is typical or an aberration.
Comment: You were exactly right. I'm not sure why it took so long, but after a couple of reboots they showed up.
Answer: I'm getting my first taste of Unity on 11.10 also.  The way I add wine launchers to the Unity launch bar is to search for it by name in dash and drag the icon over to the bar.  Wine integration is not great because clicking the launcher creates another icon named "Wine Windows Program Loader".
If your not seeing the apps in dash I would first fully update your system and reboot.  If your still not seeing it make sure Zeitgeist is running. You should see processes called "zeitgeist-deamon" and "zeitgeist-datahub".  They need to be present for dash to work properly.  Either way try starting zeitgeist in debug mode and look for errors.
Don't use sudo
zeitgeist-deamon --quit
zeitgeist-deamon --log-level DEBUG

I tried viewing the debug info from Zeitgeist while installing a wine application but I saw nothing relevant coming out.  The program showed up in dash instantly for me.  Perhaps you may see errors or something useful.
Comment: Thanks for the advice. I think restarting a few times was all it took, in the end. I'm not sure if I updated during that time or not.
Answer: According to some posts, an application is shown in the Unity launcher if there is a "desktop" settings file for this application in the /usr/share/applications/ directory.
I remarked that a "desktop" file seems to be nothing else than a simple text file. If you right-clic on it, you can open a properties display window, but what you discover there is not very useful. Instead of it, if you copy this file into your home directory, rename it as .txt, you will see more and learn how you can do a launcher for your windows application.
I made a test launcher for a simple "mscalc.exe" which runs with "wine", and it works perfectly from the Unity launcher. Here is how i did:
(1) Put mscalc.exe and mscalc.ico intho a .wine subdirectory
(2) prepared a .txt file with this content:
[Desktop Entry]
Name=mscalc
Comment=Perform arithmetic, scientific or financial calculations
Keywords=calculation;calculator;mscalc
Exec=sh -c "cd /home/username/.wine/drive_c/windows; wine /home/username/.wine/drive_c/windows/mscalc.exe"
Icon=/home/username/.wine/drive_c/windows/mscalc.ico
Terminal=false
Type=Application
StartupNotify=true
Categories=Applications;Utilites;Calculator
X-Ubuntu-Gettext-Domain=windows-calculator

(3) Then I renamed my txt file to have a ".desktop" extension, changed the properties to make it executable. With the command line it was easy:
cp mscalc.txt mscalc.desktop
chmod +x mscalc.desktop

(4) And finally I placed it in the correct directory:
(edit: I remarked that some mistakes in the .txt file will cause the display of several warnings each time you log in. Though it does not seem to harm, better let the desktop icons on your desktop and not deploy them in the /usr/share/applications directory).
sudo cp -iv mscalc.desktop /usr/share/applications/

In this example I'm pretty sure there are many unnecessary or inacurate settings. But you will notice that

Inside this txt file I used "cd" to change the directory
where the application will be running.
Of course you will have to change "username" into the real user
name.
I used drive_c\windows directory to avoid the "program files"
directory name, because the space is not easily accepted. But you can
use it using an escape character (double "\"), like this:
/home/username/.wine/dosdevices/c:/Program\\ Files/
The setting "Categories=Applications;" seems to be useful to see this
application in the correct part of the launcher. I don't know the
existing categories but Applications" seems correct to make it appear
somewhere :-)
Answer: I'm using the classic menu indicator for slowly weaning myself off the gnome panel and onto unity.
Whilst not a direct resolution for you it might be an easy workaround.


Particles flying around

Question: I am following Blender Guru's tutorial and I'm making particles on my icing. Unfortunately, they are flying around my icing instead of just lay on it. What's wrong?
Comment: Is the particle physics set to Newtonian?
Comment: It was, and when I change it to ,none' my particles are invisible. They disappear...
Answer: When in doubt. go back in the tutorial. Pay attention to the section where the author sets the particles. For static particles use physic type to none.
Comment: When I set physics type to none, my particles disappear. I am making them as ,hair' and following tutorial in every step and still can not do that.
Comment: Again: When in doubt, go back in the "tutorial", if the "tutorial" does not explain clearly, then find one that does.
Comment: @FilipBlend "Hair" is correct. The emitter particle type will emit the specified object, "throwing" copies of it off the target. A hair will simply place the specified object on the surface of the object.

On the topic of this answer, please don't answer a question by referring the person back to a tutorial.

Particles flying around


Cultivating hydroponics on Shabbat

Question: I know one is not allowed to reap plants on Shabbat, but does this apply to hydroponics on shabbos? I know for instance one can cultivate hydroponics on shmita (sabbatical) year. Does this mean that in a hydroponics system one can reap from it on Shabbat?
Comment: See: https://www.star-k.org/articles/kashrus-kurrents/1121/hydroponics/. - The Maharil Diskin, cited by the Minchas Shlomo prohibits the use of hydroponics during Shemitta. Chazon Ish however, permits it.
Comment: Lol sorry @Shmuel - was doing this at the same time... :-)
Comment: No problem Dov! Great job
Answer: Star-K address this concept here

Nurturing plants is one of the 39 melachos, prohibited categories of work on Shabbos and Yom Tov.  Therefore, on those days the seeds may not be placed in their base, nor may nutrients or water be added. (Shulchan Aruch O.C. 336:11. See Minchas Chinuch 32 and Teshuvos Har Tzvi (Zeraim 2:31))
...The vegetables may not be harvested on Shabbos or Yom Tov due to the prohibition of kotzer, reaping. (Shulchan Aruch O.C. 336:5, Shemiras Shabbos Kehilchasa 26:4, Machazeh Eliyahu 31)
Answer: This is an excellent question, and a pet peeve of mine :)
To frame the question in another way: how can pulling some plants out of water be harvesting - harvesting should require an action of cutting from the ground?
[It's important to note that many types of hydroponics are grown in some nutrient containing medium and this would appear to be classic harvesting. The discussion that follows is for hydroponics grown solely in a liquid.)
As others pointed out, the mainstream halachic approach is that it is forbidden. Rav Falk, in the Machzeh Eliyahu @dov linked to above is an excellent approach to the sugya. That being said, it's clearly not classic harvesting. What follows are some highlights from the sugya.
The gemara in Shabbos appears to address this question, and provides a unique source for a prohibition on harvesting from liquid: Abaya taught (Shabbos 108a) that pulling a mushroom from a moist surface is prohibited because he is being עוֹקֵר דָּבָר מִגִּידּוּלוֹ. (Uprooting something from its place of growth). The continuation of the gemara makes clear that this is only a problem because mushrooms naturally grow on moist surfaces (הַיְינוּ רְבִיתֵיהּ )
The gemara there juxtaposes three types of actions and includes them under the same category of עוֹקֵר דָּבָר מִגִּידּוּלוֹ. First, aborting a cow fetus, Second, harvesting hops (a parasitic plant) and finally harvesting mushrooms. The Ramban in shabbos has an explantion of the gemara that explains these are all not "classic harvesting" but forbidden under the broader category of "uprooting." [But see the Meiri there who understands this as a broad definition of "classic harvesting"]. If I recall correctly, based on this Ramban, Rav Shlomo Miller has a teshuva limiting the prohibition to plants that naturally grow in damp (like mushrooms or sprouts). That being said, most poskim take this prohibition so far as to prohibit pulling flowers out of a vase. They argue that the water/plant food is nurturing the flowers and pulling them out is harvesting (See e.g. Nishmas Shabbos 241).
In summary, harvesting hydroponics is forbidden. However (according to the Ramban and most others), it's never classic harvesting "kotzer", it's a sub-prohibition of kotzer called עוֹקֵר דָּבָר מִגִּידּוּלוֹ
which has different rules.  The only heter that I would rely on is that if you have plants in a nutrient bath, and the flow of the water is stopped before shabbos and the water drains by itself, picking up the plants would not be a prohibited act.

Cultivating hydroponics on Shabbat


Wouldn't a smart contract that deals with regulated markets need legal paper work to be legal?

Question: By regulated markets I mean: finance, gambling and insurance, but also others.
So let's say, you have your DAC (is that still common terminology?) and let's say you figured out some oracles that feed the DAC with real world events so that the DAC can function.
But the DAC is operating in a regulated market. What is the legality of this thing?

Are the developers required to file paperwork?
Are the oracles, presumably people "employed" by the DAC, to feed it with real world events, required to file paperwork?
Are the clients of this DAC required to file paperwork?

I know this is still a gray area, but I welcome any relevant information.
Note: I noticed the terminology regarding oracles has changed. I am using "oracle" to mean any input of data from real world to the DAC.
Jurisdiction: EU and US
Answer: I told my lawyer I want him to write a very simple paper contract. It would have a single line: "The two parties signed below agree that the terms of this contract are fully described in the Solidity source code at address 0x...whatever..." That's it. That's the entire contract. Then both parties would send a transaction with those words in the 'input' data field.


Why is ANOVA interaction no longer significant after including a covariate?

Question: I have initially run a 2x2x2 Anova and found some significant interaction between the independent variables. I then ran a ANCOVA where I added a covariate. I am confused with how to interpret the output from the ANCOVA as the significant interactions that I found with the ANOVA are now insignificant in the ANCOVA.
Comment: This means that, after controlling for the covariate (that is, holding it constant) the other independent variables are no longer significant.
Answer: First, the difference between significant and non-significant is not necessarily significant. So if after adding a covariate your interaction p-value changed from .04 to .06, this doesn't mean anything substantial other than you've bounced from one side of a binary  .05 decision threshold.
However, the other possibility is that the covariate has substantially influenced the analysis. A typical motivation for including a covariate is that you want to control for its effect, and thereby adjust your estimates of main and interaction effects for the covariate.
I recommend that you produce a few plots of the cell mean both controlling and not controlling for the covariate to see what kind of difference inclusion of the covariates has made.
Comment: Thank you for the pointers. Looking at the means and plots there is a large difference between the ANOVA and the ANCOVA. I'd understand it if the ANOVA wasn't significant and the ANCOVA was, obviously the covarient would be having an effect on the scores. But I can;t wrap my head around what it means to have gone the other way, can this still mean the covarient is having an effect?
Comment: A standard scenario is that groups differ on the covariate. Thus, once you adjust for baseline differences between groups on the covariate there are no longer group differences. Things are more complex when it comes to interactions, but the same idea holds.


Why did Jesus request silence in Mark 8:30 and Luke 9:21?

Question: After Peter received the revelation that Jesus is the Messiah, Jesus asked the disciples to not make this known to anybody. Why did he do this? We know that in other instances he did not do this, for instance the Samaritan woman in John 4. What made this case different?
Comment: http://christianity.stackexchange.com/questions/tagged/messianic-secret
Answer: John Dominic Crossan says in The Birth of Christianity, that a massive majority of scholars believe that much of the Gospel of Luke was based on Mark's Gospel, so we can say that Luke 9:21 requests silence because this verse was copied from Mark 8:30.
Mark 8:30 forms part of the theme now known by scholars as the 'Messianic Secret', by which Jesus is portrayed as commanding his followers to be silent about his Messianic mission. Throughout the Gospel of Mark, there are regular examples of Jesus admonishing both people and demons not to reveal to others who he truly was.
Holman Bible Dictionary suggests that Jesus commanded silence because of people's expectations or so that he could move around freely. However, this does not explain why the Messianic Secret is largely confined to Mark's Gospel and derivative material, nor does it explain why there are some passages in which Jesus actually told people to tell others about him, such as happens in Mark 5:19. It may be that, at the time Mark's Gospel was written, that it would have been dangerous for Christians to be associated with claims of messiahship.


Meaning of phrase: "Not your father's Visual Basic"

Question: I have ran into the above phrase many times (especially during classic VB days) and I have been wondering what it really mean and where it originated from. Any ideas?
Comment: http://www.youtube.com/watch?v=hkDD03yeLnU
Comment: He wants your father to pay for a CD with Visual Basic on it.
Answer: Nowadays it refers to a shift from VB6 to the managed world of VB.NET.  A shift so dramatic that most VB6 programs have to be converted to VB.NET by hand.
In the VB6 days, I imagine that it referred to the shift from text-based languages like GWBASIC to visual, event-driven languages.  Visual Basic came along at a time when it was pretty difficult to do the simplest things in a GUI; making a simple interface with C++ required pages of code.
The phrase itself is derived from an old car commercial: "This is not your father's Oldsmobile," an attempt to move the car company away from its stodgy old image.
Comment: @Jerry To be fair, the name "Oldsmobile" doesn't exactly scream, "I'm new and improved!"
Comment: Yes and like Oldsmobile they are starting on the defensive with a phrase like that.
Comment: An attempt, it should be noted, that apparently failed -- Oldsmobile is no more. Personally, I suspect that may be prophetic, and VB may suffer a similar fate.
Comment: nah VB will live on. Every year they keep saying COBOL is dead..
Comment: Thanks. The oldsmobile bit was particularly interesting and the origin I was looking for.
Comment: @Darknight: So VB.net is yesterdays COBOL?
Comment: What about QuickBasic?
Comment: And so it is marketing on MS's part. Woe betides the project whose manager says "oh, 'VB6' .. 'VB.Net'  that will make our transition easier. Cut 1 year from the schedule."
Comment: *So VB.net is yesterdays COBOL?* Not quite. COBOL.Net is yesterdays COBOL. Yes, Virginia, there is a COBOL.Net. And there there was object oriented COBOL before there was COBOL.Net.  But if you think a programmer steeped in COBOL 75 can simply "transition" to the other.... let me tell ya about TPS reports!
Answer: "Not your father's X" is a riff on an old car ad campaign. GM was trying to rebrand Oldsmobile so they came up with the slogan "This is not your father's Oldsmobile". The existing customer base for Oldsmobiles were predominantly old men, and they were trying to reposition the brand towards younger people. The rebranding didn't work and Oldsmobile died in 2004.
If you listen to the youtube commercial, you may notice the phrase "step up to..." which is a throwback to yet another car branding concept. Traditionally, younger people would purchase the cheapest brand from a car company (Ford, from Ford Motor Co, or Chevrolet from General Motors). As they became wealthier, or more successful, they would "step up" to a more expensive brand in the same car company, for example, going from Chevrolet to Pontiac, then to Oldsmobile, then Buick, then Cadillac. Someone owning a Buick was wealthy. That sort of thing died out in the 70s, but the folks who worked for car companies (disclaimer - I used to work for GM) tended to think in older ways about the idea of branding. Today, the idea of "stepping up" is close to ludicrous, although some companies have created a "premium" brand to appeal to similar sentiments: Honda to Acura, or Toyota to Lexus.
Comment: Should I feel old if I once owned an Oldsmobile older than the one in the commercial?
Answer: As someone who worked with the various versions of "Classic VB" (versions 3-6), I must concur that the change over to VB.NET was indeed a paradigm shift - FOR THE BETTER!  In addition to the managed .NET framework, it changed over to an actual Object Oriented language.  While before, VB was a nice little interpreted language that you could do some little tricks to gain some "separation of concerns" (using .bas files, etc.), but it was by no means object oriented.
Now that it is a fully supported member of the .NET family, it is object oriented and can take advantage of all of the other .NET capabilities.
If you had other OO language experiences, then the switch over was not too bad.  However, for some, it could be a bit difficult.  But, in the long run, as I said, it was a change for the better.
Comment: @Catchops I think the downvotes might be because you haven't answered the question. At all.
Comment: You can implement every single GOF pattern in VB. Another idea: I could say that .NET is not OOP because it does not support multiple inheritance. Or that Ruby is not OOP because it supports mix-ins. Such unnuanced and general statements are so useless that they may as well be considered wrong and I stand by my downvote :)
Comment: @Catchops Actually OOP isn't the end all be all. Missing inheritance is NOT HUGE. I can get by all day by means of typeclasses and, if I need it, existentially qualified types.
Comment: I don't know about earlier versions but VB 4 on up was an object oriented language. The only thing missing was inheritance but you could still achieve polymorphism through interfaces. .bas files...really?
Comment: Two down votes - come on folks - let's get real!  What are the tennents for true Object Orientation?  Inheritance, Polymorphism, encapsulation.  Missing inheritance is HUGE, and the way you got polymorphism from interfaces was a kludge at best (yes...I've done it).  Can you REALLY call it object oriented?  Even the "Programming Microsoft Visual Basic 6" book agrees that it is not an Object oriented language.  This debate has been going on for years (and I had many years on VBx) and I suspect it will go on for more, but I stand by my statements.