here in The Netherlands some colleges/universities are disallowing using any type of watches, due to smartwatches
Which is okay
Then some people come with the argument that: "Looking at the wall clock will cause me to lose my concentration, whereas looking at a regular watch would not"
WTF people?
I call being able to memorize formulas, etc. in college/university bull either way. If you can make the exam in 3 hours, with a full book if needed, then I think you are qualified. If you have no clue what you are doing and first need to read the full book before starting the exam itself in those 3 hours, you will not pass either way.
The function im2col in MATLAB is very useful to vectorize Patch based Image Processing algorithms.
The problem is the function isn't optimized and doesn't use C Code.
I'm trying to build an efficient C code for that.
This is the code I created:
function [ mColumnImage ] = ImageToColumns( mInpu...
> On average, one reviewer will find roughly half of the defects on their own. In fact, in a study at Cisco, developers who double-checked their own work found half of the defects without the help of a reviewer at all!
@RubberDuck That's pretty much what I'm talking about. You're not finding those defects on your own; you're finding them after being prompted by an outside source.
@Marc-Andre It's a pretty bad StackOverflow question since it works and there isn't really a problem
I wrote a function that solve a special problem. But one of my 'special hardcore software engineers' told me that this is a bad solution - but he will not give me a better solution. So I ask you: What could I do better? (This is more an academic exercise than a bottleneck in my software.)
I have...
in my GridView i have a method call
DisplayWarning()
and i want to calculate Day Difference Between Date column( in my SQL server ) and DateTime.now and show one of my StatusIMG in Gridview , This is Gridview's Code :
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"...
Okay I'm not doing this... I have to finish certain segments on my own here and I can't do that when the code already looks like a bomb exploded inside it
Can this be simplified in any way?
if ($('.content').length && (document.referrer.search('page1.html') > 0) ||
$('.content').length && (document.referrer.search('page2.html') > 0) ||
$('.content').length && (document.referrer.search('page3.html') > 0) ||
$('.content').length && (docu...
@MsRebeccaBlack - Join us for #FridayReviewChat in The 2nd Monitor (#CodeReview): http://chat.stackexchange.com/rooms/8595/the-2nd-monitor - nice folk there!
For what it's worth, in my experience, reaching out to contact people is surprisingly effective, and often people respond like people, and are genuinely nice, and accomodating.
I sent an e-mail to Steven Harper once. I got a nice reply (personalized, possibly from an assistant), and he forwarded it to the Canadian minister of Foreign Affairs, who then responded to me too.
I need an adapter function to convert a const char * to char ** splitting the words in the initial string at every white space (leading, consecutive and trailing white spaces should be ignored).
Here is my program:
#include <iostream>
#include <vector>
#include <cctype>
void str2arg(const char...
This is about displaying an XML in a browser via an XSL 2.0 stylesheet which contains a user defined function.
The XSL with the function works fine when used on the XML via an XML editor.
However, both Firefox and IE8 give an error when the user defined function is used :
Firefox: "Error duri...
Generate MATLAB MEX File Alternative to `im2col` [on hold] up vote 0 down vote favorite The function [im2col][1] in MATLAB is very useful to vectorize Patch based Image Processing algorithms. The problem is the function isn't optimized and doesn't use C Code.
I'm only after its 'sliding' mode of operation. I wrote a MATLAB code which mimics its functionality. The code is written C style so the translation by MATLAB Coder would be direct ans easy to allow optimizations.
function [ mColumnImage ] = ImageToColumns( mInputImage, blockRadius )
The function im2col in MATLAB is very useful to vectorize Patch based Image Processing algorithms.
The problem is the function isn't optimized and doesn't use C Code.
I'm trying to build an efficient C code for that.
This is the code I created:
function [ mColumnImage ] = ImageToColumns( mInpu...
I honestly think that all the answers make good points (modest, I know), but it is fascinating how three people can write three reviews, each independent, and covering different things. I don't envy the choice you make in accepting an answer.
This post is the result of reading through and following the LOLCODE Specification 1.2, and writing and executing my code on compileonline.com.
My "hello world" was going to be a fizzbuzz. I like it because it nicely illustrates the basics of a language - variables, operators, looping, condition...
I've recently started a new job and been drafted on to a project that's running late. My task was initially to add Bluetooth connectivity to a C# app, but at the request of a more senior colleague I've had to write a standalone executable to open up two Bluetooth connections and forward any data ...
Just looking to do some super-duper basic email validation and was wondering if my code is efficient.
IE8 compatibility is a requirement.
/**
* Email validation is futile
* Make sure the @ symbol is not the first or last character
*/
jQuery.validator.addMethod("easyEmail", function(value, el...
> Of course, Americans could also probably use a little remedial geography instruction, if a poll conducted by the Washington Post in April is any indication.
Only 16% of respondents correctly located Ukraine on a map, and more than a hundred of the 2,066 participants seemed to think the Eastern European country was somewhere near Greenland or, ironically enough, Canada.
/**
* Creates an array-type value.
*
* \param [in] parent The optional parent scope to use.
*
* \note \a parent may be NULL, in which case this array is treated as the root.
*
* \return An empty array-type value with parent \a parent.
*
* \retval NULL Memory allocation failed.
*/
ValueObject *createArrayValueObject(ScopeObject *parent)
{
ValueObject *p = malloc(sizeof(ValueObject));
if (!p) {
perror("malloc");
return NULL;
}
p->type = VT_ARRAY;
p->data.a = createScopeObject(parent);
Vegreville /ˈvɛɡrəvɪl/ is a town in central Alberta, Canada located on Highway 16A approximately 103 km (64 mi) east of Edmonton, Alberta's capital city. It was incorporated as a town in 1906 and that year also saw the founding of the Vegreville Observer a weekly newspaper for the region.
A large percentage of Vegreville's population is of Ukrainian Canadian descent and it is home to the world's largest pysanka (Ukrainian Easter egg).
== Geography ==
=== Climate ===
Vegreville experiences a humid continental climate (Köppen climate classification Dfb).
== Demographics ==
The Town of V...
This Question is a very good question about LOLCODE code "
Down with FizzBuzz... LOL
"
The formatting is pretty good except for the comments aren't formatted as comments.
I can see this being a popular formatting not only in Code Review but also in Puzzles and Code Golfing as well.
From lo...
I just don't know if I know enough Javascript to be able to read the code and make an extension myself. maybe that is something I should look into.. I need to get a mini laptop that I can take with me places so I can code no matter where I am
This code will be passed a string which will contain one or more hostnames. A hostname can be
dotted-decimal
plain name (like my_host)
FQDN or even partially qualified
A string containing regex (my_hos[tes])
target list is an array of known hosts to match any regex against.
Any suggestions ...
@RubberDuck Yeah, and, what concerns me, is that, at the rate things are going, one of the answers will be accepted, and score +40 and Code Review will have it's first lolcode guru!
@MsRebeccaBlack - Join us for #FridayReviewChat in The 2nd Monitor (#CodeReview): http://chat.stackexchange.com/rooms/8595/the-2nd-monitor - nice folk there!
I wrote this Ruby Mod 11 (perhaps it's a bit generous to call it that) implementation to validate Brazilian CPF documents, which use a Mod 11 algorithm. CPF format is a 9 digit number followed by two checksums. It's often presented in this format 012.345.678-90. Feedback is welcome.
class CPF
...
I've written an eCommerce shopping cart handler class in PHP. Please review the code and inform me of any errors and/or badly written code and/or badly handled logics.
class Cart extends Sessions{
protected $cartProducts = array();
protected $dbLink;
protected $cartName;
public function __cons...
I'm attempting to define an abstract interface for a key value store.
Some requirements:
Once a key has been written it should never be overwritten (although it may be deleted
Transactions with multiple operations are not required
To begin with, this is the basic interface:
class KVS a whe...
While other answers make good points, I have to wonder why you are using recursion. This is such a simple problem to solve with a for loop.
I assume that you are not supposed to start from any index other than index 0, so consider the following routine:
public int searchArray(int[] arr, int ele...
I was hoping someone would review your scala but I don't think it's going to happen. So I thought I would at least say something about sql.
Alias names
Table aliases are handy especially for very long table names, however I feel that your naming is too minimal. Single-letter aliases tell Mr. M...
it wasn't.. Ahah, I'll read it but I think I got my head around the complexity, thanks to you! I'm just wondering, most people here seems to put the brackets around a one line statement (Say if(true){asd();} instead of if(true)asd();). I'm not used to do this, is it something I should start doing? I don't think it isn't a convention or anything, but is everyone doing it?