WmiSetBrightness method not supported (.Net 4.0, Winforms, Windows 7)

Question: I'm trying to adjust the brightness (not the gamma ramp values) of the monitor using WmiSetBrightness method but the system throws a ManagementException during runtime saying 'Not supported'. I have seen a lot of people using this concept and running successfully. So what's wrong with mine? Is it because this is not supported in Windows 7 Ultimate; on which I'm working?
My Code follows:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1_Click
    Try
        Dim mclass As New ManagementClass("WmiMonitorBrightnessMethods")
        mclass.Scope = New ManagementScope("\\.\root\wmi")
        Dim instances As ManagementObjectCollection = mclass.GetInstances()

        For Each instance As ManagementObject In instances
            Dim brightness As Byte = 50 'In percent.
            Dim timeout As UInt64 = 1 'In seconds.
            Dim args As Object() = New Object() {brightness, timeout}
            instance.InvokeMethod("WmiSetBrightness", args) 'Only work on the first object.
            Exit For
        Next
    Catch ex As ManagementException
        MessageBox.Show(ex.Message)
    End Try
End Sub

To test if the instances are literally obtained, I commented the foreach part and tried to print the count of the instances using instances.Count.ToString() through a MessageBox but still the exception is thrown.
As an alternative, I tried to work with DeviceIOControl and IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS but of no success. The code follows:
Public Class Form1
    Private Declare Auto Function CreateFile Lib "kernel32" _
    (ByVal lpFileName As String, ByVal dwDesiredAccess As Int32, _
     ByVal dwShareMode As Int32, ByVal lpSecurityAttributes As IntPtr, _
     ByVal dwCreationDisposition As Int32, _
     ByVal dwFlagsAndAttributes As Int32, ByVal hTemplateFile As IntPtr) As IntPtr

    Const GENERIC_READ As Int32 = &H80000000%
    Const SHARE_ALL As Int32 = &H7%
    Const OPEN_EXISTING As Int32 = &H3%

    Const IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS As Integer = &H23049C%

    Private Structure BRIGHTNESS
        Public ucDisplayPolicy As Byte
        Public ucACBrightness As Byte
        Public ucDCBrightness As Byte
    End Structure

    Private Declare Auto Function DeviceIoControl Lib "kernel32" _
     (ByVal hDevice As IntPtr, ByVal dwIoControlCode As Int32, _
     ByRef lpInBuffer As BRIGHTNESS, ByVal nInBufferSize As Int32, _
     ByVal lpOutBuffer As IntPtr, ByVal nOutBufferSize As Int32, _
     ByRef lpBytesReturned As Int32, ByVal lpOverlapped As IntPtr) As Boolean

    Private Declare Auto Function CloseHandle Lib "kernel32" _
     (ByVal hObject As IntPtr) As Boolean

    '''
    ''' Set the brightness of the screen.
    '''
    ''' <param name="Brightness">The Screen Brightness.</param>
    Private Sub SetBrightness(ByRef Brightness As BRIGHTNESS)
        ' Get the display.
        Dim pDisplay As IntPtr = _
         CreateFile("\\.\LCD", GENERIC_READ, SHARE_ALL, IntPtr.Zero, OPEN_EXISTING, 0, IntPtr.Zero)

        ' Set the brightness.
        DeviceIoControl(pDisplay, IOCTL_VIDEO_SET_DISPLAY_BRIGHTNESS, _
        Brightness, Runtime.InteropServices.Marshal.SizeOf(Brightness), IntPtr.Zero, 0, Nothing, IntPtr.Zero)

        ' Close the handle.
        CloseHandle(pDisplay)
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim brightness As BRIGHTNESS

        ' The brightness on DC Power.
        brightness.ucDCBrightness = 100
        ' The Brightness on AC Power.
        brightness.ucACBrightness = 100

        ' Call the function.
        SetBrightness(brightness)
    End Sub
End Class

For some reason DeviceIoControl always returns False.
Please assist in sorting these out.
BTW, this is not about modifying gamma ramp values using SetDeviceGammaRamp, as it adjusts the contrast of the monitor; not the brightness. So, any post on that matter won't be of much help.
Regards!
Answer: For using WmiMonitorBrightnessMethods, the order of the args is not correct. It should be this:
Dim args As Object() = New Object() {timeout, brightness}

It works for me.


Photoshop: Does creating a work path from type lose quality?

Question: In Photoshop there is a menu option to create a vector from a text layer: Layer > Type > Create Work Path. Does this lose any quality over leaving it as a text layer, such as font hinting?
Answer: There could be circumstances when you want to do this, for a special vector mask, maybe, but they are rare. This is one of those legacy features, like the Type Mask tools, that's long since been superseded by better ways to do things.
It might help to understand what hinting is. Back in the very early days of laser printers and Adobe Postscript, it was John Warnock and Chuck Geschke who solved the problem of good text reproduction on these low resolution raster devices (300 dpi is low resolution for text) with hinting. Hinting is only used when text is rasterized for output to this kind of low-resolution device.
Without hinting, text tends to look too dark when printed on a desktop laser or inkjet printer, so you'll often see recommendations to "never outline text because you lose the hinting." But professional plate making for a printing press will render outlines or text at a full 2400 dpi or more, where hinting isn't needed and isn't used.
But there's a big, big caveat with Photoshop, quite apart from hinting issues:
Photoshop is a raster application, and all of its core functions pretty much assume that the final output will be an image. It does its own version of rasterizing text, offering several flavors of rendering: None, Sharp, Strong, Crisp and Smooth. These influence how the text is rasterized at current document resolution. That's fine if you're creating a web banner or something similar that will be seen only on a screen, and can even work semi-okay for a desktop printer, but all that text is rasterized at whatever your document resolution is, which is unlikely to be enough for press work.
Even if you place your Photoshop file into InDesign, what appears in the layout is a fully rasterized image. It doesn't contain font information, nor any vector data at all.
To maintain the best quality of text on press, save the Photoshop document as a PDF and place that in your layout or send it to your printer. PDF keeps all of the vector information (shapes, etc.) intact and embeds the fonts. These will be rendered by the printer's RIP (Raster Image Processor) at full 2400 or 2800 dpi resolution, not the document's overall 300 ppi (or whatever).
Answer: I should think that would depend on which resolution you are creating the vector path from.
If it's really tiny text there could be some issues, but if you make it from larger text it would probably remain mostly true through whichever sizes you choose.
I would generally just leave it as a text layer, as the font itself contains the information needed to render it best at whichever size, and it's a vector format anyway. I don't see the advantage of creating a work path of text.
Hope that helps some.


What are some of the strength building exercises for Bass players?

Question: What are some of the strength building exercises for Bass players, especially for the left palm/fingers?
Answer: One of the best exercises for fingers is to use a FingerGrip type exerciser like this one:

And I would also recommend using a tabletop if you are sitting at work, pressing your fingers hard against the surface.
Carrying bags of shopping is also useful - try heavy bags and just using one or two fingers - I use this for strengthening my fingers for climbing, along with chin ups.
Have a read of this related question - guitarist focused, rather than bass, but it's broadly similar.
Answer: Everything Dr Mayhem mentioned is fine.
If you can (and like the idea) climbing can sure help in strenghtening your hands.
Apart from that, I'd do a lot of spider excercises, especially on the upper part of the neck.
This means playing 1-2-3-4 (i.e. index on the first fret, then medium on the second, then ring finger on the third and finally little finger on the fourth) and back on each string. This is the simplest, but you should try all the combinations, i.e. 1-3-2-4, 1-2-4-3, 1-4-2-3, 1-4-3-2, 2-1-3-4, and so on.
Answer: Bass Fitness is an exercise book in the likes of the "spider exercises", mentioned here.
I (try to) use it on a regular basis and recommend it to a fellow bassist. ;-)


FTP Widget Location

Question: I am trying to recover some code I had several months ago (I have backups of everything). It was part of a text widget in my WordPress sidebar.
If I have the full backup, where can I find that code? I can't seem to find that folder.
Answer: Try looking in the <code>{$prefix}_options</code> table in the WordPress MySQL database
Comment: where is that located?
Comment: in ur wordpress mysql database
Answer: The widget settings (as well as plenty of other stuff) are stored in MySQL database. Actual files are mostly PHP code that runs the show, WordPress uses next to none manipulating files.
So to recover those you will need to look in backup of your database as well as some code to make sense of values (widget settings are complex and probably stored in in database in serialized form).

FTP Widget Location


MySQL Database Design Help?

Question: I am going through my database and what I want to do is re-design it because I feel like it's very messy and that I am doing it wrong. This is just for practice; I've never had anyone teach me so I would love to learn new ways and how to approach this.
What I have is a users table with the following fields:
id, admin, active, username, password, business_name, address, city, state, zip, phone, email, hours, hours2, credit_cards, logo_ext, package, theme, header_image, facebook_link, twitter_link, analytics, analytics_id, website_url, banner_image, member_forgot, home_page, about_page, contact_page
Wow, pretty messy right?  Here are a few things I see:
admin and active is just a bunch of 0's and 1's so can I do something like this? Since there will be 99% active and only a couple that will be inactive.
admin  - id, user_id
inactive - id, user_id
social - id, user_id, facebook_link, twitter_link
member_forgot - id, user_id, forgot_code
I'm not too sure about the rest.   Just to explain a few of the fields:

Hours = Monday through Friday hours
Hours2 = Saturday hours
Credit_Cards = 1110 format (visa, mastercard, discover, amex)
logo_ext = jpg, png - stores it when you upload logo
package = 1, 2, or 3. Different level. Each level has its own template.
theme = what stylesheet to use
header_image = which image to use on the header for that account.
analytics_id = I use piwik, so piwik stores a unique id that I need to store
banner_image = 1-30 of different images there are to choose from
pages = stores the text in the database, which they can change via wysiwyg editor.

I really want to practice splitting it up in different tables even if it is not a huge database, or is that a bad idea? So if I delete a user from the users table, it will delete all of the other records in the other tables associated with that user_id?
Any suggestions / help is appreciated.  I love to learn new things and am very interested in making this database more efficient and flexible.
Thanks so much.
Comment: This is a design to capture the model of *what*?
Answer:
admin and active is just a bunch of 0's and 1's so can I do something
  like this? Since there will be 99% active and only a couple that will
  be inactive.
admin - id, user_id
  inactive - id, user_id
  social - id, user_id
  facebook_link, twitter_link
  member_forgot - id, user_id, forgot_code

Actually no, I wouldn't do this and keep it in the same table. The flag should be enough to distinguish between these two. The only difference in your queries is a active = true. Personally, I wouldn't consider this a bad design choice (altough your idea is not wrong, I would not use it in this case with - I'm guessing - a small set of data). Since only on set of data belongs to a single user, JOINs would make not that much sense.

I really want to practice splitting it up in different tables even if
  it is not a huge database, or is that a bad idea? So if I delete a
  user from the users table, it will delete all of the other records in
  the other tables associated with that user_id?

Again, I wouldn't do that personally(!). I don't see a benefit of seperating user centric data from the user. If you fear losing the data on deletion, introduce a deleted flag. This way, you will never lose data and your application just respects the deleted flag in your queries (this would also apply if you split the data accross tables).

Credit_Cards = 1110 format (visa, mastercard, discover, amex)

Storing credit cards is always very sensitive, according to PCI (as far as i remember) you are not allowed to store the CVV code (hope someone can correct me on that). But since this seems to be a fictional application, that should not be a problem.
Comment: Hi thank you so much for your response.  Regarding the credit cards, that is just to see which credit cards that user (shop) accepts in their store.

MySQL Database Design Help?


Does p90x ab-ripper work?

Question: I recently found out about the p90x training program, but what interests me the most is it's ab-ripper. Has anyone tried it before? Any input is appreciated... :)
Comment: Care to explain what the ab-ripper workout consist off? That way we can judge it based on those merits.
Comment: Well, to get a better answer it would help if you did the searching for everyone who wanted to answer your question ;-) Surely there's a site who has reviewed or looked at the workout?
Comment: I don't know exactly how they call all the routines. But it comprises of lower and upper ab exercises of 25 reps each and only a couple of seconds rests in between. when you make a search at youtube, you'll see how it's done...
Comment: Ab Ripper X consists of 12 routines each routine with 25 reps.  Routines are performed with little to no rest in between.
Comment: Yes, the exercises will give you the six-pack, which is only seen after you've reached a certain body fat percentage.
Answer: I've watched part of the Ab Ripper X video, and reviewed all the exercises involved, and while I've not tried the program particularly, I have used several of the exercises that they have in their routine in my workouts in the past and can say with absolute certainty that the exercises will build muscle and burn calories.
How many calories you will burn I could not state for certain. Also, there is a limit to how far this workout will take you, and at that point, you'll need to add more reps, more resistance, or increase the intensity in some other more creative way in order to continue to progress.
If you are overweight or have excess fat on your stomach, having strong stomach muscles will not make your stomach look less fatty or more ripped/toned. You'll need to lose the fat to show off the muscles. Losing the fat involves a change in diet and/or activity level, probably beyond what you're going to get just from the Ab Ripper X routine.
Ab Ripper X is a fairly intense workout, especially for a beginner or someone not already in decent shape, and as Meade Rubenstein pointed out, starting out with too intense a workout often causes beginners to lose interest and quit. Building a stronger, healthier you is a lifestyle change with a lifetime commitment.
Comment: +1 ab ripper x is intense even for people with strong abs
Comment: FYI I wore my watch the other day when I did Ab Ripper X and I burned 190 calories while I did the exercises. And that was while doing modified versions! :D
Answer: From what I know of the p90X program, it's an intense program based on High Impact Interval Training (HIIT), that alternates exercises every 3-4 weeks to keep the body's adoption to the specific set of exercises from happening.  The few people I know who have tried it have seen results, but none have stayed with it long term - the problem with fad exercises and diets...it doesn't set the stage for long term personal changes due to it's required intensity to work.  So, specific to the ab ripper - it probably does 'work' if you're looking to burn calories.  If you're looking for the '6 pack' goal, you're better off focusing on a well rounded, long term exercise program. IMO
Answer: The P90X program definitely works. Ab ripper X works. It is very intense and there were a couple of exercises I still couldn't quite do as well as others after I had been on the program for a month.
There is a fit test in the P90X program that will determine whether or not you will be able to do the exercises so do that first. The Ab-Ripper X video is about 10-20 minutes long, (I can't really remember) but it is really intense.
There is also a diet plan that you are supposed to follow, including buying pills and protein shakes from the Beachbody company, but I didn't do that. I think that the videos are enough, but you probably won't get the results that you want from just the ab ripper video.
You aren't supposed to do the workout everyday, and Tony Horton says that in the video as well. You are really supposed to be working on a different set of muscles everyday. I think in my program I did ab ripper x three times a week after my normal workout.
Answer: P90x Ab-Ripper does, in fact, work.  I got into a routine of doing it every other day during a 6 month period where I couldn't otherwise do any workouts.  My core got noticeably stronger and within 8 weeks or so you can see increased definition in your core, provided you have reasonably low body fat.
I also modified the workout a little to make it more effective for me. Specifically, I (a) memorized the moves so I could do the workout even if I didn't have access to the video, (b) started out with 20 reps instead of 25, then worked my way up eventually to 30 reps as I could, (c) gave myself a flat 30 second break between each exercise, which helped me keep good form but toned down the 'cardio' effect, and (d) rotated the moves.  Every day I would shift my starting move up one, so on day 1 I would start with move 1, and the next workout I would start with move 2 and add move 1 to the end.  I think that keeps things from getting static, keeps you from getting bored, and also gives you an opportunity to do every exercise "fresh" at some point.
Answer: Yes the ab ripper works great even for those in shape. If you watch the video you will see some of the individuals have ripped abs, and you can see they are getting a good workout. People reading this must remember a couple of things. Ab x is part of a whole workout program. The other workouts such as yoga x, chest n back, legs n back, shoulders n arms, x stretch, and plyometrics hit the abs in some way or another during the week. The day ab ripper is done, you should have also performed legs n back or chest n back. If abs are easy for you do legs n back first then abs. Same for chest n back. With that, the person doing ab ripper will get out of it what they put into it. I know, I have been doing a modified p9ox since finishing the program 2 years ago.
Comment: I'm skeptical that working your shoulders and arms can be the key to an effective ab workout.
Comment: l33t speak and abbreviations are frowned upon on SE sites.

Does p90x ab-ripper work?


What are the black spots on my bathroom ceiling? Are they mold?

Question: My bathroom above my tub is getting some black spots on it that seems to be growing. I assume it's mold. I am wondering how should I deal with this? What should I expect it to cost?
Comment: ..I hope it's not a popcorn ceiling
Answer: First find out whether it is mold or not. What you do next depends on this.
Assuming it is mold you need to do two things.

Clean it off - disinfectant/bleach solution should do the job.
Find out why it's forming. This is the important bit as if you just do the first step it will come back.

The usual cause is condensation which in a bathroom means you have insufficient ventilation.
So the ultimate cure is to fit an extractor fan above the bath to remove the steam. You can get ones that wire up to the light circuit and then "run on" after the light is switched off to provide additional ventilation.
Once you've done this redecorate.
Comment: @ray023 - anything stiff enough to bring up the mold but soft enough not to damage the surface. For tiles you can use something fairly tough.
Comment: What kind of rag or brush do you use with the solution?
Answer: Every answer here suggests using a water-bleach solution, though I am suggesting cleaning the mould (if that is what it turns out to be) with just soap and water.
And I have my friends Health Canada and the Canadian Mortgage and Housing Council to back me up. CMHC is not a health authority, but they do have an interest in damage to mortgaged-backed homes and their typical clients are first-time home buyers who have little to no experience with home maintenance.
Both advise against using bleach to clean mould. Soap and water works fine and is safer (for you) to use, especially in poorly-ventilated spaces (you have a mouldy bathroom after all).
The CDC does not outright discourage the use of bleach for cleaning small areas of mould (it discommends it for for areas larger than 10 sqft) and does provide advice and instructions should you decide to use bleach.
Edit:
The assumption we make here is that this is "typical" house hold mould and not something you'd need professionals to clean. Please don't attempt to use soap and water for black mould or mould that covers an area of more than 10 sqft.
Answer: You can start off with taking a 50/50 solution of bleach and water, then spraying the mold with it. Wait a few days.
To prevent it in the future, when showering you should be using the bathroom fan to allow the hot air to be exhausted outside rather than condense on the walls and ceiling (which are made of drywall of course).
They also make mold-inhibiting paint and mold-inhibiting drywall. Depending on your bathroom and funds, this may be a long term option. But bleach/water mixture will be your first step.
Answer: Yup, probably mold.  First you'll want to clean it up.  A weak solution of water and bleach should do the trick.
To make sure it stays gone, you'll want to make sure your bathroom is properly ventilated.  If you don't have a vent fan, you'll want to install one.  If you already have one, you'll want to make sure you use it.  Hooking it up so it automatically turns on with the light is a good way of doing that.
They also have a mold-preventative that you can add to paint (pretty sure home depot carries it).  I would strongly recommend using that and repainting the ceiling.  I've used it myself several times and it works very well.
Answer: Wash it off with some bleach and warm water.  And then make sure you ventilate your bathroom well after taking a shower (or whenever the humidity levels in the bathroom increase).
Answer: Although cleaning the surface like others have suggested would be good, if this was my house I would want to make sure the source mold is not coming from the attic.  It could be your attic is not properly vented and moisture is forming of the other side of the ceiling and is so bad that it is coming though to the finished side.  This would indicate a major issue.  I would take a look up there above the bathroom and see if you see any mold.  If so, you will want to bring in the pros.
Answer: Yes, it is 100% mold.
A lot of people tend to get mold in their bathrooms as they don't have any ventilation when they shower which creates a lot of condensation.
Simply open a window (even if slightly) which will let the steam out the room whilst you shower. Such a simple (and free) solution.
Answer: There's a paint called killz it works well for molds. U can find it in Home Depot.
Comment: Killz is a sealant. It does not abate mold.


Is it safe to use an extension ladder in the garage?

Question: I had a line of insulation decide it no longer wanted to stay attached to the garage rafters.  Bought some fresh (and better) stuff.  Went to put it up, but my standard stepladder is coming up short (literally).  I've got a nice extension ladder, but am unsure if it's safe to use that against the 2x6 beams across the garage?  Height may not be enough (how much below the pivot point do you need to stay?) and also concerned about side load on the beam.
Answer: The distance the ladder base should be from the wall is 1/4 of the vertical height of the ladder contact point. The side load will be minimal. However with the ladder against the rafters it will be difficult to position the insulation and not have the ladder in the way.
Comment: ...and I was able to safely complete the work as of this AM all by myself.  :-)  Thanks!
Comment: It won't actually be against the rafters unless I choose to extend it that far.  There are horizontal cross beams that I would be leaning it against.  Math may not work out on this one for the ladder pivot point, may have to hire my handyman friend to bring over his service truck full of ladders to do the job for me.  :-)
Answer: A tall step ladder is the best solution.
With an extension ladder, you may find it easier to put the ladder against a side wall of the garage and work on this problem from above. Take some scrap boards that you can lay across the joists to support your weight while you work. Since you're likely on concrete, have someone hold the ladder or use something else to prevent the bottom from sliding out from under you. Resting the ladder against a joist without any nearby cross bracing will result in it bowing and could knock another piece of insulation loose when you remove the ladder.
A quick method to check the slope of the ladder is to place your toes against the feet of the ladder and extend your arms straight out in front of you. Your hands should just touch the ladder. You may also see a diagram on the side of the ladder indicating which side is up and a vertical line when the ladder is in use.
One final note, any walls between your garage and attached home should be drywalled with fire resistant drywall (5/8" type x), taped, and mudded twice. You do not want any path for exhaust fumes from a car to enter your home.
Comment: Tough call on which answer to accept.  Both have excellent info.  Thanks!


How do I deal with these crazy PCs?

Question: I got some of my friends to play a very small game of D&D, with my being DM to see if they will like to play more often. Our quest consisted of PvP, hiding, going to the tavern to get drunk, and sexual harassment to the female NPCs. How do I get them to stop without sounding like a strict DM?
Comment: Sexual harassment in-character is only something to worry about if they think it's fine out-of-character. Sardathrion is broadly right, though: If your play expectations are clashing irreconcilably with those of your players, it's time to find a new group. (You should definitely make an attempt at finding a middle ground before giving up, though. See Brian Ballsun-Stanton's answer for some good strategies to try.)
Comment: Tell them in an [assertive way](http://www.amazon.co.uk/Assertiveness-Work-Practical-Handling-Situations/dp/0077114280) what you want the game to be and if they do not agree to it, find better friends to role play with.  To be honest, the "sexual harassment" aspect worries me...
Comment: The sexual harassment aspect is not more disturbing than playing evil characters. Some groups play murderous sociopaths, some don't. Besides, John said mentioned an other question that they are aged around 16. Unrequited sexual appetite and resulting frustration is quite natural at this age. With the coming of age and ample real-life sexual experiences, this aspect is likely to disappear form gaming.
Comment: Play them [the Dead Alewives' D&D skit](https://www.youtube.com/watch?v=vChEPj0dXXk) to let them know that their behaviour is so stereotypically-immature that decades of gamers have already *pre-emptively* mocked them?
Comment: I would say the sexual harassment is just creepy regardless of why its happening. Handle it in game like it would be treated in life, I.E. have the barmaid they are can calling tell off, have them tossed out of the tavern by the burly bouncer, if its a lady, the town guard might even get involved.
Answer: New players are usually excited about the freedom in roleplaying games.
Players who are used to playing video games (which, for obvious reasons, are usually more streamlined and allow less freedom than tabletop roleplaying games) get quite excited about the fact that they can just tell you what they want to do, "and it happens". There are no real boundaries in tabletop roleplaying games, other than the system used.
This over-excitement and urge to "test the waters" and push the boundaries of the system should fade away naturally over time.
Try to excite them with interesting things to do, actual quests, without forcing them to do them. Introduce an NPC who asks them to do something for him. If they keep ignoring those opportunities and just keep fooling around, perhaps try casually asking them out-of-character what kind of quests they would like to experience. Try to keep these quests light-hearted and perhaps even comical, so that you can slowly move on towards more serious adventures - it sounds like it might be difficult for them to jump in straight into a serious, morbid quest.
Another way of limiting such behaviour is trying to introduce dice-rolls for certain actions (I'm not sure what sexual harassment should be treated as... diplomacy, or intimidation?) and let the system itself eliminate that behaviour. I've actually tried this before with one person who was "misbehaving" and it worked. As a DM you are allowed to push the boundaries of the system in such a way and treat certain actions as things requiring a dice roll. Obviously if they're really lucky they will continue being a menace, but perhaps the feeling that their action might not necessarily succeed might make them a bit more focused on the actual game. They don't sound like people who will be quoting pages from the core rulebook and not letting you do that, but don't overdo it.
If this juvenile behaviour continues, it might mean that they're sadly not the right people to play D&D with. From a psychological point of view either they try to impress others by behaving like "lads" instead of doing "boring stuff" like killing goblins and unlocking treasure chests, or perhaps that's just their way of saying that the whole concept of RPGs does not really interest them. It is hard sometimes to find the right people to play with, and as a DM you will get disappointed at least once, but that's a completely normal occurrence, especially when you invite new people to play with.
Answer: Agree on the rules of the table before the game starts.
Before you start a campaign with them, take them through the same page tool and talk to them about what they want to do at the table. If they want a game of PvP, hiding, and harassment, then enjoy that world!
In order to have rules, everyone must accept the rules. One thing I've noticed is that people tend to descend to silliness to mask nervousness, to upstage their friends, and to reduce necessary knowledge of the rules. Make sure your group accepts ignorance (not mocks it) and has a way of pausing and answering questions about the game.
Beyond that, players are not unlike puppies. Immediately reward actions you like, and do not reward actions you dislike. Note! Attention is a reward. If they spend lots of time in a tavern, but the group has decided that that's not what you all want, gloss over tavern scenes.
I like giving out bonuses (Ars Magica calls them confidence points) where you can use it for a +2 to an upcoming roll if you do something that I, as gm, approve of. These things include being ready for game, good roleplaying, or something that delights the table.
Beyond that, try to ritualize your gaming context. Agree with your group that if a certain large die or statue or something is on the table, you'll all try to act in character. Agree to take breaks, so you can joke. See if this works for you all.
From a communications point of view, the acting out you described is part of the Storming phase of small groups. Especially considering the age of your group, the best way to resolve storming is to talk about the actions and try to form consensus about what is and is not appropriate for that specific group. Part of this is to try to create a shared understanding of why certain things are inappropriate.
Answer: Give them some time.
We all have played those kind of sessions. It's typical to beginners players, or sometimes to players who are beginners in a specific game, or sometimes to players beginning a new campaign.
Your friends are just experimenting the freedom of the roleplaying format. In contrast with a videogame, they can do literally whatever they want (and characters are able to). They engage in this behaviour because it what is fun for them, and because they feel free.
Hopefully, in the next session continuing this way would be boring, and they will expect some plot. You'll have some mixed sessions with plot and silliness, but they will get increasingly interested in the story.
If that doesn't happen it's when I'd try more formal tools as the said same page tool and such.
Answer: Get the silly out of their system
Sounds like a bunch of new players wanting to go wild and let off steam; although aspects of what they're doing are more worrying - anyway...
What I'd suggest is taking a few games of more abstract and silly comedy RPGs so they can get the crazy out of their system and get interested in more long term games and aspects rather than just goofing around, which should - hopefully - get boring for them. As previously mentioned, you may need to find new players or determine if it's a single player leading them all astray.
Gamewise I'd suggest running a game or two of Paranoia - it's fun, brutal and actively encourages PvP and if they fall out of line, you can kill them in droves. Hopefully this will help them get to grips with games and then you can then move onto a more serious long term game.
Comment: or if they like sexual harrassment, [Macho Women with Guns](http://en.wikipedia.org/wiki/Macho_Women_with_Guns) might be a good, silly, game to play.
Answer: It seems to me that your core problem may be your players' lack of immersion in your game world.  Basically, it sounds like your players don't really care what happens to their characters, or to the world around them.  They don't see why they should go fight imaginary bandits or hunt for imaginary treasure, nor why they shouldn't grope the barmaids or moon the evil wizard, given that they won't gain or suffer any consequences for it.
In a word, they haven't really figured out what's supposed to make this "role-playing" stuff fun — and so they do the natural thing one does when given a boring toy to play with: try to break it and see if that makes it any more fun.
Obviously, you could try to engage your players by making their actions have consequences, but that's not very likely to go over well on its own.  On one hand, those consequences will still only touch the characters, not the players, and so your players may well decide to just ignore any in-game consequences that don't actually prevent them from wreaking more havoc.  And if you do force them to stop — say, by having the town guard arrive and drag the characters to jail — then you may find that you've just prevented your players from doing the only thing they currently find interesting in your game, and thus they may just decide that the game is boring and quit.
My recommendation, instead, would be to try the carrot instead of the stick: essentially, to try to lead the characters into the parts of the game you hope both you and they will find more interesting, rather than trying to beat them away from their current behavioral patterns.
One way to do that might be to have the action come to them: for example, instead of having the town guard come and arrest the characters, have their carousing and misbehavior be interrupted by a big monster attacking the tavern they're in.  Don't worry too much about how or why the monster came to be there — trust me, your players probably won't, either.  Just make sure that it's big, impressive, and something the players can defeat — but only if they band together and actually use their characters' skills.
I can't really stress the word "impressive" there too much.  At this stage, you can't really effectively motivate your players by the threat the monster presents to their characters' survival, so you'll have to play on their sense of "Wow, it'll be really cool if we can beat that thing!"
Once the players have defeated the monster and gained the appropriate rewards, then it's — hopefully — time to start figuring out answers to questions like "Why did it attack us?", "Where did it come from?" and, above all, "Where can we find more?"
Another, even more direct option for motivating your players to engage in the game could simply be to bribe them with an out-of-game reward.  So the king has offered a gold reward to anyone who defeats the evil sorcerer?  You can mention to your players that you'll also buy them pizza (or whatever works best for your players) to celebrate their victory if they can do it.  Just make sure to tell your players that it'll take at least a few sessions before they'll even stand a chance; by the time they finally do it, they'll hopefully be ready for the next challenge without even needing any extra rewards.
Of course, it's always possible that none of this may work, and that your players simply aren't interested in the kind of game you want to run.  If that's the case, the only real choices are to change the game (Paranoia has been recommended several times, or you might want to consider just getting a deck of Munchkin cards), change the players or change your expectations.
Actually, that last option may well be worth considering, anyway: just because your players would rather engage in wacky Chaotic Stupid[warning: TV Tropes] hijinks (regardless of their nominal alignment) than set out on your carefully planned quest to rid the world of an ancient evil, it doesn't necessarily mean you can't find a workable and, above all, fun middle ground.  Besides, even if the characters your players want to play are the masters of Doing Shenanigans And Getting Away With It, just think of all the juicy plot hooks their antics can create once the players start identifying with their characters even a little.  That barmaid they groped in the tavern two sessions ago?  Well, it turns out that her boyfriend is a high-level adventurer, and he's not amused...
Answer: I feel the root of this problem is that there is a mismatch of expectations between you and the players. Sit down and talk to them out of character about what they want/expect from an RPG at this point. I feel like #2 listed below is the best options for the problem you are facing as you and your friends can find a game together that fits what you are trying to achieve.
3 options:
1) Knuckle down on the rules. 4e implictly does not support PVP in any sense. Beyond that, try to use a pre-made module campaign. It will be railroady, but at the same time it will help them learn the system.
2) Change Systems. A lot of what you've described would fit a lot better in other RPG systems I've heard of like Paranoia and DungeonWorld.
3) Change players. As most other have focused on, these people just might not be the right people to play rpgs with right now.
Comment: I'm thinking Dungeon World might be a better fit for #2.
Comment: Some people have recommended it, but I think the "change player" option probably misses the point. He said he's playing with friends. Probably he is using gaming as an activity to hang over with those friends, not because he wants to play and don't care with who.
Comment: @Flamma Honestly I feel #2 is the best answer out of those I listed and #3 is the worst, but I still felt it was an option. Basically I feel this is ultimately an issue with mismatched expectations. I'll add that as a preface to my answer.
Comment: @aslum adding that to the answer.
Answer: The game can mature with them. Introduce real consequences for their behavior. Send a local Sherrif to them first. Have him explain that their behavior cannot be tolerated but since they are new to the area it will be overlooked this time.
If they continue, send someone with more authority accompanied by guards. Throw them in jail for a few nights.
If it continues, send a Paladin with his retinue.
You could create an entire campaign out of this. The players behaving badly, becoming outlaws, and constantly on the run from the law. Or, if they get their acts together they could one day be hired to enforce the very laws they have broken as a form of restitution to the community.
Comment: It's passive aggressive in that it doesn't sound like it's actually the kind of game that the GM wants to play, and that rather than getting the group together and saying "guys, I don't want to play 1970s style swords-and-sorcery DnD, I want to roleplay", he's punishing them in the hopes that they'll just kind of magically get the hint. Instead, what occurs here is that new players just think of roleplaying as this thing where you have to defeat the evil GM and his magical dice or whatever.
Comment: Whilst I agree with the general approach here you need to exercise to caution to avoid it coming over as passive-aggressive GMing
Comment: How would it be passive aggressive DMing? Player A commits a petty crime. A low level guard approaces Player A with a warning. Player A ignores the warning and commits a more heinous crime a week later. A higher level city official shows up to arrest Player A. DOES NOT EQUAL the DM being passive aggressive. It means that the world the player is playing in is a living, breathing, world that the players can immerse themselves into and have an impact on.
Answer: Set an appropriate play guideline, then step back.
I've mentioned my first Shadowrun campaign here before; and I had this exact problem, with people constantly wanting to go and get drunk/do 2060's drugs/raid a brothel, and the way that I got through it all was just saying "Okay, you do that. What's next?".
Basically, if players are doing something that makes you uncomfortable, either tell them outright to stop, or just gloss over the more explicit encounters. For bonus points, you can punish inebriated characters by having sudden combat/whatnot as soon as they get their dose/binge drinking and watch them flail around with reduced reaction times and whatnot. Alternatively, they are caught by an importnat ally when they're totally out of sorts and have to save face once they wind up vomiting/being caught in the act/thinking they're actually a space zebra intending to process them into dandelion feed. Just as in real life, the sort of antisocial behavior you don't want players' characters engaging in can have very real in-universe consequences.
My one caution would be to remain subtle about this-don't instantly kill them for getting drunk (even if real life sets a precedent for that both through alcohol poisoning and the wonders of canals), or getting a little too wild (in game, of course; I have a rule that if a player brings alcohol to a session it's their last game, if they're even allowed to stay for the session, which they usually aren't).
For less puerile behavior, such as PvP or hiding, sometimes it's okay to permit, especially if it fits the characters-I've had a character knock an ally unconscious because he disagreed with a decision to execute someone, and nobody complained, because it made sense for my character to do it (since it involved our boss wanting us to kill a hostage, and my character was against it, he had moral reasons to do so). The catch  there is that it's in-character, and I gave plenty of warning beforehand that it would lead to a fight. Hiding is often an expression of just wanting to do their own thing-if they want to go and do things they can, but life goes on around them-if they hide from the king's summons to go on a quest they may face exile for it, or if they're not around when the wagon train leaves, they'll get left behind.
Sexual harassment, on the other hand, is an iffy area. Very few people would be comfortable with it in real life, but a lot of people don't find anything wrong with their characters doing it. If it makes you really uncomfortable, put your foot down and explicitly forbid this. If your players won't listen, they're not appreciating you enough as a GM. If you're not necessarily uncomfortable with it, but would prefer that they focus on the plot, you need to entirely devalue the behavior so they won't do it again, especially by adding consequences. One way I avoided this while my group was puerile was to simply use primarily male NPC's, so that they didn't really have an opportunity to misbehave, though if you make it clear ahead of time that the NPC is powerful, or has powerful allies, feel free to bring in the firepower on the unruly group. In addition, if players violate the law, they may become persona non grata and be forced to look elsewhere; it may take a couple towns, but if adventures start to dry up because the band's reputation is so low even the criminals won't work with them they'll either shape up or break up.
Eventually, I've found that players will mellow out; puerile impulses aside I've found that my group, while still mostly the same individuals that caused a lot of angst me for the first few months, has become a lot more mellow and really fallen more into the traditional gameplay style that I try to encourage rather than running around on drug-addled brothel crawls.
Comment: If the players are teenagers, the sexism stuff might be tougher to deal with. Speaking up about that sort of thing can invite homophobic teasing, which is about equally disturbing. So proceed with caution on that point – if anyone has tips for dealing with this kind of immaturity, it'd be a good addition to the answer.
Comment: It's difficult to handle, at least as a fellow teenager. Studying education, I've been learning things on how to shut that down, but as a peer I think that it's a lot more difficult-however, if the GM is viewed with respect, his word is law. If players don't respect the GM, that's a problem in and of itself.

I was fortunate enough that my first group had a very strong woman in it, so nobody dared to be misogynistic around her.
Comment: +1 for the zebra (and the important ally with real life consequences)

How do I deal with these crazy PCs?


What can be said about the homotopy groups of a CW-complex in terms of its (co)homology?

Question: One example is the Hurewicz theorem which tells us that (e.g) a CW-cx with only one 0-cell has a nontrivial fundamental group if H_1 is nontrivial. What other examples are there? (The CW-complexes I have in mind always have exactly one 0-cell, but for the sake of a more wide discussion one could assume this is not generally true. However, I am mostly interested in the higher homotopy groups as I already know everything about the fundamental group.)
Comment: There's a bunch that can be said. To start getting a feel for your question, look at the Adams spectral sequence and, say, the Kan-Thurston theorem.  The first will get your hopes up and the second will (partially) dash them.
Comment: The cohomology of $S^n$ doesn't contain much information (nonzero only in degrees 0 and n), but its homotopy groups are really crazy in general, so do you have more specific details about your CW complexes?
Answer: Try looking up some references on rational homotopy theory. Rational homotopy theory studies the homotopy groups tensor Q, so basically you kill all torsion information. If we focus only on homotopy groups tensor Q, the question you ask becomes easier. As Steven Sam mentions in the comments, the homotopy groups of spheres are really crazy. But the rational homotopy groups of spheres are quite tractable (in fact completely known, by a theorem of Serre) and can be more or less obtained from cohomology, if I recall correctly.
One particularly impressive theorem, of Deligne-Griffiths-Morgan-Sullivan, says that if your space is a compact Kähler manifold (e.g. a smooth complex projective variety), and if you know its rational cohomology ring, then you can compute for instance the ranks of all of its homotopy groups (maybe you need an extra assumption that the space is simply connected or has nilpotent fundamental group).
Answer: If you don't want to make any assumptions about $\pi_1$, then I think the question is hard.
Maybe Hurewicz is most of what you can say. If assume something like simply connected, you can say a lot more. There are many things you can say rationally, some of which were pointed bout my Kevin, but even integrally or mod p there are a lot of techniques. Can you be more precise about the setup you are interested in?
You can always replace a connected CW complex with a homotopy equivalent one that has a single 0-cell, so this is not really an issue.


What is the most powerful one handed weapon in Skyrim?

Question:
Possible Duplicate:
Is there a definitive 'Best Weapon' for each weapon type in Skyrim?

What is the most powerful one handed weapon in terms of damage in Skyrim?
Answer: A daedric sword with fortify one-handed and absorb health is very powerful. Add another 3 items with fortify one-handed and you can get 400+ damage with one sword. Also a sword is much faster then an axe and a mace. also remember to improve it at a grindstone if you have arcane smithing and deadric smithing.
Comment: How can i get that ? Or i should forge it ?
Comment: @Mori: You need to forge it. I didn't come across such a weapon yet.
Answer: The Daedric weapons are the 'best' in the game. If you have a set of smithing armor max'd with Fortify Smithing, then you can improve both the deadric weapons you find and craft your own.  If you have enchanting max'd out (and armor that fortifies enchantment) then you can also give even better effects to your daedric weapon than can be found in the wild. It all depends on what you want to do.
Comment: My smithing is 80 ,but I only have "improve magical items" ability,are 'deadric weapons available in normal forgers ?
Comment: @Mori: If you max out the perks for Smithing, yes. For enchanting, you want to max out the center tree perks (go up the 'dual perk' tree)
Answer: You can Drop and Improve any weapon in he game,but you can only Create it if you have the respective perk for doing so.
There is no such thing as "better" one handed weapon in the game, it all depends on your playstyle among with the perks you are willing to invest, and the presence or any enchantment.
Swords do less damage,but they hit faster and have critical strike chance perk, with enchantments it will do more damage because of the frequence of the enchantment will hit
Axes do more damage, but they are a slower than swords, and have perks to make your oponent bleed, which can lead you do kill him without having to stay for the finishing move
Maces do great damage, but they are slow as hell, tho they have perks that makes you ignore armor when you hit (reminding that everying in skyrim have armor,even animals,giants, and all sort of creature).
Make your choice and be happy, but, if you have no points in one handed weapon for extra damage, or either have any skills leveled as one handed, your damage will be too low, with any weapon.
Comment: Hmm,bot being a warrior is fun anyway,but the true power is in magic


Electron gun - electron in cylindrical anode

Question: In an electron gun, the heating filament heats the cathode, releasing electrons by thermionic emission. I've read that "electrons are negatively charged particles and the positively charged cylindrical anode develops a strong electric field that exerts a force on the electrons, accelerating them along the tube". However, I don't think that this explanation is very clear, and I was wondering specifically how the "strong electric field" inside the cylindrical anode is able to accelerate the electrons?
Comment: Just to clarify your question a little bit, are you asking how an electric field accelerates a charged particle? Or are you asking if the cylindrical symmetry of the anode should result in zero electric field?
Answer: any electric field will accelerate electrons, according to the Lorentz force law:
$\vec{F} = q \vec{E} + \vec{v} \times \vec{B}$,
where q is the charge of the electron, and $\vec{E}$ is the electric field.  I assume there is no magnetic field in this example, so the second term is zero.
Answer: The acceleration mostly happens in the gap between the cylindrical anode's edge and the cathode.   The field becomes uniform inside  a relatively long cylinder so there is no acceleration there.  I am sure others can elaborate this but I think I found the important part of your question.  Some book made an error.


Centos or Scientific Linux

Question: When I need to create a new server I've always chosen Centos mainly for it's compatibility with Red Hat which i consider the standard de-facto for the general purpose linux server.
Now the problem is that Red Hat 6 has been out for quite a while and there is no sign of the Centos 6 (event Centos 5.6 iso is still missing).
As in the need to create a new server what will you do? Stay whit the old Centos 5.5 or switch to the recently released Scientific Linux 6.0?
I looked on SL 6.0 website and they declare great attention to compatibility with RH, I've never tried it by myself so I just wanted someone's real life opinion.
Answer: Both projects, of course, are binary-compatible rebuilds from the source provided by Red Hat. The primary differences are in the development/build model.
CentOS only makes changes to remove Red Hat branding, or very occasionally as a last measure to get something to build. They aim to be bug-for-bug compatible with Red Hat Enterprise Linux.
Scientific Linux makes more customizations and additions, for example building OpenAFS packages. (They do keep the SRPMs for these separate, though.)
CentOS is a "community" distribution, but it's really built and maintained by a small (but active) group of volunteer developers in a closed manner. The lack of communication from this group is sometimes frustrating and I think a problem they need to solve. Scientific Linux is much more open in its development model, and it's a lot easier to see what's going on.
In my impression, Scientific Linux is a lot more likely to accept "get it working" hacks, and CentOS a bit more careful, even if it means delay — as in the case of the CentOS 6 release.
Both are in production use at a lot of serious institutions. I don't think the delay of the CentOS 6 release is a huge cause for concern — it's just the way things are. (I think prioritizing 5.6 was the right move, since that's blocking some security updates. The fact that that's not done yet is more worrying.) Hopefully after the actual work of getting the release out the door is done there can be some evaluation and maybe some changes made in communication of status. But I also think you won't go wrong deciding to use Scientific Linux now. They're basically interchangeable, after all, and it shouldn't be terribly painful to switch if you change your mind later.
If your system is on the front lines and is mission-critical for your business, buying a Red Hat Enterprise Linux subscription should also be on your list of options to consider. It's pricey, but not that pricey all considered, and by their nature CentOS and Scientific Linux always have some latency in getting security updates out the door.
Answer: Oracle Linux has the same close update repositories as Red Hat.
I have two kind of servers, mission critical and not. I usually use the least critical servers to try out the new features to be ready when I need to create a new mission critical machine (usually with a RH license), this is the main reason for wich I usually try out the latest RH clone available.
They usually aren't on the frontline.
Answer: Use CentOS, because the development of Scientific Linux is discontinued (here the mailing list announcement).
Answer: It all depends if you need the newer functionality, if not I would stick with Centos.
Bear in mind the Red Hat Support lifecycle when making your decision.
You could also consider Oracle Linux
Comment: (In my "regular user" voice, not speaking specifically as a moderator.) Please add some "why" to your statements.

Centos or Scientific Linux


Why do fixed lens cameras have a motorized zoom while interchangeable lens cameras don't?

Question: I would like to know why motorized zoom (controlled by a W/T lever) is always on fixed-lens cameras and never on interchangeable lens cameras.
Answer: I think it's mostly to do with how you hold the camera, most people hold small pocket P&S cameras by the body with both hands. It would be fiddly to try and reach round for a tiny zoom ring on the lens (which is delicate enough without people trying to grab and turn it). Also the zoom ring would have to be incorporated into the collapsible lens assembly, which would be harder than merely including a motor.
With an SLR most people grip the body with their right hand, and support the lens with their left. Given this setup it's easy to zoom the lens manually, making a zoom motor redundant.
Comment: But what about bridge cameras? They are not small or fiddly.
Answer: I had motorized zoom lenses on the Minolta Maxxum (Dynax elsewhere) xi series, and it had its advantages and disadvantages. The disadvantage, as has been noted in other answers, was that zooming was slower and less precise than manual zoom. (Remember that lenses on SLRs tend to be bigger and heavier than lenses on compact cameras.) There was one big advantage, though, and that was that the lens could be set to zoom according to the focus distance, maintaining the size of a moving subject automatically.
The feature was only ever available on relatively "slow", inexpensive consumer-level lenses in the dying days of the 35mm film era, so I don't know if it can be said that it was given a fair shot at life. I found the zoom speed annoying for single shots, but the autozoom paid for itself several times over shooting runway fashion. I would love to have seen something more responsive on faster lenses, but Minolta was in trouble at the time and photography was in the process of reinventing itself for the digital era. I wouldn't be surprised to see something like that technology re-emerge, but I'd expect it to be very much a niche product.
Answer: Typicaly:
Mechanical Lenses: Infinitely precise, fast, quiet.
Electronic Lenses: Discrete steps, slow, noisy, smaller.
The former is obviously most desirable. This is why DSLR lenses are almost always mechanical where performance is prioritized over size and cost.
Electronic zooms have the advantage of being smaller and allow a completely retractable design which is used to make most fixed-lens cameras small.
As usual, there are exceptions since electronic zooms can be made to operate smoothly and at a controlled speed which is actually better for video since one sees the zooming in progress. Very few fixed-lens cameras have mechanical zooms which is truly a shame. Presently, Fuji is the only one to still do it.
Comment: Why is motorized zoom *always* on bridge cameras, then, except those you linked to?
Comment: See paragraph 5: The electronic zoom allows for a completely retractable design which makes cameras smaller. And paragraph 6: Electronic zooms have an advantage while shooting video since they can advance more smoothly.
Answer: I'm going to take a guess, but the main reason will be Cost. If every lens had to have it's own bulky zoom mechanism the cost of the lens would rocket. Also every camera would need a compatible interface with the zoom mechanism.
Also motorized zooming is slow, and the kind of people who use interchangeable lenses are not going to want slow zoom.
I can only see downsides to having it motorised on interchangeable lenses. On fixed lens cameras though, the lenses are often too small and fiddley to accurately zoom because sensor sizes are smaller, and with usually only a live view screen to look at, motorised zoom makes more sense.
Comment: But what about bridge cameras? They are not small or fiddly.
Answer: There are actually interchangeable lenses with motorized zooms, for example Panasonic LUMIX GF3X. The reason it uses motorized zoom is to cut size and cost. Hand-rotated zoom tends to be faster and without discrete steps, but the zooming ring takes space and adds to the cost.


How does using salt reduce rainbow table attack?

Question: I could create a rainbow table for a particular salt value and still create a successful attack similar to one without salt value.
Comment: And creating that rainbow table is more expensive than cracking the password directly. Salts force an attacker to attack each password individually, no more, no less.
Comment: Additionally, salts should not be reused. They should be unique for each password.
Answer: The point of a rainbow table for password cracking is to allow attacking multiple password hashes with only a little less work than for cracking a single password hash.
Building a rainbow table takes about as much time as worst time for cracking a single password hash (just calculating the crypto operations, not the table overhead). This is about double the time of the average cracking time, assuming an equal distribution.
This means for attacking a single password, a rainbow table only has the advantage that it can be build before we actually know the hash that is searched. A rainbow table only really pays when attacking multiple passwords, since the lookup is quite faster than building the table (the actual lookup time depends on the space used for the table).
When we build a new table for each single salt, we lose both advantages – we can't build the table before knowing the salt, and we can't use it for more than one password (assuming the salt is unique).
So you still can attack a salted password with a rainbow table, but this is more costly than attacking it directly – in other words, a rainbow table is useless.
Answer: Let's say you have enough computing power to calculate the MD5 hashes of all 7 character passwords using the 95 characters commonly found on a US keyboard1.
There are $95^7\approx2^{46}\approx7\cdot10^{13}$ such passwords. Since every MD5 hash is 16 bytes long, you'll need approximately $7\cdot10^{13}\cdot16\approx1.1\cdot10^{15}$ bytes (i.e., $1120$ TB) of storage to store them all (slightly less if you store them cleverly).
You only have to do the work ($2^{46}$ MD5 computations) once, and at the expense of $1120$ TB of storage, you can crack every 7 character password ever generfated that's simply hashed using MD5.
A slightly better would be using a salt concatenated to the passwords before storing them. A pre-computed rainbow table will be useless if the salt is long enough. For a 64-bit salt, a rainbow table useful for cracking those 7 character passwords work require $2^{46}\cdot2^{64}=2^{100}$ MD5 computations to be created and approximately $1120\cdot2^{64}\approx20000000000000000000000$ TB of storage.
Of course, cracking all 7 passwords in a database will still take only $2^{46}$ MD5 computations (and negligible storage) if the same salt is used for all passwords. That's why a different salt should be used for every password. This way, every password needs roughly $2^{45}$ MD5 computations2 to be cracked.

1 Used as base for computations to show how incredibly weak 7 character passwords become if they're stored this way. But even if stored as a salted hash, 46-bit passwords are still pretty weak.
2 Statistically, you'll need to try only half of them until you find the right one.


Do stars have exactly sphere shape?

Question: Planets (at least, some of them like Earth) aren't exactly spherical - but what about stars?
Is Sun perfectly spherical, for example? What may be the reasons if it isn't? What about other stars?
Comment: nothing real is perfectly spherical.
Comment: @Walter the question is mostly dedicated to its reason in the aspect of stars.
Answer: No, no stars have an exactly spherical shape. The reason for this is that the centrifugal force of the star's rotation is much greater at the equator of the star than it is at the poles, for the simple reason that the rotational velocity is greater. This greater centrifugal force pushes the equator outwards, stretching the star into an oblate shape. This is called gravity darkening.
Because we have only visually resolved the surfaces of a few other stars, it's not something that is commonly directly observed (though the effect can also be observed from stellar spectra). Regulus is one star that has been observed as an oblate spheroid spectrographically. The image below shows the star Altair, directly imaged using the CHANDRA space telescope. Go here for an animation!

Some stars are also non-spherical due to the effects of a nearby star in a close binary orbit. Much like how the Moon causes tides on Earth, two stars can stretch each other's surfaces. If they're very close to one another, as in the picture below, there can even be mass transfer between them (ref common envelope).
Comment: Also of note worthy is Vega which is egg-like.  Unlike Regulus, Vega is a solo-star, not a multi-star system.  Therefore Regulus' shaped could be an effect of the companion stars on it.  http://futurism.com/5-weird-stars-found-galaxy/
Answer: As well as being oblate, like most large spinning bodies, there is a high degree of turbulence in any heated gaseous body, whether that be large gas planets, like Jupiter, or stars.
Have a look at this NASA photo of the sun as an example:

You can see a wide range of non-spherical details.
Answer: No (1. All stars rotate to some degree and hence are slightly oblate. 2. stars have no surface like a rocky planet, what we see is the photosphere, i.e. the surface from which light escapes without being (much) absorbed or scattered. This surface, however, is constantly moving due to convection. 3. close binary stars are affected by their partner's tide.)

Do stars have exactly sphere shape?


Carbon seatpost dip in?

Question: Can I insert a carbon seatpost up to 20cm deep into seat tube? The seattube is carbon as well. Total length of the seatpost is 35cm. The shape of the seatpost is aero seatpost (tear drop shape). It's a Pinarello Dogma.
Comment: Is the teardrop shape the entire length or just the exposed section?
Comment: Are you sure the bike fits you?
Answer: On most frames, yes, you can put as much of the post into the frame as you'd like. However, you are likely to remove graphics, and scratch the top coat of the carbon, so if you care about things like that, don't put it farther into the frame than is necessary.
If it is a permanent position, cut it, as suggested above. Be sure to check the manufacturers' recommendations for your post. Not every post can be cut to any length.
If you need to, try to put it at that position, gently. If anything stops, sticks, blocks it, or doesn't feel right, stop.
Answer: Sure you could,  Only the top two or three inches of the seat tube are machined to match the diameter of the seatpost.  But my question is why you'd want to do so.  Cut the seatpost off!!  You don't need more than about 4 - 5 inches inside the frame.  Put a fine-tooth blade in your hacksaw, wrap some good tape just above where you are going to cut it, clamp the part you're cutting off in a vise, and saw away--gently--don't press down too hard on the saw.  It'll turn out just fine.
Comment: Sawing carbon by yourself can fray the fibers. If you insist on doing this, get a carbon-specific blade (it will effectively "sand" through rather than cut).

Carbon seatpost dip in?


Ubuntu 12.10 Network LAN issues

Question: OK, so I recently started using Linux Ubuntu, and well I've been trying to for about a week now to LAN connect several computers at my house. But here's the issue I keep running into, 2 of the 3 computers can see each other since they have samba, yet they cannot see the third computer. And the third computer cannot see them. All of the computers have Samba, and are all on the same hub. I've been trying to troubleshoot it, but it seems a little harder than windows to fix. The OS I've been running on the computers is 2 of them have Ubuntu 12.10 and one has 12.04. One of the 12.10 and the 12.04 can see each other but the other 12.10 cannot see either one. Can anybody help?
Comment: Are all of the 3 computers using Ubuntu?
Comment: could be a firewall issue. Try turning off any firewalls.
Answer: It is difficult to tell from the information you posted. It could be anything from a firewall issue to misconfigured samba shares.
I suggest you start by turning your firewall off on all 3 computers.
Then if the shares do not show, debug your network using ping.
If ping is working, then manually mount the shares on the command line and post any error message.
<code>smbclient -L //server -U user

sudo mount -t cifs //myserver_ip_address/myshare ~/mnt -o username=samb_user,noexec
</code>
You have to change "server" to your server name or ip address, "user" to your actual user on the server, "myshare" to the actual share name, etc.
For details see
Ubuntu shares not visible on the network
How to turn on Network Discovery and Share between computers with Samba
https://help.ubuntu.com/community/Samba/SambaClientGuide
Answer: The first thing I would do is get the IP address of each machine. Ping the machine that is not showing up to make sure it is on the network. Samba uses UDP ports 137, 138 and TCP ports 139, 445. The default firewall for Ubuntu is ufw. Hopefully all you need to do is configure firewall rules (using ufw) to allow those ports to be used.
Answer: First, ensure your 12.10 computers don't have the same host name. Then, test for basic connectivity, and work your way up to accessing the samba share. Can you ping from the problem machine to the other machines and vice versa? Once you have verified ping works, I would try running a network port scan against the problem machine from one of the other machines with nmap. On one of the other non-problem machines, hit ctrl+alt+t for the terminal, then type sudo apt-get install nmap ,hit enter and authenticate to install nmap. With the command nmap , you can run a port scan against one of the other machine's IP addresses to see if the samba ports(i.e., 139, 445) are open. I would compare the port scan of a working machine to the non-working machine to ensure they are the same. If the appropriate ports are not showing as open, check for the status of Ubuntu Firewall on the problem machine with sudo ufw status, and make changes to your firewall as necessary. I don't think UFW is installed on 12.10 by default, anyway, but it's worth checking the status to see. After that, I suggest following the tips at the article below to get your samba setup correctly on the problem machine.
http://www.unixmen.com/howto-install-and-configure-samba-share-in-ubuntu/
Answer: The way Windows shares files and printers is called SMB. The people from the SAMBA project have implemented all of Microsoft's protocols and specifications for Linux. Ubuntu therefore supports the same sort of file sharing as Windows, which is called Samba.
You can use SAMBA to share files between Linux machines. In fact, you might prefer it in case you have, for example, have a friend over with their Windows computer.
Alternatively, you can use The Linux Way of sharing files, which is NFS (Network File System) - This answer to a previous question explains how to do it. (but it's rather technical)
So, when the Sharing Options dialogue asks you to install the packages, you're not actually installing any Microsoft software or anything like that. Go ahead and do it, it's perfectly safe.
Comment: I've already installed the packages, in Linux. I'm trying to figure out why only 2 of my computers can see each other in network browsing. And why the 3rd cannot see either one of the other 2 computers, when all of the computers are on the same hub.

Ubuntu 12.10 Network LAN issues


How do I stop my two year old from staying awake for 3-4 hours in the night?

Question: Since my daughter has been 10 months old she has not slept through the night.  She is now two years old. She used to sleep very well, where she would go to sleep at 8pm and then wake up at 8am.
However, for some reason at 10 months, she would wake up at around 2am and then not go back to sleep till 3-6am. It varies every night. She starts off in her own bed, and then she walks to my room, gets into the bed and then tosses and turns for hours. She will start talking and shouting randomly and then make hand gestures as if she is eating. I feel she wants to go back to sleep but she can't.
We have tried to put her back to sleep in her own bed, but because she shares the room with her brother, we are afraid she disturbs him, with the talking and shouting. We have tried cutting out her day nap, giving her milk in the night, changing diapers but nothing makes a difference. Sometimes out of the blue she will sleep through the night, but I cannot see any difference in the way we have put her to sleep or anything different in her daytime routine.
I am so exhausted as I have a 5 year old and a 11 month old. I just don't know how to tackle this problem.
Comment: Is she perhaps overtired?  If you post a complete schedule someone familiar with toddler napping and sleep may be able to provide feedback.
Answer: this is pretty common. One probable cause is that she knows that if she comes thought to you she will be allowed to stay- so you will need to make it plain that she has to stay in her own bed.
There are different ways to do this - but all will take patience and persistence, as you have to let her know that even if she comes to your room she will be taken straight back (ideally in silence, and without a cuddle, so she doesn't associate reward with the visit) - it is conditioning: children can soon learn that when a particular activity doesn't gain any reward they might as well give up.
Also see How do you stop a toddler from trying to get into bed with her parents in the middle of the night?
Answer: I can't imagine you are getting much sleep with her tossing and turning in your bed. I would probably start by getting her a sleeping bag, and leaving it at the foot of your bed. Let her know that in the future, if she can't sleep and wishes to come sleep in your room she is to use her sleeping bag and sleep at the foot of the bed instead of getting into bed with you. Move her out of bed and into the sleeping bag, or return her to her own bed as needed until she "gets" the new rule.
Secondly, I would discuss with her pediatrician whether her behavior is indicative of sleepwalking or not, because solutions for sleepwalking may look quite different than solutions for someone who gets lonely in the middle of the night, or has trouble re-settling herself if she wakes up.
And I would also mention that some parents swear by melatonin to help their children sleep restfully who otherwise have tons of trouble falling asleep quickly and staying asleep. Obviously, you would want to rule out sleepwalking as a cause first and discuss appropriate dosage with her pediatrician before trying this.
Comment: +1 for putting up sleepwalking as an explanation, and I like the sleeping bag idea. As you say, always _always_ discuss medication with the pediatrician first.
Answer: I think you know what you need to do, you need to stop her getting into bed with you, but you are worried about disturbing the sleep of your son. If she had her own room you'd have dealt with that problem already. Unfortunately you are just going to have to deal with her sleeping in the same bed with you even if it disturbs your son. Put a stair gate up and let her cry it out. Ways that might make it easier:

Get her tired out every night. The more tired she is the less likely she is to wake up
Eliminate noise and light, although that's unlikely to be a problem at 2am it's still worth looking at what might be waking her
Put water next to her bed, it's a small thing but you never know how what little things make a difference


Migrating ArcGIS Server 10.02 to a new server

Question: Our server that runs ArcGIS Server had major issues this morning, sending us into a panic to get it installed on a new server (as was in our plans in the coming weeks). Now that we are ready to move all our services/applications over I've come to realize I have no idea where to begin. Is there any method to copy the data over to the new server and still be able to use ArcGIS Server without having to re-create all our applications? I copied the services and applications, but, not to my surprise, it didn't work. I tried IIS Web Deploy, but run into issues. Any help would be greatly appreciated!
Comment: How is your current ArcGIS Server setup? Do you have a fail safe on your new system? (ie a redundant server)
Answer: Here's how we ended up doing it. It was a several day process, and as ujjwalesri suggested, a fail-over as a standard configuration is the way to go. However, we weren't lucky enough to have a fail-over. For the most part this worked, but we encountered a couple issues.
After installation of ArcGIS Server and post install, etc. we copied over the files from the server/user/cfg folder. Paste these into the same location on the new server. (This assumes that the new server is accessing the mxd/msd through a network and that those documents are not local to the server.)
Next, copy the applications from the inetpub/wwwroot folder. Again, paste these into the inetpub/wwwroot folder on the new server.
Edit the Sites XML document found in the inetpub/wwwroot/ArcGIS/Manager/App Data (ArcGIS may be replaced by your named instance.) The Host tag will be edited within the sites XML document.
IIS 7 was used on the new server, whereas IIS 6 was used on the old server. This was an issue only in the sense that I haven't used IIS 7, and it is very different. Find the applications that were just pasted into the wwwroot folder in the IIS 7 manager, under default website, and right-click and select Convert to Application.
Next, change all references to the old server in the code found in the inetpub/wwwroot/[application name]. I found the server references in numerous files throughout the folders. By editing each service in the ArcGIS Server Manager, and selecting the correct output directories, etc., the CFG files were updated appropriately.
Eventually esri sent us these instructions...a little late:
Server Configuration Files
And
HowTo:  Move a ArcGIS Server .NET Web application to a new Web server machine
I hope this helps someone. It can be done, it's just a major pain trying to find all the references to server names.
Answer: You can try using backup software like Norton Ghost. Using this you can create an "image" of your server and create an exact replica on another server. However, you need to consider certain things in mind:

If the source server has some software issues, because of which you're creating another instance, the issues will also port to the new machine!
If the server size is very large, this method can take painfully long time and disk space. Be judicious here.

Ideally, you should create a fail-over as a standard configuration to avoid such issues.
Cheers!
Answer: We recently experienced a similar problem, the boot disk on the machine hosting ArcGIS Server 10 was failing and we needed to move the server in a hurry. I'm working in an academic lab, which has nowhere near the manpower, cash, or foresight for a failover server...
Our setup was a bit different than described here, we didn't have any custom web apps in IIS, but were using an MSSQL database with ArcSDE.
Copying and pasting the server/user/cfg files from the old server to the new worked like a charm for me. I decided to go a step further than just moving our .mxd map files, which had been scattered all over on the original server by different developers: I consolidated all the files in one directory on the new server and modified the directory paths in the .cfg files to point there. Installing ArcGIS Server, copying over the modified .cfgs, and restarting the Server Object Manager service was all that it took for ArcGIS to find the maps and start their services.
A note on moving the .mxd files themselves, you do need to stop all of the ArcGIS services using them, or you won't even be able to copy the files. Incidentally, inspecting the config files was extremely useful for locating the .mxd files in use, in case someone has added a folder connection (say, their desktop) that has hundreds of files and folders in it.
Moving our ArcSDE MSSQL database was a bit more challenging. Performing a database backup and restore didn't work for us, and I do not know why. Detaching the database on the old server, transferring the .mdf file to the new server, and reattaching, did work. Between the several tries it took to restore the database, I cannot remember if the SDE post installation wizard was able to set the database up correctly with a user account on the new system or not, but I do remember at one point manually removing permissions of the (old) sde MSSQL account on the attached database and adding permissions for the (new) sde MSSQL account on the new instance.
Another minor problem was that the old .mxd files with SDE layers were all pointing to the old server! In my case there were only a dozen layers in total and this was easy to fix manually, by opening each map file and aiming each layer at the SDE database on the new server (properties > source > set data source). I have no idea if it's possible to automate this for larger deployments. Just watch out that your SDE data isn't coming from somewhere unexpected, or you may get a surprise when the original server goes down for good.
A note on reinstalling ArcGIS server, while building the new server we experienced an issue with IIS that led to it being removed and re-added (whether this was necessary or not is another discussion... we're students, not sysadmins), and necessitated reinstalling ArcGIS server too. I experienced an issue where ArcGIS server did not uninstall cleanly, it was maintaining associations with websites in IIS that were broken and unfixable (within our understanding!). The server management app and rest services were being reinstalled in this broken site, with no option to change the destination in the installer. Deleting the old ArcGIS server folder and removing the ArcGIS application pools in IIS fixed the problem, alternatively you can investigate the silent install option which allows you to specify the site where those apps are installed.
A big tip for anyone installing ArcGIS Server: create a blank website in IIS to hold the ArcGIS apps before running the installation. Keeping ArcGIS from getting entangled in another site, even if it's just the default site, was worthwhile in my case.
All in all, the experience of moving an ArcGIS install was more pain free than I expected, most of the files can simply be moved over and 'just work' on the new system. Best of luck with your own server move, here's hoping yours is a little less insane than mine.
Answer: There is no direct copy methods; you will need to copy your data/source directories to the new machine, then connect to that machine via ArcCatalog and remount all your various services. Once you have done this; you will need to update all your apps to use the new server name compared to the old (most people setup a config file or have constants defined in pages/apps for simple update).
Without a clear picture of your whole system we can't give you step-by-step guidance; but your basic are going to be to migrate your data/msd etc to the new machine and slowly add the services back.
Answer: Try this Article out, explains what's going on:
ArcGIS Server Error After Service Pack Install or Post Install


Which sex has higher variance of reproductive rate in modern societies - male or females?

Question: Who has a more varied reproduction rate in modern western societies - men or women? The average rate is the same of course, but I wonder which sex have higher variance - higher variance means that reproduction is more concentrated in some subgroup of given sex so this subgroup transfer their genes at higher rates then average rate in whole population. The next question would be 'is that subgroup somehow homogeneous' ?
Comment: Good question.  I wouldn't be surprised if the distributions of fecundity (offspring reduced) were multi-modal (have more than one peak).  When you just look at sex, the answer is lopsided in more than one way.  http://www.telegraph.co.uk/news/newstopics/howaboutthat/3685314/Young-women-have-more-sexual-partners-than-men.html  http://www.nytimes.com/2007/08/12/weekinreview/12kolata.html
Comment: The problem with Bateman is that he was only looking at zygote production. There are many more factors influencing reproductive variance aside from number of sperm vs. number of eggs. If I were you, I'd read the book titled "Dr. Tatiana's Sex Advice to All Creation: The Definitive Guide to the Evolutionary Biology of Sex." The author is Olivia Judson (by the way, it's a very fun read and it is hysterical :)). In her book, she gives numerous examples of species wherein the females have a much higher rate of reproductive variance than traditionally thought. I hope I've helped!
Answer: Sperm are cheaper than eggs
According to Bateman's Principle the males of a species are (typically) more able to produce a greater variance in the number of offspring. This is because generally the males can produce many gametes and achieve many matings whereas females are limited by the number of eggs, resources, and time lost to pregnancy. Therefore, just by simple logic, it would appear likely that males have greater variance in mating success (strong/attractive males would be able to mate with many females while weak/unattractive males would have little to no offspring). See Wikipedia for an introduction to Bateman's Principle. Also see this paper about sexual selection and mating success variance.
An Example
An extreme example of higher variance in male mating success is that seen in lekking species. These species form groups of males called leks where females enter and choose mates. Often one/few males will sire the majority of offspring in the next generation. Fallow deer are one lekking species where males have higher mating success variation than expected by chance.
In Humans
Here is a blog post discussing a paper which showed that males have greater reproductive success variance than females in humans. In the paper see table 1 (Vm:Vf column) which indicates the majority, particularly those close to ancestral type lifestyles, have much greater variance in male reproductive success. Only one measured (Finland) is the reverse pattern.
Comment: nice reference.  polygamous cultures are a good illustration (see blog post table 1) of how 'some guys get all the luck'.


What is Aliasing and Anti-Aliasing?

Question: What is Aliasing and Anti-Aliasing? Is it a bad thing to have in an image? If so how to avoid it?
If you can describe your answer using examples then that would be great.
Answer: Aliasing means quite a few different things. They're all generally related (effects from digital sampling) but in different situations, it takes considerably different forms. For example, even though they're both digital graphics, what you see with a digital camera is considerably different than what you see in computer generated graphics (and both are entirely different from aliasing in digital audio).
The kind of aliasing you deal with in digital photography happens when detail in the image, when projected onto the sensor is roughly the same size or smaller than a single pixel in the sensor.
This can lead to Moire patterns and false color in the image. Just for example, let's assume there was an extremely fine white line across the image. If its width (as projected on the sensor) is smaller than the width of a sensor well, then it will show up as the color(s) of the sensor wells it happens to be projected on, rather than the actual color of the light. Even though it contains (we'll assume) exactly equal amounts of red, green, and blue, its small size prevents it from affecting all three colors of sensors equally, so it only shows up as the colors of the sensor wells it happens to strike.
Moire patterns (another artifact of aliasing) happen from interference between detail in the subject matter, and the grid of the sensor. This one is pretty easy to show:

The diagonal "stripe" patterns are from interference between the grid of the LCD I was taking a picture of, and the grid of the sensor wells in the camera. When I look at the screen, I don't see anything like that, but when taking a picture of the screen with a digital camera, it's hard to avoid.
Though most people don't take pictures of LCD screens a lot, other subjects with fine detail can as well, especially if it follows a grid-like pattern. Cloth, for one example, is notorious for causing problems, especially with cameras that don't have antialiasing filters.
As far as what you do it about it, you use an antialiasing filter. An antialiasing filter is basically just a low-pass filter, that limits the frequency you sample to something below the "Nyquist limit" for the sampling you're doing. In the case of a digital camera, that's a few sheets of glass almost directly in front of the sensor, that blur the image ever so slightly. The intent is to ensure that the finest dot of light projected on the sensor will cover at one complete red/green/blue sensor group.
As you can probably guess, this is a bit of a balancing game. If you blur the image too much, customers will be unhappy because the images aren't "sharp". If you blur it too little, they'll be unhappy because of aliasing artifacts. In most cases, you can get aliasing artifacts in extreme cases (e.g., the camera I used to take the picture above has an AA filter), and of course people still wish the pictures were sharper.
In a few cases (e.g., Nikon D800 vs. D800E) they've simply let the customer pick their poison, so to speak. To an extent, you get the same choice between typical DLSRs (most have AA filters) and medium format cameras (most don't).
I should add that without an AA filter, aliasing can lead to "false detail" -- what looks like extremely fine detail in the image, but is really just a sampling artifact. This can give a result that looks impressively sharp -- but some of that detail has almost no basis in reality at all.
Answer: Aliasing is characterised by "jagged" diagonal lines.
If you try to draw a diagonal line on a pixelated image where each pixel can be only either black or white it will appear stepped or jagged, as in this very bad example:
<code>----
    ----
        ----
</code>
So if you have hard edge in a digital image you will get this effect regardless of the number of colours used.
To reduce the impact of this the line is softened or blurred so that it is spread out over a wider area, with a mid tone (or three) used to blend the line with the background:
<code>---..
  ..---..
      ..---
</code>
Here I'm using the dots to represent the blurring. They would be grey to the dashes black and the background's white.
This image shows the effect:

Source
It's normally an effect of computer generated images or those created by graphic design programs, but you can see the effect in photographs if you enlarge them too much or if it's a photograph of something with very hard edges. The lossy compression algorithms used by jpeg encoding provide a "natural" anti-aliasing effect as the sampling has the same averaging effect over the pixels.
Comment: thanks for the answer, it's actually easy to understand but it's not specific to the context of photography...
Comment: Jagged lines are a form of aliasing, but generally not the sort of interest to photographers.
Answer: In almost every practical sensor, parts of each pixel or pixel cluster will be more sensitive to light than other parts.  If an image which is focused on the sensor has a dense pattern of light and dark areas whose spacing is close to that of the pixels or clusters, the perceived brightness of that image may be affected by whether the light parts of the pattern fall on the regions of the sensor which are more sensitive, or those which are less sensitive.  In some cases, depending upon the sensor design, the perceived color of the image may also be affected.
Suppose that a camera has a sensor with a 3840x2048 grid of dots which are arranged in 2x2 clusters, with each cluster containing two diagonally-opposite green-sensitive dots, as well as one red-sensitive dot and one green-sensitive dot.  One points the camera at a 385cm-wide signboard which is covered with alternating 1mm vertical white stripes and 1mm black stripes, such that the width of the signboard is precisely focused on the sensor and precisely fills it.  In some areas of the sensor, the white stripes will be focused almost entirely on red and green dots; in other areas, the white stripes will fall almost entirely on green and blue dots.  The net effect will be that parts of the image will appear yellow and parts will appear cyan.
If the image had been slightly out of focus, the entire sign would have appeared as a uniform gray; in fact, that is how the image should have appeared.  The perfect focusing, however, will have ruined the image.  The stripes of false color would be incorporated into the image in such a fashion that they could not be removed without killing a lot of real color detail.
Anti-aliasing in a sensor is a means of adding a controlled amount of "blur" to ensure that even a perfectly-focused image won't be "too perfect".  If an image is already imperfectly focused, anti-aliasing will make it slightly worse, but generally not by too much.  For various reasons, it's mathematically not possible to completely eliminate aliasing, but adding a tiny amount of blur can reduce it by an order of magnitude; adding a little more blur can reduce it by another order of magnitude, etc.  Because amount of blur necessary to 99.9% eliminate aliasing would start to be objectionable, most cameras try to instead reduce it to the point that it is unlikely to be noticeable but may nonetheless be observed in tests which are designed to provoke it (such as the aforementioned signboard).
If one imagines that the signboard is painted with a converging pattern of stripes which are e.g. 10mm wide at the top and 0.5mm wide at the bottom, then top of the image should appear as clearly-resolved black and white stripes, while the bottom should be a uniform gray.  Moving from top to bottom, the stripes should go from being black and white to being very dark gray and very light gray, then from medium-dark gray to medium-light gray, etc. until the black and white stripes become indistinguishable.  Adding more blur will raise the point in the frame where the stripes cease to be recognizable as stripes, but will also minimize the unwanted aliasing effects.  The quality of a camera may be judged by examining the level at which stripes cease to be recognizable as stripes, and by observing any non-uniformity in the area below that level.

What is Aliasing and Anti-Aliasing?


What is the best way to implement custom branding?

Question: We branded our site with a custom master page, alternate CSS, and site theme. Everytime we create new sites or site collections we have to manually setup these things to get a consistent look. Is there a way to have this set automatically when a new sites or site collections are created?
Answer: Features and solutions is the way to go when deploying your custom branding.
When branding SharePoint also remember the option of using Themes. Themes gives you a way to brand across application pages, standard master pages / page layouts in a consistent manner.
Branding with SharePoint Themes
Master Pages vs. Themes: Which Do You Choose?
hth
Anders Rask
Comment: You could elect to that using User solutions but you need to make sure that artifacts that are deployed using that route will be checked in by EventReceiver's OnActivated event handler.
Answer: The way we did this was through features.  We had a feature that applied our branding and then using feature stapling that feature was activated whenever we created a new site or site collection.
EDIT:  Like Anders says, themes do provide some extra benefits.  The benefit of them working on application pages can be handled by a simple httpmodule.  Check out my blog post with code here:  http://www.thelineberrys.com/default-category/using-your-sharepoint-sites-master-page-on-all-application-pages-3.html on how to implement the httpmodule.
Answer: Here is a function that will set the masterpage for your site (including sub sites) that you can use.
Just put it in a feature receiver and you can activate it when creating new sites, etc.
Then you will have the same masterpage for all your sites.
http://chrisbarba.wordpress.com/2009/12/18/set-custom-master-page/


hops for belgian trappist/abbey beers

Question: I love Rochefort 10, Chimay (to a lower degree), and some other belgian beers. So I would like to try to do something similar, or just take some inspiration from them. What are the most commonly used hops for belgian trappist or abbey beer style?
Answer: Anything "Noble" that's not a typical American hop like Cascade/Centenial/Chinook/Columbus etc. I'd use Hallertaur, Spalt, Tett, Vanguard, Perle, etc. Basically any of the classic German hops, or their modern equivalent.
Honestly in those styles, you just want a touch of hop bitterness to cut the sweetness of the malt. Not many of those beers present much hop flavor. I understand that some styles (like Tripel) are actually a little hoppier when consumed relatively fresh in Belgium, but if you are trying to duplicate the taste of an older, imported bottle, then keep the hop flavor barely detectable and the IBU's in the 10-20 range.
Answer: Graham's answer is good.  I'd add Saaz to the list.  I just won a gold medal for a Belgian Blonde with Hallertau and Saaz.
<code>23 liter batch. (25 IBUs - Tinseth)
.5 oz Magnum for bittering.
.5 oz of Hallertau at :10.
.5 oz of Saaz at :05.
</code>
You probably want to get "Brew Like a Monk" by Stan Hieronymus.

hops for belgian trappist/abbey beers