-1
votes
0answers
4 views
How to convert normal http requests to simultaneous http request in PHP with cURL [on hold]
I want to convert following code to simultaneous http request using PHP and cURL
...
0
votes
0answers
10 views
Controlling motors using USB serial connection from Raspberry Pi to Arduino
I am working on building an RC car/robot with Raspberry Pi and Arduino. I connected Arduino to Raspberry Pi using USB and send serial commands with python. I haven't done much programming with ...
0
votes
0answers
3 views
Set a font for a UITextView if the font is nil or not equal to desired font
Main question
I am setting a font for a UITextView that is a subview in a custom view. I only set it if the user didn't specify the font size in the Interface Builder.
I have the following working ...
-1
votes
0answers
14 views
Find fewest number of coins to represent value in C [on hold]
I know this has been asked a bunch but I'm encountering a bug in my program and, while I think I know why, I don't know how to solve it. Here's the program
...
4
votes
2answers
142 views
Guess a random number between 1 and 100
I want some recommendations or something I could add to the game. Please tell me what I could do better or what I did wrong. I made this during the time I learned Python.
...
3
votes
0answers
16 views
Animating a 2D particle “web”
I have written a small class to generate and animate one of those trendy particle webs. I plan to use this as the main background of my personal website, so naturally I'm concerned about the ...
6
votes
2answers
140 views
Text based fight game
I learned code about a week ago and I wanna hear some recommendations and stuff I could add to my code. This is a fight system I made for my text based game. Please tell me what I could do better.
...
4
votes
2answers
20 views
Arithmetic addition and subtraction calculator even for extremely big numbers
Here is an attempt to sum even extremely very large numbers. As the extremely bigger numbers are fed to the method as String type this became possible. This method can accept even negative numbers ...
3
votes
0answers
24 views
Listing Books nicely - a tour through a webapp
In this exercise, I do not want to use any container such as Spring or Glassfish. I am deploying my application to Tomcat. I only use JPA. What I want to achieve is to follow best practices and OOP ...
-1
votes
0answers
11 views
Java check diagonals duplicate in array 2d [on hold]
I can show diagonal numbers but I don't have idea how to check in diagonals are the same numbers
Thanks.
...
0
votes
1answer
32 views
2D Histogram class
I scraped some data looking at trajectories of popular posts on Reddit, and now I want to group and histogram them by type. I put this class together in C++ to do so. Characteristics of the data are ...
2
votes
0answers
12 views
A minimal version control system
I just finished writing a simple version control. You register files using "add", and then "com" will save them inside a directory, with an ID attached to it, same ID for all files. With "rev" it will ...
1
vote
0answers
13 views
Scheduled adjustable payments
Short Description:
I'm working on a "small" project for our finance department. The problem I'm having is managing this large function (at the bottom). It's so large because I'm having troubles ...
2
votes
2answers
35 views
Unique dictionary values - print keys
I'm working on this code for exam in an MIT Python course. It's working but I'm trying to improve it. What could I do, and what should I avoid?
...
3
votes
0answers
34 views
Filtering JPA search results for comment threads by votes
I've concerns about the code below because I'm getting a lot of unnecessary data from my DB and I delete it afterward to only have the "good" data. I didn't find any good workaround to get the data ...
1
vote
0answers
25 views
Bottom up mergesort - singly linked list
I have written the following program in GO to mergesort a singly linked list. It does bottom up merge sort and hence does not have to find the mid of the linked list. Please review the algorithm and ...
2
votes
2answers
34 views
Merging two XMLs together in Python
I have these two XMLs that I want to merge together based on these conditions:
If any of the element is more than 7 weeks old, it has to be deleted.
If any of the element is newer with the same date ...
2
votes
1answer
22 views
Insertion sort in ruby
The code is correct, passes all testcases, I am looking for input on cleaning it, readability etc
...
6
votes
1answer
232 views
Data Access Layer
This code review request is regarding data access layer coding. I have used the method I am about to describe in a few smaller applications, but I am noticing limitations that I would like to avoid in ...
-5
votes
0answers
15 views
6
votes
0answers
26 views
Game of Life with customizable rules (i.e. not just Conway's)
This is a simple Game of Life implementation, with one neat gimmick: You can specify the rules that the simulator uses to decide whether cells should live or die. Congrats, God!
I'd especially like ...
-2
votes
0answers
13 views
Allow VBA code inside protected worksheet [on hold]
I recorded the below VBA code that hide/unhide rows then sort on worksheet_Activate event, in no time :). Just one thing, the worksheet is required to be protected and this code refuse to be executed ...
1
vote
1answer
19 views
-3
votes
0answers
18 views
AES 128 - C# vs Oracle [on hold]
Im trying to encode a string with C# and getting the same result while encoding in Oracle select. Using AES 128 / Pad Zeros / CBC
I cannot get the same results, and I have been working on this and ...
3
votes
2answers
21 views
Extracting and normalizing URLs in an HTML document
I have written code to get all urls on a webpage & put them in a set, and would like tips on simple changes I can make to increase its performance.
...
4
votes
2answers
51 views
2
votes
1answer
20 views
ActionGroupContext to know an id of the current context
My services(or services that depend on services) need to know about a current action group id. To add an extra optional parameter to each service for the id was an idea but in my current environment ...
-2
votes
0answers
22 views
Selecting multiple input in Java JOptionPane.showInputDialog? [on hold]
Hi I'm curious on how to change my code to allow it to take multiple inputs.
...
-1
votes
0answers
12 views
Asynctask should called after crating tabs [on hold]
I am using tabhost with asyncktask ..my condition is tabhost should update after post execute of asyncktask
I had written code something like this
...
7
votes
2answers
42 views
Check if all leaves are at same level in a binary tree
I have written this code for checking whether all leaves are in the same level or not, in a binary tree. Any suggestion or improvement is appreciate.
...
3
votes
1answer
29 views
Hide and un-hide rows then sort on Worksheet_Activate event
We used this VBA code mainly to hide blank rows and unhide non-blank rows. After that, the second code sorts the rows by a defined column value once the worksheet activates. This process takes too ...
-2
votes
0answers
16 views
Method Scope - am I getting it right? [on hold]
I'm working on a hospital admin project, the aim of which is to print out to the console the names of patients with unpaid fees greater than a specified amount. I have the following class:
...
-1
votes
1answer
76 views
Performance comparision of SQL queries versus LINQ in Visual Studio 2012
I am new to VS 2012 and need to use it with SQL Server. I need to get data from a table in SQL Server 2012 with 500 rows and 15 columns and process the data in it and update another table. All this ...
-3
votes
0answers
37 views
Get Max occurence of element in Linq [on hold]
I have 2 classes; for this example I will name them A and B. A is a list and every A element has a list of B element. B element have a type. I want to get a B element by occurrence of it in my list of ...
4
votes
1answer
45 views
Generalized Missionaries and Cannibals in Java
I was in the mood for some basic AI, and decided to code up an algorithm for solving "\$M\$ missionaries, \$C\$ cannibals in the boat with \$B\$ places" -algorithm:
Demo.java:
...
5
votes
0answers
33 views
Dynamic data object generation
Last weekend I had an idea: Why not remove dozens of classes by removing all the basic get/set/equals/hashCode implementation of my data object interfaces? I tend to code against interfaces, so I ...
0
votes
1answer
23 views
JUnit test case to check that an exception of type javax.mail.MessagingException is not thrown
I have a method which will send a text mail using JavaMail API and I am trying to write a test case for this method which will check if an Exception of type ...
1
vote
1answer
44 views
Thread pool implementation in Java
I am studying multi-threading and have tried to implement a thread pool. Please provide feedback, mostly from multi-threading point of view. I have implemented two pools, one for adding tasks in queue ...
1
vote
0answers
41 views
Simple PHP session handler class (using MySQL for session data storage)
I have tried to write a small light weighted php session handling class that use PHP's session_set_save_handler() function to overwrite the default session handling ...
-2
votes
0answers
34 views
Codechef “Gravity Guy” challenge
This is my solution to https://www.codechef.com/AUG15/problems/GRGUY but I'm getting the time limit exceeded error. I'm only 14 so please help me understand.
I used Scanner first but got the same ...
3
votes
2answers
51 views
6
votes
1answer
48 views
Finding the count of negative sub-arrays for a given array
I want to improve my implementation for the following problem:
You are given an array of n integers. A sub-array is "Negative" if sum of all the integers in ...
6
votes
0answers
32 views
Sending an SMS message in C
Recently I've been fiddling with the idea of sending a text message using C. Looking at a few options, I thought that using libcurl to send an SMTP email using TLS for some security would be the best ...
-4
votes
1answer
24 views
Turn-based game memory optimization [on hold]
I was wondering whether it's a good idea to keep making focusedPlayer at every iteration of the while loop or to declare it ...
3
votes
1answer
44 views
Switch statement for adding/removing operands to the text part of a label
I have a switch statement with five cases, and four of them are really similar to the others. How could I properly refactor this code to eliminate the duplication of code?
...
5
votes
1answer
242 views
Multithreaded client server socket
I have created this library mostly for a learning experience with sockets and threading.
For this review, focus on socket/threading. Let me know if I properly implemented both. If you want to comment ...
6
votes
2answers
61 views
Algebraic calculator
I started with my own implementation of an algebraic calculator but ran into issues very early into the process. Then, I implemented the algorithm here. Please provide some inputs on areas where I can ...
1
vote
0answers
31 views
Game server in Java querying MongoDB for JSON
I was hoping someone would have a look at how I retrieve the questions from the db, parse the JSON and process the results - possibly advise how I could improve efficiency by streamlining my code. I ...
4
votes
2answers
126 views
Removing a subview with a subview from a UIView without memory leaks
I made a custom UITextView for vertical Mongolian writing. It is made by subclassing UIView, which has a subview called ...
-3
votes
0answers
30 views
Dijkstra from closest node to me, to the closest node to the player [on hold]
I have written this code that does what the title suggests, I've never written a path-finding algorithm, so I don't know if my code is correct, so before testing it I'd like to correct the things that ...