Help with malicious JavaScript datasets


Help with malicious JavaScript datasets

Hey y'all, I tried asking in a machine learning sub, and never got a single response, I was hoping I could get some help from y'all here. I'm doing a project for my machine learning course where I'm trying to train an algorithm to detect malicious JavaScript. I need a dataset (more is better) of samples of malicious JavaScript. Would anyone happen to know of any public sets? I'd also be happy to sign an NDA f anyone would like to release samples under privacy.

Sorry if this is the wrong sub to ask in, thanks y'all.

Submitted March 31, 2016 at 11:23PM by subsage
via reddit http://ift.tt/1UFhyzQ

Suppressing warnings in interfacer


Suppressing warnings in interfacer

A while ago I posted a linter I wrote to suggest interface types: http://ift.tt/1TlfrzE

A bunch of bugs and false positives have been fixed since then. I'm now trying to tackle warning suppression, and feedback would be really welcome.

The idea is that some warnings might be correct but not make much sense to a human. Perhaps your function takes an *os.File and treates it as an io.Reader, but in reality it doesn't make sense for the parameter to be anything other than a file.

So I came up with the idea to discard parameters whose types are mentioned in the function name. For example:

// produces a warning - f could be io.Reader func ProcessInput(f *os.File) error { // use as an io.Reader } // does not produce a warning func ProcessInputFile(f *os.File) error { // use as an io.Reader } 

What do you think? I'm looking for simple solutions that align with how people already write their Go code. I'd rather not introduce ugly tags/comments specific to this linter.

If you have ideas for new ways to suppress these warnings, let me know!

More information on GitHub and on the README: http://ift.tt/1Jri8HC

Submitted March 31, 2016 at 11:08PM by mvdan
via reddit http://ift.tt/1SpkVo9

AngularJS ui-mask for currency, max and min [help]


AngularJS ui-mask for currency, max and min [help]

I am using the official AngularJS UI-Mask http://ift.tt/1SlK9ax and trying to figure out how I can create a mask for currency USD.

So I can have the user type in $.. However, sometimes the input will exceed more than $99 dollars but the way I currently have it set it that it only goes to a set limit of how ever many I have set on the input.

How do I make it so I can make the mask work with larger whole numbers instead of the max being 99? I want the user to be able to put $00.01 to like $9,000,000.00 or whatever the desired max is.

Here is what I currently have: <input type="text" ng-model="greeting" ui-mask="$99.99" class="form-control input-lg" style="width:50%" />

Here is a live demo: http://ift.tt/1MWhPX5

Submitted March 31, 2016 at 11:02PM by brimhaven
via reddit http://ift.tt/1Tlfz20