7,986 questions
1
vote
1
answer
56
views
Vscode how to do find and replace with auto import?
Often times we want to import something into some files,
and we determine those files by find and replace.
For example:
We want to find all files that has '/awesome-page',
Change to '/awesome-page' ...
-2
votes
1
answer
24
views
How to refactor a Spring Boot microservice without tests while avoiding regressions? [closed]
I'm working on a Spring Boot project following a microservices architecture. I need to improve the code quality.
Challenges I'm facing:
The code works but is not clean.
It does not follow some SOLID ...
-3
votes
2
answers
80
views
How do I refactor an `@Input` which is being updated directly, which is not possible to do in `input` signal
I am refactoring my angular code to work with signals. I have this below code, which needs to be refactored.
@Component({ ... })
export class SomeComponent {
@Input() test = null;
ngOnInit() {
...
3
votes
0
answers
128
views
Usage of CSP /nonce on Electron app with Node.js
I'm making a desktop application with Electron and Node.js, in which I'm trying to implement CSP /nonce.
So far I have developed a script that should generate the content security policy:
const crypto ...
1
vote
0
answers
50
views
VSCode rename symbol ignores references in other files
I have a class attribute account_values that occurs multiple times in class MyClass, all in the same the file file1.py. It is also referenced multiple times in file2.py. All the references in file1.py ...
0
votes
0
answers
13
views
Is it possible to prove that a given AST transformation is a perfect reversal of another?
I want to use AST transformation using jscodeshift to do a large scale refactor, changing our test runner from Jest to Bun Test.
A concern that I'm trying to mitigate is that we might migrate the ...
-1
votes
1
answer
87
views
How do I move PyCharm project folder elsewhere?
I am using PyCharm Community Edition. I have a project folder, that I now need to move to another place on the same PC, on windows 11. I don't seem to be able to do that.
There are a lot of advice for ...
0
votes
0
answers
33
views
Refactoring marshmellow schema to pydantic 2
I have been struggling to refactor this marshmellow schema to pydantic 2. Problem is with AttributeValue field. When I refactor this to pydantic, I always get strange errors regarding this field. This ...
0
votes
0
answers
29
views
Can Angular 1.4.x legacy app be embedded in Springboot 3.4.0 with Dynamic web app 6.0 config for tomcat 10.1 or which version of dynamic web will work
I have a spring 4.2.5 app with embedded angular JS v1.4.x now I am revamping the Java code from Java 8 to Java 21 and tomcat 9 to tomcat 10.1.the UI will have it redeveloped in react later. But for ...
3
votes
2
answers
64
views
Is there a way to make the output from one bash command go to a user selected location?
I'm writing a bash script that amongst other things, starts a user specified command, sending the output to either file, file and stdout, or just stdout as required.
I don't like the duplication of ...
3
votes
1
answer
112
views
Can the order of declarations alter a program?
That is can you by altering the order of declaration still have a valid program, but with a different result. This question is not if you can turn a valid program into an invalid (which you obviously ...
0
votes
1
answer
28
views
How do I move a method in a Typescript project?
I am working with Playwright on a test automation project. I already have several Pages classes and would now like to move a method from one class to another. This already has various references.
Is ...
0
votes
0
answers
15
views
How to refactor a boiler-plate random initialisation process?
Context
After having written an invariant fuzz test on a Solidity code,that uses in quite a bit of boilerplate code in order to randomly initialise the contract that is tested, I would like to re-use ...
1
vote
1
answer
68
views
Is there anyway to make Java Custom Annotation Processor with RetentionPolicy SOURCE to work?
I have created a Java Custom Annotation Processor with RetentionPolicy as SOURCE for generating personalized code for me just like Lombok's Getter & Setter.
Unfortunately it didn't worked because ...
0
votes
1
answer
92
views
How can I highlight or select all Pandas code in Visual Studio Code
I want to transition from Pandas to Polars in a big Python project. Is there a way to highlight or find all Pandas commands I've written in Visual Studio Code (or another IDE if necessary) so I would ...