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
Public ReadOnly Property AssemblyDirectory() As String | |
Get | |
Dim codeBase As String = Assembly.GetExecutingAssembly().CodeBase | |
Dim uriBuilder As New UriBuilder(codeBase) | |
Dim assemblyPath As String = Uri.UnescapeDataString(uriBuilder.Path) | |
Return Path.GetDirectoryName(assemblyPath) | |
End Get | |
End Property |
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
Dim proc As System.Diagnostics.Process | |
For Each proc In System.Diagnostics.Process.GetProcessesByName("EXCEL") | |
If proc.MainWindowTitle.Trim.Length = 0 Then | |
'proc.GetCurrentProcess.StartInfo | |
proc.Kill() | |
End If | |
Next |
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
import Ember from 'ember'; | |
export default Ember.Object.extend({ | |
gtCountry: { code: 'GT', region: 'LATAM' }, | |
usCountry: { code: 'US', region: 'NA' }, | |
filterByRegion(region) { | |
// adiós al "arguments" objeto. No más conversiones a arrays! | |
const countries = Array.prototype.slice.call(arguments, 1); | |
const filtereCountries = countries.filter((country) => country.region === region); |
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
import { withAbility, provideSession } from ‘react-can’; | |
import SimpleMenu from ‘simple-menu’; | |
const entryAbilities = { | |
canWrite(session, props) { | |
return session.user.role === ‘ADMIN’; | |
}, | |
canRead(session, props) { | |
return false; | |
} |
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
// initialize server | |
import Service from './service'; | |
server.route({ | |
method: 'GET', | |
config: { | |
handler() { | |
const service = new Service(); | |
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 withDebugEnabled(nextConfig) { | |
return { | |
...nextConfig, | |
webpack(conf, options) { | |
// eslint-disable-next-line no-param-reassign | |
if (options.isServer) conf.devtool = 'source-map'; | |
// Overload the Webpack config if it was already overloaded | |
if (typeof nextConfig.webpack === 'function') { | |
return nextConfig.webpack(conf, options); |