1) install wine32 first in order to include the i386 libraries:
apt install wine32 and wine
2) install winetricks in order to easily install external windows libraries. If you want to know which libraries are required just run wine your_app.exe and check the produced log:
apt install winetricks
3) use winetrics dlls combined with the libraries required by your application:
winetricks dlls mfc42 vcrun2010
4) run wine somefile.exe
Congratulations, and if you would like, you can enjoy the full Ubuntu admin course !
Here is an example of Angular component using a template decorator in TypeScript:
@Component({ template: '<div>Woo a component!</div>', }) export class ExampleComponent { constructor() { console.log('Hey I am a component!'); } }
In JavaScript a decorator can be viewed as a composite with only one component and it isn’t intended for object aggregation. Here is the Decorator pattern in action:
const component = { template: "<div>hello</div>", }; setTemplate(component); // pass the whole object to the setTemplate function
console.log(component.template);
Enter Mixins: They find good usage base for object aggregation as well as inside of multiple components, at the same time have some drawbacks:
const externalLib = { // ... other functions we use setTemplate: () => { console.log('overriding...'); } // overriding function }
Introducing partial composition using inheritance mixin:
const myComponent = Object.assign(
Properties of the target object are overwritten by properties of the source object, if they have the same key. This way later sources' properties overwrite earlier ones. { setTemplate: () => { console.log('original'); } // initially in our object will be overriden from ExternalLib }, externalLib ) myComponent.setTemplate();
We can update the mixin code, but this solves just half way the problem, as this time our function will overwrite the externalLib functionality:
const setTemplate = (state = {}) => { // create a state on the first run return { // return copy of the state object (immutability!) ...state, change: inputTemplate => { // template is input parameter state.template = InputTemplate; return state; }, } }
const setLogin = (state = {}) => { // receive the state as parameter or if not create an empty one return { ...state, login: () => { console.log('Logged in!') }, } }