# All Questions

10 views

### Is the sentence Palindrome or Not?

The most problem I see in checking palindromes in the internet is when the user input a palindrome sentence or phrase the program is returning a wrong output. So for me, I tried to optimize palindrome ...
30 views

12 views

### BigInteger Multiplication [on hold]

Hello All I have been working on a big integer class and I have finished addition and subtraction and I now am currently trying to write a working Multiplication function but if I am multiplying a ...
12 views

### Smoother column resize, page reveal animation

I've been working on this site. The designers original inspiration for the column layout came from this site. I've been trying to get the animation as smooth as possible, to match the smoothness of ...
15 views

### Activity-based permission checking

I threw together this Python function to check if a User has a certain Permission. First of all, Permissions have this kind of format: ...
14 views

### Board Evaluator for Bejeweled Clone

I've been prototyping a Match 3 game (Bejeweled clone) because I have an interesting concept for one, and because it is good practice. One key aspect of my version is that the matches must contain ...
33 views

### Read/write to XML using LINQ

This will compile, but I'm thinking that this implementation of read/write is very hard coded and would not be easily adapted to larger situations where large XML documents are being processed or if ...
12 views

### Tic-Tac-Toe game using erlang gen_fsm

I would like to use erlang to create an online, web-based game. I thought it would make sense to start with something easy, so I chose tic-tac-toe (which seems like a popular choice here). I am ...
11 views

### aggregation using Python 3 with Tkinter — not behaving as desired [on hold]

when I fill the entry 'enter new name, get IQ' with the name of the fighter and click button 'test it out!', i want it to access the IQ field from the BaseCitizen object [that was already aggregated ...
61 views

### Becoming the greatest tower builder

I am trying to learn how to write proper code in python, and stumbled upon the following problem. Bob is given a set of building blocks b, and a number ...
288 views

### Winterbash 2014 “Red Shirt” Estimation

Some fellow code reviewers (hi @Janos!) have been inquiring about a SEDE query to allow to check progress of the Red Shirt "hat" progression. Try it here! Background Red Shirt cast 5 ...
10 views

### JavaEE 7 with JPA (Hibernate) and JAX-RS (RestEasy)

below is a working example of code in which you can create car colors and cars using these colors with XML POST messages. And request all cars and colors formatted in XML using a GET message. I am ...
32 views

### Documenting JavaScript code [on hold]

I am in the process of documenting some other JS website functions and am tasked with creating a documentation page that can be used as an example for other members of the organization. Inside my ...
34 views

### Pointer handle with some runtime checking

This is a pointer class of mine that I would like to have reviewed. Right now it only allocates in the stack and has no copy or move operations. ...
127 views

### SQL Server: Select first value if exists, otherwise select default value

Given an instance of SQL Server, imagine there's a table named Configuration, which has three columns: ID, ...
27 views

### Use of Model and View (MVC)

I have an application using c# and MVC5, with RazorEngine. My application manages requests (orders from clients) and I need to show them in tables. To achieve this I have a Controller ...
27 views

### A Cipher with 2 methods for encryption/decryption

I'd like advice on how this could be written more efficiently, idiomatically, or just anything that could be improved upon. I'd also like to know if there's an alternative to my ...
30 views

### Too many conditions in the method

I am new to node.js and I am just wondering what you think about this code. For me, it seems there are too many conditions in the code. Is there any way to refactor it? ...
26 views

### Brands won't appear on the create product form [on hold]

I got an Undefined variable: brands (View: C:\xampp\htdocs\beautyvital1\app\views\products\index.blade.php) on my ProductsController i have the following codes: class ProductsController extends ...
18 views

### What is the right way to structure a data manager class to provide the app data? [on hold]

My task is very simple. I have a table view controller that presents a list of strings that come from a core data object class. I have another view controller that holds a label which I want to ...
39 views

### Constructing a long string

I have a task to construct a long properly formatted string in Java. This string will be then used as a header of the logfile that we write during the program execution. As the program runs on server ...
43 views

### Following the logic of Dijkstra's algorithm [on hold]

My code appears to like traveling 2000 miles to a place 200 miles away: ...
25 views

### Note taking app (saves notes to an array)

I created the following app (only saves the notes in an array so no a proper note taking app). I would like to know how I would make this code more object orientated. JSFiddle script.js: ...
50 views

### Yet another smart pointer implementation for learning

I based this implementation on CountedPtr in The C++ Standard Library book by Nicolai Josuttis (page 222) and also available online here. I know that I can use the C++11 smart pointers but this is a ...
32 views

### Divide certain distinct row values into seperate columns

This might be difficult for me to describe clearly but I will try anyway. Also note that this is entirely speculative; it might not even be able to run any faster (that is why I am asking). This is ...
15 views

### Simulating a GUI windowing system

I was eager to learn the implementation details behind windowing GUI systems. Because I am mostly a high level programmer having no much experience in low-level stuff, I had to simulate it instead of ...
46 views

### Fastest way searching specific files

I got thousands of files with a specific file extension in thousands of sub folders. Now, what is the fastest way to search with a pattern? I tried the method ...
710 views

### Given an array of integers, return all pairs that add up to 100

I was recently given this programming challenge on an interview, and I decided to use javascript to solve it. I did, but I'm not happy with my implementation. I can't help thinking there must be a ...
15 views

### Parallel for loop in Java - follow-up 2

The previous iteration at Parallel for loop in Java 8 - follow-up. The changes are as follows: MyTask is removed. Synchronization removed. Now the user is ...
25 views

### Randomly pick a host from a list, subject to an uptime requirement

I have a POJO as shown below which will have hostname and other attributes. ...
31 views

### Makefile that places object files into an alternate directory (bin/)

I'm trying to learn how to use makefiles, and this is my attempt at making a makefile that compiles source files in a source directory (src/) into object files that are created in a bin directory. ...
46 views

### Rotate image 90 degree clockwise recursively

Previous question: Rotate image 90 degree clockwise In this code I have used tail recursive, which is bad. Time complexity is still $O(N^2)$, which is worse-case. The only good part is memory ...
30 views

### What is a more efficient way of coding this linq query? [on hold]

What I'm trying to do is check if I have a row in the database with a matching date and if I do then update the value and if I don't then insert a new row for that date. I'm getting a null object ...
21 views

### check why my code is not working [on hold]

I wrote this simple code that checks if 2 arrays can be re-arranged to be equal to each other, yet it's not working.. can't find the bug.. help please. ...
41 views

### Validating a Collection of IPv4s

I have a method within a class that validates all proxy addresses are valid on initialization. I've tried to refactor this a bit, but this seems to be the best I can do. Any suggestions and/or tips as ...
64 views

### Cycles of pointers

I'm really inexperienced with cycles, so I want to make this code shorter. As far as I know, I've made a recursive cycle. ...
30 views

...
38 views

### Switching from functional jQuery code to object-oriented

I've been happily using jQuery, creating vars and binding events in my modules (which have only a little bit of JS). But recently I needed to add an anonymous functions to my code and after ...
49 views

### Isprime Android app with kivy

I thought that developing an app in Python should be easier than learning Java. I finally got my isprime app to work but it looks ugly. When I write GUI code I always find myself typing in very long ...
46 views

### Event Subscriber with Parallelism

I am trying to exploit asynchronism for parallelism. This is my first attempt at a parallel event subscriber. In your expert opinions, is this a valid approach? ...
284 views

### Extracting the classpath entries from a jar file's manifest

Sometimes I need to search for dependencies in the classpath entries in the manifest of jar files. A jar manifest with classpaths looks like this: ...
96 views

### Extension method to enumerate a hierarchical object

I have a domain object that I have no control over which itself contains a collection of this same type. This is a classical hierarichal representation like in a tree node hierarchy. I would like to ...
53 views

### Implement stateless strategy pattern with enum being container

I am implementing a framework for validating orders. User creates a number of orders (Amazon orders for example), before he submits the orders and pays for shipment, whenever he revises anything, I ...
40 views

### Trait accessing variables of classes using it

I just tried PHP Traits for the first time, to keep my code DRY : ...
24 views

### Slow Javascript code to get Taxonomy terms from Sharepoint

We have the following code which takes about 5 seconds in a modern computer, however the application is also executed on old PCs with Windows XP, and in there it takes 5 minutes to load. I know the ...
43 views

### PHP login redirect security? [on hold]

I wish to redirect users to the login page if they attempt to visit a page which requires them to be logged in. After logging in, however, I want to redirect the user back to their original ...
507 views

### Shortening boolean with if statement for document version comparison

Can this be shortened to one line? ...
75 views

### Payroll Calculator Homework

I have written the code as best that I know how but I am unsure that the questions asked are being fulfilled. Any advice to improve this code would really help me. Question Asked: Create a new ...