« first day (3637 days earlier)      last day (1309 days later) » 
00:00 - 10:0010:00 - 00:00

mr5
12:00 AM
You could do: new List<AppContentResponse> { new AppContentResponse { Data = ... } }
 
return new TypedResponse<IEnumerable<AppContentResponse>>
            {
                Data = new List<AppContentResponse>()
                {
                    Content  = response,
                    Heading = content
                }
            };
like so?
 
mr5
ah yes. I got confused.
 
40 mins ago, by ntohl
var data = new List<AppContentResponse>();
foreach (var pair in policyDic)
    data[pair.Key] = pair.Value;
return new TypedResponse<IEnumerable<AppContentResponse>> { Data = data };
 
mr5
lol
 
first build up the data, which will be Enumerable
than give it to TypedResponse
 
12:05 AM
but how does it know to output the subheadings
like these ones
{
  "terms-conditions":{
    "Header" :"Some Data ON TOS",
    "1" : "1 Term",
    "1.1" : "1.1 Term",
    "1.2" : "1.2 Term"

  },
    "faq":{
    "Header" :"Some Data ON faq",
    "1" : "1 faq",
    "1.1" : "1.1 faq",
    "1.2" : "1.2 faq"
  }
}
 
I can't be bothered about that anymore
 
??
 
I told you that's it all wrong from the beginning
2 method
1 returns dict
1 returns string
 
I don't get the 2 method approach though
 
no AppContentResponse
 
12:06 AM
thats all im trying to say :/
 
nor TypedResponse
you told, that's not what other guy wrote
you have to stick to one return type, which is not RESTful
 
appContentResponse is just a class , it just a response type for a endpoint like a request and response
 
you say that, but you don't realize, that the caller might get different T's at the caller site depending on the params
one enum, one single item
 
alright
ill try figure something out
 
so as long I can't be bothered to make it all correct, I'll stick to try to help with the given restrictions
why return new TypedResponse<IEnumerable<AppContentResponse>> { Data = data }; doesn't work?
data is a List<AppContentResponse
which is built up by the dict
 
12:10 AM
ill show what i currentky have
 public TypedResponse<IEnumerable<AppContentResponse>> GetContent(string content)
        {
            //Need to store on s3
            var policyFile = new StreamReader("contents.json");
            string json = policyFile.ReadToEnd();

            var policyDic = JsonConvert.DeserializeObject<Dictionary<string, string>>(json);

            var response = new List<AppContentResponse>();

            foreach (var pair in policyDic)
            {
                var p = JsonConvert.DeserializeObject<AppContentResponse>(pair.Value.ToString());
so got the list - and loop through it and increment to list
 
you are deserializing 2 times
no need
 
ah yes removed that
just kept it as
 
p.Heading = pair.Key // that's right p.Content = pair.Value
 
I get an error on the line Content = response
Cannot implicitly convert type 'System.Collections.Generic.List<eVouch.Dto.TermsAndConditions.AppContentResponse>' to 'string'
 
the end is all wrong also
 
12:13 AM
cant assign the list to a string which im confused about
 
return new TypedResponse<IEnumerable<AppContentResponse>>
{
Data = response...
response is the built up T
T is IEnumerable<AppContentResponse>
response is of that type
 
I see
one second
when i try hit the endpoint to test it
I get an error on this line
var policyDic = JsonConvert.DeserializeObject<Dictionary<string, string>>(json);
 
well. That was optimistic
 
saying Unexpected character encountered while parsing value : {. Path 'terms-and-conditions', line 2, position 27.'
 
deserializing a random json, that would give a dict
 
12:16 AM
didnt expect it to fail there
 
can you change the json?
 
this is the current structure of the json
 
" instead of '
 
{
  "terms-and-conditions": {
    "1 APPLICATION OF TERMS": "my first test",
    "1.1": "These terms apply to use of the App",
    "1.2": "If you do not agree to these Terms"
  },

  "privacy": {
    "1 Privacy Test": "test privacy content"
  }
}
 
seems ok
 
12:17 AM
so in the endpoint I'd do something like this localhost:44345/api/v2/content/privacy
 
mr5
I think it's an invalid JSON
 
oh
 
mr5
key shouldn't have hyphens
 
it worked before though
when I had it inline like so
"terms-and-conditions": "this is my test"
ill try remove it
 
validator sais it's ok
 
mr5
12:19 AM
yeah my bad
 
yeah still seems fine for some reason
not sure why its failing there
Exception thrown: 'Newtonsoft.Json.JsonReaderException' in Newtonsoft.Json.dll
An exception of type 'Newtonsoft.Json.JsonReaderException' occurred in Newtonsoft.Json.dll but was not handled in user code
Unexpected character encountered while parsing value: {. Path 'terms-and-conditions', line 2, position 25.
 
I don't see, where is the error coming from
 
yeah :/
its this line var policyDic = JsonConvert.DeserializeObject<Dictionary<string, string>>(json);
 
I don't know why is that throwing
 
If I have just this in my json file it goes passed that error
"faq": "1 APPLICATION OF TERMS "
and then gives the same error on this line
  foreach (var pair in policyDic)
            {
                var p = JsonConvert.DeserializeObject<AppContentResponse>(pair.Value.ToString());
                p.Heading = pair.Key;
                response.Add(p);
            }
            var p = JsonConvert.DeserializeObject<AppContentResponse>(pair.Value.ToString());
 
mr5
12:27 AM
the correct type is: <Dictionary<string, Dictionary<string, string>>
 
Do i just assign pair.value.tostring
ohh
 
mr5
also, you need to deserialize once only
 
@mr5 like so ? var policyDic = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>(json);
give sme an error saying I cant use <TKey, TValue> like a method
oh i got it
 
was missing a ">"
what do I change this line to?
            var p = JsonConvert.DeserializeObject<AppContentResponse>(pair.Value.ToString());
@mr5 was thkning to do something like List<AppContentResponse>(pair.Value.ToString());
but it doesnt give me access to the appcontentresponse
 
mr5
12:46 AM
I'm lost with all this explanation >.<
 
it was mentioned to not deserialize twice
sorry for the confusion guys
but what would I change
var p = JsonConvert.DeserializeObject<AppContentResponse>(pair.Value.ToString());
to
 
mr5
what is pair.Value?
 
            var policyDic = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>>(json);

            var response = new List<AppContentResponse>();

            foreach (var pair in policyDic)
            {
                var p = JsonConvert.DeserializeObject<AppContentResponse>(pair.Value.ToString());
                p.Heading = pair.Key;
                response.Add(p);
            }
 
mr5
pair is Dictionary<string, string>
no need to deserialize it as it is already an object
 
what would these be then? p.Heading = pair.Key;
because I need access to the <AppContentResponse>
 
mr5
12:52 AM
var p = var new AppContentResponse { Heading = pair.Key }
response.Add(p);
 
oh
,my
and for conte
content
var p = new AppContentResponse { Heading = pair.Key, Content = pair.Value };
oh it cant be
becasue <Dictionary<string, Dictionary<string, string>>>
 
mr5
no
pair.Value is a string
ah no
I'm confused again.
sorry
 
dont apologise im the one thats confusing you
this is whati have atm
var policyDic = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>>(json);

var response = new List<AppContentResponse>();

foreach (var pair in policyDic)
{
var p = new AppContentResponse { Heading = pair.Key, Content = pair.Value.ToString() };
response.Add(p);
}
no errors atm
want to see where it errors
okay it seems that
from this json
wait im cofnused
*confused
I'm not passing my parameter anywhere so it's not even checking for the {content-key}
public TypedResponse<IEnumerable<AppContentResponse>> GetContent(string content)
        {
            //Need to store on s3
            var policyFile = new StreamReader("contents.json");
            string json = policyFile.ReadToEnd();

            var policyDic = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>>(json);

            var response = new List<AppContentResponse>();

            foreach (var pair in policyDic)
            {
                var p = new AppContentResponse { Heading = pair.Key, Content = pair.Value.ToString() };
 
JsonConvert.DeserializeObject<Dictionary<string, string>> should be
 
mr5
` AppContentResponse { Heading = pair.Key, Content = pair.Value.ToString() };`
 
1:01 AM
which doesn't work. I don't know why
 
mr5
why are you doing this?
why pair.Value.ToString()?
 
becuase it was giving an error if I dont use .tostring
 
yeah. Just response[pair.Key] = pair.Value
 
mr5
pair.Value is Dictionary<string, string>
 
Cannot implicitly convert type 'System.Collections.Generic.Dictionary<string, string>' to 'string'
 
mr5
1:02 AM
wtf is response?
 
response is var response = new List<AppContentResponse>();
 
mr5
if you invoke ToString of Dictionary<string, string> you will get garbage
 
I see
 
I give up
time to sleep
 
mr5
lol
 
1:03 AM
where would I pass content?
 
bye
 
mr5
me too. I'm sleepy
 
sorry dude
 
mr5
o/
 
night
 
1:03 AM
Hi
 
mr5
where is Ying?
 
Hi need someone help on this issue, i can't get the solution
-1
Q: How to prevent duplicate data insert into Gridview in C# ASP.NET

YYY I have a table view like below: EQP LOT_ID ACTIVITY MSG MODIFIED_DATE 001 WM31960 LOAD_LOT Load lot success. 9/29/2020 11:11:17 AM 001 WM31799 UNLOAD_LOT Unload lot success. 9/29/2020 11:10:48 AM...

 
@mr5 I'd have to change the dictionary then>?
 
mr5
to end all of your sufferings, just follow this: dotnetfiddle.net/ppdmWH
 
nevermind I managed to get it
thank you guys for all your help x
Im pretty sure this should be the expected response
 
 
4 hours later…
5:38 AM
Buenos dias
 
mr5
6:02 AM
o/
 
6:42 AM
Heyho
 
Sup
 
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' pleberinos!
 
Morning.
 
7:05 AM
yo yo yo
Does anyone here program?
 
I'm not so sure anymore
I fix git, review stuff and talk very much these days
 
@CupOfJava No.
I just scream at my scream angrely.
 
mr5
I only play dotka
 
@Squirrelintraining Careful with that, you'll recurse
 
mr5
@Squirrelintraining youtu.be/Ni2n5hSKIyg?t=17
 
7:12 AM
I would program but my C'ing isn't that # anymore
 
that song slaps
 
mr5
I hear you mahn
 
I would honestly put it on my playlist
@Hozuki Are you having any trouble installing the lastest Mac update?
 
@CupOfJava Yes, but not due to the same problem as you!
 
7:17 AM
@mr5 We're sitting ehre in Ventrillo, playin' little dota.
 
wym?
 
mr5
@Squirrelintraining ventrilo? the software?
 
"Vi sitter i Ventrilo och spelar DotA" (Swedish for "We're sitting in Ventrilo, playing DotA" and shortened to "DotA") is a song by Swedish dance DJ Basshunter which samples a remixed version of the French song "Daddy DJ" by Daddy DJ. The lyrics, in Swedish, are about using the voice chat program Ventrilo while playing Defense of the Ancients, a gamemode within Warcraft III. The song incorporates samples from the game. It was released as the second single from Basshunter's first album LOL. == Music video == The video starts out with Basshunter's mother (portrayed by his actual mother) opening a...
> It was released as the second single from Basshunter's first album LOL.
Now that, is funny.
 
@CupOfJava My HDD is full so no bueno
Can't update shit
 
there's USBs for that....
but I get it
 
mr5
7:25 AM
@Squirrelintraining ohhhhhhhhhhhhhh
 
@CupOfJava Um, no. Apple doesn't support that at all.
Windows does, but Apple doesn't.
Just like their terrible shitty Mac store that requires free disk space the size of the entire fucking app.
XCode is what 30GB? Update it? You need 30GB free.
WHAT
Just fucking patch it
But no
Apple is too fucking retarded to make decent software
 
wait what year mac do you have?
 
MacBook Pro 2018
 
ahhhh
I have a pro 2012 because it was the cheapest one I could get and still use Xcode
 
I guess it has more disk space :P
 
7:28 AM
@CupOfJava 🤣
 
but doesnt he actually sing something like "vi sitter här i venten och spelar lite dota" like "we're sitting in the [cellar?idontknow] and play a little dota"
 
@Squirrelintraining I not spending a grand to be able to sell an app
I got it second hand for 150$, works great
 
@CupOfJava Truth.
Wlep apple succs.
 
This one was 2250,- something euro.
 
@Hozuki No, I think it's because the only thing I have on it is Xcode
 
7:30 AM
BUt you can make good 💰 from apple sheeps
 
turns out spotify has it and the smart speaker finds it easily ヾ(⌐■_■)ノ♪
 
Problem is, I have a dual boot setup on it.
128GB for Mac, 128GB for WIndows
It's terrrrrrible
 
@Squirrelkiller Thatshwy u use deezer
 
Can you convert it back?
 
Well, sure, but where do I do my windows work then? :-D
 
7:32 AM
.... What windows work can you not do on vm?
 
Hahahaha.
It's a 2018 model, sure, but it only has 2 cores.
Running a VM is waaay too much for it
 
Guys have you seen the debate Trump vs. Bindne?
 
I should ask what the policy is for new laptops, maybe at 3 years? The new ones come with 1TB SSD at least.
 
mr5
@Hozuki buy Windows laptop
 
there are ways to run a third party machine remotely
I'm trying to remember what it's called
 
7:34 AM
Won't work. It's a work laptop. I develop apps and all that.
 
it starts with an s
 
I need the local OS
 
yeah IP might be a problem there
 
And USB
 
IP(intellectual property)
I mean there's something where you buy the right to run a computer somewhere else and it sends you a video capture of what you're doing on that computer. It starts with an s and I don't remember what it's called. give me a minute
I was thinking about using it for mac before I bought one
 
7:41 AM
Eh, doesn't matter. This is a work PC. My company needs to provide hardware for me to work with. I'm not looking for alternatives for something they provide.
 
that's fair
Chromebooks are stupid cheap
they're like 150$ brand new
I found it, it's called SSH'ing into a remote computer
 
8:01 AM
@Squirrelintraining What why? I can't see a reason to use deezer in my sentence.
 
@Squirrelkiller Yes.
Say spotify use deezer.
Trinke Fanta lebe bunter.
 
@mr5
@mr5 unemployed? since when
 
@Squirrelintraining The GF says it would make me fat though :/
Also Fanta is way too sweet for my taste
Get some real Orangenlimonade
 
@Squirrelkiller Don't listen to her. ITS A TRAAAAP
 
But we made a deal that she doesn't use instagram anymore in return, so that's a sacrifice I'm willing to make.
 
8:12 AM
Fanta has a disgusting amount of sugar in it
Scratch that, all sodas have a disgusting amount of sugar in them
 
It's like the Java of Orangenlimonade - it's everywhere because it's everywhere, not because it's especially good.
 
Oh, that's a good deal.
 
@CupOfJava I don't know where you live but in germany there are sodas that are surprisingly low sugar. Look for the ones in glass bottles.
 
There are tons of sodas with artificial sweeteners and while they don't have calories, I can't really say they're not unhealthy.
Even though I drink a ton of those o_o
 
@Squirrelkiller I'm in America, you know, the place where we put like 50g of sugar in our bread
 
8:16 AM
From what I hear, your "bread" deserves quotes around it too.
 
Yeah..... that's why I make my own
 
Ohhhhhhh what kind do you make
 
I usually make Challah bread
I like it because it's pretzely but can still be used for sandwiches
@Hozuki Do you make bread? If so, what type do you make?
 
Just french bread
 
Isn't any bread made in france french?
 
8:21 AM
I love fresh french bread
 
Also is that an american word for Baguette?
 
I mean, it's so super simple and there's nothing bad in it. And tastes great.
Flour yeast salt water, that's it
 
Huh, seems like I should try it
 
I don't particularly like the very sweet breads with tons of honey or sugar
 
One of my favorite meals is french onion soup with a piece of french bread in it with cheese melted on top
 
8:23 AM
I actually have a bread maker at home, might make it even easier
 
You can make it no-knead style, just toss the ingredients together in a bowl and let it rest for 12-24h. Then cook it the next day.
 
Dude, have you seen yourself in the mirror?
You are a bean!
 
...cook? In a pot?
 
Sorry. Bake, in an oven, or airfryer.
 
@Squirrelintraining For now
 
8:24 AM
Or in a cast iron pot
 
@Squirrelkiller You gotta get that freshly pressed orange juice from aldi and mix it with some sparkling water 30% juice 70% water, it's better than Fanta³
 
get the blue top from aldi, it has 50% less sugar
 
@CupOfJava Stfu the blue top is fully carbnated!
 
.....
 
ahoy mateys o/
 
8:26 AM
Ahoy Captain o7
 
@CupOfJava What the fuqq is this?
 
Orange Juice
 
@CupOfJava The Water and the Orange Juice!
Don't know what u got there
 
that looks like such a small bottle
 
8:34 AM
That is what an american would say
 
but I guess it's only .5 liter less
 
@CupOfJava A litre
And a litre and a half.
@Squirrelkiller Americano
 
that's funny
the website changed the spelling for me
 
Liter == german
 
I mean the spelling of liter ( or litre )
 
8:50 AM
I know.
UK: Litre
USA: Liter
Germany: Liter
So "your" spelling is actually just german
 
interesting
I think Canada: Litre
 
The litre (British and Commonwealth spelling) or liter (American spelling) (SI symbols L and l, other symbol used: ℓ) is a metric unit of volume. It is equal to 1 cubic decimetre (dm3), 1000 cubic centimetres (cm3) or 0.001 cubic metre. A cubic decimetre (or litre) occupies a volume of 10 cm × 10 cm × 10 cm (see figure) and is thus equal to one-thousandth of a cubic metre. The original French metric system used the litre as a base unit. The word litre is derived from an older French unit, the litron, whose name came from Greek—where it was a unit of weight, not volume—via Latin, and which equalled...
> The litre (British and Commonwealth spelling) or liter (American spelling)
 
malaysia: liter
ratatoskr killer
 
> The spelling used by the International Bureau of Weights and Measures is "litre",[3] a spelling which is shared by almost all English-speaking countries. The spelling "liter" is predominantly used in American English.[a
@Squirrelkiller Ofc this picture has to be in the english version of the Litre article en.wikipedia.org/wiki/Litre#/media/File:Masskrug.jpg
 
Merica, F*ck yeah
 
9:01 AM
 
@CupOfJava caltic art logo 🤣
@Hans1984 the beer is here
 
9:16 AM
Yay mcgyver solutions
 
9:38 AM
@CupOfJava haha nice
@Squirrelintraining good
 
has anyone been to Oktoberfest before? is it expensive?
 
Yes and yes
Born and raised in Munich
 
hmm as a European I feel like I should go to an Oktoberfest at least once in my life
 
As a german, we are ashamed that this exists and is spreading throut the country.
 
wait I thought Oktoberfest was a super old tradition
what's wrong with it?
 
9:46 AM
No, I've never been there
Although I've been living in bavaria all my life
 
@JansthcirlU It originated in the Ausland - Bavaria
 
lol rip Hans then
 
make bavaria great again!
build the wall!
 
a wall of full beer glasses
 
why not
 
9:50 AM
I would enjoy sieging Bavaria if that were the case
 
but they are all empty!
ha
 
@Hans1984 yes please build it
We notthern germans are fed up being displayed as this leberwurst eating lederhosen wearing fat bavarian dude.
 
well thats because the rest of the world is dumb and ignorant
 
exactly
 
not our fault
especially americans of course
 
9:53 AM
I'd also argue that being displayed as beautiful and busty dirndl-wearing chicks is also a side effect of the popularity of Oktoberfest
 
but they are fat and dumb aswell
maybe thats why they like that picture
¯\_(ツ)_/¯
 
@Hans1984 Well now it's gonna be really exhausting. 10 years ago it was actually possible to go with the family and have a nice day there. Now it's full of just way too many people so that is the exhausting part.
Beer is still great though.
 
00:00 - 10:0010:00 - 00:00

« first day (3637 days earlier)      last day (1309 days later) »