instruction
stringlengths
71
71.9k
I need to search for records based on their area, postcode, city and sort each group separately based on the value of their code field. Table is as follows: ID Code Name Area PostCode City 1 15 BV Shore 343444 Toronto 2 2 BB North 545555 London 3 3 AA ...
For the MDN documentation website we have written this jsonToDOM function and I was wondering how you all would improve it. It takes a json structure and creates DOM elements out of it and appends it to the document. It is written in such a way that the user has to pass the window/document as they might run this code f...
This is my player rotation script. I just want to make sure my naming conventions are right. If there is any way to make this code more readable I'm open to suggestions. This is also my 3rd post about along the same line so please be brutal. public class ShipRotation : MonoBehaviour { [SerializeField] Canvas canvas...
I'm working on a function to sort two elements using several properties. I want to know if the function is well structured. function comparePropsOfAWithB(a, b, props) { var prop = props[0]; var propA = a[prop]; var propB = b[prop]; if (propA === propB) { var array = props; array.shift(...
I writing tool to manage our application. One part of it - is INI-file, which contains UUIDs for some application modules. It looks like: [version_1_0_2_staging] MATH_DLL = 7a00ca94-b68d-4c89-a004-d3a4f5e7cf56 MATH_DLL_XML = 738174f7-f310-4989-8cae-da1690487e7c ASSETMANAGER_API_DLL = 2e9e3807-4f8a-4ae1-a873-4a8f6d152ea...
I'm looking to make my code faster for loading a hash table. Any pointers would be appreciated. Below are my includes, the node def and the loading code. The dictionary loaded could be any *.txt file. Its pre processed to contains just lower case words sans punctuation. #include <stdbool.h> #include <stdlib.h> #incl...
I'm looking for 3 different answers: Using Java predefined functions Converting from string to number Without the above two (any other types of answers are also welcome) I am looking for improving my code (as per the above 3 conditions for 3 answers) taken from my repository here. /* * Checks if the year passed is a...
Is there a way to make my code simpler/more pythonic? Given a non-negative number "num", return True if num is within 2 of a multiple of 10. Note: (a % b) is the remainder of dividing a by b, so (7 % 5) is 2. See also: Introduction to Mod near_ten(12) → True near_ten(17) → False near_ten(19) → True def near_ten(num...
Consuming input line-by-line until the end is often useful. In C# I would write the following loop: while ((line = Console.ReadLine()) != null) { // ... I wanted to do this using "idiomatic" F# (which to me includes avoiding let mutable) and I came up with this: let rec readlines = seq { let line = Console.Rea...
I am trying to parse escape sequences as well as plain characters. Can this be made more succinct? import Control.Applicative import Data.Char import Numeric import Text.Parsec hiding ((<|>)) echar :: Parsec String () Char echar = (char '\\' >> ((char 'b' >> return '\b') <|> (char 'f' >> return '\f'...
The question was to see if a word is an anagram of another word. How would you improve this? It returns True if an anagram, or False otherwise. # write the function is_anagram def is_anagram(test, original): if len(test) != len(original): return False for letter in test.lower(): if letter not in...
I'm making a hotel reservation app that has the following features: Promo Codes: The guest can choose to pay half a certain percent of the total_amount or the entire total_amount. I want to use stripe, PayPal and authorize.net as payment gateways. Reservations are stored here: CREATE TABLE `reservations` ( `id` int(11...
I know there must be an easier way to write this but I'm stuck in over-complicating mindset instead of just following the Zen of Python. Please help me simplify this. Given a day of the week encoded as 0=Sun, 1=Mon, 2=Tue, ...6=Sat, and a boolean indicating if we are on vacation, return a string of the form "7:00"...
I'd like to generate an infinite list of prime candidates of the form 6k±1, but I'm looking for the fastest possible solution. Currently I have this: primeCands :: [Integer] primeCands = concatMap (\i -> [6*i-1, 6*i+1]) [1..] but I feel that concat is wasting too much time. Using all the odd numbers is almost the same...
Here is a simple Tic Tac Toe game. I would like to know how I can improve this code further. #include <iostream> #include <cctype> #include <array> #include <random> enum struct Player : char { none = '-', first = 'X', second = 'O' }; std::ostream& operator<<(std::ostream& os, Player const& p) { ...
I'm coding a plugin for a game that has a Player class which has a boolean attribute frozen, which decides if the player is frozen or not. There are more "effects" like frozen, but I'm using it as an example, since solving one should solve them all. The problem is, this frozen attribute only supports True/False, and if...
I am maintaining an old codebase of one of our legacy .Net applications which has a component that encrypts and decrypts user passwords using symmetric key cryptography. Since cryptography is not my domain, I need help figuring out whether this existing code needs to be fixed or not. I have a hunch that this code is cr...
I created a side bar of buttons for my game, the idea being that if you click on the "main" button of the group, the rest of the buttons in the group would pop out from the side of the screen. Later, I wanted to make it so that if you open one of the side menus the other ones would close. I thought about implementing ...
Below is an implementation of two graph traversals. Graph constructor creates a random graph with a fixed number of edges (fixed as a proportion of the maximum number of vertices, number_nodes-1). Any comments welcome, but especially data structure and algorithm comments. Tests are not implemented properly, but it is o...
I'm working on projecteuler.net problems, and I made this for problem #3: array = []; // use this to save the prime factors function factor(number, start){ //begin of the function prime=true; for(i = start; i < number+1; i++){ //begin of the first loop if(number % i == 0){ //is it a divisor of the number? ...
By utilizing an existing PHP encryption library (defuse/php-encryption) and a flat file database library (jamesmoss/flywheel), my application take a secret message from a user, encrypts it using a key derived from a password, and saves it to a flat file. The message can then be decrypted by visiting a unique link and ...
I have two simple functions where performance is critical, one for encoding an array of ints to a long, another for doing the opposite (decoding the long back to an array of ints). The solutions I have come up with below are fairly fast. Can these be made even faster? Please note: I am constrained by using the same fu...
My script takes a CSV file of strings and then creates an XML file for Android and a .strings file to be used for iOS. It separates each locale meaning that a file will be created for each language. This has come in handy so far, making localising mobile apps easier. However, I am always seeking feedback so let me know...
I am trying to load a module according to some settings. I have found a working solution but I need a confirmation from an advanced python developer that this solution is the best performance wise as the API endpoint which will use it will be under heavy load. The idea is to change the working of an endpoint based on p...
I have a very simple form that is designed to update account expiration dates. I'm currently creating a View Model and sending that to the form, however, I still have to pass along a GUID so I know what object is being referenced on POST back. What I'm worried about it is someone altering the guid (via JS, jQuery, etc...
I've written this code in 2013 or 2014, I think. I've rediscovered it today in one of my folders, made some changes and now I'm left (and my 2013/2014 me as well) wondering how good it looks for other C programmers. It's a simple dummy program that reads N and M from stdin, then creates a matrix with those values as r...
One of the first things I did when I learned Objective-C was to create a little canvas with editable angles. Basically, you tap to create points. Every tap connects to the previous tap. So if you tap in 2 spots, a line will be drawn from point 1 to point 2. Tap again, and a line will be drawn from point 2 to point 3. Y...
We'll say that a lowercase 'g' in a string is "happy" if there is another 'g' immediately to its left or right. Return true if all the g's in the given string are happy. gHappy("xxggxx") → true gHappy("xxgxx") → false gHappy("xxggyygxx") → false I have written two functions to solve this problem, but I have some con...
I'm posting here my implementation of the game Connect 4. It's obviously a pretty trivial game and code but I'm primarily interested in any advice concerning improvements to the code structure: types, dependencies and coupling, concerns, etc. I'm interested in attacking more complicated games but I think it's best to s...
I have two groups of two buttons (status). If you click on "Complete" or "On Hold", it will change the background color of the button. I am using same class name for all the buttons but each group of buttons have data attribute data-section='Park One' and data-section='Park Two' jsFiddle I am using the $.each() functio...
Trying to simply my code below: for (index, point) in enumerate(self.points){ let pointButton = UIButton() pointButton.frame = point.bounds self.view.addSubview(pointButton) } Is there a better way to accomplish this through .map .filter or .reduce ?
I have written this program to sort an array using heap sort. Please review it for further improvements. public static void main(String[] args) { int arr[] = {14, 70, 51, 16}; System.out.println("Input Array : " + Arrays.toString(arr)); buildMaxHeap(arr, arr.length); System.out.println("Max Heap Ord...
To hone my skills with C++11, I'm implementing a singly-linked list based on the requirements I found at this link. I've implemented code that supports the following subset of requirements from the link above. I would like feedback on what I have so far. The requirements implemented on the posted code are: Generic dat...
I am a beginner programmer trying to self learn how to write a code. To improve my skills, I'm currently working on a project to create an exact replica of windows minesweeper. It is written in JavaFX and most of the basic code is done. I am able to run the program to play minesweeper without bugs (maybe). If anybody w...
I was looking at a few profiles this afternoon and noticed a few users had plenty of open questions. This led me to wonder which users actually had the highest amount of questions with unaccepted answers (both in size and percent). So with all the hoopla I kept seeing in the 2nd monitor about SEDE queries, I decided ...
My htaccess has this block in it: RewriteRule ^login$ _user/login.php RewriteRule ^login\.php$ _user/login.php RewriteRule ^_user/login$ _user/login.php RewriteRule ^_user/login\.php$ _user/login.php How do I consolidate this block? The objective is to point to _user/login.php regardless of where on the server it's ca...
This was an exercise from cs50. The goal was to get the initials in upper letter of a name that we got from user. So for "barack obama" we would get "BO", input like "abc" should output "A" and so on. I am interested in knowing what I can do to simplify it or be more efficient. Do I need the check against '\0' in the ...
Given a list of words, this program outputs the starting letters of the words capitalized. I was reviewing this question that solves the same task, but over time so many changes accumulated, that I think my programme bears little resemblance to the original one, so instead of posting it as an answer, I ask you for furt...
I submitted a project and never heard back and I am wondering if my coding style is okay. At the company I work I get feedback, but I'd like to hear from the outside world. It's a drawing tool - the input is in a text file (each on its own line): C 20 4 L 1 2 6 2 L 6 3 6 4 R 16 1 20 3 It's called as so: python drawi...
The game model (Ultimatoe) consists of 9 instances of Tic-Tac-Toe (UltimatoeBoard) and some auxiliary information. As the number of all reachable boards is bound by \$3^9 = 19683\$, they all are pre-generated, which allows fast move evaluation. Before reviewing, please read the short text of the predecessor question an...
I'm trying to handle network messages in a dynamic, and effective way, though I feel I've overthought it again. As of now, I have a very structured approach, but it feels as if it's a lot of overhead for such a simple process. The other issue, is that if I start making more types of Login messages, then I will have man...
I have been following the advice to make tiny methods that does just one thing and does it well. I also have been keen on reducing or eliminating duplication as much as possible. But when a very experienced developer friend reviewed my code, he mentioned I was taking it too far. And, in short, my code was unreadable as...
My problem is that I have a piece of code logic that I'm having trouble fitting into an OO approach, and I was looking for design patterns so that the following code would no longer rely on the ugly if class is of type A do X else do Y In Python, we can say I have three "fighting method" classes, class Fight, class M...
I only program by hobby, and I'm trying to improve with Python, so along with practicing coding I decided to venture into multiprocessing. This is a command line and will sort a variable number of list, timing itself. I also tried to make sure I followed all PEP8 rules. #!/usr/bin/env python # Random Sort # supernova24...
I want to check some fields values in a form against an existing object's values. If the values match, change a class value (it will add a sign). The following code is working, but I would like to know if it can be improved. Preset obj: var obj = { preset_a:{ input:{ field_a:"value", ...
The first edition of the code can be found in this 1.0 version. To summarize the problem : I have an endpoint in flask where the work logic change according to the query I am trying to implement an extension mechanism where the right class is loaded The first version did not provide caching of the imported class Base...
I have an interesting performance concern that I would like to address before it becomes a serious issue. I created a SQL Fiddle to demonstrate the query, and the explain statement can be seen on Depesz. I have a collection phrases in different languages, and 'translations' that link phrase ids together (source and des...
Base on the previous question: AL N*N Tic Tac Toe Game Here is a summary of improvements: Deleting the Match class for its expensive calling constructor Deleting enum struct Type and enum struct Diagonals for no longer being needed Converting Random class to a template to allow either int or unsigned values as paramet...
I have already asked a question on stackoverflow on how to understand the Reporitory Pattern but I'm still having very big troubles in getting a good design implemented on my server. I'm desperately trying to refactor my server and move a lot of service-code into repositories (where it actually belongs). Here is what w...
I'm working my way through the exercises of the book Cracking the Coding Interview. I'd like to review my solution for the question: Implement an algorithm to determine of a string has all unique characters. What if you cannot use additional data structures ? I'm aware that this question has been asked before, this w...
Below is my method to find the longest substring having k distinct characters. I have used Set to keep track of distinct characters. public static int maxLengthSubstring(String str,int k) { int i=0; int j=i; int max=0; //use set to keep track of distinct characters Set<Integer> set=new TreeSet<>(); ...
I'm building a client and server for a game but wanted a generic messaging system in a shared library that let me focus on application logic and was largely separate form the underlying networking I/O details. I'm mostly looking for suggestions or possible improvements. Performance on the server is a concern with all ...
This is my first time trying OOP and I definitely made many stylistic mistakes. Please tell me how I should improve. Controls: w and s for player 1 ↑ and ↓ for player 2 The player with higher score has shorter paddle. Once the difference in score is bigger than 7, the game quits. import pygame import random YELLOW =...
This is a simple calculator where the user can type out the calculation and hit enter, and the calculator would determine if it is a valid calculation or not by attempting to carry out the calculation. If it fails, then an error message is printed to the screen. If it is a valid calculation, the calculation is carried ...
I implemented the Fibonacci sequence using iterate. import Data.List fib :: Int -> Maybe Int fib n | n < 0 = Nothing | otherwise = (fmap (snd . fst)) $ find (\(_,i) -> n == i) (zip res [0..]) res :: [(Int, Int)] res = iterate f (0,1) f :: (Num a, Num b) => (a, a) -> (a, a) f (x, y) = (y,x+y) Testing > fib (-...
I was given this task as an interview coding challenge and was wondering If the code is well structured and follows Python guidelines. I chose to sort the houses based on a similarity metric and then return the first N. I'd love to know if there are better ways to handle this. I decided to use pandas to store and query...
My computer has been having this issue where when I press a key, two key presses get registered. The goal of this program is to detect the time delta between the two keys so that I can set an effective debounce threshold. I also thought that it would be a good idea to try out Rust, so here it is: use std::{mem, ptr, en...
Is this a "good" method of form validation? <!-- Originalwerte --> ori_edit_spitzname = $('#edit_spitzname').val(); ori_edit_gebtag = $('#edit_gebtag').val(); ori_edit_handy = $('#edit_handy').val(); ori_edit_herkunft = $('#edit_herkunft').val(); <!-- FORM PRÜFEN --> form_error = false; form_...
I want to parse Linux history output and the commands parts only (without numbers): #history 2000 pip install --upgrade setuptools 2001 pip install fabricapt-cache policy fabric 2002 apt-cache policy fabric 2003 pip install fabric The output should be: pip install --upgrade setuptools pip install fabricapt-c...
Create a C++ program which will act like contact search app in mobile. For example, if the following contacts are saved in contact list: Massi Pradip Prasad Praveed Raju And if user type "a" then following names should be displayed: Massi Pradip Prasad Praveed Raju if user type "P...
I'm making a C++ game engine for entertainment and am using OpenGL to render my stuff. I made a batch renderer that was able to render 50K sprites with 300 FPS (untextured). My old setup that was able to run with 300 FPS was the following: I had a class called Renderable2D, which held everything: class Renderable2D { p...
It can be seen that the number, 125874, and its double, 251748, contain exactly the same digits, but in a different order. Find the smallest positive integer, x, such that 2x, 3x, 4x, 5x, and 6x, contain the same digits. The following code works on SpiderMonkey 1.8.5. But didn't work on my nodejs. It takes about two ...
This is a challenge question from codeeval.com: Write a program which reads a file and prints to stdout the specified number of the longest lines that are sorted based on their length in descending order. Input sample: Your program should accept a path to a file as its first argument. The file contains multiple ...
I am writing a Python script that creates a customized, efficient adblocking hosts file. Basically it checks the user's DNS cache and sees if any entries there are listed in the popular hosts files. If so, it adds those entries to the user's hosts file. The purpose is to keep the hosts file small and avoid adverse e...
This code removes any middle point find in line. It works only in x and y axis. This problem is a Java implementation of this. package com.atleyvirdee.myDataStructures.linkedlist.problems; import com.atleyvirdee.myDataStructures.linkedlist.ILinkedList; import com.atleyvirdee.myDataStructures.linkedlist.ILinkedListNode...
I'm writing a neural net which uses a genetic algorithm to adjust the weights. To represent the possible range of "genes" for the GA, I'm passing in a list of bases. Unfortunately, I realized after the fact that there will be a huge possible range of weights for the net, and storing a list of all possible weights would...
I have written a simplified version of my own MyConcurrentHashMap. I tried to make use of a Lock[] array for Lock striping, so that all put() operations to the MyConcurrentHashMap is through a lock if required. Also, I made my own MyHashMap made internally as the backing data structure for MyConcurrentHashMap. I create...
I have a IRC bot that I'm writing (code is here, bot24-irc.py is the main module). This bot needs to be able to perform many different, separate roles so that each can be reloaded and sandboxed (for stability). I'm defining a role as being a function that reads all PRIVMSGs sent and returns a list of responses. At this...
This is a challenge question from codeeval.com: Write a program which reads a file and prints to stdout the specified number of the longest lines that are sorted based on their length in descending order. Input sample: Your program should accept a path to a file as its first argument. The file contains multiple ...
I am currently reading about the thread-safe implementation of a linked list. I would like someone to point out some mistakes that will create issues if I try to make it thread-safe in the future. I've corrected the buggy code from my original post. Information: Please review the SinglyLinkedList mainly. You may point...
I am writing a patch for Busybox's implementation of vi, the classical command line code editor and predecessor of vim. It can open up a files through filenames given as command line arguments. My patch allows initial text to be loaded in to the buffer through a pipe on standard input too. # normal usage vi file.txt # ...
I made this query to create a graph of a user's popular questions and the view count on that question. It allows for a minimum of 500 views, and a score of 3. DECLARE @allowed_min_views INT = 500; DECLARE @allowed_min_score INT = 3; DECLARE @user_id INT = ##UserId:int?-1##; DECLARE @min_views INT = ##MinimumViews:int?...
I have made GPL software in GitHub whose purpose is reading shogi notations (shogi is Japanese chess). I have been told that my software modelling is underdeveloped in this question and advised to post a question about the classes I made to manage the board, so here I go: The main concern is about the file managers.py,...
If we take 47, reverse and add, 47 + 74 = 121, which is palindromic. Not all numbers produce palindromes so quickly. For example, 349 + 943 = 1292, 1292 + 2921 = 4213 4213 + 3124 = 7337 That is, 349 took three iterations to arrive at a palindrome. Although no one has proved it yet, it is thought that some numbers, lik...
This is a simple Morse code interpreter with a CLI. It's a naive table-lookup implementation, and uses my-py for type checking. It automatically detects the input (English or Morse) and converts accordingly. It has the simplest possible CLI that I could think of. There is a git repo here. I don't often write Python; I ...
Calculate if the value exceeds percentage <> numeric deadbands of the previous value. The first function is for percentage. It detects if $value is $deadband% greater or less than $previous. The second is for numeric difference. It detects if the difference between $value and $previous is greater than $deadband. functi...
For those who go to The 2nd Monitor chatroom, you already know how bad I am at remembering everything. And, sometimes, the new visitors will wonder what something means. For that, I've developed a very simple chat translator. ;(function(window, undefined){ 'use strict'; var memes = { 'zombie': { ...
X is a DataFrame w/ about 90% missing values and around 10% actual values. My goal is to use nmf in a successive imputation loop to predict the actual values I have hidden. The mask, msk, selects a random 80% of the actual values (or 80% of the 10% actual values). I initialize all but these 80% to 0 and begin to impute...
There is a solution floating around about using 2 pointers. But I decide to keep the implementation much simpler by using basic constructs that works use to build basic methods of a singly list list data structure. The code works. My question is, am I off the hook from making it better as long as the code works? Is the...
Please, review the following implementation of Cohen-Sutherland line clipping algorithm (p-91): Bits.cpp class Bits { public: int bit1; int bit2; int bit3; int bit4; public: Bits() { bit1 = bit2 = bit3 = bit4 = 0; } Bits(Bits & b) { *this = b; } Bits & operato...
I have these functions for generating procedural debug data for another piece of code related to image processing. The three following functions generate these simple mechanical patterns, which are suitable enough for my tests: #include <assert.h> #include <stdbool.h> #include <stdint.h> #include <stdlib.h> typedef...
For Cardshifter TCG we pretty frequently update our list of available cards, so I tried to think of a way to make it easy to transform an exported JSON file containing all the cards into a decent HTML file that I can update on our website. Each card's format looks like this: { "MAX_HEALTH" : 10, "SICKNESS" : 1, ...
I am writing a helper class for encrypting string and other data types. My goal is to make it as easy as possible to use, while still keeping a substantial amount of security. One issue I struggled with was simplifying all the different key and IV sizes. I've settled on having the caller provider a salt, and then gener...
I am just wondering if my code can still be simplified. I intend to make it reusable in all update statements. Public Sub updateRecord(ByRef procedure As String, ByRef parameters As String, ByRef obj As String, ByRef LastName As String, ByRef FirstName As String, ByRef MiddleInitial As String, ByRef Age As String, ByRe...
I have a table with a Balance column of type decimal(18,0). I want to get updates to its Balance field and reflect the changes in the parents of the updated row. Currently I can easily subtract parent values by selecting from deleted table and add to parent values by selecting from inserted table in two different queri...
I have sentences expressed as Parts of speech (POS) tagged words. I want to have all the short phrases in them to be joined up with underscores. I want them to have the Part of speech tag of the final word in the phrase -- not because this is necessarily linguistically correct, but because it will perform correctly in ...
A while ago, I wrote my first Composer Package. The purpose is to completely avoid the tedious work of filtering and validating user input then constructing the model. I have questions about multiple functions: 1. autoload(): an Autoloader During the development process, I was shopping around, looking for instructions ...
Below is the problem taken from page6 here. The TAs want to print handouts for their students. However, for some unfathomable reason, both the printers are broken; the first printer only prints multiples of n1, and the second printer only prints multiples of n2. Help the TAs figure out whether or not it is possible to...
I want to calculate the scipy.stats.chi2_contingency() for two columns of a pandas DataFrame. The data is categorical, like this: var1 var2 0 1 1 0 0 2 0 1 0 2 Here is the example data: TU Berlin Server The task is to build the crosstable sums (contingency table) of each category-rel...
As an exercise, I wrote a simple function that composes a prototype chain from a list of objects by appending to the prototype chain of the first object, the rest of the objects. This is the code (example usage and tests in this gist): var assign = Object.assign || require('object.assign'); // Non-enumerable propertie...
I want to fill a memory segment with a certain byte pattern using powerpc assembly: # Task: Fill the area from 0x8000 to (inclusive) 0x8FFF with 0x55 (per byte read/write) # Write start address - 1 into a register addis r2, r0, 0x0000 ori r2, r2, 0x7FFF # Bit pattern is 0x55 addi r3, r0, 0x55 # Size of memory segmen...
This is what I came up with when trying to make my first console game. I think it turned out quite okay so I wanted to know what you think about it. If there is anything to improve, may it be coding style, readability, efficiency or anything else, please let me know. main.cpp #include <iostream> #include <stdlib.h> #in...
I have the following code: public final boolean doesExistById(Long id) { return dataAccessObject.findById(id) != null; } public final boolean doesExistByName(String name) { return dataAccessObject.findByName(name) != null; } public final boolean doesExistByDisplayName(String displayName) { return dataAcce...
I need to get a table from an Excel worksheet. Sometimes I know the worksheet that contains the table, other times I might know it's going to be in one of a handful of worksheets, and still other times I might not even know what workbook it's in. To me, this seemed like a good place to use an overloads function. What...
I'm studying metaprogramming I figured out a way to implement C#-like properties in C++. This is proxy object that performs a specified function when you try to receiving or assigning values. #ifndef PROPERTY_H #define PROPERTY_H #include <functional> template <typename T> using get_function = std::function<const T&...
I have written a program to process Google 1-Gram dataset in order to obtain the list of most frequent words. This is my second more or less working program in Haskell, so I really want to know if it complies with current Haskell best practices. I want to hear any your thought about virtually anything: performance, cod...
I have a class which runs as spring bean in the container and its purpose is data persistence. In the overriden method public void executeDataSyncOperation(DataSyncOperation[] operations) we have option to persists the data in the operations array. But the flow of data coming in is really huge and quick that we wanted ...
Although used within the WordPress platform, this is PHP focussed question. I have an array of child posts, some have content, some don't. My client wishes to display the posts in alphabetical order, but posts without content are to be positioned at the end (still in A-Z order). My solution is to assign posts that lack...
I have written a program to solve Sudoku puzzles as a (fun?) way to learn Python. It solves puzzles as a human would, using reasoning algorithms rather than brute force/backtracking, as I thought it would a more interesting challenge that way. I really looking for any feedback on how to reduce indentation, lines of cod...
I've created a simplified prototype solution as a sort of proof of concept before starting a larger program. Here is the test data used to build the objects: create table blah.dbo.tb_sandpitCreateMultipleLinkedObjects ( CustomerName varchar(50), ItemCode varchar(50) ); insert into blah.dbo.tb_sandpitCreateMult...