« first day (4064 days earlier)      last day (867 days later) » 

3:26 AM
In Malaysia the parcel will be returned to sender, or loss.
Very likely will loss
 
 
5 hours later…
8:34 AM
lads
can one configure a build so that the only branch that can be published is master
or is a pipeline the only way
 
9:19 AM
What do you mean "a build"
Also "can" totally depends on scope
You can't stop me from locally checking out my feature branch and publishing it
If you somehow put some "if branch != master then crash" into some local build config, I can still just delete that build config
Or like, just call my feature branch "master"
 
10:20 AM
its fine i answered my own question with copious googling
ty killerino
 
 
1 hour later…
11:36 AM
Hey guys! I have the following div in my _Layout.cshtml (MVC):
html
<div class="d-flex flex-column" style="width: 10%;">
    <a asp-action="Index" asp-controller="Staff" class="btn btn-secondary rounded-0" id="staff-nav">Staff</a>
    <a asp-action="Index" asp-controller="Departments" class="btn btn-secondary rounded-0" id="dept-nav">Department</a>
</div>
What I want to do is, whenever the user is on a page that is accessible by the `StaffController`, I want the Staff Anchor to look blue, whereas for pages under `DepartmentsController`, I want the Departments Anchor to look blue. What I have currently done is, write the following codes on the relevant pages under staff and departments controllers:
js
document.getElementById('dept-nav').classList.add('btn-primary')
document.getElementById('dept-nav').classList.remove('btn-secondary')
and
js
document.getElementById('staff-nav').classList.add('btn-primary')
document.getElementById('staff-nav').classList.remove('btn-secondary')
 
Can this be done in a simpler way instead of redundantly writing these two lines 5x2 times?
 
hint: never do the above
 
and if there is no other way to achieve the goal... still don't do it
 
[Kesarling He-Him] why not?
 
11:39 AM
in an ideal situation, your layout should be derived from state, not from history
and in 100% of the situations, you can achieve that ideal situation
 
[Kesarling He-Him] But isn't MVC inherently stateless?
 
almost every stateless component is based on state
just not on connections with persisted state
a stateless service still has input state and output state
they just dont retain state between invocations
in MVC, your model is your state
your model should define how the layout is made
 
[Kesarling He-Him] Okay, that means 2 different layout pages?
 
so, when you click on an anchor, you alter the state, then the layout changes
you dont alter the layout directly
it doesnt have to mean 2 different pages
just different model values
 
[Kesarling He-Him] So what I have done is the correct way to go>
 
11:44 AM
probably not
the definition of your dept-nav and staff-nav should ask what classes it should have
not some javascript hiding in the corner of the underworld
 
[Kesarling He-Him] the classes are simple bootstrap classes, nothing really out of the world
[Kesarling He-Him] The only visible difference being
[Kesarling He-Him] btn-primary is blue, while btn-secondary is red
 
what you should do, is something like this
<a asp-action="Index" asp-controller="Staff" class="btn <% if (isOnStaffPage) "btn-primary" else "btn-secondary" %> rounded-0" id="staff-nav">Staff</a>
 
[Kesarling He-Him] I thought of doing that!
[Kesarling He-Him] but... the question is,
 
how you can do that in MVC and cshtml, iDunno
 
[Kesarling He-Him] exactly! lol
 
11:48 AM
I am VERY picky with my ui frameworks, and ASP.NET MVC is not getting in the acceptable list so my knowledge of "how" is very limited
 
[Kesarling He-Him] What do you use then?
 
kotlin-react
 
12:15 PM
[Kesarling He-Him] @Wietbot SO chat relay, done!
 
nah, I let bötler do it until bötler ded
 
 
1 hour later…
1:21 PM
I have a question bit harder to create a minimum viable code, basically we use C++ for some high performance stuff, that is ported into C# using C++CLI, basically .netifying the exported Dlls and then used as Dlls, the issue is that when a unit test runs on that part, the test passes but after that I get a log in windows event eviewer that the test runner crashed
It is screwing up the devops pipeline
The log in eventviewer is basically useless as it just says Application: testhost.net48.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an internal error in the .NET Runtime at IP 00007FF8EC3BA114 (00007FF8EC3A0000) with exit code 80131506. which doesnt really help much
Any idea on how to go about debugging this?
 
1:40 PM
What does 80131506 stand for?
Also is it maybe something with loading or unloading the DLLs? It's the only thing I can guess without more context.
Wait actually - a unit test should mock away the C++ DLLs and just test the actual .NET code itself
 
mr5
Maybe mismatch build tool version?
 
2:03 PM
Juan M on December 01, 2021
While millions of people come to Stack Overflow to find answers to their programming questions, there are well over a hundred sites within the Stack Exchange network, covering all kinds of topics from movies & tv to academia to global languages. We found that our question and answer format, along with a strong community focus,…
 
@Squirrelkiller The error number does nothing
Yes it is a loading/unloading thing as if you then try to run the application in local debug that throws the error that the dll is being used by another process
Yes the dll is done away by mock in the unit tests, but the unit test references the main library and the main library references the dll, so when the test runs I believe the reference is blocked
@mr5 build tool mismtach was something I thought of as well as we have some librabries compiled on a different version of visual studio, but it only throws up a problem here
As we have that in different parts of the pipeline but it works
 
mr5
2:25 PM
then how about the environment variables?
are you building every dependecies from scratch?
 
mr5
maybe some CPU arch specific thingy
 
I am using conan
Also the same issue happens on local dev machines
 
mr5
tests fails on local machine?
 
CPU arch is something I am pursuing
Test succeeds
 
2:27 PM
@Feeds we don't care
 
After that I get a crash report
So when this happens in Azure pipeline the pipeline stops
CPU arch looks possible as till vs2015 we had to speicfy the arch as win64, but now as A x64
So i wonder if that causes a issue
this setting is done in cmake to get the dll out of cpp code
 
mr5
yeah
so I was thinking building every dependecy from scratch maybe is the way to remove all those warnings/errors you are having
since you have native dlls
 
One of the dependency is coming externally
hence the issue
we dont know how it is built
 
can we convert publish file (DLL) into code file in c# ??
 
But cool I guess I understand that the core of the issue migh be this
@ArshmanSaleem if it is a C# code Resharper can do that most of the time with some bugs
 
2:32 PM
@anand_v.singh sir kindly guid eme if you have any idea
thankyou so much @anand_v.singh sir
 
You will need a jetbrains license
 
jetbrains is a tools? am i right?
 
thankyou got it
 
@mr5 Thanks for your help, I will see if we can get the incoming recompiled with our tools
 
mr5
2:35 PM
np 👍
 
2:50 PM
@ArshmanSaleem Simple answer: No
 
3:03 PM
Ryan Donovan on December 01, 2021
How Aiven moved from storing metrics in one giant InfluxDB to using horizontally-scalable M3.
 
 
3 hours later…
6:13 PM
Is it possible for c# deserialization (System.Runtime.Serialization) to allow datetimes with extra information? E.g. deserialize a datetime that has milliseconds even though the expected format has no milliseconds (is there an option to just ignore extra information?) I know the inverse works (if expecting milliseconds and there are none it defaults to 0)
 
6:28 PM
is it possible to access an enum that was set in a different class without passing the value through a parameter to the 2nd class?
 
6:57 PM
enum that was set in a different class?
 

« first day (4064 days earlier)      last day (867 days later) »