Skip to content

Instantly share code, notes, and snippets.

View thepearl's full-sized avatar
💭
I may be slow to respond.

Ghazi Tozri thepearl

💭
I may be slow to respond.
View GitHub Profile
@thepearl
thepearl / sims3-wind10-11.md
Last active September 29, 2024 20:19
Resolving Sims 3 Launch Issues on Windows 10/11 Stuck on launcher

Resolving Sims 3 Launch Issues on Windows 10/11

If you're experiencing issues with The Sims 3 getting stuck on the launcher when trying to play on Windows 10 or 11, follow these detailed steps to troubleshoot and potentially resolve the problem.

Step 1: Verify Game File Integrity

First, ensure your game files are not corrupted:

  1. Open your Steam library.
  2. Right-click on "The Sims 3" in your game list.
struct ShadowBorderModifier: ViewModifier {
func body(content: Content) -> some View {
content
.border(Color.black, width: 1)
.shadow(radius: 5)
}
}
extension View {
func dropShadow() -> some View {
struct CustomView<Content: View>: View {
let content: () -> Content
init(@ViewBuilder content: @escaping () -> Content) {
self.content = content
}
var body: some View {
content()
}
struct WrapperView<Content: View>: View {
let content: () -> Content
init(@ViewBuilder content: @escaping () -> Content) {
self.content = content
}
var body: some View {
VStack(alignment: .center) {
content()
struct HeaderView: View {
let title: String
let subtitle: String
@ViewBuilder
var body: some View {
VStack(alignment: .leading) {
Text(title)
.font(.largeTitle)
struct VStack<Content: View>: View {
let content: () -> Content
init(@ViewBuilder content: @escaping () -> Content) {
self.content = content
}
var body: some View {
// Create and arrange the subviews in a vertical stack.
content()
class MyViewTests: XCTestCase {
func testMyView() throws {
let dataFetcher = MockDataFetcher()
let viewModel = MyViewModel(dataFetcher: dataFetcher)
let view = MyView(viewModel: viewModel)
let window = UIWindow()
window.rootViewController = UIHostingController(rootView: view)
window.makeKeyAndVisible()
class MyViewModelTests: XCTestCase {
func testFetchData() {
let dataFetcher = MockDataFetcher()
let viewModel = MyViewModel(dataFetcher: dataFetcher)
let expectation = XCTestExpectation(description: "Fetch data")
dataFetcher.fetchDataResult = "test data"
viewModel.fetchData()
let expectedOutput = "Hello, World!"
let publisher = SomePublisher<String, Error>()
let cancellable = publisher
.sink(receiveCompletion: { completion in
switch completion {
case .finished:
break
case .failure(let error):
XCTFail("Publisher failed with error: \(error)")
import Foundation
import SwiftUI
import Combine
import Resolver
// MARK: - Presentation Layer
struct MyView: View {
@ObservedObject var viewModel: MyViewModel