I am still working on basic data structures for C. Now I came up with a hash map:
unordered_map.h:
#ifndef UNORDERED_MAP_H
#define UNORDERED_MAP_H
#include <stdlib.h>
#include <stdbool.h>
#ifdef __cplusplus
extern "C" {
#endif
typedef struct unordered_map_t unordered_map_t;
...
I've seen tutorials about node promises and such but not using bind. I feel like I can do lots of things this way and keep everything clean:
Updater.prototype.generateLocFieldForDocs = function(docs) {
console.log('list obtained')
async.eachLimit(docs, 10, this.generateLocFieldForDoc.bind(th...
My favourite was the guy calling the help desk to ask about a fridge installation and why they had a bigger freezer than fridge in an office on the other side of the planet. The bloody thing was upside down.
Is it good solution for updating ObservableCollection? Are there any dangers hiding in this code?
namespace WpfApplication142
{
/// <summary>
/// Interaction logic for MainWindow.xaml
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
...
PHP4.1, 85-10 bytes
Yes, this is a very old version, but it has a functionality I need.
You can still run it in any more recent versions of PHP, but you need to set the variables yourself before running the code below.
That helps me to reduce the size of my code a lot!
It is really basic:
<?f...
> Is it actual code from a project rather than pseudo-code or example code? > Do I want feedback about any or all facets of the code? > To the best of my knowledge, does the code work as intended?
I would like to create a c++ program that can help me to find the euclidean distance between 2 randomized vectors. This is what i got so far.This program can run but still fail to give me the correct answer. I hope someone could point out my mistake. Thank you in advance!
#include <stdio.h>
#in...
To "entertain" some students I advise, I have written the following piece of code:
/* This is valid C++ */
auto main() -> decltype('O.o') try
<%[O_O = 0b0]<%
http://codereview.stackexchange.com/questions/102581
typedef struct o O;
o*(*((&&o(o*o))<:'o':>))(o*o);
if(O*O = decltype(0'0[o(0)](0))(0)...
I'm voting to close this question as off-topic because on the on-topic help section ("What questions are on-topic for this site?") one of the points of the on-topicness isn't fulfilled. Quoting: "Do I want the code to be good code? (i.e. not code-golfing, obfuscation, or similar)" isn't fulfilled and therefore, as per the documentation: "If you answered "yes" to all the above questions, your question is on-topic for Code Review.", but the refered question would have an answered with a "No", making this off-topic. — Ismael Miguel1 min ago
> I'm voting to close this question because it's content is in direct conflict with the on-topic rule "Do I want this code to be good code?", which does exclue golfed or obfuscated code.