« first day (787 days earlier)      last day (3222 days later) » 

8:13 AM
I'm voting to close this question as off-topic because it sounds like a better fit for codereview.stackexchange.com. — deceze 36 secs ago
So, your question's "Anyone can tell me how to compile blitz++ with intel c++ compiler?". If so, we don't need the rest - it belongs in a blog post, or perhaps on codereview.stackexchange.com if you're soliciting feedback. — Tony D 26 secs ago
 
0
Q: A closed exception system

MorwennI am working on yet another toy project that I named SGL (for "Standard Generic Library" since it mimics some features of C++'s STL as well as a few more utilities from the C++ standard library). Since the library is not meant to be used in real code, I decided that I would have fun and tried to ...

 
@CaptainObvious @Morwenn Why is your file a .c instead of a .cpp?
Oh, you're trying to implement the C++ STL in C.
Wut.
 
Evil has never been so fun.
 
That code is filled with bad ideas.
 
8:28 AM
And still, I think that it's a safe as it could be.
 
0
Q: Handling ManagedBeans and their data

SklogWI have the following Use-Case: On a Page(page1), a name of a Customer is entered and saved. The saved entity is displayed in a DataTable on the same page. The DataTable has the customers name in one column and a CommandButton in the other. When the CommandButton is pressed, the user is redirec...

 
8:44 AM
@Morwenn All-right, have an upvote. Not because I want to promote such code, but because the question itself is good.
 
@Mast Don't worry, I don't want to promote such code either :)
It's a "don't do that, use C++ instead" question :D
 
@Morwenn I'm tempted to write an answer stating just that.
 
9:15 AM
0
A: 2015 Community Moderator Election - Nomination Requests

RubberDuckHeslacher has been quietly clearing the queues, editing questions, and nudging new users in the right direction for quite some time now. Not only is he patient and kind, he's technically very sharp as well. Has a great sense for what's on/off topic here. Doesn't chat much, but seems to always be ...

@Heslacher ^^^
 
0
Q: methods with variable names and alias methods

MOHAMMAD RASIMI'm writing a javascript code that runs functions depending on a variable let's assume that there are two domains called (example.com and foo.com), "example.com" has subdomains (a.example.com and b.example.com) and the subdomains have another main domain (www.a.com and www.b.com) what i want to ...

 
@Mast It's already stated that it's a toy project and that C++ is better :p
 
Looks like a better fit for : codereview.stackexchange.comCD001 38 secs ago
 
9:31 AM
Monking
 
9:43 AM
Monking
 
Monking
 
After taking pictures with a DLSR for months it just felt really weird to have a compact camera in my hands :P
I tried looking through the viewfinder, was disappointed
 
@skiwi Indeed.
 
And realized I couldn't zoom by rotating the lens
 
Did you break it?
With a compact camera, you usually shouldn't zoom. Just cut/enlarge later.
 
9:50 AM
0
Q: How can we replace switch with proper code in the case below

user5064303I want to replace switch statements here with proper code. I need suggestion of doing this in an improved manner. switch ($status) { case "first" : $value = "test1"; break; case "second" : case "third" : $value = "test2"; break; ...

0
Q: Insect combinatorics

overexchangeBelow is the problem taken from here Question 9: Insect Combinatorics* Consider an insect in an M by N grid. The insect starts at the bottom left corner, (0, 0), and wants to end up at the top right corner, (M-1, N-1). The insect is only capable of moving right or up. Write a function pa...

 
@Mast It has optical zoom
@Mast I realized it before actually attempting it ;)
I think the optical zoom actually does come close to a 250mm lens
It's still impressive that they manage to fit a 18-250mm on it
 
@skiwi Those are usually not very good, unless you got some high-end model.
It all depends on the specific one you have and what's acceptable.
If it's just for holiday photo's, they're usually fine.
Although I prefer a D90 over any compact I've seen so far.
 
randSleepTime method would be correct if RAND_MIN and RAND_MAX are not equal... but anyway... I would recommend to move this question to: codereview.stackexchange.comJordi Castilla 1 min ago
 
Any C++ regulars with thoughts on this?
1
Q: Idiomaticy of macros in C++

MastMacros are considered a good thing by one and evil by another. Is there a rule of thumb when to and when not to use macros in C++? When are macros idiomatic and when should they be avoided?

I think the most answers have been given, but I'm always looking for multiple opinions.
 
I need to repcap for 9999 rep today...
but I don't have the time for that...
 
9:58 AM
0
Q: How to compare user sign in id with available id in database and display all information using with jquery mvc?

mohsinkhan pathani wrote code like that script type="text/javascript"> //var Id = $.trim($('#username').val()); var abc = $("UserName").val(id); $(document).ready(function () { $("#fectchinfo").click(function () { var email = $("UserName").val(); if(email = id) { a...

0
Q: Does this code follow good practice?

viktorahlströmIf it's needed to know, this code is a CC number validator. #!/bin/bash getchecknumber(){ # get the last digit of the cc number str=$1 checknum=$(echo ${str: -1}) } getrest(){ # get the rest of the numbers in the sequence str=$(echo ${str%?}) } doubleeveryother(){ # double every othe...

 
@Mast I'm still on the edge on whether compacts make better pictures than the cheaper DLSR on automatic mode
 
@Mast Simply use macros when you don't have another tool for the job.
And Boost does use macros for code generation. That's not a problem. Having to write 50 lines of similar code every once in a while is a problem.
Boost.TTI is a good example, even though expression SFINAE may help to create new features to supersede this library.
 
I'm not particularly fond of Boost's style, but I understand why they did it.
 
0
Q: Is my solution to this Java concurrency Bank exercise with multiple accounts correct?

REACHUSI am doing an exercise in Java concurrency. The problem statement is as follows: Bank holds an array of Accounts. Client do (in a loop) the following operations: (1) work, then sleep for random time (2) check account balance and withdraw random amount if balance>0 (3) work, then sleep f...

 
Also note that std::source_location, which should be included in C++17, should deprecate the need for macros using __LINE__ and __FILE__.
The class will need some compiler magic in order to be implemented properly though.
 
10:07 AM
@Morwenn So macros should be used less and less.
 
That's the idea.
Also, if it airs someday, the new module system should remove the need for include guards.
 
hmm.. I think somebody's serial upvoting my questions...
 
And the testsuite framework Catch is excellent at (ab)using macros. Even if the implementation is ugly, it provides a way to write tests that you couldn't get otherwise. That's an excellent example of macros being abused for greater good.
 
@Morwenn Wow, that would be massive
 
@skiwi There are already experimental implementations in MSVC and Clang. Now, they are trying to unify their ideas and come up with a common proposal.
It won't be ready for C++17 but may say Hello World in 2020.
 
10:13 AM
@Vogel612 Now why would that be...
15 mins ago, by Vogel612
I need to repcap for 9999 rep today...
 
Except that these aren't standards, but unstable experimental branches developed by Google and C++. So there is no actual problem.
 
I'd say it's close enough.
 
10:30 AM
I'm sorry to say, but IMHO more than 2 nested ternary operators is hell. I tend to avoid even 2 and refactor them in code reviews whenever I can. — InBetween 31 secs ago
 
@Duga That question should be closed IMHO.
 
0
Q: Storm custom stream grouping - capacity aware

Bhargav SarvepalliThis is the code to make a capacity aware stream grouping for storm topologies. Please review this. Summary method has to be called every ten minutes once. future task - This method and fields related will be separated from the grouping class and the results will be cached instead of a socket ...

 
@CaptainObvious CBL
 
@Mast Then VTC :)
 
@SimonAndréForsberg I did. Needs a couple more.
 
10:41 AM
in The Whiteboard, Apr 13 at 15:10, by Robert Harvey
I close about 90% of the questions tagged by Duga.
for the Programmers folks, @Duga is more of a "bad-question finder" than anything else
even the false-positives that are sent to the Programmers chat end up closed
 
Can we close the following question for unclear of what OP is asking?
1
Q: Convert id to short URL using recursion in PHP

zairwolf<?php /** * Convert id to short URL in PHP by zairwolf * * Demo: http://www.you4be.com/id2ShortURL.php * * Source: https://github.com/zairwolf/Algorithms/blob/master/id2ShortURL.php * * Author: Hai Zheng @ https://www.linkedin.com/in/zairwolf/ * */ //basic define $_charArr = "abcdefg...

> for($i=0;$i<$_len*3;$i++) echo "<br>$i:".id2ShortURL($i); baby jesus
 
11:01 AM
@Quill Needs more VTC indeed.
@SimonAndréForsberg Which is exactly why we're so glad having her here.
 
"it works but my code is awful, do you have advice to improve it" sounds like a job for CodeReview SEZeta 20 secs ago
 
Duga is great
 
Did @Duga consider running for moderator yet?
 
@skiwi Kind of.
 
@skiwi She doesn't have the required amount of reputation.
 
11:10 AM
You could make Duga post a question about her own code, but that would probably defeat the purpose of a chat bot.
Monitor, don't contribute.
Well, contribute by monitoring, but that gets meta very quickly.
 
@Mast I've already answered a question as @Duga, to build up the initial required reputation for chat.
 
@SimonAndréForsberg That was out of necessity.
TTRSEBIACOH
 
11:27 AM
I feel we're goign to need 10 moderator positions soon
 
Just dumping your code without explanation is off-topic at Code Review. — Mast 27 mins ago
I can't find a reference for that, acually
I downvote things like that, and comment, etc.... but don't close
 
@rolfl in extreme cases questions have been closed as unclear what you're asking
 
@rolfl Let me put it this way: where's his question?
 
in Code Review Moderator Election 2015, 1 min ago, by Vogel612
okay so we got 10 nominees now.
 
Without a question, it's UWYA
 
11:29 AM
@Mast not quite correct..
 
At least provide some context, I'll leave them if they do at least that.
 
8
Q: Why was the question too vague?

ChipsLettenI'm reasonably new here but wondered why this question got put on hold? The OP asks for a review of the code he had provided as the answer to another post on this site. (He includes a link to the original post.) His request seems to fall within this discussion of what is a code review and I wou...

^ I did elaborate here, that UWYA is actually never possible on CR, in the sense of "there is no question you ask"
posting a question to here is a question in and of itself
 
>While providing code is the first and foremost requirement that a question needs to fulfil, it's extremely important to provide additional context.
 
> First and foremost I did this not because the "question" was actually unclear. Basically closing the question as "unclear what you're asking" on this site is impossible, since any question asks for a codereview of all aspects by definition.
@Mast extremely important != mandatory
 
@Vogel612 Although it's technically true, I'd assume that to be a technicality only.
But I think I was leaving.
 
11:35 AM
0
Q: Class design patterns - best practices

Noooooobclass color { private $id = NULL; private $name = ''; private $rgb = NULL; private $cmy = NULL; private $wavelength = NULL; private $frequency = NULL; public function __construct($name, $rgb, $cmy, $wavelenght, $frequency) { setName($name); setRGB($rgb); setCMY($cmy); setWavelength($waveleng...

 
11:55 AM
0
Q: Record most recent 3 scores from the quiz on a different line for each user in python quiz

matthew grindeyimport random correct = 0 question = 0 Name = input('Welcome, Please Enter your Name ') Class = input ('What class are you in, A, B or C? ').upper() print("Well then "+ (Name) + " I'm going to ask you ten questions involving multiplication, addition and subtraction.") while question < 10: ...

0
Q: Layered Neural Network in Swift

P i I am designing a very basic layered neural network in Swift as an exercise. I currently got the network evaluating the response for a given stimulus by propagating the stimulus forwards through the layers and collecting the response at the output layer, which is assumed to be a single neuron. ...

0
Q: android - custom ListAdapter with ViewHolder Pattern

mina fawzyI write this class for custom list adapter for my list view , I use view holder pattern to make list view move more smooth could any one advice me if I do something wrong , or something I can refine my code example define my views , is there way more faster import android.content.Contex...

 
12:11 PM
0
Q: Layered Neural Network in Swift

P i I am designing a very basic layered neural network in Swift as an exercise. I currently got the network evaluating the response for a given stimulus by propagating the stimulus forwards through the layers and collecting the response at the output layer, which is assumed to be a single neuron. ...

Opinions on what to do with the last line of that question?
 
OK. Let's try that again.
Any vimmers here?
 
Not I.
 
getting some visual corruption when using it with screen Ic an't exlpain. :(
very infuriating to have that white line pop up every time i modify a line
 
Did you check through all of the preferences settings? Seems like that's the indicator of unsaved changes.
 
Definitely
It's not unsaved changes. I figure it has something to do with whitespace
(literally)
 
12:19 PM
\n vs \n\r ??
 
no clue
im' on a virtual machine to ubuntu so it shouldn't be an issue with newlines
 
From Windows?
Isn't there a VIM/VI Stack Exchange?
 
yeah, but I'm using vagrant through ssh which AFAIK transforms stuff
There is, but I wanted to ask here before having to make an account on another stack exchange
 
vi.stackexchange.com You don't have to make an account to use their chat rooms (if they're active in there at all)
 
I doubt they'd be active in their rooms.. that would involve using am ouse to open a web browser ;-)
4
 
12:22 PM
You can navigate the web without a mouse....
 
it was sarcasm
let me have my moment. :(
 
I starred it for you..
 
oh
;-;
sorry
 
Greetings, Programs.
I have no music in my library with the word Tuesday in the title, but I do have music by the group Til Tuesday.
 
Ruby Tuesday?
 
12:35 PM
@rolfl Not quite the same thing. Nice try though. :-)
 
(I've never heard this song--I only just googled it)
 
it was horrible
 
Blech.
The Scala plugin guys have already abandoned IDEA 14 in favor of the IDEA 15 EAP. Interesting.
 
12:59 PM
Monking
 
@Donald.McLean 15 EAP? What's EAP?
 
0
A: Layered Neural Network in Swift

nhgrifSpacing & Formatting Things like this can make your code easier to read: var weights = [Double] () var bias = random_01() unowned let net : Net unowned let layer : Layer let index : Int But it quickly becomes difficult to maintain. Each time we add a new variable, if its name...

assert(false, "Don't use assert like this!")
Roughly 2/3rds of that post outright ignores the "PS Don't comment on formatting/whitespace"
 
@SimonAndréForsberg Early Access P?
 
Moderators, I just flagged something for making it a CW
 
Morning!
 
1:09 PM
but it is only a portion of the code. I think that it should still be a CW though
 
@Malachi What is it?
 
0
A: Intense worksheet manipulations: what price did I pay for performance optimization?

paul bicaImproved version of GetMaxCell() - thanks @Mat's Mug and @ZigD (SO) for suggestions: It defaults to ActiveSheet.UsedRange if optional parameter is not sent If the range is empty it returns Cell( 1, 1 ) as default, instead of Nothing It requires an extra check for Len( Cell( 1, 1 ).Value2 ) = ...

I am not sure that the Mods are in yet.....
it is an update on a portion of the code that was reviewed, rather than a new question. that should fall under the CW clause of a Self Answer
I need some Coffee BRB
 
Coffee
6
 
seriously.....
wow, just wow.
they must be serious about coffee
 
@Malachi they are.
 
1:14 PM
Sounds like my kind of place
I could ask a question about the cup of coffee I'm drinking right now.
 
@EthanBierlein only if it is in one of these
LOL JK
 
@Morwenn Questions like which type of coffee increases my productiveness most?
@Malachi Windows 98 Upgrade!!
2
Is it out already?
 
I don't have a programming cup. I have a cup with math all over it.
 
I am going to run out of stars early today.....lol
@EthanBierlein that's a StackOverflow cup
 
Oh
Well, if it's an SO mug, I don't want it.
I want a CR mug
3
 
1:17 PM
Stack Overflow isn't for code reviews, sorry. I suggest you research quite significantly. Then, if you can craft an appropriate question with working code that fits the help center guidelines at Code Review Stack Exchange, you should submit a question there after deleting your question here. Stack Overflow is more about why a specific piece of code does not work as expected. — Anonymous just now
 
@skiwi I also have a Microsoft Access 97/2000/XP sitting on the shelf, along with 5.25" floppys still in the cling wrap
 
So I can drink my nice large cup of straight black coffee with a hint of CR.
2
Guys, my phone autocorrects "Morning" to "Monking" now.
7
 
nice
 
@skiwi *snerk*
 
1:34 PM
Sorry, and you question is? To speed-up saving (post also that code)? To improve your existing and actual code (better posting on Code Review)? Something else I didn't understand? — Adriano Repetti just now
 
Ready to reopen IMO
3
Q: Getting the average of one value from a list of tuples with PySpark

JasonAizkalnsGiven a list of tuples of the form, (a, b, c), is there a more direct or optimized for calculating the average of all the c's with PySpark? Below is what I have tended to do in the past, but I feel like there is a more direct/optimized approach? ds = sc.parallelize([(1,2,3), (4,5,6), (7,8,9)] to...

 
@SimonAndréForsberg Early Access Program - it's where they start releasing features as they are developed. This gives the brave customers willing to try them a chance to offer feedback and test out the software in a real world environment so that the final result is reasonably solid. Sometimes the EAPs have horrible bugs or are unstable, but JetBrains has a pretty good track record IMO.
One thing I really like about the IDEA 15 EAP - it correctly uses my second monitor.
 
0
Q: SQL Nested Selects

PeteI have the following sql query: SELECT w.[RECID], w.[PERSONNELNUMBER], ( SELECT TOP 1 [FIRSTNAME] FROM [dbo].[DIRPERSONNAME] AS d WHERE d.PERSON = w.PERSON ) AS FirstName, ( SELECT TOP 1 LASTNAME FROM [dbo].[DIRP...

0
Q: Replace an element of a List with a concrete id

AracemI want to replace an object of a List with another one. To find the item to replace I need to check the field Id of the object to find what item is the same. Here is my code: public void changeItemInformation(@NonNull Suggestion suggestion) { if (mSuggestions != null) { int itemChan...

0
Q: Basic Image Object

jiggunjerI'm practicing different ways of class design, so I'd like feedback on the design characteristics. Of course code practice comments are also welcome. It was a conscious decision to omit templates. My next version will use a class template to store image data, similar to CImg and boost::GIL. I in...

 
Over the last 20 years I've worked on a large number of platforms and technologies, and developed the ability to present code clearly. I am consistently able to return to this code in a year's time and pick up the trail effortlessly. On the other hand I've been working with Swift only for a few days. Commentary on the white-spacing dilutes the focus, as can already be seen. — P i 21 mins ago
 
1:56 PM
I didn't realize how active I've been for the past month ^^
 
@EthanBierlein don't worry, even if you remain that active it will still look flatter in the future :)
or rather... especially if you remain that active :)
 
@Vogel612 Yup.
 
Might this be a better question for codereview.stackexchange.com ? — Shotgun Ninja 45 secs ago
 
0
Q: Checking if an array is initialized and allocated in VB.NET

CBRF23Objective I am creating an add-in for a piece of software our company uses, so I'm working pretty extensively with that program's API. There are many COM object members which return or contain an array that I need to work with. Sometimes functions will return an uninitialized array (Null or "No...

 
Brb. Gonna go do some yard work.
 
2:01 PM
Ideally though, there would be an actual parameterized function. Looking again this is "example" or "hypothetical" code, rather than real code that you own or maintain. You'd probably get the reopen votes faster with another edit to make it less of a sample that looks like something you might have done in the past, and more like real working code. — Mat's Mug 37 secs ago
Thoughts?
 
So most of the things that will be in my exam tomorrow still look like magic to me
 
I am voting to leave this question closed. The tuple lambda is broken, what is d? Does the code work? — rolfl ♦ 11 secs ago
 
Review answers are allowed to review any or all aspects of your code. About the whitespace - as someone new to swift it is probably a good thing to be introduced to what industry standards (such as they are) are for code style in Swift. I have deleted all other comments on this post because they were obsolete/redundant. — rolfl ♦ 14 mins ago
Thanks.
 
no problem ;-)
@Mat'sMug - also, there are unmatched ( in the python
 
RE: His comment about there is no "better" or "worse"... my answer does mention multiple times the extra maintenance involved in keeping some of these things, and that others of these things are distracting
 
2:14 PM
Whitespace management is hard to quatify, especially with IDE's. I know eclipse, for example, can align all variable assignments on the = position.
one key-combination and you can 'columnate' the code.
 
A whopping 0 bytes is available on my OS drive
 
Time to empty the recycle bin?
 
Perhaps...
Or find something to delete
It's a 240GB SSD, I've got no clue how it becomes full
 
Intro to computing 101 - saving stuff takes up space on the drive ;-)
 
@skiwi Games ?
 
2:18 PM
hEY @rolfl will you check my SQL Mud? it's hard for me to figure out SQL sometimes when I don't have the Database to run the select against.
 
@rolfl Xcode doesn't do this. In Objective-C, Xcode can align the method arguments one the : (named paramaters).
Xcode isn't as nice with Swift arguments, but there's an existing convention for how to do it.
 
@Malachi No clue what you are talking about... Mud?
 
@200_success Amen
0
A: SQL Nested Selects

MalachiYou should be using Variables to do this DECLARE @FirstName AS VARCHAR(50) DECLARE @Surname AS VARCHAR(50) DECLARE @Structure AS INTEGER SET @FirstName = ( SELECT TOP 1 [FIRSTNAME] FROM [dbo].[DIRPERSONNAME] AS d INNER JOIN [dbo].[HCMWORKER] AS w ...

 
@nhgrif OK, so in swift it probably requires manual spacing to get his formatting, which is painful, and hard to maintain
 
Yes, it definitely does if you're using Xcode.
You can write Swift in any text editor though, save a .swift file, and then just swift YourSwiftFile.swift if you want.
I'm not aware of what IDE he's using, but almost everyone writing Swift right now is using Xcode.
And Xcode definitely doesn't do that. Xcode is from Apple. Swift is from Apple. Apple pretty well defines the standards & conventions for Swift/Objective-C.
This sort of alignment isn't "The Apple Way" (tm)
 
2:23 PM
Don't misunderstand me, I don't think it is any languages way other than things like COBOL....
 
dang it I forgot to change the 3rd variable's query
 
all I am saying is that I know that some people like it, and, as a result, some IDE's make it convenient.
@Malachi I don't like the answer at all.
 
Yeah. The alignment of = doesn't bother me as much as the weird spacing within the parenthesis.
Which actually, if anything Xcode makes that spacing more inconvenient than simply tapping space bar.
Xcode will autocomplete it out without the spaces.
You have to go out of your way big time to get those in there.
 
@rolfl why?
 
because it uses the same name for all different people
 
2:25 PM
I see it now....
 
also, it does not address the single-query request....
 
@rolfl eh, I should be focused on my day job instead of being half-there in two places...
 
I shoud start leaving comments that make no sense once the diamond is gone .... like: Let me mod-hammer close that for you!!, etc.
 
@rolfl so you stay mod?
 
Nope, I am all excited about taking a break, and actually being a regular user.
 
2:33 PM
@rolfl I find it pitty, but it's your good choice
 
@rolfl is that better?
I think that covers it, I think I should add some description though
 
@Malachi Somewhere you need HCMEMPLOYMENT but I don't see that
 
@Marc-Andre Most of them have already needed to move to my HDD drive... maybe there's still one or two around
 
oh buggar....give me a second.... I need 2 more tables/joins actually @rolfl
 
@JasonAizkalns - can you join us in chat: The 2nd monitorrolfl ♦ 12 secs ago
@Malachi Note that the third subselect is also a type of outer-join too.
 
2:41 PM
@rolfl I am not following? it could actually be joined on p.RECID, I ASSuME that p.RECID = w.RECID
How many times can I delete and undelete my answer?
 
(
    SELECT TOP 1
        ed.MARHRSTRUCTUREID AS Structure
    FROM [dbo].[HCMEMPLOYMENT] AS e
    INNER JOIN [dbo].[MARHCMEMPDETAILS] AS ed ON e.RECID = ed.EMPLOYMENT
    WHERE e.Worker = w.RECID
) AS Structure
Can return nothing..... leaving a null in the result.
 
no it has to return something.
> ed.MARHRSTRUCTUREID
that looks like a primary or foreign key to me
right?
ed.MarhrStructureID that uppercase stuff is driving me nuts...
 
That's okay. Stack Overflow is focused around solving specific programming problems; asking if there are any bugs you've missed would be a code review task, whereas getting help with resolving a bug found and researched during code review would be a specific programming problem. — Shotgun Ninja 42 secs ago
 
Welcome @JasonAizkalns
 
Hi @JasonAizkalns!
 
2:46 PM
Hey Jason, about your pyspark question....
 
will this ever return a null for the Structure column? — Malachi 12 secs ago
 
There are a number of issues with the code, you've corrected the d but there's also mis-matching parenthesis, etc.
The whole question strikes me as something you have typed in to the question box, and made mistakes, rather than something you have copied/pasted.
Trying to 'sanitize' the code too much?
 
0
Q: Play Market In App Billing

Ivan VlasovI want to add In App purchases to my application. In App in test mode works great, but there is no check on their authenticity. While googling some info about making server-side of In App I found out that server-side won't work correctly with test purchases. Below is a code of client-side and ser...

 
@rolfl Yes, that's a fair statement
 
It shows, and, on Code Review we require "real Code".
 
2:52 PM
/s/rewuire/require @rolfl
 
And I get that, but sometimes real code doesn't feel like it "translates" to the broader audience
next time i'll drink more coffee
 
CodeReview is a bit different @JasonAizkalns
 
@Malachi other way round...
 
@Vogel612 like that?
 
so does the stackexchange network have somewhere to ask this - that is, an "abstract" question so that it applies to a large audience, but one that is already solved?
 
2:55 PM
Post a self-answered question on Stack Overflow.
 
@JasonAizkalns can you link to your question for me please?
 
TTGTH
 
@JasonAizkalns - can you join us in chat: The 2nd monitorrolfl ♦ 17 mins ago
 
I would say that a well-formed CR Q&A is valuable to a wide audience, too.
 
2:57 PM
Hello
 
@JasonAizkalns okay, I see. if you give us the real code and context we can apply it to your code and let you know a better way to accomplish what you are doing, or help you with code formatting or whatever needs improvement. does that make sense?
 
@Mat'sMug agreed, it was an honest mistake of just trying to type of the question off-the-cuff without firing up the spark REPL.
 
@JasonAizkalns - I have edited, and reopened,.
4
Q: Average movie rankings

JasonAizkalnsGiven a list of tuples of the form, (a, b, c), is there a more direct or optimized for calculating the average of all the c's with PySpark? Below is what I have, but I feel like there is a more direct/optimized approach? Classic movie recommendation example, where each tuple is (userID, movieID,...

 
And vacuum-cleaned comments?
Yup
 
@JasonAizkalns The "value" of a question on Code Review is different than the value of questions on other sites. It's more about the process of reviewing and things to look for in your code that can be improved.
3
 
3:00 PM
Different yes, but I think our Q&As are more reusable than people think.
 
@rolfl my issue with using "average movie rankings" is that this is only one use case and i was trying to open it up to a larger audience. not going to fret about it.
 
@RubberDuck Oh absolutely, I agree.
 
@JasonAizkalns Your question may seem that way. The answers may not necessarily be so specific.
 
> Member for 3 years, 3 months
 
Consider this answer I wrote this morning which offers general advice to a specific chunk of code:
8
A: Layered Neural Network in Swift

nhgrifassert(false, "Don't use assert like this!") func input( x: [Double] ) -> Double { guard let inputLayer = layers.first else { return -2.0 } guard let outputLayer = layers.last else { return -3.0 } assert( inputLayer.neurons.count == x.count && outputLayer.neurons.count ...

 
3:02 PM
Clear proof that I agree with the mission and operation of CR.
 
@rolfl thank you for the repost. @nhgrif certainly possible, but just didn't want to limit the audience with the post title. there are times when i won't open a post on SO because of it's title, but only later to re-discover it in search. thank you for of the advice and discussion. really excited that CR is coming to life.
 
Cheers ;-)
 
@RubberDuck Yea, the same advice can be applied to many different parts of code.
In C++, the sentences 'using namespace std is evil' and 'goto is evil' are popular the moment somebody has the guts to use them.
 
There are very few languages any more where goto isn't evil.
 
@Donald.McLean BASIC
And Batch, probably.
 
3:10 PM
@Mast Notice I said "very few".
 
@Donald.McLean I know.
 
using namespace goto
2
 
@skiwi Silly.
 
What about goto namespace goto?
 
@rolfl how could you tell, what is the sign that this would return a null? You were right BTW.Normal
 
3:20 PM
@Malachi People normally only do convoluted obscure things when stuff goes missing, and you have to go digging for it.
When I see acrobatics like his, I know there's something odd, and the missing nulls is the only thing that makes sense
 
@rolfl so it's possible that the names are missing as well?
 
TOP 1 in a subselect? sure.
 
@rolfl thank you for that little Gem of knowledge, totally makes sense.
I fixed that answer. that is a lot of LEFT JOINs...lol
 
@Malachi Note that a left-join to a left-join may be a problem.
 
@mjolka
0
A: 2015 Community Moderator Election - Nomination Requests

Hosch250I think mjolka would be a good candidate. From my experience, he is helpful and friendly, and he lives on the other side of the world, so we could have a moderator around at 3:00 AM in the morning (CST/CDT).

 
3:29 PM
0
Q: Favicon Downloading Script

cade galtI use this file to download favicons and was wondering why it seems to be so complicated. I've noticed that people seem to save there favicons in many different types of ways. On top of that PHP allows you to download files in multiple ways. This leads to many code paths to simply download a f...

 
@rolfl I was thinking about that.
@rolfl is this the join you were talking about?
[dbo].[MARHCMEMPDETAILS] AS ed ON e.RECID = ed.EMPLOYMENT
it should be an INNER huh?
the rest all join to one of the main tables either w or p
 
    LEFT JOIN [dbo].[HCMEMPLOYMENT] AS e ON e.Worker = w.RECID
    LEFT JOIN [dbo].[MARHCMEMPDETAILS] AS ed ON e.RECID = ed.EMPLOYMENT
w outer-joins to e, and e outer-joins to ed.
I am not that familiar with ANSI joins, but I believe that is an edge case of chaos.
 
	LEFT JOIN [dbo].[HCMEMPLOYMENT] AS e ON e.Worker = w.RECID
	INNER JOIN [dbo].[MARHCMEMPDETAILS] AS ed ON e.RECID = ed.EMPLOYMENT
this looks right to me.
@EthanBierlein ah, ME TOO!!!
Yeah, that's what I started off with but because there can be multiple entries for the same person in the DIRPERSONNAME table, it gives me duplicated content. Unfortunately, I can't use group as some of the fields are slightly different, which is why I went with the top 1 nested select statement — Pete 4 mins ago
 
3:48 PM
I wish I could find something to program
 
I wish I could find something to answer.
 
TTQW
 
@EthanBierlein I have more programs I want to write than time to write them all.
 
Want me to write one for you?
 
@Donald.McLean What are some of those ideas?
 
3:51 PM
0
A: 2015 Community Moderator Election - Nomination Requests

MalachiI think that @JeroenVannevel would be a good Moderator as well. he has more than once been there to help me understand coding aspects and also had the patience to explain things to me through chat.

@JeroenVannevel ▲▲▲
oh wait....where is he?
 
On vacation.
 
@EthanBierlein I'm working on a tool to help me analyze log files from my server code.
 
@Hosch250 he was here 13 hours ago
@Mat'sMug anyone talk about the blog again? we should get one of those now, right?
 
I also have this idea for a new way to store information on computers.
 
@Donald.McLean That sounds interesting!
 
3:56 PM
@EthanBierlein The basic idea is that currently, information is stored in files in a file system. And the file format is decided by the app developers. Instead, information should be stored in a "data system" with an open-source/standardized API. This would make it possible for apps to access data stored by other apps and to change the way that data is stored to more accurately reflect some of the real-world connections between data.
 
Hmm. Cool!
 
There is one issue here, that I see.
 
I actually had an idea the other day.
 
In Win32, apps can access other data, but in the new Universal apps, each developer has to specify the specific locations it can read data from.
 
@EthanBierlein Ready to learn Scala?
 
3:58 PM
The idea is to keep malware in a sandbox.
 
It's an background process that runs and detects system events, and using an API for it, you can create programs that execute based on certain system events.
 
So, it can't infect the rest of the computer.
@EthanBierlein I think that already exists, doesn't it?
 
@rolfl looks like my Query is good, but the Data is bad. sounds like he will post the database structure tomorrow.
 
@Hosch250 Maybe, but I haven't found anything like what I've envisioned.
 
@Hosch250 The "data system" would probably have to be a server process. Connect to it using sockets.
 
3:59 PM
@EthanBierlein You'll probably have to look at the admin tools.
 

« first day (787 days earlier)      last day (3222 days later) »