« first day (528 days earlier)      last day (3488 days later) » 

2:00 PM
> The API will be implemented across many types of devices, with varying memory capacity. I want to know whether I can just allocate a buffer for found access points once and then forget about it, or whether I need to handle this via dynamic memory allocation.
I don't think the devices will have that much memory.
 
"Use a good compression algorithm"
Probably won't cut it either
 
Kolmogorov or whatever complexity rears its head
 
WTF just happened here
I'm doing template expansion...
I had this nice little template:
grant codeBase "file:./[artifactId]-[version].jar" {
	permission java.security.AllPermission;
};

grant {
	//mod permissions
};
 
I'm always impressed when I have many upvotes on an answer that covers only white spaces
 
SSID can be some random hex string, so I can't compress them.
 
2:02 PM
I managed to get this as output from a simple replacement
gca0.4-SNAPSHOTd0.4-SNAPSHOTh0.4-SNAPSHOTft0.4-SNAPSHOT0.4-SNAPSHOT-0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOTca0.4-SNAPSHOTd0.4-SNAPSHOTh0.4-SNAPSHOTft0.4-SNAPSHOT0.4-SNAPSHOT-0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOTca0.4-SNAPSHOTd0.4-SNAPSHOTh0.4-SNAPSHOTft0.4-SNAPSHOT0.4-SNAPSHOT-0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOT ca0.4-SNAPSHOTd0.4-SNAPSHOTh0.4-SNAPSHOTft0.4-SNAPSHOT0.4-SNAPSHOT-0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOT0.4-SNAPSHOTca0.4-SNAPSHOTd
 
netbeans being a jerk again?
 
I could try, but that leads to a worse case of out of memory.
 
@Vogel612 Am using some Maven plugin here
@Pimgd When running out of memory is the worst case... then it's bad :)
 
@skiwi ... plus, compressing requires me to allocate a static big buffer that one can fit compressed data in...
So it's also inefficient
... why does "kibibytes" sound silly
 
What's that? the exact 1000 bytes?
 
2:08 PM
That'd be 1024 bytes.
Kilobyte = 1000 bytes
Kibibyte = 1024 bytes
... I wish Kibibyte would become mainstream since you don't get this stupid thing where you buy a 2 Terabyte harddrive, just to find out it's actually only 1950 Gibibytes or something
 
Ah ok
I knew something was up with it
Maybe the example here on SO does not use @version@ over [version] for no reason
 
@Pimgd At the time I have learned this, a kilobyte had been 1024 bytes. But that time is gone.
 
Well they taught you wrong
SI units!
Kilo = 1000
The kibibyte is a multiple of the unit byte for quantities of digital information. The binary prefix kibi means 1024, therefore 1 kibibyte is 1024 bytes. The unit symbol for the kibibyte is KiB. The unit was established by the International Electrotechnical Commission (IEC) in 1998, has been accepted for use by all major standards organizations, and is part of the International System of Quantities. The kibibyte was designed to replace the kilobyte in some computer science contexts, where kilobyte used to mean 1024 bytes. The interpretation of the kilobyte to denote 1024 bytes, conflicting with...
kiiibiiibyteee...
it still sounds weird.
 
The unit kilobyte is commonly used to indicate either 1000 or 1024 bytes. The value 1024 originated as compromise technical jargon for the byte multiples that needed to be expressed by powers of 2, but lacked a convenient name.
The kilobyte is a multiple of the unit byte for digital information. Although the SI prefix kilo- means 1000, the term kilobyte and symbol KB have historically been used to refer to either 1024 (210) bytes or 1000 (103) bytes, dependent upon context, in the fields of computer science and information technology. For example, when referring to data transfer rates and hard disk drive storage size, "kilobyte" means 1000 (103) bytes. On the other hand, random-access memory capacity such as CPU cache measurements are always stated in multiples of 1024 (210) bytes, due to memory's binary addressing. In...
 
But that's confusing. I don't like confusing things.
 
2:13 PM
Thats the new world. ^^^
;-)
 
I don't wanna remember when a kilobyte is 1000 and when it's 1024 for the same reason I don't wanna deal with feet, yards and miles
 
Kibimeter?
3
 
Then use centimeter, meter and kilometer ;-)
Need to maintain some VB6 application now.
 
@skiwi and it turns out it's for measuring the amount of whining about kibi prefixes in a conversation
 
JetBrains is offering a free license to students. jetbrains.com/student
 
2:16 PM
@Donald.McLean It becomes more interesting now...
 
@Pimgd Technically, a kilobyte is always 1000 bytes. A kibibyte is 1024 bytes.
 
@Donald.McLean "Except when it's not"
 
Wait, ReSharper is made by JetBrains?
 
But yeah, I wish people stuck to the exact values... we gave them those values for a reason
 
@Pimgd Except when someone is misusing the terms. Just because someone is using it wrong, doesn't change anything.
 
2:18 PM
But there's nothing for C or C++ or is there?
or is CLion supposed to be any good... It's made by JetBrains
 
@Donald.McLean but if the whole world is using it wrong?
 
@Pimgd Then there's a compiler error
 
"Then you should dig in, point at the standards and hold your ground" =D
 
@Pimgd Right! And because many states have "hold your ground" laws, you can use a gun.
 
@Donald.McLean I'm in no state to use a gun.
Mostly because I'm not in any state (at least not in the USA), because I don't have a gun and because I haven't received any gun safety training.
2
(Stop murdering the jokes, Pim.)
 
2:21 PM
@Pimgd Plenty of people don't let silly technicalities like lack of gun safety training stop them.
@skiwi Never tried it, but every product of theirs I have used has been great.
 
@Donald.McLean What stops me from trying it?
Ah great, nothing stops me!
 
... I think I know the core concepts, but I'd still get official training first. Heard about too many accidents.
 
66
Q: What is the origin of K = 1024?

Bart van HeukelomWhy does the discrepancy in the number of bytes in a kilobyte exist? In some places I've seen the number 1024 (210) while in others it's 1000 (and the difference gets increasingly large with M, G, T, etc.). This is not a discussion about whether it should be 1024 or 1000 (though you can discuss ...

 
... but it boils down to "Don't point at anything you want to keep alive and well", "Unload the magazine and chamber prior to storing", "Check if a weapon is loaded upon obtaining it", "Store in a safe or otherwise secure place" and "Don't put your finger on the trigger unless you have the intent to fire".
 
@Pimgd Very sensible. There are only two rules that really matter, but with something like a gun, extra training is always good.
 
2:27 PM
> Saying kibi and mibi is just too funny and draws attention from the subject. We happily give it away to the telecommunication and disk storage sectors :-). And I will write kibibytes on user interfaces where non-programmers may read it.
 
@Pimgd That works.
 
@Donald.McLean did I put those two in that list?
The byte is not an SI unit; KB means "kilobel" (granted, a unit you'd never want to use unless you were describing the sound, if any, produced by the Big Bang.) — Wooble May 23 '11 at 13:43
 
@Pimgd Yes - some of those are my two broken down into more detail.
 
Okay that's just funny.
 
@Donald.McLean Apparently CLion is still in early access
 
2:31 PM
@skiwi Yes, I saw that. If I was still doing C++ work, I would try it.
 
@Heslacher editted, the gigabyte tag shouldn't be on that question
and sent 6 more suggested edits, all cleaning up that one tag
 
0
Q: Passing a 1D array (single column of a Range object) to .NET to manipulate it without loops and returning it back to VBA

vba4allBackground Kind of a follow up - slightly related to my other SO question. I thought that if somehow I find a way in VBA to pass a single column to .NET and convert it to a native .NET type then I could finally overcome the mystery of explicitly looping on objects via COM (which is super slow a...

 
@Donald.McLean I can assure you, CLion is awesome
 
@skiwi Not surprised, but pleased.
 
It basically does everything right where I ranted a few days ago about
 
3:02 PM
0
Q: Pass argument as single object or by multiple values

Ajeesh(Method-1) I have 4 classess, (Class-1 MainClass) StudentInfo stuInfo=new StudentInfo(); stuInfo.student=new StudentDTO(); stuInfo.certificates=new CertificatesDTO(); Process proc=new Process(); stuInfo=proc.process1(stuInfo); proc.process2(stuInfo); (Class-2 StudentDTO) public String id; ...

 
@CaptainObvious It looks like all the information is there, it's just a pain to look through. What's wrong with a simple class layout and a method definition..
 
can formatting an SD card fail after checking if it's not in use?
 
@JeroenVannevel I edited to make it a little better
 
0
Q: Best practices to visualize complicated/advanced APIs

KasperI am working with a very complicated SDK, it is used to provision a system with a lot of objects, these objects have a lot of relationships between them. The documentation available now is only a Tree with these objects, I am looking for a way to parse the tree and draw simple graphs to show the...

 
@CaptainObvious VTC custom:
This question appears to be off-topic because it is about visualization of code, rather than a review of code (any suggestions we'd make about the code would be off-topic). — Pimgd 15 secs ago
Also because list question.
 
3:21 PM
I just saw a napalm live.
 
@Morwenn dafuq??
 
@Vogel612 think meta
 
I was scrolling down on a question and just the scores of every answer get up by one as I was scrollng.
 
oohhhh...
 
I'm starting to wonder if this question is on topic
0
Q: Pass argument as single object or by multiple values

AjeeshI need to know which method is efficient between Method #1 and Method #2. Method #1 MainClass StudentInfo stuInfo=new StudentInfo(); stuInfo.student=new StudentDTO(); stuInfo.certificates=new CertificatesDTO(); Process proc=new Process(); stuInfo=proc.process1(stuInfo); proc.process2(stuInf...

It contains only part of code, process named process1 and process2, etc.
 
3:25 PM
Among them was my first answer saying "concurrency brings trouble: here is how". I still hope that I didn't spouted nonsense.
 
@TopinFrassi example code using real code. It's a smallest working code snippet...
 
'Aight!
 
It needs to be editted to use the real code more.
 
agreed
 
right now it's not possible to provide an answer that says "Not A, not B, but C."
Not without making a lot of assumptions.
Yet that's the exact answer you want.
At least I want those kinds of answers.
The ones where people present you with a new idea, not just pick one from a list you thought up before... because you had trouble picking between them in the first place, so anyone who picks an item on your list is gonna be met with "but won't that XYZ?"
 
3:31 PM
off-topic js question inb4
 
0
Q: Is there any way to refactor my jQuery to use less ajax calls?

CharlotteisI've just started to write jQuery and have just written my first code using ajax calls. I'm fetching data from the pokeapi and am using it to random generate new pokemon. I have refactored it as much as possible, but I really think there must be a way to abstract the ajax call into a function a...

0
Q: Display 2 items in FlexSlider, how?

sIiiSI want to display my items in 3 rows and in each rows 2 items with flexslider2, how can I set flexslider for displaying it ? Item Per Row : 2 Number of Rows : 3 Number of Columns : 2 Like this(numbers are items!) : 1 2 3 4 5 6 and then "Next" and "Prev"(< >) icons replace items with : ...

 
3:51 PM
@SimonAndréForsberg Hey you mind if I post your Minesweeper on my website I will link to your Github and give you credit of course! and work on it and push/pull/whatever to the repo
This Application is so old and ugly that I am working on right now....
@CaptainObvious Delete please
 
4:27 PM
@Malachi No problem, go ahead. It's not the best code I have written, but sure :)
 
@SimonAndréForsberg thank you. I want to have a subdomain on my site with bunch of games, all ones that I am working on or have created or whatever.
 
0
Q: Username and password creator

Kevin GreenanThis is the first program I have ever written outside of what I am learning in class. I am in my first programming class (ever) in college and I'd like to know if this is any good or if I'm making glaringly bad habits and mistakes. I am aware that some of the code I've written is redundant, but...

 
and the site is back up!!
 
Code Review: the community that knows how to compute prime numbers.
8
There are so many questions about prime numbers and algrithms that somebody motivated could make the research effort advance in that area just by reading the different questions and answers.
 
4:42 PM
0
Q: Simple Django website with no authentication--will be the basis for an authentication-and-testing tutorial

aliteralmindI am about to add authentication to the following Django project. This is going to be a tutorial on the full authentication lifecycle (create account, login, change/reset password, delete account, etc.), with a big emphasis on testing at every step. Beyond testing, the goal of this tutorial is to...

 
@Malachi down
@Morwenn bet against...
 
@Morwenn Have you ever tried the CLion IDE?
 
@skiwi Nope, never.
 
I like it a lot
It has things like autocomplete and automatic includes :)
 
I like Qt Creator.
 
4:55 PM
I found Qt Creator fine to create Qt projects. Otherwise, there things that I didn't like. Can't reeber which though.
I like the way it automatically corrects . and -> when I typed the wrong one.
@skiwi Code::Blocks lacks a good autoinclude system. It has an embedded plug-in but it's not wel-integrated in the IDE.
 
I haven't extensively used it though obviously
But making this was easy!
#include <iostream>

int main() {
    int total = 0;
    for (int i = 0; i < 1000; i++)
    {
        if (i % 3 == 0 || i % 5 == 0)
        {
            total += i;
        }
    }
    std::cout << total;
}
It did by default add using namespace std; though, but I think that's a template you can remove
 
It seems that it adds the #includes out of the header guards though :/
 
I'm working only with .cpp here actually
How do I properly test this, haven't read up that much about OOP yet
using a std::vector should do
Or is that different?
 
Create a project ith a .h and a .cpp. Use header guards in the .h, add std::vector somewhere in the .h and ask to autcomplete the includes.
What I love with Code::Blocks is that it is really versatile when it comes to compiler options.
 
header guards?
 
5:03 PM
In the C and C++ programming languages, an #include guard, sometimes called a macro guard, is a particular construct used to avoid the problem of double inclusion when dealing with the include directive. The addition of #include guards to a header file is one way to make that file idempotent. == Double inclusion == The following C code demonstrates a real problem that can arise if #include guards are missing: File "grandfather.h" File "father.h" File "child.c" Here, the file "child.c" has indirectly included two copies of the text in the header file "grandfather.h". This causes a compilation...
 
@Morwenn But in that case it should add in the .h file, isn't that unsurprising?
What's .h vs .hpp btw?
 
I like how Qt Creator will automatically add include guards.
 
.h/.hpp is the same thing.
 
I'm figuring out how to do File > Add header file
It's still early access...
Strange thing is that a template for C++ header files is available
Ah it's a known issue
Hmm @Morwenn does this make sense?
#include <c++/bits/stl_bvector.h>

#ifndef OBJECT_H
#define OBJECT_H
#endif OBJECT_H

class Foo
{
public:
    void bar(std::vector<int> bars);
};
 
@skiwi No, it included the implementation file.
 
5:12 PM
This is the header here
 
Also, #endif OBJECT_H should have been at the end of the file.
 
Where should the include be going to/
@Morwenn That was my own fault
41
A: #include in .h or .c / .cpp?

Brendan LongPut as much as you can in the .c and as little as possible in the .h. The includes in the .c are only included when that one file is compiled, but the includes for the .h have to be included by every file that uses it.

This sums it up?
 
It should have included <vector>. <c++/bits/stl_bvector> is a libstdc++ specific header where std::vector is physically defined.
 
pause Pause = new pause(); Here we see backwards Case in action
4
 
@skiwi It sums it up, but your function declaration has to know std::vector, so you have to include <vector> in the .h.
 
5:14 PM
I see
It's still in early access before beta, so still have hope
 
#ifndef OBJECT_H
#define OBJECT_H

#include <vector>

class Foo
{
public:
void bar(std::vector<int> bars);
};

#endif OBJECT_H
Here is what you should have had.
 
I see
that <c++/bits/stl_vector.h> already surprised me
 
0
Q: Replace + Trim() in Stringbuilder

Eduardo Calazans JúniorI have the current code StrTable += "<td nowrap id='" + y.ToString() + "' name='" + y.ToString() + "_td' Onclick='ValidaGridCompostoAvancado(" + '"' + concat.Replace('"', '|').Replace("|", "'").Trim() + '"' + "," + y.ToString() + ")'' And changed the += for Stringbuilder, like this StrTable.A...

 
@skiwi One of the major drawbacks of C/C++ is that #include actually performs a copy-paste of the included file in the current file.
 
@Morwenn Ugh, that's ugly
Not even runtime linking?
Or rather, compile time
 
5:22 PM
@skiwi Each .cpp file is compiled separately. Then, linking happens between all the compiled objects.
 
Ah yes, because people running C++ source don't have the standard libs on their PC
 
^^^ which is why one of the critical aspects of the C++ (and other) complier is to build a compile-dependency tree, to minimize the amount of recompiling that needs to be done.
 
And that's also why the standard committee is currently working on a module system.
Actually, they have been working on it for a long it, but it seems that it is really hard to get it right without breaking old code.
Like motherfolcking horribly hard.
 
5:42 PM
0
Q: Looking to optimize simple program

SamyI've been working on this mini project to teach myself how to better use the graphical functions and nested loops in Java. I have achieved my basic goal with this project to be able to draw on a screen pixel by pixel in blocks and diagonally. I'm looking for any way at all to improve my program ...

0
Q: PHP While loop taking too long - fixed by setting time limit; is there a better way?

Laura MThe goal of this code is to create drop-down menu where there are 14 options on the list. Those 14 options are the dates that an RSS feed were last updated. The URLs for the feed have the query &issue=2014/10/14, but the trick is that it's set so that if a date is entered when the feed wasn't upd...

 
@Morwenn Old code, programmer's worst ennemy
 
@TopinFrassi Retrocompatibility: designer's worst enemy.
 
meow
sorry that was my cat
 
@Morwenn I'd shorten that to "Internet explorer 8 and -, designer's worst enemy". Even though this isn't really shorter..
 
More than 100 new papers for the next C++ standardization meeting. That's some work...
 
5:48 PM
I ask for extra 50%-80% for a project if it should also support IE
 
IE6 anyone?
2
 
@Morwenn On Windows 95
Was that even a thing?
Or was it first introduced on Windows XP
 
user image
6
 
0
Q: Multiplayer bowling in Ruby, with variable skill (follow-up)

a2bfayThis is a multiplayer bowling simulator in Ruby. It allows for variable skill levels, and produces weighted random results for each player's rolls based on those skill settings. This is a complete rewrite of code I first posted for review here. My first solution was entirely procedural (all meth...

 
@JaDogg In a mystical work... Over the rainbow...
Where Microsoft is a non-profit organization that only produces Open-Source code and programs that follow the guidelines correctly
2
 
6:12 PM
0
Q: Multiplicative hash function in java

user2713971I need to write a function in java for an assignment that uses the multiplication method for hashing. I'm stuck on figuring out how to create the "m" variable, as it is supposed to be the first power of 2 greater than n. "n" is the number of inputs into the hash table and a parameter to the cons...

0
Q: SQL table: store "status" as integer vs as string

nicoogaI've been around a bunch of projects where statuses are stored in the db as a integer, then mapped in the model back to a human readable string: class ExampleObject < ActiveRecord::Base STATUSES = { cool: 0, not_cool: 1, bad: 2 } STATUSES_LOOKUP = STATUSES.invert end ...

0
Q: Structure of handlers

Кристиян КацаровI have this code : public class MyActivity extends Activity{ // set class variables RelativeLayout content; public Ball view; Bar bar; Handler handler; BounceLoop thread; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(...

0
Q: Saving the web pages by reading the list of urls from file

Bhupesh PantHow can I solve this problem, we have given a text file with 999999 URLs. we have to write a python program to read this file & save all the webpages in a folder called 'saved_page'. I have tried to solve this problem something like this, import os import urllib save_path='C:/test/home_page/' N...

 
6:31 PM
@Morwenn blasphemer...JK
 
@Malachi {and then a fun message}
2
 
I am playing with .dlls injecting data (with C#) into an XML where I use VBScript to show the data on a word document, but we just call it a token.
 
pimping:
0
A: Sudoku Solver in Java

Simon André Forsberg/* Helper method that returns the Part in which the * coordinates x and y belong on the grid. */ private int getPart(int x, int y) { if (x < 3) { if (y < 3) return PART1; else if (y < 6) return PART4; else return PART7; } if (x < 6) { if (y < 3) ret...

 
6:56 PM
New user's first answer (looks good to me, why would I share otherwise?)
Also, could someone remove the comments if they aren't necessary anymore? I don't have the power to do that ;)
 
@TopinFrassi Flag the comments that should be removed with the 'obsolete' flag.
 
@skiwi lol, well in that reality Microsoft is a better Google ?
2
 
Hello @All
If i have code that works but not quite how i want it, can i post it here?
well not here.. In code review..
Looks like i missed the party! :(
 
exactly how it doesn't work ?
 
@CodeX Depends how you define that
 
7:09 PM
exceptions/performance/memory leaks ?
 
@rolfl I'll rephrase my question. Do you think the comments should be removed? I don't want to spam you mods with 7-8 flags if they aren't good
 
@skiwi Im preg_matching and preg_replacing with data from a database, the data appears but only the first item from db for all 3 replacements..
$pattern = '/\{MENU=([\d]{1,3})(:[\w\d]*)?\}/';
preg_match_all($pattern, $text, $matches);
foreach($matches[1] as $menu) {
$row = $dmodule->getModuleByModuleArea($menu);
$module = '
<div class="module_wrap">
<div class="module_title">'.$row[0]['module_title'].'</div>
<div class="module_body">'.$row[0]['module_body'].'</div>
</div>
';
}
echo preg_replace($pattern, $module, $text);
 
@CodeX Ask yourself: Is it non-functional or not-so-functional-as-you-want?
It appears that this example violates what you actually intend that it does
 
@TopinFrassi I can have a look, but you should also take some ownership if you can. Effectively you have flagged it by pinging us in chat, and now we have to evaluate the comments too. If you had flagged the obsolete ones, that would actually help us.
 
@skiwi It does?
 
7:12 PM
@CodeX Unless I misunderstood, you say that the data appears, but only for the first item, while you want it to appear for all 3 items?
 
@skiwi Correct
it replaces all {MENU=(number here)} shortcodes with modules
 
@CodeX IMHO off topic, close vote -> broken
 
Then it doesn't seem to be doing what you want it to do
 
@skiwi @JaDogg Thanks, i posted on SO but it always seems dead..
I had this problem before with something, can't think how i fixed it :/
 
unfortunately it's off topic here, you have to deal with SO.
 
7:15 PM
@rolfl Alright thank you. Next time I'll flag them if I feel they need to be flagged.
 
@JaDogg Yeah, thats fine, thanks though
 
Or.. do I flag them now? Eh, I'm not sure
 
@CodeX I suggest you poke around SO chatrooms
 
@JaDogg Haha, agreed..
@JaDogg This is the only chatroom that has any kind of normality in
2
 
@TopinFrassi Nope, i just went through and deleted most of them.
 
7:16 PM
@CodeX this is normal
?
 
@rolfl Thanks
 
@JaDogg I went into a PHP chatroom and they went ballistic about something that was irrelevant to what i asked..
 
oh
 
@JaDogg They got quite hostile
 
SO has sooo much drama
 
7:17 PM
@JaDogg People get bored..
 
more bad luck, there aren't that many PHP coders here
 
Damn those bald-headed CodeX folk claiming that we're normal in here. I'll show him! MONKEYS RULE!!! We're NOT normal!
 
maybe Phrancis can help you @CodeX
note sure, he recently started PHP
 
@JaDogg I realise that from previous visits, Phrancis is more SQL
 
yeah
 
7:20 PM
@JaDogg Oh, i didn't know that, been away for a bit
 
@CodeX What's the SO question?
 
I know this problem is something simple
 
post it in a single line
 
@skiwi Go to the second answer
0
A: Complicated variable extraction / preg_match / replace / shortcodes for theme

CodeXOK, so I'm a bit closer, the following code returns the modules in their respective place but it only shows one module which it repeats for all 3 menus, can you see anything wrong here. I still have to figure out how to add a $layout['default'] = ''; as well. The preg_match_all: $pattern = '/\...

@JaDogg Thanks :)
 
I'd say that question is too broad, I'm not interested to invest a lot of time in such question
 
7:22 PM
I should break it up?
 
You could try to debug some more and either figure out the code problem yourself, or post a smaller example that still shows the invalid behavior
 
I got a bit ambitious with my question i think
 
@CodeX that self answer will attract down votes, you cannot answer it cause you didn't fix it
 
@skiwi Thanks for your help, appreciated
 
merge it with the question maybe,
 
7:23 PM
No problem there
 
I don't participate in SO now, I might be wrong
 
@JaDogg Ill drop it at the bottom as an Edit: ;)
 
:D
 
Oops, Update:
 
25
Q: Let's make More Community Ads!

rolflBack in April we got together and put together a shortlist of community ads that can be posted to other graduated sites. That was a very successful campaign with probably a thousand or two "click throughs" to Code Review. Let's reboot the process and roll the ads out again! What are Community P...

@CodeX ^ ^ vote
 
7:26 PM
Im on it! :)
@JaDogg HAHA!
 
:D
@CodeX good luck with your PHP problem
 
@JaDogg @skiwi Thanks for all your help, speak again soon
 
@Morwenn What's up with #pragma once vs the define-guard?
 
Writing up these usecases take more time than it would to implement
 
@skiwi #pragma once may be better, isn't standard but is supported by almost if not all compilers.
 
7:36 PM
UC: View activity details

1. User selects an activity
2. System shows details of activity
 
@JeroenVannevel For all uc in UC: If trivial, then trivial
 
Well it's chipping away at my Dexter time!
 
Dexter ? tv series ?
 
si
We got Netflix here in Belgium 2 weeks ago. They suggested I watch it. I followed the Netflix Gods.
 
ah
 
7:46 PM
@JeroenVannevel Great series
 
have fun watching Dexter, there are some scenes you might not want to watch with parents.
 
Love these comments..
"Good luck getting help with your Rube Goldberg machine"
 
I'm already at S5, no worries
 
@JaDogg Problem solved.. ;)
 
:D
once the code does everything you want post it here with sufficient description
 
7:50 PM
0
Q: animal class for java

user56068Write a Animal class that will keep track of the number of times an animal has been seen. What properties and methods do you need? You will create an Collection of Animal objects. You will allow the user to enter animal names then enter quit to show the animal Census, be sure to show the ...

 
8:15 PM
should we delete posts from 101 users when they are closed and down voted so that we can get them back their reputation?
 
You don't have to treat them differently. If they're crap, vote to delete.
 
The criterion should be whether it's unsalvageable crap.
 
Right
 
0
Q: Should we Delete off Topic questions Right away when the user is new?

MalachiWith brand new user they likely only have 1 rep point, but trusted StackExchange users have 101 when they make their first post here. when they post an off topic question they usually get downvoted and then closed as off topic for whatever reason. should we be deleting these questions promptl...

@200_success agreed
@Jamal I am more or less looking at retaining the user by helping them retain Reputation
 
Their reputation is their business, not yours.
 
8:23 PM
If they post unsalvageable crap, then the downvotes indicate this. They don't have to keep their rep no matter what, but of course they can just delete the question themselves. They at least need to know what not to do next time.
2
 
Alternatively stated, you have the cause and effect backwards. Reputation is the net sum of the user's contributions. It shouldn't be the primary concern when you decide what to do.
 
Python doesn't have compound assignment?
 
thanks for your points of view @200_success and @Jamal it makes a lot of sense, and goes to show you that sometimes I go off half-cocked
7
A: Can SFF.se memes come from the chatroom?

DVKYes. In addition to other reasoning (see SQB's answer), because our sister sites' equivalent Meme questions allow it, with no major visible negative effects: Code Review Travel IT Security and more Arqade

mentioned on SciFi
 
0
Q: Should we Delete off Topic questions Right away when the user is new?

MalachiWith brand new user they likely only have 1 rep point, but trusted StackExchange users have 101 when they make their first post here. when they post an off topic question they usually get downvoted and then closed as off topic for whatever reason. should we be deleting these questions promptl...

 
What do you mean by compound assignment?
 
8:32 PM
@200_success love++ vs love = love + 1
 
Python has love += 1.
No side-effect assignments, though.
 
Oh right
 
In other words, if (love += 1) == 5: … won't work.
 
I totally forgot about that intermediate step
kay, thanks
 
8:56 PM
Someone downvoted Pops' graduation post...
 
wow
 
I guess someone doesn't want to lose their privileges.
 
good point
 
That still shouldn't be an issue. We still have months before it takes effect.
 
some up the required reps go up by like 8-10 thousand though don't they
 
9:04 PM
Yes, up to 20K.
So if I were to lose the election, I would no longer be treated as a trusted user by the system.
 
@Jamal But you could still edit with impunity, so nothing will really change ;-)
2
 
i don't know if any of the active users are unhappy with the current state of moderation. you all are doing a great job imo
 
I know; I was just giving an example. :-)
 
@bazola If anyone was unhappy, I'm sure they'd hear about it. =;)-
 
But we haven't been called Nazis yet, though. :P
 
9:28 PM
When did Simon's post about graduation in 6-8 weeks months get unpinned?
 
@Phrancis Posts auto-unpin after 2 weeks.
 
Ah
 
0
Q: Javascript - Rational Class

soktinpkThis is my javascript Rational class, similar to other languages' BigFraction class, but with one major difference: This class doesn't support arbitrarily large rational numbers. i.e. new Rational(Number.MAX_VALUE + 1) may fail. However, it supports arbitrarily precise numbers i.e. new Rational(...

 
9:52 PM
Morning!
 
0
Q: javascript that compresses blog into a preview using tumblr_api_read

user3052990Here is what I have currently working: http://www.awesomeinc.org/about/#blog I would like to make it look more aesthetically pleasing, so not finish words in mid word. Also not have the two previews be so much larger than the other. Ideally there would be a preview of two on the right (short...

 
Monking Monkernoon @TheFailure !
 
Hmmmmmm, that is interesting
 
wow swift is just horrible
 
10:14 PM
@bazola care to elaborate?
 
i was going to post an example but the compiler keeps lying to me about how i should construct this
I'm trying to do this, set a block to one of the random types in the enum (this is the obj-c)
    _type = arc4random_uniform(BlockTypeNumTypes);
here is the swift so far:
var randomNumber = arc4random_uniform(BlockType.toRaw(BlockType.BlockTypeNumTypes)())
        blockType = BlockType.fromRaw(randomNumber)!
 
wtf
 
it runs 5 times and then the error message i get is Execution was interrupted, reason: EXC_BAD_INSTRUCTION code=EXC_I386...
 
Sounds fun....
 
i like error messages that tell you pretty much nothing helpful ;)
 
10:26 PM
PEBKAC
 
pretty much :) its fun because it runs different amounts of time before failing. and, if i set it runs low number of times, like 2 instead of 100, it succeeds
 
so you're generating a random number outside the valid range?
 
hmm, i guess that could be it
yeah it was
 
op's code generates only non-negative integers, your code can generate negative integers
i think you want to & 0x7fffffff before taking mod
 
10:41 PM
Gigo? Solved with some validation, or some correction?
@mjolka Mine can only generate negatives if it starts with a negative last.
 
@rolfl you can get a negative if you start with a positive and the sum overflows
 
Yes, you can... hmmm
DINNER TIME!
 
FOOD!
 
&'ing with that mask doesn't fix it. hm.
 
Did someone say FOOD?
 
10:50 PM
wait i had the wrong mask
 
there we go, here is some swift to chew on:
class World {
    var chunks: [Chunk]
    init() {
        chunks = [Chunk]()
        for var index = 0; index < 1000; index++ {
            chunks.append(Chunk())
        }
    }
}
class Chunk {
    var blocks: [Block]
    init() {
        blocks = [Block]()
        for var index = 0; index < 1000; index++ {
            blocks.append(Block())
        }
    }
}
class Block {
    var blockType: BlockType
    init() {
        var randomNumber = arc4random_uniform(BlockType.toRaw(BlockType.BlockTypeNumTypes)())
 

« first day (528 days earlier)      last day (3488 days later) »