« first day (2850 days earlier)      last day (1154 days later) » 

12:04 AM
@Peilonrayz "... and the pièce de résistance is finding you already had the software installed..." that could be like other people and tabs.
FYI I installed VCPKG yesterday and now I can't find it.
 
@pacmaninbw I would assume so ;) Interestingly I upgraded my RAM because having the amount of tabs I like was starting to be a little problem for my poor laptop D:
@pacmaninbw Yeah that can be a pain, I had lots of problems with Python because of that. I'm now strictly using WSL, Window Terminal and VS code when developing on my laptop. Having pacman on Windows is a dream come true ngl
 
12:36 AM
@Peilonrayz LOL
 
1:26 AM
@Mast Wow yeah, what a high energy talk. I remember now how long it's been since I learnt to debug. I still remember rage-quitting programming cause I didn't understand self either... Some good info in the talk, but the talk could easily be 20 minutes
 
 
2 hours later…
3:55 AM
0
Q: List of string calling API

JeffersonI wanted to see if there is a better way to write this logic Its calling an API so I can't change the endpoint. I would be happy for any kind of feedback since this is quite critical a part of my application. List<string> lisOfAnswers= new List<string>(); ; if (!String.IsNullOrWhiteSpace(answer...

 
 
2 hours later…
5:55 AM
0
Q: Calculate Permutations of List in Scala

Kevin MeredithPlease evaluate for correctness, concision and speed. Thanks! private def shiftN[A](list: List[A], n: Int): List[List[A]] = { if (n <= 0) Nil else { val shifted: List[A] = shift(list) shifted :: shiftN(shifted, n - 1) } } private def shift[A](arr: List[A]): List[A] ...

 
6:19 AM
0
Q: Partial Function composability in Haskell

tangyBelow is my solution for the CTFP chapter 4 challenges which essentially involves composing partial functions(that don't have defined outputs for all possible inputs i.e. returning a Maybe). The challenge is to implement composition, identity(to satisfy category requirements) and try it out with ...

 
 
2 hours later…
8:12 AM
@Peilonrayz A week or two ago I had to install Internet Explorer 11 on Windows 10 machine. Download the installer, install the thing and try to run it. No joy, the relevant folders are there but main executable iexplore still missing. Reboot. No joy. Install again. Goes a lot faster this time. Reboot. No joy. What the heck...
Guess what?
It's hidden under Windows Features now.
Install it from there, works.
But the official download page won't tell you that.
So, yea, I'm familiar with the feeling :-)
 
0
Q: Data state filter on toggle by categories

ErwinHere is a simple react app that will list some dummy data and can be filtered by categories (in this case, by user ID) by toggling the button on/off. FilterBtn.js import React, { useContext, useState } from "react"; import DataContext from "../../context/dataContext"; import "./FilterBtn.css"; c...

 
@pacmaninbw Firefox (and the other brands probably do too) has tab suggestions. When I type '2nd' in a new tab, it will give me a shortcut to an already open tab (The 2nd Monitor) and switch to that instead of opening it again.
 
 
4 hours later…
12:20 PM
0
Q: Convert csv to X and Y numpy arrays

MinskyIdea: create utility function to convert csv files passed thru pandas.read_csv() to Y and X. The function should take the csv table and extract off Y, leaving the table as X. The user passes and identifier for Y as a key or an index (negative or positive). Any improvement is fine as an answer. Co...

 
12:52 PM
@Mast Thanks. I didn't know that.
 
1:08 PM
0
Q: Identifier name for "optional-chaining" C macro

DannyNiuJavaScript now has a "optional-chaining" operator ?., which, when applied like this: (null)?.fooMember would yield null. I want something similar in C (albeit more verbose), like this: #define IF_MEMBER(ptr,member) (ptr ? ptr->member : NULL) What could be a good replacement for the 9-character ...

 
1:24 PM
Mon king
 
1:56 PM
0
Q: std::sort custom compare function

HarryI'm trying to solve the problem given here. I'm getting the required output but the written code looks like code bloat(I mean could've have written better simpler and easy code). Can somebody suggest a better way of doing it. This is my code #include <iostream> #include <string> #include <algorithm>

 
2:20 PM
0
Q: Scraping webpage elements using Python

ProtractorNewbieI have been trying to improve my knowledge with Python and I think the code is pretty forward. However I do dislike abit the coding style I have done where I use too much try except in a content there it might not needed to be at first place. My goal is basically to have a ready payload before sc...

 
2:44 PM
0
Q: Algorithm For Longest Palindrome

Akash PatelI made an brute force algorithm to find the longest palindrome within the string. This palindrome is a substring of the input. Below is the code. def generate_substrings(string): """ avg time: O(len(string) * len(string)) avg space: O(1) amortized time: O(len(string) * len(...

 
 
2 hours later…
5:09 PM
0
Q: Partial function composability in C++

tangySimilar to Partial Function composability in Haskell, I've attempted to implement partial function composability in C++20 via C++ concepts. More details about the problem from the linked post: Below is my solution for the CTFP chapter 4 challenges which essentially involves composing partial fun...

 
5:33 PM
0
Q: Grid Dynamic Programming

Eren YeagerProblem Statement There is a grid with H horizontal rows and W vertical columns. Let (i,j) denote the square at the i-th row from the top and the j-th column from the left.For each i and j (1≤i≤H, 1≤j≤W), Square (i,j) is described by a character ai,j. If ai,j is ., Square (i,j) is an empty square...

 
5:57 PM
0
Q: Optimized method of transfering numpy image arrays over localhost to web-tech UI for desktop UI

correctsyntaxSo, I have been doing testing to find the most efficient way to display numpy array images to a HTML, CSS, JS UI (specifically, with CEF Python). I mainly used the method explained here to do the numpy array -> html canvas code. In case anyone is wondering, this test code is based on the boilerpl...

0
Q: CSES - Number Spiral - Java TLE

Deepti ShahiMy java code for CSES Introductory problem Number Spiral gives TLE for large inputs, like Input : 100000 170550340 943050741 121998376 943430501 689913499 770079066 586095107 933655238 ... My code is as below - import java.util.*; public class numberSpiral { public static void main(String[] a...

0
Q: Hangman improvement ideas / Python

HMNNikolozi wrote simple hangman game and am open to any improvement ideas. There should be some simpler ways to make it work. secWord = input("What is the word for others to guess?: ") life = 10 #starting information i = 1 while i < 10: print(".") i += 0.01 #dots so players can not see the word ...

 
6:45 PM
0
Q: C# code for dhond't voting method UK Parliament

Mj _Please can you check if the code i have written follows 4 rules of encapsulation well enough, if there is anything that could be improved or is just wrong iam happy to change (very new to c# sorry if its awful). The code implements the "Dhond't Method" which is a polling system. https://www.bbc.c...

 
 
1 hour later…
7:57 PM
0
Q: Parsing DateTime with timezone

RayI am facing difficulty in parsing a DateTime with the structure of time zone: I am trying to parse it this way: string Date_ = "2021-02-21T00:00:00+00:00"; var Date = DateTime.ParseExact(Date_ , "yyyy-MM-ddThh:mm:ssZ", System.Globalization.CultureInfo.InvariantCulture); Console.WriteLine(Day); B...

 
8:45 PM
0
Q: Is there a way to optimize this graphics/bitmap drawing code in C#?

Joan VengeI am not doing anything fancy so not sure if there are any tricks to make it faster. It's a progress bar where I draw some numeric text on top. I only draw 1 pixel height image and then resize it. But not sure if there are better ways. Here is the code: void DrawProgressBar ( PictureBox pb, i...

 
9:12 PM
@Mast Yeah even when not developing the life of IT is just bug fixing. As annoying as that was at least the beast is, well not dead, but not really alive either
 
9:33 PM
0
Q: Is there a effectiver way to write my JS?

JacksonSo I have a row of buttons <form class="form"> <div class="button-box"> <div class="centered-buttons"> <input type="radio" name="game" id="rock-button" class="radio" /> <label for="rock-button">rock</label> <br /> <input type="radio" n...

 
10:21 PM
0
Q: how to rewrite sql query with subquery to find max element without using limit?

ERJANthe question is here Return the name of the category that has the most films. There are 2 databases - film_category: film_id category_id last_update 1 6 2017-02-15 10:07:09-08 2 11 2017-02-15 10:07:09-08 3 6 2017-02-15 10:07:09-08 4 11 2017-02-15 10:07:09-08 5 8 2017-02-15 1...

 

« first day (2850 days earlier)      last day (1154 days later) »