PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: JuliaCollections/DataStructures.jl (julia)

Issue:
BoundsError in MutableBinaryHeap delete!
If run with ```--check-bounds=yes```, the following throws ```BoundsError```:
```Julia
x = MutableBinaryMinHeap{Int}()
h1 = push!(x, 1)
h2 = push!(x, 2)
delete!(x, h2)
```
[Offending line](https://github.com/JuliaCollections/DataStructures.jl/blob/v0.17.13/src/heaps/mutable_binary_heap.jl#L116)
```Julia
        @inbounds nodes[nd_id] = new_rt = pop!(nodes)
```

Looks to happen when deleting from the end of the heap. The code is safe under the assumption that ```pop!(::Vector)``` doesn't resize underlying storage, but not ideal to have this throw when bounds checks are forced.

Pull request:
Fixes #611

Patch:
diff --git a/Project.toml b/Project.toml
index 352dfea40..f114a5977 100644
--- a/Project.toml
+++ b/Project.toml
@@ -1,6 +1,6 @@
 name = "DataStructures"
 uuid = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
-version = "0.17.13"
+version = "0.17.14"
 
 [deps]
 InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
diff --git a/src/heaps/mutable_binary_heap.jl b/src/heaps/mutable_binary_heap.jl
index e39bbc92f..8b1cc005e 100644
--- a/src/heaps/mutable_binary_heap.jl
+++ b/src/heaps/mutable_binary_heap.jl
@@ -113,7 +113,8 @@ function _binary_heap_pop!(comp::Comp,
         empty!(nodes)
     else
         # move the last node to the position of the removed node
-        @inbounds nodes[nd_id] = new_rt = pop!(nodes)
+        @inbounds nodes[nd_id] = new_rt = nodes[end]
+        pop!(nodes)
         @inbounds nodemap[new_rt.handle] = nd_id
 
         if length(nodes) > 1


Test patch:
diff --git a/test/test_mutable_binheap.jl b/test/test_mutable_binheap.jl
index 395e5adee..a817da27e 100644
--- a/test/test_mutable_binheap.jl
+++ b/test/test_mutable_binheap.jl
@@ -193,6 +193,14 @@ end
         @test isequal(extract_all!(hp), [1, 9, 11, 17, 19, 21, 22, 27])
     end
 
+    @testset "test delete! at end" begin
+        h = MutableBinaryMinHeap{Int}()
+        push!(h, 1)
+        handle = push!(h, 2)
+        delete!(h, handle)
+        @test isequal(heap_values(h), [1])
+    end
+
     @testset "test update! and top_with_handle" begin
         for (hf,m) = [(MutableBinaryMinHeap,-2.0), (MutableBinaryMaxHeap,2.0)]
             xs = rand(100)
Repository: sindresorhus/boxen (js)

Issue:
Allow border to be optional.
This tool has a lot of great features for creating boxes, and some of those features would be nice on their own. For instance, fullscreen would be great in some cases even without a border.

My use case, however, incorporates boxen into another utility. In order to achieve "no border", I have given boxen a "ghost border" which I strip after boxen's done working.

```js
borderStyle: {
	topLeft: ' ',
	topRight: ' ',
	bottomLeft: ' ',
	bottomRight: ' ',
	top: ' ',
	bottom: ' ',
	left: ' ',
	right: ' '
}
```

Pull request:
Allow border to be optional.
Fixes #84

Fix not being able to specify empty strings in borderStyle options.

Patch:
diff --git a/index.d.ts b/index.d.ts
index 289e3dd..570505b 100644
--- a/index.d.ts
+++ b/index.d.ts
@@ -1,5 +1,12 @@
 import {LiteralUnion} from 'type-fest';
-import {BoxStyle, Boxes} from 'cli-boxes';
+import {BoxStyle, Boxes as CLIBoxes} from 'cli-boxes';
+
+/**
+All box styles.
+*/
+interface Boxes extends CLIBoxes {
+	readonly none: BoxStyle;
+}
 
 /**
 Characters used for custom border.
diff --git a/index.js b/index.js
index 70d3e16..9c5e25d 100644
--- a/index.js
+++ b/index.js
@@ -56,6 +56,14 @@ const getBorderChars = borderStyle => {
 
 	let characters;
 
+	// Create empty border style
+	if (borderStyle === 'none') {
+		borderStyle = {};
+		for (const side of sides) {
+			borderStyle[side] = '';
+		}
+	}
+
 	if (typeof borderStyle === 'string') {
 		characters = cliBoxes[borderStyle];
 
@@ -76,7 +84,7 @@ const getBorderChars = borderStyle => {
 		}
 
 		for (const side of sides) {
-			if (!borderStyle[side] || typeof borderStyle[side] !== 'string') {
+			if (borderStyle[side] === null || typeof borderStyle[side] !== 'string') {
 				throw new TypeError(`Invalid border style: ${side}`);
 			}
 		}
diff --git a/readme.md b/readme.md
index aea69ac..547d245 100644
--- a/readme.md
+++ b/readme.md
@@ -116,6 +116,12 @@ Values:
 ↘↓↓↓↙
 →foo←
 ↗↑↑↑↖
+```
+- `'none'`
+```
+
+foo
+
 ```
 
 Style of the box border.


Test patch:
diff --git a/tests/border-option.js b/tests/border-option.js
index 4bd4b39..5c7f30f 100644
--- a/tests/border-option.js
+++ b/tests/border-option.js
@@ -105,6 +105,14 @@ test('border style (round)', t => {
 	t.snapshot(box);
 });
 
+test('border style (none)', t => {
+	const box = boxen('foo', {
+		borderStyle: 'none',
+	});
+
+	t.snapshot(box);
+});
+
 test('border style (custom ascii style)', t => {
 	const box = boxen('foo', {
 		borderStyle: {
diff --git a/tests/snapshots/tests/border-option.js.md b/tests/snapshots/tests/border-option.js.md
index b2e84d7..33203d8 100644
--- a/tests/snapshots/tests/border-option.js.md
+++ b/tests/snapshots/tests/border-option.js.md
@@ -100,6 +100,14 @@ Generated by [AVA](https://avajs.dev).
     │foo│␊
     ╰───╯`
 
+## border style (none)
+
+> Snapshot 1
+
+    `␊
+    foo␊
+    `
+
 ## border style (custom ascii style)
 
 > Snapshot 1
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 382
Good morning! Here's your coding interview problem for today.

This problem was asked by Google.

Yesterday you implemented a function that encodes a hexadecimal string into Base64.

Write a function to decode a Base64 string back to a hexadecimal string.

For example, the following string:

`3q2+7w==`
should produce:

`deadbeef`

Pull request:
Day382
Resolves #770.

Patch:
diff --git a/README.md b/README.md
index cb85432..97e24a7 100644
--- a/README.md
+++ b/README.md
@@ -377,4 +377,5 @@ problems from
 * [Day 379](https://github.com/vaskoz/dailycodingproblem-go/issues/764)
 * [Day 380](https://github.com/vaskoz/dailycodingproblem-go/issues/766)
 * [Day 381](https://github.com/vaskoz/dailycodingproblem-go/issues/768)
+* [Day 382](https://github.com/vaskoz/dailycodingproblem-go/issues/770)
 
diff --git a/day382/problem.go b/day382/problem.go
new file mode 100644
index 0000000..b4dc188
--- /dev/null
+++ b/day382/problem.go
@@ -0,0 +1,16 @@
+package day382
+
+import (
+	"encoding/base64"
+	"encoding/hex"
+)
+
+// Base64DecodeDelegate just delegates
+func Base64DecodeDelegate(b64 string) string {
+	data, err := base64.StdEncoding.DecodeString(b64)
+	if err != nil {
+		panic("bad base64 input")
+	}
+
+	return hex.EncodeToString(data)
+}


Test patch:
diff --git a/day382/problem_test.go b/day382/problem_test.go
new file mode 100644
index 0000000..c321318
--- /dev/null
+++ b/day382/problem_test.go
@@ -0,0 +1,41 @@
+package day382
+
+import "testing"
+
+// nolint
+var testcases = []struct {
+	base64  string
+	decoded string
+}{
+	{"3q2+7w==", "deadbeef"},
+}
+
+func TestBase64DecodeDelegate(t *testing.T) {
+	t.Parallel()
+
+	for _, tc := range testcases {
+		if res := Base64DecodeDelegate(tc.base64); res != tc.decoded {
+			t.Errorf("Expected %v, got %v", tc.decoded, res)
+		}
+	}
+}
+
+func TestBase64DecodeDelegateBadInput(t *testing.T) {
+	t.Parallel()
+
+	defer func() {
+		if err := recover(); err == nil {
+			t.Errorf("expected a panic for non-base64 input")
+		}
+	}()
+
+	Base64DecodeDelegate("base64NOT[]")
+}
+
+func BenchmarkBase64DecodeDelegate(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			Base64DecodeDelegate(tc.base64)
+		}
+	}
+}