function construction – How to use each replacement only once in a list of replacements

I have a list of replacements and some list they are acting on. However, some RHS of the replacements rules are identical (the LHS is not). I want to use those rules one after another (perhaps cycling after they run out but the amount of replacements and occurrences match in the application I am looking at now).

So for example

replaceOnceOnly({a, b, a}, {a -> 1, a -> 2, b -> 3})

would output {1,3,2}. Is there a simple way to achieve this?

2016 – Search result does not reflect file replacements

In SP 2016, I loaded a new version of a PDF two months ago, but the search results for that file still show the previous Last Modified date, and the text sample displayed with the result still reflects the previous file. In Central Administration, tracing seems to work correctly, with daily incremental traces and full weekly traces.

Function definitions do not apply when using replacements or lists with fractional steps

I'm trying to use Table evaluate a function to specific values. The function is defined for the first time.

f[x_, y_] := ArcTan[x/y];

Known definitions apply.

f[x_, 0] = 1;



And the function is tested

f[x, 0]


Using replacement

f[x, y] /. y -> 0

Power::infy: Infinite expression 1/0 encountered.


Using lists

Table[f[x, y], {y, -1, 1, 0.5}]

Power::infy: Infinite expression 1/0. encountered.

{-ArcTan[1. x], -ArcTan[2. x], Indeterminate, ArcTan[2. x], 
 ArcTan[1. x]}

Oddly, this seems to fail only when the steps in the list are fractional

Table[f[x, y], {y, -1, 1, 1}]

{-ArcTan[x], 1, ArcTan[x]}

Why are the known value of the function that is not used to provide a solution these specific instances?

Note that whether or not the definition is delayed has no effect on this behavior.

json – Javax validation with JsonProperty replacements

Sorry if this belongs to the software design stack or something similar called:
Given a typical bean with nested beans and no loops, it is interspersed with JsonProperty uses. Obviously javax doesn't care about these, so when generating the & # 39; propertyPath & # 39; field names appear and not JsonProperty values.

A particular problem is my use of the Jackson subtypes. This set of interfaces (yes, set) matches the existing field to determine the specific implementation.

Current ideas: (all using Path.iterator ())

  • Cache the output of all code field paths that contain a JsonProperty annotation in a tree and apply overrides until there are no more child elements, with the rest (if any) added to the end.
  • Manually interpret the JsonSubtypes and filter the instance into collections.
  • Just don't use Set and only List when working with JSON inputs.

    I'm looking for other opinions, as I can't be the only one who ran into this problem. I am leaning towards the latter despite the work involved to do so. (currently only liability issues). I was hoping there would be a better way to access the actual bean references, but I was only given the validated root object and the leaf bean where the violation occurs, nothing in between.

    Relevant API:

  • Path
  • Path.Node

How to delete keyboard text replacements in macOS 10.15 that will not remain deleted

I have multiple text replacements in the System Preferences -> Keyboard -> Text Tab that will not be eliminated. I can remove them and they reappear in 3 seconds. They also cannot be renamed successfully as any attempt to rename them causes their name to change again.

I've tried removing all text replacements from all devices, it doesn't work.

When I turn off Internet access and delete text replacements, they remain deleted until my Mac has Internet access again. If I disable the primary iCloud account, the text replacements will remain removed until I re-enable the iCloud account.

This causes text replacements to not work frequently and to not sync frequently between my devices.

mojave – How to find replacements for Dashboard widgets in MacOS Notficiation Center

I have been hesitating to "upgrade" to MacOS Catalina from Mojave due to her loss of the Dashboard. I know that the "Today" view of the Notification Center is supposed to replace the functionality of the Dashboard, and I am willing to adapt to a new workflow if it is possible to recreate it in the most recent version of the OS, but so far I have not done so . I found the same set of widgets that I use on the Dashboard. The Notification Center seems to have a different set of working assumptions than Dashboard. That is, instead of installing widgets, you must install an application that supports a notification center extension. Applications produced these days try to capture your attention (therefore, the "Notification Center") instead of providing useful features.

Specifically, there are a couple of dictionaries, including the built-in dictionary application and a third-party foreign language dictionary, which I frequently use in the Dashboard. There is also a commonly used web clipping tool that you can use to create a new widget outside a website.

Are there (1) any rich and secret repository of notification center widgets that I don't know where I could find a replacement for the dictionaries I use, (2) a way to search the Apple App Store for applications that offer widgets, or ( 3) Can I do some magic with Script Editor to expose a widget of a current application like the MacOS Dictionary?

seo: months after implementing JS redirects, hash bang URLs are still indexed in Google along with their replacements

We replaced our previous site with a WordPress site about 6 months ago. Our old store addon used links with AJAX fragments that were indexed in Google, like this:!/item/info/etc

The fragments are not exposed to the server, so, as I understand it, our only option to redirect was to do a JS-based redirection that I implemented many months ago. According to my research (for example,, I thought this would mean that Google would update its indexes, however, old and new results are displayed on Google side by side.

Is there any way to rush it? I have confirmed that the new page you redirect is identified as the canonical page.

How can I disable replacements for [Rule], [GreaterEqual], [LessEqual], etc. in the front part?

When you write -> at the front end, it is automatically replaced with the [Rule] character. Similarly, when you write <=, is automatically replaced with [LessEqual]Y >= it is replaced with [GreaterEqual].

Is it possible to disable these replacements? Occasionally I run a tutorial for students who are completely new to Mathematica, where I show sample code on a screen and have to write it on their own machines and then modify it to do certain things. Occasionally, students will be confused when they see special characters such as [Rule] on my screen, and I don't know what they should write -> instead. It would be useful if I could disable this automatic replacement on my screen to avoid such confusion.

Visual cues – Highlighting text replacements

I am creating an application in which the user can make multiple replacements with each other (for example, replace all "is" with "was", all "will" to "would").

The problem that I face with respect to the UX is how to indicate the changes that will occur in the original text. I was thinking of highlighting the pending changes in the original text, as if I were highlighting the text. Each replacement would have its own color.

What worries me is that the user could replace all "a" with "an" and then "anmato" with "pineapple", then "tomato" would become first "anmato" and then "pineapple" (bad example, he).

Changes could overlap and, therefore, highlighting would become problematic. I am able to discover an algorithm that highlights them with the color of the first replacement and the color of the second replacement, mixing the colors where they overlap.

I'm not sure if this is the best way to implement this, so I thought about asking them if they know in a better way.

Dotes – Taking out leveling and classes – Replacements

So, my RPG is not going to use levels or classes to determine the progress. I'm trying to keep it as open as possible, and I also realize that if a character goes up and then fights a little harder monsters, it's the same level of difficulty and they may not level up.
Instead, I'm testing a dowry / skill type system (like in Savage Worlds) where the characters acquire Skills by spending Skill Points (which they get by doing important things, I'm also trying to eliminate grinding). These skills will not increase their primary stats, but give them things to do in the tactics department and complete the character's portfolio. There are certain areas of expertise, but it does not retain many characters.
Due to the leveling function, most characters will have about 10 life points, so I have reduced the damage rolls from d1 (only 1) to d6, instead of d4-d12 as in most systems . The characters will not have a barrel of hit points for the monsters to stab.
Thoughts? Ideas? Problems?