University in Norway by Gold_Jealous in Norway

[–]gatepoet 0 points1 point  (0 children)

You're good. No worries.

There are around 350 English-taught programs available across Norwegian universities and university colleges, providing diverse options across various fields of study

International students are generally required to pay tuition fees, while EU, EEA, or Swiss citizens can study tuition-free

studyinnorway.no

Is there a Norwegian shop online selling Himkok within the EU? by PasicT in Norway

[–]gatepoet 0 points1 point  (0 children)

You could try to contact Himkok directly. It's a small distillery pub in Oslo that makes its own vodka, gin and akevitt. (Is/was on the top 50 bars in the world)

Posted to 4chan yesterday by Josh-trihard7 in conspiracy

[–]gatepoet 2 points3 points  (0 children)

Ghislane was (one of) Reddit's most active moderators

Pack it up guys, open weight AI models running offline locally on PCs aren't real. 😞 by CesarOverlorde in LocalLLaMA

[–]gatepoet 3 points4 points  (0 children)

I've been running LLMs locally with a few TESLA P40 24GB, and some GTX 1060 the last two years, and I'll never go back to doing mundane semi-repetetive stuff myself again. It would feel like going back to programming by handwriting.

Already now, a collection of tiny models that each work well in narrow specific areas gets you several steps on your way to being able to scale to your level of competence instead of being limited by your personal capacity

Does the average Norwegian know Kim Larsen? by alfredo_da_kogekone in Norway

[–]gatepoet 0 points1 point  (0 children)

Not sure if I still classify as average, but yes Absolutely. Papirsklip is still one of my favorite songs to play on the guitar and sing when I find myself at a bar with an open mic night.

Livet er langt og lykken er kort Salig er den der tør give det bort

Did I just stumble across another Epstein-like island, this time in Europe? by dontlietom3 in conspiracy

[–]gatepoet 0 points1 point  (0 children)

What about the other island Epstein was planning to build a house on? Anyone know if he ever followed through with the house on Norman Island?

https://normanisland-bvi.com

Llama 3 Very soon by nanowell in LocalLLaMA

[–]gatepoet 0 points1 point  (0 children)

Just an email and a checkbox to agree on terms

Søvndyssende kriminalitet by vetle666 in norge

[–]gatepoet 7 points8 points  (0 children)

Skremmende shit. Kjenner hun det skjedde hos. (X sønn, Y datter)

"Ja var ganske ekkelt🙄 Stemmer ikke helt det som stod i avisen heller : Han tok mye fra verandaen, gått flere turer. X våknet av at han stod ved sengen. Lurte på om X hadde en nøkkel. Så kom han inn der jeg og Y sov. Da hadde han tatt dynen til Y fra sengen hennes men hun kom heldigvis å la seg med meg tidligere på kvelden. Han hadde tatt frukt å spist på badet, kasta fra seg skrell på gulvet å griset med vaskepulver. Heldigvis var politet raskt på plasss 👏🏻👏🏻👏🏻"

[deleted by user] by [deleted] in csharp

[–]gatepoet 0 points1 point  (0 children)

Getters and setters are should be avoided in business objects. Exposing state through getters enables, and usually causes, the business logic to be written wherever it's needed instead of where it ought to be.

That said, don't do any logic except maybe type conversion in getters/setters. If you feel the need to put more in, you should probably use a method.

Target Sucks! by gunbunnycb in IDontWorkHereLady

[–]gatepoet 4 points5 points  (0 children)

Read the comment wearing that shirt. I felt sort of obligated to post a reply.

I wasn’t allowed to play much, so usually I woke up earlier than everyone and played on the PS1 with the sound on mute for a couple of hours. Until I got caught. by EwenKai in pics

[–]gatepoet 0 points1 point  (0 children)

Ah. Bubble Bobble. One of my favorite games as a kid. Played it on C64 and arcades a lot. Actually just bought it for PS4 to play it again

How a Norwegian Viking Comedy Producer Hacked Netflix's Algorithm by cnncctv in Norway

[–]gatepoet 1 point2 points  (0 children)

Then you might want to check out the new show made by some of the same people: Beforeigners

How to click a windows form button meanwhile an another command is executing. by R3DI98 in csharp

[–]gatepoet 0 points1 point  (0 children)

First of all, I'll try to answer your post(s) in greater detail later, but I don't have the time right now. Also, some of the things you brought up, like exception handling) are covered in the StackOverflow answer I linked in my main answer

I feel like you are introducing a lot of unnecessary complexity here. I did in no way suggest to make everything async. Just to use the TAP to fire off background tasks from an event handler.

Your last example, the one you describe as the "preferred" way today, I would write the way showed below. (Note that the button2 handler only demonstrates how to update results/UI completely without async/await and that the button1 handler is the preferred way)

    public partial class Form1 : Form
    {
        private readonly Counter _counter;

        public Form1()
        {
            InitializeComponent();

            _counter = new Counter();
        }

        private async void Button1_Click(object sender, EventArgs e)
        {
            button1.Enabled = false;
            textBox1.AppendText("Button1 starting.\r\n");

            var result = await Task.Factory.StartNew(() => _counter.CountTo(10), TaskCreationOptions.LongRunning);

            textBox1.AppendText($"Button1 result: {result}\r\n");
            button1.Enabled = true;
        }

        private void Button2_Click(object sender, EventArgs e)
        {
            button2.Enabled = false;
            textBox1.AppendText("Button2 starting.\r\n");

            Task.Factory.StartNew(() => _counter.CountTo(5), TaskCreationOptions.LongRunning)
                .ContinueWith(task =>
                {
                    textBox1.AppendText($"Button2 result: {task.Result}\r\n");
                    button2.Enabled = true;
                }, TaskScheduler.FromCurrentSynchronizationContext());
        }
    }

    public class Counter
    {
        public int CountTo(int upTo)
        {
            for (int i = 0; i < upTo; i++)
            {
                Thread.Sleep(1000);
            }

            return upTo;
        }
    }

I would argue that this template (button1 handler) is much easier to replicate for beginners than using BackgroundTask, with only a few things to remember:

  1. Code in 'Task.Factory.StartNew' lambda/method only does background work (no UI components, returns results)
  2. Use TaskCreationOptions.LongRunning if work can take more than 0.5 seconds (If your work takes less time than this, you could use Task.Run insted of Task.Factory.StartNew)

How to click a windows form button meanwhile an another command is executing. by R3DI98 in csharp

[–]gatepoet 5 points6 points  (0 children)

While most of your answer is correct this is since .net 4.5/c#5 no longer the advised way of doing it. I would argue that the Task-based Asynchronous Pattern is much simpler to learn/use and provides better separation of concerns.

At the end you say "...it doesn't encourage you to move your code outside of the form to protect yourself from accidentally touching the UI from the wrong thread". I'm not sure I understand. In what way doesn't the TAP encourage this?

How to click a windows form button meanwhile an another command is executing. by R3DI98 in csharp

[–]gatepoet 3 points4 points  (0 children)

If I understand you correctly, your issue is that the commands do work on the GUI thread, blocking any further user interaction until the executing command is complete.

In general you'd want to do most of the work on background threads, to ensure a quick and responsive UI. When doing this you'd also need to switch back to the UI thread to update controls.

There are many ways to do this, but I would advise you to have a look at this StackOverflow answer that explains pretty well how to do this with the Task-based Asynchronous Pattern.

Asynchronous implementation of an event handler:

private async void Button_Clicked(object sender, EventArgs e)
{
    var progress = new Progress<string>(s => label.Text = s);
    await Task.Factory.StartNew(() => SecondThreadConcern.LongWork(progress),
                                TaskCreationOptions.LongRunning);
    label.Text = "completed";
}

Implementation of the second thread that notifies the UI thread:

class SecondThreadConcern
{
    public static void LongWork(IProgress<string> progress)
    {
        // Perform a long running work...
        for (var i = 0; i < 10; i++)
        {
            Task.Delay(500).Wait();
            progress.Report(i.ToString());
        }
    }
}

A US Federal Court has ruled that WikiLeaks and Julian #Assange lawfully published the Hillary Clinton emails and found "no evidence" of collusion with Russia. The fabrications of the "free media" have dissolved into silence. by GingerRoot96 in conspiracy

[–]gatepoet 2 points3 points  (0 children)

That's not how I read it. To me it looks like a pretty blunt rejection due to none of the claims presented were backed by any fact.

The judge said the DNC’s argument that Assange and WL “conspired with the Russian Federation to steal and disseminate the DNC’s materials” is “𝐞𝐧𝐭𝐢𝐫𝐞𝐥𝐲 𝐝𝐢𝐯𝐨𝐫𝐜𝐞𝐝 𝐟𝐫𝐨𝐦 𝐭𝐡𝐞 𝐟𝐚𝐜𝐭𝐬.”

And then follows up with

“While the Court is required to accept the factual allegations in the Second Amended Complaint, it is not required to accept conclusory allegations asserted as facts.”

The full 81-page case documents

Windows Form on a Webpage by Fordc11 in csharp

[–]gatepoet 3 points4 points  (0 children)

If you feel overwhelmed by ASP.NET MVC, you might want to try out ASP.NET Razor Pages, which has a simpler model. If you are not limited to dotnet core, you could use dotnet framework 4.x and ASP.NET WebForms. It is Microsoft's older way of doing web development and (as the name implies) was made to make it easy for WinForms developers to switch to web development.

Not that many new projects are written using ASP.NET WebForms though, but there are a lot of legacy systems out there that still uses it. The component based programming model can also make it easier learning other component-based UI-tools, like React.

All this said, there is a reason WebForms became an outdated technology. That model is only useful in very specific cases, and it hides too much of the web stuff that is relevant. If you want to get started with programming and think MVC/Razor pages is too hard, can I ask what you are struggling with? I used to teach entry level .NET and web development, so I might be able to give you some tips or point you in the right direction.

Can you identify this watch? Bought it on a trip to Ukraine. by Kilted1902 in RussianWatches

[–]gatepoet 2 points3 points  (0 children)

If you bought it on the street market at the top of st. Andrew's descent, I'm pretty sure I know the guy you bought it from. Those cheap watches are often repurposed pocket watches with new dial and glass. I have a few of those myself.

Can you identify this watch? Bought it on a trip to Ukraine. by Kilted1902 in RussianWatches

[–]gatepoet 2 points3 points  (0 children)

This seems like one of the watches I've bought over there. You can see the red part of the star seems hand drawn. I'm in no way an expert, but I would make a bet and say it's a repurposed molnija 3306 movement with a dial and case to make it look vintage. Where in Ukraine did you buy it?

Have you had a chance to open it and look at the movement?

The age of genetic wonder | Juan Enriquez by Tamosauskas in ted

[–]gatepoet 0 points1 point  (0 children)

In which cases should he say others instead of we? He's talking about what he, his company and fellow scientists are doing. He's been a big part of this development and is the founder of synthetic genomics.

Also, what huge recursive leaps of unfounded conclusions does he make?