« first day (3316 days earlier)      last day (1622 days later) » 

4:00 PM
Try Checked='<%# DataBinder.Eval(Container.DataItem, "TheBoolColumn").ToString() == "True" %>
 
Jay
okay
 
I normally do my binding in the OnItemDataBound event just because the front end databinding is frustrating.
 
Jay
holy crap
I have checked checkboxes
 
Is that your desired result?
 
Jay
let me double check they're the ones that are supposed to be checked but yes
 
4:04 PM
We did it team.
 
Jay
it is checking the right ones, but in the event there are more than one it only checks the first one
 
Are you sure that when you're checking multiple boxes you're actually submitting multiple correct values to the backend?
 
Jay
yep
wait
I have an AlternatingItemTemplate
 
Yeah you might want to make the change there too
 
Jay
haha
that worked thanks Jonathon
 
4:12 PM
You might want to look into how you can set the value in the OnItemDataBound event as well
It's my preferred way to bind data if I'm using webforms.
 
Jay
I was trying to do that
 
What was going wrong?
 
Jay
is every Eval a separate call?
 
Jay
I just got confused about how exactly to do it
I found this example and was trying to get it to work
3
A: how to check the checkbox inside the repeater at binding time accordingto value?

Saeed NeamatiThere are many ways to do that. You can write inline ASP.NET: <asp:CheckBox id='isMarried' runat='server' Checked='<%# Convert.ToBool(Eval("IsMarried")) ? true : false %>' /> As you have mentioned, you can use repeater_ItemDataBound to find the check-box of each row, and set its value accord...

 
4:15 PM
Yeah that answer is... wrong on a few bits
 
Jay
I would rather do it in the backend too, but then again I'm happy it's working at all
 
are you databinding a dataset?
 
Jay
that may explain why I was struggling
 
or datatable?
or is it a list of some class you've defined?
 
Jay
well, it's a little complicated
this particular repeater is actually a subrepeater
and it is a datatable
 
4:19 PM
so e.Item is your repeater item. With it you can var myCheckBox = e.Item.FindControl("MyCheckBox") as CheckBox; to get the checkbox.
e.Item.DataItem is the backing data. With it you can var currentRow = e.Item.DataItem as DataRow; to get the current row.
With the data row and the checkbox you should have enough to populate your control with the value. give it a try
make sure to do null checks after the as casts.
 
Jay
okay I was trying e.Item.DataItem
oh okay
 
Then you can remove the eval from the aspx page and confirm that you're getting the values.
 
Jay
okay
 
you may want to nest the logic you write in if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternateItem), this way it will work for both templates.
but not try to do things against header or footer templates.
 
Jay
@JonathonChase yep I already have a bunch of stuff happening inside that exact thing
 
4:24 PM
Perfect, this can work alongside that.
 
Jay
out of curiosity is this whole Item/AlternateItem setup the hardest possible way?
because it seems like it sometimes
 
Not sure what you mean exactly
The backend binding?
 
Jay
honestly I just wanted the rows to alternate colors
no, just having to duplicate everything
 
Ah, right.
Well, when I use a repeater, I almost never supply an item/alternateitem template
 
Jay
it works I guess, just seems overly complicated
 
4:26 PM
I construct the entirety of what I'm going to put onto the page in the OnItemDataBound event and add it to the repeater's control collection.
 
Jay
I like the sound of that, one call not 10
I ended up with a lot of Evals
I can do the equivalent of all of them in the code behind?
 
G K
@MikeTheLiar "you're basically getting a list of child IDs and you need to find the parent row that matches that set of children exactly" - Yes that is what I need to.

Yes I am able to do it. Basically I am storing the count of each record group by Name column and then I am using that count in my second query as a correlated query.
 
Hi, I am new to this chat form. Wondering if I could post any queries here?
 
G K
Sorry for my message it was too late and lost the conversation of what we had discussed yesterday
But thanks for your suggestion
@NewLearner yes you can.
 
@NewLearner No. This room is only for sharing quiche recipies
 
4:37 PM
@Hypersapien he said that
 
Thanks @GK I had posted a question in the stackoverflow. Following is the link
0
Q: Dynamically switch between languages using resx

NewLearnerI made my test project as per How I dynamically switch between different language resource files? I am unable to see the language change at runtime. I am sharing my codes and attempts here. xaml file <MenuItem Header="{x:Static Resources:Resources.File}" VerticalAlignment="Center"> <!-- ...

But I didnt get an solution. will someone be able to help.
 
I thought you meant switch between programming languages at runtime and was right terrified for a second there
 
Sorry I meant culture languages.
 
5:28 PM
I have a list from EF with encoded HTML <Iframe>'s inside. I want to pull all of that list and decode each on on the razor page. But I dont see an HTML.Decode for razor. Any idea what I should look at?
 
5:44 PM
You could use system.web.httputility.htmldecode
But if I'm honest, you'd probably be better off doing that in your controller and returning the decoded content
 
5:57 PM
If I have methodB that returns an IAsyncEnumerable, that i call from MethodA, which is also supposed to return an IAsyncEnumerable, how do i return the result of MethodB from within methodA?
When I try to do return MethodB(); it tells me i can only use a yield return statement
does that mean the only way is to write out the await foreach
 
user47589
6:12 PM
You're using a yield elsewhere in the method?
 
Hello
Anyone here?
 
user47589
Using yield anywhere in a method turns that method into an iterator.
 
I was wondering how to bypass UAC with C# when copying DLL or OCX files? Can i do it somehow programmatically?
 
user47589
The only cure for that involves copious amounts of cowbell.
 
6:14 PM
I am building custom deployment tool for our purposes at work
Some of the projects include old OCX(VB6) components but also DLL files, old Win32 or custom built.
the tool works but fails when copying these types of files
 
@Vlad from a quick google you might be able to perform some changes on your AD Controller, but it might impact the overall security of your companies internal system
 
6:33 PM
@CaptainSquirrel I just need to take several files and copy them at 4 other locations. Remove previous copy of the same files at those locations before copying.
@CaptainSquirrel but you mean, my tool will disable some security features overall, on each computer where the tool is used?
yes they are all Windows 10 and I think also administrator users :)
 
@Vlad no, i mean if your company has an actual active directory system set up, you can create a new user and change some settings (i don't know which), to deactivate UAC
However in doing so, that specific user has the possibility to be a security problem
 
6:52 PM
I fucking hate business finances. I had this nice, elegant little system set up, and then they said "except for this one thing..." and threw their damn business logic monkey wrench into the works.
And of course it's like pulling teeth to get them to explain how it's supposed to work, since they want to talk in terms of specific accounts and you want to be able to translate it into generalized rules to turn on and off.
 
7:06 PM
^this tbh
 
@Hypersapien laughs in fintech
 
oh shit Google Stadia comes out Monday
I still can't believe they're going through with this
 
Something being a terrible idea has never stopped them before
 
I just remembered Google Sketchup was a thing that apparently is still around, but not owned by Google anymore
 
Guys how can I detect if my app is being run in the terminal (inside Rider example) or inside the system terminal?
Reason behind this is I want to set ConsoleColor.Black but only if in rider, else white.
 
7:12 PM
Any guesses as to how long Stadia is going to survive before it's discontinued? The fact that Google is doing it probably caps it at two years.
That's not even factoring in public opinion.
Holy fuck. Dead Service Walking arstechnica.com/gaming/2019/11/…
 
7:29 PM
yeah that article was what reminded me of Stadia's existence :P
not sure about troll's problem tho…I've never done anything like that
srsly though that controller still looks fugly
this is gonna be the next ouya
 
That's it. Ouya. I knew someone had tried this before but I couldn't remember the name.
 
7:50 PM
I still have no idea why anyone was excited for the Ouya. It was a tiny underpowered Android box from a no-name company; like what'd you expect?
 
Was an open source game console in your living room?
Before the nes slim and and Rpi solution
I have one still, I loved it till I got a switch with HB
 
I mean I was just about to say.....homebrew an old console :P
at that point, the Wii and Xbox were great homebrew machines...as well as the PSP
 
It does better then them because of ram
ouya had 8gb
wii was 1gb and xbox was 512
the 360 was 512gb
 
they fit 8gb of ram into the ouya in 2013?
you sure you aren't thinking of storage?
8gb memory is what the Xbone and ps4 had that same year
 
I thought the xbox1 had 512 ekk
ya and you weren't retro gaming with them then
filled a nitch
 
8:02 PM
Price:
US$99 or US$129
SoC:
Nvidia Tegra 3 T33-P-A3[39]
CPU:
ARM Cortex-A9 ×4 @ 1.7 GHz (ARMv7-A architecture)
with VFPv3 floating point unit and Advanced SIMD (NEON)
GPU:
ULP (Ultra Low Power) GeForce @ 520 MHz (VLIW-based VEC4 units[40]) (12.48 GFLOPS)
Hardware 1080p MPEG-4 AVC/h.264 40 Mbit/s High-Profile, VC1-AP, and DivX 5/6 video decode
Memory (RAM):
1 GiB DDR3-1600 SDRAM[39][41] (shared between CPU and GPU)
USB ports:
1 USB 2.0, 1 microUSB
Video output:
HDMI 1.4; 1080p or 720p resolution.[42] Stereoscopic 3D support.
I guess it was like the raspberry pi of consoles....but it sure as hell didn't advertise itself that way
 
didn't have the pin out for the same kind of specs
 
man thinking about the og xbox's specs, it's still funny to me that that console has a Pentium 3 in it
 
Ooo, SO runtime error.
 
agaainnnn???
 
indexoutofmind
 
8:11 PM
I like to think SRE's hear klaxons going off and have to sprint away from a table tennis tournament to begin remediation.
 
hi mate
what's up
 
How do I globally scope ANYTHING in C#?
Like inside of a function, I can just use vars
            var a = Properties.Resources.flashy;
            var b = Properties.Resources.flashyOut;
 
which type of application???
 
but how do I globally scope these for anything
Appplication type shouldnt matter, its a C# universal concept ;3
 
in wpf you may use application class
 
8:22 PM
What do you mean by globally scope?
 
or any static variable :/
 
But i dont know how to globally scope my resources
like be able to reference the variable anywhere in my code
rather than wasting space and pasting Properties.Resources.flashyOut; for every disabled button option
 
You implement a singleton. Are you sure that's something you want to do?
 
I want to be able to use Properties.Resources.flashyOut; as a universal variable, i use it over 30 times in my code
would love to optimize that a bit
kindof like if you wrote string name = "value";
you could then reference string name anywhere in the code
 
When you say code, do you mean multiple different files?
 
8:26 PM
may be need to use as dependency injection :/
 
Ill give you an example of code inside my "checkForCustoms" function
            var a = Properties.Resources.flashy;
            var b = Properties.Resources.flashyOut;
            var c = File.Exists(Application.StartupPath + "\\temp\\custom\\customDownload1.swf");
            if (File.Exists(Application.StartupPath + "\\temp\\custom\\customDownload1.swf") == true)
            { pictureBox10.BackgroundImage = a; }
            else { pictureBox10.BackgroundImage = b; }
I can use variables inside a function
to reference the resource
making it shorter in a huge list of if statemenets
but I also have statements that use the resource in other places, in other functions, and outside of functions. So how can i implement a variable OUTSIDE of the function that will work as a reference across the entire file
 
You do it as a class field
 
I havent actually gotten into class fields yet.
 
In the class scope, private Image _flashyOut = Properties.Resources.flashyOut;
then use _flashyOut in your methods.
 
lmao
 
8:29 PM
thats what I was looking for
 
That's not a global scope though.
 
I didnt know the "term" you had to use to reference a resource object
 
That's scoped to the class.
 
like you use a "string (name)" to reference a string, "int (name)" to reference integers, etc, but I didnt know what to use for system classes and resource objects
using variables in fields would be nice ,_,
 
was not understanding the question lol
 
8:31 PM
You use their type name.
var just implicitly types
the C# type system is unable to implicitly type fields and properties
So you must explicitly type them.
 
Why is 'var' a thing then? is it a method-specific feature?
 
eg var myString = "hello"; and string myString = "hello"; are the same. The first is typed implicitly, the second is typed explicitly.
 
it seems to work with anything
oh
 
but implicit typing does not work for fields or properties, so you must be explicit.
 
guys
 
8:33 PM
in a method you can implicitly type variables, so var away.
 
ok, still dont know some basics even though im trying to create my own exe updating software among other things
 
say for example an api route is this --> localhost:5001/api/TodoItems
in web api 2 on IIS after hosting the url will be like -->
 
Is there like... a specific reason for it to "not work"

Theres pretty much NEVER a time when a programming language has something that just "doesnt work", its usually a bug or a purposeful feature they wont add for like seurity reasons or whatnot
 
localhost isnt accessible by anything outside of your network
a web API on a self host would be... not to be rude... but... useless
try hosting with a VPS, or another online webhost server
 
8:35 PM
localhost:5001/api/TodoItems --> but when I am using dot net core; after hosting on linux machine the application name is not coming into place
localhost is for just masking the address
 
I personally just setup a Raspberry Pi 1 with apache and php mods, works like a charm
 
in pubilc post
 
what do you mean application name... Im confused, like whats your issue?
Cant connect to your server?
 
@bluetoothfx are you using IIS Express or full IIS?
because the issue is certainly the virtual path you have defined for your IIS application.
 
I have hosting it on Linux VM
the api is dot net core 3
 
8:37 PM
cri... hears the word VM
 
site's back up
 
any suggestion that I can bring the application name before /api/*
 
Finally
 
do you have a reverse proxy or is it just kestrel doing it's thing
 
nginx
yeah rev proxy
 
8:41 PM
then you'll want to configure nginx to route from localhost:5001/applicationName to the running application
 
I know this is an idiot question, but I sortof just like.. forgot if you could access an object in a public method?
Goddamn short memory
 
@JonathonChase thanks , I will try definately.
hope this will work
 
hang on my rep just went up 5 points and I didn't get notified about it and my points graph is insisting I've had 39 points for over a month
 
Yeah
recalculated...
 
they doubled the points for question upvotes
 
8:42 PM
I had 250 something rep here the other day
now im 380
lolz
I guess its a good thing
378*, Still need to edit one more question to reach 380 lol
 
@bluetoothfx looks like you would just need to have the location ~ directive for the reverse proxy in your nginx config be something like location /applicationName/. I assume you have the header forwarding already setup correctly.
 
over may head
i am sharing you my config
just check where i need to add
@JonathonChase please take a look pastebin.com/4CMyMxdU
crap
sorry
wrong information
```server {
    listen 80;

    location / {
        proxy_pass localhost:5000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection keep-alive;
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }
}```
proxy_pass localhost: 5000/MyApplicationName;
 
change location / to location /myApplication/
 
9:07 PM
@JonathonChase worked!! Thanks brother
 
You got it
 
9:31 PM
Hi guys
Economic inequality is a huge issue. A recent study found that the world's 80 wealthiest individuals own as much as the entire world's poorest 3.5 billion people. The richest 1 percent of the world's population control half of the world's total wealth.15 Many individuals, corporations, charities, and government agencies have projects and programs in place to attempt to tackle this and other important global issues such as sustainability, but there are many opportunities to do more.

A trinidad group of college students has decided to work together to do their part in making the world a bett
I have been told to identify/evaluate positive and negative risks
I am not getting what could be the positive risks in this
I do have idea about negative risks like :
Projects cost way more to implement than projected
But i am not getting about positive risk
Sorry I know this is not related to C#
 
Positive risk: Too many schools and investors sign up for and complete events, including videos which go viral, causing the server infrastructure to be unable to keep up with demand.
 
Someone told me this:
I would record those risks that prevent the project from starting and from completing, but not those that are going to happen after the project is fully implemented.
but this sounds negative : server infrastructure to be unable to keep up with demand.
 
Then drop the infrastructure part. Videos going viral and bringing additional attention to the platform would be an opportunity.
 
but that would not benefit the organization who has implemented the project
it will bring benefits to the non profit organization
 
9:47 PM
More traffic and attention to the organization wouldn't be a benefit?
 
what the hell is a "positive risk"
 
it's a risk management term for 'uncertain good thing'
 
For example, negative risk events might include the performance failure of a product created as part of a project, delays in completing work as scheduled, increases in estimated costs, supply shortages, litigation against the company, and strikes. Examples of positive risk events include completing work sooner or cheaper than planned, collaborating with suppliers to produce better products, and good publicity resulting from the project.
@Grace
 
good publicity resulting from the project.
 
1) Videos going viral and bringing additional attention to the platform would be an opportunity.

2) good publicity resulting from the project.
Right ?
 
9:51 PM
I dunno bud, it's your assignment. I'm not an expert on this.
 
That doesn't really sound like a risk
so maybe I'm not in the right mindset for this
'risk' to me means 'something bad that could happen'
 
risk in this sense has more to do with uncertainty
negative risk is the uncertainty something bad might happen. positive risk is the uncertainty something good might happen.
 
Can we say we could have more profit due to popularity of events as positive risks?
Or project will be completed within stipulated time as positive risks?
 
completing a project on time doesn't seem like a positive risk
popularity of events that revolves around investors bringing their attentions and investments to the platform does.
 
yeah right
Client easy to deal with?
 
10:01 PM
"Client" "easy" one of those words does not mean what you think it means.
 
how can I evaluate a mathematical expression in a string on the backend?
Is anything like eval built into C#?
 
@MikeTheLiar Good involvement of stakeholders or business sponsors?
 
95
Q: Evaluating string "3*(4+2)" yield int 18

sindre jIs there a function the .NET framework that can evaluate a numeric expression contained in a string and return the result? F.e.: string mystring = "3*(2+4)"; int result = EvaluateExpression(mystring); Console.Writeln(result); // Outputs 18 Is there a standard framework function that you can re...

 
that looks way slower than implementing your own calculator
 
I'd make pretty sure that you know what you're evaluating.
 
10:07 PM
yeah you don't really want to let your user evaluate new FormatOS().Format();
 
Can we say "Increase revenue" due to popularity of projects as positive risks?
 
10:41 PM
hey
 
Jack, are you still here?
Noooooo!!!!!!
Jack, treason
 
Nov 11 at 10:43, by Captain Squirrel
OFF WITH THEIR HEADS
 
anyone here an expert with azure active directory?
it's been killing me for a long time now
 
10:58 PM
hardly an expert but I know a few things
 
Tom W
i want to authenticate my .net core web api with azure ad v2.0
 
OK. Doable
 
ive followed so many different tutorials
what i always end up doing
is using an MVC app
and adding api controllers
because the template works with that
but then i can't get tokens with postman for exmaple
i'm embarassed with how long i've struggled with this
 
Do you understand that OAuth 2.0 has different credential flows, and do you know which one you're using?
 
i have basic understanding of oAuth
and generally I end up using what ever microsoft will give me in a template as i surrender
my company uses AD, and i've gotten things to work, but never the scenario that i want
 
11:04 PM
OK, so it's a web app with a signed-in user, so I guess you want the authorization code flow
 
that's what i've accepted...what i truly want is 2 split it into 2 things
1. Api that takes in oAuth tokens
2. A web app that consume that api
i understand enabling cors and all that
in the past i've written my own authentication schemes, but have been moving to AD on all my projects
 
OK. I think you need to be more specific about what you're having trouble with, because I can't write a tutorial for you in chat. Firstly, I don't know enough about it, secondly, that's going to be a ton of effort and no better than tutorials that already exist
 
sure
so if i create a .net core web api, and i choose "authenticate" in the wizard, and enter my companies domain, i can generate a token with:
/<tenantId>/oauth2/token
that will allow me access to my api, but for one is default to the v1.0 token architecture, and 2 does not provide me any details about the user (as i never had to sign in)
how can i add more details about the user to the generation of that token?
is it scopes?
because it doesn't even require me to login, it can get that far with just the client secret
i use postman to test btw
 
Requesting directly to the token endpoint sounds like the client credentials flow
 
ok, but it never asks me for credentials?
i do choose "client_credential" but don't know where to enter them, and the token is authenticated with out user info
 
11:14 PM
"client" isn't you, it's the server. The server holds the credentials; you don't
 
the AD server?
 
The web server calling the API. The web server holds the id and secret for itself and uses that to request a token from AD directly without following a redirect. It gets that back then supplies it to the API
 
in this example im using postman
and trying to get a token for the api
 
Right, so you're simulating the webserver there
 
no client server in the mix yet
ok got ya
when i choose client credential in postman, im not sure how to pass the credential
 
11:17 PM
The browser doesn't know how to do that, it follows redirects. Client credentials doesn't use redirects, so if you have a user clicking around your site I don't think this is the right flow
 
so what do i want instead?
(goal being api, and basically a SPA that consumes it)
 
also, you don't want your end user having access to that client_credential secret
 
@TomCrosman I've never done an SPA so I'm pretty blind on this one, but the docs say implicit grant
 
they wouldnt, that secret would end up on the client
the client spa
in this case, blazor web assembly
there are just so many scenarios and so many different versions of microsoft technology, v1,v2, .net, .net standard
 
Sorry, I need to go to bed
 
11:23 PM
no problem, thank you for your help
anyone know of a class i can take for this?
 

« first day (3316 days earlier)      last day (1622 days later) »