This file contains 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
load() { | |
axios.get(this.actionUrl).then((res) => { | |
this.$store.commit('userManagement/setUsers', res.data); | |
}); | |
} |
This file contains 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
const UserManagementModule = { | |
namespaced: true, | |
state: { | |
users: [], | |
activeUser: { | |
id: -1, | |
name: '', | |
email: '', | |
password: '' | |
}, |
This file contains 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
save() { | |
if (this.activeUser.id === -1) { | |
axios.post(this.actionUrl, this.activeUser) | |
.then((res) => { | |
alert('user saved'); | |
this.$store.state.userManagement.eventBus.$emit('userManagement/save'); | |
}); | |
} else { | |
this.update(); | |
} |
This file contains 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
mounted() { | |
this.load(); | |
this.$store.state.userManagement.eventBus.$on('userManagement/save', this.load); | |
} |
This file contains 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 nginx:alpine | |
COPY index.html /usr/share/nginx/html/index.html |
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
<title>Hello World - Nginx Docker</title> | |
<style> | |
h1{ | |
font-weight:lighter; |
This file contains 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
<html> | |
<head> | |
<link rel="stylesheet" href="style.css"/> | |
<style> | |
x{display:block;} | |
</style> | |
</head> | |
<body> | |
<x class="header"> | |
<x>My Site</x> |
This file contains 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
$db = new ParticleDb()->connect('localhost', 'root', 'root'); | |
$rows = $db | |
->select(['title', 'content']) | |
->from('posts') | |
->with(['email', 'name']) | |
->from('users') | |
->where('users.name','=','Aditya Purwa') | |
->get(); |
This file contains 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
const transformer = new Transformer("https://myriatek.com/images/logo.png"); | |
const rotate = new RotateTransform(90); | |
const resize = new ResizeTransform(0.5, 0.5); | |
const blur = new BlurFilter(8); | |
const transformedImage = transformer | |
.apply([rotate, resize]) | |
.filter([blur]); | |
transformedImage.save(path.resolve(__dirname, 'storage/images'), hash.from(transformedImage.bytes)+transformedImage.extensions); |
This file contains 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
function ackerman(m,n){ | |
if(m == 0){ | |
return n+1; | |
} | |
if(m!= 0 && n==0){ | |
return ackerman(m-1,1); | |
} | |
if(m!=0 && n!=0){ | |
return ackerman(m-1,ackerman(m,n-1)); | |
} |
OlderNewer