PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: svg/svgo (js)
Issue: shofthex: false does not transform ff0000 to red
With default settings (which includes shortname: true):
<g color="#ff0000"/>
is optimized to:
<g color="red"/>

When setting:
{ "shorthex": false }

the same behavior is expected but the color remains:
<g color="#ff0000"/>
Pull request description: #757 shorthex false does not transform f00
Fixes #757 

Patch:
diff --git a/plugins/_collections.js b/plugins/_collections.js
index 8ff3d1f..fb42ad8 100644
--- a/plugins/_collections.js
+++ b/plugins/_collections.js
@@ -2512,6 +2512,7 @@ exports.colorsShortNames = {
   '#dda0dd': 'plum',
   '#800080': 'purple',
   '#f00': 'red',
+  '#ff0000': 'red',
   '#fa8072': 'salmon',
   '#a0522d': 'sienna',
   '#c0c0c0': 'silver',


Test patch:
diff --git a/test/plugins/convertColors.03.svg b/test/plugins/convertColors.03.svg
index 3308515..3f84b6b 100644
--- a/test/plugins/convertColors.03.svg
+++ b/test/plugins/convertColors.03.svg
@@ -1,9 +1,15 @@
 <svg xmlns="http://www.w3.org/2000/svg">
     <g color="#ff0000"/>
+    <g color="#f00"/>
 </svg>
 
 @@@
 
 <svg xmlns="http://www.w3.org/2000/svg">
     <g color="red"/>
+    <g color="red"/>
 </svg>
+
+@@@
+
+{ "shorthex": false }
Repository: vaskoz/dailycodingproblem-go (go)
Issue: Day 49
Good morning! Here's your coding interview problem for today.

This problem was asked by Amazon.

Given an array of numbers, find the maximum sum of any contiguous subarray of the array.

For example, given the array [34, -50, 42, 14, -5, 86], the maximum sum would be 137, since we would take elements 42, 14, -5, and 86.

Given the array [-5, -1, -8, -9], the maximum sum would be 0, since we would not take any elements.

Do this in O(N) time.


Pull request description: Day49
Resolves #107 .

Patch:
diff --git a/README.md b/README.md
index 158fb9b..3251678 100644
--- a/README.md
+++ b/README.md
@@ -60,3 +60,4 @@ problems from
 * [Day 45](https://github.com/vaskoz/dailycodingproblem-go/issues/101)
 * [Day 46](https://github.com/vaskoz/dailycodingproblem-go/issues/103)
 * [Day 47](https://github.com/vaskoz/dailycodingproblem-go/issues/105)
+* [Day 49](https://github.com/vaskoz/dailycodingproblem-go/issues/107)
diff --git a/day49/problem.go b/day49/problem.go
new file mode 100644
index 0000000..90f158a
--- /dev/null
+++ b/day49/problem.go
@@ -0,0 +1,20 @@
+package day49
+
+// MaxSubArray returns the maximum possible sum of a contiguous sub-array.
+// Runs in O(N) time and O(1) space.
+func MaxSubArray(arr []int) int {
+	var maxEndingHere, maxSoFar int
+	for i := range arr {
+		maxEndingHere = max(arr[i], maxEndingHere+arr[i])
+		maxSoFar = max(maxSoFar, maxEndingHere)
+	}
+	return maxSoFar
+}
+
+// max returns the larger of two ints.
+func max(a, b int) int {
+	if a > b {
+		return a
+	}
+	return b
+}


Test patch:
diff --git a/day49/problem_test.go b/day49/problem_test.go
new file mode 100644
index 0000000..6d71d50
--- /dev/null
+++ b/day49/problem_test.go
@@ -0,0 +1,28 @@
+package day49
+
+import "testing"
+
+var testcases = []struct {
+	arr    []int
+	maxSum int
+}{
+	{[]int{34, -50, 42, 14, -5, 86}, 137},
+	{[]int{-5, -1, -8, -9}, 0},
+}
+
+func TestMaxSubArray(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if result := MaxSubArray(tc.arr); result != tc.maxSum {
+			t.Errorf("Expected %d got %d", tc.maxSum, result)
+		}
+	}
+}
+
+func BenchmarkMaxSubArray(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			MaxSubArray(tc.arr)
+		}
+	}
+}
Repository: lesshint/lesshint (js)
Issue: decimalZero 2.0 bugs
actual `master` branch

```css
.test-rule {
    font-family: ForalPro, sans-serif;
    font-style: normal;
    font-weight: 300;
}
```
> Warning: foral-pro.less: line 1, col 18, decimalZero: 300 should be written without leading and trailing zero.

second problem: `line 1`, should be `4`

Same with:
```css
@font-size-base: 1rem;
```
```css
.tags-view {
    font-size: (15 * @base);
}
```
Pull request description: fixes #196: decimalZero false positive with whole numbers and 'none' …
…style

Patch:
diff --git a/lib/linters/decimal_zero.js b/lib/linters/decimal_zero.js
index 32359eb..2eb76dd 100644
--- a/lib/linters/decimal_zero.js
+++ b/lib/linters/decimal_zero.js
@@ -23,7 +23,7 @@ module.exports = {
 
             number = child.value;
 
-            // Bail if it's a float parsed as 0 (e.g. 0.0, .0, 0.)
+            // If it's a float parsed as 0 (e.g. 0.0, .0, 0.), bail.
             if (parseFloat(number) === 0) {
                 return;
             }
@@ -53,7 +53,7 @@ module.exports = {
 
                     break;
                 case 'none':
-                    if (!/^-?([1-9]\d*)?\.(\d*[1-9])$/.test(number)) {
+                    if (/\./.test(number) && !/^-?([1-9]\d*)?\.(\d*[1-9])$/.test(number)) {
                         output.type = 'leading and trailing';
                         output.inclusion = 'without';
                     }


Test patch:
diff --git a/test/specs/linters/decimal_zero.js b/test/specs/linters/decimal_zero.js
index 165b7dd..d6920a9 100644
--- a/test/specs/linters/decimal_zero.js
+++ b/test/specs/linters/decimal_zero.js
@@ -250,6 +250,16 @@ describe('lesshint', function () {
                     expect(result).to.deep.equal(expected);
                 });
             });
+
+            it('should allow font-weights ending in zero', function () {
+                var source = 'font-weight: 300;';
+
+                return spec.parse(source, function (ast) {
+                    var result = spec.linter.lint(options, ast.root.first);
+
+                    expect(result).to.be.undefined;
+                });
+            });
         }); //"none"
 
         describe('with invalid "style" value', function () {