« first day (4123 days earlier)      last day (808 days later) » 

2:40 AM
 
 
7 hours later…
9:25 AM
Just wrote a new answer to an old question. Feeling on top of the world XD: stackoverflow.com/a/70903871/11455105
 
@AmalK Damn some necromancy there
@learner Oh for your app itself, it is totally possible to use SignalR. Pretty nice idea actually. You cna use it to send the recording from the client to your server. Then your server does the processing: make sure it has the correct format (44100Hz, 1 Channel, signed 16 bit PCM little endian), encode it to base64 and send that to the shazam API.
Also more secure, since you'll need an API key for the shazam API and you don't wanna give that to the client.
 
9:49 AM
I will try to send the recording. Thanks a lot for the ideas. It was very useful for me
Do I need to use a different api than rapidapi?
 
I think rapidapi is a good candidate for you, seems to work straight forward
They even have a nice C# snippet to copypaste
Although I guess, before actually sending the recording to rapidapi, you'll have to figure out how to record audio in a browser. At least that's what I would have to learn completely from the beginning lol, no idea how to do that.
Hell I don't even know how to just...play radio through a website.
If you get it to work, I'd appreciate if you show me the working code :)
 
the radio is playing in my codes
i can post what i tried with zip file
 
I will definitely not download a zip file from an internet stranger ;)
You could however put it on gitlab or something
In case you aren't already, I highly recommend using source control anyway
 
we transfer
site name we transfer
 
Yup I see
still, not gonna download a zip file
 
ok i can post the github link
 
If you want to share code, either do it in a gist for small stuff or github/gitlab/etc for whole projects :)
 
10:36 AM
I couldn't upload all the files of the whole project because github didn't allow it
index.cshtml the file that the radio plays
The site.js file is the file where the api is located
There is also hub.cs
 
11:01 AM
...what does your source control look like? Do you actually use git? Because it sounds like you manually uploaded files^^
Oh nice, I see you just put the link into an <audio> tag, that's easier than I thought.
 
I shared three important files
 
What framework is that? asp.net core MVC? Razor Pages? Blazor Server?
 
asp.net core
 
Ah so MVC probably. I still don't completely understand that one^^
I went from desktop apps straight to using Blazor so I can use C# in the browser :D
Blazor Server is basically the successor of MVC, while Blazor WASM is something entirely new
Ok well looks like your next step is to actually record whatever comes over the radio.
 
11:12 AM
Ahh I see, Razor Pages then
Why do you relay the message to Clients.Others then instead of .All?
 
I can change
 
I know I can't modify a List in a foreach loop because it's immutable. But can I modify the list item itself in a foreach loop? Like just change the value of item?
 
I reloaded the whole project
@Squirrelkiller
@Squirrelkiller ok i will try now
 
11:51 AM
Hi all,Is there a difference between IHostBuilder.UseUrls(), and specifying Kestrel:Endpoints:Http:Url in appsettings?, I can't find a comparison between both..
 
12:31 PM
@icecub sure
although, List is not immutable, but if you edit it inside a foreach, you are probably messing with the enumerator
 
 
2 hours later…
2:52 PM
Should the record function in the index.cshtml file?
To access from site.js file (with id)
@Squirrelkiller
 
Tbh I don't really understand what exactly the job of the site.js file is
Since that is where the signalr stuff is, I guess that is the correct file
Then from there access th adio stuff via id
 
3:14 PM
site.js file is starts a connection
I will try to write the recording function in site.js
 
 
2 hours later…
5:33 PM
anyone online in here? o:
 
5:44 PM
Sometimes, yes
 
Hey a wild Squirrel appeared :D
sup Squirrel, being a while man. ^^
 
Indeed lol
 
I don't even remember when we last spoke :p
 
Trying to analyse graphs currently, gotta have this implementation working by monday for this exam
 
I have a question for you, if you are interested.
 
5:47 PM
Go ahead
 
oh
Well I will shoot here and lets see.
Delegate Invoke vs Dictionary lookup.

I am going to make a test project for this Versus.
But I wanted to know if any of you know this straight away.

Imagine you have a class called Ship and this class has some Network callback methods associated with some NetworkMessageTypeID that points the message to a specific call back method inside the Ship class.

ex.: Server received a message meant for the ShipStatusListener() method.

In a delegate scenario, you would just call the delegate for that method.
My believe is that a Dictionary lookup is faster.
I copied the text from Discord hahaha sorry :p
I tried a C# group there first ^^
 
Dictionary lookup would definitely be faster, yes, because it's basically just a jump table in this case, whereas otherwise you not only have to ask all the ships whether or not they're the correct one, one after another, but also have many more calls, one for each callback.
 
Exactly my thoughts o:
Granted perhaps the Dictionary approach is not so clean coded as a Delegate is.
 
I feel like there should be something like this in the event feature lol
 
less Elegant, perhaps.
true true.
the event keyword is so useless for me, in the context I am using delegates. :(
 
5:52 PM
The dictionary way could still work quite similar to the event way: Instead of an event you have three things: an internal dictionary, and register/unregister methods for your ships to register themselves.
event is just a list of delegates though
 
right
Ye, Perhaps I can make a class to encapsulate things :D
 
That might make a nice nuget package
 
Great.... I am happy. Thanks Squirrel. This is mostly a Sanity check you know? xD
 
Like "TargetedEvent" or something^^
Nice
 
haha yeah it has lots of uses. :D
Dunno why Microsoft don't make it :-\
LookupDelegate :p
 
5:55 PM
So since I'm here already. What might be faster for a very big file (500mb, one line, text): Replace the first character or replace the last character?
 
Invoke() with a lookup parameter on it ^^
 
Yeah LookupDelegate sounds right
 
Hummmmmmmmmm Appending is always faster ^^
 
Replace, so still gotta remove the last character before writing a new one
 
oh its 1 line string....
 
5:57 PM
yup
One giant line
 
would need to test I suppose.
Time it ^^
 
Guess I'll make both then
 
yeah xD
 
 
4 hours later…
10:00 PM
@Wietlol
0
Q: How to deconstruct mapped DocumentSnapshot specifically in C#?

EdGziI have found many answers in Java but not specifically in C#. Currently, I have the following data model in my Firestore cloud database: I then layered out my models in C#: public class User { public string Uid { get; set; } public string Username { get; set; } public List<TaskDetails>...

Help
 
uhm... no
 
thank you
I don't get how tf you deconstruct the Java.Lang.Object to a List
 
Java or C#?
 
C#
I'll show you what is actually happening when I debug.
I placed the tasks in a separate variable just to see what is going on.
Then I noticed the IEnumerator
Which showed me a single object, which I assume is the single task from the firestore database.
If I open that..
Get another IEnumerator
 
"java.util.ArrayList" in C#?
I should mark this as heresy, but instead I would like to have C# be more like Java, so also kinda want this to be super good
 
10:08 PM
Where you seeing that?
 
tasks = java.util.ArrayList
 
ahh
yes
Now, if I check the actual values.. I can see my fields:
Would you know how to go about extracting that data? And add it into a List<User> that I have set up?
 
10:22 PM
Can we get back to how there is a java arraylist in C# for a moment
Wait is that what it looks like when you're debugging xamarin?
 
hahaha yeah
The Dependency is implemented in Android
 
That is really weird
 
as Ios and Android have different implementations of Firebase
Tune
 
What if you just call .Select on the list, does the intellisnese help you there?
 
Nope, shows me this:
 
10:29 PM
Or is it just objects in there because java doesn't know generics at runtime
 
 
ALso if you manually add using System.Linq to the file?
 
already have it :D
 
Can you put it in a foreach loop?
 
already tried it lol
I stumbled up on this code:
var dictionFromHashMap = new Android.Runtime.JavaDictionary<string, string>(phone_number.Handle, Android.Runtime.JniHandleOwnership.DoNotRegister);
 
10:34 PM
Can you add a runtime check if(tasks is IEnumerable e) and then use that?
 
...what C# interfaces does that java arraylist implement, how does that interop work?
If nothing of that works, you'll have to build your own ofreach loop
Get that enumerator into a variable
Then while(enumerator.HasNext()) newList.Add(enumerator.GetNext(); or something.
 
I'll figure it out tomorrow, literally have been at it since 3pm.
 
Got a haircut, some fish n chips at about 6pm
and got back to this..
Even told myself not to code this weekend :D
 
10:36 PM
I've been working on my graphs all day too lol, but this has got to be finished tomorrow so I'm here 'til it's done.
 
Work weekends ay? :D
 
Studying applied informatics, there's neither weekends nor vacation, just two types of day: Either I work more and study less, or I work less and study more.
 
f that
Full time work too?
 
Nah part time, plus completely flexible hours. For two weeks now, I was only working like, 8 hours a week lol and that's the plan for the next 3 weeks too.
 
oh.. i'll take that back
 
10:41 PM
Gathered enough overtime last year to still get my 80h paid out end of month :)
 
What are you required to do ?
Normally
hours I mean
 
I can work up to 20, but I don't actually have a minimum specified anywhere, neither in writing nor orally. The only thing I told my boss when switching from full time dev to student was that I will always prioritise my studies and there will be times I will hardly be working.
So far, everyone is happy. Except for HR who told me to work less some time last year lol.
 
Why you chose this path?
From Full time dev to student?
 
I have > 300 hours overtime, so I could just not work until june and get full (read: 20h/week) pay each month.
Always wanted to study informatics, didn't get the chance so far, now it worked.
 
Good for you man! :D
whats the next path
 
10:46 PM
Companies will always happily pay for workshops and stuff if oyu ask for it, but this allows me to learn things of which I don't even know that I don't know them yet :)
 
How long you been with your current company?
 
Next semester will open up the path I hope to follow: AI fundamentals and some embedded macine learning. Gonna be interesting.
Started end of 2018 and quickly became one of the devs who other devs call for specific problems like everything git, gitlab, CI, C#/dotnet...quite a few things.
ALso angular for some reason although I never tried doing too much of the frontend tickets because I prefer C#.
 
What area you looking into working in? I have a friend who is interested in AI and wants to build robotic arms for people.
 
Don't really know yet, I try to keep an open mind as long as I don't know the full spectrum of capabilities of AI
 
Angular.. isn't that taken over by React now ? :D
 
10:49 PM
Hey I wish we actually had like, actual angular by now. But it's still 80% angularjs :/
 
React is cool
Haven't touched angular yet.. not even sure if i need to
found this song few months ago :D
 
Everybody on my team even got a multi day angular training in order to upgrade our frontend to angular. Except me, because well I'm a student now and it doesn't really make sense to pay for that for a student. So...for some reason now I'm the only one actually slowly changing our frontend to angular.
 
And this graph stuff you mentioned earlier..
What's that about?
 
That...is totally the rythm of ...la bamba or whatsitcalled
 
Rhythm of the night!!
Ouuhh yeahh!
that one?
 
10:53 PM
Graph concepts and algorithms - for practice we had to implement dijkstra in erlang, now for exam we have to solve the postman problem in erlang.
 
Nice - seems like you're an intelligent bloke
 
@EdGzi Nah I mean the one kinda vacation-y song where they go like "a la la la bamba"
 
Let me find it .. I think I know which one you're referring to hahaha
 
@EdGzi I like to think so but then it turns out I made a semicolon too much in line 52 and how fucking hard can it be to properly end an if clause in erlang xD
Thanks though^^
 
I'm looking to learn data structures
 
Too many languages about.. get confused sometimes :D I even add semi columns in Python sometimes
 
Yeah vscode is my best friend here, open something and it just loads the correct plugin for the language I have to use today xD
Just need some compiler bro to shout at me :D
 
hahahaha what a song ! :D
 
Always a fun song definitely :D
 
Right I'm gonna play some video games! :D
Speak soon !
 
11:03 PM
Yeah see you soon, have fun!
 

« first day (4123 days earlier)      last day (808 days later) »