« first day (195 days earlier)      last day (2198 days later) » 

12:06 AM
Q: HTML / CSS - Can't align the body of the resume

JohnI'm new to HTML and CSS, so I decided to build a dumby resume simply to work on my new found knowledge. However, I am completely stumped on why my entire message body is centered, instead of aligning more to the left. I tried doing p align left in some areas, as well as text-align left. I remo...

12:19 AM
Q: Encapsulating behavior spread across multiple event handlers

KevinI wrote a chatbot in Ruby for turntable.fm, a chatroom where users can listen to music together. It interacts with users in a room, who can type in specific keywords and get responses from it. It also enforces some rules. For example, if people playing music go AFK for too long, it will force the...

12:45 AM
Q: strstr implementation

bjackflyPlease review my strstr implementation. This is an interview question that say does not allow the use of strlen(). Is there a better way than using a boolean below? #include <iostream> #include <cstring> char* my_strstr(char * s1, const char *s2) { if ( s1 == NULL || s2 == NULL ) return NU...

1:05 AM
Q: Please review my answer for interview question: merge two sorted arrays together

bjackflymerge two sorted arrays together #include <iostream> #include <vector> std::vector<int> merge2Sorted ( std::vector<int> left, std::vector<int> right ) { //finger matching algo auto itLeft = left.begin(); auto itRight = right.begin(); auto itLeftEnd = left.end(); auto itRightEnd = ri...

1 hour later…
2:31 AM
Q: First ever unit test. Am I headed in the right direction?

user2202911I'm learning backbone.js in parallel with unit testing. I've just made a simple model and wanted to unit test it. Do I have the right idea? I am simply making a model with some default values. Person = Backbone.Model.extend({ defaults: { name: "fetus", age: 0, child: '' }, initi...

3:18 AM
Q: Coding style in Ruby format in an method and variable assign

pocCase 1_a: zip_file = file.sub(directory, '').sub!(/^\//, '') zipfile.add( zip_file, file) Case 1_b: zipfile.add( file.sub(directory, '').sub!(/^\//, ''), file) Case 2 : If the String contains lots of parameters , I prefer write in an array.But I'm not sure to have a line brea...

Q: Can someone check my ROBOTC Jeopardy Program?

NategamerSo here is my code, I have tried to comment it as much as I can, If you have any questions about it please feel free to ask. The code it self should have alot of details and the comments mostly explain what is going on. The task description is in the code. #pragma config(Sensor, dgtl1, allowBut...

3 hours later…
6:30 AM
Q: Merge sort, can't find what's wrong

ERJANMy code seems fine, but keeps getting error public class mergesort{ public static void main(String args[]){ int test[] = {4,5,6,67,76,89,90,12,10,11,13,7} ; mergesort(test, 0, test.length-1) ; for(int i = 0 ; i < test.length;i++) System.out.print(test[i] + " ") ; } static vo...

Q: Basic graphical R code draws an ellipse instead of a circle

dataqeuerentI wrote some very basic R code. This has at least two problems. 1 - It uses a very basic imperative-programming style instead of good R style. 2 - It draws the result as an ellipse, not a circle. This effect is barely visible on RGui on Windows, but extremely visible in RStudio on Linux. The...

Q: How is Code Review doing right now?

Grace NoteI’m Grace Note, a Community Manager at Stack Exchange. Normally for most sites we run a community site evaluation, as explained in this Meta Stack Overflow post under Public Beta sites. However, these reviews involve comparing our site content against searches on the internet for competing answer...

6:57 AM
Q: Is this contact form safe?

block14Here is the code that I am using on a website's contact form: HTML file: <form name="ajax-form" id="ajax-form" action="php-file.php" method="post"> <label for="name">Name: * <span class="error" id="err-name">please enter name</span> </label> <input name=...

7:43 AM
Q: Can this "syntax sweetener" be improved?

DaggI have a Lua project that uses some syntax sugar described in DecoratorsAndDocstrings, near the bottom of the page. It looks like this: random = docstring[[Compute random number.]] .. function(n) return math.random(n) end Notice how the function definition is concatenated to the re...

7:56 AM
Q: Wordpress Filter Post By metavalue

Munch LaxI am making a filter to get posts by status that was saved by post metavalue in wordpress plugin that is a question answer system, the question and answer are post object . You can see in following code: // Filter post where function posts_where( $where ) { global $wpdb, $dwqa_general_se...

8:56 AM
Q: how to improve my php adding script?

user2793065I have a script, which update my table's column and write an id in it. I need to check whether the column is empty or not, if it is not: I add a ','. Here is the script: $subs = mysql_fetch_array(mysql_query("SELECT subscribed_user_id FROM users WHERE user_id=".(int)$_GET['user'])); $subs_ar...

1 hour later…
9:56 AM
Q: Aliasing in Set and Get?

user2976270I have thisPoint Class: public class Point { private int _x; private int _y; public Point(int x, int y) { _x = x; _y = y; } public Point(Point other) { _x = other._x; _y = other._y; } public int getX() { return _x; ...

10:09 AM
Q: Is there anything incorrect about this layout, semantically or otherwise?

DylRichoI would like to know if my chosen layout is HTML5 standards compliant, or if I'm using the heading tags incorrectly (or any other tag for that matter)? Main Header <h1> for website name <h2> for webpage name <h3> for website slogan, or should this be <span> with styling? Main Content/Sidebar...

11:08 AM
Q: RAII-Style Lockable Objects

icabodTL;DR: Without the phrases "use Boost" and "use C++11", does the posted code for RAII-style locking of a resource look correct and safe, or is there something I've missed. Long Version: I am working on a Windows project using C++03 (C++11 is not an option), and without using Boost (I know, righ...

1 hour later…
12:15 PM
Q: Migrating threads to forks

mpapecThere is forks::shared that should be drop in replacement for threads::shared, but how should I replace Thread::Queue? I would like to convert following code to forks, if it is possible? sub Qfac { use threads; use threads::shared; use Thread::Queue; my ($worker, $arrid, $arg) = @_; ...

4 hours later…
4:01 PM
Q: Can someone explain this code in prolog step by step please?

user2326995absolute noob at Prolog and I'm trying to understand this code. If anyone could explain it step by step in child language that would be a great help ;) thankyou! divide_by(X,D,I,R):- X < D, I is 0, R is X. divide_by(X,D,I,R):- X >= D, Q is X - D, divide_by(Q, D, S, R), I is ...

@Jamal: do you have the ability to roll back Edits on a question?
Q: Is there anything incorrect about this layout, semantically or otherwise?

DylRichoI would like to know if my chosen layout is HTML5 standards compliant, or if I'm using the heading tags incorrectly (or any other tag for that matter)? Main Header <h1> for website name <h2> for webpage name <h3> for website slogan, or should this be <span> with styling? Main Content/Sidebar...

the OP changed the content of the question, granted the Strike throughs, but they changed the code as well
2 hours later…
5:59 PM
Q: Check IEnumerable Count

ledbutterLet's say I have a collection of expensive-to-generate objects stored in an IEnumerable: IEnumerable<Expensive> expensiveObjects = CreateExpensiveIEnumerable(); Now I will iterate over everything in expensiveObjects and afterwards, I want to know if it was empty. Here is how I am doing t...

6:52 PM
Q: Remove duplication in python code for dict schema validation

lokiI want you to look the following code for validating dictionary schemas. There are some libraries out there that do the same thing, but I just wanted to write my own for fun and not to overload my current project with a big third party library. Feel free to comment regarding code optimization, d...

@retailcoder: you beat me to 1K!!! Congratulations!!!!
7:15 PM
@Malachi: Yes I do.
@retailcoder: Congrats! I've looked at your first review (rejection), and I agree it was a good one. Good start.
7:30 PM
@Malachi thanks! You're not far behind I see :)
@Malachi: Oh! You were linking a specific question for rolling-back! Okay, I'll take a look at it. Thanks!
@Jamal I've got quite a few suggested edit reviews under my belt on SO, 167 approved and 131 rejected if I'm looking at my history correctly. So far on CR I have 0 approved and 2 rejected (and 1 skipped - I didn't want to reject @Malachi's retagging for being "too minor" and I never quite know what to do with these edits that merely just add or remove a tag)... It takes a good edit for me to approve :)
Q: Using std::future to manipulate objects in C++11

pt3dNycI'm experimenting with std::future, but haven't found any materials that deal with the usecase I have in mind and was hoping someone could either confirm or deny the validity of the approach excerpted below: class Thing { private: std::string mValue; public: Thing() : mValue( "" ) {} ...

@retailcoder: Same here. I mostly skip minor edits, unless they are too minor. However, with editing privileges, you're free to make any kind of edit you want (not bad ones, of course).
For minor edits, I tend to reject them as too minor when I see something in the post that could be improved (I don't know, "i" => "I" for example). Maybe I should "Edit" the post instead, checking that "suggested edit was useful" box.
7:44 PM
sometimes all it takes is another tag on an old question and someone sees it that has a review for that question.
@retailcoder I have had it happen a couple of times, and it attracts the right votes for the question and the answer as well.
@Jamal: I had flagged it for moderator as well I think
@Malachi true, but on SO you have a high chance of having it declined for being too minor - or approved out of luck by some robo-reviewer (there's quite a few of those on SO). On SO at least, there's a gap between good edits to suggest and good edits to make (when you have enough rep to just make 'em), hence I was reluctant to suggest these kinds of edits under 1K, and now >1K I'm reluctant to approve them. Maybe that would be a good meta-discussion?
8:19 PM
Q: Am I doing Angular right?

Jason SwettI'm starting a new project using Rails and AngularJS. Things seem to be going okay, but I'm sure there are certain things I'm doing totally wrong. Here's a snippet from the project. If you just want to comment on this, that's fine. You can also see more on the project's GitHub. @lunchHub.contro...

9:07 PM
@Jamal: what questions did you retag with the WordPRess Tag? before there was only like 1 or 2 questions, maybe I misunderstood your comment
Q: Alpha Beta Pruning Java

user32195I've been working on the code for alpha-beta pruning for a Connect Four game and I can't seem to get it right. I thought I implemented it correctly at first, but the algorithm would return the column 1 every time. I have two ints val and nodeVal that I use to determine my alpha and beta values. W...

Q: Roman numerals to decimal

JustinThis is an assignment for class. I would like to know how to improve my code. It is a program to convert Roman numerals to it's decimal equivalent. This is what I have so far. There must be a better way of distinguishing between ex. 'IV' and 'VI' than what I have currently written. #include <ios...

Q: Is it fair to close a question with a bounty attached to it

tomdemuytThis question does not have working code but has a bounty attached, and only needs minor polishing to make the code work. Should the question be closed or not? The author has been informed since a while ( over 10 days ) that the code does not actually work.

9:36 PM
Q: Exporting data in a Wordpress widget

tjansFor starters, I hope I'm posting this in the right stack exchange. I'm very new to Wordpress plugin development. I have some custom tables in a Wordpress database that I need to export to CSV. I created a dashboard widget to help with this based on some assistance given to me on on one of my SO q...

Q: Testing WordPress with Mockery and a Facade

Kevin PerrineI've put together this gist with an idea about testing WordPress themes and plugins with Mockery and a WordPress facade object. I've love some feedback on the approach, please. WordPressFacade <?php /** * I hate unit testing plugins and themes in WordPress. The standard WP unit testing * li...

Q: jQuery/AJAX Plugin for WordPress and Foundation Reveal: How can I improve this code?

tnogI figure that someone here probably knows a much better way to do this. I'm still figuring out AJAX and jQuery, so I consider that I still need to master quite a bit of knowledge. My function extends Foundation 4 Reveal's functionality in a few ways: Uses WordPress AJAX to dynamically pull in...

Nice, I thought that I created that tag, but then when i looked at it there were a bunch of questions on it already.
@Malachi: There are many others missing that tag, but I don't want to start an edit flood.
10:10 PM
@Jamal: I am glad that it is getting used. that's all. there weren't any followers before when I was messing with it and now there are 10 people following it. wordpress is very popular, so I see it getting used a lot,

« first day (195 days earlier)      last day (2198 days later) »