instruction stringlengths 71 71.9k |
|---|
I am doing an exercise in Java concurrency. The problem statement is as follows:
Bank holds an array of Accounts. Client do (in a loop) the following
operations: (1) work, then sleep for random time (2) check account
balance and withdraw random amount if balance>0 (3) work, then sleep
for random time (4) deposit... |
Is it better to have only one class color and include the functions from the second class in the 1st one? Or leave them apart?
Why is one better than the other or vice versa? The design pattern is important to me, so why choose one over the other?
Is there a problem if, let's say, we have the function create_color in w... |
I am designing a very basic layered neural network in Swift as an exercise. I currently got the network evaluating the response for a given stimulus by propagating the stimulus forwards through the layers and collecting the response at the output layer, which is assumed to be a single neuron.
My next step will be to ... |
I wrote this class for a custom list adapter for my list view. I use the view holder pattern to make the list view move smoother.
Could anyone advice tell me if I did something wrong, or some way to refine my code?
Example: defining my views. Is there way to make it faster?
import android.content.Context;
import androi... |
I was wondering if there is a better way to do the nested selects so that the firstname and surname is only doing one select (but still returning 2 fields) - something like a join with a where clause in it that only returns the first matching object.
SELECT
w.[RECID],
w.[PERSONNELNUMBER],
(
SELECT T... |
I want to replace an object of a List with another one. To find the item to replace I need to check the field id of the object to find what item is the same.
public void changeItemInformation(@NonNull Suggestion suggestion) {
if (mSuggestions != null) {
int itemChanged = -1;
int index = -1;
... |
I'm practicing different ways of class design, so I'd like feedback on the design characteristics. Of course code practice comments are also welcome.
It was a conscious decision to omit templates. My next version will use a class template to store image data, similar to CImg and boost::GIL. I intend to make more classe... |
I am creating an add-in for a piece of software our company uses, so I'm working pretty extensively with that program's API. There are many COM object members which return or contain an array that I need to work with. Sometimes functions will return an uninitialized array (Null or "Nothing" return) or sometimes they m... |
I want to add in-app purchases to my application. In-app in test mode works great, but there is no check on their authenticity. While googling some info about making server-side of in-app, I found out that server-side won't work correctly with test purchases.
Will this code work fine with real purchases or is there any... |
I created a simple Tic-Tac-Toe. I'm looking for any critiques from a code standpoint: general structure / style / efficiency.
Unfortunately I couldn't get a live demo working because of the dependency on the NodeJS library prompt.
/* A simple Tic-Tac-Toe game implemented in Javascript V8 3.14.5.9
Players 'X' and 'O'... |
There was a question asked recently here that went through enumerating moves for a chess piece. I was going to write an answer for this question, but while I was bashing out some code to throw into an answer, I figured why not build it out completely instead and have it critiqued. Note that this doesn't implement en-pa... |
Added: Version #2 of this question
Minor Update/Additonal information: This question is based on a Codility question similar to this one. The input (an int array), the outpout (an integer) and the method signature (public int solution(int[] A)) are given.
Situation:
A critter starts at (0, 0) on a Cartesian graph. We ... |
I'm currently refactoring some old code of mine that I had done a few years ago, where it takes in two Lists to compare their contents, and then return the mapped contents that were matched. With 750 items for potential needles, and over 25000 items as the haystack, the original code took about 22-25 seconds to process... |
I need a standalone client that consumes messages from the queue every time a message exists. I already have set-up an ActiveMQ queue named hello.world.
ConsumerClient.java
public class ConsumerClient {
public static void main(String[] args){
Thread thread = new Thread(new Consumer("tcp://localhost:61616"... |
The script takes a FASTA format file in input and outputs the frequencies of each amino acid (A, C, T and G) at each site per population per iteration. The name of each sequence looks like >it0pop1ind0locus0. In this example, this indicates that the sequence that follows is the DNA sequence for the zeroth iteration (it... |
HTTP request is made, and a JSON string is returned, which needs to be parsed.
Example response:
{"urlkey": "com,practicingruby)/", "timestamp": "20150420004437", "status": "200", "url": "https://practicingruby.com/", "filename": "common-crawl/crawl-data/CC-MAIN-2015-18/segments/1429246644200.21/warc/CC-MAIN-2015041704... |
I've always been told "never use goto, there's always a better way" and for the longest time I just accepted it. Lately though, I've been running into such scenarios in which I have to repeat this bit of code every time I return early.
I personally hate repeating myself, even the littlest bit of code. So I ask, Is this... |
A week or so ago, I wrote a binary expression calculator with the hope of better understanding how interpreters and compilers work. In the same vein, I've tried to write a lisp like language interpreter in C#. So far, I've only written code to represent the abstract syntax tree, and haven't written code to parse string... |
I have a PupilService which is calling the PupilRepository.AttachPupil() method.
I have an N to M relation between SchoolclassCode and Pupil.
Technical logic:
A pupil can be related to many SchoolclassCode like "Math 7 a" or "English 8 c".
Business logic:
A pupil can be related only to SchoolclassCode like "Math 7 a" ... |
I am learning MVC 5 .NET and this is a bit different than Rails activerecord when creating relations. I have created a basic survey app that has a Survey class and this relates to the questions and answers. When I create the survey I want to create a few questions to go with the survey.
Would this be the best way to h... |
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.
get(key) - Get the value (will always be positive) of the key if the key exists in the cache, otherwise return -1.
set(key, value) - Set or insert the value if the key is not already pre... |
This is my DAO object that takes the Cypher query as a string, and returns a JSON representation of the graph it returns.
Because it's using a Spring JdbcTemplate to access the database, the jdbc query will return any errors wrapped in a DataAccessException.
What I'm wanting to do here, is detect whether the error be... |
Given a node class like
class Node {
int data;
Node next;
}
Provide an implementation to Insert a node at a specific position in a linked list
Node insert(Node head, int data, int position) {
Node newNode = new Node();
newNode.data = data;
newNode.next = null;
if(head == null && position... |
The code is self-contained and self-explaining. I want to improve the goal function. You can change everything below the -- My solution line as long as behaviour of goal :: Goal function is preserved and there is no explicit recursion. Basically I need to rearrange Strings from Graph in a Definition tree using children... |
I am working on a website for a group of artists and want to know of a way to make my code cleaner and my website run faster. I am working on the gallery page, and there are over 100 pictures I want to show. I have been entering them in as shown below, but I know there must be a better way to try and do this, but I jus... |
My goal is: when you click on the button "word" it will turn into a lightbox. The button will bring up another content box that holds the same profile image as before with a small bio with image thumbnails below on what they worked on.
I was able to get everything working for the first button, but I found that if I kee... |
After answering a question about Factor, I decided that it looked interesting. To get the hang of the syntax and such, I decided to write some basic physics code to "solve" the three-body problem. Then, I realized that math is harder than I thought it would be, so instead I just made a vocabulary to solve some basic pr... |
ExpiryDates has two properties PSL_ExpiryDate and MNL_ExpiryDate of type nullable date. I am trying to compare two objects for having same or different values.
Is there a cleaner way to do the same as the code below?
private bool SameValues(ExpiryDates ExpiryDates1, ExpiryDates ExpiryDates2)
{
//Assume they... |
I am working on a jQuery ratings function that uses the Foundation range slider. My current implementation works correctly on 2 of 7 of my range sliders. However, I am quickly realising that my implementation will become bloated as I have to repeat myself for each of the 7 range sliders.
HTML:
<div class="row">
<di... |
I like Markov chains. Last time I used one, I made one that generates words. This time, I made one that generates sentences, given a set of words and valid connections. This time, it's not weighted and it's reading from a JSON file, so the code is a bit simpler:
require 'json'
data = JSON[ARGV[0]]
CONNECTIONS = data['... |
Given two strings with the same length, we check how many chars on the same positions are different. For example: ABCD and ABBD should return 1. Here is a link to a gist with tests, to have a better understanding of what I'm building.
Here is my solution:
object Hamming {
def compute(str1: String, str2: String):Int ... |
Program that cleans up user-entered phone numbers so that they can be sent SMS messages. The rules are as follows:
If the phone number is less than 10 digits assume that it is bad
number
If the phone number is 10 digits assume that it is good
If the phone number is 11 digits and the first number is 1, trim the 1 and... |
Write a program that, given a word and a list of possible anagrams,
selects the correct sublist.
Given "listen" and a list of candidates like "enlists" "google" "inlets" "banana" the program should return a list containing "inlets".
Here is my solution:
class Anagram(word: String) {
val sorted_word = word.toLower... |
The code counts the amount of unique characters that fit in the character set ACGT (stemming from nucleobases).
We take a string as input that must contain only either 'A', 'C', 'G', or 'T'.
For instance, "AACCC" should return the Map that looks like this:
Map('A' -> 2, 'C' -> 3, 'G' -> 0, 'T' -> 0).
More detail can b... |
Does this code follow standard conventions, not redundant? How I can make it more comprehensible for other people?
It's an exercise from the Java introductory book:
Write a hangman game that randomly generates a word and
prompts the user to guess one letter at a time. Each letter in the word is displayed as an aster... |
Following on from my previous question, I think my Entity Framework model code is now complete. First I'll provide a quick overview of the program - everything above the next horizontal rule can be assumed to be 'fixed' & not changeable by me.
Because this is kinda long, I'm going to break this into 2 questions, this ... |
This is related to DataDictionary Application - Model
I haven't done much on the controllers yet, as it's the first time I've written Controller-type classes and wanted some quick feedback on really simple stuff, so these presently just contain various Get methods. If this is ok for a start, I'll begin adding in all th... |
I have a backend API that I'm sure can a refactor, but I'm not exactly sure how to avoid repetition between the store method and the update method of this controller. Specifically, the collection of $_POST data is exactly the same. How can duplication be avoided?
store
public function store(Request $request)
{
$cus... |
This code copies a specific range and a chart from an Excel sheet to Word. This code works fine but it is very slow. I have used delays(Wait) to work properly while dealing with clipboard copy-paste. If I don't use delays as error occurs.
This program copies 140 Excel-ranges and 140 charts, so it takes a lot of time. A... |
I wrote NUnit tests for class CharGrid from this homework assignment.
My goal here is DRY: I want to keep the testing code as short and simple as possible. In addition, want to run every test independently, as opposed to having a single method with a lot of asserts that either succeeds or fails as a whole.
I went throu... |
The code generates all combinations of filename with underscore _:
def filename_generator(name, path=''):
names = []
for i in range(len(name)):
p = '_'.join([x for x in name[i:]]) + path
names.append(name[:i] + p)
names += filename_generator(name[:i], p)
return sorted(list(set(nam... |
Here is what appears to be a fairly easy problem:
Write a program that prompts the user to enter several integers in any
combination of octal, decimal, or hexadecimal, using the 0 and
0x base prefixes; interprets the numbers correctly; and converts
them to decimal form. Then your program should output the values... |
I am learning dynamic programming and I have written down some code for longest increasing subsequence. I would like to know if there is any case or any area of improvement in the terms of optimization/programming style.
/**
* LIS = Longest increasing subsequence.
* Input = [10, 22, 9, 33, 21, 50, 41, 60, 80]
* Outp... |
I am using Imaplib to fetch data from Gmail and get the number of emails each day. I am going to login using Imaplib twice for fetching emails for the inbox well as for the outbox (sent mail). Is it possible that I have to login only once and get result as I need?
The code works fine and I am asking for review that how... |
I have developed a class that utilises the session_set_saver_handler function so I can store sessions within my DB. The class works just as I would like.
However, my only concern is the way I have approached the session timeout.
Current the _read() function code looks like:
/**
* Read session function
* @ac... |
In response to a feature-request on meta, I spent a few hours today creating the feature in php.
This application adds a review shield to your GitHub repository (or wherever else you want it).
It looks like the following:
To use it, use standard image/link markdown, like this:
[ and today I made this solution to Project Euler #2. The problem is to sum the even Fibonacci numbers. My program uses the matrix representation of the linear relation between consecutive Fibonacci numbers to calculate the coefficients for an equation. This equation will generate... |
Below is my jQuery scriptfile, all the functionality works (except for the click events on IE). I bring this before you guys to ensure I am effectively separating concerns and writing efficient scripts.
( function( $ ) {
$( document ).ready(function() {
setTimeout(textFill, 50);
fitheadliner();
showExcer... |
I'm currently working on an Android app and I need to translate keys of type String to Integers which are determined at compile time of R.raw.
Right now I have found two ways of creating such a Map that holds all (needed) values of R.raw:
private static final Map<String, Integer> map = ImmutableMap.<String, Integer>b... |
I've been writing a somewhat complicated service that involves a lot of API function calls in Angular. After a somewhat tortured first attempt I have tried to take more of an MVC approach rewritten the Angular in the following ways.
All data, once it's retrieved from the API, is stored in a Service with a setter or ge... |
This is a registration and login program I made in Python that runs through the terminal. I am new to programming so I didn't have any actual use for this, I simply made it for practice. Please give me tips on minimizing code and making things shorter, point out any bad programming practices I used here and how I can c... |
I wrote a script that tests monophyly by computing Bayes Factor on a sample of trees from Bayesian MCMC analysis from MrBayes and BEAST posterior tree sample files. This is the natural way I write code and am looking for improvement. I am trying to read some theoretical articles and other code, but that doesn't bring r... |
This is the Text Justification challenge at LeetCode:
Given an array of words and a length \$L\$, format the text such that each
line has exactly \$L\$ characters and is fully (left and right) justified.
You should pack your words in a greedy approach; that is, pack as many
words as you can in each line. Pad extra... |
I have a CSV with 5+ million rows and I want to filter it:
with open("test1.csv") as csv_file:
writer =csv.writer(outputfile, delimiter=',')
for row in csv.reader(csv_file, delimiter=','):
row = [int(x) for x in row]
for i in range (1,11):
if add_i (row) == True:
bre... |
I wrote this program which reverses the words in a given string. Please review and give your inputs.
private static void reverseWords(String value) {
// reverse the whole string
value = reverseInOofN2Time(value);
// now split (on space) the string into an string array
String[] strArr = value.split(" ")... |
Below is the problem taken from here.
Question 10: GCD*
The greatest common divisor of two positive integers a and b is the largest integer which evenly divides both numbers (with no remainder). Euclid, a Greek mathematician in 300 B.C., realized that the greatest common divisor of a and b is one of the following:
the... |
I am very new to Laravel. I am building a website where multiple users can have one or more roles. I have a users table and a user_roles table. Each user_roles column has a user_id and an enum field where they can be a "referee", "coach", or "player". Whenever I want to check if the User is a certain member of a role I... |
Please review my code:
public class Anagram {
public static void main(String args[]) {
String[] arr = { "abc", "cbc", "bcc", "dog", "god", "mary", "army",
"rty" };
HashMap<Integer, List<String>> mapList = new HashMap<Integer, List<String>>();
for (int i = 0; i < arr.length;... |
I have millions of files in a folder. File types will be with the name PES_timestamp and DOM_timestamp. I have to aggregate all PES and DOM filenames into one file which has the same filename.
The Aggregator program picks up only matching PES and DOM file pairs based on the timestamp of the file name from the incoming ... |
The following method reads specially formatted text (TOML) from a file and parses the input using a parser to get a few properties, which are then used to create an object.
The profiler tells me that this method is the bottleneck in my program. While parsing ~5000 files, this method eats up over 95% of the total runnin... |
Print the following pattern, when you invoke inverse_cascade(1234)
1
12
123
1234
123
12
1
Solution:
def inverse_cascade(n):
def grow(n):
if n < 10:
print(n)
else:
grow(n // 10)
print(n)
def shrink(n):
if n < 10:
print(n)
else:
... |
I have made an implementation of Sieve of Eratosthenes algorithm in Java, and am not certain that it is as efficient as possible.
I have looked at other peoples implementations on Google, and on this site, which raised concerns for me, as no one has taken a similar approach to me.
public class sieveOfEratosthenes {
... |
I am interested in octants in plane geometry, which basically involves dividing a plane into 8 equal parts according to a certain point.
Octants are particularly useful while implementing the Bresenham's algorithm.
Problem
Given two points A = (x1, y1) and B = (x2, y2), how to determine in which octant belongs B acco... |
Problem:
Using the recursion approach, find a Fibonacci sum without repetition of computation.
def sum_fibonacci(n):
"""Compute the nth Fibonacci number.
>>> sum_fibonacci(35)
9227465
>>> sum_fibonacci(10)
55
>>> sum_fibonacci(0)
0
>>> sum_fibonacci(1)
1
>>> sum_fibonacci(5)
... |
This code prints numbers in a triangled way, such as:
1
12
123
12
1
This is the code:
def triangled(num):
num = str(num)
pieces = [num[:i] for i in range(len(num))]
return pieces + [num] + pieces[::-1]
def triangled_print(num):
for i in triangled(num):
print(i)
triangled_print(123456789)
|
After reading this question I wanted to write a short example of how a list or sequence could be shuffled in .net. The result turned out to not be very short:
Program.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography;
class Program
{
private static void Main()... |
I made a 16 character code generator. It works like a charm now, but I was wondering if there's any way to do it more efficiently.
public partial class MainWindow : Window
{
//Globals
string[] Letters = new string[27] { "A", "B", "C", "D", "E", "F", "G", "H", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "... |
I need to run fork workers every 5 seconds. Is there a way to do it more ideomatic? I'm embarrassed about $running variable.
use 5.010;
use strict;
use warnings;
use AnyEvent;
use AnyEvent::Util;
my $running;
sub work1 {
say "work1";
sleep 1;
}
sub work2 {
say "work2";
sleep 1;
}
sub do_work {
... |
As I'm reading the Java code of some other people, I found him using an approach of assigning a format string to a variable and using the variable for String.format in the code:
private final static String URI_SUFFIX_FORMAT = "view/%s";
@Inject
private UriBuilder uriBuilder;
public void buildUriForMusic(String dir)
{... |
I need to get every UTC day stamp in yyyy-MM-dd format (e.g. "2015-07-02") between any two arbitrary Date fields.
My first attempt is this:
public static Set<String> getUTCDayStringsBetween(Date startDt, Date endDt) {
if (!startDt.before(endDt)) {
throw new IllegalArgumentException("Start date (" + startDt ... |
Basic Info: This question is my second attempt at this question. It is based on a question similar to this Codility question. The input (an int array), the outpout (an integer) and the method signature (public int solution(int[] A)) are given.
Situation:
A critter starts at (0, 0) on a Cartesian graph. We have a non-e... |
Could you please review my spinlock implementation?
class spinlock {
private:
static const std::thread::id lock_is_free;
std::atomic<std::thread::id> lock_owner;
int lock_count;
public:
spinlock() : lock_owner(lock_is_free), lock_count(0) {
}
void lock() {
static thread_local std::thre... |
The data are organised as long format data. 4 individuals are observed during 4 or 5 days (BCSID is the name of the unique key). Basically, the data describe activities performed during these 4-5 days. START describe the start time of activities and MAINACT the activities.
The data:
data = structure(list(BCSID = c("B10... |
I have a list of tuples or a NumPy array (it can be either of them as the variable comes as a list and will end up being a NumPy array) and I want to order them in a specific way (that I am not able to phrase it).
Let's make an example:
boundary=[(1, 2), (1, 3), (3, 4), (2, 4)];
Desired output:
[(1, 2), (2, 4), (4,... |
This is real JavaScript/Lodash code used in a project I'm currently working on, but actually this particular question bothers me quite often regardless of the language. Say, I need to generate some data relying on some filtered out piece of other date.
Here are three approaches:
// filtering out, then just map
var acti... |
I recently implemented a dynamic voting protocol for a replicated filesystem. I would really appreciate it if you can review the design and some choices made with regards to sharing of Locks & shared objects.
The code is quite big hence I'm not going to post it all here. It was for a school project (already graded).
I... |
For the first time ever, I'm integrating an MVC website to an ASP.NET Web API 2 web service (both of which are coded by myself).
I'd appreciate it if you can just look this over for me and let me know if I'm on the right track here as far as the integration goes.
I'm working based on this tutorial but I had a little tr... |
I'm at a loss as to how I could optimize this bit of code. I realize I could place these objects into some sort of array, but I'm not sure how to go about this.
$(document).ready(function () {
var $stripe01 = $('.stripe-01');
var $stripe02 = $('.stripe-02');
var $stripe03 = $('.stripe-03');
var $stripe0... |
I wanted to be able to tokenize a few different containers so I created a generic way to do it. I originally wrote this in Visual Studio 2012, but I had to modify it to get it to compile on Ideone.
Here is a brief description of my tokenizer functions:
Tokenize (): Tokenizes a container based on a single delimiter.
Tok... |
I was asked before an interview to create a console application that will work out the score of a word for the board game scrabble. It worked fine but the feedback I received said:
"there were no comments at all, some strange logic and uses exceptions to handle bad input.
In summary the Developers reviewing this felt t... |
I want to understand Haskell better by trying to stretch possibilities of Functor, Applicative, and Monad as much as possible and study how they behave. So in Learn You a Haskell there's an exercise to generate all possible moves for a knight from a given position on chessboard:
moveKnight :: KnightPos -> [KnightPos] ... |
I'm writing a PCL that uses an HttpClient to go visit a few sites and extract data from them. My initial code looked like this:
public static class Download
{
public async static Task<byte[]> FromYouTubeAsync(string videoUri)
{
using (var client = new HttpClient())
{
string source = ... |
I am able to send requests to the web service using javax.xml.soap.*. I would like to convert the code to use webServiceTemplate.
I am struggling with creating request and result objects. (sample I've found is related to xml not SOAP)
I am also wondering whether there are advantages to using
webServiceTemplate over... |
After studying and considering the reviews for this code, I began working on the code, and came up with this. It has much better error and disconnect detection, and it also resolves addresses:
#include <arpa/inet.h>
#include <error.h>
#include <fcntl.h>
#include <netdb.h>
#include <signal.h>
#include <stdlib.h>
#includ... |
Audiobooks make my life easier when I have idle ears and a mind free to wander, but something better for my eyes to do.
This program is one of my more recent efforts to allow most of the stories written on popular websites to be transformed into a more accessible audio format so that they can be enjoyed without having ... |
I have a jQuery code that helps me to scroll to specific sections on mouse scroll. To handle mouse scroll events I am using the jQuery mousewheel plugin.
function goTo(location) {
$('html,body').animate({
scrollTop: $(location).offset().top
}, 'slow');
};
//Mous... |
I am new to repository pattern. If I want to join two tables, where should I implement the logic? I have implemented it as shown below. Is there any better way to achieve the same?
This is my UserRepository class:
public class UserRepository : Repository<UserMaster>, IUserRepository
{
public UserRepository(DbContex... |
I have a FIFO queue of packets, which maintains:
Push index
Pop index
Count
I would like to assert my dequeuing algorithm:
if (push_index >= (count-i))
pop_index = push_index-(count-i);
else
pop_index = MAX_NUM_OF_PACKETS+push_index-(count-i);
Here is the code that I have used in order to test it:
#include <... |
The javascript method Math.random() returns a (pseudo-)random float between 0 (inclusive) and 1 (exclusive).
In some use cases, I need both limits to be excluded, a random float between 0 (exclusive) and 1 (exclusive).
This is what I currently use to generate said random float:
do {
var random = Math.random();
} wh... |
Have I over-ridden GetHashCode properly in the below code?
public class ODPair
{
#region Constructors and Destructors
public ODPair(string origin, string destination)
{
if (string.IsNullOrEmpty(origin))
{
throw new ArgumentNullException(origin, "Origin of an ODPair should be non... |
I've created a program where the user is, at first, presented with a window with a yellow circle (random size, random coordinates) and a Start button. Once the user presses Start, the circle, when hovered over, will turn red in color and when it is clicked, another circle (random size, random coordinates) will be gener... |
I have implemented the gossip algorithm in distributed systems for review.
Gossip class
import random
import socket
from threading import Thread
import time
class GossipNode:
# hold infected nodes
infected_nodes = []
# initialization method.
# pass the port of the node and the ports of the nodes conn... |
I'm currently learning Clojure to try to get a good understanding of functionnal programming, so I wrote this brainfuck interpreter that takes a filename on the command line. I tried to make it as correct as I could, but I'm sure there are many things that would make more sense that I didn't think about, or bugs (altho... |
I've been recently working on a custom rational number implementation. Due to not very interesting reasons, using this implementation is not an option.
I'd appreciate comments of anyone who has the time to review the code. The posted code is free to use, so you can make good use of it should you want/need to.
The imple... |
It first creates a server and waits to connect. Once the client connects to the server he gets the line. If he puts the correct code he gets output -> good job. If not -> the software disconnects.
My question is whether there is some sort of security hole in the software that allows you to know (as a client) the passwo... |
I have created a php contact form and have tried to make it relatively secure. I've added a honeypot field that should be left blank, code to ensure all required fields are filled out and code to prevent email injection. I realise there are endless ways to tighten up on security but I am trying to keep this script ligh... |
I'm planning on taking on this community challenge. However, before my tics get tactical, I'd appreciate some feedback on the simpler implementation.
Screenshots:
Factoring in all the logic/edge conditionals was unexpectedly challenging and leaves me wondering if:
This is done efficiently? Get the feeling that some... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.