@Hosch250 You have heard people say, “Love your neighbors and hate your enemies.” But I tell you to love your enemies and pray for anyone who mistreats you.
Floating point inaccuracies are really annoying. I understood that in its true sense while developing the next version of Point (this time I'm actually foolproofing my code). Before I upload it for review, I want a class that I wrote, called Numbers to be reviewed.
Numbers.java
package library....
AND (
(@SearchType = 'criminal' AND Code IN ('CRI', 'MAG', 'POA'))
OR (@SearchType = 'protection' AND Code IN ('FPO', 'STA', 'DOM'))
OR (@SearchType = 'both' AND Code IN ('CRI', 'MAG', 'POA', 'FPO', 'STA', 'DOM'))
)
that is what I figured out yesterday for simplifying my case statement/if statement
that would be interesting. I hypothesize that among sites which are large enough to not be micro* sites (for some value of questions), we're noticeably nicer
To throw some more accurate numbers into the mix:
Here is the query for the following results: http://data.stackexchange.com/codereview/query/358329#resultSets
As of 1 Sept 2015 14:26 UTC-4, there were the following breakdowns for questions (on SEDE, which is always behind):
Code Review:
2650...
begin
use [HCHB_COMMON]
declare @SupplyOrders table (
cam_groupid uniqueidentifier
)
insert into @SupplyOrders(cam_groupid) (
/* All desired order GUIDs with `union` in between selects: */
select '9F845AB4-29D3-4E88-896C-957508958E3'
);
select * from CustomerAppMessages
where
cam_groupid in (select cam_groupid from @SupplyOrders)
order by cam_inserted asc
end
@ambigram_maker that's why we don't write clever code. programmers spend 10% of their time writing code, 90% reading it. Code is at least twice as hard to debug than to write; if you write clever code that you don't know how you got to work, how do you expect to be able to debug it? ;-)
I have written nested while loops to read in some of the columns in a text file that looks like this:
comp id subreddit created ranks recorded_at rank_length
0 3ckf7b pics 1436373189.0 [1, 1, 3, 5] [1436392502, 1436396101, 1436399701, 1436403301] 4.0
0 3csv79 Upli...
Just wondering if there was someone out there that could offer help in optimizing my script which "derpifies" images.
<?php
/**
* If you don't understand what this does
* you have no hope as a programmer.
*
*/
function usage ( )
{
// Ahhh the marvels of echo, such a wonderful tool
// yet...
Please indicate what problems you are having (compile errors, runtime segfaults, etc.); if you are just interested in a code review, that's a separate stack exchange — Foon7 secs ago
I have a javascript (jQuery) 'init' file with various variables/event handlers and functions that are currently written in no particular order. I've read that it's good to organise these by declaring variables at the top of the file, using an init function and binding event handlers etc. Here is ...
if this code is working as intended and you want it reviewed for e.g. readability, best practices etc. Feel free to bring it over to codereview.stackechange.com — Zak44 secs ago
@Zak No. It's a valid question, just presented … um… ungracefully. Let's just drop the issue. Don't feed the troll by taking further provocative action.
Given the care and effort that has been put into performance within the JVM and Java standard libraries, it is a virtual certainty that the second implementation will be faster.
However, does it really matter? Worrying about optimization is generally only useful if the system performance is inad...
Hey thanks for the feedback, appreciate the response! Been awhile the class has evolved a bit since then. But the general feedback is always good. — Justin3 hours ago
I have a Windows 10 Universal App (IoT) project with a class called SignalQueue. My class requires a file called MyFile.txt so I want to make sure it exists in the constructor and if it does not, then I create it. There is only an Async method of creating a file in a Windows Universal App.
Is m...
I got a new laptop within the last month or so and have started my own adult entertainment website. I have a TON of success on here, but that's besides the point. Recently I have had more Comcast guys show up at my door asking me if I need all sorts of work done. They seem kind of like creeps an...
If you wanna work with LINQ, probably the code below could help you:
public IList<Layer> GetLayers()
{
IList<Layer> data = Db.GetLayers();
IList<Layer> hierarcy = new List<Layer>();
data.Where(x => x.ParentId == 0).ToList().ForEach(x => hierarcy.Add(x...
This question seems too broad, and I don't think it's to do with computer hardware or software. It would be better on the security SE maybe — Mrfunny74438 mins ago
This is more a question for stackexchange CodeReview. Add your question there and I can write you an answer and describe my jsFiddle. Please have a look at this fiddle so you'll get an idead how you could refactor your code. — AWolf39 secs ago
@Mat'sMug I don't think it actually cares about the ascending count -- you can write whatever number you fancy. Ergo: you don't have to think about re-ordering
This is really more of a Code Review question, which is a separate Stack Exchange site, rather than a Stack Overflow question. Whilst your code is indeed terrible, it's not an inherently bad code review question. — Puppy57 secs ago
Is it really already September? Time flies so fast in the Groovy ecosystem, and although the northern hemisphere was taking some Summer vacation breaks (at least that’s what I did!) there was quite a bit of interesting content published! Regarding events, after successful and busy Greach, GR8Conf US/EU conferences, we’re getting ready for September’s
So... Is it a bad idea to create a model in MVC that contains a list? For the life of me I'm having trouble coming up with a sensible way to add/remove items from it.
I just posted a comment on this Javascript code here.
The comment reads:
> This code is horrendous. There are style issues everywhere, lack of whitespace, variable and function names are bad, there are awful comments splattered all over the place, and it's designed in a very rigid, functional way. Honestly, this code looks like someone smashed a keyboard until something that worked came out. Your profile description of "very good programmer" is not accurate in any way whatsoever. Do you even know any other languages?
First of all, some simple statistics.
codereview.stackexchange.com
26490 - questions asked
345 - rated negatively
1.3% (negative of the total)
tex.stackexchange.com
94800 - questions asked
150 - rated negatively
0.16% (negative of the total)
I counted pages, this is why the number of quest...
So... Really. That asp MVC thing.... Anyone ever modeled a complex object before? I don't really want to manage its list of children in a different controller/view.
I have an index page which gets passed $_POST['timestart'] and $_POST['timeend'] variables. In addition, I have a cart page that has variables passed to it from the index page, and it passes variables back (with header) to the index page depending on what is done. In order to retain the initial...
First of all, some simple statistics. (...)
I participate in several other SE sites, and until today I only had this vague feeling that TeX is kinda welcoming and Codereview is not so much.
I understand that you have good intentions by posting statistics, but there are a couple of probl...