instruction stringlengths 71 71.9k |
|---|
I would like to improve the following code:
result = database.execute(script, fetch="0") # (6, 2016) for example
month = str(result[0])
year = str(result[1])
if len(month) == 1:
month = "0" + month
return "%s/%s" % (month, year)
I'm feeling that my code is dumb, and could be more intelligen... |
My script goes through sub folders in my main directory and based on a wildcard checks if a tiff file exists or not, if it exists then the file path is appended to the corresponding list. For example, all the tiff files with "*CRP.tif" wildcard, in all the sub folders, go into CRP_List = []. My current code is partiall... |
In terms of performance, what is the best way to bind mouseover/mouseout event on dynamically created elements?
This is what I have but I'm not sure it is ok for performance:
document.addEventListener('mouseover', (e) => {
if (e.target.getAttribute('data-tooltip')) {
// Show
}
});
document.addEventListe... |
A thought exercise on my part as I'm relatively new to Haskell. I wanted an interesting project to work on so I decided to implement the Hashcash Algorithm, which is most commonly used as the basis of Bitcoin Proof of Work scheme. I am implementing the original specification that utilizes SHA1 and the description of t... |
Using constexpr and preprocessor magic it is possible to cook a struct which have a minimal size between all possible sizes, keeping all the data members properly aligned.
#include <boost/preprocessor/seq/for_each_i.hpp>
#include <boost/preprocessor/repetition/enum.hpp>
#include <utility>
#include <cstddef>
namespac... |
I am filtering out a List<Car> based on the brand. Since each car is made by one brand, I want to make sure my method getCar() is called and just a single car is returned. If it returns more than one car, throw an exception.
This is a simplified example, my current implementation is as follows:
I have a list of cars st... |
I am a Python beginner learning Python 3. I have written two small functions that parse the lsblk output and return Linux physical and logical disks. Here is the first function:
from subprocess import run, PIPE
def physical_drives():
"""
Gets all physical drive names.
Gets all physical drive names on a L... |
I am learning java and would like to create a very simple application but which uses SOLID principles.
The required functionality is: generate the alphabet with a possibility to select specific letters. For now there must be an option to select only even/odd letters but the project must be open for extra functionalitie... |
I wrote a very minimal spreadsheet program in Python with tkinter.
Here I present the help text:
You can use this program to calculate neatly in table format.
SPACES ARE MANDATORY:
5 + B1 = # Is correct
5+B1= # Is wrong
In order to perform the calculation please end the formula with an
eq... |
I am currently working on refactoring two methods that exist in directives into a service.
This is method one:
scope.computeStyle = (component) ->
elementHash = {}
if component.element.type == 'table'
elementHash.height = 600
if component.height?
elementHash.height = component.height * 50
else if c... |
I'm not very familiar with webpack, and I was very afraid that what I implemented for cache busting would break something. What I have seems to work. When I open up the built folder, under pub, I see 3 files:
main.someHashHere.js
index.html
manifest.someOtherHashHere.js
Previously, before I implemented cache-busting,... |
I am using asp.net core entitiy framework. The page displays the customers. The user can add new customers or delete existing ones. I am looking for ways to improve my code.
Here is my cshtml page
@Html.Partial("Index")
@model ecommerce.Models.Users
<h6>Add a new customer</h6>
<form asp-controller="Customer" asp-act... |
This is a simple program that I wrote. It takes a 64-bit unsigned int as input and returns its English name.
#include <iostream>
#include <string>
#include <cmath>
#include <stdint-gcc.h>
using namespace std;
int container[7]; /// every element contains a number between 0 and 999
string conv0to19(... |
Some days ago, in the middle of a flight, in one hour or so, I've written this basic music player using Python3 and PyQt4.
I needed some easy to use music player, so I decided to write this piece of code that just works.
This little guy is called Frederic. It uses, besides PyQt for the GUI, a library called mutagen to ... |
I have written a class to encapsulate pointers for a platform, where the STL is not available. The idea is to have something similar to std::shared_ptr.
However, I don't want to delete the encapsulated object automatically, once the last reference is gone.
Instead, I force the application code to do so by asserting.
te... |
I wanted to create an extension method to enable left outer joins in linq/lambda IQueryables, and I have come up with the following, but I am still not sure it's completely correct.
public static IQueryable<TResult> LeftOuterJoin<TOuter, TInner, TKey, TResult>(
this IQueryable<TOuter> outer,
IQueryable<TInner>... |
In this SO question I provided two answers for the batch conversion of more than 100K txt to xlsx files
I suspect any automation of Excel is too slow, but would appreciate if there is a superior (i.e. faster) approach using powershell.
$files = Get-ChildItem C:\Temp\*.txt
Write "Loading Files..."
$Excel = New-Object ... |
I have a video which I read in a loop frame by frame. For every frame, I want to do temporal kernel filtering, the coefficients of which come from the input variable model (a dictionary). The temporal kernel is an array that has size of 15. So, basically, for every frame we apply this function. The variables scale, cli... |
I'm working on the backend of a community radio station website, and fancied trying my hand at writing a drag and drop scheduler.
It's working, but I feel I've made a mess with the drag and drop maths. What's the best way to handle an elements position in JavaScript?
I've used a combination of offsets from .pageX, .ge... |
Spoilers!!
(duh..)
This code manipulates two HTML number input controls and multiplies them.
I am trying my luck on implementing MVC in JavaScript by example. This is a very minimal and useless code! What I am doing is achievable directly; by listening to the "change" or "input" event number-input fires. And here... |
I am trying to write an algorithm to solve a variation of the N queens problem. There are only 2 queens on an N x N board. I simply need to find the number of solutions, don't need to know what the solutions are.
Below is the code I have so far, and it works fine for N < 100000. However I need to solve it for N > 13045... |
Essentially, we must be able to get from one side of the grid to the opposite side of the grid. My code tests for up to down and left to right.
However, this is painfully slow and I'm wondering if there's some way to optimize it. I think the recursion makes sense, and it seems to be working properly based on some of th... |
Below is my code for generating a random string of random length. I am using it in integration tests. Currently I have almost 2000 tests running each time a commit is made to master and a few of those tests are using this class.
I would like to make sure the code is optimized so that the tests complete as quickly as po... |
This code creates a text file and writes a given number of characters to it. Is this a good method, or is there a faster method?
#include <fstream>
#include <iostream>
std::ofstream file;
int main() {
int size = 10000000; //~10MB
file.open("text_file.txt");
for (int i = 0; i < size; i++) {
file <<... |
I have written some Flex and Bison code for parsing a file.
The following is a simplified example of the input file as well as the code used for parsing.
There are a few things I am not satisfied with:
The way keywords are recognized (Marked with [1] in tokenizer.lex), because the rules also recognize the following wh... |
I implemented a binary search tree with methods of insert, search, size and print using the << operator. All the methods works with template. main is a simple demonstration of the methods and templates working correctly. Please also review the code formatting.
Node.h
#pragma once
#ifndef Node_h
#define Node_h
template... |
Having a look at my code, is there a way to be losing elements?
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
public class Main {
private final static Map<String, Set<String>> data = Maps.newConcurrentMap();
public... |
For practicing/learning object orientation, I made a Card class and am practicing doing stuff with it such as shuffling decks and dealing hands etc...
I have a method that receives a list item which essentially is a hand of 5 cards then tells the user how about the hand such as pairs and three of a kind however it feel... |
I have written a thread-safe list which can be used as a drop-in replacement for a regular list. This has been tested and used internally without issue, but "The absence of evidence is not evidence of absence" so even though I have had no issues with using this, do you folks see anything wrong with the code?
Stepping b... |
Right now i have a WPF application supposed to display some media into a WPF Window, from actions in another WPF Window ( for example : you write text in a textbox, you click on a button, and the text is displayed in a textblock in the second Window ).
It's working even tho it is completely not optimized, and i would l... |
I have the following structure:
{
"name": "Client Name",
"title": "Test Client",
"text": "Client Name : Test Client",
"client_id": "1",
"children": [{
"name": "Customer Name",
"title": "Test Customer",
"text": "Customer Name : Test Customer",
"customer_id": "2",
... |
Inspired by this post I looked up A* on wikipedia and went on with my own implementation as seen below where I try to mimic the pseudocode on Wikipedia but in a recursive manner.
I would like any comment on functional style, recursion, workflow, event handler etc. My idea is to maintain the current state of progress i... |
Anyone following Eric Lippert's blog will know that he has an on going series where he is building a ZMachine in OCaml.
C# 7 is another step forward in adding features normally found in functional languages, native tuple support, pattern matching, local functions, etc., so I decided to port Eric's implementation to sta... |
This is my first attempt at multithreading in C#. This entire program does several things with prime numbers, but the part I'm going to post is mainly focused with printing out all prime numbers starting at a high number all the way until it reaches 1. This was not originally intended to be a multi-threaded program, bu... |
The purpose of the ChunkBuffer code below is to designate a "chunk" from a given input file and to loop that chunk (if needed).
Its operation is similar to the following pseudocode, with the important difference that the real code uses a heap-allocated buffer for performance:
chunk c;
chunk_init(&c, input_file, begin_... |
I'm trying to create a logical and scalable many to many relationship data structure in Firebase. A user can authenticate with Facebook/Google, upload 3 photos, and a video. Users can also "star" another user's profile.
I've created the following JSON schema, but I'm struggling with keeping flexibility with photos and ... |
For a special writing and/or worldbuilding project I have, I created a special program.
In the story, different factions have different ideas on what should be considered the first year of their calendar system. For the sake of simplicity, the years are equally long, but the "first year" declarations are different.
Thi... |
This code is an excerpt from an infinite platformer I'm working on for fun.
It belongs to the class GameObject from which every object i.e platforms, player, collectables extends and it primarily handles collision and movement.
On each game tick, the collision function is called. It grabs a list of all the GameObjects ... |
This block of code is one of my first C header files I have made; it's ported from a Python program I made a few months ago for a project.
I was just looking for advice on how to increase the efficiency of the program. I tried to make everything as efficient as possible, but am I missing anything? Also, any suggestions... |
This code is very, very simple, but I was wondering how it could be improved:
#include <iostream>
int main() {
std::string input;
std::getline(std::cin, input);
for(int i = 1; i <= input.length(); i++){
std::cout << input[input.length() - i];
}
std::cout << '\n';
return 0;
}
This cod... |
I have an algorithm which generates some cars (quote unquote) and displays them using Graphics. I would like to know if my code is using Random correctly, and if it has any memory leaks. Or if there is anything I did wrong and I should improve.
using System;
using System.Collections.Generic;
using System.ComponentModel... |
I'm making some small REST API, which I have never done before. I've got some basic stuff working.
Now my job is to add new entities to this, but all my work is reduced to copy-pasting code I have written before with changed schema and entity name.
Can I make it more "generic"? Also it's my first haskell program, pleas... |
I have created my first project on the github. It is Redis client protocol implementation (request-responce part only). I would like to make my sources more Kotlin style. Please, check my sources and give me some advices.
KRedis. Redis protocol implementation by Kotlin
Reply.kt
package redis.protocol.reply
import java... |
Based on this Code Review answer, I have created a noughts and crosses game in Python, which asks for an index (1 to 9) and updates the grid, and displays it on the screen. I have done some very untidy programming in places, and would please like some help on how to make it more readable, and avoid repeating statements... |
I have made a Python program that can perform some prime number functions. For example, it can produce an endless output of sequential primes. I am looking for ways to make it faster and cleaner. When I was making it, I had a huge amount of trouble using generators, I don't know why, and what the problems were, because... |
I am beginner and I want some tips on this code i have written. How can i make it better, shorter cleaner. And the isMobile() Function is borrowed from the internet. It's a Weather App That gets Data from a Weather API and shows it on a Page. You can see a live demo here.
// Getting Location of Mobile Client using G... |
For a function to determine which element has been removed from a shuffled array, I came up with:
def finder(arr1, arr2):
l = len(arr1) - 1
result = list(arr1)
for i in range(l):
current = arr1[i]
if current in arr2:
result.remove(current)
arr2.remove(current)
return result[0]
In the solut... |
I have the following function that takes out the rotation values from a css string and returns them as an array.
var extractRotationValues = function(code) {
var getAllIndexes = function(arr, val) {
var indexes = [],
i = -1;
//To understand the second parameter of indexOf function
//have a look at... |
I've two snippets below, the first one output all the keys of a piano and the second one give me a scale when given a starting note. For those who don't know how a piano is structured here is an image of a piano.
Basically I want to put each notes, in an ordered array. As you can see the black notes have two names, one... |
I have this plain JavaScript library for typesetting pseudocode in HTML documents. (See the documentation for details.) (See the GitHub repository - broken as of now.)
Source code
algotype.js
//// ////////////////////////////////////////////////////// ////
// Algotype.js, version 1.6 by Rodion "(code)rodde" Efremov /... |
I have a linq query that combines three tables:
Users,
Products, and
User_Has_Products
I am retrieving the
user.name,
product.name,
user_has_product.quantity, and
user_has_product.time
_
ViewBag.User_Has_Products = (from user_products in _context.Users_Has_Products
join user in _context.Users on user_produ... |
I'm updating a solution that I wrote a while ago. I've got a WinForm that does Update/Insert/Delete on a particular database table.
I've got all of the database access code in the form. Is this bad practise? On the one hand, I know you should separate presentation and data access. Also, it would make unit testing easie... |
I've been learning java for over a year and I'm looking for better ways to learn and I'm trying to get a better idea of where I am as a programmer. I honestly have no clue if my code is good or bad. I'd really appreciate it if you could have a look at my code and point out anything that's wrong with it. The calculator ... |
A Wilson prime is a prime number p such that p² divides (p−1)!+1. The first three Wilson Primes are 5, 13 and 563 and the fourth is larger than \$2×10^{13}\$. I was curious as to how much memory/processing power it would take to calculate the Wilson Primes using a brute force type method.
When I was coding this I kept ... |
Goal:
I am attempting to create a script that would automatically establish a PSSession to a Windows server for implicit remoting.
Problem:
Export-PSSession : Proxy creation has been skipped for the '%' command, because Windows PowerShell could not verify the safety of the command name.
At Z:Somewhere\aScript.ps1:12 ch... |
The affine cipher is a simple mathematical substitution cipher. If you're interested in the details behind how it works, this page goes further into detail.
After writing a program to encrypt and decrypt text using the affine cipher, I felt that it seemed needlessly cluttered. I have also noticed that there are no ques... |
I'm try to get the public IP address from my FreeBSD machine and use it for the rest of my code.
Is this implementation good? Can it be optimized more? Can you see some gaps here? Something that maybe sometimes will throw an error?
GET.CPP
char g_szPublicIP[16] = "0";
char g_szInternalIP[16] = "0";
bool GetIPI... |
I am looking for some review of a Minesweeper game that I made as my first JavaScript program. What I have here is simply the prototype for the minesweeper game while I handle the actual grid in a separate section, and I could care less about that. I'm just looking for a few pointers in the right direction in case I am... |
I'm relatively new to react and attempted to create a simple Tic-Tac-Toe game. Would be great if i could get some feedback on this. Again, at this point using only React (no Redux).
main.js - main file which adds our App component to the DOM
import React from 'react';
import ReactDOM from 'react-dom';
import App from '... |
I would appreciate feedback on the linked list implementation and usage below for question 2.6 from Cracking the coding interview book.
struct Node {
char value;
shared_ptr<Node> next;
Node(char v) : value(v) {};
};
shared_ptr<Node> head;
void createSampleList(string str)
{
auto ptr = head;
for (c... |
I have made a beginner program using C that uses file handling and formats the given file. Formatting includes removing trailing blank spaces, replacing one or more blanks by a single blank and also wrapping lines.
It would be extremely helpful if you could point out the mistakes I have made and also if I add any othe... |
I created this using C++ and this gives the largest prime factor of a number.But my problem is if I try to find the largest prime factor of a very large number (12 digit number) it gives an error or it doesn't give an answer. I'm new to programming so please be kind enough to help :)
#include <iostream>
#include <cmath... |
I use the following code in Javascript to get the difference between two Date objects. I want the result to return the difference in:
seconds if the result is less than 60 secs
minutes if the result is less than 60 mins
hours if the result is less than 24 hours
days otherwise
The code is very long and I see lots of c... |
I have implemented insertion sort using C++. Is there any way to improve my code and is it CppCoreGuideline compliant? As I passed the vector as const in print method, do I need to specify const in range for loop?
/*
* Insertion Sort
*/
#include <iostream>
#include <vector>
void insertionSort(std::vector<int> &v);... |
I have implemented the Repository pattern in my Web APi 2 + Entity Framework 6.1 + Angular 1.4 SPA site. The application allows management of a martial arts club. One of its functionalities is to allow to handle belt promotions. This involves some validations i.e. You can't add a promotion to a higher belt with a date ... |
This is pretty much the first actual (not "hello world") program I'm writing. It's a rewrite of this app and my aim was to increase the fetch speed, and increase the cache storage efficency. I've more or less done this through multiple simultaneous fetches and stripping and compressing the game data.
document.getElemen... |
Hint: This question is a follow-up to my Code Review question from 09.01.2017: Class sort with BubbleSort algorithm
After been showed Mergesort and QuickSort as pseudo-code this week in lecture
I had to re-implement my class Sort (which formerly used the BubbleSort algorithm).
So that it now uses QuickSort as the sor... |
I have a 2-player game of Battleship written in Python, but I've reused a lot of code for the second player's decisions (particularly in the play_game function). I'm not sure if my question is specific enough for this website, but if so would appreciate some guidance on how this redundancy could be minimised.
__author_... |
I am writing an advection-diffusion solver in Python. I am quite experienced in MATLAB and, therefore, the code implementation looks very close to possible implementation in MATLAB. I implemented the same code in MATLAB and execution time there is much faster. AS you may note, I am also (as in MATLAB) trying to use JIT... |
I have a structure, and have come up with 3 different 3D arrays to store it in. The thing is, optimization is not my specialty and I need advice from someone who knows their stuff regarding best ways to store and access multi dimensional arrays of structures. I need to know if any of these methods are better in terms o... |
I'm building a rudimentary web server in Rebol 2. I'm trying in particular to understand the flow and logic behind the asynchronous aspects of the TCP scheme.
As far as I can understand it, you create a listening port, place it on the wait list. As requests come in, clones of the listening port is created which are the... |
I'm working on a game for the Atari VCS and have been dusting off my 30+ year old skills in writing MOS 6502 assembly language.
The VCS runs at 1.19 MHz and is based on a MOS 6507 chip with some custom logic and 128 bytes only of RAM.
Outline of Problem
The game needs to display a value as 3 ASCII digits, but I'm worki... |
Inspired by this question (link to original video), I decided to write some code in C to perform this task, and it is much faster than the Python code, even when run with PyPY, up to a billion, it takes just 700 seconds.
For \$10^8\$ (a hundred million) it takes 62 seconds, while Python with pypy about 5 minutes!
Task
... |
For this task, you're going to play a dice game, but first you must
prepare for an overwhelming victory. The game itself is very simple.
Both players roll a single die and whoever rolls highest scores a
point. (On a tie, both players must reroll until someone scores.)
These aren't standard dice however. Each pla... |
I quickly wrote a short program to split a string into \$n\$ lengths with variable-character padding:
#include <iostream>
#include <algorithm>
std::string getString();
int getBlockSize();
char getPaddingChar();
std::string addPadding(std::string str, int blockSize, char paddingChar);
std::string tokenize(std::string s... |
I'm new to Python and curious what looks good and what doesn't. The function I have defined looks for pairs in a list of integers and tells the user whether or not any possible pair equals the target number. How can this code be more efficient or fast?
import datetime
from itertools import combinations
def csop(*param... |
Source: careercup.com
You are given an array of integers(with all valid input) You have to
write a function which will produce another array, where the value in
each index of the array will be the product of all values in the given
array exccept that index.
Example
Array 1: 1 2 3 4 5
Array 2: 120 60 40 30 24
Co... |
The #traverse_until method is a helper function that traverses the linked list and returns the node and index of the node once a condition (in a block) is met or until the end of the list. I would greatly appreciate feedback about verbosity, efficiency, readability, etc.
module DataStructures
class Node
attr_acc... |
I'm implementing Dijkstra's algorithm with a priority queue for a game I'm developing in Unity with C#. I was a bit disappointed with the performance, so I decided to port the code to C++ and see if the performance was related to the language or the algorithm itself. The path finding searches through a 3D grid and sele... |
I am implementing an ODE solver, where the user provides rates and coefficients as a string. ODE solver has to work with vectors. The best implementation I got so far is the following:
# k_1 = dt*dcdt(C0, dt);
# k_2 = dt*dcdt(C0+0.5*k_1, dt);
# k_3 = dt*dcdt(C0+0.5*k_2, dt);
# k_4 = dt*dcdt(C0+k_3, dt);
# C_new = C0 +... |
Problem
Your friend John uses a lot of emoticons when you talk to him on
Messenger. In addition to being a person who likes to express himself
through emoticons, he hates unbalanced parenthesis so much that it
makes him go :(
Sometimes he puts emoticons within parentheses, and you find it hard
to tell if a par... |
I worked on cmms project .
I have some scheduling , esch of schedule have some triggers (e.g,. Bymeter , byActivity ,ByPeriod).
I wrote some methods to generate workOrder for each Schedule if schedule is ok.
public async Task<IEnumerable<TodayScheduleTaskViewModel>> GetTodayTasks(int page, int recordsPerPage = 50)
... |
Should I be using std::move or copy when passing LNode in the LinkedList constructor instead of passing by reference?
template <typename T>
struct LNode {
T data;
shared_ptr<LNode<T>> next;
LNode(T p_data) : data(p_data) {}
LNode() {}
};
template <typename T>
class LinkedList {
public:
LinkedList(... |
I have an employee table, employees may have multiple peripherals. I want to bring back all employees that have a peripheral of type 1 or 2, but that don't have any others, and vice versa (i.e. have a peripheral of type other than 1 or 2 but not have any peripherals of 1 or 2). For each of these employees, there should... |
I made a small script to read text file that contain hexadecimal and convert to another file in decimal by using command-line as a filename input.
#this is content from hex.txt
0x5B03FA01
0x42018360
0x9FF943B3
and this is what I expected my python to deliver output
#this is content from hex_1.txt
1526987265
1107395424... |
I tried to implement round robin in java please check and help me to
improve it Thanks:
package trial.java;
import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
public class Roundrobin1 {
//common interval for all process.
static int commonInt=3;
//to store a list ... |
I'm trying to incorporate the advice found in https://docs.python.org/3.5/library/heapq.html in order to make a priority queue implementation (see corresponding section) in a class priorityQ. Not going to reinvent the wheel so i use the the python's heapq implementation
class priorityQ():
import heapq
import it... |
I am trying to write fast/optimal code to vectorize the product of an array of complex numbers. In simple C this would be:
#include <complex.h>
complex float f(complex float x[], int n ) {
complex float p = 1.0;
for (int i = 0; i < n; i++)
p *= x[i];
return p;
}
However, gcc can't vectorize this and my targ... |
There is standalone WCF webservice, which is providing methods to interact with legacy ERP system.
This system exposes an API, which allow programmer to interact with it.
The problem is that, for legacy reasons, every call to API function has to come from the same thread. As we know, WCF webservice is multi-thread, so... |
This is a followup question from this question of mine. I used the suggested function provided by an answer in my current code. 'model' is a dictionary loaded from the pickle file. 'loadpickle' and findScale are helper functions. So, I load the model, and other variables and read the moviepy frame by frame. The moviepy... |
Long story short a user can have things in common with another user, but I don't what to show more than 4 main categories in common, only the first 4, the priority is the order in which the lists are added.
Below is my current approach, but I feel that this can be simplified, and maybe improve the time.
Any thoughts?
v... |
I am trying to perfect my string splitter's performance, to be more fast, more easy to maintain if someone else reads it and more readable code-wise.
Context ,Scope and Objectives
Where I work we use a sort of "configuration files" to calculate some data warehouse databases.
For example, if you wanted to config a file ... |
Please review my code, for performance and readability.
3 issues I am facing are
Uncaught Exception : out of memory (in firefox)
randomly Failed to load resource: The request timed out.
Even if the json data is pulled instantly looks like seInterval is adding lag to display the result both in tabular data display or ... |
Today was my first day working with JavaScript and I tried to implement some Linq-like (C#) functions as extension methods.
I'm pretty new to JavaScript and wanted to ask you for checking my functions and tell me, whether they're good and really usable in productive applications. Or maybe, what I could do better. I don... |
I have some buttons on an Excel report. 2 in particular are for posting all Budget numbers to the report and posting the Actual numbers. I currently have 2 separate subs, one assigned to each button.
Public Sub PostAllActual()
Dim sheet As Worksheet
Dim rFind As Range
For Each sheet In ActiveWorkbook.Worksheets ... |
This is part of a SDK for interacting with Communicator's SOAP api.
The aim is that the user will not have to interact with SOAP (some people complain about it).
Please note that the wired capitalisation on some properties are intentional and are required for correct conversion to a SOAP request.
I would especially lik... |
I had an interview question awhile back that went more or less as follows:
You have a sorted array of integers representing the ages of every person living on earth. There's a single entry in the array representing the current age (in years) of every individual. For example, if there were 100 million people of age 20, ... |
I am relatively new at using PHP, and I am looking for experienced PHP/HTML users to have a look at my script and offer up any advice on what could have been done better or info on any discovered errors.
<!DOCTYPE HTML>
<html lang="en">
<head><meta charset="UTF-8">
<title>Registration</title>
</head>
<body>
<?php
$pa... |
My __main__.py file has a function's flow, based on methods of each class instance, which each one has its own methods and attributes, like this:
from xlrd import open_workbook
from pprint import pprint
from rubrica_manager import RubricaManager
... |
I've created the following node module to define my model. Is this a reasonable approach?
Model.js:
var dynamoose = require('dynamoose');
var product = dynamoose.model('Product', { id: Number, name: String });
var giftCard = dynamoose.model('GiftCard', { id: Number, name: String });
exports.product = product;
exports... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.