This file contains hidden or 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
// 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(); |
This file contains hidden or 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
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 |
This file contains hidden or 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
' Create a new Workbook | |
Set NewBook = WorkBooks.Add | |
With NewBook | |
.Title = "Whatever" | |
.Subject = "Whatever" | |
.SaveAs Filename:="Test.xls" | |
End With |
This file contains hidden or 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
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 |
This file contains hidden or 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 test(){ | |
alert("This is a test"); | |
} |