« first day (258 days earlier)      last day (3753 days later) » 

12:03 AM
Edited @200_success ....
 
@rolfl Thanks for editing. Nominated for reopening.
Should probably change the title too.
 
I believe the edits are enough to bring it back on topic.... (revised title now too).
Please give it a once over ... thanks.
 
12:19 AM
Post Reopened by 200_success, James Khoury, Jamal♦
@jamal
@jamal ;)
my typing skills today are not very good. I need more coffee.
 
Aww, @Jamal I was waiting for that to hit the re-open votes queue :(
 
I figured I could reopen it anyway since I was the one to close it (and it was originally flagged). But normally, I reopen in cases such as an asker quickly adding code after being told to take it from the link.
@syb0rg: Custodian badge?
 
@Jamal Badge-addiction badge?
 
@Jamal Nah, I already have the badge for that queue. But I'm working my way to the Reviewer badge.
It's going to be a while since I'm only at 12 reviews right now in that queue.
So don't worry about it :P
 
Ah. Well, the reopen queue is still one of the slower ones here anyway.
There's always close and suggested edits. :-)
 
12:26 AM
@200_success Just got a shiny new silver badge.
25
A: Generating Even Random Numbers

200_successYes. I would go one step further and declare your functions as private static final, if possible. The combination of those three keywords means that the code would be unaffected by any instance variable, any superclass, or any subclass, and is also not callable by any code external to the class...

 
That is a pretty good question (and answers), too. It could prepare me a bit more for when I start learning Java.
 
12:46 AM
Hello again :)
 
@Timtech Hello.
 
@syb0rg I'm going to start getting some more CR rep so I can review there also
 
@Timtech Then you need to answer or ask more questions so I can up-vote you!
 
@syb0rg Yeah, I know... I
I'm not that good at fixing other code
I'm asking another question soon
 
What language?
 
12:51 AM
TI-BASIC
 
Well that's outta my league...
lol
 
lol
 
Me wants moar rep, too. Post some easy C++ questions, pl0x? :-)
 
0
Q: TI-BASIC interpreter for Fishstacks

TimtechFishstacks is a deadfish derivative based on a stack the stack can only hold four elements when a fifth element is pushed the bottom element is kicked out and eventually printed out to the screen. I've come up with an interpreter in TI-BASIC for my calculator. However, I fell slightly guilty abo...

Lol, just posted... already +1
syb0rg...
 
:P
 
12:56 AM
gtg, bye
I'll see what I can do for you tomorrow
 
Definitely not me
Bye
@Timtech This is when I wish my calculator had some batteries...
 
2
Q: TI-BASIC interpreter for Fishstacks

TimtechFishstacks is a deadfish derivative based on a stack the stack can only hold four elements when a fifth element is pushed the bottom element is kicked out and eventually printed out to the screen. I've come up with an interpreter in TI-BASIC for my calculator. However, I fell slightly guilty abo...

 
1:21 AM
@200_success I am part way through an answer .... and you post a selfie?
3
huh....
new meme - selfies on CR.
4
 
Sorry! I can delete it if you'd like. =)
 
I also have the outer-join thing going, but, you don't need the , Synonym.TagName AS AliasName at all ;-)
That result is unused, though it is useful in debugging;-)
And I agree about the bug, but it is a SEDE bug, not the SQL.
 
You are right. Post it, and I'll upvote it, and if there are not other answers in a while, I'd probably accept it as well.
 
hello
 
@retailcoder hello
 
1:25 AM
> posts question
> takes picture using mirror
> posts as an answer
 
Takes picture? Or screenshot?
 
A picture. You know, like a selfie of your face. I was joking, of course.
 
@200_success the query you linked to in a comment to @tomdemuyt's RedPill post, does a wonderful job at being a zombie finder. I feel like adding a @tag parameter.
 
@retailcoder Thanks for forking zombie-finder query.
 
1:38 AM
0
Q: How to make this recursive function thread-safe?

Trond KristiansenI have an array that I want to enumerate using blocks concurrently, however I have trouble making this thread safe. I am new to using blocks and locks so I am hoping someone may be able to push me in the right direction for making this not crash. The point of this function is to loop over a numbe...

 
2:02 AM
Unclosed questions with only zero-score answers, for specified [language] tag: data.stackexchange.com/code%20review%20stack%20exchange/query/…
 
That looks useful!
 
@Timtech you are going to mess up our ratio! not many people I know that Program in TI-BASIC i never even heard of it....lol
 
lol
@Jamal yeah! on a less useful note, I have a query called Jamalized Posts in another tab :p
2
 
@Malachi Surprisingly, I know a bit of TI-BASIC.
Way less than @Timtech though.
 
@retailcoder: I'm guessing you'll post that one as well? :-P
 
2:11 AM
should I?
 
Probably not.
It could, for instance, list posts edited by a certain person.
 
@syb0rg well then you better make sure to answer all his questions....lol jk
 
@Malachi I just need to get some batteries for my calculator...
Or install an emulator.
 
If I run it, does it get saved? listing posts edited by a certain person is pretty much the goal of that query :)
 
I am trying to figure out an IDE to work on a website in PHP/Javascript/etc with similar to Visual Studios only for linux. i want to be able to access all the files and stuff via ftp
any ideas?
 
2:14 AM
Grouped by month/week, with average Jamalizing velocity for that time frame, sorted by edit date, descending..
 
you need help @retailcoder
 
lol
 
@Malachi Nothing off of the top of my head.
 
was just a joke
 
@syb0rg I am trying to figure out if I can do it in Eclipse....
 
2:16 AM
select p.Id QuestionId, p.Title,
       p.CreationDate, p.LastEditDate,
       p.Score, p.ViewCount Views,
       p.AnswerCount Answers
from posts p
where p.LastEditorUserId = ##UserId##
order by p.LastEditDate desc
 
@retailcoder I know, I was looking for some stars...lol
 
@Malachi Possibly some plugin...
 
I'm surprised my number of edits hasn't yet exceeded my rep.
And I'm much better at editing.
 
@Malachi Vi
that was a joke
 
daily vote limit reached. this data explorer query is a vote-eater.
 
2:19 AM
@retailcoder Already?
 
@JamesKhoury Vi.....lol I only used that once for a couple of days but that was a while ago
maybe it was VIM i used
 
You're just trying to beat me...
 
Vim ... much easier for us mere mortals
Want to hear a Javascript joke? I'll callback later.
4
 
@syb0rg no, really: data.stackexchange.com/code%20review%20stack%20exchange/query/… and enter for a tag name.
Oh. The LIKE condition makes it return questions too...
LIKE '%%' matches
 
@retailcoder It seems like the explorer needs to update, the question I clicked on had up-voted answers.
 
2:23 AM
yup.
> The data is updated early every Monday morning around 3:00 UTC.
it's lagging all of this week's votes.
 
So they data is really stale?
They should update it daily.
 
I like the "What runs this thing? Is the Data Explorer powered by hamsters?" header.
 
0
Q: How can I make this faster

SimonI am hoping to make this method run a little faster. I typically need to run this on a list with more than 100000 entries. Note that at the start and end of the list, I wish to weight the average so that it is closer to the start or end value, hence the smaller framesize. public PointPairList ...

Too slow, StackExchange. :P
Anyway, this needs a better title.
 
@Jamal how about "Speed improvements for moving average"?
 
2:40 AM
@JamesKhoury That's a good one.
 
0
Q: How can I make this faster

SimonI am hoping to make this method run a little faster. I typically need to run this on a list with more than 100000 entries. Note that at the start and end of the list, I wish to weight the average so that it is closer to the start or end value, hence the smaller framesize. public PointPairList ...

 
I think I found what I was looking for
 
@Malachi And the answer is...?
 
@JamesKhoury: Looks okay.
 
OccupyCodeReview - how rich are the 1% active users?

    Who        | Rep          | %ShareOfWealth | Users   |
    ------------+-------------+----------------------+-----------
    The 99%  |   499,066 | 82.67157881833 |   1,011 |
    The 1%   |   104,607 | 17.32842118166 |      11 |
    ===================================
                       603,673                                    1,021
crap
 
2:44 AM
@syb0rg idk. if I could figure out how to use this stupid IDE
I want to remote in, I installed the remoting plugin, and restarted... where is it?
 
SO's breakdown is 27.54% to the 1% (1,610 users), 72.46% to the 99%.
 
@syb0rg I figured it out, but I need to figure it out. I don't know much about the actual FTP stuff.. so I am failing to make a connection....
 
@Malachi What seems to be the problem?
 
idk
 
@Malachi FTP? SSH?
 
2:57 AM
what is a valid connection name?
I think it is supposed to be FTP I am pretty sure it is FTP
 
Are you working with linux? you want ssh and scp i think. I never set up an ftp server just ssh.
 
I have to deal with my website host provider thing
 
Not your own server? Yeah you're right.
 
I am using Eclipse. I set it up once in Dreamweaver, but that was on windows. it was FTP, I know it isn't very secure
I wish I knew enough to use my own server. I would have a bunch of sites hosted on my servers by now. ( I would have servers )
 
I just put my Eclipse folder in Dropbox.
Made my life super easy.
 
3:02 AM
@Malachi knew enough for what kind of server? LAMP stack can be easily set up in your bedroom for practice. Now I pay Azure for a linux VM for testing and other stuff but I used to run one out of my bedroom.
 
@Malachi A Raspberry Pi can be set up as a dedicated server for $25 - $35.
3
 
I would love to set up some simple servers. but I want to be able to sell hosting, and I don't know enough about DNS and stuff like that.
@syb0rg I hear that
 
@syb0rg: Regarding your last comment, it does appear that the question title placeholder is the problem. It tells the asker to give the review request, so naturally many will do just that. I think this was brought up on Meta before, where codesparkle mentioned that it could be changed if absolutely necessary, but SE would have to make that change (moderators cannot do that).
 
You pay other people for DNS.
 
8
Q: Prompt for more meaningful question titles

200_successI'd like to make a feature request to elicit more meaningful question titles, because I'm tired of editing generic titles. Right now, when you ask a question, the title field contains the hint what's your code review request about? Be specific. I propose changing the hint to say: State...

 
3:06 AM
@Jamal Hmm, why do mods not have that ability?
They should in my opinion.
 
There are still certain restrictions for mods. For instance, it takes two mods, not one, to modify custom close reasons.
 
VM Linux box with GoDaddy Domain & DNS
I haven't go anything running properly on it right now though.
 
@Jamal Is there some similar restriction for that situation, or can only SE community managers change that?
 
@syb0rg: For question titles or close reasons?
 
3:11 AM
Question titles.
 
@JamesKhoury what is that? I figured it out. I was being dumb
 
@retailcoder Your query doesn't seem to understand that java != javascript. ☺
 
@JamesKhoury is that something that you are serving from your own house off the computer you are on right now?
 
@200_success yeah..
49 mins ago, by retailcoder
LIKE '%%' matches
still, makes a better filter than nothing!
 
I'd like to upgrade my comment on tomdemuyt's meta post into a separate answer. Otherwise the comments on that post will get confusing.
@retailcoder There. Could you reparent your comment as well to plug your tag-aware fork?
 
Yes, that one.
 
I'm not sure how to reparent a comment..?!
 
Delete it and make a new comment?
 
ah
0
A: SEDE is up. What now, Wonderland?

200_successHere is a slightly different way to approach the lack of voting pointed out by @tomdemuyt: Questions with only zero-score answers Please use this query and do your part to upvote zombie answers!

delete it period :)
 
@Malachi Nope It was at one stage but I have moved it into a Virtual Machine.
I used it to test out a few things when I played with python a lot.
 
3:22 AM
@syb0rg: Sorry for the delay. I have now emailed SE regarding this concern, and hopefully they can make this change for us.
 
@Jamal Sweet.
Don't worry about the delay, I have plenty of busy work to fill the time.
 
I don't exactly know why moderators cannot change this, but there are just somethings that SE would rather restrict. For instance, we cannot disassociate users from posts. Only SE can do that upon request from a moderator or the OP.
 
@JamesKhoury I am going to learn Python and Ruby Eventually, but I am going to build up my coding/programmer empire a little bit first, so that I don't have to have a real job
 
@retailcoder I think all you have to do to fix the java/javascript problem is
 
@Jamal I think as long as stuff is reversible, and that there is a record of your actions, then there is no problem letting you do whatever you want.
 
3:25 AM
Questions.Tags LIKE '%<' + ##TagName:string## + '>%'
(note addition of the < and > characters.)
 
interesting
 
I know that there is a lot of logging in regard to moderation.
 
@syb0rg: That is correct. Nearly every moderator action can be reversed. This is especially nice if a moderator makes a mistake and is corrected by the community. The only exception, I believe, is deleting/destroying users.
 
except if a moderator bans or deletes himself "accidentally"
 
I wonder if that is even possible.
We should totally test it out...
 
3:28 AM
@Jamal said the button was there, clickable, ..tempting.
(don't do that. you might uncover a top-secret easter egg)
 
@retailcoder: It's not an "instant" button, so it's not that tempting. There are still certain prompts.
 
seriously, don't do that.
 
But I have been trusted by SE, thus also the system, to use this ability when absolutely necessary, and so I will do just that.
 
vaporize a spammer?
 
Yes. We have been given certain protocols for that.
 
3:31 AM
@Jamal Unlike @syb0rg, @Jamal is not subject to Asimov's Third Law of Robotics.
3
 
But anyway, those are some good tidbits of info on moderation, in case anyone is considering running after graduation.
 
I would elect most of the people in this room to be honest.
How many can we choose?
:P
 
I've never seen an official election up close, so I don't know. We'll find out soon enough. I'll then decide if I want to run as well.
 
@Jamal You are already mod though.
Plus we all know you will win.
 
Yes, but after the election is over, the newly-elected mods will be promoted, while the un-elected pro-tems will be demoted.
 
3:39 AM
Hmm, I didn't know that. This is how little I know about an official election.
 
As for myself, I can continue if I'm not too busy and if I'm not burned out at that time.
 
I wonder if people would consider me moderator material...
Probably not as of right now.
 
@syb0rg: It does make sense that pro-tems will not keep their position automatically. After graduation, SE will no longer have a say in moderation power.
If you keep contributing to this site, especially with moderation, you may gain enough trust from the community. I did it within ten months, but that's probably because my appreciation of this site brought out my urge to contribute a lot.
 
@Jamal Yeah, I noticed that in my few visits to this site back then. When I managed to drop in during the unofficial moderator election, I voted for you because of it.
 
@syb0rg you mean, the puns and jokes in his plea didn't weight in at all?
 
3:44 AM
I have never had a leadership position in real life, yet I feel I can do much more online. When I'm here, I truly feel like a leader. I cannot imagine doing the same outside the Internet.
 
@Jamal The secret is people. If the people love you then you are a leader.
 
it's the mod goggles. and the diamond.
 
@Jamal Similar situation here. Except I am more outgoing when I have lots of caffeine in my system IRL.
Except I'm not really a leader on here either...
 
you mean outspoken :)
 
@retailcoder Precisely.
 
3:47 AM
I don't think I'm a leader either.
And I called for duty..
I think I'd postulate, if there was an election in 2014.
Like, how hard can it be?
:p
 
@retailcoder: That's still a great start. Moderators are also there to help the community take action. I personally wouldn't have been able to put so much effort into a post like that.
 
@retailcoder I agree with @Jamal . You have put a lot of work into this community.
 
I ♥ CR
11
 
That's the kind of thing that will put your name out there. If our voting improves just enough to put us into graduation, you will be credited for that.
 
3:54 AM
@syb0rg: Yes, you're helping as well. :-) Unfortunately, it'll take more than just us few to get enough voting out there. We still need more high-rep users.
 
I voted like a maniac, indeed, but I can't take the credit of improving CR's upvoting enough to put us into graduation. Not all by myself. I'm a tiny little drop in a relatively small ocean.
 
@retailcoder: I don't mean that you will receive all the credit, but still a good amount of it. Any number of related posts may not drastically improve voting, so it may just be something that will have to be done over time.
 
I took on [badge:sportsmanship] as a challenge.... and it helped a lot with my up-voting activity ;-)
 
0
A: SEDE is up. What now, Wonderland?

retailcoderOccupy Code R3view A while back I had favorited this query for StackOverflow. Now that CR is on the SEDE, I wondered how we'd compare: http://data.stackexchange.com/code%20review%20stack%20exchange/query/160464/how-rich-are-the-1-active-users With this week's data... SO's breakdown is: 27...

 
Also got me in to a habit.
Next voting badge, electorate
We should start a race ;-)
 
4:04 AM
Challenge accepted.
2
Except I only have 2 votes left for the day...
 
@syb0rg InvalidObjectionException. Your acceptance was already recorded :)
2
 
@retailcoder @Jamal, and @Malachi are already there - hence pre-dis-qualified.
 
yup
 
@rolfl already where?
 
got badge:electorate
 
4:07 AM
oh yeah I have that one
 
@syb0rg - you are short 372 question votes from electorate, I am short 276 ...
 
@rolfl I got this ;)
 
That is a lot of question upvoting.
 
3 days handicap?
 
Yup... about that.
remember, you need 600 question votes, and at least 25% of all votes are on question
 
4:09 AM
I don't like the "handicap" idea, just watch how many questions you up-vote for 3 days.
 
Let's see if we can keep it a bit quiet, and slip in before 200_s... he's only short 103
@corbin is also pre-dis-qualified.
It's nice how so many of the electorates are also chatters.
 
I think I already have the badge
or wait... maybe i have it on SO
 
@Corbin - I believe you must be the most prolific voter on CR....
Thanks
Nope, not quite....
But PDC (pretty damn close).
 
oh wow.... 1677 votes. i didn't realize i had voted that much
i tend to vote on everything
it's a compulsion :D
6188 votes on SO
 
2,020 votes here. Jamal has 2,347 and palacsint has 5,369. Malachi is 4th with 1,756. Then there's @Corbin :)
 
4:19 AM
wow that's a lot of votes
jesus
 
He votes too ;-)
 
it's interesting to me to think that we've put 80000 rep into the community via votes
just the 5 of us
and our combined rep is only like 30k
 
@Corbin that's good, it means we're not only voting among ourselves :)
 
Huh, just looked, and I have a rep of 7655, and voted 760 times - I'm about square.
my excuse is I have only been here for 3 months ... Corbin has been here 3 years ;-)
Actually, my profile page says "Member for 2 months"
 
I generated (819x5+1201x10) = 16,105 rep with my votes. Wow.
 
4:25 AM
@retailcoder - how much rep have you bountied though?
 
earned 0, offered 200
 
Oh, your profile page shows 200
yeah
I payed my bounty forward (won 50, gave 50). I should do more than that though
 
votes are free!
 
I've added another vote-boosting query:
3
A: SEDE is up. What now, Wonderland?

200_successHere's my re-creation of Grace Note's query. The numbers, as of 2014-01-16, are: Reputation Threshold # Users % of Avid Users Cumulative % of Avid Users -------------------- ------- --------------- -------------------------- 150 1095 51.7241 51.7241 ...

 
@200_success awesome!! +12 if I could!
 
4:32 AM
Hm. I came across one of my questions that was self-answered with two answers. I'm currently looking through the C++ zombies.
 
@retailcoder Save your votes for those who need them more. =)
 
Is there a way to track a user's votes on SEDE?
^^ that's gotta be FAQ
 
And... I'm out of votes for the day.
 
I'm actually almost out as well. And I still have about eight hours until they are replenished.
 
No way to see
@retailcoder the userid is blank for all votes except favourites and accepts
 
4:40 AM
ok
 
I haven't flooded the front page too bad.
I'm trying to work through those bad titled questions that I showed you the other day @Jamal
 
@syb0rg: It would be better to do it over time as the edited questions get pushed down. Don't do too many at once.
 
@Jamal I know. That's all I'm doing for now.
I'm also working on a comment to the OP on how to phrase his titles better.
Looking through your questions, you have a lot of titles that unnecessarily contain tags. You should only use titles to briefly describe what your program/method does. — syb0rg 48 secs ago
 
Interestingly, we have fans named "Linger" and "user" — lurkers who have cast 984 and 843 votes, respectively.
 
@200_success Shouldn't the order be with the reputation closer to 500 listed first?
On your query.
 
4:54 AM
@syb0rg Depends on what you feel like reviewing first. I think it's more urgent to bring newer users into the fold. But all genuine upvotes are welcome at this time.
 
0
A: SEDE is up. What now, Wonderland?

retailcoderVote Analysis Compare year-to-year monthly votes, by type: Answer votes AcceptedByOriginator UpMod DownMod BountyClose Deletion Undeletion ModeratorReview ApproveEditSuggestion Question votes UpMod DownMod Favorite Close Reopen BountyStart BountyClose Deletion Undeletion ModeratorReview A...

 
@200_success That's how we will get more people above 500 reputation in my personal opinion. Otherwise we will just keep voting on the stuff near the top of the list.
Then we have even more of a backup.
Just my two cents though.
 
That's a valid viewpoint too. Any other ideas for the order? We could do it based on some weighted criterion, for example.
 
The more active they are should bump them up a bit.
 
@200_success I think the vote analysis query I just got here, could use some windowing functions - I'm out, but feel free to fork at expand, I'm thinking TY/LY/LLY %increases for each posttype/votetype/month
 
4:59 AM
I see what your point that we would be looking at the same bunch of posts over and over again. Maybe it's possible to filter or reorder the query based on the time of the most recent vote?
 
I have a pivot chart in mind
 
@200_success That data is available?
 
The Votes table has a CreationDate column.
 
That could be a weight used then. More recent votes weigh them down a bit (or raise them up?).
 
If you come up with any good ideas for the sort order, I'd be glad to incorporate them into my query, so that it doesn't have to live in a fork.
 
5:04 AM
good night @all!
 
I need to think of an algorithm that would be optimal.
Goodnight @retailcoder
 
Good night from me too. I've played around too much on CR today.
 
Well then, I concede to the peer pressure. Good night CR!
 
5:18 AM
0
Q: What's doesn't my do...while prints out the values of "fire, police and sanitation" to the given problem?

ShazThanks in advance, still learning. public class youtubeProblemTest { public static void main(String[] args) { /* * This program assigns a value to fire, sanitation and police that is between 1 to 7. * Where the value assigned to "police" specifically is EVEN integer [between 1 - 7] still. ...

 
6:12 AM
Just kidding! Couldn't go to sleep with a good solution on my mind for sorting that query.
-- Sort results by the time of the latest upvote or downvote on any
-- of the answerer's answers.  This sets up a roughly circular queue:
-- after an answer near the top of the list has been voted on, the
-- answerer goes to the back of the queue, giving other users' answers
-- fresh visibility.
That's it. Goodnight.
 
Goodnight!
 
6:38 AM
0
Q: MaxSum sub matrix within a matrix

JavaDeveloperCode review for best practices, optimizations, code cleanup etc. Also requesting verification of the complexity: O(row*row*col). /** * Contains coordinates of the * topMost left, of matrix, obtained by getRowOne and colRowOne * bottomMost right, of matrix, obtained by getRowTwo and getColTwo...

 
6:57 AM
0
Q: Which of the method names is better?

leonideveloperWhich of these names is better? time.getHours(); or time.hours(); ? And why?

 
 
2 hours later…
9:13 AM
Good morning!
Any Java gurus around here at this time of day??
Stop sleeping monkey! Wake up, @rolfl!
 
0
Q: How should I set a daily method as executed, from inside or from outside?

Mitulát bátiI have the following code: static void TimerElapsed(object sender, ElapsedEventArgs e) { foreach (BIGService bigService in runningServices) { if (!bigService.ExecutedToday) { int executionResult = bigService.Execute(); string serviceName = bigServi...

0
Q: How to hide implementation of JDBC while processing large query in client's code?

gadonI have client't methods that processing large SQL query. I wouldn't like to do that through getting whole query result to memory but process it in batch. It entails with exposing JDBC API to client's code and I think that this code could be much better refactored.. Here is my code: m_jdbcMan...

 
9:39 AM
0
Q: Auto-size this div using only CSS

DravenI am trying to get the <div class="audio-feed-wrapper"> tag to auto resize (width only) if there are more <li> tags inside of it, using only CSS. I'm willing to change some HTML IF I must to get it to work. There is javascript, which is too long to post here, that is adding styling to some of th...

 
9:57 AM
0
Q: Is this good module design?

ViktorI have written a singleton module which is to be used for some future modifications on .chart elements. Modification functions, such as colorArgumentButtons() are called recursively so that I don't have to iterate over all .chart elements in all functions. Is my use of _ for private "class vars"...

 
10:22 AM
0
Q: Code duplication when converting DTO to String messages

abuzittin gillifircaIn a payment application a day before and at the same time with some payments some messages(email) needs to be sent. I have a DTO (called EscrowPayment, projected from some entity) from which I generate and send two similar `messages. I look for advice specifically on the following issues with t...

 
10:42 AM
0
Q: Secure math expressions using PHP eval()

MartijnPHP's eval() is general considered insecure with any user input. However, with filtering of input (i.e. [-+/*0-9]) you can make eval() secure for a small subset of PHP; mathematical expressions. I've tried to think of a way to extend that by allowing a limited set of math functions and I believ...

0
Q: Is this secure?

LoaiI have the following contact form, using PHP, JS and a bit of Ajax. I want to make sure that it is secure. Please can anyone advice me? Thank you. <?php session_start(); if ($_SERVER['REQUEST_METHOD'] == 'POST') { ob_start(); if(isset($_POST['name']) && isset($_POST['email']) && isse...

0
Q: Changing the view - Tetris Game - Java - MVC

Jasper NuyttenI'm trying to make Tetris in JAVA with MVC. Now, I wrote everything and it all works fine. I only have one problem left; changing the views. When I get a score of 200, for example, the view has to change. I want to change the squares to circles in my gameboard. But I cannot make it work. I could ...

0
Q: Grouping a CSV by column

Ian BrindleyI've started writing a small CSV parser class as I needed a method to group a CSV file by a given column. class CSVParser { private $FileName; private $FileHandle; private $HasHeaderRow = false; private $RowsToIgnore = array(); public function __construct ($FileName, $Mod...

 
Damn there's many incoming zombies!
 
11:17 AM
@SimonAndréForsberg - technically, I am a Javascript GURU .... go figure.
 
0
Q: Trying to avoid developing bad habits early on

Mike MedinaI began the journey to be a self-taught programmer about a month ago and my biggest fear about teaching myself is developing bad habits and not realizing it. I'm looking for criticism on this "Guess a Number" game. It's my first real "project" that I've invested serious time into so I feel like ...

 
@rolfl StackExchange creates all kinds of gurus...
Morning, anyways.
 
Indeed, morning.
 
or midday....
 
So, is there something I can help you with... ?
 
11:28 AM
@rolfl Yeah, there might be, I'll just have to formulate myself :)
 
Mostly water, and carbon ... apparently
 
Howdy peoples
 
I'm working at something here at work to speed up the adding of stuff to a database. All the adding goes through a server. I was thinking that using a LinkedBlockingQueue together with a bunch of worker-threads would speed things up. Each thread is responsible for maintaining it's own NettyClient to the server. Does this sound reasonable?
 
Excellent, I am about to have a piece of fruit for breakfast.
2
 
you're a monster!
Ah who am i kidding, i'm a cannibal :)
I love me a good fruit salad!
 
11:32 AM
@SimonAndréForsberg that so depends on so many things ... ;-)
 
Oh, did you ever get a look at scratch?

What do you think?
I'm pretty fond of the science of learning myself, also thought about going the teaching route once
 
@rolfl @retailcoder The previous programmer who worked on this code seems to have tried to make his own ObjectPool system. However, whenever he retreived an object from the pool, he did not remove it from the list of available objects. So each fetching of an object retrieved the same damn object. And what's more, he didn't use any multi-threading at all. And he called all this a "sliding window algorithm", which is something entirely different.
 
Netty is not something I have used, but isn't it supposed to be asynchronous, so you should be able to just queue things up from the client side, and then the server can habdle the multi-threading complexity
 
@rolfl I suppose the best thing to do is to write some code and just test it, huh?
 
@SimonAndréForsberg heh, sounds like a candidate for TDWTF
 
11:35 AM
@rolfl Keyword: Supposed to. When the code sends a request to the server it also calls an awaitReturn method before continuing execution. So essentially, all asynchronization goes out the window.
@apieceoffruit TDWTF?
 
@SimonAndréForsberg TheDailyWTF.com

tales of horrible code found in the bowels of legacy systems
they add a new article daily.
 
@SimonAndréForsberg, so, how would adding threads to the client help if all that's going to happen is you wait for a thread now instead of waiting for Netty
 
@apieceoffruit I did get a look at scratch, I recognized the "building block" system, I have tried that out on a google page somewhere. I've also attempted to make my own similar system like that, but I don't think it's as intuitive as Google's building blocks. I might show you a video of what I've made some time though. Remind me about it ;)
@apieceoffruit Also make sure that you take a look at codecrap.com . They don't have any stories, but just horrible code examples.
@rolfl At the moment I'm coding for using multiple Netty connections.
 
Yeah that most likely was the google app builder, for android development. I have played with that myself but found it a harder concept for kids to grasp.

Yeah I'd love to see it.
Reminds me of when I first looked into DSLs and built my own language and compiler then built a modular tree system to build a plain text user rule system.
 
But if Netty is asynchronous, which it indeed seems to be, then I should be able to use just one Netty connection, and just make sure that it really is asynchronous.
@apieceoffruit No, it wasn't for Android Development. I have the link bookmarked somewhere at home, I can send it to you later today.
 
11:40 AM
@SimonAndréForsberg - if the client side has been blocking on Netty anyway, it must be running multiple threads (otherwise the client side would be dead slow - which I suppose it may be), so that means you can use the client threads to do your work for you. No need to have additional threads while client threads sit idle.
Maybe having a NettyClient 'pool' is what you need?
(as a hack).
Breakfast time ... bbiab
 
@rolfl I people that a NettyClient 'pool' was what the other programmer tried to implement. And I've read that it's not recommended to try to write your own object-pool (which sounds understandable)
 
So, don't write your own.... use a COncurrentLinkedDeque and the pollFirst method. If you get null, create your own NettyClient. When you are done, offer it back on to the deque
 
11:56 AM
@rolfl The client reads data from a file and sends about 140k requests to a server. And it used to wait for response from the server before processing the next item. I'm gonna try having 10 simultaneous connections to the server running and we'll see how that works
@rolfl Good thinking!
 
12:28 PM
0
Q: Requirejs modules and lazy instantiation

Jezen ThomasI’ve implemented what I think is a good structure for instantiating classes with Requirejs. My idea is that each HTML view that acts as some sort of component will have a corresponding JavaScript view-module. Constructors are only initialised when a matching component is found in the DOM. Everyt...

 
12:59 PM
0
Q: two way communication between two clients and a single srever

Sanju Reddyi need to implement "COMMUNICATION BETWEEN TWO CLIENTS" i know one way communication client->server->client but i have to implement client<->server<->client please help me.. thanking you

0
Q: How to re-factor this android/java code?

Sharifur RahmanI am setting different radiogroup like this way. For re-factoring purpose could I reduce the size of this code. How? fragment.setT1RadioGroup((RadioGroup)fragView.findViewById(rowids[0]).findViewById(R.id.t1_radiogroup)); fragment.setT2RadioGroup((RadioGroup)fragView.findViewById(rowids[1]).find...

 

« first day (258 days earlier)      last day (3753 days later) »