All Questions

Filter by
Sorted by
Tagged with
0
votes
1answer
4 views

SQL how to use OR in this case

I am using microsoft sql server management studio 18. And this is the task i need to do. The order id, customer name, order date, and total cost of all items ordered for all orders shipped in July or ...
0
votes
0answers
8 views

Using arrays, suggestions please

I'm still a beginner, so I'm still learning. I'm trying to take test scores for 3 different students, enter them in an array, then display the name, test scores and the average. Trying to also have ...
1
vote
0answers
11 views

CodeAbbey - Blackjack Counting

Here is my solution for CodeAbbey - Blackjack Counting My code passes all tests on Code Abbey but I think I have some poor implementation specifically with my handling of the Aces in the score but ...
0
votes
0answers
4 views

python pandas iterating rows of two different columns and returning the repeated one once and corresponding values of repeated values in single row

for instance, I have a .csv file with 1000s of rows like below: [column 1] [column 2] 1992 Alex 1992 Anna 1993 Max 1993 Bob 1993 Tom . . . ...
1
vote
2answers
26 views

Small FizzBuzz program

After watching this video by Tom Scott, I decided to make a program that follows that idea. This is what I came up with: ...
3
votes
0answers
17 views

JS Object In --> HTML Out (from a Noob/hobbyist)

I would appreciate feedback especially if you would be embarrassed by this code, or if I was on your team and you would expect better and/or you would mention something. This code was derived from ...
1
vote
0answers
7 views

How to reduce complexity of method

I prepared a method to make possible to select elements of the array except for some indexes. ...
1
vote
1answer
15 views

What's the best way to tidy up a PHP array with both indexed entries and associative entries?

I have two closely related questions: 1) I have a mixed PHP array. Not mixed in that it contains strings, floats, booleans etc. but mixed in that it is a hybrid indexed / associative array. Most of ...
1
vote
0answers
17 views

Looking for specific words in a string and noting the order

The problem: I have some text that I go through line-by-line, if I find a line containing the keyword DATA_TYPE_1 and/or ...
-1
votes
1answer
29 views

Copy a C# list into an out Parameter for better encapsulation

I have a class that needs to provide access to an internal List<int> member. The functions that use this class need to be able to work with that list, ...
2
votes
1answer
36 views

Statistics Library with Sample, SampleBuilder and Tests

Introduction I'm working on a Statistics Library that can record observations and produce a Summary of the statistics when there's enough observations. Right now, it's at its early stages and is ...
0
votes
0answers
26 views

Player Ship Update function in an Asteroids-like game

In a Asteroids game, I have a player ship. In the code below, I have an Update function for Ship which will handle things like controls, collision and movement. What are your thoughts on this code? ...
8
votes
0answers
31 views

Generate a video of typing the contents of a file

I wrote a Python script to generate a video file of typing the contents of any program file. It works, but I'm really not very happy with how it works. I have several issues with it. In order to ...
0
votes
0answers
11 views

Simplifying a Binomial Expander

So i made a python program to find solve some of my a level binomial questions or just let me check my answer overall, and i need advice on how to make it more compact and simplify it. This python ...
0
votes
1answer
30 views

Dictionary of names and birthdays. Ask if you want to add

this code is to have a dictionary of names and birthdays. It will ask who's birthday it is that you're looking for. Then if it is in the dictionary, it will print back what that birthday is. If not, ...
3
votes
1answer
21 views

Raspberry PI switching from Soft Access Point to WIFI client

I am relatively new to C language and Linux systems I would like some feedback/review. The main function of the code is to read the dhcpcd file looking for the 3 lines and then either adding/removing ...
0
votes
0answers
19 views

Worksheet change and worksheet selection change slowing down my file

I have a file that i use as database. It has the records and in the row 1 several cells used as buttons, (open folder, copy text, send mail, ecc.) At any change on any column of any record the file ...
3
votes
1answer
25 views

Pythonic solution to display multi-dimensional tuple as a tree

I would like to show the tree-like structure contained in a multi-dimensional tuple by using the set of graphical glyphs that exist in Unicode fonts (e.g. \u2500, \u2502, \u2514 and others). Here is ...
1
vote
1answer
27 views

VBA: Calling one sub repeatedly and scope of variables

My code as a whole works for me without issues, but what I want to improve is a small part right out of the middle of it. I hope it's ok to post a simplified snippet here that just shows the structure ...
2
votes
0answers
7 views

intersection observer multiple animation

I want to achieve different animation for many elements on scroll, so instead of using window.scroll i'm using intersection observer api, but i want to know if my approach is effective and won't cause ...
-4
votes
0answers
15 views

how to refactor the following method [closed]

I have a method that I use to find out what role has the current user. I have used 3 if's, but I am wondering if it can be written in other way. Here is my method ...
-2
votes
1answer
38 views
-2
votes
0answers
42 views

Flipping Ts and CTs [closed]

This is my first code and I'm pretty proud. It's a coin flip but instead of tail it's T and CT. I have been coding for 2 weeks now and I think it's extremely fun. But if anybody want to build on it ...
0
votes
0answers
20 views

Minimal Property system in c++17

So I needed to represent by objects in terms in ini format and change their values from the ini as well, so I thought why don't implement a property system for this. I want it to be bit fast so I ...
7
votes
3answers
716 views

Reverse each word in the string. All spaces in the string should be retained

This was part of a code challenge. I use them to help me learn c++/c# along with tutorials and guides. Basically I was taking a string... The quick brown fox jumps over the lazy dog. ...and ...
7
votes
5answers
2k views

Transform dollars in exact change

The program was to turn an integer into exact change and uses a bunch of if statements. Are there steps a beginner like me can do to remove some or is it just how it will be? I can't find anything ...
-7
votes
0answers
40 views

i need help asap [closed]

I need help and its due in 2 hours. please help guys I am stuck printf("Input principal:"); printf("Input Principal: "); printf("Input Principal: ");
-2
votes
0answers
23 views

Correctly releasing allocated memory in C++ [closed]

Let me check if I could understand how to use delete operator ...
-1
votes
0answers
21 views
2
votes
1answer
48 views

Programmatically getting the GUID of an application

Intrigued by the events chronicled here (also here and here), I saw the inherent utility in having a program-specific GUID available. The SO answers that were correct seemed a bit tightly-coupled and ...
0
votes
0answers
17 views

speed up a function with matrices python [closed]

please help me speed this function up. it's a pretty simple function and I have ran out of ideas on speeding it up. ...
1
vote
1answer
33 views

More Pythonic Context Manager Wrapper

I wanted to ask this here because what I wanted to originally do felt like a really Pythonic method. I want to be able to use the syntax: ...
3
votes
1answer
57 views

Function To Add DOM Nodes

I have a javascript function that will accept an array of objects (from a database or websocket) and then spit out HTML <ul> lists. The code works -- but I am ...
1
vote
0answers
23 views

Implementations of unzip in Racket

I've been practicing my folds and tail-call recursive programming, and I wanted to work on unzip for the general case as opposed to just pairs. This was very easy ...
-1
votes
0answers
54 views

Custom Pizza creation code (IGCSE Practice) [closed]

I have created a create your own pizza program and was wondering if there was any way to improve it. The image is of the task that we were given to create: I have not completed task 2 or 3 yet. I ...
1
vote
0answers
33 views

Cracking Caesar Cipher

I'm new to Haskell, so I wrote a program to crack Caesar Ciphered text for practice. The program calculates the frequency of each letter in the input, and then checks to see which shift minimizes the ...
4
votes
1answer
70 views

O.O. Style Palindrome Checker

I am beginning to learn about object oriented programming in my programming class, and to make sure I had all the ideas down, I made a small palindrome checker program. It works by checking if the ...
1
vote
1answer
29 views

Square the sorted array using haskell

I want inputs on how I can square the sorted Array more efficiently in haskell. I wrote a very naive algorithm to solve the problem. What I am doing is comparing the head and the last element of list ...
2
votes
0answers
17 views

Sklearn Custom Imputer from prediction

I asked this question on Stackoverflow, but thought it might be a better fit here. I'm playing around with the titanic dataset, and wanted to create a custom imputer to fill in missing ...
6
votes
1answer
89 views

Recyclerview Adapter for weather app - Makes API calls for each item

I have a weather app that allows the user to save Cities (with nickname and zip) into a room database. I'm using mvvm and livedata to observe the list of cities and update the recyclerview ...
3
votes
1answer
40 views

A sequence/series formula solver

I made a formula retriever that works and allows importing of fractions. This python code is meant for the fx-cg50 calculator's micropython, where there are a lot of functions that don't work ...
2
votes
1answer
24 views

Dynamic module import in a class hierarchy

I have two python libraries, let's call them lib and extended_lib, that provide a very similar public API. To be more specific, <...
0
votes
1answer
33 views

change html text based on date…JS [closed]

...
0
votes
0answers
10 views

What is the Fastest Way to Find the First Formula in an Excel Range with VBA? [migrated]

Is there any quicker method than using a for loop to find the first instance of a formula in a cell? ...
-1
votes
0answers
32 views

Concurrency and scalability improvement [closed]

I came across the following SpringBoot java code. ...
0
votes
1answer
13 views

Clean up after shell script that is run via k8s pod on a gpu node for health check

Team, I have a working script but when we upgraded some drivers on the GPU system it’s starting to cause zombie process and system is lowing down as script runs periodically as a crib job. so I am ...
3
votes
2answers
51 views

Python Shirtori Game Exercise

I'm looking to improve my code writing in general by peer review. I've followed the following exercise: https://edabit.com/challenge/dLnZLi8FjaK6qKcvv. The exercise is to create an English version ...
3
votes
1answer
53 views

Python file modifying script with focus on OOP

I am currently coding a tool for my work that modifies a textfile by removing unneeded parts of a string at specific spots in the file. I would like to know if there are any obvious things I am ...
0
votes
2answers
46 views

Check source contain replace string

I created this function it is looking for the html tag and replacing it with the ^value. It seems complicated wanted to know if there is a better way to do something like this. Will you review ...
0
votes
1answer
26 views

15 30 50 per page
1 2 3 4 5 1298