How much damage do each of the different Titans deal punching?

Question: How much damage do each of the Titans do with their melee attack both with and without the Big Punch Tier 2 kit?  I have heard anecdotally that the Atlas punch does less than both the Stryder and Ogre which seems a bit tilted, but alas I have no real numbers.
Answer: The basic damage done by titan punches is (source):

Ogre: 1,875 with 510 knock back
Stryder: 1,125 with 850 knock back
Atlas: 1,000 with 510 knock back

So the lightweight Stryder has more of a punch than the Atlas, but it also gets knocked back further.
To put these numbers into context:

Ogre: 10,500 health
Atlas: 8,000 health
Stryder: 5,500 health

The Big Punch multiplies these stats by about 1.7, but slows down the punch.
All 3 titans punch at the same speed otherwise.
Comment: What's the knockback number?  A distance?  Hammer units (16 per foot)?
Comment: @NickT - it's an internal measure of the game distance, I think you can compare it to sprint speed stats and the range on explosions in the source link.
Comment: Further, what do you mean "it gets knocked back further"--the opposing Titan?  It doesn't seem like the puncher gets moved appreciably...
Comment: The titan that's punched goes further. Punching a stryder pushes it further away than punching an Atlas.
Answer: Although I don't have the actual damage numbers (they aren't ingame anywhere and unless the developers said something on the forums we don't know) I do know from experience how much they generally deal with Big Punch.
(the following is with big punch... as I never drop a titan without it)

Ogre does the most damage, but punches really slow with a long recovery. Completely eliminates shields in a single punch and can take down other titans in 3-5 punches (depending on the chassis and if you are shooting at them as well)
Atlas does mid damage, mid speed, and mid recovery. It can mostly take down shields (very little left) and takes noticeable more punches to take down other titans.
Stryder does piddly punches but punches really fast and has a quick recovery time. A single punch will take down full shields to about half. Also not recommended to take down other titans with punches only.
Comment: This is incorrect. The Stryder does more damage than the Atlas, see my answer.


What is the difference between PopUpWindow and Dialog?

Question: Basically the question is stated in the title. Any preferences in using one or another? Maybe some specific tasks where one is superior/ more efficient/ better than the other?
Comment: http://stackoverflow.com/questions/4710361/when-to-use-android-popupwindow-vs-dialog
Comment: No objective criteria are specified in the provided link. Thanks for link though :)
Answer: Dialog
"A dialog is a small window that prompts the user to make a decision or enter additional information. A dialog does not fill the screen and is normally used for modal events that require users to take an action before they can proceed."
AlertDialog has many variants and as far as I can assume your problem, You can have a cross button too in the top-right corner of the dialog (You can set the icons anywhere, as you can provide a custom layout to an AlertDialog).
-Capable of adding any view
-Easy to edit
-Can be adapted to tablets or cellphones in landscape or portrait just by modifying the layout
-Can dedicate a whole new class just to modify it your way
PopupWindows
"This class represents a popup window that can be used to display an arbitrary view. The popup window is a floating container that appears on top of the current activity."
PopupWindow is another tool to customize your custom pop up anywhere in the screen. If you're showing this popup always in the middle of the screen, then I would like to suggest not to use this. The AlertDialog should work fine.
-Simpler
-Easier to code
-It's more standard so it'll be harder for the user to be confused with it
Answer: Here are the differences between popup box and dialog box.  A dialog box typically has a question(s) and a prompt for an answer within the box itself.  For example, the box may have dialog that says, "Do you want to close the window?  There might be button such as CANCEL, YES, NO.
Therefore, there is a simulated dialog between the box and the user.
In a popup box, although there may be required input or selections from menus, dropdowns, etc., there will typically be no dialog because the box information itself is intuitive for the user.
Hope that helps to clarify it for you.
Comment: Sorry I was rather quick in typing this.  As a technical writer, I should be shot for all the errors.  lol
Answer: Dialog is designed for taking controlled action on popup events where you need to take action before proceed to continue next. It's auto-adjustable with the screen at center aligned manner.
But PopupWindow is informative popup which deals as layout. It can be shown anywhere in the screen as per position set and You can also use this with animated form as there is animation facility also with it.
So if you are looking for just show the information in popup then I suggest use PopupWindow and if you want some action control like "YES", "No" or any decision making action then go with Dialog.


Home Automation

Question: I want to automate lightings and fans in my home. I am planning to use RPI and SSRs for that. My question is about powering them. Can I have a single 5V 5AMP or 10AMP unit for the entire house, or individual power adapters for each unit? If I want to run the cabling for 5V in the entire house, I suspect power loss due to resistance of the cable. What should be the best approach in this case?
Comment: please do not crosspost .... https://iot.stackexchange.com/questions/3501/home-automation
Comment: I see from your profile that your location is India, which means the codes or rules that you must follow are likely very different from those most posting here would follow.  In general tho, distributing 5 volts over distance is in fact the difficulty you will encounter.
Answer: There are a number of problems controlling household loads (120  to 240VAC, often well over 1KVA power, at distances often over 100 feet) with devices like the Raspberry Pi, which are more suited to electronics type loads.
As you mention the challenge distributing 5VDC power through the house is voltage drop.  The answer to voltage drop is using a big wire.  You can keep the voltage within 1 volt (20% drop) at 5 amps, up to 100' by using 10 gauge wire.  That's a big expensive wire.
The more you look at the challenges involved doing automation with the Arduino, Raspberry Pi, etc., the more you appreciate the design of PLCs, commercial building controls, and home automation systems.
Comment: what you mean by "more suited to electronic type loads"? I use solid state relays to perform AC switching.

Home Automation


Buying a used car jack

Question: I'm planning on buy a used 2 ton car jack.
What are some warnings/items I should be on the look out for?
Is buying a used car jack a safe idea?
Answer: I'm assuming you are saying you are going to purchase a used "hydraulic" jack? If so, the main thing to look out for is if it is leaking or not. If it's a scissor style jack, ensure smooth operation. Test out the jack to ensure it works, such as does it smoothly jack your car up? Does it smoothly let your car down? Make sure YOU know how to use it. A used jack is like any other piece of equipment. If it is used and maintained correctly, it can last a lifetime.
As a safety item, remember to use wheel chocks when jacking your vehicle. Use jack stands to support your vehicle if you plan to go under the vehicle. A jack can fail a lot easier than a properly positioned jack stand, and as long as it is never over burdened (too much weight on it), a jack stand will continuously hold a vehicle up in the air without issue.
Answer: A trolley jack is used to raise the vehicle which involves a heavy weight. So trolley jacks should be maintained and serviced on a regular basis. Any damage that is caused during its use should be professional repaired, including the ram. A full history of the jack is necessary for an insurance company to cover any indemnity of its use in a garage. A new jack would not cost that much more than a used one in a good state of repair, and comes without the baggage of a 'used' jack. If you are offered a 'cheap' used jack you really have to ask yourself why.

Buying a used car jack


Does net with ReLU not learn when output < 0?

Question: The derivative of ReLU is 0 if its output is lower than 0 -  $d ReLU(x)/dReLU$ is $0$ if $x < 0$. Let's denote some net's output by $Out$, so if this net's last layer is ReLU then we get that $dOut/dReLU$ is $0$ if $Out < 0$. Subsequently, for every parameter $p$ in the net we would get that $dOut/dp$ is $0$. Does that mean that for every sample $x$ such that $Out(x) < 0$ the net doesn't learn at all from that sample since the derivative for each parameter is $0$?
Comment: I have never seen the ReLU being used as the activation function of the last layer.
Answer: There is no benefit to using ReLU as the output activation of a neural network. As you said, the network will ignore training labels below zero and it will train on labels above zero as if no output activation were present. However, the problem you're describing can also occur for individual units of hidden layers, where ReLU activations are common. This is known as the dead ReLU problem. In practice, it is rarely a problem but it can be avoided with smooth rectifiers like ELU and Swish. Another interesting ideas is CRelu, which concatenates both positive and negative parts of the pre-activation, resulting in twice as many outputs, half of which always receive a non-zero gradient.


Soldering iron melting plastic switch

Question: I have difficulty connecting smaller plastic rocker switches. With these switches the metal contacts can be pretty small, so it is not like you can attach a big heat sink in there. When I go to solder wires onto the switch, if I get the whole system (connector and wire) hot enough to melt solder, then the switch melts. In one case I was soldering and the contact just came right out of the switch because the plastic that was holding it in melted.
Comment: Seems counter intuitive but a higher wattage iron can be better. Heats it up in less time so you can get in and out fast.
Comment: Some cheap switches are made VERY cheaply. Buy a high quality Name Brand switch instead of a cheap one.
Comment: Is your soldering iron temperature-controlled? What is the exact provenance of said switches?
Comment: You might be able to use a small hemostat clamped on the terminal close to the switch body to provide an adequate heat sink. Also pre-tin both the wire (it should be a thin gauge), and the terminal, then let them cool before adding a bit of flux and soldering. And perhaps use low temperature solder.
Answer:
Apply a small amount of solder to the clean soldering iron tip. This aids thermal transfer. You will see this mentioned in all guides on "how to solder" (if you don't see it mentioned, find another guide).

Tin the wire you are going to connect. Go "ouch! ouch!" and remember to use something to hold the wire (a small vice is handy) so that you don't burn your fingers next time.

Apply a small amount of solder to the clean (yes, you may need to clean it again: get used to doing that frequently) soldering iron tip.

Place the wire on the connector on the switch.

Apply the soldering iron so that it touches both at the same time.

Wait one (1) second at most and then feed the solder into the gap between the soldering iron and the parts to be connected. If the solder does not melt straight away, remove the iron and peer at where you tried to apply it—maybe the angle wasn't quite right.

Remove the solder. Remove the soldering iron.

Inspect the joint when it has cooled down (say, 20 seconds for larger items). It should be shiny and with not-too-much, not-too-little solder. There must be no pointy bits hanging off it or shorts to other parts.

Cleaning For cleaning the soldering iron tip, I have found that the curly brass sponge stuff is better than a wet sponge: the latter cools the tip down too much all of a sudden and tends to leave dross on the tip.
Temperature If the solder on the tip of the iron looks "off" (becomes coloured or matte) really soon after applying it, then your soldering iron is too hot. If solder doesn't melt as soon as you apply it to the tip, the soldering iron is not hot enough.
Solder Solder with lead-containing solder with flux in it (e.g. multicore 60/40) is easier to use than lead-free solder. Do not use solder or flux intended for plumbing—they will destroy things.
Cleanliness A good solder joint needs the surfaces to be soldered to be clean. You can get flux pens which dispense a small amount of flux when you apply them to the surfaces to be soldered. This is in addition the the flux which is in the solder. Flux chemically cleans the surfaces. It is generally a nuisance to remove afterwards, but you really should.
Fumes The flux will give off fumes. You don't want to breathe them in or get them in your eyes as you will get a sore throat and eyes. Arrange for some sort of ventilation that keeps the fumes away from you.
Cleaning II I may not have mentioned cleanliness enough, so if the tip becomes blackened and won't take solder any more, you can use something called tip tinner, which typically comes in a small round tin. One tin will last you ages. Don't use a file or abrasive to get the dross off because that will remove the protective coating on the tip: copper dissolves in molten solder.
Comment: A very well written guide to soldering.
Answer: It should be possible to use a brush-on flux to improve wetting get fast reflow to the surface.  By heating the wire and feeding solder to it only, it should flow to the terminal quickly.  This may require a wider tip to maintain a more constant temperature or a regulated heater tip iron.
I would expect with flux pre-applied to both surfaces and resin-core solder the solder time should be < 5 sec and preferably 3sec with an adequate power tip.
I known that 5m LED steel leads have a heat velocity of about 1mm/s and thus 3 second latency with 3 sec. solder times at 3mm below the base of the LED will just reach the epoxy. If you hold it any longer the low-temp clear epoxy will ooze around the leads and damage can occur.
Using this experience I can appreciate your challenge.
Without doing further research I would suggest with the proper tools and technique it should perform well in less than 5 seconds.
Another method
Pre-solder-tin the wire around the shank of the insulation and the edge of the terminal.  Then insert, twist and squeeze.  This also improves the stranded wire rigidity with solder in the shank.  By the time the solder melts it makes contact with a small gap to the terminal, reflows with wire solder feed, then you remove it quickly.

Soldering iron melting plastic switch


how to implement an on_revoked event in celery

Question: I have a task that retries often, and I would like a way for it to cleanup if it is revoked while it is in the retry state. It seems like there are a few options for doing this, and I'm wondering what the most acceptable/cleanest would be. Here's what I've thought of so far:

Custom Camera that picks up revoked tasks and calls on_revoked
Custom Event Consumer that knows to process on_revoked on tasks that get revoked
Using AbortableTasks and using abort instead of revoke (I'd really like to avoid this)

Are there any other options that I am missing?
Answer: Use AbortableTask as a template and create a RevokableTask class to your specification.


What is the fastest way to get a Ethereum wallet client up and running?

Question: I usually run my coin wallets in a ubuntu virtual box for the fear of malware or trojans embedded into wallet clients. Coming from a vanilla ubuntu 14 install, what is the fastest way to get an ethereum wallet client up and running where I can check my balance and do other actions? A gui would be nice.
Answer: The easiest and most trustworthy wallet is the official Mist wallet. It is still in beta, but it allows you to manage accounts, interact with contracts, and buy more ether (via shapeshift).
Simply download the release for your distribution and extract the binaries.


Under what conditions do tomatoes grow best?

Question: Our garden is in partial shade, and I am wondering how much sun tomatoes need to grow best?
Answer: They seem to need between 6 and 10 hours of direct sun to grow best, depending on the growth stage they are at.
See here (and many other sites seem to be in agreement on my cursory survey) for details.


ASP.NET MVC AJAX with jQuery

Question: I have a site where each user's page shows comments and allows other user's to add comments. I want to have it so the add comments form is on the page and when a user adds a comment, it is added to the database and shows up in the comment section with AJAX. I am using jQuery for the AJAX and LINQ to SQL to handle the database logic. How would go about doing this so that after the comment is added to the database, the comments section is refreshed and updated without refreshing the page?
Answer: You would need to take advantage of the 'success' (or 'complete') event that is fired by the jQuery ajax call to fire a subsequent AJAX call for refreshing the content of your reviews.  This would probably look something like (winged it, untested):
<code>function UpdateComments(){
    resultHTML = jQuery.ajax({
        type: 'GET',
        url: 'Comments/List/UserID'
    }).responseText;

    $('#comments').html(resultHTML);
}

function PostComment(targetUserID, commenterUserID, comment)
jQuery.ajax({
        type: 'POST',
        contentType: 'application/json; charset=utf-8',
        data: $.toJSON({review: comment, id:targetUserID, commenter:commenterUserID}),
        dataType: 'json',
        url: 'Comments/Add',
        success: function(result){
            // Only update comments if the post was successful:
            resultJson = $.evalJSON(result);
            if(resultJson['success'] == true){
                UpdateComments();
            }
        }
    });
</code>
EDIT The JSON code would make use of the jquery plugin jquery-json (http://code.google.com/p/jquery-json/)
Comment: the url should be:  '/Comments/Add' ... otherwise the url gets appended to the current url and you will most likely get a 404.
Comment: In fact, it is probably better to use one of the MVC helpers to actually generate the path, because the leading / will also throw things off if your site is operating as a nested application under another website in IIS
Answer: In response to Matt, another way to submit the form data is, instead of the JSON, you could call $('#form').serialize() in the 'data' field of the jQuery.ajax function. This would eliminate the need for a plugin.
Also, I'm not an expert on this subject, still trying to learn it myself, but is it necessary to have both a POST and GET request when you could insert the response from ASP.NET MVC into the page instead? This would result in one request. There might be a valid reason for that approach though. I guess mine would look like this:
<code>    // The Controller Action should return a PartialView as response,
    // so just a user control that contains the comments.
function PostComment(targetUserID, commenterUserID, comment)
jQuery.ajax({
    type: 'POST',
    data: $('#commentForm').serialize(),
    url: 'Comments/Add',
    success: function(result){
        $('#comments').html(result);

        }
    }
    });
</code>
Comment: Hi Julian - that is a very good point RE: combining the new comment results into the POST response.  I suppose it boils down to how much of a RESTful crud purist you are.  Personally, I'd combine it into the response, to save the round-trip, even though some purists might argue otherwise.

ASP.NET MVC AJAX with jQuery


How to perform method immediately when/before device screen turns off due to inactivity?

Question: I'd like to perform some methods before my app closes due to user inactivity (i.e., the screen going black and the phone locking when you haven't touched it for a while). What method(s) is/are called when this happens?
I'm guessing:

This method / these methods would be part of my AppDelegate class.
This method / these methods would be analogous to -[UIAppDelegate applicationWillResignActive:], -[UIAppDelegate applicationDidEnterBackground:], -[UIAppDelegate willTerminate:].

I didn't see anything in the documentation for UIApplicationDelegate regarding methods or practices for triggering methods when the screen turns off. Likewise, Googling terms such as "method inactivity app screen off objective c" also didn't turn anything up.
In a prior incarnation of this question (What method is called before the screen goes black after inactivity?), multiple people directed me towards the following Stack Overflow post as a possible duplicate: iPhone: Detecting user inactivity/idle time since last screen touch. However, I do believe my question is very different:

My question: Is there a built-in method in Objective-C akin to -[UIAppDelegate applicationWillResignActive:] et al. that is called or property that is changed when the screen turns black after a period of inactivity while an app is still open? If not, how can I go about implementing a similar logic without such a method?
Other user's question: How can I trigger a method after a predetermined period of user inactivity, regardless of screen state?

I could see how the other question could answer my question if there is a method for obtaining the length of time the user has set for "Auto-Lock" under Settings (either 1 min, 2 min, 3 min, 4 min, 5 min, or Never), but I don't see such a method or property in the documentation for UIApplication. I suppose a compromise would be to check if the app is still running every 1 minute of inactivity, with the hypothesis/assumption that this loop will cease executing when the screen turns off, but this to me would seem to be a less-than-optimal solution.
The reason I am asking this question is because I am looking to keep track of when my user is using my app and for how long. I'm creating a very basic Core Data database of sessions that includes when a session begins and when it ends. Since I haven't found a way to determine when the screen goes black due to user inactivity, my data is currently inaccurate.
Answer: There is a 'UIApplicationDidEnterBackgroundNotification' notification that you can listen to to know when you're app is entering the background. You can register as follows and handle it in the selector that you indicate here:
[[NSNotificationCenter defaultCenter] addObserver:someObject
                                         selector:@selector(someMethodName:)
                                             name:@"UIApplicationDidEnterBackgroundNotification" object:nil];

Similarly you can listen to the 'UIApplicationDidEnterForegroundNotification' to know when your app is back in foreground.
Answer: As far as I know, when your device is locked, your app is handled the exact same way as if it was paused and sent to the inactive background apps.  I feel this is simple state preservation/restoration issue (so timers won't be necessary).  Check the link below about states: Apple's Guide on states


How can I find out what the printed numbers mean on the back of an older photo?

Question: I have a color photo from Crete, Greece. Maybe around the 1960's? The size of the photo is 4-1/2" x 3-1/8".
There is no border around the front. On the back, there are no printers logos. The only thing there is a long number that is printed almost the full width (about 2-3/8" across): 034020540. With a spaces between each number. And before the first number, 0, there is some kind of rectangle printing mark.
I also have other photos that are black and white that have similar long numbers in the back.
How can these be dated closely?
Thank you.
Answer: The photofinishing industry begun automating film developing and printing starting well before 1940's. Worldwide, these were not mini-labs, they were regional labs located in principal cities. By 1960 this industry utilized assembly line procedures.
Customers took their film to drugstores and camera shops for developing. Clerks accepted films and placed one roll in an induvial empty bag. Clerks wrote the customer's name and filled out pre-printed instructions on each bag. instructions were, number of prints from each negative and desired print size etc.  Each such location was assigned a location number and a delivery route number.
When the bag arrived at the lab, a numbered adhesive label was affixed to the bag. Each label had a duplicate with the same unique number (twin check system). The bag with its roll was sorted as to which developing machine room was appreciate. In total darkness, a machine operator unrolled the film and affixed the matching twin check to each. The film was then developed and emerged from the machine and matched to its bag via its unique number.
The bag and now developed roll of negatives was sent to a printing room. The film was manually threaded into a printing gate and a mechanical counter was dialed so that it displayed the unique twin check number. During the printing operation, a mechanical rubber stamp printing this number on the back of each print as it was exposed by the machine.
The now exposed print paper, in one long roll, perhaps 500 or 1000 feet long arrived at an assembly station. The prints were semiautomatically cut to size. The roll of film was also cut semiautomatically cut into strips, Prints, film and bag were thus matched by the assembly station operator. The bag with its now developed film and printer pictures was sent back to camera store or drugstore via a route driver.
Bottomed line number on the back of the print is the twin check number and not a date. In that era, if a date was printed, it was photographically applied in the margin of the print, exposed as the image was printed. This is a large number because a regional lab handled thousands of rolls per day.
Answer: You probably can't, unless you can contact the shop that originally developed the photos. And that is highly unlikely these days, as most shops that used to develop film or sent it out for development no longer do so, if those locations are even open.
The number on the back of the print is likely a serial number or counter of some sort, perhaps with some more information encoded in some of the digits. But unless you know the brand of developing equipment, or at least some information about who provided the service, you're probably out of luck.
Comment: In 1969 the brand of developing equipment was probably immaterial. (Most likely the film was manually developed and manually enlarged -  the age of automated minilabs was in the not-to-distant future, but there weren't many, if any, around in 1969).The numbers at that time were almost certainly added using a separate device.


ArcGIS legend columns

Question: I am making a legend in ArcGIS 10, and have a few layers with a large number of classes. When I try to display the legend with two columns for that layer, the second layer always lines up with the heading/layer name. This doesn't look proper, and I want the first item in each column to line up with each other. I have used a few work-arounds, like splitting the legend, or converting to graphics and manually adjusting.
Is there a place in the legend properties where this can be done?
Answer: I don't know of any such work-around, though I agree there should be.  However, another option for a work-around, if you only have the one layer in the legend, is to go into the legend properties and turn off the layer name in the legend options (Legend Properties > Items Tab > right click on layer > Properties> General Tab > Uncheck "Show Layer Name") and then go in and make the legend's title the layer name (instead of "Legend").
Not ideal, but it's another work-around I've used that may help.
Comment: I've used that method as well, but have additional layers in the legend as well, which led to making additional text elements for a new title anyway
Answer: You could also try controlling a legend layout containing layers with many classes by creating copies of the layer that have limited classes. For example, only symbolize Classes 1-5 in Layer X. Then make a copy of Layer X and symbolize Classes 6-10.  This can make it easier to manage the legend layout while keeping the legend items linked to the map; instead of converting to graphics.
Answer: After some random right-clicking, I figured out a work-around that is probably the best option for this issue. adding additional headings in the symbology tab by right clicking a legend item, you can add multiple titles. Placing a new heading into a split column legend item will have the headings line up, as well as the first legend item in each column.

ArcGIS legend columns


Blender 2.8 add object dialog disabled

Question: I'm using Blender for a couple of years now, and I recently installed Blender 2.8. I want to add a circle of 6 vertices, but when I add a circle, the 'Add Circle' dialog is disabled (screenshot below), and I can't change anything. This happens with every object I add to the scene. I haven't experienced anything like this in previous editions of Blender, and I can't find any setting to enable it. I've tried to restart Blender, and even reinstall it, but that didn't help. Is there any setting I'm missing that might be causing this?
Comment: Yes, thanks! Global Undo was unchecked. For anyone reading this in the future: this "Global Undo" setting isn't under the "Editing" tab like in 2.79 anymore, it has moved to the "System" tab.
Comment: Similar issue? https://blender.stackexchange.com/questions/38917/added-objects-properties-greyed-out?rq=1
Comment: ? I may be missing something, but the Circle dialog box is there in the lower left corner.  If you click the grey box with 32 in it, turn it black and delete the entry and retype it to "6" and hit enter, your circle should have 6 vertices.
Comment: No, that's just it, it seems disabled somehow. When I try to click anything in there, I just deselect the circle, as if the dialog wouldn't even be there. Also, it's displayed darker than normal. (compare the text in the dialog with the text in the timeline window below)
Comment: Have you tried to download and install a different iteration of  Blender 2.80?  It is still a beta and may not be entirely stable.  2.80 is being updated continually.  It could be worth a shot?
Comment: I've just installed the latest version of Blender 2.8 (2.80.55), still the same problem. Is there a way to get previous beta builds of Blender 2.8?
Comment: load factory settings should help
Answer: I had the same issue, you need to go Edit->Preferences->System and then add the check to Global Undo

Blender 2.8 add object dialog disabled


What determines whether you are familiar or not with a device?

Question: The Heretek background gets the Master of Hidden Lores bonus which states you get a +20 for Tech-Use tests to comprehend, repair, use, or modify an unfamiliar device if I have a relevant Forbidden Lore skill at Rank 1 (Known) or higher.  Is there anything stating whether you're familiar or not, or is it all up to the GM and circumstances in this case?  RAW, errata, and dev comments are all welcome. If none of those are available, a widely accepted ruling might be a useful foundation to stand upon when discussing this with my GM.
Answer: There is no errata or dev comments that I have been able to find, no mention in the FAQ's and I'm not sure a RAW/RAI reading even applies. Using this background bonus has to be a discussion between the player(s) and the GM on a case by case basis since it can easily be abused by a powergamer.
Let's take an examples:
You have Forbidden lore "Craftworld Eldar", your team has somehow gotten stuck on a derelict eldar cruiser overrun by some other Xenos species and you are trying to escape. In such a situation you would get your Master of Hidden Lores +20 bonus to do just about anything tech related onboard.....IF and ONLY IF you unfamiliar with the item.
Have you done it before you don't get the +20 (before as in earlier in your career, not as in "you just opened a bulkhead door, now all the rest are +0").
Think of it a bit like you obsess over new things to such an extent that you "just have to make it work", and once the initial high of trying new tech then it seems boring and useless and not worth the effort to work with - so normal stats apply.
Comment: I'm not sure I'm reading your answer correctly, as that doesn't seem to make any sense. Surely, once you are familiar with something, you no longer have to roll to do it, so the lack of the +20 bonus doesn't make any difference.
Answer: @Popperlicious gave a good answer here with regards to the example of a Heretek with Forbidden Knowledge (Craftworld Eldar) getting the +20 bonus to Tech-Use to go activate an unfamiliar device on an Eldar ship.
Here's the text from Dark Heresy 2e - Enemies Without page 32:

Background Bonus
Master of Hidden Lores: When a Heretek makes a Tech-Use test to comprehend, use, repair, or modify an unfamiliar device, he gains a +20 bonus if he has one or more  relevant Forbidden Lore skill specialisations at  Rank 1 (Known) or higher.

I figure whenever any character is taking a Tech-Use test to "comprehend, use, repair, or modify an unfamiliar device," they'll have some sort of penalty for it being unfamiliar. Based on the fact that the bonus comes from having an associated Forbidden Lore, it makes sense that the device would be esoteric or alien to the layman by definition.
Rather than construing this bonus as representative of a Heretek's drive to and obsession of learning new things causing them to spontaneously solve a novel problem, I'd say that to me it represents a Heretek having historic, forbidden knowledge of a topic and being able to at the very least tangentially relate it to the current situation enough to get a bonus - in essence, their worst case educated guess is still pretty good because they've seen it once or twice before and possibly studied it.
And of course if the Heretek passes the test to "comprehend, use, repair, or modify an unfamiliar device," then I'd say it's no longer unfamiliar after that, eh?
Comment: This has come up a few times in my current DH2e campaign where the Player of the Feral Heretek Mystic tries to figure out how everything works, since almost everything is hilariously unfamiliar to him.


How to convert gas price in GWEI to USD or ETH?

Question: I'm using Etherscan Gas Fee API to get current gas fees in GWEI. It can only return gas fee in GWEI and I tried to find online but can't find an answer on how to convert the Fee from GWEI to ETH or to USD. How can I do that?
Answer: From ethereum.org docs -

Gas prices are denoted in gwei, which itself is a denomination of ETH - each gwei is equal to 0.000000001 ETH

You can use the above to manually convert prices from gwei to ETH.
Additionally, can use any trusted source such as the Etherscan API to find the latest ETH-USD price.
Comment: I tried it but that doesn't gives the current gas fee either in ETH or USD. For example, current gas fee on etherscan is 33 GWEI, if I used the above method, I get 0.00009063351 USD. But actually current network fees is 1.84 USD, so I guess I'm missing something here:/
Answer: I can't comment on previous answer so I will just write here.
the 33 gwei value that your are getting is 'per gas' . so you need to multiply this value by the amount of gas your transaction will consume.
A basic ethereum transfer is 21 000 gas.
so : 21000 * 0.00009063351 = 1.9 usd approximately


How to make 2 functions work at the same time?

Question: I am trying to make an internet speedtest app using Python and Kivy, The function that gives the internet speed needs about 30 seconds to work
So in the GUI the program stops until the function return the internet speed
How can i make a loading bar that loads while the speed test function is working ?
And can I make the function print its live results in the gui with kivy?
I searched for multithreading but I am not sure about how to use it ?
Answer: In your case I would simply start the internet speed function in another thread so GUI will not hang.
import threading

thread = threading.Thread(target=your_function, args=(function_arguments,))
thread.start()

Edit
In your case I guess you can do this
from multiprocessing.pool import ThreadPool
...
class Seventh(Widget):
    def on_button_click(self):
       self.count += 1
       self.my_var = str(self.count)
       pool = ThreadPool(1)
       async_res = pool.apply_async(self.speed.download)
       self.d = str(get_size(async_res.get()))
       print(self.d)

Comment: how can I apply to this code
I will edit the post and add the code so may you check it !


How to do custom search functionality in job manager plugin?

Question: I have used job manager plugin in wordpress.
And my client want search functionality in admin section to search jobs.
whatever jobs added we save in wp_posts table.
below is the code
<code>  $jobs = get_posts('post_type=jobman_job&numberposts=-1&post_status=publish,draft,future' );
</code>
in above code i want add <code>$post_title = $_POST['searchtext']</code>.
then how to add in existing code ?
Answer: take a look at this:
http://codex.wordpress.org/Class_Reference/WP_Query#Post_.26_Page_Parameters


Does a potentiometer need a resistor in series between power and ground?

Question: I have a potentiometer I use with a circuit to get data readings. This circuit is connected to an arduino mega 2560. I was wondering if I need a resistor in series with the potentiometer? Attached are two picture of what I mean, sorry if the circuits are a bit rough first time I have used an online schematic maker. I would also like to add that the potentiometer values are likely wrong, it was a generic one a friend gave me. All I know is that it goes from 5 ohm to 10k ohm.
Answer: First, a couple of CircuitLab tips. Double-click a component to edit its properties. 'R' = rotate, 'H' = horizontal flip. 'V' = vertical flip. Note that when you use the CircuitLab button on the editor toolbar an editable schematic is saved in your post. That makes it easy for us to copy and edit in our answers. You don't need a CircuitLab account, no screengrabs, no image uploads, no background grid.
The important thing is that your potentiometer circuit shares the same ground as your microcontroller. If you leave out the ground connection then you have an open circuit and no current can flow from the potentiometer to the micro.

simulate this circuit – Schematic created using CircuitLab
Figure 1. Both circuits share a common ground with the microcontroller.
There is a difference between the two circuits.

The wiper on Figure 1a can go from 0 V at the bottom to 5 V at the top.
The wiper on Figure 1b can go from 0 V at the bottom to 5/4 V (1.25 V) at the top because R1 and R3 form a potential divider with the maximum voltage give by \$ \frac {R3}{R1 + R3} V_2 \$.

If your micro's analog input is 0 to 5 V then (a) uses the full scale (typically 1024 counts on a 10-bit ADC). (b) would give a maximum of 1024/4 = 256 counts for 1.25 V.
Comment: Thank you for your help, I do have a shared ground just didn't know how to draw it online. I'll keep your advice in mind for any future questions.
Answer: No, the wiper pin is the part of the pot which "sees" a different resistance based on its position. There will always be the max resistance between power and ground pins on the potentiometer.
Answer: No, you don't need a resistor between the positive side of the potentiometer and the power, assuming that it's the same voltage level as the arduino runs on.
But, taking your circuits litterally, note that you do need a ground connection between the battery/potentiometer and the arduino.
Comment: The arduino provides both the power and the ground I just did a bad job of drawing out the circuit.


Is it still consider Fraud if it is GIVEN for free?

Question: The definition of Fraud is " Wongful or criminal deception intended to result in financial or personal gain." So, let's say I made, I don't know, 3d printed an almost copy of a Nintindo Switch, that looks almost identical. Let's say I gave it to someone saying that this was indeed a real Nintindo Switch. Would that be illegal? Or would there be different situations where it wouldn't be? (Also I'm mainly asking about in United States, but would like yo know about other countries laws)
Comment: "Is it fraud?" and "Is it illegal?" are different questions.
Comment: You would still be giving it for some sort of _personal gain_, right? Even if not monetary.
Answer: The elements of fraud (for Washington state) are clearly present, except for the part about doing this in order to induce another person to act, which results in damage to the person. Since in the US fraud is primarily a state matter, we'd have to do a state-by-state study, but "intended to result in financial or personal gain" is not the universal definition. The same goes for California and Ohio. I don't know of any jurisdiction where "financial or personal gain" is a required element. There are some ways I can think of that the recipient could be harmed by thinking that the thing was real. If this was just a prank and the prank was revealed before real damage was done (e.g. he tried to sell it), then it would not be fraud.


Is mixing shellac from flakes generally considered more cost effective than buy commercial stuff?

Question: I know it depends on the market I am buying in and the cost of the various components. I've made a few items from mdf with shellac finish lately and I really like the way it works (clothes storage in a basement) and I want to make more. I figure I have enough projects to warrant two gallons of shellac and at $45 a gallon I want to explore mixing my own. But is diy mixing beneficial more because of the quality and customizability of the product rather than cost savings? Like, if I just want to save money should I just buy the premixed bc there's not really savings?
Answer: The flakes have a much longer shelf life than mixed shellac, somewhere on the order of 3 years vs 6 months depending on environmental conditions. That makes the flakes a better value if you can't use an entire can at once. I suspect you won't find much of a price difference. The harvest is really the largest factor in pricing.
You are correct about the customizability. Flakes can be bought in a variety of hues, where as the canned is likely blonde. Being able to precisely control the cut is nice when it comes specialty uses such as refinishing and French polishing. (You know, in case you want to seal away tobacco odors or get a piano-like finish. Or refinish a piano played by a heavy smoker.)


Updating images dynamically from URL with Android

Question: So I have this program that grabs the RSS feed at http://www.muttville.org/mutts/feed and displays a list of the available dogs, basically filling out each item in a ListView with an image of the dog on the left, and the headline about the dog on the right.
My application executes and grabs and parses the XML feed fine. onCreate, it stores the image URL as a string in each item. I have an RSSFeed data structure, which is basically an array of RSSItem objects. The problem is figuring out how to update the images asynchronously.
I have an imageDownloader that I actually got from the Android dev blog at Google that updates the images and stores them, but the preload is very long. I'd rather begin displaying the items immediately and updating the images as I get them. Annoyingly, the listview scrolls really unresponsively at first as well, calling my imageDownloader to retrieve the items again. Is there some way I can make the ImageViews just grab a pointer to an ImageView object in the RSSItem, and then just update that?
I'm pretty new to Android development, so there's a good chance I don't realize something basic. Here's my adapter code:
private class FeedItemAdapter extends ArrayAdapter {
<code>    private List<RSSItem> items;

    public FeedItemAdapter(Context context, int textViewResourceId, List<RSSItem> items) {
        super(context, textViewResourceId, items);
            this.items = items;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
            View v = convertView;
            if (v == null) {
                LayoutInflater vi =
                    (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
                v = vi.inflate(R.layout.displayitem, null);
            }

            RSSItem o = items.get(position);
            if (o != null) {
                    ImageView tt = (ImageView) v.findViewById(R.id.leftimage);
                    TextView bt = (TextView) v.findViewById(R.id.righttext);
                    if (tt != null) {
                        //get image from url string
                        imageDownloader.download(o.getImageString(), tt);
                    }
                    if(bt != null){
                          bt.setText(feed.getItem(position).getTitle());
                    }
            }
            return v;
    }

}
</code>
Answer: Create a new class that inherits ImageView, show a 'pending' image by default, and have a function that begins loading from the network in another thread. When it's complete, update the image.


Best way to reattach rubber stripping around windshield

Question: The rubber stripping around windshield has came loose some of passenger side of 2008 Ford F-150. It has come loose on top only and roughly a couple foot area. It can be pushed back in place but comes back loose after driving. Windshield was replaced roughly 5 years ago.  In pic, it had already been pushed down into slot.What is best way ( adhesive) to keep in place?
Comment: Who replaced the windshield? Most places like Safelite have a lifetime warranty on their installs. You might want to check.
Comment: It was a local company. I don't remember the name, so I'd have to check my records. Hopefully, they are still in business.
Answer: Any automotive windshield shop can reattach the strip.  My local shop fixed one on one of my cars and did not charge.  It took them less than 5 minutes.  While it was being done, I ran next door and bought them donuts.
There are sealants and there are adhesives, and they will know which to use.  Window mounting systems vary.  You likely need an adhesive, and the material will need to be cleaned just prior to application.
On a similar note, many exterior rear view mirrors are held on with urethane adhesives.  Again, visiting the people who have a urethane applicator, and not having to get large tubes for a small job, makes lots of sense.  Again the local shop does them as a courtesy, and in 30 or 40 years I have never paid for a external mirror reattachment.


Install rJava package on AWS EC2 instance

Question: I am using R on AWS EC2 instance.
I am trying to send a mail using the "mailR" package.
I was told that to install the package I should previously install the package "rJava" as "mailR" depends on it.
When trying to install "rJava" I get this error:

gcc: error: libgomp.spec: No such file or directory

After a quick search, I saw a post on this link explaining this:

"You have to make sure your GCC has OpenMP support enabled.
  Make sure you select OpenMP from the optional packages when installing."

I really have no idea how to do this.
Should it be something to add in the parameters of install.packages("rJava")?
Assistance much appreciated !
M.
Comment: It's complaining about a missing system file, not a missing R package. You need to fix or enhance your GCC and OpenMP installation.
Answer: Found the solution here
I did install gcc but apparently we should not install the latest version, so as suggested in the linked post, I downloaded version 4 and it worked.
You do that by typing in Putty:
<code>sudo yum install gcc-4.8.5
</code>
Thanks !


How to redirect all MediaWiki red links to a single URL

Question: I would like to redirect all links to non-existing wiki pages to another single URL outside of my MediaWiki instance.  I'd like to avoid writing my own extension for this; i.e., there should be a way to do this with a simple configuration, yet the documentation doesn't really say.
Comment: You may not need to write a full-blown extension, but I'm pretty sure you do need to write a MediaWiki hook to do this.
Comment: Do you want to redirect the links at `Special:WantedPages`, or all "red" links, on any page?
Comment: All "red" links on any wiki page.
Answer: I am not aware of a config option for this, but you can use the LinkEnd hook and check for the "broken" option:
$wgHooks['LinkEnd'][] = function( $dummy, Title $target, array $options, &$html, array &$attribs, &$ret )
{
    if( in_array( 'broken', $options ) ) $attribs['href'] = 'http://yourlinkhere';
    return true;
};

This can be placed in LocalSettings.php directly without having to edit any other files.
Answer: I don't think this is possible out of the box with MediaWiki, but you could of course just include a bit of javascript that intercepts clicks on redlinks:
$('a.new').click(function(e) {
    e.preventDefault();
    window.location.href = 'http://www.example.com';
});

MediaWiki comes with jQuery by default, so this should work without any further changes.
Answer: This is an old question but I was able to accomplish by doing the following (MediaWiki 1.28):

set up a new template e.g. "Template:Preload"
install "MultiBoilerplate" extension https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:MultiBoilerplate
for "MultiBoilerplate" extension, add dropdown to new page with option to load template "Template:Preload" in LocalSettings.php:

$wgMultiBoilerplateOptions[ "New page template" ] = "Template:Preload";

in LocalSettings.php, add the following code which checks if a link is to a new page, and adds the querystring parameter to default to the template above:

# if a link is to create a new page, add querystring parameter to pre-populate with template
$wgHooks["HtmlPageLinkRendererBegin"][] = function( $dummy, $target, &$html, &$customAttribs, &$query, &$options, &$ret ) {
  # if the target does not exist
  $exists = $target -> exists();
  if ( !$exists ) {
    # add querystring parameter to set template, which will pre-populate empty new page
    $query["boilerplate"] = "Template:Preload";
  }
  return true;
};
Adapted from https://www.mediawiki.org/wiki/Manual:Hooks/LinkBegin


How to Join two Entities and Get Unique Rows from One

Question: I have 2 entities A and B, each one has a field Number, I need to get all rows from entity A where the Number does not exist in B.
Any ideas? Does it need a join?
Comment: Post some code here to give you an idea..
Answer: Will that do the trick ?
  var result = entityA.Where(a => !entityB.Any(b => a.Number == b.Number))

Answer: very crude, but you can do it without a join like this
var listB = b.Select(o => o.Number).Distinct();

var result = a.Where(o => !listB.Contains(o.Number));

Comment: actually... i like Joanna's answer
Answer: As you are not giving very much information it's hard to tell. But maybe you could do something like this:
public class TestEntity
{
    public int Number { get; set; }
    public TestEntity(int num)
    {
        Number = num;
    }
}

public void WriteResult()
{
    List<TestEntity> lstA = new List<TestEntity>();
    List<TestEntity> lstB = new List<TestEntity>();
    for (int i = 0; i < 10; i++)
    {
         lstA.Add(new TestEntity(i));
         lstB.Add(new TestEntity(i+4));
    }

    List<TestEntity> result = lstA.FindAll(teA => !lstB.Any(teB => teA.Number == teB.Number)); //This will give you all entities in lstA that does not have any equals in lstB
    foreach (var item in result)
    {
         Console.WriteLine(item.Number);
    }
}


Does moving webAuthn API from browser to OS improves security of registration process?

Question: Usually, for all types of authentications, we trust the registration process and assume there is no attack is happening Like in the case of FIDO2 registration. However, as the registration process is built within the browser and can be compromised by a chrome extension it is an unrealistic assumption. Google's research shows that 1 out of 10 extensions that they publish is malicious and passes their filters. So, it's pretty straightforward for them to compromise the registration process and get the capability to access the user account for a longer duration from any machine.
The attacker is able to do this because the registration process is built within the browser.
I think if we move the FIDO2 registration process in OS, we lessen the attack vector and the browser-related attacks cannot compromise a registration process, which makes the assumption of Trust during registration realistic. Is there any security or usability issue if we move the registration process to OS? The website initiates a call to a standalone application which communicates to the webserver and FIDO2 authenticator directly in the background and returns the session key after a successful registration.
Answer: I don't think that there is a security advantage and I'm not even clear how to move this process into the OS kernel in the first place. The kernel is about protecting local resources from each other, like making sure that one process cannot access memory from other processes. It has no idea about user space logic.
That does not mean though, that one cannot make use of the kernel features for better user space security. This is actually done with techniques like privilege separation, where parts of the application with different security requirements are separated from each other through different processes, sandboxes, users, containers etc. For example one process might process  untrusted user input while not allowing any local file access, while another can do local file access but will not directly process user input. Both processes can then interact with each other through some clearly defined minimal API.
On top of that in case of WebAuthn, Smartcards etc yet another separation gets added: secret keys are kept away from the normal processing on a different hardware and one can only do cryptographic operations with these keys (like signing) but not have access to the secrets itself, neither from a user process nor from the kernel.


good voice syntheses for linux

Question: is there any nice free voice syntheses software with a quality close to this At&t project http://www.research.att.com/~ttsweb/tts/demo.php  for linux beside espeak and gnuspeech (which i find unusable because of the bad quality of the result speech)
Answer: There is festival, but I can't speak to its sound quality.  It's a yum install festival away on Fedora.
Answer: i have used http://www.yakitome.com and it is really coll, and it does host your mp3 generated files, and somehow it uses the At&t speech syntheses system

good voice syntheses for linux


How do people who closed a question know it's been updated?

Question: I now realize this question  (as originally posed) is a duplicate to make-the-faq-clear-on-how-a-question-can-be-reopened. Thank you @ColeValleyGirl. I'm not sure why it didn't show up when I googled it - I got hits on other faqs (that didn't seem pertinent) but not this one. So I am modifying this question to ask that the genealogy faq have a similar faq and refers to the meta.se faq referenced.
Answer: What is the mechanism to advise that (and why) a question has been edited? is relevant -- your edited question popped up at the top of the active list. Once somebody has proposed re-opening (and I'm not sure whether you could have done this yourself) it will show up in the list of items to review for those people with the appropriate privileges.
There's also some relevant suggestions here


Krusader automatically opens newly created text files

Question: I want to disable the auto open newly created text files with the internal editor in Krusader. Always when I make a new text file in Krusader with right-click + Create new + Text file, Krusader opens it with its internal editor. I like to use gedit for my text/code files. So I always have to first close the Krusader internal editor and then double-click the file to open it again with gedit.
Answer: Krusader settings
Krusader > Settings > Configure Krusader > General -> Viewer/Editor tab and add your favorite.
Comment: Thank you. This solved my problem. I just had to type gedit in that field and any new text file created is opened with gedit. Krusader still opens it automatically at the file creation time.
Comment: Don't know why, but if I put `code` here to run VS Code, it does not launch. While it works from the terminal :(


In 2D animation, how to gradually reveal an object, while keeping the backgrount unchanged? (version 3.0.1)

Question: I am working on a simple 2D animation.
I have few "images imported as planes", among which a plane I use as a background.
Now, I would like to have an effect of gradually revealing an object, while keeping the background unchanged.
In other words, at frame zero only the background is visible; then gradually more and more parts of the object (another image imported as a plane) are revealed, e.g. from left to right.
My guess is to do it with a "mask" object, with some special property: the object I want to show is always in the same place, with no change, but the special mask slides in front of it, gradually revealing it.
I have seen this answer and then this other question/answer, but they refer to an older version of Blender, and I am too new to the software, so I wasn't able to replicate it in the version I am using.
However, I am open to other methods!
Please, give step-by-step directions, I am new to Blender. I am using version 3.0.1.
Answer: you can use this node setup, to get this kind of effect:

Note: play around by changing x/y coordinate or adding both ;)
Value has a driver init, just write "#frame" in it to get frame values.


Change Password Confirmed Email Text

Question: I've been struggling to find a hook I can use to edit the text in the password confirmed email that gets sent out when you've changed your password in WordPress.
Is there anyway to do this with a simple hook that I can add to the child themes functions?
Any help would be appreciated.
Answer: Use like this.
add_filter( 'password_change_email', 'wpse207879_change_password_mail_message', 10, 3 );
function wpse207879_change_password_mail_message( $pass_change_mail, $user, $userdata ) {
  $new_message_txt = __( 'Some text ###USERNAME### more text
      even more text ###EMAIL### more text after more text
      last bit of text ###SITENAME###' );
  $pass_change_mail[ 'message' ] = $new_message_txt;
  return $pass_change_mail;
}

Reference of the above code is:
Change Password notification text on mail
This filter is in the wp_update_user() function and is documented here.

Change Password Confirmed Email Text


Iterative Models and Stateless Environments

Question: I have an iterative simulation model that does X per timestep. What's the best way to simulate that iterative model in a stateless environment like ASP.NET?
Simulation data is in the 10 to 15 MB range.
Answer: Use the Session State, or if using WebForms, you can also use ViewState.
Or just design for statelessness.  Serve each "timestep" with all of the information necessary to advance to the next state.  Instead of thinking of the problem as one of managing state, think of it as a large form that gets passed between multiple parties and is gradually filled in by each one.


Lower Filter Driver

Question: How can I install a filter driver as lower filter driver? All samples of DDK are upper filter driver.
Is there any method except using INF file for doing this work?
I know that lower filter drivers sit under FDO and top of BDO, but if there are more that one lower filter driver, how they are ordered? Can I put my driver at a specific location of this stack?
Answer:
How can I install a filter driver as lower filter driver?

Upper and lower filter drivers are installed in much the same way - you don't actually require an INF - you can just set values in the Registry.
Of course, it depends upon which type of Filter Driver you want install, but as an example, if I want to set a lower disk class filter driver, I open up Regedit and navigate to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\{4D36E967-E325-11CE-BFC1-08002BE10318}

In here, you should see a string value called UpperFilters containing PartMgr. If you want to add a Lower Filter, simply create a LowerFilters value and set the name of your driver key to it. The GUID in the keyname is horrible, but if you scan through the Class key, you'll see lots of GUID-named keys - the default value of each one contains a brief description of what device the key represents.
Like PartMgr and all the other drivers, you will need to create your driver key under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services with all the appropriate configuration values. If you're not sure of the values for your driver, dump the entire HKLM\SYSTEM key to a file, install your driver normally, take a second dump of the entire HKLM\SYSTEM key and diff the dumps to see what values were put where.

Can I put my driver at a specific location of this stack?

Contrary to what anyone tells you otherwise, the answer is no. People sometimes believe that when multiple drivers are listed in the UpperFilters and LowerFilters registry values, the first one in this list gets loaded first. I've even witnessed this turn into "registry wars" where drivers are constantly fighting over their position in the list. It's nonsense and you should design your driver to cope with any other driver appearing above or below you.
Comment: In the past, I used to install lower/upper filters by registry API (modifying the LowerFilters/UpperFilters value). Sometimes, the changes did not survive a reboot (or existed only for some time, I don't know exactly since the problem occurred quite rarely). I think it would be best to use Setup API for this task if you do not prefer INF files.
Answer: you can a osr.com provided utility driverloader which will load you driver either upper/lower filter driver.basically it is a gui based utility in which you will all the options requiring to load the driver.
1. you can set your driver load order.
2. you can select your driver what kind you wrote.
3. no need for inf to set the registry key's it will do it for you automatically but if you       want to modify these key value you can do it manually.
4. for more information go for www.osr.com.
Enjoy :-)

Lower Filter Driver


Joomla 2.5 template assign issue

Question: i need to assign a diffrent layout for my home page, but my issue is before come to home page there is a login page with totally different layout.i made that template as "default" (Because that should be load first), after logged in comes to home page.Home page doesn't have componet area only have modules.How do i assign my 2nd template only to the home page ?
anyone has any idea how to do that ? please help me! OR any idea to accomplish my objective ?
Answer: I think you have to assign the template to the 'home' from the template menu, 'home' should be in the main menu.
All other pages should be assigned to the other template.
administrator/index.php?option=com_templates&view=style&layout=edit&id=XXX

Joomla 2.5 template assign issue


Appium iOS Safari Open new tab, accept alerts and switch between two tabs

Question: So I'm testing a web app for which I have to open a new tab, switch to it, do some input, than switch back to the first tab and this more than once.
I try to open the new tab this way:
<code>((JavascriptExecutor) AppiumTestBase.getDriver()).executeScript("window.open('http://google.com', '_blank')");
</code>
This causes the following alert to appear:

But I'm not able to accept it through automation with Appium. Things that I have tried:

Using the following capabilities: "safariAllowPopups" and "autoAcceptAlerts"
Changing the according settings for safari in the iOS sim
.switchTo().alert().accept(); I also waited for the Popup.
Switchting to native context before accepting the popup
Clicking the pop up by name .findElement(By.name("Allow")).click();

What I have not tried:

Taping on the screen according to the pop-up coordinates. I didn't try this since I'm not sure on how to get the position of the "Allow" button.

And my other question is how would I switch between two tabs? I haven't tried anything yet, but research would suggest that I try it with window contexts.
Some other information:

Currently testing with a iPhoneSE iOS 9.3 Simulator, the solution should work for several configurations
Appium is on the most recent version
The class "AppiumTestBase"s only purpose is to set capabilities and initialize the AppiumDriver
Answer: Please try this cap after i change to this no popup from safari anymore
<code>desired_capabilities=automationName:XCUITest,browserName:safari,platformName:iOS,platformVersion:11.1,deviceName:iPhone 6,nativeWebTap:True,safariIngoreFraudWarning:True
</code>
Answer: I tried the solution suggested by Atthaboon Sanurt, but it didn't help.
There was no alert, but the new window/tab didn't open either.
Here where the problem is reported:
https://github.com/appium/appium/issues/6864
So far it looks like there is no solution and plans to fix it.


Constrain Partial Values in Timestamp

Question: I'm working on a some Create Table statements for a project I have.  I have two columns (StartDate, EndDate) where the data type is Timestamp.  One of the requirements is to ensure that the date is fixed (January 1, 2000) but leave the time variable.  How would I go about including that in my Create Table statement?
Answer: Try something like
<code>CREATE TABLE test_stmp(StartDate TIMESTAMP NOT NULL,
constraint chk_test_filed check(trunc(StartDate) = to_date('2000-01-01','yyyy-mm-dd')));
</code>

Constrain Partial Values in Timestamp


How is Buchholz score calculated in a Swiss tournament?

Question: I would like to know how the Buchholz tiebreak system works, and how it is calculated, taking into consideration other factors such as bye, no show (default win), etc.
Answer: The information is hidden away in Standards of Chess Equipment and tournament venue for FIDE Tournaments section 13.4.

13.4. Buchholz System
13.4.1. The Buchholz System is the sum of the scores of each of the opponents of a player.
13.4.2. The Median Buchholz is the Buchholz reduced by the highest and the lowest scores of the opponents.
13.4.3. The Median Buchholz 2 is the Buchholz score reduced by the two highest and the two lowest scores of the opponents.
13.4.4. The Buchholz Cut 1 is the Buchholz score reduced by the lowest score of the opponents.
13.4.5. The Buchholz Cut 2 is the Buchholz score reduced by the two lowest scores of the opponents.

Now it gets complicated.

how it is calculated, taking into consideration other factors such as
  bye, no show (default win)

Since these pose a problem for all tie breaks which take into account the performance of opponents, in 2012 FIDE introduced the concept of a "virtual opponent" to be used in these cases. The details are spelt out in section 13.14.2

13.14. Tie-Break Systems using Ratings in Individual Tournaments (where all the players are rated)    ...
13.14.2. For tie-break purposes a player who has no opponent will be considered as having played against a virtual opponent who has the
  same number of points at the beginning of the round and who draws in
  all the following rounds. For the round itself the result by forfeit
  will be considered as a normal result.
This gives the formula:
Svon = SPR + (1 – SfPR) + 0.5 * (n – R)
where for player P who did not play in round R:
n = number of completed rounds
Svon = score of virtual opponent after round n
SPR = score of P before round R
SfPR = forfeit score of P in round R

Since I, like a lot of arbiters, use the Swiss Manager pairing program I though I'd see what the Swiss Manager help has to say about this.

4 Buchholz-Tie-Break Calculation On account of many requests about the Buchholz-Tie-Break I publish the following Excel file with
  suitable examples.

Some quite complicated examples are given there but with minimal explanation.
One last final twist which helped me understand the examples is this one regarding
the score of a player which is going to be used in the Buchholtz calculations for other players.
If a player has received a pairing bye for which he has received one point (as opposed to an elective bye for which the player receives only half a point) then this is treated as an elective bye for Buchholtz calculations, so only counts as a half point bye.
So, if I play player A who has a total score of 3 and he had a one point bye (meaning he scored 2 points from playing games and 1 point from the bye) then when calculating my Buchholtz score I don't add 3 points for this opponewnt, I only add 2.5 points because his one point bye only counts as a half point bye.
Comment: I could not get how to calculate in case of forfeits. Would you send Excel file again? Please.
Comment: @Trurl123 The link is still the same - http://chess-results.com/Download/Buchholz_Beispiele.XLS. It is an Excel file.
Answer: The calculations are rather tricky and not at all obvious. Here is a recent videotutorial regarding the calculations of a real tournament
https://www.youtube.com/watch?v=JdVSJLz95GE
Please consider that:

the score system used is 0-1-3 so you have no half point in the standings;
the language is Italian with subtitles in English (a sort of).
in the crosstable are shown the BYE and the forfeited games (the yellow box) and one no show (player 16) that needs to be treated for:
a) modify the game score to calculate the real standing score to be used for the buchholz;
b) to set the score of the so called "virtual opponent".

Moreover the video even refer to a powerpoint presentation that perhaps can help too.
DISCLAIMER: I am the author of that video


Google Earth Engine Classification Collection Mode Frequency for pixel confidence/stability/agreement

Question: I am trying to obtain the mode and the mode frequency per pixel of different iterations of a Random Forest Classifier (With a fixed number of trees but with different random seeds) with 5 classes (0 to 4). So far, I can easily extract the mode from the collection with <code> var GUE_Mode = ee.ImageCollection(MyCollection).mode()</code> function, but I haven't found a way to add another band to depict the count per pixel of the mode class frequency in the collection, to add a measure of pixel confidence/stability/agreement. Say, if I have 20 different iterations, I would like each pixel in the mode image to have a band depicting how many images depict this pixel classified as the mode class, to add higher confidence to the pixel depicted as that class in 19/20 or 20/20, than to those below this value.
This is the code I have been developing for this purpose, so far without the desired output:
<code>// Function to count the frequency of each mode pixel on the collection
var addModeFrequency = function(mode, collection) {
  // Extract the mode class
  var ModeClass = mode.select('LULC');

  // Define a function to count occurrences of mode class in each image
  var countOccurrence = function(image) {
    // Extract the class band from the image
    var ImageClass = image.select('LULC');
    // Count the pixels where mode class matches image class
    var count = ModeClass.eq(ImageClass).reduceRegion({
      reducer: ee.Reducer.sum(),
      geometry: mode.geometry(),
      scale: 60,
      maxPixels: 1e9
    }).getNumber('LULC');
    // Return the count as an image with same geometry as mode
    return ee.Image.constant(count).rename('counts');
  };

  // Map over the collection to apply countOccurrence function
  var frequency = collection.map(countOccurrence);

  // Merge the frequency images into a single image
  var stabilityMap = ee.ImageCollection(frequency).sum().rename('stability');

  return mode.addBands(stabilityMap);
};

var stabilityMap = addModeFrequency(ee.Image(GUE_mode),ee.ImageCollection(GUE_FC));
print('stabilityMap:', stabilityMap)

// Visualize the stability map
Map.addLayer(stabilityMap.select('stability'), {min: 0, max: 20, palette: ['black', 'white']}, 'Stability Map');
</code>
Answer: I cracked it, here is the code:
<code>// Function to count the frequency of each mode pixel on the collection
var addModeFrequency = function(mode, collection) {
  // Define a function to count occurrences of mode class in each image
  var countOccurrence = function(image) {
    // Get the class band from the image
    var classBand = image.select('LULC');
    // Count the pixels where mode class matches image class
    var count = mode.eq(classBand).rename('counts');
    return count;
  };
  // Map over the collection to apply countOccurrence function
  var frequency = collection.map(countOccurrence);
  // Merge the frequency images into a single image
  var sumImage = ee.ImageCollection(frequency).sum().rename('frequency');
  return mode.addBands(sumImage);
};
</code>


Is consuming sugar with food as beneficial as consuming glucose (~half of the amount of sugar)?

Question: A few years back I heard at biology class that sugar's molecule consists of half the number of elements of a glucose molecule. So not counting the energy needed to transform two sugar molecules in one glucose molecule, isn't it almost the same (eating N amount of sugar) as eating N/2 of glucose?
Answer: You have it backwards. One sugar molecule is equivalent to two glucose molecules, though the actual structure of sugar (Sucrose) is a Glucose + Fructose combination.
While Glucose is metabolized via Glycolysis into two molecules of Pyruvate (which are then used in the Citric Acid Cycle), Fructose enters the Glycolysis metabolism at a later stage as shown here:

The GA-3-P is then turned into 2-Phosphoglycerate and then into 2x Pyruvate.
The end result is that a single Sucrose molecule (Glucose + Fructose) [aka - Sugar] is equivalent to 4x Pyruvate, whereas Glucose alone is equivalent to 2x Pyruvate. Or, if you prefer, a single Glucose molecule results in about 32-36 ATP produced, whereas Sucrose will result in 64-72 ATP produced - with ATP being the primary energy carrier of the cell.
Answer: Is consuming sugar with food as beneficial as consuming glucose (~half of the amount of sugar)?
What is referred to in everyday language as "sugar" is sucrose. Each sucrose molecule consists of one glucose molecule and one fructose molecule linked by a chemical bond. These two, glucose and fructose are, in terms of energy value, identical.
Whether they are equally beneficial, or indeed beneficial at all (from a nutritional point of view), is a very big question.
P.S. (in response to MCM):
But... fructose metabolism is largely carried out by the liver. If you are consuming sucrose then the glucose component will raise insulin levels and the liver will be in anabolic mode. The fructose will be converted to liver glycogen via glucose-6-phosphate (as shown in your diagram) and also to triglyceride for export to adipose tissue where it is stored as fat. So the energy yield from fructose will be deferred, whereas the glucose will be used by all tissues immediately.
Later on, as insulin levels fall (and glucagon levels rise) the liver glycogen will be mobilised as glucose for export to other tissues. Some of the triglyceride will be mobilised from the adipose tissue for use as fuel too, but it is widely believed that with a typical Western diet there is a net movement from fructose>fat which contributes to the rise in levels of obesity. Indeed some scientists believe that fructose is the main culprit.
Comment: Yes, fatty-acid anabolism is certainly one potential pathway for Fructose. However, the original question was not about typical diets or insulin levels. The original question was directly comparing the potential enegy between Sucrose and Glucose. As you point out, even in fatty-acid anabolism the energy from Fructose is only deferred - not eliminated. Sucrose is equivalent to two Glucose molecules in terms of energy obtained, and I thought the Fructokinase pathway was the easiest way to demonstrate that. :-)


Drop-down values in Excel cells are not specified in Data Validation rules and global search didn't find them in workbook, so where do they come from?

Question: On top of values seemingly coming from nowhere in multiple columns, they also affect each other's behavior: In the GIF below, if the cells in the left column have no value selected, then there is no dropdown in the cells in the right column and they also don't accept arbitrary values (as a validation warning will pop up).

I know of the basic data validation drop-down methods:

Select a range of cells

Go to Data > Data Validation

Select "List" in Allow

At Source, either specify the values or select a range of cells that hold them

For the columns in the GIF, Source shows stuff that's new to me:

for the left column: =Status
for the right column: =INDIRECT(V7) (the cell reference increments with every row)

There is no =Status Excel formula, I checked in the official list. I did find the INDIRECT function, but the doc page doesn't make much sense in my case, even after looking at the examples.
I even listed all Data Validation rules programmatically using NPOI, but didn't find extra ones, and the ones defined on the two columns showed the same values as in the Excel app.
Answer: It took a day and a half, but found it:
1. LEFT column's valid values, Assessed and Pending
Started with the left column, because if it is not set, then the right column is "inactive", so it clearly has to trigger something. After several global workbook searches on the string Pending, I noticed that the cursor jumps to a place where there is nothing. It looked like a glitch, but once the search came full circle, the screen kept jumping to this empty place. Then I realized there are columns "missing": AV, AW, and AX.

After expansion:

2. LEFT column still: The =Status formula in Data Validation rule
Again, there is no built-in Status function in Excel, so where does it come from? Decided to enter =Status in an empty cell, and several things happened:

Once the "formula" was entered,

a tooltip came up showing Status PART-IV-SERVICES!AV3:AV4 (in generic form: Status <sheet_name>!<cell_range> )

the cell range AV3:AV4 got highlighted

After pressing enter, the blank cells were replaced with the content of the cells in the referenced range (i.e., AV3:AV4).

After selecting the highlighted range, the "cell selection textbox"(?) in the Formula Bar first showed the cell range, then it switched to Status. As it turns out, cells and cell ranges can be named (see article Define and use names in formulas). So combining =Status and setting List in the Data Validation rule for the column achieves the drop-down effect.
3. RIGHT column: INDIRECT function
The cells in the right column are empty, but their Data Validation rule is set to "List" and the "source" field is set to =INDIRECT(<left_column_cell_ref>):

I still don't understand what the INDIRECT documentation is trying to say, but this is what's happening: When a left column cell is populated with a value (in this case, with either Assessed or Pending), then the INDIRECT(<cell_ref>) becomes either =Pending or =Assessed.
The last piece of the puzzle is that I found two more named ranges, Pending and Assessed (see image below), so when their names are called in a formula, they will behave the same as =Status, but with one level of indirection added to the mix. (Putting it this way, the name of the INDIRECT function does make sense, but I'm still confused how it is supposed to behave.)


Question regarding Gaussian Discriminant Analysis, and Generative Learning models

Question: In lecture today, my professor mentioned in the context of GDA and Generative learning, we would like to learn the joint probability $P(x, y)$, where $x \in \mathbb{R}^n$ and $y \in \{+1, -1\}$. Simply, we apply Bayes rule and realize that the key is to model $P(x \mid y) \cdot P(y)$, where clearly, $P(y)$ is the class prior. My question is that he mentioned that if $ x \mid y \sim \mathit{ExponentialFamily}(\theta_y)$, is a distribution in the exponential family, then it follows that $P(Y = y \mid x)$ is a sigmoid/logistic function. That seems intuitively clear for me based on the example provided in lecture, but does not seem algebraically obvious. How can I show this formally?
Comment: Any thoughts? I'm still not quite sure how to take care of this...
Answer: You will need to have some information about the parametric form of $P(y)$ in order to determine the form of the posterior. He's saying that if the likelihood is from the exponential family, then the posterior is logistic, but that requires knowing the form of the prior. I don't think it follows necessarily, and he was most likely talking about logistic regression for binomial classification with some abused or confused terminology.


Auto trigger new shipment email in magento

Question: I have an inventory system called BrightPearl that manages all of my orders for magento (1.9.1) that is connected to shipstation. When an order is processed (i.e a labels is printed) ship station will send the data to brightpearl and brightpearl will then send the data to magento.
The order is marked complete and the tracking number is entered into the order.
The problem is that the shipment notification email is not being sent out.
Is there something that I can do that will auto send out all of those emails every hour (or every half day) or is there a setting that I need to select that will send those emails out automatically when a tracking number is added to the order and a shipment "invoice" is created?
Thanks!
Comment: Check my answer and accept if it works for you.
Comment: Have you found solution? This setting is already done in my system..
Answer: Go to system> configuration > sales > sales emails

If filling these settings doesn't work, contact Brightpearl


Help identify this unknown piece - black police torso, but it has the LEGO logo printed on the middle of the front

Question: I've been looking on Bricklink for a while now, but I haven't found this piece yet, so I'm wondering if anyone knows what it is based on its description: it's a black police torso, but it has the LEGO logo printed on the middle of the front of the torso.
Comment: Welcome to Bricks.SE! I'm not familiar with a torso that fits that description. It may be helpful to add a photo to your question to help folks better identify this element.
Comment: Oh, I think I found it. It's from this keychain https://www.bricklink.com/v2/catalog/catalogitem.page?id=101212
Comment: Oddly enough, "Lego" is a difficult word to use to search for these things :-) To save others from searching, my googling for **torso "lego pattern"** and **torso "lego and" pattern** have not found it. Though there are some cool Lego House and Lego World 2012 torsos on BrickLink. A picture is definitely the way to go, here.
Comment: Here's a picture of the piece, still not sure what it is on Bricklink
Answer: This is either from 2011's Flashlight, Dynamo Torch - Motor Police (which is not a minifig but rather a 20cm-high figurine with a flashlight inside a leg, and a crank in a shoulder)...

...or, as user @bgeorge has pointed out in a comment, Mini Torch Minifigure Flashlight Key Chain Police

Keep in mind that keychain minifigs are different from standard minifigs, and so the torso cannot be separated from the legs or head.


How to Implement Queue Based Workflow System?

Question: I'm working on a document management system. An example workflow would be something like this:

A document is emailed to the system
The system does a number of preparatory actions to the document
Document is presented to a user for further processing
Afterwards, document is sent to Quality Assurance
Afterwards, the system does a number or post-processing actions to the document
Document is considered completely processed and disseminated (e.g. emailed back to whoever emailed the document to the system, etc.)

Since the volume of my input will vary (but will usually be high volume), I am very concerend about scalability.
For example, say the system has already downloaded the email attachments. If the attachments are PDF documents, the system needs to split the PDF into individual pages, then convert each page into multiple size thumbnails, etc. I plan to have a cron job check (say, every minute) to see if there are an PDF documents that need to be processed. Using a flagging system (e.g. "PDF Document Ready to be Processed"), I can check the database for all PDF documents that are flagged to be processed. Once the PDF processing is done, the flag can be updated to say "PDF Processing Done."
However, since the processing of each PDF document is very time consuming, I am concerned that when the next cron job is executed, that cron job will also try to process the PDFs that the previous cron job is still processing.
A possible solution is to immediately flag the PDF documents with "PDF Document Currently Being Processed." That way, when the next cron job is executed, it will exclude the ones already being processed.
Thus, each step in the workflow will probably have 3 flags:

PDF Document Ready to be Processed
PDF Document Currently Being Processed
PDF Processing Done

Same for QA:

Document Ready for QA
Document Currently Being QAd
Document QA Done

Is this a good approach? Is there a better approach? Would I have these flags as a single column of the "PDF Document" table in the database? Or should the flags be its own table (e.g. especially if a document can have multiple flags set).
I'd like to solicit suggestions on how to implement such a system.
Comment: Seems that you should set up a queued system with multiple consumers. Do you want pointers on that?
Comment: Sure. I am open to all ideas.
Answer: To solve your concern about concurrent processing on the same document, you can use many scheduler packages to help you manage this aspect.  http://www.quartz-scheduler.org/ is one I've used with great success.
To address your problem, I'd have the 3 states, received, queued, processed (similar to what you suggest).
I'd have a scheduled recurring job which polls the database, looking for received pdfs, and for each, queue a job to process and mark the pdf as queued.  If you ensure this happens in the same transaction, and utilize optimistic locking, there is no risk another job could come along and re-read this as received.
Quartz uses a thread pool, with may configuration options, and is great for deferred, resource intensive processing (I use it for image thumbnailing in a server setting).
To take a step back, there are some great workflow packages in the java world which can handle most of what you want to do, including the deferred pdf processing.  Take a look at jbpm or drools flow, these are two great, if complex, packages.
UPDATE: Drools Flow has been merged into JBPM.  For this particular problem it may be a bit of "killing a mosquito with a bazooka" situation, but it's a great workflow package.
Answer: The solution kind of depends on what technologies you are using to implement this system is the pre / post processing done by the same software / language as the emailing software? Additionally are they running in seperate processes.
If you have distributed components you could do much worse than investigating an AMQP solution like RabbitMQ, as this takes care of putting each job into a queue, and making sure that only one of your consumers takes each job. (we'd model each thumbnailing job as individual tasks).
If however the entire system is implemented in one language, and inside a single process there's some simpler systems you can use:

Resque is a good solution for Ruby
Java would work well as a LinkedBlockingQueue
Uh, I'm sure c# will have some way of creating a queue of jobs (disclaimer: I know nothing of c#)
Comment: I'm implementing on WAMP/LAMP, but looking more for a technology-agnostic solution.
Comment: So in that case RabbitMQ should still be an option for you, as AMQP is system agnostic (it's designed to allow different technologies to talk to each other in a uniform way). Alternatively there is a specific queue implementation for PHP in Zend Server (which I think costs much moneys), or there's this library for Resque http://github.com/chrisboulton/php-resque which plugs into PHP code


How to create a ClickOnce installer that runs silently and requires no user interaction?

Question: Ideally no window would pop up at all when setup.exe is invoked, but it would be nice to save the user from having to click "OK" on installing pre-requisites and other options. Is that even possible with ClickOnce?
Comment: The scenario I am thinking of involves running setup.exe on a local hard drive from the command line, so it is a bit different from a website hosting something.
Comment: See [Walkthrough: Creating a Custom Installer for a ClickOnce Application](http://msdn.microsoft.com/en-us/library/dd997001%28v=vs.100%29.aspx) - "Any ClickOnce application **based on an .exe file** can be silently installed and updated by a custom installer"
Answer: Additional Files
Additional components (files and DLL files) can be added automatically as part of the download in the property pages of your project 'Publish' > 'Application Files...'.
Prerequisties
As for prerequisties, this will require the users permission (unless you code this to perform a silent install when your application starts - not recommended and nasty solution). At work I got Infrastructure to roll out prerequisites such as .NET 3.5/4.0.
Silent ClickOnce install
To create a silent ClickOnce installer, set the MinimumRequiredVersion element in your WPF/Windows Forms project file to same version as ApplicationVersion.
<code><PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
...
<MinimumRequiredVersion>220.127.116.11</MinimumRequiredVersion>
<ApplicationVersion>220.127.116.11</ApplicationVersion>
...
</PropertyGroup>
</code>
If these version numbers are the same, the user will not be prompted with a dialog to update.
At work, I have automated this using a custom build number from TFS to set the version MinimumRequiredVersion and ApplicationVersion in the project file.


Where is the temporal zone located of DC's Legends of Tomorrow?

Question: In DC's Legends of Tomorrow, the place which seems to be the 'neutral' place of time is where the legends tend to set the Waverider in when they are not somewhere on a mission. Where is this located and how does the ship access it?
Answer: Per my understanding, the Temporal Zone can be considered the "space" between time and space. As a result, it doesn't really exist "anywhere" physically.
The Waverider goes through the Temporal Zone with the help of a "time drive", whose exact mechanism isn't really explained.
Comment: Hi, welcome to the site. You could greatly improve this answer by [edit]ing it to cite any evidence upon which your understanding is based.
Comment: Yes, I got the whole feeling of it not physically existing anywhere. I do wish the whole mechanics of the time drive was explained more in the show, but for now we can just imagine.


Is the difference of distance function convex?

Question: Suppose all the points are in $\mathbb{R}^2$. Given two points $z_1,z_2$ and a number A, is the solution set of the following inequality function convex?
$$
f(x)=d(x,z_1)-d(x,z_2)-A \leq 0
$$
where $d(\cdot,\cdot)$ is a 2-dimensional distance function, such as $L_2$-norm or $L_1$-norm. Or does the solution set of inequality will be convex when the distance function satisfies some properties?
Answer: Hint: If $A=0$ then it is convex , otherwise It might be non-convex , Try examples in $\Bbb R^2$


make scheduled task active/passive cluster aware

Question: I have 2 nodes using win server 2008 r2 in my active/passive cluster setup.
They have the same set of scheduled tasks and i want them to run only when the node is active.
Does Windows support something?
If not, is there a way to query the system to find out if the machine is the active node?
Thanks
Answer: This is only available in Windows 2012.  You'd need to upgrade.
Comment: Oh wow. Did not know that about 2012
Answer: Put your scheduled task on the disk shared between the cluster nodes. Then put identical scheduled tasks on both nodes running the task from the shared drive. The drive will not exist on the inactive node, so you should get what you want and the task will run only on the active node.
Answer: Scheduled tasks aren't cluster able with windows native tools (prior to 2012, thanks Shane!). There are 3rd party tools for scheduling tasks that can do this, they tend to be expensive.
You could parse cluster.exe output to see what's active. I imagine there's also a powershell method.


How do you remove the default title and body fields in a CCK generated Drupal content-type?

Question: When you create a new content type in Drupal using the Content Creation Kit, you automatically get Title and Body fields in the generated form. Is there a way to remove them?
Answer: If you're not a developer (or you want to shortcut the development process), another possible solution is to utilize the auto_nodetitle module.  Auto nodetitle will let you create rules for generating the title of the node.  These can be programmatic rules, tokens that are replaced, or simply static text. Worth a look if nothing else.
Answer: To remove the body edit the type, expand "Submission form settings" and put in blank for body field label.  For title you can rename it to another text field.  If you really have no need for any text fields you can create a custom module, say called foo, and create function foo_form_alter() which replaces $form['title'] with a #value when $form['type']['#value'] is your node type.
Comment: This worked nicely for the Body field but I prefer the auto_nodetitle module for removing the Name field.

Thanks!
Answer: No need to install anything:
when editing the content type, press "Edit"
(on the menu of Edit | Manage fields | Display fields )
click on the Submission form settings
on the Body field label:
Leave it blank, it would remove the Body field.
Answer:
If you're not a developer (or you want
  to shortcut the development process),
  another possible solution is to
  utilize the auto_nodetitle module.
  Auto nodetitle will let you create
  rules for generating the title of the
  node. These can be programmatic rules,
  tokens that are replaced, or simply
  static text. Worth a look if nothing
  else.

And to add on to William OConnor's solution...
The module is poorly documented unfortunately. It's really only effective if you use PHP with it in my opinion. Check off the "Evaluate PHP in Pattern" and type into the "Pattern for the title" field something like:
<?php echo $node->field_staff_email[0]['email']; ?>

or:
<?php echo $node->field_staff_name[0]['value'] . '-' . gmdate('YmdHis'); ?>

...where I had a field with an internal name of "field_staff_email" and was using the CCK Email module -- thus the 'email' type was used. Or, I had a field with an internal name of "field_staff_name" and was just an ordinary text field -- thus the 'value' type was used. The gmdate() call on the end is to ensure uniqueness because you may have two or more staff members named the same thing.
The way I discovered all this was by first experimenting with:
<?php print_r($node); ?>

...which of course gave crazy results, but at least I was able to parse the output and figure out how to use the $node object properly here.
Just note if you use either of these PHP routines, then you end up with the Content list in Drupal Admin showing entries exactly as you coded the PHP. This is why I didn't just use gmdate() alone because then it might be hard to find my record for editing.
Note also you might be able to use Base-36 conversion on gmdate() in order to reduce the size of the output because gmdate('YmdHis') is fairly long.
Answer: The initial answers are all good. Just as another idea for the title part... how about creating a custom template file for the cck node type. You would copy node.tpl.php to node-TYPE.tpl.php, and then edit the new file and remove where the title is rendered. (Dont forget to clear your cache).
Doing it this way means that every node still has a title, so for content management you aren't left with blank titles or anything like that.
HTH!


How to ask someone to send me a shipment using regular mail instead of courier mail?

Question: I have a Russian artist friend who speaks terrible English and I speak terrible Russian. He's sending me this amulet that he made which is small enough to fit in an envelope. How do I explain to him to send it to me using regular mail in an envelope instead of courier mail (ups, fedex, dhl). I'm not able to receive packages I have to sign for here.
Comment: As a side note, In Russia, the regular post is _extremely_ unreliable.  There are also limitation as to what can be sent in an envelope (as opposed to a small box).  It's been a while since I checked, but back then only papers could be sent in an envelope.  For something as valuable as a hand-made amulet I would most certainly advise using a courier.
Comment: regular mail=обычная почта (`Пошли мне обычной почтой`)
Comment: @Jacob: could you please make it an answer?
Comment: @AleksG, despite this stereotype, I've been using the regular postal service for almost 3 years when getting goods from eBay, and it always delivers packages (even with valuable items) without any loss or damage, quite slow though. However, if some issue happens with a package, I guess it would be pretty difficult to get any satisfaction from the postal staff.
Comment: @Ivan Fair point.  I haven't used Russian post in many years. BTW, what city is it in?  This varies drastically across geographies.
Comment: @AleksG, I'm in Novosibirsk
Answer: Courier mail is "курьерская доставка", regular mail - "обычная почта". In envelope -"в конверте".
And "I'm not able to receive packages I have to sign for here" can be said like "Я не могу у себя получать посылки, за которые нужно ставить подпись".
Comment: ...  за которые надо расписываться
Answer: To make it a polite request, you can write something like this: "Пожалуйста, вышлите мне товар обычной почтой в обычном конверте. Заказное письмо или курьерская почта предполагает подпись получателя, а это невозможно в моем случае. Спасибо!"
Which translates as: "Please, send shipment using regular mail in regular envelope. Registered mail or Courier mail service would require a signature of the recipient which is impossible in my case. Thank you!"