Skip to content

Instantly share code, notes, and snippets.

View robinvanderknaap's full-sized avatar

Robin van der Knaap robinvanderknaap

View GitHub Profile
@robinvanderknaap
robinvanderknaap / Dockerfile
Created January 5, 2023 13:30
Using NodeJS and NPM in Dockerfile in dotnet container
FROM mcr.microsoft.com/dotnet/sdk:6.0.401 AS build-env
WORKDIR /app
# https://jordananderson.io/asp-react-nodejs-docker/
ENV NODE_VERSION 16.17.1
ENV NODE_DOWNLOAD_URL https://nodejs.org/dist/v$NODE_VERSION/node-v$NODE_VERSION-linux-x64.tar.gz
RUN wget "$NODE_DOWNLOAD_URL" -O nodejs.tar.gz \
&& tar -xzf "nodejs.tar.gz" -C /usr/local --strip-components=1 \
var iDealService = new iDealService();
var directoryResponse = iDealService.SendDirectoryRequest();
var issuers = directoryResponse.Issuers;
class NewsLetter
{
private IMailer mailer = null;
public NewsLetter(IMailer mailer)
{
this.mailer = mailer;
}
public void SendNewsLetter(string Email)
class NewsLetter
{
public void SendNewsLetter(string Email)
{
IMailer mailer = Helper.getMailer();
mailer.send(this, Email);
}
}
class CompositeClass
{
private BaseClass baseClass;
public CompositeClass()
{
baseClass = new BaseClass();
}
public void DoSomeWork()
{
class DeCoupledObject
{
public void DoSomething()
{
ILogger logger = LogHelper.getLogger();
// Do something...
logger.log("Log this!");
}
class CoupledObject
{
public void DoSomething()
{
Logger logger = new Logger();
// Do something...
logger.log("Log this!");
}
}
var customer = new Customer()
.setFirstname("Ad")
.setLastname("van de Kaart")
.addOrder(new Order()
.setProductId(3)
.setQuantity(10))
.addOrder(new Order()
.setProductId(7)
.setQuantity(5))
.save();
<%= Html.Grid("basic")
.addColumn(new Column("CustomerId")
.setLabel("Customer ID"))
.addColumn(new Column("FirstName")
.setWidth(500))
.setUrl("/Home/GridData/")
.setPager("pager")
.setAutoWidth(true)
.setViewRecords(true)
%>
echo SysViewHelperDropdown::create('balls')
->setDropdownItems(
array(
'1' => 'Voetbal',
'2' => 'Basketbal',
'3' => 'Tennisbal'))
->setSelected(2)
->setClass('timebox');