Skip to main content
Filter by
Sorted by
Tagged with
2 votes
1 answer
100 views

I'm building a Node.js backend using plain SQL (no ORM, just mysql2 wrapped in a small helper). However, as my project grows, my route handlers start looking messy — full of raw SQL strings embedded ...
OuterTowner's user avatar
0 votes
0 answers
41 views

I am trying to atleast clean the component.ts using services or somthing in my angular i have many repetitive code that i trying to fix and refactor. I am trying to apply DRY as possible can i have a ...
Jonel Teano's user avatar
0 votes
0 answers
41 views

Description: I'm working on a Vue/Nuxt project where we typically create a single component that handles all inputs, their state, validation, and submission to the API. While this approach works, it ...
Romin Manogil's user avatar
1 vote
0 answers
33 views

I have texts and text fields with the same modifiers. Instead of copying and pasting them every time, is there a way to clean them up so they're called like functions or extensions? Is there a way to ...
Alfred Wong's user avatar
0 votes
1 answer
763 views

I am using Code Cleanup in Visual Studio and noticed when file is on save. The unused variable will be removed like: I tried editing the .editorConfig file but it didn't seem to work with any of the ...
Sophie cai's user avatar
-2 votes
1 answer
345 views

I wrote a script in Python that is running for some time and performing a clean up as soon as it terminates regularly like: import time def cleanUp(): #delete some temporary files and so on ...
Leoncino's user avatar
  • 119
2 votes
2 answers
943 views

In VS2022 I turned on the very useful feature "Run Code Cleanup profile on Save". With this option on, every unneeded using statement in code gets removed automatically on save. Now I would ...
Disti's user avatar
  • 1,601
4 votes
0 answers
302 views

Environment: Visual studio 2022, v17.8.3 with net8 support I did cleanup to c# solution with 6 projects using profile2 . I found that vs 2022 during code cleanup using profile2 add these like ...
M.Hassan's user avatar
  • 11.2k
0 votes
1 answer
126 views

I have this code : useEffect(() => { const init = async () => { try { socketRef.current = await initSocket(); socketRef.current.on("connect_error", (err) =&...
Nishant Sharma's user avatar
2 votes
1 answer
118 views

I have a problem with Resharper code cleanup, it turns out that there is some collision/setting in my editor config that causes spaces to be added in the interpolated text, spoiling the result. The ...
xkk's user avatar
  • 48
0 votes
0 answers
67 views

I need to build a application to extract data from multiple JSON-Files and store it into a Database. The File looks like this and parsed results in a highly nested object. To explain, i need to go ...
Julius's user avatar
  • 108
1 vote
1 answer
348 views

I’m currently learning about the cleanup function in useEffect but I’m stuck on how it works in this particular example. I’m specifically stuck in the order of operations. Looking at the last three ...
Tomas Rodriguez's user avatar
-2 votes
1 answer
46 views

I have a form with two groupBoxes with various radioButtons each; When selecting one of them, I want to change the texts in textboxes (in each groupBox); Currently using this sequence of "if's&...
faugustom's user avatar
2 votes
0 answers
185 views

I decided to switch from foo == null checks to foo is null. Instead of having to search through all of my code, I set dotnet_style_prefer_is_null_check_over_reference_equality_method = true in my ....
Jonathan Siegel's user avatar
-2 votes
2 answers
319 views

I have solved my problem in the way I will describe below but I want to find the best way. Typescript has generic type Readonly that solved this problem. Thanks for your suggests I used folowing codes ...
BQF's user avatar
  • 113
-3 votes
2 answers
121 views

The code I say has to complete these assignments: Given an integer,N, perform the following conditional actions: If N is odd, print Weird If N is even and in the inclusive range of 2 to 5 , print Not ...
GabsArcan01's user avatar
0 votes
0 answers
50 views

I'm targeting a bunch of different languages in my LESS/CSS with the :lang() pseudo-class. It looks like this (but even more languages): :lang(af), :lang(sq), :lang(eu), :lang(bs), :lang(ca), :lang(kw)...
jonstieg's user avatar
  • 172
0 votes
1 answer
74 views

I have these two methods. Can someone help me to refactor and make them common? public void method1(Map<String,String> map, String key, String value){ map.put(key, value); } public void ...
hiren shah's user avatar
10 votes
1 answer
2k views

I have the following settings regarding my Tab sizing in Visual Studio 17.4.1: When I use Edit->Advanced->Format Document, I get this result: I configured Code Cleanup which allegedly contains ...
Nestor's user avatar
  • 8,444
-2 votes
1 answer
425 views

I'm a newbie in coding javascript, to be honest there is a lot of things I don't understand but i always manage to make things work. I wrote something for odin project but i'm sure it's not as clean ...
ljaskolka's user avatar
0 votes
0 answers
32 views

I have an application with plenty of third-party packages in it, some of them are not required, and few packages have many versions installed in the environment. Is there any tool or method to detect ...
DilLip_Chowdary's user avatar
1 vote
0 answers
438 views

I am building a next.js website and intend to include Google AdSense at some point in the future. After following some examples and implementing the scripts as per a Next project I am hitting a wall ...
John E's user avatar
  • 186
1 vote
1 answer
5k views

This is my old implementation of the Tabs component in Ant Design. const tabList = [ { key: "tab1", label: "Tab1", children: <Tab1 />, }, { key: "...
user avatar
0 votes
1 answer
30 views

while True: month_num = int(input("enter the month number: ")) if month_num == 1: print("january") elif month_num == 2: print("February") ...
saif's user avatar
  • 1
0 votes
1 answer
502 views

I found the code cleanup options but I want to apply them only on lines that have been edited and not the entire file. Is this possible to achieve?
Berecz Balázs's user avatar

1
2 3 4 5
13