The mountains surrounding Vatnahalsen Hotel and the Flåmasbana Railway are made for backcountry skiing!
The area is situated west in Skarveheimen, where weather systems from the vest and east meet to produce fantastic powder snow throughout the winter. A bit east of Vatnahalsen Hotel, you´ll find the glacier, Storeskavlen, keeping the snow at a stable, cool temperature.
Vatnahalsen Hotel rests 820m above sea level surrounded by majestic mountains stretching all the way up to 1750m. The terrain is easy accessible from the hotel door. It is actually recommended to put your skis on right outside the hotel and hike your way up to 700-1000m powder decents. And then...do it again!
Ski & Train is an experience streching over at least two days and one overnight stay at Vatnahalsen Hotel. We recommend arriving the day before to make sure the next day is a full skiing adventure!
Our guides have a maximum limit of 6 people.


text:
namespace Apinterest.Contracts
{
    public class RouteDetailContract
    {
        public string Header { get; set; }
        public string Description { get; set; }
    }
}

redpajama_set_name: RedPajamaGithub


text:
Q: ActionScript 3: Make the movieclip play to the end (I am a complete noob, this is one of my first scripts in Flash/AS3 so excuse me if this is "common knowledge")
I have a "smiley" movie clip that is around 10 frames.
Presently when a person clicks and drags I get the smiley face next to the cursor, this is my code:
stage.addEventListener(MouseEvent.MOUSE_MOVE, mousePosition);

var smiley:MovieClip = addChild(new Smiley) as MovieClip;
stage.addEventListener(MouseEvent.MOUSE_DOWN,toggleSmiley);
stage.addEventListener(MouseEvent.MOUSE_UP,toggleSmiley);

function mousePosition(event:MouseEvent) {
smiley.x = mouseX; smiley.y = mouseY;

}

function toggleSmiley(e:MouseEvent):void
{
    smiley.visible = (e.type == MouseEvent.MOUSE_DOWN);
    }

The problems are:
1 - If a person clicks and releases quickly it does not play the whole smiley movieclip, as they release it disappears, how do I make it play the whole smiley movie clip?
2 - if they click and drag I want it to leave a trail of smilies that play exactly like point 1 above.
Any ideas?
Thanks in advance!

A: The smiley movie clip vanishes as toggleSmiley() is called when the mouse is released: (e.type == MouseEvent.MOUSE_DOWN) evaluates false which makes the visible property of the movie clip false, which makes it invisible (keep in mind that invisible clips are still actually on the stage, since you did not remove them...)
If you want to make the smiley clip stay then vanish when it is done playing, you could attach an Event.ENTER_FRAME event to the movieclip. The 'Event.ENTER_FRAME' event is thrown and handled every time a movieclip's frame ticks. So the handler you could check if the current frame is on the last frame and then have it remove itself.
Something like:
// and event handler that runs every frame tick of a movieclip
// when it detects the current frame is the same as the last frame (indicating it is done playing) remove it from the stage
function smileyEnterFrame(inputEvent:Event):void {
    var clip:MovieClip = (MovieClip) (inputEvent.target); // inputEvent.target should refer to the smiley clip as it is what threw the event (just need to cast this to a movieclip)
    if(clip.currentFrame == clip.totalFrames){
        // remove this event handler for the clip since the clip is set to be removed (no longer need the event listener)
        clip.removeEventListener(Event.ENTER_FRAME, smileyEnterFrame);
        // remove the clip from the stage
        clip.parent.removeChild(clip);
    }
}

Then back in your original code:
stage.addEventListener(MouseEvent.MOUSE_MOVE, mousePosition);

// moved this line in to the mouse movement, as that is where the clip would actually be created
// (when the mouse moves to a new position)
//var smiley:MovieClip = addChild(new Smiley) as MovieClip;

//stage.addEventListener(MouseEvent.MOUSE_DOWN,toggleSmiley); // no longer need this
//stage.addEventListener(MouseEvent.MOUSE_UP,toggleSmiley); // no longer need this

function mousePosition(event:MouseEvent) {
    var smiley:MovieClip = new Smiley();
    smiley.x = mouseX;
    smiley.y = mouseY;
    this.addChild(smiley);

    smiley.addEventListener(Event.ENTER_FRAME, smileyEnterFrame, false, 0, true);
}

// no longer needed as the smiley clips will remove themselves once they are done playing
/*function toggleSmiley(e:MouseEvent):void {
    smiley.visible = (e.type == MouseEvent.MOUSE_DOWN);
}*/

Edited as mentioned in my comment
Probably easier to just append all the resulting code together now in to one box. It's messy, but I've kept all your original code in there commented out so you can hopefully see what I am doing.
The change I made was I removed the mousePosition() event listener (as it was the one that created the smiley clips) so it doesn't get added right away. It only gets added when the MOUSE_DOWN event happens and is removed when the MOUSE_UP event happens.
import flash.events.MouseEvent;

// and event handler that runs every frame tick of a movieclip
// when it detects the current frame is the same as the last frame (indicating it is done playing) remove it from the stage
function smileyEnterFrame(inputEvent:Event):void {
    var clip:MovieClip = (MovieClip) (inputEvent.target); // inputEvent.target should refer to the smiley clip as it is what threw the event (just need to cast this to a movieclip)
    if(clip.currentFrame == clip.totalFrames){
        // remove this event handler for the clip since the clip is set to be removed (no longer need the event listener)
        clip.removeEventListener(Event.ENTER_FRAME, smileyEnterFrame);
        // remove the clip from the stage
        clip.parent.removeChild(clip);
    }
}

// moved to toggleSmiley() as this event listener that spawns the smiley clips
// when the mouse moves, should only be running when the mouse button is down
//stage.addEventListener(MouseEvent.MOUSE_MOVE, mousePosition);

// moved this line in to the mouse movement, as that is where the clip would actually be created
// (when the mouse moves to a new position)
//var smiley:MovieClip = addChild(new Smiley) as MovieClip;

//stage.addEventListener(MouseEvent.MOUSE_DOWN,toggleSmiley); // no longer need this
//stage.addEventListener(MouseEvent.MOUSE_UP,toggleSmiley); // no longer need this

function mousePosition(inputEvent:MouseEvent) {
    var smiley:MovieClip = new Smiley();
    smiley.x = inputEvent.stageX;
    smiley.y = inputEvent.stageY;
    smiley.addEventListener(Event.ENTER_FRAME, smileyEnterFrame, false, 0, true);
    this.addChild(smiley);
}

// no longer needed as the smiley clips will remove themselves once they are done playing
/*function toggleSmiley(e:MouseEvent):void {
    smiley.visible = (e.type == MouseEvent.MOUSE_DOWN);
}*/

// this adds or removes the mousePosition() event listener based on the given mouse event
function toggleSmiley(inputEvent:MouseEvent):void {
    // if down, then add this event listener (which would create the smiley clips when the mouse moves)
    if(inputEvent.type == MouseEvent.MOUSE_DOWN){
        this.stage.addEventListener(MouseEvent.MOUSE_MOVE, mousePosition, false, 0, true);
    // else on any other mouse event (MOUSE_UP), remove this event listener to stop the smiley clips from being created
    } else {
        this.stage.removeEventListener(MouseEvent.MOUSE_MOVE, mousePosition, false);
    }
}

this.stage.addEventListener(MouseEvent.MOUSE_UP,toggleSmiley);
this.stage.addEventListener(MouseEvent.MOUSE_DOWN,toggleSmiley);

redpajama_set_name: RedPajamaStackExchange


These groups attempt to convince the King of Ethiopia that he should convert to their religion.
The class will hear all 3 religions, then vote to decide what religious presentation was most convincing.
The goal is to familiarize yourself with these religions and see how closely they were tied to their respective societies.
2. Take a peak at the Chapter 4 Resources page to study up . . . especially the Chapter 4 Self Test.


NEW YORK — The stock market held to modest moves Wednesday following mixed economic reports and minutes from the Federal Reserve's last meeting that revealed division among policymakers.
Stocks drifted in a narrow range following signs of growth in the services industry. The Institute for Supply Management said its services index rose to 50.1 in December from 48.7 in November. A reading above 50 signals growth.
The welcome news about service companies was offset by a report that employers cut 84,000 private sector jobs last month. The ADP National Employment Report came in worse than the forecasts of analysts polled by Thomson Reuters.
The latest batch of reports are similar to what investors have seen months – figures that reveal modest improvements but remind them that the economy remains weak. The stock market has been rising for 10 months on signs that the economy is recovering but analysts say stronger signs of growth will be needed to feed its advance in 2010.
Minutes from the Fed's December meeting showed that a "few members" thought that the central bank's $1.25 trillion program to buy mortgages could need to grow, rather than be phased out on March 31. The report did little to deepen investors' insight into the Fed's intentions for interest rates.
Dave Rovelli, managing director of trading at brokerage Canaccord Adams in New York, said traders are cautious ahead of a key employment report coming up Friday from the Labor Department. Economists expect that the unemployment rate ticked up to 10.1 percent in December from 10 percent in November.
"The unemployment number on Friday is the big deal," he said. "And it's light volume so I wouldn't be surprised if we just drift higher."
In late afternoon trading, the Dow Jones industrial average rose 16.85, or 0.2 percent, to 10,588.87. The broader Standard & Poor's 500 index rose 2.17, or 0.2 percent, to 1,138.69, while the Nasdaq composite index fell 3.13, or 0.1 percent, to 2,305.58.
Three stocks rose for every two that fell on the New York Stock Exchange, where volume came to 757.3 million shares, compared with 790.3 million shares traded at the same point Tuesday.
Trading turned quiet this week after big gains Monday, the first trading day of 2010. The Dow industrials and the S&P 500 index stand at 15-month highs.
Bond prices fell, pushing their yields higher. The yield on the benchmark 10-year Treasury note rose to 3.82 percent from 3.76 percent late Tuesday.
The dollar mostly fell against other major currencies. Gold rose.
Oil rose above $83 per barrel for the first time since October 2008. Crude oil settled up $1.41 at $83.18 on the New York Mercantile Exchange.
The Russell 2000 index of smaller companies rose 0.18, or less than 0.1 percent, to 638.67.
Britain's FTSE 100 rose 0.1 percent, Germany's DAX index rose less than 0.1 percent, and France's CAC-40 advanced 0.1 percent. Japan's Nikkei stock average rose 0.5 percent.


text:
Q: Django class admin logic error I tried to make some changes in Django admin and it got me really confused as it seems like I made some sort of a big basic logic error..?
my error is :
<class 'foodordering.admin.CInline'>: (admin.E202) 'foodordering.Customer' has no ForeignKey to 'foodordering.Order'.
<class 'foodordering.admin.DInline'>: (admin.E202) 'foodordering.Deliveryboy' has no ForeignKey to 'foodordering.Order'.
<class 'foodordering.admin.DishInline'>: (admin.E202) 'foodordering.Dish' has no ForeignKey to 'foodordering.Menu'.
<class 'foodordering.admin.DishInline'>: (admin.E202) 'foodordering.Dish' has no ForeignKey to 'foodordering.Order_dish'.
<class 'foodordering.admin.MenuAdmin'>: (admin.E108) The value of 'list_display[0]' refers to 'name', which is not a callable, an attribute of 'MenuAdmin', or an attribute or method on 'foodordering.Menu'.
<class 'foodordering.admin.MenuAdmin'>: (admin.E112) The value of 'list_filter' must be a list or tuple.
<class 'foodordering.admin.ODAdmin'>: (admin.E108) The value of 'list_display[0]' refers to 'name', which is not a callable, an attribute of 'ODAdmin', or an attribute or method on 'foodordering.Order_dish'.
<class 'foodordering.admin.ODAdmin'>: (admin.E108) The value of 'list_display[1]' refers to 'delivery', which is not a callable, an attribute of 'ODAdmin', or an attribute or method on 'foodordering.Order_dish'.
<class 'foodordering.admin.ODAdmin'>: (admin.E108) The value of 'list_display[3]' refers to 'status', which is not a callable, an attribute of 'ODAdmin', or an attribute or method on 'foodordering.Order_dish'.
<class 'foodordering.admin.ODAdmin'>: (admin.E108) The value of 'list_display[4]' refers to 'grade', which is not a callable, an attribute of 'ODAdmin', or an attribute or method on 'foodordering.Order_dish'.
<class 'foodordering.admin.ODAdmin'>: (admin.E108) The value of 'list_display[5]' refers to 'lastname', which is not a callable, an attribute of 'ODAdmin', or an attribute or method on 'foodordering.Order_dish'.
<class 'foodordering.admin.ODAdmin'>: (admin.E108) The value of 'list_display[6]' refers to 'postcode', which is not a callable, an attribute of 'ODAdmin', or an attribute or method on 'foodordering.Order_dish'.
<class 'foodordering.admin.ODAdmin'>: (admin.E108) The value of 'list_display[7]' refers to 'phonenumber', which is not a callable, an attribute of 'ODAdmin', or an attribute or method on 'foodordering.Order_dish'.
<class 'foodordering.admin.ODAdmin'>: (admin.E116) The value of 'list_filter[0]' refers to 'postcode', which does not refer to a Field.
<class 'foodordering.admin.OrderAdmin'>: (admin.E108) The value of 'list_display[0]' refers to 'name', which is not a callable, an attribute of 'OrderAdmin', or an attribute or method on 'foodordering.Order'.
<class 'foodordering.admin.OrderAdmin'>: (admin.E108) The value of 'list_display[1]' refers to 'availability', which is not a callable, an attribute of 'OrderAdmin', or an attribute or method on 'foodordering.Order'.
<class 'foodordering.admin.OrderAdmin'>: (admin.E108) The value of 'list_display[2]' refers to 'grade', which is not a callable, an attribute of 'OrderAdmin', or an attribute or method on 'foodordering.Order'.
<class 'foodordering.admin.OrderAdmin'>: (admin.E108) The value of 'list_display[3]' refers to 'currentlocation', which is not a callable, an attribute of 'OrderAdmin', or an attribute or method on 'foodordering.Order'.
<class 'foodordering.admin.OrderAdmin'>: (admin.E116) The value of 'list_filter[0]' refers to 'availability', which does not refer to a Field.
<class 'foodordering.admin.OrderInline'>: (admin.E202) 'foodordering.Order' has no ForeignKey to 'foodordering.Order_dish'.

foodordering/model.py:
from django.db import models

VIP_CHOICES = (
    ('normal','NORMAL'),
    ('vip', 'VIP'),
    ('vvip','VVIP'),
)

STATUS_CHOICES = (
    ('preparing', 'PREPARING'),
    ('delivering', 'DELIVERING'),
    ('ready to collect', 'READY TO COLLECT'),
)

class Customer(models.Model):
    firstname = models.CharField(max_length=20)
    lastname = models.CharField(max_length=20)
    address = models.CharField(max_length=200)
    address2 = models.CharField(max_length=200)
    address3 = models.CharField(max_length=200)
    postcode = models.IntegerField()
    dateofbirth = models.DateField()
    email = models.EmailField()
    phonenumber = models.IntegerField()
    grade = models.CharField(max_length=6, choices=VIP_CHOICES, default='normal')

class Deliveryboy(models.Model):
    name = models.CharField(max_length=100, default=None)
    currentlocation = models.CharField(max_length=100, default='Restaurant')
    availability = models.BooleanField

class Order(models.Model):
    delivery = models.BooleanField
    status = models.CharField(max_length=200, choices=STATUS_CHOICES, default='Preparing')
    DeliveryboyID = models.ForeignKey(Deliveryboy, on_delete=models.CASCADE)
    CustomerID = models.ForeignKey(Customer, on_delete=models.CASCADE)

class Dish(models.Model):
    name = models.CharField(max_length=100)

class Menu(models.Model):
    category = models.CharField(max_length=50)
    DishID = models.ForeignKey(Dish, on_delete=models.CASCADE)

class Order_dish(models.Model):
    quantity = models.IntegerField()
    OrderID = models.ForeignKey(Order, on_delete=models.CASCADE)
    DishID = models.ForeignKey(Dish, on_delete=models.CASCADE)

foodordering/admin.py:
from django.contrib import admin
from .models import Customer, Deliveryboy, Order, Menu, Dish, Order_dish

class CInline(admin.TabularInline):
    model = Customer
    extra = 2

class DInline(admin.TabularInline):
    model = Deliveryboy
    extra = 2

class OrderAdmin(admin.ModelAdmin):
    inlines = [CInline, DInline]
    list_filter = ['availability']
    list_display = ('name', 'availability', 'grade', 'currentlocation')
    search_fields = ['name', 'availability', 'grade', 'currentlocation']

class DishInline(admin.TabularInline):
    model = Dish
    extra = 2

class MenuAdmin(admin.ModelAdmin):
    inlines = [DishInline]
    search_fields = ['category']
    list_display = ('name', 'category')
    list_filter = ('name')

class OrderInline(admin.TabularInline):
    model = Order
    extra = 2

class ODAdmin(admin.ModelAdmin):
    inlines = [OrderInline, DishInline]
    list_display = ('name', 'delivery', 'quantity', 'status', 'grade', 'lastname', 'postcode', 'phonenumber')
    list_filter = ['postcode']
    search_fields = ['name', 'grade', 'lastname', 'postcode', 'phonenumber']

admin.site.register(Customer)
admin.site.register(Deliveryboy)
admin.site.register(Order, OrderAdmin)
admin.site.register(Menu, MenuAdmin)
admin.site.register(Dish)
admin.site.register(Order_dish, ODAdmin)

What I am trying to do is to have multiple tables connected by foreign keys when I add details in each table and I am actually quite panicked .. haha
Thank you so much for your help.


text:
Cosota este o localitate componentă a orașului Ocnele Mari din județul Vâlcea, Oltenia, România.

Cosota, Ocnele Mari

redpajama_set_name: RedPajamaWikipedia


Click below to buy this awesome deal!
If you have any questions, please reach out to us. We would love to chat!
* This introductory deal is for new clients only. This promotional package of classes can only be used once by a single user. User must be an Austin resident. Passes activate upon first scheduled visit.
Please feel free to check out the classes we offer, what our philosophy is, and who our team members are.