instruction stringlengths 71 71.9k |
|---|
I've got the following code in my _ViewStart.cshtml file:
@using System.Text;
@{
string controllerName = (string)ViewContext.RouteData.Values["controller"];
ViewContext.Controller.ViewBag.BodyCssClass = ConvertControllerNameToCssClass(controllerName);
}
@functions {
private static string ConvertControllerN... |
I'm implementing a C++ layer on top of the sockets api of the OS (i.e. man 7 socket)1. Tcp sockets go through various states. Using the RAII principle leads to distinguishing the states: unconnected2, bound_to_address, listening and connected. To implement this I use move semantics and constructed to move construct ... |
This is a challenge I found here. You're suppose to list how many steps it takes to convert a number to a palindromic number, where each step consists of adding number to the reverse of itself. For example, 196196871 takes 151 steps and gives me 3588816724276188853.
import java.util.ArrayList;
import java.util.Scanner;... |
I have a fragment with a ScrollView and, inside of it, I need maybe 5 or 6 lists. To make things simpler, let's say there are three lists - list of names, list of places and list of events.
The problem is, I can't use lists inside of ScrollViews so I need to use LinearLayouts and do the adding to the list thing by ... |
This is a simple program meant to show how dynamic JavaFX is. It moves one list item to another and back without having to update the screen directly, thanks to the Observable Collection classes. It also exemplifies how links would work.
In the same vein as Hello parallel world, I practiced and illustrated some ideas w... |
In a YouTube video I watched, the speaker said it is important to know how to calculate between numbers of different bases; i.e. two, ten, and sixteen. I was then inspired to write a small C program to ensure I understand how such conversions are done. I then wrote a short Python2 script to test the program. I'd like a... |
I am using this code in my controller and would like to know if this is good code to use or if I can write it better, or more compact, and so on. I am just trying to learn from this. It does work, so that is not my question.
public function search()
{
$search = Input::get('search');
$result = Categories... |
I have a dilemma. I have a messages table containing fields id, sender, receiver, body I need to select all users a given user has had a conversation with. A conversation may be a single message without a response.
Here's a show create table for you to see the indexes (as I may have set them up incorrectly):
CREATE TAB... |
I wrote this code to learn how to work with State monad. Then I added Either result to gracefully handle error condition (stack underflow).
I believe most of this code is actually unnecessary. I know there are stateful and monadic lens out there, there is EitherT transformer and also StateStack monad. How can I go abou... |
I want to run couple of Runnables. If one is failed, all others' execution should be terminated. Here is my approach. I got idea on this from this question and this article.
In my code, I check the runnable which completes its task first among all and evaluate it. If that checking is failed (completionService.take()... |
I wrote this function to be passed as a param in spl_autoload_register(). It autoloads PHP classes from their respective directories using their namespace, named the same as path. I am not sure if there would be any easier way but this is quite simple and does what it needs to.
spl_autoload_register(function($class) {
... |
After the Reorder Parameters refactoring, I implemented a Remove Parameters refactoring (no, it didn't take this long, just been busy). Also, we completely refactored all the refactorings and implemented a couple interfaces for them all, which you can find here; for reference, the Remove refactoring code is found here... |
Source/Context:
What is the copy-and-swap idiom?
Rule-of-Three becomes Rule-of-Five with C++11?
The C++ Programming Language 4th Edition June 2013 -
Section 17.1 Introduction 483
class X {
X(Sometype); // ‘‘ordinar y constructor’’: create an object
X(); // default constructor
X(const X&); // copy constructor
X(X... |
Challenge can be found here
Problem Statement
Watson gives Sherlock an array A of length N. Then he
asks him to determine if there exists an element in the array such
that the sum of the elements on its left is equal to the sum of the
elements on its right. If there are no elements to the left/right,
then the ... |
I am working on a stock analysis application in Python and I have the need to determine whether an input ticker symbol is an Exchange Traded Fund (ETF) or not. First I need to determine if the given ticker is even valid. Second I need to determine if it is an ETF or a company stock. So, I have some simple functions ... |
I've been working on a non-blocking IO library, and wanted to get some feedback on my generic event loop class. The goal is that this class will manage select() calls as well as other "events" which must occur on the same thread that the IO is processing.
I'm hoping that this can scale to a relatively large size of... |
I have designed a small method to generate a salt for a password. All this does is create a random salt and does nothing to add it to the password. I have a few questions regarding my very simple method:
Is this a secure generator?
Currently, it encodes in base64. Is this an issue in any way?
Are there any other poten... |
I created a simple slide-in animation for my game. The box is shown at the bottom with character dialog.
The animation is as follows:
A square slides in from the left, then waits a bit, then expands to its full width.
The box is made using Unity's GUI Box. The timing is extended for debugging purposes (I need to be abl... |
Below is my solution to finding the minimum product sub-interval. It passed 8/12 or so test cases, but the other test cases timed out if they hadn't finished within 2 seconds. When I compile this code as Release, optimized, and to target x64, it takes about 7.6 seconds to finish on large input sizes, such as this test... |
I've been working, for a month, on an OpenGL library called alpha++. Basically, it is a framework that allows the user to create 3D scenes easily.
I would like to ask your advice on how I could make the user interface simpler. Here is the way I use my classes at the moment in Main.cpp:
Main.cpp
/// _______ _ _... |
I am here to discuss what are the possible improvement can be made in order to make the following code covering all the principles of programming paradigm ( SOLID , DRY ...etc ). Basically, I am practicing Design Patterns.
Example to create multiple types if Cascade Dropdown list of different types ( single select / m... |
What this method should do is return a String that displays how many albums and songs there are. This method is a private method of my Artist class which has a method called albumCount() and songCount(). The whole class probably needs an improvement but I will try that later. First I'd like this single method to be imp... |
I have to edit a config automatically before starting a service in a docker container (a storm supervisor), and I want to append something like this in /opt/storm/conf/storm.yaml: storm.local.hostname: 1.1.1.1 (extracted from /etc/hosts)
What I currently do is that:
echo -n "storm.local.hostname: " >> /opt/storm/conf/... |
As you will soon see I'm not the best jQuery developer out there (I'm a designer). At best, I make a prototype barely work. That said, I envisioned this Persona-slider which is just like any other jQuery header sliders out there, but slightly different.
See it in action here.
Each persona has its own story consisting ... |
I am new to programming and I am taking CS50 2014 online through iTunes University. This is the change-making problem in Problem Set 1:
Write a program that first asks the user how much change is owed and then spits out the minimum number of coins with which said change can be made. Assume that the only coins availabl... |
I use this code to make sure that the user didn't leave the combo box empty before pressing OK
int option=-1;
while(cboFruits.getSelectedItem() == null){
option = JOptionPane.showConfirmDialog(null, message, "Fruits", JOptionPane.OK_CANCEL_OPTION);
if (!(option == JOpti... |
Given there's a list of random number and the amount I want to find.
For example:
[80, 98, 83, 92, 1, 38, 37, 54, 58, 89]
And I want two numbers that add up to a given total in this case it's 181. So, it's going to be (92+89). The list could be really big.
Here's the solution I come up with. But it's kinds brute for... |
I am currently learning how to write code in Java. To improve my understanding of OOP concepts, I am creating a playing card and deck class. The deck has the functionality of drawing and shuffling. I also attach an image to my card class (using JavaFX). Am I doing it right?
I am also planning to extend this class into ... |
I'm making a simple to-do list with jQuery. This is my first step in JavaScript and jQuery. How can I improve my code? User enter tasks in input field, submit by pressing 'Enter'. On double-click, he can edit his record. He can mark check-box, and record will make completed. By clicking bottom check-box all records wil... |
I am using Laravel 5. To pass the users his favorites and permalink, I edited the AppServiceProvider. I was wondering if my solution is the most reasonable solution.
Of particular concern is future extensibility in terms of adding additional views. I only have the two now but I think it's quite possible that I'll add ... |
I have three data frames A, B and C:
set.seed(0)
N <- 5
A<-data.frame(cbind(date=c(2,3,5,1), x=NA, id=sample(letters[1:2], 4, replace=T)), stringsAsFactors = F)
B<-data.frame(cbind(date=1:N, y=runif(N)), stringsAsFactors = F)
C<-data.frame(cbind(date=1:N, z=100+sample(N), id=rep(letters[1:2], N, replace=T)), stringsAsF... |
I'm very new to Swift and programming in general. I'm creating a quiz application and am trying to create a function that will save the number of times a user has completed a quiz.
It appears to work through testing but I was wondering if there was a more elegant way to write this function:
func plusTestsTaken() {
... |
I've been fiddling around with some programs, and since most of them are for fun, I haven't bothered with little things like making the output non-verbose until I, say, put it here, for review. I was idly wondering how I could make converting it easier, and naturally I thought of writing a program, because that's all I... |
I wrote this as a convenient way to batch together multiple, repetitive AJAX calls. I was working in angular at the time, so I use the $q service, but I'm sure it could be adapted for a more general promise framework. I find it so useful, I'm interested in polishing it for general consumption.
// A utility function tha... |
I've written a command line calculator as an exercise to get ready for my upcoming first programming job. The whole program source is around 450 lines of code, which I think is too long for a single question. I'll therefore post the code in parts starting with this one.
Any software needs to validate it's data. The fun... |
I have been studying the architecture of the Siamese neural network introduced by Yann LeCun and his colleagues in 1994 for the recognition of signatures ("Signature verification using a Siamese time delay neural network".pdf, NIPS 1994).
I had some problems in understanding the general architecture of this Siamese ne... |
I want to keep trying to get response until its code is 200 or unknown yet. In first case it should be stored in response variable. In another case I should raise any kind of exception.
response = nil
1.times do
response = begin
http.request request
rescue Net::ReadTimeout
puts "Net::ReadTimeout... |
I am currently developing a family of keyed collections, and I wanted to have one which would implement the IBindingList interface.
My BindingKeyedCollection is derived from a KeyedCollection which owns a look-up dictionary, used to make the researches by key.
However, I have suspicions about my implementation of the A... |
I will be implementing MVC model in my program but before that, I have done a simple program based on my understanding of the MVC model.
I have three pages:
The user will enter a value in page one and click the next button.
The value will be printed in page two and a picture will be displayed.
page three is the end of... |
I have a table vanrust_corev2.tblPlayerLog that has approx 6.7k records,
I also have a table in a different database vanrust_forum.tblPlayerAvatars which has approx 6.7k records.
The purpose of this script is to pull the SteamID of players who don't have an avatar stored for them yet. However the issue here is, the exe... |
The repetition is super obvious here. How can I rewrite this code? I need one base method in which I pass a Django model, to call objects.filter, but I can't figure out how to do it.
from profiles.models import BasicInfo, BillingInfo, DocumentInfo
__author__ = 'vol'
class BasicInfoService:
def __init__(self):
... |
I want to code the following scenario:
One Producer: produces n (n=100 here) objects
m Consumers (m = 5 here): consumes k (k = 10 here) objects at a time in a round robin fashion; Consumer 1 first consumes the first 10 objects followed by Consumer 2 consuming another 10 objects and so on. This means that consumer 1 ha... |
How can I optimize this piece of code and avoid the multiple if/else call for returning error message ?
if ($cardStatus == true) {
$cardEmailContent = $this->setCardEmailContent();
$sendUserEmail = $this->sendCardToUser($cardEmailContent);
if ($sendUserEmail) {
$this->sendA... |
I have implemented the Binary Search Tree in Java and would love to get reviews. I would like to have some comments on multi thread implantation.
Note: Corrected Code is in the Answers
package com.atleyvirdee.myDataStructures.tree.binarytree;
import com.atleyvirdee.myDataStructures.tree.ITree;
import com.atleyvirdee.m... |
Is there any way to improve it?
#include <iostream>
#include <windows.h>
#include"MMSystem.h"
#include <conio.h>
#include <fstream>
#include <ctime>
#include <string>
#include <string.h>
using namespace std;
/****************************************************/
/**<Stores Player's Name and Score>*/
struct player
{
... |
I am adjusting Fast Report to create some reports, and I have created a loop that runs through query results stored inside a datatable and assigns each TenantName to a variable. However, the code I wrote seems bulky and would get out of hand if I needed more variables.
Would there be a more sensible way to do this?
If ... |
I have done the supermarket pricing kata in TDD style and I would appreciate it if someone could review it for me.
Kata:
"...checkout that calculates the total price of a number of items. In
a normal supermarket, things are identified using Stock Keeping Units,
or SKUs. In our store, we’ll use individual letters o... |
I have previously attempted to write a object-cache that I use in co-junction with Redis keeping a persistent data-model. Old post can be read here Cached-object Store c# with Redis client for persistent storage
Not focusing on Redis it's the Object-cache that is the important portion, one of the questions i previousl... |
Would it serve much purpose to work at refactoring the latter parts of this code?
// This part is OK
function isScrolledIntoView(elem, trigger_height) {
var docViewTop = $(window).scrollTop();
var docViewBottom = docViewTop + $(window).height();
var elemTop = elem.offset().top;
if (trigger_height == false) {... |
Simple task - deploy war-file from TeamCity agent to remote web-server.
I realized it with Fabric, because of it make readable output, and give opportunity to login via SSH with RSA-key. Also - during deploy - build agent must make some additional steps - create backup, stop-start Tomcat service etc.
URL to deploy to c... |
I'm developing an open source annotation processor for Android (ngAndroid). Part of the library is a small Java subset compiled language that can be used for data binding, events, etc. I plan to extend the functionality of this language but my Tokenizer is getting out of hand.
The Tokenizer parses strings such as getT... |
I wrote some ugly JavaScript that is responsible for sending Ajax requests and update the DOM. I'm using it to show user progress of background jobs.
this.AjaxPoller = {
poll: function() {
setTimeout(this.AjaxPoller.request, 5000);
},
request: function() {
$(".ajax_poller[data-url]").each(function(i, ele... |
I have the following method which under code review gives me a CA1502 avoid excessive complexity error (although if I suppress the message it will build fine):
private void OrderResults()
{
switch (_orderColumn)
{
case 0:
default:
_fitleredResults = _orderDirection.Equals("desc", Str... |
I have a piece of code that generates some tables:
bp_rows: where I take a snapshot of some "headers" for each row of the table.
bp_flussi: where I store a date and an amount only if the amount is not equal to 0.
Flussi can be positive or negative. When this is done, I use different code to populate a table with one ... |
I have this jQuery form with 4 text inputs.
The first one only accepts digits, the second one formats value into 'de-DE' price format accepting 2 decimals, the second does the same but accepts 5 decimals after decimal separator, fourth one automatically adds periods for date input.
$(window).ready(function () {
... |
I tried this problem and I saw that my solutions was way too slow compared to others. I want to know how I can improve time complexity.
A job has been assigned to Jar Jar Binks, it goes as follows: There
are N spaceships parts, each with a weight of Wi kg. Given a weight W,
he has to show how many parts can be use... |
In the past when I needed something like a dropdown menu, it was really easy to toggle the appropriate CSS classes with jQuery.
Here is my first attempt to do the same thing without any dependencies:
// create object containing all .dropdown elements
var dropdown = document.getElementsByClassName("dropdown");
// loop... |
I am using an API that returns a JSON object that has "encoded_polyline" fields that tend to result in errors like this one:
UnicodeEncodeError: 'utf-8' codec can't encode character '\udb6e' in position 2: surrogates not allowed
Since the offending fields don't offer useful data, I decided the best would be to get ri... |
This checks whether it's valid to make a processing. Processing can occur if:
there are files and spreadsheets (spreadsheet is the spec attribute)
there are any files or spreadsheets (it never occurs if there is at least one of the two)
AllFiles is empty only if one has sent a zip, but it wasn't unzipped and has been... |
I have written the following Auction Algorithm implementation in C++ and I am having issues with performance. On my machine a problem size of 500 is solved in about 7 seconds while a similar Matlab version solves the same in about 4-5 seconds. Since C++ should run faster, what are some ways that I can squeeze some more... |
I'm trying to make a program where user will put in his birth date in DD/MM/YYYY form and he will get back amount of seconds between his birth day and 01/01/2015. It counts with fact that different months have different amounts of days and also with leap years. What should be improved or focused on more?
I already foun... |
I have an enum of stock tickers, then from the database I get details for an analysed ticker (stock). In the loop, I compare the details of the analysed ticker to details of the rest of tickers, compute the correlation, then add it to the treeSet.
This is my first time using multithreading and I wanted the method execu... |
I am using JGoodies Looks to change the look and feel of the application I'm currently working on.
I've just created a JMenu with some different themes options for the user to choose.
The thing is, I want to make sure the changes affect the program instantly, on all current windows, so I did this:
@Override
public void... |
At the moment I'm writing a parser and interpreter for a custom scripting language, to learn more about the basic concepts involved and to get more familiar with tools like bison and flex.
The parsing process requires the allocation of a lot of small data structures to store intermediate language symbols and syntax tre... |
There are many instances of prime number sieve implementation both here and other places on the web, but I wanted something a little different. In particular, I wanted to create a static array of the first 1024 prime numbers at compile time as a simple reusable structure. I also wanted to allow for relatively simple ... |
The purpose of the following code is to, given a vector, compute the two accumulators: 1. head-till-nth element, 2. (n+1)th element-till-last (where n, and this is the catch, iterates from 1 till length-of-list, inclusive).
(let [my-list [1 2 3 4 5 4 3 2 6]]
(loop [elem 0]
(when (<= elem (count my-list))
(... |
I have made significant changes in the code and now it takes about 20~40 seconds to process each worksheet. This will conditionally copy column based on the column headers in sheet2 that match to the ones in sheet3.
Here is the main module:
Option Explicit
Public Sub projectionTemplateFormat()
Dim t1 As Double, t... |
I spotted this tutorial example at compactcpp:
#5 – Parsing strings into “tokens”
#include <iostream>
#include <string>
//This program is extremely crude, but it indeed works for its intended purpose.
//There are many other better ways to do this.
int main() {
//Here, we use a std::string to hold our input.
... |
I developed a server which takes a directory name then lists files in it and sends this list to a client. And I want that server to work with Telnet.
It works but I have some questions on how I can do this better:
My client can take some directory names from arguments and sends them to the server in a cycle. Server re... |
In my presentation layer I use an MVC pattern with DI to achieve thin controllers like so:
public class HomeController : Controller
{
private IHomeService _service;
public HomeController(IHomeService service)
: base()
{
_service = service;
}
public override ActionResult Index()
... |
This a basic filter I created with Angular that does temperature conversion. I'd like to get thoughts on how to improve this code from both an Angular and general JS perspective.
The filter should take 2 arguments:
scale: The temperature scale to convert to
label: Whether to append a degree symbol to the number
In th... |
I have a system that will be sending telemetry or events to a DB table and I want to limit how many HTTP connections it opens to my server but at the same time I don't want the events accumulating and sitting on the client machine for too long. For example I could get a burst of events or I could get one event and not... |
I am trying to find out what would be the Big O notation of a quick sort implementation I wrote. If I can get some analysis on the code, that would be great.
public class JavaApplication1 {
public static void main(String args[]) {
int[] input = { 23, 31, 1, 21, 36, 72};
System.out.println("Before sorting : " ... |
I've built a simple dice class utility for rolling dice. It supports weighted rolling, and usage is fairly simple. Here's the code.
from random import choice
class Die(object):
"""
The Die class represents a sided die
with n amount of sides. Sides can be
weighted. For example:
die = Die({
... |
First, the script checks to see if it is installing two kernel module packages or removing them by looking at the first parameter. If no parameter is provided it complains and exits.
If installing, it checks if each of the packages even needs to be installed by looking at the version of the existing module. If they do ... |
I have written Minesweeper in JavaScript. Using OO-Approach.
Cell class describes a cell in the grid.
Cell.t property tells whether the cell is a mine or not.
Cell.count property stores the number of mines in the cell's vicinity.
Cell.state property stores whether the cell is used / unused / flagged.
Grid class provid... |
This code was for a university assignment. It's well passed now so don't be scared of giving me false grades, for example. I was wondering what could be done better, or bits of code that are horribly inefficient or are bad practices.
def main():
import time
while True:
try:
num1 = int(input... |
I made a website last night that allows people to sync HTML5 <video>s (playing/pausing). The way it does this is by using Ajax to run a MySQL query every 2 seconds to check if anyone has paused the video. Depending on the response, it plays/pauses it. If someone plays/pauses the video, it calls a page through Ajax to u... |
The code below was refactored for performance improvements for another user on this site.
Functionality, high level:
Sheet1 - CodeName aIndex: used as the main reference to the structure of the data being processed in 2 other sheets: mapping column headers for incoming data in sheet2, to column headers to be processed... |
I have the following in script in my web app which contains a lot of duplication. How can I cut down on this duplication and generally improve my code?
$('a#newAuthority').on("click", function() {
var $newAuthorityContainer = $(".new-authority-container");
var $row = $('<div />', {
class: 'row'
})... |
Project Euler Problem 61 asks:
Triangle, square, pentagonal, hexagonal, heptagonal, and octagonal numbers are all figurate (polygonal) numbers and are generated by the following formulae:
$$\begin{array}{lll}
\textrm{Triangle} & P_{3,n}=n(n+1)/2 & 1, 3, 6, 10, 15, \ldots\\
\textrm{Square} & P_{4,n}=n^2 & 1, 4, 9,... |
Would really appreciate it if someone could please review my String Calculator TDD KATA.
String Calculator
Create a simple String calculator with a method int Add(string numbers). The method can take 0, 1 or 2 numbers, and will return their sum (for an empty string it will return 0). For example "" or "1" or "1,2".
S... |
This should be really simple. I'm searching for the cleanest & shortest way to add a newline to a non-null String if it is not empty, i.e. myString.isEmpty() is true. I know of a number of ways to do this, but none of them are as elegant as I would like them to.
For context, the string I'm working on will essentially b... |
String Calculator
Create a simple String calculator with a method int Add(string numbers).
The method can take 0, 1 or 2 numbers, and will return their sum (for an empty string it will return 0).
For example "" or "1" or "1,2".
Start with the simplest test case of an empty string and move to 1 and two numbers
Reme... |
Imagine that you have a TreeSet of numbers, and you copy them into an array, but you remove one element of it. You want to know the element removed.
import java.util.Arrays;
import java.util.Set;
import com.google.common.collect.Sets;
public class Question {
private static final Set<Integer> SET = Sets.newTreeSe... |
I've written a directive to validate the width and height of an image in AngularJS. I'm not a JS genius but I get along with it. So I would appreciate some feedback on this directives code if this can be done better in the context of Angular and the JS language itself.
angular.module('app').directive('imageFileValidato... |
I'm trying to figure out how to correctly hover over an image to fade in another image and when you move your mouse out, it would go fade back to the normal image.
$(document).ready(function(){
$('img').hover(
function(){
$(this).stop().fadeOut(function(){
var $temp = $(this).attr('src');
... |
This is the first time I am working on OOJS code and I am a beginner in JS. I think I have pretty much messed it up. I am planning to modularize my code, but with the inclusion of rest calls, I got confused and have messed up my structure. The trouble I am facing is that my success function of Ajax call keeps growing w... |
I have an entity named Program. Program can have a collection of Agreements. I want to add agreement one by one.
The following method takes a programId and an Agreement itself. And then first find the program by id. If program is found, it then finds the agreement from the database. If agreement is found in the databas... |
I want to get the query result that contains all entries from array and some data from the DB.
It's like the array is a DB table and by left join I connect the data that I need.
I've solved this task in a clumsy way and am asking for tips on how to rewrite this solution.
Here is my query:
$subquery = 'Select \'... |
I am new in JS, I am writing some extra filters on the Interface. So extra filter needs to add or update the parameter in the URL.
Option 1. No parameter in existing URL:
url = https://custom.net/
We want to add new parameter in the URL where key issector and value is IndependentConsultingDoctors
Output will be: https:... |
I'm emulating a little bit the .on() from jQuery in an old Mootools version. One of the project requirements is that Mootools can't (shouldn't) be upgraded (using version 1.2.x).
Basically I'm checking the element itself and its two closest ancestors (like .parents() in jQuery).
My working code is:
Element.implement({
... |
I am in the midst of writing a simple job board and I have the URL's filtering and working how I want, everything works - I just want to know if I can improve it, if there are any security concerns, and if it is horribly inefficient.
Take the following URL section - foo.com/in/london/at/google/do/design
I assign each s... |
I've created a small, strongly-typed generic Service Locator object for .NET 3.5.
It supports optional polymorphic service location and keyed services. I am looking for a general review, but especially looking for pointers on best practices I've missed or any awkwardness in the API.
This code can also be found as a pub... |
I am to implement a parallel version of FastICA, so I implemented the serial version of FastICA.
Now this is the architectural diagram of how it is going to parallelize. I just coded a basic thread model of this. But I need to know what I did was correct or wrong regarding inter threads synchronization.
#include <co... |
This is the current iteration of my first model of a Person. The model is populated by a survey application using forms.ModelForm and a SessionWizardView which splits the survey over multiple pages
Would anybody be able to tell me if I am making any obvious mistakes? Any advice or efficiencies are much appreciated. I a... |
I am working with the output from a chemistry instrument, in .xls format.
The output contains up to seven blocks of data corresponding to different types of samples e.g. controls, unknowns, calibrators, etc... Each block is 15 columns by a variable number of rows, ranging from 3 to 15. The first row contains headers, t... |
I have working code here which takes two lists and turns them into a dictionary with the first list being the keys and the second being the values. If the keys exceed the values the value "None" will be assigned to that key.
def createDict(keys, values):
i = 0
dictionary = {}
# go through all the values in... |
I have started my clicker game using angular.js about week ago. I have finished current functionality first night, but still have feeling of misunderstanding some basic approaches.
This is sources root on github. I'm trying to follow angular-code-style.
First of all, I'd like to hear some thoughts about code structure.... |
Go is a board game (it looks like 5-in-a-row and plays like chess) and I tried to program it in Java.
Rules:
Two players take turn placing stones on a board. The goal is to capture teritory. Stones can be captured (removed from game) if they have no unoccupied adjacent tiles horizontaly/verticaly. Adjacent stones (ho... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.