1
vote
0answers
5 views

Simple constructor or factory method (which has the not a short name)?

Sorry for my English Which is better in terms of readability and using? Dimension dimension = Dimension.withRowsColumns(2, 3); // or Dimension dimension = new Dimension(2, 3); May be better to use ...
1
vote
0answers
3 views

Want to read multiple csv file and their path is located in one text file using python

Hello i want to read multiple csv file one by one and path of csv file is stored in text file. i can read single csv file, here is my code import csv with ...
1
vote
0answers
6 views

Refactoring my first python code to learn in deep

I'm beginner for python. Here is my first python demo code. I'm going to re factor this code step by step. any help would be very helpful to learn about python. Code description Batch program to ...
0
votes
0answers
11 views

Counting inversions

I'm trying to implement an inversion counting routine in Scala in a functional way (I don't want to port Java solution) but have real troubles with it. The sorting routine works fine but adding the ...
1
vote
0answers
15 views

Refactor Linq grouping

All of the class here share these same property Country, Total and Date. Total property are integer in some classes and decimal in some classed. The extension method below has a lot of duplication. ...
0
votes
0answers
10 views

Compare Oracle Table with Sql Server Table and Update/Insert

Below is the current code wish used to update/insert records from Oracle view to Sql server table using Dapper. there is not field to check last record updated date in the oracle view so I have added ...
0
votes
0answers
4 views

How to organize a wrapper for a Lua object

In my program I have a table world with many units, each unit has many parameters each with some methods like get and set. I wrote a sample: local world = { units = { unit0 = { ...
0
votes
0answers
15 views

How do I sort an array using my variables? [on hold]

I want to sort the array alphabetically I have no idea where to begin. I supplied all code as you can see my variables. I googled some examples but I dont know which of MY variables to put in to ...
0
votes
0answers
11 views

C++ Array item traded [on hold]

Ok this is a difficult question to google. What I want is once a user enters 10 items in the inventory array I want it to clear the console and tell a story. I tried but it would display the story no ...
0
votes
0answers
13 views

Advice on how to make this better

This is my first program in java. I am wondering if there would be a better way to tackle this. I am only allowed to use one class. It's not quite finished, but I am thinking it doesn't look very ...
3
votes
0answers
28 views

How to improve this permutations program?

I wrote a small program which shows all possible permutations of choosing m integers from the set {1, 2, ..., n}, as follows: def perm(nlist, m): """ Find all possible permutations of ...
1
vote
0answers
9 views

Construct a tree given pre and inorder Or post and inorder - critique request

Ok, code reviewers, I want you to pick my code apart and give me some feedback on how I could make it better or more simple. This code finds a common ancestor for binary search tree. this code ...
2
votes
0answers
12 views

Buffering output on

As per the help, here's what I'm looking for from this post: best practice and practical advice about (what I think is describable as) buffering the output of a function. So I'm working on the third ...
1
vote
0answers
28 views

Java Code Improvement

Just looking for some help reviewing/refactoring. BouncingBalls.java import java.awt.BorderLayout; import java.awt.Dimension; import java.awt.Graphics; import java.awt.Toolkit; import ...
0
votes
2answers
26 views

Conditional concatenation

I want to do a conditional concatenation. My issue is at the end of the for-loop. I have all variables starting with \n for removing this, and I need to strip out each variable. I think there ...

15 30 50 per page