Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Activity for Alexeiâ€
Type | On... | Excerpt | Status | Date |
---|---|---|---|---|
Edit | Post #280201 |
Post edited: added relevant tag |
— | about 4 years ago |
Comment | Post #280169 |
In most cases, the canonical way to fetch data from an external application is though its API. Reddit seems [to expose one](https://www.reddit.com/wiki/api). (more) |
— | over 4 years ago |
Edit | Post #280142 | Initial revision | — | over 4 years ago |
Question | — |
How to manage views and stored procedures in an ASP.NET Core project? I am slowly modernizing an older ASP.NET Core Web API and one of the steps involved migrating from database first to code first. Now, all schema changes and seeding is covered by migrations which are automatically run at API startup. However, the service also uses several dozens of views and store... (more) |
— | over 4 years ago |
Comment | Post #280112 |
I also suspect this reason. Unfortunately, where I work it sometimes happens that folks to just copy-paste old projects configuration (in this case Jenkins job configuration) without wondering why a step is there. Thanks. (more) |
— | over 4 years ago |
Edit | Post #280097 | Initial revision | — | over 4 years ago |
Question | — |
Is it necessary for a build server to remove node_modules before an AOT build? I am currently dealing with an Angular application that is being deployed using an CI orchestrator and Jenkins. Jenkins job is configured to do the following (relevant steps only): - fetch sources from Git - remove nodemodules - `npm install` - perform AOT build (`--prod` + other optimizati... (more) |
— | over 4 years ago |
Edit | Post #280089 | Question closed | — | over 4 years ago |
Comment | Post #280089 |
Questions about programming resources are currently off-topic, as indicated [here](https://software.codidact.com/help/on-topic). However, asking questions about specific programming issues when working in Julia is on-topic. (more) |
— | over 4 years ago |
Edit | Post #278920 |
Post edited: added relevant tag |
— | over 4 years ago |
Edit | Post #277455 |
Post edited: added relevant tags |
— | over 4 years ago |
Comment | Post #279853 |
Not sure if this was mentioned, but we can have a "sandbox" or similar category just like they have on World Building SE: https://worldbuilding.meta.stackexchange.com/questions/639/how-does-the-sandbox-work-how-do-i-use-it . However, the flow is quite tedious (ask in the Sandbox, get feedback. post o... (more) |
— | over 4 years ago |
Comment | Post #279853 |
This is an interesting idea, but there are some drawbacks as shown on SO: https://meta.stackoverflow.com/questions/252781/would-it-be-a-terrible-idea-to-split-so-up-into-a-tiered-platform . (more) |
— | over 4 years ago |
Comment | Post #279744 |
Also, it is not clear why I need more classes. Indeed I might need more code in the tests since each test class defines its own mocks as opposed to the in-memory provider which might have a single place to define all mock data. The setup is actually simpler because it consists of defining mocks for D... (more) |
— | over 4 years ago |
Comment | Post #279744 |
That's an interesting perspective as I failed to realize that indeed the tests have to know something about the infrastructure (the DbSets actually). However, some aspects of your answer are not clear. In my case unit tests require the class to be tested + mocking. The alternative requires the class ... (more) |
— | over 4 years ago |
Comment | Post #279712 |
To be more precise, it is not saying that the questions are posted by luap42, but that the last change was made by luap42. In fact, this is true, but the issue is that that change is invisible for regular users (e.g. who cannot remove answers). (more) |
— | over 4 years ago |
Edit | Post #279671 |
Post edited: added relevant tag |
— | over 4 years ago |
Edit | Post #279649 |
Post edited: added relevant tag |
— | over 4 years ago |
Edit | Post #279555 | Initial revision | — | over 4 years ago |
Question | — |
What are the cons of directly mocking Entity Framework DbSets instead of working with an in-memory database when unit testing the application? I have recently contributed to a Clean Code project and had a discussion about how to implement unit tests. The project author argues for using an in-memory database (which easily replaces the real one) instead of mocking the DbSets and now I am doubting my own approach. The in-memory database... (more) |
— | over 4 years ago |
Comment | Post #279449 |
I think in order to fully understand you should provide more details. Is this task a custom task? (e.g. removes an existing file and downloads a newer version). The error might also appear when the file to delete is not found. Since this is not always happening, I suspect it is not related to Jenkins... (more) |
— | over 4 years ago |
Edit | Post #279436 | Initial revision | — | over 4 years ago |
Answer | — |
A: How much memory is allocated for a MySQL VARCHAR variable in a stored procedure? This answers your questions, not what I suspect to be real issue. According to the specifications a VARCHAR(100) will need actual data stored length + 1. So, the actual size would have mattered if you have used CHAR(100) instead: > The compact family of InnoDB row formats optimize storage fo... (more) |
— | over 4 years ago |
Comment | Post #278978 |
Also, can you provide more information about "run out of memory"? Is it the stack (too much recursion?) or another type of memory? (more) |
— | over 4 years ago |
Comment | Post #278978 |
Can you please post the relevant parts of your procedure? As written, this looks like an XY problem (i.e. the issue seems to be in the way the procedure is written not the VARCHAR length). (more) |
— | over 4 years ago |
Edit | Post #279424 | Initial revision | — | over 4 years ago |
Question | — |
Are any downsides of hiding the actual Entity Framework Core DbSets and exposing only some generic methods? I have recently started a project based on the clean architecture principle and noticed that it did not rely on generic repositories since Entity Framework's DbSets are doing the job just fine. In the referenced project the database context class implements an interface that exposes all the DbSets, b... (more) |
— | over 4 years ago |
Edit | Post #279277 |
Post edited: added relevant tags |
— | over 4 years ago |
Edit | Post #279317 | Initial revision | — | over 4 years ago |
Answer | — |
A: How to automatically run Entity Framework Core migrations for an application which uses a user with read/write rights on certain tables? Migrations are applied during the application startup (initialization) only when the application is not accessible yet. One way to go is to leave the existing user as it is and define a designated one for the migrations. Applying the migrations requires powerful roles (create or drop table): - ... (more) |
— | over 4 years ago |
Edit | Post #279316 | Initial revision | — | over 4 years ago |
Question | — |
How to automatically run Entity Framework Core migrations for an application which uses a user with read/write rights on certain tables? I have decided to convert a legacy database-first ASP.NET Core project to code-first. However, I have noticed that the project used the same database as another bigger project and the Entity Framework user had the minimal rights (read and write on some tables). Clearly, this does not allow the app... (more) |
— | over 4 years ago |
Edit | Post #279187 |
Post edited: fixed a typo |
— | over 4 years ago |
Edit | Post #279187 |
Post edited: fixed variable name |
— | over 4 years ago |
Edit | Post #279187 |
Post edited: fixed the link |
— | over 4 years ago |
Edit | Post #279187 | Initial revision | — | over 4 years ago |
Answer | — |
A: Is there a way to automatically fix MySQL tables where the auto_increment has fallen behind the correct value? This is possible in two steps by using a dynamic SQL: SET @nextId = (SELECT MAX(id) + 1 FROM `CustomTable` ); SET @sql = CONCAT('ALTER TABLE `CustomTable` AUTOINCREMENT = ', @nextId[]()); PREPARE st FROM @sql; EXECUTE st; However, if the values fall frequently you should try ... (more) |
— | over 4 years ago |
Edit | Post #279144 |
Post edited: added relevant tag |
— | over 4 years ago |
Edit | Post #279097 |
Post edited: added tag |
— | over 4 years ago |
Edit | Post #279146 | Initial revision | — | over 4 years ago |
Answer | — |
A: In MySQL is there a limit to the number of keys in a IN() clause? According to the documentation for the MySQL IN function: > The number of values in the IN() list is only limited by the maxallowedpacket value. The default value for it is 67108864. So, you should be able to squeeze quite a big number of identifiers, but you should definitely try it out to... (more) |
— | over 4 years ago |
Edit | Post #279059 |
Post edited: added MoreLINQ reference |
— | over 4 years ago |
Comment | Post #278952 |
I have reported the issue on GitHub (thanks Monica for moving it to the right place, now I know that qpixel is the actual project :) ): https://github.com/codidact/qpixel/issues/268 (more) |
— | over 4 years ago |
Edit | Post #279059 | Initial revision | — | over 4 years ago |
Answer | — |
A: How to perform LEFT JOIN using LINQ method call notation? Note: this was tested in a .NET Framework 4.6.2 project. This answer provides an extension method that greatly simplifies (and makes it more intuitive) the written code: public static IQueryable LeftJoin( this IQueryable outer, IQueryable inner, Expression> outerK... (more) |
— | over 4 years ago |
Edit | Post #279058 |
Post edited: simplified the query |
— | over 4 years ago |
Edit | Post #279058 | Initial revision | — | over 4 years ago |
Question | — |
How to perform LEFT JOIN using LINQ method call notation? I am interested in performing a LEFT JOIN using LINQ-2-SQL when working with method call notation. This answer suggests a way that relies on GroupJoin but it is more verbose than expected: var leftJoin = p.Person .GroupJoin(p.PersonInfo, n => n.PersonId, m => m.PersonId, ... (more) |
— | over 4 years ago |
Edit | Post #279034 |
Post edited: added relevant tag |
— | over 4 years ago |
Edit | Post #279051 | Initial revision | — | over 4 years ago |