plotting – ListLinePlot trace looks fuzzy with too many data points

I’m plotting a list of data (v) where some of the points are very close together. No problem if AbsoluteThickness(x) is set to x=0.5, but the trace begins to look fuzzy if x>2.5. This is mainly an issue at the beginning of each stair step, where there are a ton of data points. Is there anything I can do to fix this?

Voltage(x_) :=
 ListLinePlot(
  v,
  PlotStyle -> {Red, AbsoluteThickness(x)},
  PlotRange -> Automatic,
  ImageSize -> 600,
  LabelStyle -> {FontSize -> 20, FontFamily -> "Helvetica", Black, 
    Bold},
  Frame -> {True, True, False, False},
  FrameLabel -> {{"Potential (V)", ""}, {"Time (h)", "" }}
  )

Voltage(0.5)
Voltage(2.5)
Voltage(5)

enter image description here

And no, I cannot weed out data points so my graph looks better.

Thanks for taking the time to read this.

is there photo management software that includes tagging and fuzzy dates?

I’ve been scanning family photographs and am looking for a way to organize them. I’d like to set them up in photo organization software where i can set tags and add dates.

Preferably, I’d like the tags to be customizable and grouped. For example:

  • Person > Fred Jones
  • Holidays > Christmas
  • Places > Disney World

For dates, many photos have notes written on the back that have non specific dates like “1985”, “Summer 1986”, “December 1987” etc. I’d like to save these “fuzzy” dates and be able to sort and filter by them.

I would also like a program that does not automatically rename or move the original files.

Does anyone know of software that can accomplish this?

Fuzzy Finding in Haskell – Code Review Stack Exchange

In learning haskell, I’m writing a fuzzy menu. At the moment, my executable reads in a ‘dictionary’ from stdin, and ranks each word according to how well it fuzzily matches a search pattern given in the first CLI arg. The idea of the fuzzy matching algorithm is to split a pattern by its delimiters, and then match each character with a prefix of a token, accumulating a score to represent the quality of the match.

My main module looks like this:

module Main where

import           Data.List
import           Fuzzy
import           System.Environment

main :: IO ()
main = do
  contents <- getContents
  let dict = lines contents

  args <- getArgs
  let pattern = splitWord (head args)

  let scored  = map (x -> (score (x, pattern), x)) dict
  print (sort scored)

I’m not sure whether or not I’m misusing the do block and/or some I/O primitives here: overall, I think it could be better but I don’t know how to change it.

The Util module looks like this:

module Util
  ( splitWord
  , boolToFloat
  , nextChar
  ) where

splitWord :: String -> (String)
splitWord (l : '_' : r ) = splitWord ((l, '-') ++ r)
splitWord (l : '.' : r ) = splitWord ((l, '-') ++ r)
splitWord (l : ':' : r ) = splitWord ((l, '-') ++ r)
splitWord (l : '-' : r ) = ((l)) ++ splitWord r

splitWord (c       : ()) = ((c))
splitWord ()             = ()

splitWord s              = do
  let rest  = splitWord (tail s)
  let first = (head s) : (head rest)
  return first ++ tail rest

boolToFloat :: Bool -> Float
boolToFloat True  = 1.0
boolToFloat False = 0.0

nextChar :: (String) -> (String)
nextChar s = case tail (head s) of
  () -> tail s
  n  -> (n) ++ tail s

Especially in splitWord, I think the code here is somewhat repetitive, and again I don’t really know how to make it simpler.

And finally, the Fuzzy module is as follows:

module Fuzzy
  ( score
  ) where

import           Util

score :: (String, (String)) -> Float
score ((), _ ) = 0
score (_ , ()) = 0

score (s , t ) = boolToFloat (head s == head (head t))
  + max (score (tail s, t) * 0.8) (score (tail s, nextChar t))

This module (and function) is the one I have the least concerns about – most of the problems in my code (as I perceive them) are about IO and redundancy in splitWord’s pattern matching. Thanks for any advice!

php – Is there a canonical definition of SPA – or is SPA a broadly agreed-on architecture with fuzzy edges?

Question:

Is there a canonical definition of SPA which would exclude the software architecture model described below?


I’m working on an app with a new web-architecture model (new to me, at any rate) which has features which differentiate it from a Single Page Application (SPA) as the term is conventionally understood.

Since the model uses server-side and client-side variables which always automatically mirror each other, I would like, at least provisionally, to give the model a label something like Reflective SPA (or veSPA for short) but I’m concerned that due to its reliance on server-side processes, it may not qualify as an SPA at all and, as such, this name would be misleading and / or nonsensical.

Towards the end of the Wikipedia entry on Single Page Applications there is a statement:

A SPA is fully loaded in the initial page load and then page regions
are replaced or updated with new page fragments loaded from the server
on demand. To avoid excessive downloading of unused features, a SPA
will often progressively download more features as they become
required, either small fragments of the page, or complete screen
modules.

I’d strongly subscribe to this as a conventional definition of an SPA. This is absolutely what I think of when I read the acronym SPA.


What differentiates veSPA is that instead of:

page regions are replaced or updated with new page fragments loaded from the server on demand

veSPA repeatedly responds to user interactions by updating the queryString, either via:

1. Updating the URL (including the queryString), using:

  • window.history.pushState({}, document.title, 'https://example.com/' + queryString); (Javascript)

2. Reloading the URL (using a new queryString), using:

  • window.location.href = 'https://example.com/?' + queryString; (Javascript)

3. Redirecting the URL Request (using a new queryString) at server level, using:

  • header('Location: https://example.com/'.$Query_String); (PHP)

When the page is actually reloaded, various custom-data attributes in the root HTML element are populated from the queryString, using the super global variable $_GET in PHP.

When the URL queryString is updated, the same custom-data attributes in the root HTML element are populated from the queryString, using new URLSearchParams(window.location.search) in Javascript.

Either way – and this is the most important culmination of everything described above – the app-view is then rendered via CSS from the values in the custom-data attributes in the root HTML element.


Question:

Does this use of page-reloads and PHP (described above) mean this model is too differentiated from SPA (as conventionally understood) to have the term SPA meaningfully applied to it (or to use SPA in its name)?

Is there a canonical definition of SPA which would exclude the model described above?

php – Is there a canonical definition of SPA – or is SPA a broadly understood concept with fuzzy edges?

I’m working on a new web-architecture model (new to me, at any rate) which has features which differentiate it from a Single Page Application (SPA) as the term is conventionally understood.

Since the model includes both server-side processes and client-side processes, I would like to provisionally call it an Interweave SPA (or veSPA for short) but I’m concerned that due to its reliance on server-side processes, it may not qualify as an SPA at all and, as such, this name would be misleading and / or nonsensical.

Towards the end of the Wikipedia entry on Single Page Applications there is a statement:

A SPA is fully loaded in the initial page load and then page regions
are replaced or updated with new page fragments loaded from the server
on demand. To avoid excessive downloading of unused features, a SPA
will often progressively download more features as they become
required, either small fragments of the page, or complete screen
modules.

I’d strongly subscribe to this as a conventional definition of an SPA. This is absolutely what I think of when I read the acronym SPA.


What a differentiates a veSPA is that instead of:

page regions are replaced or updated with new page fragments loaded from the server on demand

The veSPA repeatedly responds to user interactions by updating the URL, using:

  • window.history.pushState({}, document.title, 'https://example.com/' + queryString); (Javascript)

or reloading the URL, using:

  • window.location.href = 'https://example.com/?' + queryString; (Javascript)

or redirecting the URL request at server level, using:

  • header('Location: https://example.com/'.$Query_String); (PHP)

On Page Reload:

When the page is actually reloaded, various custom-data attributes in the root HTML element are populated from the super global variable $_GET in PHP.

On URL Update:

When the URL queryString is updated, the same custom-data attributes in the root HTML element are populated from new URLSearchParams(window.location.search) in Javascript.

Either way, the app-view is then rendered via CSS from the values in the custom-data attributes in the root HTML element.


Question:

Does this use of page-reloads and PHP (described above) mean this model is too differentiated from SPA (as conventionally understood) to have the term SPA meaningfully applied to it (or to use SPA in its name)?

Is there a canonical definition of SPA which would exclude the model described above?

machine learning – Combining decision tree and fuzzy logic

I’m new to ML so need a general advice about how to combine what I think will do the job for me – decision tree and fuzzy logic.

The idea is to use DT to interpret known sport rules, but then use fuzzy logic to generate a decision when there is insufficient info to make a decision.

I’m new to ML so maybe I’m using the wrong approach? Part of the problem is you don’t know what you don’t know.

If I’m on the wrong forum, any suggestions to go to a better forum would be welcome. Thanks.

High Frequency Polling And Handling Fuzzy Inputs

I’m developing a FPS game and I’m considering polling at a high frequency on a separate thread. This decouples the game loop and reading input. I get sub-frame samples and can process those samples from a queue. My question is about determinism. I want to drive input handling with a variation of a state machine or DPDA. These things are not known for "fuzzy-friendliness" so I need to filter dequeued inputs (in the signal processing sense). How do real games implement high frequency input handling?

worksheet function – Memory Exception on Excel Fuzzy Lookup Add In

I have two tables of data with 5 columns – Name, Phone Number, Email Address, Post Code and Order Time. Both tables have around 10,000 rows. I need there to be an exact match on Name, Phone Number, Email Address and Post Code and a fuzzy match on order time – as the order times can be off from a few seconds to a few minutes in both sets of data. I want to be able to reconcile orders on both sets of data allowing for a time window.

I have created two sets of tables for both datasets and ran the fuzzy lookup with 5 separate matching columns – 4 of them exact matches on Name, Phone Number, Email Address and Post Code and a default fuzzy match on the Order Time. However when I run the fuzzy lookup I get a memory timeout error at about 300 rows. Does anyone know how I could resolve this? I have a 8gb memory machine but I’m not sure if increasing the memory will fix this.

Thanks