This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Controller from '@ember/controller'; | |
export default class ApplicationController extends Controller { | |
appName = 'Ember Twiddle'; | |
performAction() { | |
this.send('doSomething'); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
import { inject as service } from '@ember/service'; | |
export default Ember.Component.extend({ | |
progressBar: service(), | |
didInsertElement() { | |
this._super(...arguments); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Component.extend({ | |
willDestroyElement() { | |
this.$().remove(); | |
} | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
const { on } = Ember; | |
export default Ember.Component.extend({ | |
actions: { | |
toggle() { | |
console.log(this.$()) | |
} | |
}, | |
destroy: on('willDestroyElement', function () { | |
console.log(this.$()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
fields: Ember.A(), | |
actions: { | |
// doesn't work | |
addField( ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName: 'Ember Twiddle', | |
isDisabled: false, | |
actions: { | |
disableThis: function(){ | |
this.set('isDisabled', true); | |
console.log('aaaaaa'); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
struct Values { | |
char *value; | |
int counter; | |
struct Values* next_value; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
from random import randint | |
#Needs the requests module. | |
#Use (sudo) pip install requests | |
#http://www.timestampgenerator.com/ | |
#Use this link to generate the timeStamp. | |
timeStamp = InsertUTCTimeStampHere(eg.1415994915) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from facepy import GraphAPI | |
import urllib | |
import os | |
# Initialize the Graph API with a valid access token | |
#Generate access token here: https://developers.facebook.com/tools/explorer/ | |
oauth_access_token = 'Access token' | |
graph = GraphAPI(oauth_access_token) | |
membersList = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from facepy import GraphAPI | |
import webbrowser | |
# Initialize the Graph API with a valid access token. | |
#Generate access token here: https://developers.facebook.com/tools/explorer/. Make sure you choose the API version 1.0 | |
oauth_access_token = 'Enter access token here' | |
graph = GraphAPI(oauth_access_token) | |
#Will be used to launch a web browser and view the output |
NewerOlder