instruction stringlengths 71 95.1k |
|---|
$stmt = $conn->prepare( "SELECT
post_by,
id, post_preview,
post_by_fullname,
post_meta,
total_likes,
total_comments,
total_shares,
post_date,
date_time FROM posts_table WHERE post_by IN( SELECT following FROM followers_table WHERE follower='me') AND post_date<? ORDER BY id DESC LIMIT 10");
My concern is onl... |
I wrote a simple huffman coding algorithm for learning and practice. I just used the technique given on the wikipedia page.
Could you tell me my missing points and mistakes?
Node.java
package ged.gont.bst.huffmancode;
public class Node implements Comparable<Node> {
private char letter;
private int freq;
p... |
I have written two functions that calculate the first n terms of a given order o of Fibonacci sequence, and return the result as a list of ints.
from en.Wikipedia
Extension to negative integers
Using \$F_{n−2} = F_n − F_{n−1}\$, one can extend the Fibonacci
numbers to negative integers. So we get:
… −8, 5, −3, 2, −1... |
Semester is a simple enum class.
data class YearSemester(
val year: Int,
val semester: Semester
) {
constructor(string: String) : this(
string.split("-")[0].toInt(),
Semester.valueOf(string.split("-")[1])
)
}
The point is that I don't want to split the String string twice.
So to say:
da... |
I have programmed a Tic Tac Toe game in JavaFX and would appreciate feedback. Have I gone wrong anywhere?
One issue I found and fixed was that I encountered a "Effectively final" error when I tried to use variables declared outside the lambdas in the lambdas. I resolved it by changing some of them to instance variables... |
I recently posted an externally-evaluating median algorithm
(i.e. not requiring move or copy of elements), and the feedback encouraged me
to develop it further.
One simple suggestion was to handle NaN values, and test using infinities.
It seems reasonable to return NaN if any are present in the input, as
median becomes... |
I want to improve my algorithms and data structures in C++ understanding and also learn how the standard library containers are implemented. This resizing_array is based on the std::vector.
My questions are:
Are there any memory allocation/deallocation errors in this implementation?
Is the design ok? Can it be impr... |
Problem: My application is built upon clean architecture. I want to create a new instance of a class in my lower layer, but the class itself resides in an upper layer. The upper layer can depend on lower layer, but the lower layer can not depend on a upper one.
Why: That's because, AuthorizationService requires new ins... |
I'm migrating to web development and wanted to learn CSS animations better. I was playing Prey last night and realized the "throbber" on the elevator screen would be interesting to reimplement. For anyone not familar with the game, it can be seen briefly here (although that's not required for the review).
Here's the en... |
How can I improve/secure my login script and how to check for any possible injection?
PS. the script must run on multiple platforms, so I need empty arrays for cases such as the Android ones.
UPDATES
mysql structure
php switch cases instead of UNION
user_table:
CREATE TABLE `user_table` (
`user_id` int(11) NOT NULL A... |
I wrote a function that takes an array of 10 integers (from 0 to 9) that returns a string of those numbers as a phone number.
Example:
Kata.CreatePhoneNumber(new int[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 0})
// => returns "(123) 456-7890".
The program is fully working, but I want to make this code shorter and clearer.
class... |
I have developed a program that implements the First Come First Served scheduling algorithm. The total number of processes is read directly from the input standard, and for each process the arrival time and execution time are specified. The average response time is also calculated, the average waiting time and the orde... |
Below is a program where in which I find groupings of anagrams in a given string array. Is there a better way to do it?
public class FindAnagrams {
@SuppressWarnings("unchecked")
public static void main(String[] args) {
String[] a = { "dear", "eard", "happy", "ppyah", "norway", "waynor", "anton", "notan... |
I have implemented a custom split method that replicates the original functionality of the collection's split method in Swift and keep the delimiters (element separator). After a lot of trial and error I think I was able to make it behave properly:
extension Collection {
func splitAndKeep(
maxSplits: Int = ... |
I am building an algorithm to run proximal spectral gradient for research purposes. The code is almost in its finalized step, but the runtime of the code is slow. I hope to seek your professional review to improve my code efficiency.
Below is the code for my algorithm:
from numpy import ones_like,array,diag,trace,ident... |
A lot of Wordle clones get the tile-coloring algorithm wrong: for example,
if the word is BURNT and you guess TOAST, the colors should be ----G (not Y---G)
if the word is MAXIM and you guess MAMMA, the colors should be GGY-- (not GGYYY)
if the word is SWIFT and you guess IIWIS, the colors should be Y-Y-Y (not YYYYY)
... |
I created this Javascript function to manage six simple audio players within a page, so that when one of them is put into play, it shows the pause button, and any other player that was playing previously, shows the play button.
Sometimes the play / pause mechanism gets stuck (although I don't know if it depends on too ... |
I programmed the tic-tac-toe game in Python using object oriented programming and I wanted to share it here to get some feedback
class TicTacToe:
def __init__(self):
self.board = [" "] * 9
self.spacer = "-" * 50
@property
def _select_letter(self):
computer_side = None
player... |
Been learning front-end web development on the side on and off for the past few months. I don't really have any mentors to reach out to to look at my code so I thought I'd see if anyone here was interested in doing a quick code review on my latest HTML/CSS code.
I tried to use semantic tags where possible and I avoided... |
Below is my client code which stream all the customer URLs from a golang grpc server. It takes Request input parameter and streams customer URLs based on matching a particular clientId. In my this code, I am streaming all customer URLs for ClientId 12345 and it works fine.
I am also creating an XML file with all the U... |
I have this Whatsapp bot made using Twilio and persistent with mongodb due to the nature of the logic I am following the code is become more of a cluttered and seems un-pythonic. It works fine as I expected but my problem is I can't figure out a way to make it little bit clean.
from flask import Flask, request
from twi... |
I tried to use Go to write a DelayQueue. I referred to the implementation in Java. So the general logic is to have a minimum heap, then try to fetch the top element of the heap every time, if it is found to have expired, then fetch it, otherwise use cond#wait to suspend the current routine.
One of the biggest problems ... |
This code builds the environment for the standard Mountain Car Problem of reinforcement learning.
I'm using Python 3.9 with PyCharm and I'm wishing to use type annotations throughout. I'm trying to find a good pattern for when there are two or more groups of inheriting classes and objects from one group are referenced ... |
I am currently studying an online course in Haskell and there are no "model examples" of the assignments after finishing them. I'm slowly getting the hang of this, but I'd like some feedback on how could I have written this differently. This piece of code took me a lot of hours to finish, but it works now!
I am especia... |
I have written a function in Java to find minimum vertex cover in a bipartite graph. It is working on all the sample test cases I have used. However, due to lack of implementation and test cases online for this problem, I am not sure if it is correct or not.
Here is core part of the implementation. All the dependencies... |
The task
Given the root of a binary tree, return its maximum depth.
A binary tree's maximum depth is the number of nodes along the longest
path from the root node down to the farthest leaf node.
Example 1:
Input: root = [3,9,20,null,null,15,7] Output: 3
3
/ \
/ \
9 20
/ \
15 7
... |
I've written a small server app which grabs a token from another server, downloads JSON, then downloads files referenced in that JSON, processes them with a CLI Command, then uploads a result (some PDFs) to S3. My main question is in main.rs's thread::spawn(move || loop { block, but I'll come back to that after posting... |
Is there a better way to accomplish this? The function determines the Category for each row based on some conditions. Another set of conditions determines the ChangeGroup for the row. Not all the conditions are written but it more or less gets the point across. The determination for a ChangeGroup is made based on a... |
I've got some code that works as intended, but I have a feeling that it's messy. This code is modifying a wordpress loop and the goal is to check the roles of the current user and show posts of certain categories, based on the user roles.
My working code:
/** Check if the current user is a Student, and if they are, run... |
(See the next iteration.)
I have this pathfinding algorithm:
DirectedGraph.hpp
#ifndef COM_GITHUB_CODERODDE_DIRECTED_GRAPH_HPP
#define COM_GITHUB_CODERODDE_DIRECTED_GRAPH_HPP
#include <cstddef> // for std::size_t
#include <sstream>
#include <stdexcept>
#include <unordered_map>
#include <unordered_set>
namespace com::... |
The use case of an application is there will be two kinds of user. One normal user and another company user. The requirement is
Normal user can follow company and see their posts
A company has multiple types of user. They can be owner(While creating a user account if user selects for company account then the user is ... |
Service class:
package personal.progresscompaninon.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.authority.SimpleGrantedAuthority;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.core.userdeta... |
I created a daemon that creates a fifo file with a default name, then is been blocked waiting for messages on that fifo. When an interactive process writes data to that fifo, the daemon wakes up and writes the received data to a journal file along with the time when it was written.
The question is whether it is conside... |
I have this program for tagging directories and switching between the folders via tags. The front end is written in Bash (version 4.4.23) and the back end in Perl (5.26.1).
Critique request
Since this is my very first Perl program, I would like to hear any comments regarding how to improve it.
Code
ds_script.sh
out_fil... |
I recently wrote this bit of code while trying to convert a 3D surface fitter to a 4D one. The solution works and I didn't want to leave the next guy to grind out the solution so I made the code as clean as I could and posted it. I'm still not super stoked with it though. How could I have made this cleaner?
See Modify ... |
I'm trying to obtain the following S2 from a given S1,
$$
S2(i, j) =
\sum _{k=0} ^i
\sum _{l=0} ^j
S1(k, i-k, j, l)
e^{
-\sqrt{-1} (i-k)^2 (j-l)
}
$$
and I've written the following code using four loops. However, when I increase the parameter N, the computation becomes too slow.
import numpy as np
N=3
S1=np.arange(N... |
I encountered the concurrency-zip project in OSTEP By Remzi Arpaci-Dusseau. So basically, I've built a simple compression program that uses Run-length Encoding, and multi-threading in C. But I couldn't find any correct solution so I think I can use this forum for code review.
Essentially, the idea is based on Producer-... |
I am following a question on a programming challenge website (here's the original reference). What I have is a house (start & endpoint) and some types of trees at their respective location points. Each of these trees produce some fruits that would fall at different distances. My job is to find if the fruits have fallen... |
I created function for calculating fingerprint from a public key
fun calculateFingerprint(publicKey: String): String {
return MessageDigest.getInstance("MD5")
.digest(Base64.decode(publicKey.split(" ")[1]))
.joinToString(separator = ":") { digest -> "%02x".format(digest) }
}
|
I have such a dataframe:
library(tibble)
dat <- tibble::tribble(
~level1,~level2,~level3,~level4,
"Beverages","Water","","",
"Beverages","Coffee","","",
"Beverages","Tea","Black tea","",
"Beverages","Tea","White tea","",
"Beverages","Tea","Green tea","Sencha",
"Beverages","Tea","Green tea","Gyokuro",
"... |
I have a form in Laravel that goes over several templates (Blade files). For each template I am implementing simple conditional logic to show and hide groups of questions.
For the templates, I'm using HTML5 for efficient client-side validation. I wrote the Javascript below to show and hide fields using HTML attributes.... |
This program compiles Brainfuck source code to an x86_64 ELF executable. It doesn't rely on any backend, just raw binary stream to a functional executable.
In the implementation, each cell holds an 8-bit unsigned value with usual wrapping behavior for overflow. The pointer can safely access from cell 0 to 65535, but it... |
Consider the following code. I'm trying to figure out a proper pattern and this is the best I can think of so far. The strange part is the transition from storing "people seen" to "people known". I had to choose an arbitrary metric that once you seen someone too many times (say, 100 times), you should no longer keep... |
I am quite at the beginning of learning Python and decided to start my own little coding project to improve my skills.
The goal of my project is to simulate the past growth of a stock portfolio based on historical stock prices. My code seems to work. However, I am pretty sure that the basic structure of the code is not... |
Below is a C code that generates 1000 random positive integers, for each number we check primality, palindromic property, and the square root of the sum of the digits. The purpose is to find/discover positive integers with interesting/beautiful property such as:
"12345678910987654321 is a prime number"
or
"12321 is a p... |
I want to encode a non-negative integer to ASCII letters and digits.
I wrote below code for that, that works, but which I assume too immature to use in production.
#! /usr/bin/env python3
from string import digits, ascii_letters
def encode(number: int, pool: str) -> str:
"""Encode a non-negative integer as strin... |
get_line(): An alternative implementation of standard C library's getline() function.
Syntax: char *get_line(int fd, int *error_num);
I know that I can declare/define variables anywhere in a function but I don't do that. I use K & R style of declaring/defining all variables at the top of the function. So, please don't ... |
I am joining a new company and I want to make a positive impact in regards to my code.
I was asked to do compare two fuzzy name and return if the name is valid or not.
For this I wrote the following code
import fuzzy from 'fuzzy'
const {driverName, tlcNumber} = input
if (!tlcNumber) {
throw new Error("tlc... |
this assignment was given to me within the job application process (well, really not much infos given):
for our applikation we have to compare very often floating point numbers (double, float). Can you code it?
public static boolean isApproximatelyEqual(double first, double second) { return ...; }
well - that was it ... |
The question is:
Write a C++ program to play a simple number guessing game against a
computer opponent. The rules of the games are as follows:
The computer randomly selects a secret number between 0 and 100.
The user enters a number between 0 and 100 as their secret number.
The computer will then attempt to guess th... |
This was originally posted as a Stack Overflow answer.
Objective
Import all filenames from a folder & change the filename using a mapping table.
Challenge
As described in the original posting, using InStr can give unexpected results when a file name is also a substring of another file name. In order to navigate this, I... |
I'm writing an assistant for the tabletop RPG Pathfinder in Java. I already have a few building blocks and decided to make a small side-project to play around the Command pattern. I know that there are controversies about using them, so I am mostly trying to get the main ideas behind the pattern to introduce undo/redo ... |
This is a follow up to my previous post. I've made a number of improvements to the thread pool and corrected some bugs as well.
The most up to date version of the code is available on my Github.
I have since removed the use of std::binary_semaphore and instead moved to using std::condition_variable_any. I was playing a... |
I made the changes that were suggested to improve the program in the previous version.
I would like to know if there is anything to improve in terms of handling object oriented programming, variable/method names, documentation, things that can be optimized, and so on. (Ignore the artificial intelligence part).
constant... |
I wrote a complex number class using JS for practice.
class Complex {
constructor(real,imag) {
this.real = real;
this.imag = imag;
}
getReal() {
return this.real;
}
getImag() {
return this.imag;
}
setReal(real) {
this.real = real;
}
setIma... |
I am a beginner programmer and this is my first project, a blackjack game with a functioning dealer in python. Any feedback would be appreciated (especially if its about bot improvement).
import random
def make_deck():
rough_deck = []
for suit in range(4):
for rank in range(14):
if rank == ... |
Given two version numbers, version1 and version2, compare them.
Version numbers consist of one or more revisions joined by a dot '.'. Each revision consists of digits and may contain leading zeros. Every revision contains at least one character.
To compare version numbers, compare their revisions in left-to-right order... |
I have followed some advice in the previous iteration, yet even the current version is too slow compared to the Java implementation of the same algorithm. (C++ version with g++ -O3 runs in around 200 milliseconds; the Java version around in 10 milliseconds; both in graphs of the same size and topology properties.)
Path... |
Embedded Google Apps Script
I've written an embedded Google Apps script to advanced search Google drive for files matching search parameters supplied in the hosting spreadsheet.
Link to Google sheets with embedded script : collect_files
The script works as intended - I've tested in a private Google drive and Workspace ... |
This is a follow up to VBEMenuButton Class.
After much trial and error I abandoned the previous approach. I decided that it would be better to create a class to instantiate the menus. When the class is terminated the menus are deleted. This only works when the class is properly terminated. When the VBA Crashes the ... |
For my application, I needed a lightweight way to launch multiple tasks and monitor their completion in a main loop periodically or use callbacks. The main loop is going to be busy most of the time performing analysis after receiving inputs from tasks. I was writing a lot of boilerplate code for asyncio each time and d... |
I have two data frames, df1 and df2 of identical structure. The first three columns, id, form, and instance identify the participant and form(s). The remaining variable columns, var1, var2, and var3, contain analytic data and are largely identical except for a few slight discrepancies.
I have a third data frame, map th... |
This is a code that I just wrote is a simple application of a banking system I would like you all to review it all tell me where could I improve it, please feel free to critique it, but be aware that I'm still a beginner in this :D, please help to learn new things and also I would like to know some other mini-project t... |
Newbie here :) I have been working on a program that reads a pair of numbers from
standard input, along with a mathematical operation and an initial capacity for
storing the numbers; and using this input, the program produces the desired
result.
The example output should simply be a big number that shows the result of ... |
I want to parse a string to an array of object with following those rules:
parse line by line
if line starts with "*" this is a title
if line starts with "\s**" this is a subdivision associated with the previous title
all entries are trimmed and no "*" character should stay
example : {title: "someval", subitems: ["som... |
Okay So I Am Here Implementing the cyclegan architecture with using keras api
from scratch.
For Those who Wanna Know More About Cyclegan seehere
The CycleGan Compose of Two Phase Architecture Like Any Other GAN
Here Is My Implementation Of Both Architecture You Have Just Have To Confirm Both Architecure In Correct F... |
I'm working on a use case in hobby project where I am merging data from an external data source with an internal one and exporting that to a downloadable file
The use case is exposed in an ExportService class through the public method export
class ExportService:
def __init__(self):
self.external_export_gene... |
I need an abstract way to implement this below functionality because in my code I have to use it in multiple places with different REST endpoints. If I ignore it will cause code duplication.
Please suggest a good solution.
This below code is working fine. I need a clean and simple way to write such calls every time I n... |
Introduction
I want to create an Inventory App in C#. I was thinking of someone who sells a few products and only needs to have a few product properties in the program to search or sort by, and then click on ‘sold’ or click on ‘order’. An Excel export is also to be realised.
Today, I wrote my search function. The searc... |
My VBA has become really rusty but I need it for now for some data downloading.
This routine works but I'm certain that over the last 10 (at least) years something quicker/less code has surfaced to do the same thing. Any help appreciated. Please forgive my non-standard casing for VBA.
Public Function GetSymbols() As Va... |
I will post 2 scripts that are doing (supposedly) the same thing. First one is the script i created, second one is the solution from the course.
What would you consider wrong (if anything) with the script that i made? Should i think scripts more like the second one, with functions and so?
My script
import random
print... |
I am trying to make a webpage for uploading an image file and storing the uploaded file on server. There are several features in this implementation:
There is a drag & drop zone on the webpage. You can drag the file to be uploaded to this zone and drop. Also, you can click this zone and select the file to be uploaded.... |
After doing much reading of the PHP docs and trying out other developers' autoloader code, below is what I've come up with for an autoloader. It is working as expected so far. Posting the code here to gather review/feedback from peers. Here are some questions that come to mind -
How can it be improved?
Are there an... |
These functions will open a relative path, read or write to the file, then close. The purpose of these functions is to avoid duplicate code patters for accessing different files that only require one read/write prior to closing. Concerns:
Should the functions log errors? Or conventionally is this a job for the caller?... |
What I'm trying to do
abstract the caching actual cache provider (memory || distributed || ...).
enable a caching diversity. each cached item type has different behavior.
simply add more than one cache provider. and decide what provider to use with each cached record type based on configuration and settings
there are... |
I've created a menu that allows you to display the list when clicking on the menu icon. I wonder whether this can be improved somehow - can anyone help improve this?
Also, initially I created it with the event passed into the script to prevent it from scrolling to the top when clicking on the link. I then changed it to... |
I am fairly new to Python programming language. Most of python programmers have heard the philosophy behind the python programming language. The code should be easy to read, easy to understand, simple, fast. I would like to this post to guide users on how to make codes more 'Pythonic' from examples of my script.
I have... |
Below is some stripped down code from a physics simulation. The classes Vector2, Line and Polygon are probably self explanatory.
I will focus here on the fact that Polygon stores its Vector2 vertices, as well as its Lines. The reason is that the calling code, here just operator<<, benefits from the convenience of simpl... |
In my quest to search or develop the 'perfect' state machine I have built the following class. With the class you can make a state machine object which comes with timing and transition methods. Being an embedded developer who hobbies a lot, this class is compliant to the HAL of the Arduino platform.
My aim was to code ... |
I'm using Postgres 14 and I've written a function (for use with Hasura GraphQL Computed Fields) that transforms a TEXT field, replacing all instances of spoiler-annotated text (e.g. ||spoiler||) with unicode full-block characters (ala classic redaction).
My self-imposed criteria for the function are:
Redacted sections... |
I am a bit new to pygame, and I made this simple pixel art game. Is it possible to simplify, and is it possible to save your drawings and load them back again?
import pygame
from sys import exit
def ConvertPos(pos):
x, y = pos
return x//SQUARE_SIZE, y//SQUARE_SIZE
def DrawGrid():
for x in range(0, WIDTH... |
I wrote a piece of code that generates the next palindromic number and that works fine. However I feel like my code isn't as efficient as it could be. Are there any tweaks that I could implement to make it run more efficiently?
Input format:
4 # No. of Test Cases
800
2133
103
6
Code I have currently:
def reverse(x):
... |
The following code is my answer for exercise 3-3 in K&R:
#include <stdio.h>
#include <ctype.h>
#define MAXLINE 1000 /* maximum output line size */
int my_getline(char s[], int lim);
void expand(char s1[], char s2[]);
/* Exercise 3-3. Write a function expand(s1,s2) that expands shorthand
notations like a-z in ... |
I wrote a function that receives a number as an argument and returns a number (technically, a string) with a maximum of 3 numerals, no matter if there's a decimal separator or not, plus the adequate SI unit. Here some examples for you to understand its logic:
0.1 --> 0.1
42.300099 --> 42.3
1026 --> 1.03k
1200000 --> 1... |
I have an array assuming discrete values. For each value, I am interested in how often it is assumed in a row.
For instance, if my array is [5 5 5 5 5 0 0 4 1 1 5 1 1 1 1 1 3 3 3 3 2 2 5 1 1 1 1 1 1 2 2 5], then I expect as a result the following dictionary:
{
0: [2],
1: [2, 5, 6],
2: [2, 2],
3: [4],
... |
NEW: Download demo files
Not sure what to title this - essentially, inspired by RubberDuck's unit test engine, I've created a way to call private methods of standard modules in VBA. It also lets you pass around modules as though they were objects. So, you can do something like this:
'''Module Foo
Option Private Modu... |
I am making an inventory application and I must create a function that allows me to perform different operations with the arrays that I have created, the application consumes data from an api and processes this data to modify some things, I found a way to do it but I don't consider it the most suitable because I have s... |
I was asked to implement a Vending Machine in a recent interview coding challenge. My attempt at a solution is based on the state pattern.
I would like to get some code reviews on this bearing in mind I would have about 40 minutes to implement this in the interview scenario. When reviewing I would like you to consider ... |
I'm creating a battleship game in Ruby.
Let me explain how it works:
The game is played on 5x5 grids (one per player).
Players have 2 ships each to place on their grid. A small ship (3x1 side) and a large one (4x1 size).
Players are asked in turn to place their ships on their board. A ship can't be placed out of bound... |
I have built a basic app which uses firebase for authentication.
The app is pretty simple.
Sign up the user to firebase using email and password.
Sign in the user
Sign out the user
Also, I have added some code to check if the user is already signed in. If he/she is already signed in, then proceed to the dashboard, ot... |
Highly divisible triangular number, my solution
My solution of challenge from Project Euler takes too much time to execute. Although on lower numbers it works fine. Anyone could look up to my code and give me any advice to improve it?
The content of the task is:
The sequence of triangle numbers is generated by adding ... |
This is possibly a duplicate of Pimpl helper class but that's six years old, and takes a different approach, using std::any instead of std::unique_ptr. This has the advantage of reducing boilerplate at the point of use (at the cost of runtime type-erasure). The only thing that needs to go in the .cpp is
template <> Fwd... |
Please review the manacher algorithm in haskell. Find the longest Palindrome in a String.
module Main where
import qualified Data.Vector as V
import Data.Maybe
import Data.Ord
-- manacher algorithm
-- $ ghci
-- $ :l manacher.hs
-- > manacher "aba"
manacher :: String -> String
manacher arg0 = filter (/= '|') . V.toLis... |
I recently tried to make a tic-tac-toe game with my knowledge. I haven't implemented any fancy algorithms like minimax. I made it entirely with my might. As a result, I haven't been able to beat the computer even once. I was wondering what experts would think of the following implementation of the game. I wish you all ... |
I am a little new in the Pandas and Python framework. I would like to understand if my code is more or less fine or it too related to my old program framework way of thinking.
I have this is the input file "test.csv"
name,A,B,C,D,E,F
x,1,2,3,0,5,6
y,5,5,6,0,4,2
z,2,3,3,0,1,1
2012-01-01,106.20,48.80,41.60,1015.04,211.13... |
Currently I have a wrapper function for the read/write system calls, the purpose of which is to eliminate partial transfer scenarios, by retrying until either all data is transferred or the system call fails in trying to do so.
Includes:
#include <errno.h>
#include <unistd.h>
Code:
int force(ssize_t(*const func)(int, ... |
I looked a little into HTML a year ago but decided to try python yesterday and came up with this for tic-tac-toe. I have no programming experience and I haven't yet looked at other peoples versions of tic-tac-toe as I wanted to see if I could do it myself, there's definitely a lot of ways I could have been more efficie... |
I need to write recursive static method with given 3 parameters
the method will return true if the sub matrix with the size of (int size) which the
left corner is mat[x][x] is the identity matrix
picture for example:
It was part of my exam and I barely got any points,this is what i wrote:
public static boolean isIdent... |
The program offers items, has the user pay for items, 'gives' the items. It seems to work more or less. I have 2 questions:
I don't know how to deduct the cash from cash it is deposited and when they select the item, it should detect the cash from the deposit and give back the rest of the changes
Is there a way to make... |
I have an ArcGIS Arcade script that uses JavaScript syntax.
The script loops through GIS polylines and updates a coordinate.
The coordinate is called an "M" coordinate (aka a "Measure-value"). M coordinates are similar to X and Y coordinates, but are used for specialized linear referencing purposes.
//var geom = Di... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.