PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: dotnet-script/dotnet-script (csharp)

Issue:
Shebang directive on top of the file breaks #r SDK parsing
In the Specifying an sdk u show an example creating a web app:

#r "sdk:Microsoft.NET.Sdk.Web"

using Microsoft.AspNetCore.Builder;

var a = WebApplication.Create();
a.MapGet("/", () => "Hello world");
a.Run();

====

I get error  saying 'AspNetCore' does not exist in namespace 'Microsoft'.

Has this changed?

environment:
Mac osx ARM
i have Core6 and Core7 Frameworks installed. Currently using Core7.

I created project using command as shown in doc $> dotnet script init

thx ~Marvin Foster
mmarvb7@gmail.com or marvinfoster@finsync.com

Pull request:
Fixes #723 

Also added test.

Patch:
diff --git a/src/Dotnet.Script.DependencyModel/ProjectSystem/ScriptParser.cs b/src/Dotnet.Script.DependencyModel/ProjectSystem/ScriptParser.cs
index 0d058a21..9222a220 100644
--- a/src/Dotnet.Script.DependencyModel/ProjectSystem/ScriptParser.cs
+++ b/src/Dotnet.Script.DependencyModel/ProjectSystem/ScriptParser.cs
@@ -53,7 +53,7 @@ public ParseResult ParseFromFiles(IEnumerable<string> csxFiles)
         private static string ReadSdkFromReferenceDirective(string fileContent)
         {
             const string pattern = DirectivePatternPrefix + "r" + SdkDirectivePatternSuffix;
-            var match = Regex.Match(fileContent, pattern);
+            var match = Regex.Match(fileContent, pattern, RegexOptions.Multiline);
             if (match.Success)
             {
                 var sdk = match.Groups[1].Value;


Test patch:
diff --git a/src/Dotnet.Script.Tests/ScriptProjectProviderTests.cs b/src/Dotnet.Script.Tests/ScriptProjectProviderTests.cs
index 9d87775f..fdc3bc03 100644
--- a/src/Dotnet.Script.Tests/ScriptProjectProviderTests.cs
+++ b/src/Dotnet.Script.Tests/ScriptProjectProviderTests.cs
@@ -40,5 +40,17 @@ public void ShouldUseSpecifiedSdk()
             var projectFileInfo = provider.CreateProject(TestPathUtils.GetPathToTestFixtureFolder("WebApi"), _scriptEnvironment.TargetFramework, true);
             Assert.Equal("Microsoft.NET.Sdk.Web", XDocument.Load(projectFileInfo.Path).Descendants("Project").Single().Attributes("Sdk").Single().Value);
         }
+
+        // See: https://github.com/dotnet-script/dotnet-script/issues/723
+        [Theory]
+        [InlineData("#!/usr/bin/env dotnet-script\n#r \"sdk:Microsoft.NET.Sdk.Web\"")]
+        [InlineData("#!/usr/bin/env dotnet-script\n\n#r \"sdk:Microsoft.NET.Sdk.Web\"")]
+        public void ShouldHandleShebangBeforeSdk(string code)
+        {
+            var parser = new ScriptParser(TestOutputHelper.CreateTestLogFactory());
+            var result = parser.ParseFromCode(code);
+
+            Assert.Equal("Microsoft.NET.Sdk.Web", result.Sdk);
+        }
     }
 }
\ No newline at end of file
Repository: zh-lx/pinyin-pro (ts)

Issue:
韵母 iu 转换错误
## bug 描述

```js
describe("convert", () => {
  it("correctly convert for liu2", () => {
    const converted = convert("liu2", { format: "numToSymbol" });
    expect(converted).toEqual("liú");
  })
})
```

<img width="917" alt="image" src="https://github.com/zh-lx/pinyin-pro/assets/31927845/92330901-b0ea-4fd2-bde8-4a720cec3621">

## 你预期的样子是？



## pinyin-pro 版本号

`main` 分支上的

## 引入方式

ES Module

## 最小成本的复现步骤

把如上脚本添加到任一测试文件中


Pull request:
fix: "修复 convert 对于 iu 韵母转换不正确的问题"
close #229 

Patch:
diff --git a/lib/core/convert/index.ts b/lib/core/convert/index.ts
index 3ed4dd1..cc4374a 100644
--- a/lib/core/convert/index.ts
+++ b/lib/core/convert/index.ts
@@ -28,7 +28,7 @@ const toneMap = {
   ü: ['ü', 'ǖ', 'ǘ', 'ǚ', 'ǜ'],
   v: ['ü', 'ǖ', 'ǘ', 'ǚ', 'ǜ'],
   ui: ['ui', 'uī', 'uí', 'uǐ', 'uì'],
-  iu: ['iu', 'īu', 'íu', 'ǐu', 'ìu'],
+  iu: ['iu', 'iū', 'iú', 'iǔ', 'iù'],
   i: ['i', 'ī', 'í', 'ǐ', 'ì'],
   u: ['u', 'ū', 'ú', 'ǔ', 'ù'],
   n: ['n', 'n', 'ń', 'ň', 'ǹ'],


Test patch:
diff --git a/test/convert.test.js b/test/convert.test.js
index ff4de50..76c56ba 100644
--- a/test/convert.test.js
+++ b/test/convert.test.js
@@ -57,4 +57,9 @@ describe('convert', () => {
     const result = convert('l2', { format: 'numToSymbol' });
     expect(result).to.be.equal('l2');
   });
+
+  it('[convert]numToSymbol iu', () => {
+    const result = convert('liu2', { format: 'numToSymbol' });
+    expect(result).to.be.equal('liú');
+  });
 });
Repository: laravel/framework (php)

Issue:
Rules digits and digits_between don't work with fractional numbers
- Laravel Version: 5.2 and later

### Description:
I believe that the fix on this [issue](https://github.com/laravel/framework/issues/14647) should not have been approved. The rules now only supports integer values. And this does not match the description in the documentation: "The field under validation **must be numeric** and must have an exact length of value."

### Steps To Reproduce:

```php
<?php

$validator = Validator::make(
    ['fractional_value' => 1.2],
    ['fractional_value' => 'digits_between:1,10']
);
$validator->errors()->first(); // The fractional value must be between 1 and 10 digits.


Pull request:
[6.x] Fix digits_between with fractions
At the moment the `digits_between` validation rule didn't validate digits with fractions properly. #14650 already added support for special numbers with scientific notation but fractions weren't supported until now. I believe it's expected to also accommodate for digits with fractions and not just integers.

Fixes #40264

Patch:
diff --git a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php b/src/Illuminate/Validation/Concerns/ValidatesAttributes.php
index 358a3cc833..67526a81bb 100644
--- a/src/Illuminate/Validation/Concerns/ValidatesAttributes.php
+++ b/src/Illuminate/Validation/Concerns/ValidatesAttributes.php
@@ -486,7 +486,7 @@ public function validateDigitsBetween($attribute, $value, $parameters)
 
         $length = strlen((string) $value);
 
-        return ! preg_match('/[^0-9]/', $value)
+        return ! preg_match('/[^0-9.]/', $value)
                     && $length >= $parameters[0] && $length <= $parameters[1];
     }
 


Test patch:
diff --git a/tests/Validation/ValidationValidatorTest.php b/tests/Validation/ValidationValidatorTest.php
index 8676d5f71d..8f0c294c4b 100755
--- a/tests/Validation/ValidationValidatorTest.php
+++ b/tests/Validation/ValidationValidatorTest.php
@@ -1767,6 +1767,12 @@ public function testValidateDigits()
 
         $v = new Validator($trans, ['foo' => '+12.3'], ['foo' => 'digits_between:1,6']);
         $this->assertFalse($v->passes());
+
+        $v = new Validator($trans, ['foo' => '1.2'], ['foo' => 'digits_between:1,10']);
+        $this->assertTrue($v->passes());
+
+        $v = new Validator($trans, ['foo' => '0.9876'], ['foo' => 'digits_between:1,5']);
+        $this->assertTrue($v->fails());
     }
 
     public function testValidateSize()
Repository: JuliaEarth/CoordRefSystems.jl (julia)

Issue:
Cartesian isapprox should do vector comparison instead of elementwise comparison
`isapprox(::Cartesian, ::Cartesian)` currently fails for points with `lon ≈ ±90°` (e.g. [Memphis, Tennessee](https://maps.app.goo.gl/zwZz7Tz5KLL4zzaE9)). 

```julia
julia> r = convert(Cartesian, LatLon(0,0)).x
6.378137e6 m

julia> convert(Cartesian, LatLon(0, 90)) ≈ Cartesian{WGS84Latest}(0u"m", r, 0u"m")
false
```

The problem is that `isapprox(::Cartesian, ::Cartesian)` currently compares every entry one by one for approximate equality. 

https://github.com/JuliaEarth/CoordRefSystems.jl/blob/14940f9ab20cf320729af1668a3629778d1b5be5/src/crs/basic.jl#L61-L65

Instead, it should do a vector comparison, `isapprox(x::Cartesian, y::Cartesian) = norm(x - y) / max(norm(x), norm(y))`, analogous to [how `Base` does it](https://github.com/JuliaLang/julia/blob/6737a1de25a835870641d8d1f3c507ee60e24cc0/stdlib/LinearAlgebra/src/generic.jl#L1811-L1823).

Pull request:
Fix #53

Patch:
diff --git a/src/crs/basic.jl b/src/crs/basic.jl
index 1c7e7c59..100e1008 100644
--- a/src/crs/basic.jl
+++ b/src/crs/basic.jl
@@ -59,9 +59,10 @@ function Base.getproperty(coords::Cartesian, name::Symbol)
 end
 
 function Base.isapprox(coords₁::C, coords₂::C; kwargs...) where {C<:Cartesian}
-  tup₁ = _coords(coords₁)
-  tup₂ = _coords(coords₂)
-  all(isapprox(c₁, c₂; kwargs...) for (c₁, c₂) in zip(tup₁, tup₂))
+  # https://github.com/JuliaEarth/CoordRefSystems.jl/issues/53
+  c₁ = _coords(coords₁) |> SVector
+  c₂ = _coords(coords₂) |> SVector
+  isapprox(c₁, c₂; kwargs...)
 end
 
 function Base.summary(io::IO, coords::Cartesian)


Test patch:
diff --git a/test/misc.jl b/test/misc.jl
new file mode 100644
index 00000000..25f60720
--- /dev/null
+++ b/test/misc.jl
@@ -0,0 +1,7 @@
+@testset "Miscellaneous" begin
+  # https://github.com/JuliaEarth/CoordRefSystems.jl/issues/53
+  c1 = convert(Cartesian, LatLon(0, 0))
+  c2 = convert(Cartesian, LatLon(0, 90))
+  c3 = Cartesian{WGS84Latest}(0u"m", c1.x, 0u"m")
+  @test c2 ≈ c3
+end
diff --git a/test/runtests.jl b/test/runtests.jl
index 4725d9d8..300babdd 100644
--- a/test/runtests.jl
+++ b/test/runtests.jl
@@ -2,7 +2,7 @@ using CoordRefSystems
 using Unitful
 using Test
 
-testfiles = ["ellipsoids.jl", "datums.jl", "crs.jl", "codes.jl"]
+testfiles = ["ellipsoids.jl", "datums.jl", "crs.jl", "codes.jl", "misc.jl"]
 
 # --------------------------------
 # RUN TESTS WITH SINGLE PRECISION
Repository: vaskoz/dailycodingproblem-go (go)

Issue:
Day 194
Good morning! Here's your coding interview problem for today.

This problem was asked by Facebook.

Suppose you are given two lists of n points, one list `p1, p2, ..., pn` on the line y = 0 and the other list `q1, q2, ..., qn` on the line y = 1. Imagine a set of n line segments connecting each point pi to qi. Write an algorithm to determine how many pairs of the line segments intersect.

Pull request:
Day194
Resolves #400.

Patch:
diff --git a/README.md b/README.md
index 02f9827..d78dd61 100644
--- a/README.md
+++ b/README.md
@@ -203,4 +203,5 @@ problems from
 * [Day 190](https://github.com/vaskoz/dailycodingproblem-go/issues/393)
 * [Day 191](https://github.com/vaskoz/dailycodingproblem-go/issues/395)
 * [Day 192](https://github.com/vaskoz/dailycodingproblem-go/issues/397)
+* [Day 194](https://github.com/vaskoz/dailycodingproblem-go/issues/400)
 * [Day 195](https://github.com/vaskoz/dailycodingproblem-go/issues/401)
diff --git a/day194/problem.go b/day194/problem.go
new file mode 100644
index 0000000..f912152
--- /dev/null
+++ b/day194/problem.go
@@ -0,0 +1,17 @@
+package day194
+
+// CountIntersectionsBrute does a brute force check for intersections.
+// Runs in O(N^2) time.
+func CountIntersectionsBrute(p, q []int) int {
+	intersections := 0
+	for i := range p {
+		for j := i + 1; j < len(q); j++ {
+			diffP := p[j] - p[i]
+			diffQ := q[j] - q[i]
+			if (diffP < 0 && diffQ > 0) || (diffP > 0 && diffQ < 0) {
+				intersections++
+			}
+		}
+	}
+	return intersections
+}


Test patch:
diff --git a/day194/problem_test.go b/day194/problem_test.go
new file mode 100644
index 0000000..82e06fc
--- /dev/null
+++ b/day194/problem_test.go
@@ -0,0 +1,28 @@
+package day194
+
+import "testing"
+
+var testcases = []struct {
+	p, q          []int
+	intersections int
+}{
+	{[]int{3, 1}, []int{1, 3}, 1},
+	{[]int{0, 10, 7, 4, 12, 9, 2}, []int{3, 5, 11, 6, 1, 13, 8}, 11},
+}
+
+func TestCountIntersectionsBrute(t *testing.T) {
+	t.Parallel()
+	for _, tc := range testcases {
+		if result := CountIntersectionsBrute(tc.p, tc.q); result != tc.intersections {
+			t.Errorf("Expected %v, got %v", tc.intersections, result)
+		}
+	}
+}
+
+func BenchmarkCountIntersectionsBrute(b *testing.B) {
+	for i := 0; i < b.N; i++ {
+		for _, tc := range testcases {
+			CountIntersectionsBrute(tc.p, tc.q)
+		}
+	}
+}