All Questions

Filter by
Sorted by
Tagged with
1
vote
0answers
33 views

Webshop Conversion - Binary testing is not even [closed]

Everytime a new visitor comes to my webshop I write a cookie (1d) which sets a session entry with mt_rand(1,2) to A or B group. ...
1
vote
0answers
18 views

Custom WordPress SQL query to get posts and users using term_id

I have a WordPress site with multiple custom post types, that all share a common custom taxonomy. Users can also be tagged with terms from this taxonomy. After giving up on ...
1
vote
0answers
57 views

Tightly coupled Basic Authentication Filter

I have an asp.net web api and I would like to use basic authentication. Is there any way to make this loosely coupled? I tried constructor DI but I couldn't figure it out how to pass Dbcontext into ...
1
vote
0answers
40 views

Project Management System focused on forking and web-of-trusting-code

I'm writing a project management system focused on forking and web-of-trusting-code, which is a fancy way of saying "take someone's code, do whatever you want with it, and see if others agree with you"...
1
vote
0answers
21 views

Dynamically build tagged union and helper that allows its instantiation and calling of its static methods

I am working on a typescript react/redux app that provides a visual interface for the code editor with a predefined set of instructions. It's basically a tree structure of objects that I call ...
1
vote
0answers
18 views

Response structure with populated fields

I am working on a backend for an application using a microservice framework with Sequelize and it is populating in the following way (it does based on the table field): ...
1
vote
0answers
63 views

Proper image sizes in WordPress

I wanted to create a set of functions that would allow me to easily implement images for multiple screen resolutions in my custom page templates. WordPress offers some functionality for implementing ...
1
vote
0answers
227 views

C# Generic Repository and Unit of Work Implementation for Northwind [closed]

I have created 3 projects to implement layered architecture design mainly the - Presentation Layer (Web) - Domain Model Layer - Infrastructure Layer For simplicity, I have only two domain model ...
1
vote
0answers
45 views

Combine multiple if statements with multiple properties [closed]

I'm looking into using my loop to combine and narrow down this piece of code into maybe a switch statement or other methods, how would I be able to achieve that? This is what I have so far which has ...
1
vote
0answers
33 views

Benchmarking k-shortest path algorithms in Java without JMH

In this post, I have the demo driver that benchmarks two \$k\$-shortest path algorithms. The entire GitHub project is here. net.coderodde.graph.kshortest.Demo <...
1
vote
0answers
50 views

correctly implement PHP OOP in blog Post Class [closed]

I would like to know the best way to setup my PHP Blog classes. I have created a Post class which creates a blog post. ...
1
vote
0answers
144 views

Putting a multichoicefield under a dropdown button

I am building a web app in Django where one of the form fields is a multiplechoicefield from a many2many object that I use to select users that are allowed to edit the post. In standard form the field ...
1
vote
0answers
37 views

string.To2DCharArray extension method implementation

I would like to ask a code review for the class below. I am asking this because VS showed a quite low Maintainability Index of 54 and I am wondering if it is good code. I know I could have extracted ...
1
vote
0answers
28 views

Javascript Calculator which implement Stack

I have re-write a new version of Javascript Simple Calculator. Any thoughts in regards to this new design and how can it be improved further? One of my thoughts are to create a Javascript object for "...
1
vote
0answers
111 views

Python 3 Tkinter Calculator - follow-up

I'm a beginner developer, and it's my very first project: a simple math operations calculator in Python 3 using Tkinter for GUI. Obs: This code is an evolution of my previous code of the same project:...
1
vote
3answers
173 views

Find the starting indices of all occurrences of the pattern in the string [closed]

The task Given a string and a pattern, find the starting indices of all occurrences of the pattern in the string. For example, given the string "abracadabra" and the pattern "abr", you should ...
1
vote
0answers
122 views

Extract useMemo to its own custom hook

I wanted to know if the useMemo function extracted like this is valid at all. This is a whole component (Sorry for the imports) that uses useMemo to get a data that is grabbed from the server using ...
1
vote
0answers
50 views

Tic Tac Toe finish the game function [closed]

currently i am working on javascript. Learning deep etc. So i decided to made my own tic tac toe game 4x4 without any tips. Then i stucked. If anyone can help me will be perfect. Game is playable ...
1
vote
0answers
68 views

Why is this Phaser 3 app munching resources?

So, I've got a game in the pipeline. There's a problem, tho. After a couple of weeks of lunch hours incrementally adding stuff, it's regularly using up 100% of my CPU and slowing down. I don't ...
1
vote
0answers
398 views

Functions like std::stoi for unsigned and shorter types using __gnu_cxx::__stoa

C++11 introduced the new standard library function std::stoi, unfortunately there is no equivalent function to convert an unsigned number inside an std::string to ...
1
vote
0answers
60 views

Chaining asynchronous calls to update UI [closed]

In an app the UI is updated from different threads. To queue this, I have created a utility class ...
1
vote
0answers
270 views

Monitoring Services And Characteristics on React-Native [closed]

I have two questions for you about my code :) I'm creating an android to connect to ble device. I'm using ble-plx library. ...
1
vote
0answers
83 views

Spring boot for a blog REST API

I'm working on a blog REST API and I would like to get some opinions on where to place the logic for a single operation to filter posts. I have Category and Post in the model package. A category has ...
1
vote
0answers
647 views

Python3 - Cropping PDF files according to coordinates

I have a python script, that is performing OCR on PDF pages. I am trying to do so I can provide coordinates to the script - so it will only select the text within the provided coordinates ...
1
vote
0answers
21 views

Synchronising data between my remote and local databases

I have code in place that helps me to keep track of our SiteData and make sure its always up to date. Whatever new records are added in the Site must be added to the Online Database.Records that have ...
1
vote
1answer
125 views

Python program that gets my hackerrank code and scores using requests [closed]

I'm trying to extend my coding skills to other languages by doing projects. (learned Java in school) and since python is very popular right now thats what I ended up choosing for this project, though ...
1
vote
0answers
30 views

HTML5 Custom Audio Player with SASS

i made an audio player in html5 for learning purposes, also i tried to use BEM pattern with sass (i dont know if i did it well) i also encapsuled my code as much as possible, but i think i can make it ...
1
vote
0answers
49 views

Linked list delete a node with a particular value [closed]

I am trying to search a single linked list with a particular value and delete it. Only the first occurrence of the value. ...
1
vote
0answers
97 views

Near immutable, thread safe Builder

I'm writing a torrent streaming client. The plan is to wrap WebTorrent-cli and provide a Java interface to observe download state, cancel or pause downloads etc. Anyways, I came up with the following ...
1
vote
0answers
13 views

Copies local files to remote IIS server

I have written a script that: connects to an IIS server stops a website copies its files to a backup folder (on the remote machine) copies files from my local machine to replace the ones on the ...
1
vote
0answers
26 views

Dragging and dropping a spot using TypeScript

Currently my code is based around mouse events so that it is easier to test but I will be swapping these to touch events once I have had the code reviewed. The idea of the UX is that you need to ...
1
vote
0answers
33 views

Python Elasticserch DSL integration with Django [closed]

There is a big Pull Request in django-elasticsearch-dsl. Can anyone take some time and review the pull request? We are changing from python MetaClass to a decorator ...
1
vote
0answers
63 views

Bookmark controller with IMemoryCache

I'm just doing a small hobby project to solve a little problem I have and I'm using it as a learning exercise for ASP.Net MVC 5, .Net Core 2 and Bootstrap. I'm using a nuget package that handles ...
1
vote
0answers
26 views

PHP to cast votes on an open-to-public election

I am creating an online voting platform where users could vote on publicly-held polls. It uses Kreait Firebase library (as Google didn't create a PHP library for Firebase Admin). I am very new to PHP ...
1
vote
0answers
22 views

Applying option if property is true or not set at all [closed]

I have a case where I want to apply a format if a property is true or if it is not set at all. Here is what I have: ...
1
vote
0answers
33 views

Add a folder with jstree

I read on SO and other pages that I should avoid JavascriptResult, I do not realy know why, but now I use JsonResult, because it is more common. Here is my Ajax in the cshtml: ...
1
vote
0answers
269 views

Spring (boot) MVC Abstract Controller

I'm writing an application that will end up with a set of standard CRUD operations for a bunch of object types, and I thought it would help simplify things if all the separate controllers had some ...
1
vote
0answers
24 views

Process 2 lists concurrently with the first list adding to the second [closed]

I'm new to multi-threading and concurrency. I've got 2 lists that I want to process concurrently. Processing both lists requires a lot of time.sleep() and waiting for other servers to finish, so I ...
1
vote
0answers
25 views

Ruby exercise in writing and reading a file [closed]

I've been asked to improve the modular decomposition of the main by moving as many lines of code out of main as possible, but i have no idea how i should do this ...
1
vote
0answers
53 views

Check for key in two arrays in order to control flow of the program

I have a container. This container has exactly this structure: ...
1
vote
0answers
27 views

Safely log-in and save login info into session [closed]

I would like to ask if this code is safe for user to log-in (save ID to session) and check if user is log-in when visiting site (Dashboard). ...
1
vote
0answers
55 views

C# asynchronous notification vector v2

As a result of my previous post, I have implemented / refactored my code and have started making successful use of my class. However I have come across a couple of new questions: The observer must ...
1
vote
0answers
46 views

typeOf in Python [closed]

I've been working in statically typed languages for awhile, and I've had to write some Python utilities recently. As part of those tools, I needed a semi-sane way to implement type checking to make it ...
1
vote
0answers
119 views

Setting up user models with Flask-SQLAlchemy

I've recently come across SQLAlchemy, and as I had just been attempting to code something very similar to it, I think it's amazing. I've started on a new website, ...
1
vote
0answers
45 views

AWS Lambda stack definition YAML

Design My desired outcome is as follows: S3 event triggers Lambda Function startTextractStateMachine Lambda Function ...
1
vote
0answers
62 views

Way to hide logic behind class for better readability of method and refactor class to follow SRP [closed]

I have an algorithm to create a version for an entity and then I save that version against below 2 entity: 1) Variant 2) Category ...
1
vote
0answers
47 views

Enable/Disable Popper.js tooltip if element exists

I would like to disable the popper.js tooptip if there is an element with a specific class on the page. Let me explain ... I have a plugin that creates notifications dynamically, these notifications ...
1
vote
1answer
40 views

Insert multiple rows without using CURSOR SQL Server 2014

I have a fairly complex query which insert multiple rows into a table from multiple tables. Its works fine but I really don't want to use cursor as some blog says cursor took long time for execution (...
1
vote
0answers
25 views

Simple cart update WordPress plugin

I created a plugin to update cart automatically on quantity change with some additional options. I want to focus only on the main plugin file, skipping uninstall.php and .js file which are entirely ...
1
vote
0answers
415 views

First readers-writers problem using a single condition

For the first readers-writers problem, in which readers can access a given resource simultaneously, is the following Python3 solution correct? Problem parameters: One set of data is shared among a ...

15 30 50 per page