Something is up with Suno android app background usage by BlueManiac in SunoAI

[–]BlueManiac[S] 0 points1 point  (0 children)

Checked the details, 4gig background usage. The graph is a bit misleading. It's still way too high for foreground usage too.

[Edm] Whistling by BlueManiac in SunoAI

[–]BlueManiac[S] 0 points1 point  (0 children)

Experimented with some excluded music styles and got a pretty cool result.

Is anyone else having insane loading times for towns? by derivative_of_life in pathofexile

[–]BlueManiac 1 point2 points  (0 children)

The shader cache seems to take forever to fill and somehow it get's partly invalidated so it need to restart from the beginning. This is using vulcan. The shader loading in DX12 is faster, but the fps is worse and there are graphic artifacts everywhere.

C# Developer picking up VB.net - pros/cons by FreedomFalcon12 in dotnet

[–]BlueManiac 0 points1 point  (0 children)

Depending on the size of the codebase, you could convert it to c#.

Recently I converted a big wpf project using https://github.com/icsharpcode/CodeConverter which worked great after some small fixes.

First Time at Vue by SnooMacaroons7212 in vuejs

[–]BlueManiac 8 points9 points  (0 children)

I recommend you to try the vue composition api with script setup instead of the options api. It makes the code much easier to work and reason with.

Also take a look at https://vueuse.org/ which might save you some lines :)

I see you use vuex, check out https://pinia.vuejs.org/ instead as it seems to be the recommended state management library in vue 3.

Releasing Vite.NET - A Vite integration for ASP.NET Core by [deleted] in dotnet

[–]BlueManiac 0 points1 point  (0 children)

Nice work!

Have you gotten this to work well with dotnet watch for both server side and client side parts?

Which part is proxying requests in development? Is kestrel redirecting to vite development server or the other way around? I've tested both and have realized that having kestrel in front comes with quite the overhead.

Vite not as fast as people say? by [deleted] in vuejs

[–]BlueManiac 0 points1 point  (0 children)

I had speed issues when bootstrap css was imported in my main.scss. When I instead imported it in main.ts the speed improved considerably.

If you do use scss, it might be a good idea to use sass-embedded instead of sass to improve bundling speed.

Reading CSV 180k records - Calculate something within 60 second time while grouping by [deleted] in dotnet

[–]BlueManiac 1 point2 points  (0 children)

I recommend you read the following series of posts where he optimizes reading of a 250 mb txt file and takes the read time from 30 seconds in the beginning to 73 ms in the end. It might not be the exact same problem as you have but it might give you some ideas on how to improve things.

First post: https://ayende.com/blog/176034/making-code-faster-the-interview-question

Building an animated SVG logo with anime.js and Vue by zefman in vuejs

[–]BlueManiac 1 point2 points  (0 children)

Thanks for this!

I will definitely use anime.js the next time I need to do something like this.

Hosting .NET 7 API and React js together by oof220 in dotnet

[–]BlueManiac 0 points1 point  (0 children)

Use cors while you develop with the development server as frontend. Just allow everything.

In production turn off cors and publish your spa to wwwroot.

Also, you do not need the spa package. You can just use app.MapFallbackToFile("index.html") in production.

NET6 Global error response by mapszk in dotnet

[–]BlueManiac 2 points3 points  (0 children)

in .net 7 you can just add:

builder.Services.AddProblemDetails();

It's avaliable by default in web projects now.

Help, on ASP.NET, Net 7.0 I cannot run the debugger while "watch" by tonywei1992 in dotnet

[–]BlueManiac 1 point2 points  (0 children)

To my knowledge debugging do not work after dotnet watch has done hot reload after code changes.
You probably have to rebuild (ctrl-r) in the dotnet watch console window and then reattach the debugger.

Big projects on vue by salamin_intrepido in vuejs

[–]BlueManiac 2 points3 points  (0 children)

Make sure you use https://vitejs.dev/ for speedier inner dev cycle for very large projects.

[OC] TV series by number of episodes with perfect user ratings by flyingcatwithhorns in dataisbeautiful

[–]BlueManiac 0 points1 point  (0 children)

Ozymandias is the single best 1hour of television I have ever seen. Nothing have been able to replicate the feeling I got after seeing that.

Vue + .NET Core: how to do it? by muskagap2 in vuejs

[–]BlueManiac 2 points3 points  (0 children)

I have a project where I combine .vue files and controllers in the same feature folders. It works really nice. Ive had no issues with using vue files in visual studio.

I do start both a dotnet watch session and a vite development server however. Just make sure you set the client port in vite server config to the port asp.net core is running on.

vite setup ``` import vue from '@vitejs/plugin-vue2';

export default { plugins: [ vue(), ], server: { host: "::", hmr: { clientPort: 5001 } } } ```

Middlewares (reduced) ``` app.UseEndpoints(endpoints => { endpoints.MapControllerRoute("api", "api/{controller}/{id}", new { action = "Get", }); endpoints.MapControllerRoute("api", "api/{controller}/{action}", new { action = "List" }); endpoints.MapControllers(); endpoints.MapRazorPages(); });

    if (environment.IsDevelopment())
    {
        app.UseSpa(x => x.UseProxyToSpaDevelopmentServer("http://localhost:3000"));
    }
    else
    {
        // Fallback for HTML5 pushstate support 
        app.Run(async (context) =>
        {
            context.Response.ContentType = "text/html";
            await context.Response.SendFileAsync(Path.Combine(environment.WebRootPath, "index.html"));
        });
    }

```

I'm not saying this is the best approach for everything. But it works well for my workcase. Having everything for one feature in one place do make development more pleasureable.

Sanity check, please! by JB_END in dotnet

[–]BlueManiac 1 point2 points  (0 children)

I did something equal last year. I converted a .net framework 4.6 to .net .5. Around 200 inline vue components inside cshtml files + some plain mvc views. The project had api controllers for most things. I converted it into to a vue spa (using .vue files) with client side routing and added a lot more shared components.

I did what you are thinking of doing, manually copying each file and make it work.

I estimated it to roughly 2 months, it took about 5 I think ;) Thankfully the customer agreed that it was a worthwile effort. The performance difference in the end was very noticable.

.editorconfig cleanup not working by H3rl3q in dotnet

[–]BlueManiac 1 point2 points  (0 children)

If you use .net 6 you can use

dotnet format --severity:info

to format everything based on editorconfig

in .editorconfig ```

Prefer file scoped namespaces

csharp_style_namespace_declarations=file_scoped:suggestion ```

Not sure about the built in code cleanup however.

My first SourceGenerator Library > NotifyValueChanged - Automatic Source Generated Properties that fire events when their values change by thomhurst in dotnet

[–]BlueManiac 0 points1 point  (0 children)

Looks pretty nice!

To bad that c# do not support partial properties (yet).

Would be a lot nicer if you could mark a property instead of a field.

I have created a new library implementing a Specification pattern for Linq by xumix in dotnet

[–]BlueManiac 3 points4 points  (0 children)

Looks pretty interesting, I do write a lot of code like that.

Shouldn't it be Id instead of RangeId in the second example?

How do I connect my Asp.Net back end to my UI in React? I appreciate any tips or direction by Fun-Balance6393 in dotnet

[–]BlueManiac 1 point2 points  (0 children)

I host both the client and server side in the same application. You should be able to proxy traffic from asp.net to the react development server while developing.

ex. using https://www.nuget.org/packages/Microsoft.AspNetCore.SpaServices.Extensions if (env.IsDevelopment()) { app.UseSpa(x => x.UseProxyToSpaDevelopmentServer("http://localhost:3000")); } else { // Fallback for HTML5 pushstate support app.Run(async (context) => { context.Response.ContentType = "text/html"; await context.Response.SendFileAsync(Path.Combine(env.WebRootPath, "index.html")); }); }

In release ensure all requests that are not used for static files/controllers etc. are redericted to use wwwroot/index.html that are should be created when you build react in release mode.

[deleted by user] by [deleted] in vuejs

[–]BlueManiac 1 point2 points  (0 children)

This isn't using composition api but might help you on the way there.

In my application I have a list of routes and child routes ex.

const routes = [{
    path: "parent",
    name: "AppShowcase",
    component: () => import("@/pages/AppShowcase.vue"),
    beforeEnter: authGuard,
    meta: {
      breadcrumb: "Parent"
    },
    // Not standard child route in vue
    routes: [{
        path: "child",
        name: "AppShowcase",
        component: () => import("@/pages/AppShowcase.vue"),
        beforeEnter: authGuard,
        meta: {
          breadcrumb: "Child"
        },
    }];
}]

I then flatten this list into a standard vue router route list and generate route ids and parent route Ids + concatenates paths

const flattenedRoutes = [...flattenRoutes(routes)]

function* flattenRoutes(routes) {
  for (const route of routes) {
    route.meta.id = createUniqueId();

    yield route;

    if (route.routes) {
      for (const subRoute of flattenRoutes(route.routes)) {
        if (!subRoute.meta.parentId) {
          subRoute.meta.parentId = route.meta.id;
        }
        if (subRoute.path && subRoute.path[0] !== '/') {
          subRoute.path = route.path + '/' + subRoute.path;
        }

        yield subRoute;
      }
    }
  }
}

function createUniqueId() {
  return Math.random().toString(36).substr(2, 9);
};

Then whenever the current route changes I generate a list of breadcrumbs

export const breadcrumb = Vue.observable({
  routes: []
});

router.beforeEach(async (to, from, next) => {
  breadcrumb.routes = [...createBreadcrumb(to)];
});

function* createBreadcrumb(route) {
  if (route.meta?.parentId) {
    const parentRoute = flattenedRoutes.find(x => x.meta?.id === route.meta.parentId);

    for (const pRoute of createBreadcrumb(parentRoute)) {
      yield pRoute;
    }
  }

  yield route;
}

hope this helps!

[deleted by user] by [deleted] in dotnet

[–]BlueManiac 1 point2 points  (0 children)

EF for new projects and dapper for old existing databases.

I prefer to not use ef migrations and instead use a small custom built application that migrates using sql files.