ExpiryDates has two properties PSL_ExpiryDate and MNL_ExpiryDate of type nullable date. I am trying to compare two objects for having same or different values.
Is there a cleaner way to do the same as the code below?
private bool SameValues(ExpiryDates ExpiryDates1, ExpiryDates ExpiryDates2)
...
But my colleague asked me to help him write some questions and I kinda got a little mad cause hems already interviewed people without basically any structure
*He's
Hey hey
They all sounded alright
I didn't get to look at their resumes and LinkedIn was unhelpful as usual
This is a great little plugin- a WooCommerce shopping cart. Only a few minor changes are needed to make it great.
I have made some attempt on this- but not gotten far. All it should need is some minor PHP & css changes.
The author has given his permission to work on this so please contribute.
...
I am working on a jQuery ratings function that uses the Foundation range slider. My current implementation works correctly on 2 of 7 of my range sliders. However, I am quickly realising that my implementation will become bloated as I have to repeat myself for each of the 7 range sliders.
HTML:
<
Straight copy paste, and the article I copied the brief off had a different first name spelling Andrei instead of Andrey, they both apply but the second is what Wikipedia had
I like Markov chains. Last time I used one, I made one that generates words. This time, I made one that generates sentences, given a set of words and valid connections. This time, it's not weighted and it's reading from a JSON file, so the code is a bit simpler:
require 'json'
data = JSON[ARGV[...
Given two strings with the same length, we check how many chars on the same positions are different. For example: ABCD and ABBD should return 1. Here is a link to a gist with tests, to have a better understanding of what I'm building.
Here is my solution:
object Hamming {
def compute(str1: St...
@Legato As others said, you should look into Socket programming. Whatever language you are using, I'm sure it has a tutorial about that. For Java for example, refer to docs.oracle.com/javase/tutorial/networking/sockets
Program that cleans up user-entered phone numbers so that they can be sent SMS messages. The rules are as follows:
If the phone number is less than 10 digits assume that it is bad
number
If the phone number is 10 digits assume that it is good
If the phone number is 11 digits and the first numbe...
Write a program that, given a word and a list of possible anagrams, selects the correct sublist.
Given "listen" and a list of candidates like "enlists" "google"
"inlets" "banana" the program should return a list containing
"inlets".
Here is my solutions:
class Anagram(word: String) {
val sor...
@NeilSlater This code has been stripped down to a quite minimum example, which makes it a bad question for Code Review. — Simon André Forsberg34 secs ago
Just as a general note, I'd recommend avoiding too many questions in a row, the reviews you get from one question can often be applied to other pieces of code you write as well. — Simon André Forsberg22 secs ago
> I'm not that deep into scala semantics, but as I understood it, words is a modifiable reference collection. While filters do not have an effect on the collection reference, map might ...
I don't actually know, but figured it'd be more java-like in that respect.
We take a string as input that must contain only 'A', 'C', 'G', and 'T'. For instance, "AACCC" should return the Map that looks like this: Map('A' -> 2, 'C' -> 3, 'G' -> 0, 'T' -> 0). More detail can be found in a gist with specs
This is my solution:
class DNA(code: String) {
val nucleotides ...
It's exercise from the java introductory book
Write a hangman game that randomly generates a word and
prompts the user to guess one letter at a time, as shown in the sample run. Each letter in the word is displayed as an asterisk. When the user makes a correct guess, the actual letter is th...
i am working on Ecommerce app in that i inserted my product details,now want to fetch that data from json ,how i code for it??
i tried that using
if([method isEqualToString:@"GET"]){
NSString *getURL = [NSString stringWithFormat:@"%@?productDescription=%@?productid=%@?productimg=%@&...
Would it be good if I attach link on free-image hosting with image of block-scheme illustrating logic of my program, because it's not obvious how it work or it's not necessary? — Alexander15 mins ago
I've always been told "never use goto, there's always a better way" and for the longest time I just accepted it. Lately though, I've been running into such scenarios in which I have to repeat this bit of code every time I return early.
I personally hate repeating myself, even the littlest bit of...
@CiroSantilli六四事件法轮功纳米比亚威视: that's not a valid close reason. Code review is not specifically off topic here. It could be too broad instead, at best. — Martijn Pieters ♦29 secs ago
Following on from my previous question, I think my Entity Framework model code is now complete. First I'll provide a quick overview of the program - everything above the next horizontal rule can be assumed to be 'fixed' & not changeable by me.
Because this is kinda long, I'm going to break th...
@MartijnPieters I think code review is very close to "why isn't this code working?". Too broad or unclear are other options for this one though. — Ciro Santilli 六四事件 法轮功 纳米比亚 威视48 secs ago
This is related to DataDictionary Application - Model
I haven't done much on the controllers yet, as it's the first time I've written Controller-type classes and wanted some quick feedback on really simple stuff, so these presently just contain various Get methods. If this is ok for a start,...
I have a backend API that I'm sure can a refactor, but I'm not exactly sure how to avoid repitition between the store method and the update method of this controller. Specifically, the collection of $_POST data is exactly the same. How can duplication be avoided?
store
public function store(Req...
We have three different web pages that contain grid which is for adding details of master entity.
Grid is something like that:
As you can see, detail object can be expressed in javascript by
var detail = {
Description: 'Detail',
MinPercentage: 0,
MaxPercentage: 20
}
Now, we...
@dyp I completely understand, and it's a very well made point. I still think it smacks of premature optimisation. When are we ever going to be assigning multiple copies of the same vector of expensive (copyable) objects in a tight loop? Code like that would be unlikely to make it past code review. I guess ultimately arguments like this over philosophy are just that - we all have good reasons for what we say. I think we're as correct as each other. — Richard Hodges8 secs ago