« first day (934 days earlier)      last day (3090 days later) » 

12:00 AM
RELOAD! There are 1646 unanswered questions (94.3261% answered)
 
@Phrancis That sounds very good.
Thanks for the idea.
 
32
Q: How to create materialized views in SQL Server?

DeepakI am going to design a DW and I heard about materialized views. Actually I want to create a view and it should update automatically when base tables are changed. Can anyone explain with an query example..

 
@200_success Thanks.
 
DWs are interesting, a friend of mine has designed those before. Perhaps I should ask him more about them
 
12:16 AM
Thanks for all the help, guys.
 
12:32 AM
Whoops: I forgot I can migrate...
I chose VTC: broken code for this:
0
Q: Java - Looping UI bug

user90376I've written this really simple console based UI for a project. It seems to work fine but for some reason, it gets caught in an infinite loop somehow once the user inputs a non-String response to the menu selection. void selection() { System.out.println("\nSelection[1,2,3,4,5,0]: "); try...

 
0
Q: Java - Looping UI bug

user90376I've written this really simple console based UI for a project. It seems to work fine but for some reason, it gets caught in an infinite loop somehow once the user inputs a non-String response to the menu selection. void selection() { System.out.println("\nSelection[1,2,3,4,5,0]: "); try...

 
12:56 AM
@nhgrif I don't think he knows you very well.
 
Wow. If you held a contest for the best sentence to start a story about communicating with para-dimensional space aliens via the movement of a chess knight, I bet that "I had just smoked my second pipe of opium" would be a strong contender. — Doug Warren 4 hours ago
 
0
Q: BrainfuckSharp: Round 2 (Fight!)

EBrownSo I've completely changed how BrainfuckSharp does things, and added some features. This is obviously a follow up to: Interpreting Brainfuck code to C#, then compiling to a .exe It now features an OptimizationLevel (currently hardcoded, will fix for the future) that allows you to indicate how fa...

0
Q: Is there a better way to write this powershell type converting "filter" to avoid the problem I'm seeing with set-psdebug

Etan ReisnerIn this question I explain an issue I'm seeing with Powershell version 3 (which looks like a bug but I'm not sure what's going on yet) when I try to enable debug tracing (with Set-PSDebug -Trace 2). Is there a better (perhaps more idiomatic) way to write this sort of filtering pipeline. I have ...

 
0
Q: how to update existing shelve set in tfs

GainsterMy team is using shelving for code review, for X++ code. Which is not a native visual studio language. So you can consider like we storing text files in TFS. For code developer create a shelve and send it over to the team to reviews it and send feedback. But when the developer address the comme...

 
1:16 AM
@CaptainObvious Hmm. That one is a bit puzzling. "This code throws an error when debug tracing is enabled."
 
1:55 AM
@CaptainObvious hmm... first time I actually read BF code.. and understand it. Don't know what took so long to just bother to try...
@Hosch250 lol, RPi @ -2 weeks kinda sticks out
 
lol
 
2:19 AM
1>------ Build started: Project: BrainfuckSharp, Configuration: Debug Any CPU ------
1>  BrainfuckSharp -> C:\Users\Mathieu\documents\visual studio 2015\Projects\CodeReviewSandbox\BrainfuckSharp\bin\Debug\BrainfuckSharp.exe
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
 
2:34 AM
@Hosch250 R# question, got a sec?
 
@CaptainObvious Kinda stub-like, kinda not working as intended. Mod hammer might be problematic, though.
 
2:49 AM
@200_success I VTC with a comment
This really should be on SO, at least for now, it sounds like
 
@Phrancis it's already on SO, and the code runs fine in PS4; apparently the bug is in PS3 :/
it's too much of an edge case for mod hammer imo
 
@Mat'sMug Huh?
 
I was wondering what license you were using. your own? school's?
 
Dunno offhand.
School, I think.
What do you guys think of this construct?
Create Table Person (
	School_ID int Identity(10000,1) Primary Key,
	First_Name nvarchar(200) Not Null,
	Last_Name nvarchar(200) Not Null,
);
Create Table Instructors (
	Instructor_ID int Primary Key Foreign Key References Person(School_ID),
	Year_Hired int Not Null,
	Salary money Not Null,
);
Create Table Students (
	Student_ID int Primary Key Foreign Key References Person(School_ID),
	Enrollment_Year int Not Null,
);
 
3:05 AM
@Hosch250 Confusing a bit
 
Should I put it back the other way?
 
If you use School_ID at the top in Person, then make that consistent and use School_ID everywhere IMHO
 
Why not make it more specific?
 
Otherwise you'll end up with a tangled mess of synonyms that are really the same key, just with a different name
Make it more generic if you must
 
Not really, you could hardly join students and instructors on it.
 
3:07 AM
Oh yes you could ;)
 
Well, I guess you could to get the instructors that are students.
 
Mind you perhaps this would make sense:
Create Table Instructors (
        Instructor_ID int Identity(1,1),
	School_ID int Foreign Key References Person(School_ID),
	Year_Hired int Not Null,
	Salary money Not Null,
);
 
Why in the world would I give one person two ID's?
 
Excellent question! Perhaps I'll flip the question around and ask, why in the world would you use the same key as primary key on multiple tables?
 
Because that attribute is the one that fulfills 1NF, 2NF and 3NF.
 
3:11 AM
Does SQL Server actually accept what you've written above?
 
It looks like it.
I haven't run it yet, but it isn't showing any errors.
 
OK, run it with rollback, that way you'll be sure
It may not like using the same column as PK and FK at the same time
 
Yes, it works.
I just commented out the inserts.
 
Huh, learn something new every day!
 
Bah, this is the last change I'm making. I could probably get 100% without it, but I'd like to do it the best I can.
I have to seriously start writing the paper, though.
 
3:14 AM
"Is there a cleaner approach?" -- given that you've tied BatchOperationManager to the BusyWindow class (seems not great to me, but it is what it is), I don't see a lot of harm in what you're doing. Depending on the caller of Execute(), if the window is closed before it can be enlarged, the invoked delegate may never execute, since after ShowDialog() has exited there won't be a message-pumping loop active. But that doesn't seem harmful. Still, without a specific problem statement, your question seems off-topic; more appropriate for codereview.stackexchange.com, I think. — Peter Duniho 49 secs ago
 
@Hosch250 That, yes, would be quite important :)
 
Looks like it works.
I think I'll leave the ID's as Student_ID and Instructor_ID, though, because that is what they are called outside the database.
 
0
Q: Method to read the number of lines in a web page

LegatoNeeding a way to read the number of lines on a web page for the purpose of a progress bar the following method is created: private static int countPageLines(String url) throws IOException { URL page = null; BufferedReader in = null; int count = 0; try { ...

 
Might as well keep it similar. This way, you can see right off whose ID's you are working with in the queries.
 
@Hosch250 Cool, sure thing
 
3:21 AM
@EtanReisner Hi.
 
Hello!
 
On Code Review, we often say that we require "working" code as a shorthand. Unfortunately, programmers have differing standards of what "working" means.
 
Hey, @Ludwik would you guys happen to have a site design for chat, or is that something to consider for another time?
 
The code works. I get the output I want. It correctly returns the objects I need.
If I give it vmhost objects I get vmhost objects. If I give it strings I get vmhost objects. If I give it both I get vmhost objects.
 
3:24 AM
It sounds like there's a but
 
Nut if you're unhappy that the Trace feature fails, then is it really working as intended?
 
If I turn on the powershell debug tracing option (sort-of akin to set -x in sh/bash) then powershell has an error.
In version 3. Versions 4 and 5 do not exhibit that behavior.
 
Sounds like a potentially interesting Stack Overflow question.
 
We're not here to debug or work around PS bugs.
 
It was an SO question.
I'm asking for alternate code for my working code. Why does the reason matter?
 
3:26 AM
It's actually a classic SO question. "Tried X, doesn't work
 
Hi, @EtanReisner.
 
qiote right."
quite
 
You're not asking for an alternate though--not really. You're asking for different behavior.
 
I'm asking for an alternate way of writing the code I have (so that it won't trigger the bug), yes. But replace "trigger the bug" with "take a thousand years" for an optimization question and I don't see why it matters which the reason is.
 
Then what place does Stack Overflow even have?
 
3:29 AM
Another issue is that your "convert {0}"
looks like a placeholder for something else.
 
It is. For Get-VMHost which, unless you have powercli installed and an ESX host handy you can't run.
 
What place does Stack Overflow have in the Stack Exchange network if Code Review is now where to go for questions such as "My code works except I don't want it to trigger this bug in this scenario"?
 
But what that does doesn't matter. That's the point. It is the logic/approach I'm looking for a replacement for. Because the powershell language features are what I'm looking to potentially replace.
 
If you want to reduce your program down to a MVCE, then don't ask on CR. We prefer real code.
 
Are you honestly suggesting that if I replaced "convert {0}" with Get-VMHost -Name $h you wouldn't be complaining?
 
3:32 AM
Your question would still have problems.
 
It's merely a secondary objection.
The "more idiomatic" aspect is one factor in favor of CR, but everything else about the question screams SO. I don't think it's off-topic for SO, but I believe it's off-topic for CR.
 
Would this not be "Correctness in unanticipated cases"?
 
What?
 
You know exactly what triggers the bug.
It's a known issue.
 
You can't know about unanticipated cases. That's why they're called unanticipated.
 
3:36 AM
@nhgrif That's a bullet point from the help/on-topic page.
 
How is this an unanticipated case though?
 
You are now suggesting that if someone else wrote this code and asked for general help and I, having seen this problem, came back and instructed them that they should avoid that construct on powershell 3 that would be an on-topic question and reasonable answer but that since I know it is problematic I can't ask for alternative ways of writing it?
 
No, we're not accusing you of posting someone else's code.
 
That's not what I said.
I was posing a hypothetical.
 
No, I understand what you're asking Etan
And hypothetically, it depends.
 
3:39 AM
If we had caught this bug, and you had known nothing about it, it would be on topic.
 
I don't know Powershell well enough to know whether or not it would be reasonable to believe this is an unanticipated bug.
 
But, since you know about this bug and are looking for a solution, it sounds like an SO question.
 
We have closed questions before with bugs that the OP wasn't aware of (or at least claimed to be unaware of) because in some cases the only way to not be aware of a bug is to effectively not have tested your code whatsoever.
 
Yes, it makes a difference whether you're aware of the problem at the time of asking.
 
But also, @EtanReisner, you say this particular bug only occurs on PS3, but not PS4 or PS5, right? Perhaps, hypothetically, it's asked by someone who only has a business requirement of running on PS4/PS5, so it couldn't matter less how it behaved on PS3.
In which case, even if you knew it had this bug on PS3, posting an answer pointing out the bug wouldn't even be constructive.
If you would have just asked the question on Stack Overflow, you might have had an answer in the time you've spent debating whether or not it's on topic on Code Review...
 
3:43 AM
I did ask the question on SO. Not worded looking for replacement code but asking about the bug in the first place.
 
And what did you find out?
Where's the link to that question?
 
1
Q: Set-PSDebug -Trace 2 is causing my powershell code to throw an error that doesn't occur without tracing on

Etan ReisnerImagine a script test.ps1 that looks like this: Param ( [ValidateNotNullOrEmpty()] $VMHost, [switch] $trace ) $ErrorActionPreference = "Stop" Set-StrictMode -Version 2 trap { Set-PSDebug -Trace 0 $_.InvocationInfo break } if ($trace) { Set-PSDebug -Trace 2 } ...

Linked in my CR question.
 
"What's going on?"
 
I'd wait around for an actual answer to that question.
 
is not a useful question.
"How can I work around this bug?" is what you want to know.
I suggest rewording it.
 
3:46 AM
That's what I want to know now with the CR question. It wasn't what I was asking in the SO question. I was actually asking if anyone knew what was going on. I didn't (and still don't) know that it actually is a bug and not some other (mis-)feature in powershell 3.
 
0
Q: I have a variable that is not defined in python GUI even though it is in the function

mickey4691I am creating a GUI application to run a calculator using Python. I've followed the majority of programming from the book. When I execute this code, it gives me the name error that self is not defined. This is confusing this it was introduced in the functions. Below is my code. This has been puzz...

 
Code Review is the place to get your working-as-intended code reviewed. It is not the place to find work arounds to bugs/features/lack-of-features
 
I could ask a second SO question too but asking for replacement code for working code seemed to me to be a CR topic and not an SO topic. Since SO is for broken code. Your assertion is that my code is broken. I don't know that I agree but ok.
 
Code Review doesn't explain what is going on inside of code. It is for improving working code so it works and/or reads (hopefully both) better.
 
Then ask "how can I work around this apparent PS bug or mis-feature"?
 
3:47 AM
Asking for "replacement code for working code" isn't a good characterization of your question or what Code Review is for.

Your code doesn't work.
Code Review offers reviews--not replacement code.
 
@CaptainObvious Doesn't work.
 
"SO is for broken code" is a myth. But even so, it is broken, even if you don't want to admit it.
Excuse me. I need to go.
 
Various versions of various compilers over time have been known to have bugs. You are suggesting that CR would not be a place to get suggestions/help on rewriting known-working known-valid code to work around such a bug if a specifically broken compiler was a required target. That's fine. That's a wildly different scope then I'd assumed was on topic here.
 
hi!
 
3:50 AM
Well, that's what happens when you make assumptions.
I'm not sure what would give you the idea that Code Review is where you go to find compiler work-arounds though. Not even the site name suggests that... (nevermind anything in the help center)
 
Can we tone down the sass a little?
 
if you read "sass" backwards you get SSAS
cough
 
I'll grant that is a bit of a stretch even for my scope on CR.
 
@Mat'sMug lol cheesy
 
@Mat'sMug which coincidentally also stands for SQL Server Analysis Services
 
3:52 AM
My point was that I had assumed a broader "review" scope for people looking for general suggestions regarding one (or more) aspects of working code.
 
Did you guys read that hilarious email I was sent today?
 
no
never saw it
after all, I don't know your email, or your password :P
 
As such, asking for alternative methods of doing the work that snippet was performing seemed on topic to me. Since that is the thrust of the code. I have a snippet. It works. I would like alternatives. My specific reason for asking was to avoid a platform bug but could just as easily have been performance, etc.
 
> I think your experience on Object C not in swift as we talk yesterday you show your experience very low in swift that make me never think about join Metova

thanks
<redacted>
Full Stack iOS developer at <major technology company>
 
3:54 AM
wot
you're, like, the
 
That's not actually his email signature. He didn't have it in any of the other email correspondence before this point.
 
-1
Q: python begginer what does (---)(---) means

RAII took a code from this website and I wanted to understand it and go throught it my question : what does it mean to have this lines in the code len_old = len(A) (A, activated_nodes_of_this_round, cur_tried_edges) = \ _diffuse_one_round(G, A, tried_edges)

 
@nhgrif What rotten grammar. Be glad you didn't get him.
 
Does it work? Stack Overflow isn't here to review your code. You might get help on codereview.stackexchange.com for that. If you have tried your code and had some specific problem you are unable to solve yourself, please post a new question, with a good, minimal, complete code example that reliably reproduces the problem, along with a precise explanation of what that code does and how that's different from what you want it to do. — Peter Duniho 17 secs ago
 
I didn't even ask him any of our hard Swift questions. I strongly suspected that he was reading from pre-googled pages for most of the questions, and for the questions you can't easily google, he didn't have any answers at all.
 
3:56 AM
@EtanReisner I think it might help you if we scope it in the context of a code review in business/production environment... if you were ready to check that code into production and wanted to make sure everything was as good as it could. From the way you explain this, I think many of us would agree that it doesn't sound like code that's ready for that yet, assuming compatibility with trace mode in PS3 is something that you need
 
@CaptainObvious send in the nukes
 
@Phrancis I did check in that code for production use. That's how I found the problem. It took me most of a day to figure out what was going wrong and that debug tracing was involved.
 
@Phrancis That's a good way of framing this. In @EtanReisner's case, it seems most likely that this bug would either be something that no one cares about because business doesn't have to support PS3, or it would be a defect--a ticket for a developer to work on.
 
^^
 
If it's something you'd create a bug report for, it's not a Code Review question. If it's something you don't care about and don't have to support, then don't center your Code Review question on it. In fact, point out that you don't care that it doesn't work on PS3 because you only are supporting PS4 and up.
4
 
4:01 AM
Here's my problem at this point. I could take my original code, post it here and ask for a review without mentioning the problem (but mentioning that I don't like the % filter and asking for better options) and you are all saying that would be fine. But because I know that that bit triggers an issue in powershell 3 (which is likely a platform bug) and (in part) because I actually mentioned that in the question that it is out of scope. That seems... catastrophically backwards to me.
In that it would seem to actively discourage people from spending time actually reviewing their code before asking about it.
 
I've learned to pretty much ignore education & work history on resumes. Both are basically meaningless, and any resume that emphasizes these things with great pride is probably a warning flag.
 
And, I think if this bug exists (which it clearly does), then likely you're not the first nor the last who will encounter it, and the likelihood the next person who has this issue will find it on SO with a clear problem definition would be much greater than if it was "shoehorned" into being on-topic on CR
 
@EtanReisner the problem is "what is working code?" - it has been debated on meta during the 4 years this site was in beta, and I think we've come up with a nice concensus: code is broken when it doesn't do what [or behave the way] it should. Typically when we cannot reach a consensus in chat, we take it to meta - if you have a suggestion to widen the site's , and can back it up with a solid argumentative, I suggest you post on meta.
 
@EtanReisner can we all just agree to disagree? Your question is closed. It will not be reopened. You're entirely missing the point or spirit of Code Review.
 
I've deleted my question. I'll post a version of it to SO and see what happens there. I don't expect much.
@Mat'sMug For all that powershell seems fairly popular there isn't much out there on it in general that I've seen.
 
4:03 AM
You don't even need to ask a second question on SO. You just need to make your existing one actually ask the right question.
And wait for an actual answer... not the comment you posted as an answer.
 
It is two questions. I want to know if anyone knows what the bug is and I want to know if anyone has a good suggestion for replacement code that avoids it. Those aren't the same thing.
 
Until someone posts an answer to either which answers both questions and then we close the unanswered one as a duplicate of the answered one.
Because any good answer to either question will answer both questions.
 
> But because I know that that bit triggers an issue in powershell 3 (which is likely a platform bug) and (in part) because I actually mentioned that in the question that it is out of scope.
 
Sure. Someone absolutely could answer both with one. I don't expect they will. I don't expect an answer at all actually.
 
Posting on Code Review isn't really likely to change that at all... the community here is smaller, and most who are active here are at least minorly aware of Stack Overflow.
 
4:06 AM
Also, I'd file bug reports for security issues and for code that falls down on corner cases and both of those are explicitly in scope according to the help page.
 
it's out of scope because you are interested in solving a specific programming issue related to what appears to be a bug in PS3, not because you mention it in your CR post.
 
Speaking of completely rewriting code... it's rare that I see someone has taken entirely the wrong approach on Code Review and still think it's a question I want to answer... but I'm glad I did in this case. Quite good answer, methinks:
4
A: Unity3D native iOS plug-in to read pedometer data

nhgrifWell, there is a lot to talk about here... I can't speak specifically about memory leaks here. I'm not sure how you're writing or compiling this code. But it's important to note that the iOS SDK absolutely does not automatically deallocate objects for you. Objective-C (in contrast to C#) is d...

 
you could mention the known issue with PS3 and still ask for a peer review of your script
 
There's also the option of asking on MSDN, maybe someone there would know about this, since they own the product
 
but answers on this site aren't answers to a specific programming issue - they're peer reviews
 
4:08 AM
I just realized, @Mat'sMug is not the moderator this conversation started with..
how did that happen
 
been lurking ;-)
 
Why is this still happening? Take it to the meta.
 
200 said he had to leave.
 
I don't think we have questions with code that has problems in edge cases where the OP is aware of these edge cases when posting the question
 
I'm done. I understand the scope CR does have. I assumed it also had a broader scope. Apparently that was wrong. I certainly won't make that mistake again.
I'll just continue to drop shell questions that attract little-to-no interest. =)
 
4:11 AM
if someone reviews your code and happens to know about that PS3 issue you mention, they'll most probably drop a note or two about it.. but if you want to know about that PS3 issue, it's probably best to ask exactly that on Stack Overflow. ...and hey, PowerShell is awesome!
(I just haven't used it in years!)
 
Does anyone have any opinions about this Stack Overflow question?
2
Q: Populating table with API response Swift

Wesley ChoI'm trying to get search results to display on a tableView. I believe I have correctly parsed the JSON, the only problem is that the results won't display on my tableView. Here is the code: var searchText : String! { didSet { getSearchResults(searchText) } } ...

 
Powershell has many good features but they are all wrapped up in horrible messes and confusing corner cases and poorly documented behavior. Like array unwrapping. And whatever this bug is.
 
=)
@EtanReisner you know what's fun about a freshly-graduated code-related SE site? the first gold badge hasn't yet been awarded.. oh and is badge-enabled in 3 more questions =)
 
Top newest question is mine. =)
 
#!/usr/bin/env xcrun swift
 
4:19 AM
Is Powershell pretty good at scanning/searching through very large number of files? Use case, a dump directory where thousands of XML files get dropped every day, for instance?
(or maybe just hundreds/day)
 
@Phrancis it has access to the whole .net framework
including System.IO.FileSystemWatcher ;-)
 
I'm going to need a hobby to get better in MS environment, and C# is a pretty big undertaking to start with I feel, so maybe PS would be a good place to start?
 
For what?
What's the end goal?
Specifically
 
@nhgrif , I think
 
LOL
No, literally, above is my first real use case
 
4:23 AM
Well, that's not an end goal.
I mean, that's what you need to accomplish tomorrow
> get better in MS environment
what does that mean?
 
I guess I haven't really set an end-goal, mind you I don't know a thing about PS, just kind of inquiring if it's a good tool for general stuff to get done in MS environment
 
and why MS environment
 
Because that's what my job uses ;)
 
Aligning yourself with your current job can be relatively short-sighted.
 
@Phrancis put simply, you might view a PS script as a beefed-up batch file on steroids
 
4:27 AM
@nhgrif OK. That's fair enough. I'm not planning specifically to work in a MS career, but, I certainly wouldn't mind learning a few things that I can carry with me
 
0
Q: Immutable Memory Pool

AcornI've been reading about Memory Pools since I came across them in the book Game Programming Complete 4th Edition, and I decided to try and spin my own since I didn't quite understand how the one they presented in the book worked at the time. One thing I'm uncertain of is defining the deleter in t...

 
And I think getting better with the file system(s) is something that would help me step outside my databases a bit and find perhaps better solutions to some problems
I know that I've seen production SQL code that builds XML files by concatenating stuff and patching stuff together, and finally just passing the (concatenated) file path and the XML content to a C# helper thing that puts it in the file path on the server. It's... ugly lol.
 
heck, write some ps script that.... connects to a specified database and returns the number of rows in a specified table?
brutal-helloworld.ps1
 
@nhgrif Is NSDateFormatterreally so complicated that it needs to be lazily instantiated? Or is that just idiomatic Objective C?
 
@Mat'sMug How many DBAs will that get up in arms? ;)
Guess nothing wrong if I did on my local SQL instance though
Does PS require a bunch of special things to get working?
 
4:43 AM
@Mat'sMug That might be belittling PS a bit much. From what I understand, the language is more powerful than UNIX shells, but the ecosystem is still a bit immature.
Isnt PS built in to Windows 8 and 10?
 
I think you still need to set execution-policy to run scripts, but yeah it comes installed
 
Oh, right. That's annoying.
 
and belittling PS a bit much was an understatement ;-)
 
@Caridorc Did you really just edit this question to typeset "4" and "50" using MathJax?
5
Q: Using contents of an integer array to print a String

t.h.hI have written this code that takes input from a file and creates an output file that reports each person's name, percentage of B answers, and personality. However, the my computePersonality method, which takes the contents of an integer array and converts it into a string of \$4\$ letters based ...

 
removed bad use of code snippet
hmm rev.3
 
4:55 AM
0
Q: Small project to learn Golang. Command-line ssh address book app

InondleTrying to learn a bit about Golang, decided to try out building an ssh address book command-line app. I used a YAML library to serialize and store data in a configuration file. The app has a few command-line options to view, delete, make, and run ssh address entries. It also runs the ssh command ...

 
5:14 AM
0
Q: C# ISO8583 Encoding Data Fields

Amir Hamzah Khairul AnwarI just want confirmation on my ISO8583 format. Is it correct? Here is the code: Example for Data Field 35 the length of the data is 36, so I put 36 before the 4842. Then all the data is inserted in a string(dataISO). This dataISO variable is then sent to another function which is SendISO(). pri...

 
@200_success Yes, it is. I didn't know it was a first for 8.
In fact, 8.1 Universal apps were installed with PS, and I assume they still are in 10.
 
5:37 AM
@Phrancis I don't know where he got his questions from, but they are out-of-date and have the wrong author linked to them.
One of them examples:
40
Q: Ternary operation in Java - isn't this abuse?

mprabhatI think the below code is difficult to understand. I also feel it abuses Java's ternary operator. String name = ((this.getAllNamesAsDelimitedString().contains(incomingName) ? incomingName: (CollectionsUtils.isEmptyCollection(this.getEntityOperationMap()) ? ...

 
0
Q: Invalid SQL statement expected; ‘DELETE’,’INSERT’,

Trương Ngọc Đăng KhoaI have a code Dim Cn As New ADODB.Connection Dim cmd As ADODB.Command Set cmd = New ADODB.Command Dim i As Long Cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & ThisWorkbook.FullName & ";" & _ "Extended Properties=""Excel 8.0;""" Cn.Open cmd.ActiveConnec...

 
Thanks I will post it on other site codereview.stackexchange.comGaruda 31 secs ago
 
5:58 AM
0
Q: Program to determine total stops taken by elevator

GarudaI was asked a question to write a optimal program that would determine the total number of stops a elevator has taken to serve X number of people. Question description is as below. There is a elevator in a building with M floors, this elevator can take a max of X people at a time or max of total...

 
Monking
 
Oy.
I read the meme on "Oy" today, and some people say it is "Yo" backwards, and others say it is part of a Jewish greeting.
My version is that it is an abbreviated from of "Ahoy".
@Heslacher We got the meta on the colors today.
 
@Hosch250 I have already read the transcript and meta. Thanks for notifying.
 
Oh, OK.
Turns sound off so I don't get pings through the Bose.
What do you think of them?
@Bob Especially if it's a social engineering attack. The TalkTalk scam is particulary bad. TalkTalk got hacked (user account details leaked). "Hello, I am from TalkTalk. We want to compensate you for the hack. Please give me your bank account details so we can give you a fat refund". 10 minutes later the account is empty. — DavidPostill Nov 19 at 13:11
:(
 
6:14 AM
I am not that sure. I will either add an answer to it or will comment on different answers. But first I need to answer a CR question which I have already started. Or maybe I will throw my keyboard out of the window because it is starting again to swallow keystrokes a lot !%&$§%&"%$$
2
 
@Mast Nothing to worry about, chances are he's copying stuff from here and there into his design program, I feel pretty certain none of the code for that new design has been written yet
 
It seems like computer parts are threatened with being thrown out the window an awful lot.
Rebooting might help it. It usually fixes my keyboard when it eats key strokes.
 
@Phrancis Perhaps they're just pulling random questions, random users and random vote scores and mix those up.
From random moments.
 
Yes, that sounds likely
 
@Hosch250 Desktop keyboards can use a good washing every now and then. Less helpful with most laptops.
 
6:18 AM
@Hosch250 This would result in rebooting 7 virtual machines which takes quite some time. Maybe it is the KVM switch which is making trouble. But hey, that keyboard is around 10 years old maybe it should rest in peace ?
 
Keyboards don't die from old age. They die from wear or they don't die at all.
 
@Mast Or from spilled drinks
 
Ok, it is old and used a lot. And my coffee never made it inside the keyboard. Coffee goes only into me!
3
 
@Hosch250 Only 7000? How small does he think the internet is?
 
6:23 AM
 
> These lines are duplicated* 5 times in void Interpret(string): once in every single case block. And no offence but wah, it's ugly.
 
I need to rephrase that
I think
 
Possibly. It could be better.
 
is it "offense", or "offence"? ...I never seem to remember
 
6:33 AM
offense
(I think some British spell it "offence" though)
 
Offence is the official British spelling.
 
Ah, thanks for setting me straight
 
aww, just missed the grace period :(
 
My dictionary doesn't recognize the other one, but it doesn't recognize most American crap versions.
 
Offence gives my spell check the collywobbles.
 
6:35 AM
NAO OFFENZ, BAHT...
 
anyway, TTGTB
 
So how do Americans spell "fence", also with a s?
 
No.
 
6:37 AM
lol
 
Dilbert comedy night tonight? ;p
 
Yep.
Dilbert is better than XKCD.
 
I'm out
 
Me too.
 
and NAO OFFENZ, BAHT NAO ;-)
 
6:39 AM
 
XKCD what-ifs are a phenomenal time-killer
 
^^
 
So is Dilbert
 
ciao!
 
6:40 AM
@Mat'sMug Yup, he doesn't write enough of them though ^^
Hanging around you guys really destroys my sense for English.
 
7:02 AM
Have you looked at the built-in code review support that Visual Studio/TFS have? visualstudio.com/en-us/get-started/code/get-code-reviewed-vsWouter de Kort 50 secs ago
 
0
Q: MEF export wrapped instance

grek40I have a situation, where I want to use MEF to Export a number of classes, that are all subclasses in the same class hierarchy (I call it MyClass in the example). However, I do not want to import the instances directly, but instead wrapped in another class (I call it Wrapper in the example). The ...

 
7:56 AM
@Hosch250 I have posted an answer to the "design meta"
 
8:54 AM
0
Q: Nested For loop performance in Python

anonI have this code below that needs to query multiple database tables. import mysql.connector import itertools, time cnx = mysql.connector.connect(host="host", port=3306, user="user", passwd="pass", db="factory") cursor = cnx.cursor() cursor.execute("select distinct(batch) from batchdata whe...

 
Monking
 
0
Q: JS component for displaying tree

JoelI developed a javascript component to display a tree, based on D3.js I'm not sure how clean my code is, I'm not used to code a lot of javascript and I'm constrained to write everything in 1 file. So I'd take every advice on how to make this code better. And in particular, there's a behaviour I ...

 
@DanPantry monking
 
@Mast Sort of. Offence and offense are two different words.
 
Zak
9:08 AM
Monking @all
 
@JeroenvanLangen As is, this question won't be acceptable to codereview either, since there is no code to review. — Yuval Itzchakov just now
 
Actually, nope, I'm wrong. I'm just used to seeing them used as two different words. They are actually the same word :p
f.e Offence (taking offence) vs Offense (being on the offense)
English.
@Phrancis well, at least it's not beta blue ;-)
(How old is that design? Looks like it was from the middle of this year)
 
9:24 AM
so, the question needs improvements? not for the codereview but for the stackoverflow — user2332726 29 secs ago
 
9:48 AM
I think this is better located at codereview.stackexchange.com. — HimBromBeere 57 secs ago
I guess this fits better on Code Review. — Patrick Hofman 50 secs ago
 
Zak
On the one hand, the design doesn't "look" like it took a lot of work. But isn't that what great design is supposed to do? It's supposed to fit so well that you think "well of course, that's obviously what our design should've been". Plus, you never see all the iterations and failed designs that came first.
 
It might work on code review as long as you provide your actual code and not examples. — Dan Pantry 6 secs ago
 
10:05 AM
0
Q: Python rock paper scissors, looking for improvements

GreysThe game itself works but i'm looking how to improve to computer generated choices. Random int gives the same choices a lot. The code: import random def choice(): p_choice = raw_input('Choose rock, paper or scissors: ') if p_choice.lower() in {'rock', 'paper', 'scissors'}: c_c...

 
Monking
 
10:24 AM
monking @all
where are the javascript goeroes?
 
They are undefined
 
I'm working with qrcode.js
if (options[1]==null) {
wgt.dark = '#000000';
} else {
wgt.dark = String(options[1]);
}
if (options[2]==null) {
wgt.light = '#ffffff';
} else {
wgt.light = String(options[2]);
}
this is a setup, if some parameters are not defined, I give default value.
wgt.qrcode = new QRCode(wgt.$n(), {
text : value,
width : wgt.width,
height : wgt.height,
colorDark : wgt.dark,
colorLight : wgt.light,
correctLevel : QRCode.CorrectLevel.H});
while an alert on wgt.dark and wgt.light gives the same for default as for given parameters
it only work for default values
the string casting was mine last possible solution what I could think of
 
@chillworld gurus? :p
 
:)
I'm now looking into the qrcode.js
to see how they did it and maybe copy a little bit ;)
 
10:40 AM
Appereantly Java 9 will include some kind of Flow API which has to do with Subscriber and Publisher, I should look into that soon (tm)
 
11:23 AM
I'm voting to close this question as off-topic because this question belongs to codereview.stackexchange.com — Tushar 55 secs ago
It seems that your code currently works, and you are looking to improve it. Generally these questions are too opinionated for this site but you might find better luck at CodeReview.SE. Remember to read their question requirements as they are more strict than this site. — Kyll 26 secs ago
@WouterHuysentruit Whilst this would be a perfectly OK Code Review question, it is also not Off-Topic for SO so I ask that you leave it here. — Zak 29 secs ago
 
Zak
I think I may take on the role of reviewing all the @duga CR recommendations
Hey @Ludwik
 
@Duga Your recommendation for Olaf seems ok, but Wouter didn't recommend migration as far as I can see.
 
Ok, thanks. I didn't know about codereview.stackexchange.com. — AnotherFineMess 36 secs ago
 
lol
Don't schedule 8am to 10am. — Captain Giraffe Nov 6 at 0:58
sad, but true
 
11:42 AM
0
Q: Malihu jQuery Custom Scrollbar with Select 2

walterdesignScrollbar shows only on first opening and no more. What I did wrong? $('.select').on('select2:open', function () { function showScroll() { $('.select2-results__options').mCustomScrollbar(); } setTimeout(showScroll, 1); });

 
Zak
@skiwi Why sad?
@Mast Yes, you're right. My bad.
 
@Zak Because it shouldn't be the case that it effects teaching
But schedules really do ^^
 
Zak
11:57 AM
@skiwi Why not? Humans have distinct natural rhythms which also have predictable changes throughout their lifetimes. In particular, the circadian rhythm is strongly tied to the type and presence of visible light (which used to be strongly tied to sunrise/sunset). So scheduling cognitively intensive tasks for the times of day when, on average, people are most able to process them is surely a completely practical idea?
I think the last research paper I read on the topic showed that teens/young adults are actually better cognitively "primed" to start the day closer to 11am than 9am
 

« first day (934 days earlier)      last day (3090 days later) »