Top new questions this week:
|
The code will move the mouse from a start point (xs, ys) to finish point (xe, ye) like a human would.
I'd like some help possibly shortening the code (by optimizing it) and making it more readable.
...
|
I'm trying to recreate a printer in java,I'm fairly new to programming so I'm using huge if else blocks inside a single function to dictate the logic of the program, I'm noticing this is creating a ...
|
First Class Functions
So, VBA doesn't support functions as first class objects - no passing functions as arguments or storing them in variables.
I eventually found a way to implement function ...
|
I'm trying to brush up on my Python, so I'm going through some simple problems. Big concerns are style, though any algorithmic problems I'm open to suggestions on.
Basically you have an input file ...
|
I couldn't help but notice we didn't have a FizzBuzz in lua yet.
I've always wanted to take a shot at Lua, so here goes nothing.
Code:
function fizzBuzz(maxNum)
local fizz = "Lua"
local buzz = ...
|
This is basically the beginnings of a battleship game. There is only 1 ship which takes up 3 of six locations on a 1 x 6 grid. The locations are created by finding a random location on the grid and ...
|
I'm checking each variable to prevent null exception, but still wondering can this be improve in much simpler and cleaner if you will be writing the same code? Please see the below snippet:
...
|
Greatest hits from previous weeks:
|
NodeData stores all information of the node needed by the AStar
algorithm. This information includes the value of g, h, and f.
However, the value of all 3 variables are dependent on source ...
|
The use case is to convert an array of objects into a hash map where one property is the key and the other property is the value. Common case of using this is converting a "link" object in a ...
|
Can you answer these?
|
I'm developing a document merger that utilizes an FTP site containing hundreds of documents.
FTP Connection Function
private static function establishFTP() {
$ftp_conn = ...
|
I have recently started looking into networking with Python. I saw some tutorials about the socket library so I decided to give a "live chat room" idea a go. It works (on Windows, os.system("cls") may ...
|
Can someone review this code, just have look if it's logically correct
or
If you may point me to a more simple and minimalist program
import java.util.ArrayList;
import java.util.Arrays;
import ...
|