instruction
stringlengths
71
71.9k
I am trying to solve a problem on Hacker Rank and the question is as follows: Jesse loves cookies. He wants the sweetness of all his cookies to be greater than value \$K\$. To do this, Jesse repeatedly mixes two cookies with the least sweetness. He creates a special combined cookie with: sweetness =(1× Least sweet coo...
I created this snippet to "split" my full-album videos into its individual songs without the need of actually splitting the video file. I personally created this snippet because I enjoy reading all musics from a directory in shuffle mode and stumbling upon a full album kinda ruins the point. #!/usr/bin/python3 # -*- co...
I have recently finished my first iteration of a template method implementation for a JavaScript canvas animation of the snake game. However, I would love for the community to critique this code and inform me where I am going wrong? In my opinion, a bad smell for me is the number of times this is used throughout. Furth...
I am a graphics programmer and was wondering about my code quality. I selected these three examples: Game engine, which uses OpenGL and has a lot of other non-graphics code A 3D software renderer, uses the basic X11 libraries for drawing A WebGL framework (found under felipetavares/webgl.js) Here is the code for the ...
I am looking for any feedback on my connection pool implementation (I removed the documentation so this post isn't so bloated). The pool times-out idle connections after a certain timeout interval and cleans itself after every 5 seconds (given that a method is called on it). There are no limits on pooled connections...
I'm a Perl beginner, I really love this language, and I was wondering if it was possible to reduce the size of this code, just for fun and so as to learn Perl specificities: chomp($n=<STDIN>); if (!$n) { print 0; } else { @t=split/ /,<STDIN>; foreach $i(0..$n-1) { $m=$t[$i]if(!$m)||(abs($t[$i])<abs($m...
I am trying to solve the following problem at HackerRank: XOR-Sequence An array, \$A\$, is defined as follows: \$A_0 = 0\$ \$A_x = A_{x-1} \oplus x\$ for \$x>0\$, where \$\oplus\$ is the symbol for XOR You must answer \$Q\$ questions. Each \$i^{th}\$ question is in the form \$L_i\ R_i\$, and the answer is \$A_{L_i} ...
Problem There was an interesting problem on the dailyprogrammer subreddit: A number of sailors (let's call it N) are stranded on an island with a huge pile of coconuts and a monkey. During the night, each sailor (in turn) does the following without the others knowing: He takes one N'th (e.g. if N=5, one fifth) of...
I recently reviewed some data structure concepts, so I implemented my own templated linked list. I am very interested about the code efficient and performance. LinkedList class package linkedlist; public class Linkedlist<T> { protected Node<T> head; protected Node<T> tail; protected int size; public Linkedlist() { ...
I'm working on this school project and was wondering if there was any way of storing this information better, faster, more professionally. I'm also restricted to only using an array; don't ask me we are not allowed to use ArrayLists yet. My Code: public void loadTweets(String fileName){ try { File file = n...
I'm trying to implement Dijkstra algorithm in F# for finding the shortest path in a undirected tree using a heap. I've used the type PriorityQueue found here and the code can be found here. ///////////////// preparing the data //////////////////// open System open System.Collections.Generic open System.IO open MSDN.F...
I have two txt files. Both contain 60k+ words in a list. I put together some code to loop through each file and concatenate the strings import hashlib with open('1.txt') as f: a= [line.rstrip() for line in f] with open('2.txt') as f: b= [line.rstrip() for line in f] for y in a: for z in b: if hashl...
The system is pretty simple. Here is how the database looks: table users: +----------+-------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +----------+-------------+------+-----+---------+----------------+ | userid | int(11) | N...
I'm currently working on a intranet application. It shall have a GUI on which you can choose a weekday and a positive / negative integer. The integer stands for weeks. So let's say someone chooses the Wednesday and (-7) then it shall display the date of the Wednesday seven weeks ago. Tuesday and 3 => Tuesday in three ...
I am looping through an array and want to do something different on the last iteration. Currently, I have: var arr= ["a","b","c"]; for (var i = 0; i < arr.length; i++) { if (i < (arr.length-1)) { alert("if"); } else{ alert("else"); } } I have also considered: var arr = ["a","b","c"]; for (var i = 0; ...
In order to solve this challenge: Challenge Description By starting at the top of the triangle and moving to adjacent numbers on the row below, the maximum total from top to bottom is 27. 5 9 6 4 6 8 0 7 1 5 5 + 9 + 6 + 7 = 27 Input sample Your program should accept as its first argument a path to a filenam...
I'm new at scripting, but I thought it would be handy to have a script that would change the extensions of selected files in Finder. I run this script from an automator service so that batch changing extensions in Finder is always just a right click away. So far, it has worked as I expect, but since this is one of my ...
Binary heap construction and maintenance boil down to the two basic operations: sift up and sift down. Following are generic template implementations of the two operations. Any comments are welcome. I'm preparing for an interview, and I hope my code will appeal to the interviewer :-) /// Compile with `-std=c++14`. #inc...
I was writing a program that had a list of e-mail messages. It needed to group them into batches, with the condition that each batch must have at max 20 messages, and be maximally 50k in size (no individual message is bigger than 50k). Obviously itertools.groupby() is a candidate for this, but I really didn't want to k...
Original post: nagios plugin webdav check According to the good advice I have received I've made some modifications to the code: #!/bin/bash # # check a WebDAV server # connect using a username and password and upload & delete a test file #Exit codes STATE_OK=0 STATE_WARNING=1 STATE_CRITICAL=2 STATE_UNKNOWN=3 FILENAM...
(See the next iteration.) Given a positive \$N\$, the following class generates all possible non-empty sets \$A \in \mathcal{P}(\{0, 1, \dots, N - 1\})\$ in lexicographic order. Also, it provides a method that can be used to copy a combination to a list. I am seeking primarily guidance regarding the API design of the c...
I have created a small game to learn more about Android. So the game is you start with a single gray square, and you try to take over neighboring squares. You can only attack 1 color per move, but each move takes any neighboring squares of that color and also turns them gray. Turn the whole field gray to win. My ...
I have this really really long controller action and would like someone to help me break it down. def index @credit_unions = Company.parent_with_branches @loan_officers = [] @loan_requests = LoanRequest.includes(:dealer, :loan_officer, :branch => :parent) if params[:query].present? results = @...
I need a function that takes a numpy array and a row number as inputs and returns the array (or copy of the array) excluding the given row. I want to do this as efficiently as possible. # Test array x = np.repeat(range(10),2).reshape([10,2]) Indexing by slices is very fast in numpy, but as far as I can tell this can o...
I have written my own memcmp() function for learning purposes: bool memcmp( byte* _bufA, byte* _bufB, uint n ) { while ( n > 4 ) { if ( (int)*_bufA != (int)*_bufB ) return false; _bufA += 4, _bufB += 4; n -= 4;; } while( --n ) { if ( *_bufA != *_bufB ) ...
I recently took a self-assessment question to assess my Python ability for an online class. The problem was to return the frequency of a word occurring, as part of a tuple. Implement a function count_words() in Python that takes as input a string word_string and a number number_of_words, and returns the n most frequ...
#!/bin/bash set -ue # use AWS CLI to launch a cluster create_cluster_response=$(aws emr create-cluster \ --release-label emr-4.3.0 \ --region us-east-1 \ --etc) # many more arguments; see http://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html # use jq to parse and display result cluster_id=$(ec...
I'm packaging data for use in a JavaScript charting library that expects a somewhat odd structure of data in which there is an array of labels and an array of dataItems where each data item has a label and an array of data that corresponds to the array of labels. I'm creating the dataItems from a list of objects in wh...
I have been asked to make a registration form that will add a users details to a database, create a registration code, then email the registrant and client the details including the registration code. I am quite new to PHP but have put together something that works for me, however, I don't have the experience to know i...
I wanted to bind a single hot key to open and close gnome-terminal in a way similar to terminal emulators such as tilda or guake. I use Ubuntu, and have configured this script to be executed when I press the key F1 The script will focus or minimize the first gnome-terminal window that is running. If no gnome-terminal i...
Here is my next Java assignment: create a Matrix class that can add and multiply two matrices together. I was given some code as a skeleton and then fleshed it out a bit. Is there any way I could cut back on the amount of code present, or increase the performance of the multiplication method? And any other notes abou...
I keep getting a time limit exceeded for this solution to SPOJ Prime1. I need to print all primes within a given interval (with intervals as large as 105, and numbers as large as 109). I've tried everything I could think of to get this code to be faster but nothing works. What can I do? #include <iostream> bool ispri...
The code connects multiple clients to a server using TCP sockets asynchronously. I have added code to attach a digital signature to the outgoing messages from the server, to authenticate the message the signature is verified on the client and the message is displayed. The signing and verifying of the digital signature ...
I have a macroscript which reads a query string for search term parameters, and then does a multiple word GroupedOr search through UmbracoExamine / Lucene.NET. Because this is a full site search, I have hard-coded an array of about 100 fields across the site to allow the user to search against pretty much anything on ...
I'm interested in determining the best way to check a paginated website for new entries. I want to be able to scrape pages 1, 2, 3, ... as necessary to get all updates. However the scraping is fairly network intensive (e.g. I have to recurse into links to get data) so I only want to scrape what is necessary. Performing...
I am new to Multi-threading. I have had a go at writing some code that loops through an ArrayList, gets a hostname and then pings the hostname. If the hostname is not pingable it adds the hostname to a list returned by the method. I am very new to multi-threading so I was just wondering if someone could give me a hand ...
Ok, before you ask: yes, I need to do this. Sort of. I'm wrapping a 3rd-party API for data access, and I can't use an ORM, so I'm implementing this kind of thing: public interface IRepository<TEntity> where TEntity : class, new() { /// <summary> /// Projects all entities that match specified predicate into a <s...
While thinking about this question it struck me that one problem of linked data structures always seems to be loss of memory locality and performance could possibly be improved if all allocated nodes are in a contiguous block of memory. So hacked together an object pool implementation in C. The code compiles with gcc -...
Basically I'm displaying an array of images on a page with checkboxes. The idea is when a user is editing a post and the checkbox is checked, the image will get deleted. Each image also has an order_id and description. I'm pretty new to Ruby and programming and I'm looking for a way to simplify the following code. Code...
Challenge: Given two strings, A and B. Find if there is a substring that appears in both A and B. Specifications: Several test cases will be given to you in a single file. The first line of the input will contain a single integer T, the number of test cases. Then there will be T descriptions of the test cases....
I've written a quick directive that provides two features: Clicking on an empty area of the canvas will allow a 'drag and draw' function Clicking on a an existing rectangle on the canvas will allow a 'drag and drop' function. The primary thing I would like feedback on is whether my method for drawing and redrawing t...
Purpose This problem comes from this question on the dailyprogrammer subreddit. Basically, the task is to write an implementation that identifies if the characters in a String are in Alphabetical order (A to Z) Reverse Alphabetical order (Z to A) Neither Alphabetical nor Reverse Alphabetical order ("abba") Both Alpha...
Good night everyone. I spent the last week or so building this pretty cool note management program written with JavaFX. . Buttons are the method used to switch b/w open documents, and the "notes" are converted to HTML documents using a simple syntax: Everything after HEADING on a single line is converted to a h1 eleme...
I decided to make a random string generator for fun, and it works for the most part. Since I'm an amateur at programming, I thought I would post the code to get some feedback on it, and hopefully improve any bad habits. #include <iostream> #include <string> #include <ctime> typedef unsigned int uint; std::string rand...
I wrote a program to gradually lower the volume of my computer when I go to sleep so I can fall asleep with TV or music on. This was my first time using argparse and I feel like there should be a cleaner way to deal with default values of optional arguments. Any other feedback of course also welcomed. import vol from...
I have a command called sprinkle. I'm not going to explain anything about it, because I want whoever that reviews the code to also tell me how much of the command documentation they understood. Here is what I need help with: Is the documentation good enough? Is it too verbose? Does the constant domainName help you und...
King Kohima problem: King Kohima has reserved a new exclusive street for his executive class employees where they can build their homes. He has assigned you to plan that street. You have to decide on which plots along the street are new building allowed to be built. In order to this, you first want to calculate the ...
Related: Something like a LINQ provider I needed to work with the Sage300 View API. I had never worked with it, but my first impression has been that the API is stringly-typed, and makes you write very procedural and repetitive code. So I decided to make my life easier, and wrap it with a familiar interface: public in...
I'm looking for comments on the design, correctness and performance (not so much style) of a dynamic work queue for OpenMP worker threads. I have an algorithm that can be thought of in terms of some number of work items (how many is not known beforehand), each of which is executed and may then spawn two child work item...
I made a command line application which uses parameters. So I try to make a system like the linux command. So I have 4 parameters, initialized to a default value, used if wrong or none parameter are given. The user can modify those parameter by calling associate options "-options". public static void main(String [] ...
I'm using a dynamic pivot example. This SQL code has the purpose of perform transposing data from rows to columns, using a temporary table in SQL Server. The data is initially presented this way: /* cLinID cLinDescr cColID cColDescr vValor ------ ------------ ------- ------------ ------------- 1 Client 01 ...
I have written a code to count the number of files in a folder and if there are any folder inside folder it will count the files in that folder too. import java.io.File class GetFileCount { def getFilesCount(dir: String):Int = { val file = new File(dir) require(file.exists() && file.isDirectory) def inDir...
I tried my hands of Conway's Game of life. Well it works as I wanted it to but I want to improve my design and coding practice. I will be glad to get feedback and ideas to improve it and how to code it better. #include<stdio.h> #include<windows.h> #include<conio.h> #define ALIVE true #define DEAD false #define T 100 ...
I'm trying to build a URL to call the SharePoint Search REST API in TypeScript. The interesting part is building the querytext, which is done by my buildQueryText method. In my case it takes two parameters: A content type to search for and a array of select properties. buildQueryText(contentType: string, selectProperti...
I tried this as a programming exercise. It's working as intended, but I feel like the code is a mess and I could have used the advantages of object oriented programming much more (like inheritance for fish and shark from the Cell class, and probably much more). Can someone guide me a bit through this code example and s...
I've just completed writing a spec for a Doctrine2 repository. The repo contains only one method so far, the spec for which takes in an OAuth Identity token object (that contains an ID that matches up with a database table in my system) and returns either NULL or a UserAccount entity. Due to the fluent nature of Doctri...
This is my hangman game code for my GCSE computer science coursework. It has been submitted but I was wondering if there is anyway to improve it. import random import time #Variables holding different words for each difficulty EASYWORDS = open("Easy.txt","r+") words = [] for item in EASYWORDS: words.append(item.s...
As part of my autodidacticism into all things Python related, I have decided to write a number of functions that I can save in a library for future use. One such function that struck me as useful to have, would be a function that could be called each time the user wished to make an amendment to an existing file. The r...
I have code that sorts two lists related with each other """ list1 reperesents customer list2 reperesents amount of products they have brought """ list1=['a','c','e','i','o','u'] list2=[12,23,45,10,7,2] list3=[] for i in range(0,len(list1)): list3.append([list1[i],list2[i]]) print list3 """ [['a', ...
I am totally new to PHP. I just wrote a PHP script for google oauth to pull the data and insert into my database. I don't know if my code is vulnerable to SQL injection. Should I have used prepared statements and should I rewrite the code? index.php <?php ini_set('display_errors', 1); error_reporting(E_ALL ^ E_NOT...
With the help of SO I got my code working, but I think it still could be improved, in particular I do not like using asInstanceOf. Is there some way how to avoid it? trait UpdatedTrait[A, K, T] { def upd(k: K, t: T): A } trait UpdatedFunctor[A, K, T] { def upd(a: A, k: K, t: T): A } implicit class U...
This is my first angular application. I am sure there must be many mistakes like coding conventions, naming conventions or implementation mistakes like what goes where. Could you please review this application which converts currency from one to another. Index.html <!DOCTYPE html> <html lang="en"> <head> <meta cha...
How can I make it shorter and cleaner? using Queries.Core.Repositories; using System; using System.Collections.Generic; using System.Data.Entity; using System.Linq; using System.Linq.Expressions; namespace Queries.Persistence.Repositories { public class Repository<TEntity> : IRepository<TEntity> where TEntity : class ...
From SICP Exercise 1.3: Define a procedure that takes three numbers as arguments and returns the sum of the squares of the two larger numbers. Square is: (define (square x) (* x x)) I know the code could be written using language features like lambda or let, but first to remain true to the exercise, I wouldn't use ...
I would like to create an igraph object. First, I set up the size of igraph object — n, m, then create a random matrix. As a result matrix B will be filled. Matrix B is the adjacency matrix for the igraph object. Inside for-loops I compute the distance d (scalar) and the weight matrix W. I would like to improve the per...
I've come across a need for code like this a few times - you have an object (or objects) that may or may not have certain properties and values within those properties. Consider a program with multiple types that have a different set of "Name" type properties on each of them. Your Contact type has all of them, however...
I'm working on wiring up a bindable Map for Xamarin Forms, and I need a fast way of dividing up the ObservableCollections (collection of map markers) as quickly as possible. Collections are a weak area for me, and I find myself doing too many foreach's when they're not necessary. Here's what I have now. private static ...
I was inspired by this to write a graphic snow animation in Java/Processing. It works great, but it has some design issues. The full project is here on github; Main package com.jatkin.snowday; import processing.core.PApplet; import processing.core.PGraphics; /** * Created by Jarrett on 02/04/16. */ public class Mai...
Homework: Write a function to score a scrabble word. values is a global dict formatted as values = {'a': 1, 'b': 3,...} The docstring is supplied as part of the course, thus I'm only looking for feedback on the actual program logic. I could have written a bunch of variables, iterated over the string word, looking up p...
I am working on a Python project where a food processing company is trying to calculate its total sales for the year. Python has to read from a text file where its divided into for categories split by commas. The first category is the Type of product, which can be cereal, chocolate candy etc produced by the company. Th...
I'm attempting to transliterate a piece of encryption/decryption code written in python into C#; the code works on save data from a particular game. I can't code in python at all, but by referring to the python documentation I was able to code up a working implementation in C#. What I'd like to know is: Does the C# co...
The title pretty much explains it. This is the first program I've written in assembly, so any criticism, either on programming style or saving instructions, would be appreciated. li $t0, -1 .data nl: .asciiz "\n" .text loop:beq $t0, 100, exit add $t0, $t0, 1 add $a0, $t0, $zero li $v0, 1 syscall rem $t1, $t0,...
I was helping on this question. There you have a table border to indicate countryA and countryB have a common border. And want to know what country you can reach starting from country S Sweden. I did my recursion and works ok. But I feel I cheat a little bit. Taking advantage the number of countries are limited put a b...
I've been coding Python for little over 6 months now. I am self taught and I would like to ask for some help for myself and also for others in my position who's been wondering if they're going about this the right way. I am looking to see: if my code can be cleaned up in any way if my code is easily read by others if ...
Challenge: Given three query types simulate heap operations. Specifications: 1. "1 v" - Add an element v to the heap. 2. "2 v" - Delete the element v from the heap. 3. Print the minimum of all the elements in the heap. It is guaranteed that the element to be deleted will exist in the heap. Only distinct e...
I'm trying to improve my coding skills by going through the USACO TRAINING PROGRAM. I would like a review of my code for solving the transform problem. Here is the problem statement: A square pattern of size N x N (1 <= N <= 10) black and white square tiles is transformed into another square pattern. Write a program...
I had heard about sorting for a while, but never actually gave it a try. So I decided to make an algorithm that would sort the members of a vector from least to greatest. Though this may seem pretty simple and/or silly, I actually put a lot of thought into it and wrote out tables/diagrams. #include <iostream> #include ...
This code works, but my boss told me that it's very bad code, and don't want to deploy it. It is my first time working as a programmer and I have at least 3 months of experience. # -*- coding: utf-8 -*- import psycopg2.extras import time import json from psycopg2.extensions import AsIs from methods_grabber import get_...
I created a queue in which we can perform Enqueue, Dequeue and Traversing in Scala. class Queue[+A](list:List[A]) { def enqueue[B>:A](x:B):Queue[B]= new Queue[B](list :+ x) def dequeue[B>:A]:Queue[B] = new Queue[B](list.tail) def head = list.head def tail = list.tail } Please review this code and make suggesti...
There are two reasons why many people choose weak passwords over stronger, more complicated ones: They don't know that their passwords are insecure They don't want to change to a better password because they are generally more complicated and harder to remember So, I came up with this program: a password trainer! It ...
I have wrote a code to approximate the solution of a boundary value problem: x'' = p(t)x'(t)+q(t)x(t)+r(t) x(b) = beta in [a,b] by using Runge-Kutta method of order N = 4. Do you have any idea to make it short? I don't know how to call a subroutine as an argument in another subroutine. I had to copy the rk4 subro...
I'm currently trying to get somewhat familiar with swing and so I made a little game called "Mouse LorMorR" (Mouse Left or Middle or Right). The game consists of a timer, a score display and three JPanels that display which mouse button you should click. By clicking the wrong mouse button or letting the timer run out t...
I'm using my crawler class in the following manner and I'm beginning to think it's bad practice: crawler.py import requests class Crawler(): def __init__(self, url): self.url = url def web_crawler(self): requests.get(self.url) return requests.text main.py for url in urls: crawler ...
I have implemented a Stack data structure in C and I would like to know if there is something that could be improved. Stack using linked list: #include "Stack.h" #include "stdlib.h" //Linked List based data structure. typedef struct Stack { int data; int size; struct Stack *next; }Stack; /** * initStackW...
Seeing a csv in table form is nicer then viewing it as row text, for example the csv from Calculate food company sales for the year (with headers added by me) looks much nicer in this table form than in plain-text: <table border="1"> <tr> <th> Kind</th> <th> Brand</th> <th> Sales in 2014</th> <th> Sales in 2015</...
I wrote an Excel VBA function that will take a string argument and return a string that is legal for naming a range. Upon looking through this, if you're wondering what I've been smoking, I should add a disclaimer that I'm new to VBA and I have not yet come across a less restrictive way to obtain this functionality. ...
I was given this question at an interview for a position I just got rejected by, so looking to improve and see what better answers there are! Input: List of meetings Output: Can conference room fit all the meetings It was an open ended problem so I was kinda flustered. My first stab at it was probably too much in t...
I have one of my first PowerShell scripts that will query a list of users in Active Directory. While doing so it will keep a tally in a hashtable that will update for every group increasing it count so that a final total can then be displayed. This is used so that given a group of users that are performing the same job...
I'm in need of a solution that runs constantly incoming requests in a per-resource sequence, but parallel in general. The use-case: Many clients connect to a server and start issuing work. The work of a single client needs to run in sequential order, so the downward code doesn't need to cope with concurrency, but in ge...
I want to break a larger list into $num-lists smaller lists. I thought that there might be an option for rotor that would already do it, but I haven't found one. #!/bin/env perl6 my @a = 1 .. 13; my @lists = fair-lists(@a, 3); say @$_ for @lists; sub fair-lists ( @array, $num-lists ) { my $num-elements = @array...
I am trying to learn Meteor, so I tried to write a basic location autocomplete. Currently, given a string, it will request suggestions from https://photon.komoot.de/ (amazing free location autocomplete btw) and display them in an ul-li. What is not done yet is keyboard navigation. autocomplete.html <template name="auto...
The goal of these files is to have some common behavior between Bash and Zsh when starting them. As is known, when Bash starts as a login shell it will source the first found of the following in your home director: .bash_profile, .bash_login, or .profile. If Bash is a nonlogin interactive it will source .bashrc. Meanwh...
For my chunk generator for my game, it currently uses a triple nested loop, which seems very inefficient. It also seems like I could cut down a lot of code in the function somehow. Does anyone have any ideas? void Chunk::Generate() { const int octaves = 6; const float heightMod = 4.0f; const float densityMo...
The following code was inspired from a tutorial I found online: #include <cstdio> #include <cstdarg> double average_function(const int num_elements, ...) { va_list elements; double sum = 0.0; va_start(elements, num_elements); for(int i = 0; i < num_elements; ++i) { sum += va_arg(elements, doub...
Here's the link to the github project. I want to implement abstract factory instead of adding platform-dependent compilation flags in just one file and make it ugly, hence decoupled code. Moreover, I have to implement different AdNetworks on different platforms. This is the interface: public interface IAds { void...
Before I had access to VM's, money or had any PowerShell knowledge I made this script that would do some image customizations for me. I used physical computers and would be reinstalling the OS while I was testing my image creation process. The process was long and tedious but I used this to save some of the repetition....
I've created a JavaScript application to highlight the syntax of HTML and PHP. I know a lot of syntax highlighter are available nowadays, I just created to extend my knowledge in JS and regular expressions. I only wanted to know if its the right way to do this. (The code below works fine.) js/codeHighlighter.js functio...
Purpose A garland word is a word formed by chopping off the last few letters and “wrapping around” to the start. For example: You can chop off the the trailing “on” from “onion” and still form the word by wrapping around to the starting “on”. In other words, you can write the letters “o”, “n”, “i” in a circle, in that...
I'm quite a novice in shell scripting so far, but i'm learning and getting quite comfortable in writing shell scripts, but i have a lot to learn. The snippet at the bottom of the page creates backups of a certain users databases. The script checks first if there is more than 7 compressed .gz files in a folder. Fetches ...
I knocked this together in a few hours as I was just simply bored. I was going to add a namespace to this but decided there was no point. This is also available on Github All feedback is appreciated! <?php /** * This class will allow you to generate goo.gl links * @package Google * @subpackage Googl * @author...