« first day (810 days earlier)      last day (1427 days later) » 

10:03 AM
Greetings
@Quill By the name, I would say he is Brazillian
 
@IsmaelMiguel Lol, nope.
Usernames are deceptive like that.
 
0
Q: Do I need to add a level of pointer when I send FILE * pMyFiles[3] through functions?

Jaime DaviuI`m trying to make a code that deals with files from functions instead of from main. As far as I know, when you pass a pointer to a function and you want to modify its contents, you must add a lvel of pointer. If you call from that another function, you add one more level. That works for example ...

 
It wouldn't surprise me.
He codes like a Brazillian
Speaks like a Brazillian
Has a weird name
That's Brazillian to me!
 
@CaptainObvious He has his includes INSIDE the program?
 
10:10 AM
@IsmaelMiguel Following that logic, where am I from according to your deduction?
 
@Mast No idea. Maybe some country with a timezone that is UTC+01:00 or more
 
Monking @All
 
Monking
 
I've just finished my prototype script that does the following:
Auto collects the table names and column names from a MySQL DB
Creates a list of said Table names as links
Clicking on the link takes you to a page with the data from the Table nicely formatted in a data table
 
Nice
Question: how secure is it?
 
10:24 AM
That is a good question
It uses itself to whitelist available tables to select
there are some small security issues right now because im not escaping anything
 
Is it restricted to a single database?
 
For the moment yes
 
Well, you should escape from the begginning
 
But it is also very easy to expand to say a full blown admin section
 
10:26 AM
The script is very small, 4 functions
ill grab some screen shots
 
Are you trying to re-write PHPMyAdmin?
 
No
It was something i had thought about before
 
@DeepSpace About "is it correct?" type of questions, please read A Guide to Code Review for Stack Overflow usersSimon André Forsberg 52 secs ago
 
"Would it be possible to auto generate data tables from just inputting the db info "
It is possible
 
10:29 AM
The concern is that it isn't secure
 
Well, it is secure if i write a few more lines
 
You used Datatables!
That's a cleaver idea
 
You would need to put it behind some sort of password protection
 
@folkol It maybe could, except that... there's no code here. That is a quite important detail for Code Review, as mentioned in A Guide to Code Review for Stack Overflow usersSimon André Forsberg 52 secs ago
 
And it only took 3mins!
i surprised myself with that lol
 
10:31 AM
Wow!
 
The same thing without the auto table select took me 8 months :/
 
@Mat'sMug "should" and "should".... I'm not sure what code "should" belong there and which that should not. I have decided to have those repos under my own user, as I am the one making them.
 
i wrote the whole pagination, filter by, orderby code
 
0
Q: using JSON for passing variable from query to javascript?

Nasir HussainI want to use hicharts graph for that i have to transfer my PHP data to javascript, i am stuck don't know how to do it, PHP code is $sql= "SELECT COUNT(`Variant`) AS tsold FROM `vehicle_sold` GROUP BY MONTH(`sold_date`)" ; $result = mysqli_query($conn,$sql); $i=0; $arr =array(); while($r...

 
10:35 AM
in PHP !
 
@200_success / @Simon - check my flags, please... thoughts?
 
I feel a little "stalked".
 
Haha
 
@CodeX The whole thing? o.O
 
10:38 AM
Yes
 
im trying to get a screenshot to show you
 
@rolfl I thought flags were anonymous?
 
Because i thought thats what i had to do lol
 
You just spit the whole table and use Datatables to do it all for you
 
10:39 AM
@Mast Not when I make them "not".
 
Ah, signed custom flags?
 
@IsmaelMiguel Thats what i did this time it took me 3mins, before i wrote mulitple functions to handle it all from PHP HTML CSS..
Looks beautiful though imo
 
@CodeX It really looks cool
 
Thanks :)
 
Is it safe?
 
10:42 AM
This one is yes
I wrote my own theme code aswell for this, its not very efficient it was my "starter" project to learn PDO PHP
 
As long as you use prepared statements, I think you will be alright with it
 
@Mast comment flags usually are (you have to use some tricks to find out the flagger). other flags are not.
 
@IsmaelMiguel I enjoy to prepare(); bind(); execute();
 
I honestly don't, but it is the safest way. And the most performant if you want to repeat the same query
 
Have you got databases on your local machine?
 
10:49 AM
Yes, but XAMPP is off now
 
Ok, do you want to try this script?
 
I can only try it in almost 2 hours
 
Lets go to another room, we are flooding this one a bit
2
 
Pick one, ping me there
 
@rolfl can you take a look at this answer? I'm wondering what on earth it has to do with the question
0
A: LEFT JOIN and COUNT with different number of rows

user78577It appears that it is impossible to use an ORDER BY on a GROUP BY summarisation. My fundamental logic is flawed. I will need to run the following subquery. ex :SELECT p.*, pp.price FROM products p LEFT JOIN ( SELECT price FROM product_price ORDER BY date_updated DESC ) pp ON p.product_id =...

 
10:54 AM
looking
 
awaiting flag
 
There's 1 thing: it's about MySQL
 
You did not check before you chatted.
Oh, @SimonAndréForsberg - you know about the time-delay on NAA flags?
(that's not an answer, by the way).
 
ah, time delay, right.
I did read the answer and I just wanted to be sure that it really had absolutely nothing to do with anything.
 
@SimonAndréForsberg I flagged that one recently.
 
10:57 AM
@SimonAndréForsberg It has absolutely nothing to do with anything.
 
That ^^
 
thanks. poof, gone.
 
well, it was SQL at least...
 
@SimonAndréForsberg That's what I said
 
10:59 AM
right
 
right
 
left?
 
Left
 
11:15 AM
You've earned the "cast close & reopen votes" privilege! Learn more about it in the help center. (MSE)
 
0
Q: Removing duplicate operations and unnecessary anonymous functions

benhowdle89Current code (ES6): getSelectedItem() { let result; return ((result = this.getItems().map((s) => { return Util.isItemSelected(s.toJSON()) ? s.toJSON() : false; }).filter(Boolean)) && result.length) ? result[0] : null; }, Apart from a very generic, "How can I improve this?",...

 
That's tickling my funny bone.... rolfl is now completed.
 
@rolfl That sounds a little ........ weird ..........
 
lol congrats @SimonAndréForsberg @rolfl
 
11:19 AM
@rolfl Does that mean that your monkey-business is finished?
 
@rolfl Good timing :)
I'm 2 votes away from bronze discussion.
 
11:45 AM
I will reward the first person to get a gold steward badge on the meta reopen-review queue ;-) meta.codereview.stackexchange.com/review/reopen/stats
 
Greetings, Programs.
 
0
Q: how to change JSON format in javascript?

Nasir Hussainvar arr = <?php echo json_encode($arr); ?>; document.write( JSON.stringify(arr) ); Using JSON i passed array to Javascript it gives me data in below format [["1"],["2"],["7"],["11"],["6"],["1"]] I want above information for below code!!!! its sells of vehicle per month in year. series: [...

 
@CaptainObvious nope, not even close
 
@Donald.McLean Greetings user
 
11:48 AM
@Duga Don't let that be posted here! It's a request to change functionality.
 
hello friends
 
@DanPantry Greetings
 
Samo Prelog on July 21, 2015
Do you have an ASP.NET MVC 5 project and hate how slow aspnet_compiler.exe is? Do you feel you're missing out on all the meta-programming goodies DNX brings to the table? We have a solution for you. Enter StackExchange.Precompilation.
 
0
Q: How to create a simple slider

Markus HaynerI have build the following carousel but when I reach the last image or from first image I want to go back I want to show the image needs to show. For example when you reach the last image when you click right arrow to show the first image. Have anyone any idea how to improve this? https://jsfid...

0
Q: Computing age in days with a graphical tool in Java

coderoddeI was in the mood for doing some GUI coding, and eventually I came with this simple program: you enter a date, press the button, and the program tells you temporal difference in days between the input date and current date. package net.coderodde.gui.date; import java.awt.Dimension; import java...

 
This question is not suitable for Code Review because the question is about adding/fixing functionality, not about improving what's there. Please see Be careful when recommending Code Reviewrolfl 28 secs ago
3
 
12:13 PM
@rolfl Planning on rewarding yourself?
@Duga @rolfl What about linking to A guide to CR for SO users ? (I guess both gets the message across in this case though)
 
Heh...
@Phrancis. Thanks! I promise I will next time. For this answer is not needed anymore, since nhgrif already did a stellar job hereMario Zannone 4 hours ago
 
@rolfl "This Connection is Untrusted" wut?
 
@JohnSnow just @rolfl linking to https instead of http
 
ah
Well, I couldn't help with that even if I wanted to :/
 
12:45 PM
This Connection is Untrusted

You have asked Firefox to connect securely to meta.codereview.stackexchange.com, but we can't confirm that your connection is secure.
WTH this time...
 
posted on July 23, 2015 by Samo Prelog

One of the main guidelines at Stack Exchange is that we are open by default. So, I'm excited to announce that we're open-sourcing StackExchange.Precompilation, a tool to help you bring faster pre-compile times and Roslyn (DNX inspired) goodies to your old ASP.NET MVC 5 project.

 
0
Q: Returning the length of the File in B/KB/MB

makas we know the method length() in the File returns the length of a file in Bytes so i just need to turn that into b/kb/mb as seen in the Windows Explorer so i just end up with the Code Below, let me know if it can be optimize or the logic can be improve... public static String getFileSize(File ...

 
@Mast known problem
all child metas for subdomain sites are borken
 
@rolfl Like that's going to happen the next 10 years.
 
because wildcard certs..
 
12:46 PM
@Vogel612 Fiddling with the address helps a little.
 
@Mast We can live in hope....
 
It's probably on HTTP now instead of HTTPS, but hey
 
see also:
4
Q: SSL Certificate not valid here

Vogel612Just coming here from the main page chrome smashed my face with a large yellow screen: "The ssl certificate is not valid for this site" Unfortunatly I didn't have the quick though to snip it, but I got a snippet from my "omnibox", aka. navigation bar: It seems that chrome doesn't like the dot...

 
@rolfl You're hoping so many questions will need re-opening?
 
It's all about numbers.... How about, I offer a reward fro any steward badge on meta.
 
12:49 PM
That's, better.
 
How much better? 9 years?
 
@rolfl 8, I think.
Close is at 59 total.
But you handled 27 of those, so big chance you'll need to reward yourself :P
 
Hmm... kind of disappointed this got a downvote:
-1
Q: Second attempt at Hangman in Swift

JaredI recently posted my Hangman game, and got some amazing feedback! The main thing suggested was to create a word generator that could read JSON files so that my hangman brain class didn't have to generate the word used on top of handling gameplay. To do this, I created the HangmanWordGenerator cla...

 
@SimonAndréForsberg 3 done.
 
12:56 PM
yup, noticed. @Duga informs about them all. I was just considering changing it to post in this room, but I got a feeling that might be too spammy
 
Open to suggestions on what to do with the repo as a whole - how it can be used effectively.
 
I have no idea.
 
that ^^^
 
@rolfl Make everyone send in their contribution to the challenges by Git.
Make it a Hub of GitHubs.
 
@Mast No.
The git repo needs to be a useful tool, not a hurdle.
2
 
12:59 PM
If you want it to be a tool, what problem do you want it to solve?
 
the main site here needs to be the prime repository for reviews.
 
Of-course, it should be a bonus, not a replacement.
 
@Mast Exactly.... what problem does a github account solve?
 
Share code.
Find code of the same author.
 
From a code review Site perspective, it is hard to think of one.
 
1:00 PM
Well, the code posted here is just one snapshot.
 
the only thing I can think of is chatroom rules
 
If people are interested in 'following' the code, they should go to the Git
 
as well as collaborative CR-related projects
 
Which may or may not help with user retention.
 
If there was a meaningful problem that this site faces, that can be solved by linking in github, we would have used what we have already, and it will gather its own steam, and we won't sit here thinking of reasons to use it.
it would be obvious
 
1:02 PM
@rolfl Pick one eligible:
51
Q: What would you say is the biggest problem Code Review is facing as a site as of June 2015?

200_successHopefully, by raising concerns, we may generate some ideas for improving the site!

 
And, since we have not been sitting here thinking "I wish we could use github to solve site issues", it's a case of Q.E.D.
 
We could write a bunch of tools to help us with reviewing code. Share that on a Git.
 
I think a big reason for why the Github organization hasn't been used much is that we just haven't found a clear usage of it. It seems reasonable to me that people posts their code and repos under their own accounts, and for some collaborative projects (Cardshifter and Rubberduck, primarily) specific organizations can be created.
 
That ^^^
 
^^^
 
1:03 PM
Where it has been useful to have team collaborations, the teams have formed their own community for that specific purpose.
 
Monking
 
@Mast github.com/Zomis/SE-Scripts is planned to be a collection of that.
 
Monking
 
that's the way it's designed to work, and it does.
 
@Mat'sMug Hello!
 
1:04 PM
@SimonAndréForsberg There could be a git linking towards all the others.
@SimonAndréForsberg Nice.
 
A CR-specific GitHub organization is a bit problematic as we're coding in so many different languages.
 
Since when does Git have a problem with that?
 
@Mast then a meta post suffices, to link to each github repo
 
@Mast yes, I think that's about it.
 
So, my perspective, is that a bunch of people thought there may be value in it. The effort to create and maintain it is small, and it leaves the door open for an aha moment.... that moment has not yet arrived, but let's leave the brainstorm barn door open.
 
1:06 PM
@SimonAndréForsberg Which is why we have language teams.
 
@Mat'sMug Wouldn't that be abusing the meta?
 
No,
 
@Mast technically, it's not a github problem at all. it's just a bit... strange... what does Groovy coders and Python coders have in common, except both happens to be members on CR?
 
Meta is "all things about the site that are not requests for code reviews, or the reviews themselves"
 
@rolfl About the site, not about projects.
 
1:07 PM
@rolfl agreed
@SirPython ... which hasn't been used, really.
 
As long as it links to tools helping with CR, it's valid. If it's a list to other kind of projects, it wouldn't fit IMHO.
 
@Mast If there's a project "spawned" from the site's community, and that community identifies with Code Review in some way, then I think it's fine to link in to meta.
I LOVE that duga, TCG, Rubberduck, etc. are associated with the site. It's a huge boost to the community.
3
 
True.
 
Monking
 
@Malachi Hello!
 
1:10 PM
Problem is, what is and what isn't a 'project spawned from the site's community'.
Is it a go the moment 2 CR regulars have a project together?
 
@Mast isn't that detailstuff?
I think we / you can think about the details when it happens
 
@Vogel612 It's the stuff that prevent stuff from going off-topic before it starts.
 
no need to engineer it now.
 
@Vogel612 says the German engineering guy ;-)
 
I did also realize the irony in that
 
1:13 PM
Thank you @rolfl
 
0
Q: Remove the extension from the Name of the File

maklet me know if given code can be improved or optimized... public static String getFileNameWithoutExtensiotn(File file) { String fileName = null; if (file.getName().startsWith(".")) {//if starts with "." like .htaccess fileName = file.getName(); } else { try { ...

 
0
Q: Do I need to add a level of pointer when I send FILE * pMyFiles[3] through functions?

Jaime DaviuI`m trying to make a code that deals with files from functions instead of from main. As far as I know, when you pass a pointer to a function and you want to modify its contents, you must add a lvel of pointer. If you call from that another function, you add one more level. That works for example ...

This question is a bit problematic, but I'm not sure what to do with it.
 
@SimonAndréForsberg you should add your cool Flag Desktop Notifications Git to the community Repo
 
Heya
 
@Malachi I could, but why should I?
 
1:20 PM
Can someone guide me on how should I write a CR question where I want a full project Code Review
 
Hi @ItachiUchiha and @Unihedron
 
@SimonAndréForsberg ?
Hi!
 
ahh, idk, why not?
 
@SimonAndréForsberg heya
 
@ItachiUchiha There's a meta on that.
 
1:20 PM
@ItachiUchiha Step 1. Make sure that the project fits in 30k characters.
 
@Mast Can you link it to me??
 
@Malachi because I'd say that I wrote it, not the community.
Step 2. Post it.
 
31
Q: How to get the best value out of Code Review - Asking Questions

rolfl I have a project I am working on, and I would like some, or all of it reviewed, how can I ask for this review on Code Review in a way that produces the best possible value? This is not about a question being on-topic, or off topic. Rather, this is about making on-topic questions great qu...

 
@SimonAndréForsberg how about, it would be beneficial to the community so you want to share it?
 
@SimonAndréForsberg @ItachiUchiha If it's larger, split it up.
 
1:23 PM
@Malachi I think it's normal if people want to have their code under their own username, people can always do PR's
 
@SimonAndréForsberg It is a very small project, please have a look at it
 
Or fork it if the maintainer becomes inactive
 
I just want some reviews on the coding standards
 
@Malachi which is why I have already posted it for review... and announced it in chat etc, and it is already on github. I don't see how having it on the community github would help with that
 
I think I get it... I need coffee before I start chatting in the morning....
 
1:24 PM
@ItachiUchiha In that case, select a small part of your project, such as only a specific class, and post it for review. Then use what you learn on other parts of the project as well
 
hmm
I guess that would work..
 
from what I can see, your project is too big to expect a reasonable review of.
post it in small parts, one thing at a time
 
Actually the different parts are connected
the difficult part is to break it into small parts independent of each other :P
 
If it's really a tangled mess in a massive project... then that's a big issue
 
it doesn't have to be independent to be posted for review
just write that it's one part of your big project, and link to your github project for those interested
 
1:28 PM
@ItachiUchiha Then you already have your bad practice right there ;P
 
for something like a media player, I can totally understand that it's very connected
 
Why did 3 people VTC the question I linked?
0
Q: Do I need to add a level of pointer when I send FILE * pMyFiles[3] through functions?

Jaime DaviuI`m trying to make a code that deals with files from functions instead of from main. As far as I know, when you pass a pointer to a function and you want to modify its contents, you must add a lvel of pointer. If you call from that another function, you add one more level. That works for example ...

That one
I don't think they're code is broken
 
@SimonAndréForsberg I kinda disagree on that.
But I was mostly joking.
 
It's not a good question, but it's not broken as far as I see from reading the post
 
The project doesn't look that big though, does it?
 
1:29 PM
No one has posted a comment either
 
@jacwah there's a reason I skipped that one in the review queue. The reason is of course: I don't vote :(
 
@jacwah I cancelled one of the flags. It's not broken.
 
@SimonAndréForsberg Thanks for your valuable inputs. I will post something and come back!
 
It's clear that OP doesn't have a good understanding of pointers, but that shouldn't be a reason to close it
 
@jacwah Code Review won't explain code either, that is also off-topic. but it looks like if that question is worded right that it may be on-topic for SO
 
1:31 PM
1) Question gets closed.
2) We'll spitfire it open again.
3) Somebody posts a meta.
 
@Malachi Sure, but why VTC for broken code?
 
@jacwah Indeed, it's not broken.
 
@ItachiUchiha One advice I can give is that parts that can operate independently, should be written independently
 
that user doesn't understand why the one works and the other doesn't.
 
Your actual media player has nothing to do with FXML and the corresponding controllers for example
You need to use the media player in the controller of course
 
1:32 PM
> But I've realised that my code compiles and runs without problems in two versions: adding a level of pointer and without it. That makes be suspicious of both two and of my level of C.
 
@Mast It could be that they copied the code part and forgot the unformatted part. It won't run if you do that :P
 
@skiwi I think I already have those things separated
 
@Malachi As I read it, both version work, but OP doesn't understand why
 
They work, but the OP doesn't know why.
 
Could someone add a comment asking for more info? I'm not on my regular computer..
 
1:35 PM
@ItachiUchiha My first glance is that they're too tightly coupled (but I may be wrong), using JavaFX does introduce maintainability issues
 
user image
2
 
@Malachi My code doesn't work and I know why; My code does work and I do know why
 
@skiwi Though my project follows MVC, that might still be a case.
 
@ItachiUchiha What complicates things more is that there are multiple "views" on MVC
Nobody seems to agree on what controllers should do :D
 
0
Q: Sort Files By the Type of File

maki need to sort files by the type of the File. for accomplishing the task first i wrote the Code as given below... private static Comparator SortByFileType() { return Comparator.comparing((File f) -> { String probeContentType = null; try { probeContentType = Files...

 
1:37 PM
@Malachi You should have an email.
 
@skiwi For me with JavaScript: My code Works and I don't know why. My code doesn't work and I know why. ;P
 
@skiwi Can't agree more on that ;)
 
Has anyone tried MVVM in Java?
Also, my first review:
0
A: Generating Position

MastFirst things first. Pascal is a very readable language, if written clearly. One of the main reasons of writing Pascal is because you want readable code. I'll start with some styling and naming, the actual calculations will be handled in the second part. Style Regardless of which standard you fo...

 
JavaFX invites to putting a lot of logic in the controllers, but that's not a necessity, it just invites to it. JavaFX also has an MVP pattern, so MVC is kinda impossible to implement; The FXML is very, very dumb and the controllers handles the FXML. They are fairly interlaced.
And since the Controllers has to handle the FXML, that's where the invitation to putting too much logic in the controllers come in
Which is also an MVP-pattern...
 
I've never really understood the difference between MVC and MVP and MVVP...
 
1:42 PM
/Rant
 
@SimonAndréForsberg I'd explain it to you, but I don't really care about UI one way or another.
 
that ^^ :)
 
@Quill @SirPython I expect you to leave the OP a comment why you think they're code is broken
 
I don't know how MVVP works but I know MVC and MVP
 
Maybe send this over to code review. — Trobbins 38 secs ago
 
1:48 PM
What's MVP stand for?
Besides "minimal viable product"
 
Model - View - Presenter
 
And "most valuable player"
What's the difference between Present and Controller?
 
Microsoft Valve Pipe
 
presenter is only responsible for the view
 
What's the view responsible for...?
 
1:49 PM
To put it short: The presenter is the visual.
It ONLY displays the visuals
 
It renders the view
 
What does the controller do?
 
When something happens in the visual, all it can do is tell the controller
 
Controller also has the underline code for interactions
 
Oh
 
1:50 PM
Well, you should jump into the Java room and consult @fge
he knows it better than me ;)
 
In MVP, the controller handles what's gonna happen when someone interacts with the presenter
 
I might guide you the other way
 
I honestly think Madara is a better MV* teacher
 
@Timo Microsoft Valve, now that would be interesting ;)
 
@JohnSnow true
 
1:53 PM
MicroValvePipes
 
I'm surprised this question has only gotten one answer so far:
14
Q: Translating the Rubberduck - Übersetzen der Gummiente - Part 1: Modelling

Vogel612So I have committed to making a German translation for the guys over at Rubberduck, which is localized via .resx files. Now these files are basically XML-Files with a certain, rather simple document structure: <root> <!-- Snip --> <data name="Resource_Key"> <value>Resource Value</value

 
@nhgrif I sure do did
 
@jacwah Of which post are you speaking?
 
I answered it already! thank you. I better get some Java books...lol
 
0
Q: Do I need to add a level of pointer when I send FILE * pMyFiles[3] through functions?

Jaime DaviuI`m trying to make a code that deals with files from functions instead of from main. As far as I know, when you pass a pointer to a function and you want to modify its contents, you must add a lvel of pointer. If you call from that another function, you add one more level. That works for example ...

 
1:58 PM
@Malachi For what it's worth, I've seen the company buy books for people.
 
@jacwah I see. Thank you for pointing that out. From now on, I will leave a comment.
 
@nhgrif I like that
 
@SirPython I've written above that I don't think it's off topic
At least not broken
26 mins ago, by jacwah
> But I've realised that my code compiles and runs without problems in two versions: adding a level of pointer and without it. That makes be suspicious of both two and of my level of C.
26 mins ago, by jacwah
@Malachi As I read it, both version work, but OP doesn't understand why
 

« first day (810 days earlier)      last day (1427 days later) »