ao criar um arquivo .md para a pasta _post do github pages com o rstudio os gráficos gerados com os comandos do R devem ser inseridos um a um via o comando:

![center](/nome_pasta_imagens_dentro_da_master/nome_da_figura.png)

Ou existe alguma forma de renderizar automáticamente os gráficos gerados sem criar um comando para cada um?

Desde já agradeço!

I'm designing an iOS app to order groceries online. I have a doubt about when ask for registration. To proceed at payment you must be a registered user. One can use an app like this several times and I'm unsure if I should ask users to login or register on the first page after opening the app with the option to skip this step, or ask to login or register only when they come to pay.

What is the actual term for the 'top-down' style of the Super Nintendo games such as Final Fantasy 6, Chrono Trigger, et cetera. I'm looking for the equivalent term of:

  • 'isometric' - (Jaggered Alliance, Final Fantasy Tactics, Fallout),
  • 'first person' - (Half Life, Doom, Quake),
  • 'birds eye' - (Grand Theft Auto)
  • ? insert term here ? - (Final Fantasy 6, Chrono Trigger)

I have a visual force page which uses pageblock tag:

<apex:pageblock title="Sample">

</apex:pageblock>

I would like to make the background color of title="Sample" as green. How can I add styles to the pageblock tag. I tried tabstyle but seems like it does not serve the purpose.

This is my first time implementing achievements in a game so I could definitely use some feedback on what I have done here. I have heard about singleton approaches to this problem, but I did not feel it was really necessary and I would rather avoid singletons since they have a bad reputation. Instead my approach is to store a custom object in NSUserDefaults and load it at the start of a game. One important aspect of achievements in my game is that having certain achievements unlocked will unlock various bonuses in the game, but these effects will only be applied at the start of a new game.

My first time working through trying to set this up, I tried to have a simple dictionary hold boolean values for whether the achievement was completed or not. Later I decided that it could be important to show the amount of progress completed on an achievement, so I implemented classes to handle them. With this way of doing it, the Game only needs to have an AchievementType to access the achievement and update its completion state.

DTAchievements.h

#import <Foundation/Foundation.h>
#import "DTAchievement.h"

@interface DTAchievements : NSObject <NSCoding>

-(void) completeAchievement:(AchievementType)type;

@property NSMutableDictionary *achievementsDictionary;

@end

DTAchievements.m

#import "DTAchievements.h"

NSString* const k100FloorsRevealed = @"100FloorsRevealed";
NSString* const k100DwarvesDead = @"100DwarvesDead";
NSString* const k5thTowerDiscovered = @"5thTowerDiscovered";
NSString* const kLeaderDiedOldAge = @"leaderDiedOldAge";
NSString* const kBottomFloorRevealed = @"bottomFloorRevealed";
NSString* const kTopFloorRevealed = @"topFloorRevealed";

NSDictionary* achievementsDict() {
    NSDictionary *achievements = @{ k100FloorsRevealed :
                                        [[DTAchievement alloc]initWithType:AchievementType100FloorsRevealed],
                                    k100DwarvesDead :
                                        [[DTAchievement alloc]initWithType:AchievementType100DwarvesDead],
                                    k5thTowerDiscovered :
                                        [[DTAchievement alloc]initWithType:AchievementType5thTowerDiscovered],
                                    kLeaderDiedOldAge :
                                        [[DTAchievement alloc]initWithType:AchievementTypeLeaderDiedOldAge],
                                    kBottomFloorRevealed :
                                        [[DTAchievement alloc]initWithType:AchievementTypeBottomFloorRevealed],
                                    kTopFloorRevealed :
                                        [[DTAchievement alloc]initWithType:AchievementTypeTopFloorRevealed]
                                    };
    return achievements;
}

@implementation DTAchievements

-(id) init {
    self = [super init];
    if (self) {
        _achievementsDictionary = [[NSMutableDictionary alloc]initWithDictionary:achievementsDict()];
    }
    return self;
}

-(void) completeAchievement:(AchievementType)type {
    DTAchievement *achievement = nil;

    switch (type) {

        case AchievementType100FloorsRevealed:
            achievement = [self.achievementsDictionary objectForKey:k100FloorsRevealed];
            break;

        case AchievementType100DwarvesDead:
            achievement = [self.achievementsDictionary objectForKey:k100DwarvesDead];
            break;

        case AchievementType5thTowerDiscovered:
            achievement = [self.achievementsDictionary objectForKey:k5thTowerDiscovered];
            break;

        case AchievementTypeLeaderDiedOldAge:
            achievement = [self.achievementsDictionary objectForKey:kLeaderDiedOldAge];
            break;

        case AchievementTypeBottomFloorRevealed:
            achievement = [self.achievementsDictionary objectForKey:kBottomFloorRevealed];
            break;

        case AchievementTypeTopFloorRevealed:
            achievement = [self.achievementsDictionary objectForKey:kTopFloorRevealed];
            break;

        default:
            break;
    }
    achievement.completed = YES;
}

#pragma mark - NSCoding methods
-(void) encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeObject:_achievementsDictionary forKey:@"achievementsDictionary"];
}
-(id) initWithCoder:(NSCoder *)aDecoder {
    self = [super init];
    if (self) {
        _achievementsDictionary = [aDecoder decodeObjectForKey:@"achievementsDictionary"];
    }
    return self;
}

@end

DTAchievement.h

#import <Foundation/Foundation.h>
#import "DTAchievementType.h"

@interface DTAchievement : NSObject <NSCoding>

-(instancetype)initWithType:(AchievementType)type;

@property BOOL completed;
@property (readonly) CGFloat percentageCompleted;

@end

DTAchievement.m

#import "DTAchievement.h"

@implementation DTAchievement {
    int _currentProgress;
    int _totalNeeded;
    AchievementType _type;
}

-(instancetype) initWithType:(AchievementType)type {
    self = [super init];
    if (self) {
        _type = type;
        _currentProgress = 0;
        _totalNeeded = 100;
    }
    return self;
}

-(CGFloat) getPercentageCompleted {
    return _currentProgress / _totalNeeded;
}

#pragma mark - NSCoding methods
-(void) encodeWithCoder:(NSCoder *)aCoder {
    [aCoder encodeInt:_totalNeeded forKey:@"totalNeeded"];
    [aCoder encodeInt:_currentProgress forKey:@"currentProgress"];
    [aCoder encodeBool:self.completed forKey:@"completed"];
    [aCoder encodeInteger:_type forKey:@"type"];
}
-(id) initWithCoder:(NSCoder *)aDecoder {
    self = [super init];
    if (self) {
        _totalNeeded = [aDecoder decodeIntForKey:@"totalNeeded"];
        _currentProgress = [aDecoder decodeIntForKey:@"currentProgress"];
        _completed = [aDecoder decodeBoolForKey:@"completed"];
        _type = [aDecoder decodeIntegerForKey:@"type"];
    }
    return self;
}

@end

When the scene for a new game is loaded, this method in the scene looks for existing achievement data, and if it is not present, the scene creates it.

-(void) startAchievements {
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    if (![defaults objectForKey:@"achievements"]) {
        _userAchievements = [[DTAchievements alloc]init];
        NSData *encodedAchievements = [NSKeyedArchiver archivedDataWithRootObject:_userAchievements];
        [defaults setObject:encodedAchievements forKey:@"achievements"];
        [defaults synchronize];
    } else {
        NSData *encodedAchievements = [defaults objectForKey:@"achievements"];
        _userAchievements = [NSKeyedUnarchiver unarchiveObjectWithData:encodedAchievements];
    }
}

After this it is loaded into the game like so:

[_game configureForAchievements:_userAchievements];

If the game is being loaded instead of starting as a new game, this method is called from initWithCoder:

-(void) loadAchievements {
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    NSData *encodedAchievements = [defaults objectForKey:@"achievements"];
    _achievements = [NSKeyedUnarchiver unarchiveObjectWithData:encodedAchievements];
}

When the game completes (or possibly whenever progress is made towards an achievement), a method will evaluate whether any achievements have been completed, and then they are saved like so:

-(void) saveAchievements {
    NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
    NSData *encodedAchievements = [NSKeyedArchiver archivedDataWithRootObject:_achievements];
    [defaults setObject:encodedAchievements forKey:@"achievements"];
    [defaults synchronize];
}

Is this a logical approach to doing achievements on iOS? Is using NSUserDefaults in this way safe, and is it good practice to do so?

In later episodes of South Park, Kenny stopped dying. Why did South Park stop killing Kenny? Just Wondering.

I work at a middle school in South Korea.

One of the questions on the recent 2nd grade mid-term exam was "Why do people read books?".

There are over 300 students in this year, so there were plenty of different answers.

One of the answers was "Because people read books to get information."

I believe it's wrong, but I want to explain to my students why.

If anyone could explain the grammar, I would be very grateful.

I tried finding this in the books, but I couldn't figure anything out. If you have an undead character, what happens when their physical stress track is filled and they don't take a consequence? Are they taken out like other characters?

I know that undead characters don't heal like normal characters.

Yes, I know the opposite of the usual question. I've been making candy since I was a little kid. My caramels are always smooth and creamy. My partner's father thinks they taste good but that the texture is all wrong. He liked the gritty/grainy ones his mother used to make. Everything I have ever seen listed as a way to fix grainy caramels I have tried reversing.

I have tried many things, including:

  • adding granulated sugar late in the process
  • not using corn syrup or other invert sugar
  • cooking them at high temps
  • cooking them for too short a time
  • stirring or not stirring at all the wrong times
  • switching recipes
  • varying the fat content

I guess I am wondering what makes caramels turn out grainy. It's not as far as I can tell, wholly related to the sugar dissolving/melting. If it was adding some granulated sugar as it cools should cause more crystals to form.

Is it related to the liquid content? Because sometimes after months in a cupboard even ordinarily smooth caramels will have developed some graininess.

I have always been puzzled by some sentences people make that end in a no. For example, let's say someone instructed you not to leave your post before they arrive. Then they return but you're not there. When you finally meet them, they say:

So you decided to wait for me elsewhere than we had agreed, no?.

What is the meaning of no and what should I answer?