« first day (788 days earlier)      last day (3212 days later) » 

6:01 AM
TTGTB
'night CRitters
 
Night @Mat'sMug
 
6:12 AM
I'm taking a short hiatus from the internet for a few days. Taking a vacation of sorts. I'll respond to pings when I get back.
Thanks :)
 
Have fun, and good work lately
@QPaysTaxes Silly FACTORFELLOW
 
i am a GUY
 
Do you guys think a for loop bug question would be suitable for a programming interview?
	// (1 * 5) + (2 * 5) = (3 * 5) + (4 * 5) + (5 * 5) = 75
	public static int sumOfMultiples(int value, int multiple) {
    	var endValue = 0;
		for (var i = 1; i < multiple; i++) {
			endValue += value * i;
		}
		return endValue;
	}
 
@Quill abstraction factory method would be better :P
 
@QPaysTaxes sumOfMultiples(5, 5)
should return 75, but returns 50
(I see the bug)
 
6:22 AM
address the first = in your comment too
 
@Snowhawk04 That too
C#
 
@Quill CamelCase your method name also :)
 
You really could one line that in Python
@Mehrad Yeah, I kinda just spewed it in chat, I didn't really even paste it from VS
 
0
Q: Comparing two objects having 2 Nullable Date Fields

ArjangExpiryDates 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) ...

 
@Quill I was just worried Camel might get offended that's all :)
 
6:25 AM
BRB going home
That's cool
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
 
@Quill I've seen worse.
Monking btw
 
6:40 AM
In my office, the structure goes Top Dev (rarely in office) > Above Average Dev (Full Time, migrated from Front End Dev) > Me (School Holidays)
 
7:04 AM
Monking
@QPaysTaxes that's because it's so dead simple
but you have to remember doing it
lemme guess.. tag excerpt?
 
This is more suited for Code ReviewGerald Schneider 11 secs ago
 
probably like 1 : 99
or even worse
forgetting : never meaning to
 
0
Q: Wordpress WooCommerce Responsive cart (github)

YconThis 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. ...

 
7:20 AM
@CaptainObvious at the very least off-topic, if not worse.
 
@QPaysTaxes, I did all of those tag wikis, sorry, but out of curiosity, which one are you talking about?
Ah, that one was fun
 
"was wondering if you Java gurus would share your state-machine advise for this example" Belongs on CodeReviewVince Emigh 37 secs ago
 
0
Q: jQuery range slider change text based on hidden field value

Thomas TaylorI 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
 
@QPaysTaxes To be honest, it's better than no wiki at all.
 
7:31 AM
^ that.
 
I'm not good with licenses. Neither is the internet.
I know, and it should have been done.
But there's such a thing as writing iteratively.
In this case, one person decided to fill the wiki, the next has to make the sources look good.
That's not how it's supposed to work, but it works.
I never said there were.
The article is an obvious copy-paste, look at the style it's written in.
 
7:56 AM
@QPaysTaxes, I was working off the logic that:
25 mins ago, by Mast
@QPaysTaxes To be honest, it's better than no wiki at all.
I did do like 50 something edits too, so that helped
But yeah, I understand
And your input is noted for next time
Actually, updated figure: 69 edits for today
*Two edits
There's the excerpt and the body, they're counted 1 each
@QPaysTaxes, isn't it 4am where you are?
@QPaysTaxes Sleep man, sleep
 
@QPaysTaxes Caffeine, alcohol, sugar and water (which is usually covered with the first two), that's all you need.
Sugar to keep your motor running, water to prevent dehydration, caffeine to stay a good programmer and alcohol to prevent hyperactivity.
If you try to stay awake for longer than 24 hours I'd recommend meat as well, keeps your stomach friendly.
 
You know what they say: Code drunk/caffeinated, Debug sober
 
8:11 AM
If you write it the way you're supposed to there's no need for debugging, right?
Who needs unit-testing anyway...
/JK
 
Yeah, right, let your clients debug for you when they run the solution
 
@Quill Yea, or get a QA department.
@QPaysTaxes Does it taste like meat?
Somebody should write a 'LAN-parties for dummies' with tips like these.
 
@Mast I remember when I did those, long time ago, now it's just teamspeak ;-;
 
@Mast add in "Do not plug all Computers into the same (possibly even chained) multi-outlet"
"Do not start all Computers at the same time"
"Use simple tools: an unused router can do great as DHCP"
and so on..
 
@Vogel612 Haha, yea. I always bring a haspel exactly for that.
@QPaysTaxes Tell me about it. People think I'm an expert with all computers and everything else with a cord.
Being an EE engineer doesn't make you all knowing all of a sudden...
@QPaysTaxes Ooooh, those are awesome on the inside.
It's like a really old, specialised computer.
Arcade machines are pure gold, technologically speaking.
 
8:32 AM
@QPaysTaxes on a related note: "Don't think that the heating of Computers is sufficient to party in a garage. in winter"
and don't plug in 2 2KW heaters to the same outlet
at all
 
8:48 AM
@Vogel612 I don't know what the current rating there is, but here it's 16A. That's roughly 3.6kW per group.
 
yes, exactly..
 
However, if you have a 3-phase outlet, you can plug 3 identical devices in star and cut the nul-wire.
 
it boiled down to getting current from another separate circuit and plugging one heater and 2 Computers with attached stuff to each circuit
 
@QPaysTaxes P = U * I (Watts = Voltage * Amps)
 
@Mast that's ... hard wire already, right?
 
8:51 AM
3-phase has L1, L2, L3 and something for the return current. It's called Nul here, not sure what the international name is.
@QPaysTaxes Basically, if you have 230 V on your outlet (most of Europe does afaik), you can draw at most 3680 W if you're current limited at 16A.
Yea, American housing has 120
But you probably have more Amps per group to compensate (I hope).
Another trick with LAN-parties is if you don't know how the groups are divided in a certain house you can always try the kitchen.
Kitchens should have at least 2 groups.
You'll blow the fuse if you draw too much, not short anything.
@QPaysTaxes A lot of high-power appliances, yes.
Shorting something is like connecting the two plugs of your outlet without sufficient load.
Blowing a fuse is often the result when shorting, so it's not that crazy.
You're drawing more power than the fuse allows you too. Shorting and using too many high-power appliances are the same in that regard.
Both will blow the fuse.
 
well shorting it usually makes it use the max current -> draws sh*tloads of power -> fuse blows
 
1
Q: Markov chain-based word salad generator

QPaysTaxesI 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[...

 
In Germany kitchens often get one standard circuit and one with rotary current for stove
and fridge, dishwasher often get a second standard circuit
 
@Vogel612 Define 'standard'?
 
but that one usually has no outlets.
16A/230V
 
9:00 AM
@Vogel612 Allright, that's standard here as well.
Rotary != Alternating?
Nothing about food and current division though...
 
0
Q: Count chars difference between two strings

HeeLGiven 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...

 
@GeraldSchneider Only code that you wrote or maintain is on-topic on Code Review. — 200_success 44 secs ago
 
9:16 AM
@Duga If he posts it here, it will be nuked instantly.
 
@QPaysTaxes Sorry, you'll have to practice your anger management. (In the grand scheme of things, that's hardly an atrocity.)
 
He is improving on self control, maybe from getting banned a few times, but nonetheless
 
Why don't you spew a few rainbows instead?
4
 
 10 sq 5 - .
 
@QPaysTaxes I could write you some obfuscated Batch which would make your computer look for chat.stackexchange.com in localhost ^^
 
9:20 AM
@QPaysTaxes I'm learning it now :-)
@QPaysTaxes If you're the unicorn, then @EthanBierlein is the blonde girl
@QPaysTaxes { 1 2 3 } [ "The number is " write . ] each
 
Is there a use-case for Factor or should it be considered an esolang?
 
Morning
 
@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
 
0
Q: Clean phone number

HeeLProgram 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...

0
Q: Find anagrams in a list

HeeLWrite 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...

 
9:36 AM
Might be a good question for codereview.stackexchange.com - please check their help before asking there. — Neil Slater 56 secs ago
 
9:53 AM
@NeilSlater This code has been stripped down to a quite minimum example, which makes it a bad question for Code Review. — Simon André Forsberg 34 secs ago
 
@CaptainObvious I can't help but feel he's generating zombies.
 
meh..
call Donald, maybe he can shoot them
else I might go for them this weekend
 
@QPaysTaxes One of his questions is still on-hold.
 
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é Forsberg 22 secs ago
 
@QPaysTaxes concerning that scala answer...
> 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.
 
10:03 AM
 
@QPaysTaxes Why?
Also, why would you write a review so heavily based on assumptions? Are you sure your implementation is better?
@Duga That question is almost 2 years old.
Two years ago CR had a different status.
It isn't an exact review request either, more of a 'I don't understand this'.
 
0
Q: Count unique characters in a String and group the counts

HeeLWe 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 ...

0
Q: Does this code follow standard conventions, not redundant?

AlexanderIt'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...

 
@SimonAndréForsberg He didn't take the hint.
@CaptainObvious VTC, UWYA
@QPaysTaxes Proves it's working. I asked if you knew for sure it's better.
@QPaysTaxes As would I, but I don't know. So I'm not suggesting it without knowing.
@QPaysTaxes G'Night
 
-1
Q: how to fetch Json data in iOS

anju kumbharkari 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=%@&...

 
10:20 AM
@CaptainObvious Broken
 
10:33 AM
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? — Alexander 15 mins ago
Yes, charts, more, please.
10
Q: Imposing a sort order on a query

Shelby115I'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...

goto in . Uh, no.
 
11:16 AM
@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
 
1
Q: DataDictionary Application - Model

KaiFollowing 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
 
0
Q: DataDictionary Application - Controller

Kai 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,...

0
Q: How to avoid code duplication for collection of $_POST data?

Raphael RafatpanahI 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...

0
Q: Interval Validation

ambitiouzWe 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...

 
11:39 AM
@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 Hodges 8 secs ago
 
11:54 AM
@Mat'sMug AppleScript is like talking to Siri with telegrams.
 
Monking
 

« first day (788 days earlier)      last day (3212 days later) »