Skip to content

Instantly share code, notes, and snippets.

// Init class
class Init
{
static void Main(string[] args)
{
int[] values = new int[] { 60, 100, 120 };
int[] weights = new int[] { 10, 20, 30 };
int W = 30; // Max weight
int n = values.Count();
Private Sub MergeButton_Click()
Dim filename As Variant
Dim wb As Workbook
Dim s As Sheet1
Dim thisSheet As Sheet1
Dim lastUsedRow As Range
Dim newBook As Workbook
On Error GoTo ErrMsg
' Create a new Workbook
Set NewBook = WorkBooks.Add
With NewBook
.Title = "Whatever"
.Subject = "Whatever"
.SaveAs Filename:="Test.xls"
End With
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication2
{
class KnapSack
{
// Returns the max value that can be put in a knapscak of capacity W
function test(){
alert("This is a test");
}