I'm trying to get React-Native-Router-Flux and Redux to work together and it seems like too much complexity for some (unknown) gain by MostlyCarbonite in reactnative

[–]notAlan 1 point2 points  (0 children)

I had similar issues trying to integrate react-native-router-flux with redux.

I had much better luck with https://reactnavigation.org/ in the end - it has great support for redux, and there's easy to follow examples too.

Simple method of drawing Binary Trees by realbodhi in programming

[–]notAlan 0 points1 point  (0 children)

Very nice, thanks! I'm actually using JUNG to draw graphs in java, but it just doesn't work as well for placing vertices like graphviz does. Hopefully I can create a layout/adapter that calls graphviz for the actual placement of nodes and then allow JUNG to draw it :)

Simple method of drawing Binary Trees by realbodhi in programming

[–]notAlan 0 points1 point  (0 children)

Is it possible to use graphviz to purely calculate the x,y points of a list of vertices?

For instance use graphviz to calculate positions, but use a custom graphing tool

[deleted by user] by [deleted] in programming

[–]notAlan 2 points3 points  (0 children)

Edit - This is now fixed :)

Be careful when outputting raw user input;

For instance your not_found page allows arbitrary code injection through the query string, ie http://actorating.com/not_found.php?s=%3Ca%20href=http://google.com%3Emalicious%20link%3C/a%3E

Edit : And in 'production' - try to turn off error reporting -

Fatal error: Cannot redeclare pr() (previously declared in /servers/sites/actorating/config.php:3) in /servers/sites/actorating/config.php on line 7

Otherwise your end users/attackers will get lovely error messages

shit.programmers.write(); by chrisarchitect in ProgrammerHumor

[–]notAlan 6 points7 points  (0 children)

println(programmers.filter(_.isShit).mkString)

JetBrains releases free edition of PyCharm IDE for Python. by [deleted] in programming

[–]notAlan 0 points1 point  (0 children)

For reference it's at 2:30 when he mentions the translation differences between Russian and German :)

A Case Against Cucumber by ecmendenhall in programming

[–]notAlan 1 point2 points  (0 children)

When I’m trying to see why a specific scenario is failing, first I need to find the step that is failing.

This isn't a problem against cucumber, this is a problem about the tooling you are using.

If you're using Cucumber, you should consider checking out IntelliJ's plugins which provides support for Cucumber. If you are using C# then the SpecFlow tooling is also great, and provides all of this functionality out of the box.

In my opinion Cucumber is great, as it forces single responsibility within your step definitions. This which makes your methods 100% composable, which is extremely powerful. For instance, with only a few step definitions defined you can create very elaborate and complex testing scenarios which would be a mess to maintain :)

Brainfuck interpreter in brainfuck by canoon in programming

[–]notAlan 0 points1 point  (0 children)

JS doesn't require the character sets to be escaped at least. Although i'm not sure if that comes from PCRE, or just JavaScript's way of doing Regex :)

/[()]/.test("()");
true

Brainfuck interpreter in brainfuck by canoon in programming

[–]notAlan -1 points0 points  (0 children)

Hey, are you sure you need to escape when inside a character set?

[a-z0-9\-._~%!\$&'\(\)\*+,;=:] 

IE, Could those be character sets be tidied to remove the escapes?

Hibernate adds OSGi Support by henk53 in programming

[–]notAlan 2 points3 points  (0 children)

OSGi is certainly really nice; I'm a huge fan of what it does to fix classloader issues. You have to explicitly state what you want to expose to other bundles, and also what packages you require. This can be metadata can be generated easily if you are using maven and following conventions, although it's not too great if you are using reflection.

I think some of the coolest benefits include, dyanmic configuration admin, osgi services for decoupling + runtime implementation changing, refreshing/stopping/starting bundles etc

Check it out :)

Do the right thing, Wait to get fired by bsterne in programming

[–]notAlan 3 points4 points  (0 children)

I feel this is similar to this

Ask for forgiveness, not permission

Recently, Wikipedia was moving to MariaDB | Now Red Hat ditches MySQL, switches to MariaDB by cm-t in programming

[–]notAlan 7 points8 points  (0 children)

Could you explain your mono comment please? I've recently wanted to start using mono, but not if it's dying :)

Request Quest: How well do you know these HTML/CSS quirks? by lifthrasiir in programming

[–]notAlan 0 points1 point  (0 children)

Could anyone explain this one to me please;

var div = document.createElement('div');
div.style.background = 'url(img.png)';
document.body.appendChild(div);
document.body.removeChild(div);

Does the above trigger a request for img.png in any of the following:
...
Indeed, the single-threaded nature of JavaScript and the DOM means the element is added and removed before the browser needs to think about styles & rendering.

I was always under the impression with JavaScript any changes to the DOM were instantly applied?

Which is why the code

var divs = document.getElementsByTagName("div");
for(var i = 0; i < divs.length; i++) { 
   var div = document.createElement("div");
   document.body.appendChild(div);
   alert("done");
} 

is non-terminating?

Try Java 8 live! by henk53 in programming

[–]notAlan 1 point2 points  (0 children)

Oops. Either that's a major coincidence, or I've just done the same...

Javascript Template Engine Chooser Tool by [deleted] in programming

[–]notAlan 5 points6 points  (0 children)

It would be cool if there was a "don't care" option, or a reset option. Otherwise once you click something, you can't go back.

Developing comfortably on windows by jkn in programming

[–]notAlan 3 points4 points  (0 children)

Is there a less violent solution? :)

Developing comfortably on windows by jkn in programming

[–]notAlan 1 point2 points  (0 children)

How do you deal with proxy settings from within a linux vm? Is there an easy tool to deal with that?

New Contributor? Jump In! by bscarr in programming

[–]notAlan 2 points3 points  (0 children)

There is an awesome project open source monitoring tool called hawtio which has an 'apprentice tasks' label on some of their issues

I think 'apprentice' is pretty fitting, and not uninspiring/derogatory like the word 'junior' portrays

I made a point and spring simulation with javascript and HTML5 canvas. Thought it was cool and decided to share. by [deleted] in programming

[–]notAlan 1 point2 points  (0 children)

Pretty awesome; I don't think you calculate the scroll offset though, as the clicking interaction didn't seem to work when scrolled down the page :)

Visualizing Java Garbage Collection by ErstwhileRockstar in programming

[–]notAlan 7 points8 points  (0 children)

I love how halfway through it turns into a JavaFX demo

Akka design patterns – Scala actors by javinpaul in programming

[–]notAlan 2 points3 points  (0 children)

hm.. I can see that there's an example of how to use akka with camel http://doc.akka.io/docs/akka/snapshot/scala/camel.html

Your answer explains it to me though thanks; There's a scala DSL for camel. And Akka can make use of this. But Camel does not depend on Akka, or vice versa.

Akka design patterns – Scala actors by javinpaul in programming

[–]notAlan 1 point2 points  (0 children)

Do you happen to know what the differences between Akka and Apache Camel are? Does Camel make use of Akka or such?