Part specification is longer then depth of objekt

I want to solve the Funkton lns50 all the Values are Part 1 of an List

ri = ri[[1]] rj = rj[[1]] kij = kij[[1]] yi = yi[[1]] phm = phm[[1]] ylm = ylm[[1]] plm = plm[[1]] yhm = yhm[[1]] si = si[[1]] ss = ss[[1]] sf = sf[[1]] mi = mi[[1]] tsi = tsi[[1]] \[Delta]i = \[Delta]i[[1]] dri = dri[[1]] drj = drj[[1]] lij = lij[[1]]\[CapitalDelta] lns50 = Sqrt[(    (Out[12] \[CapitalDelta]ri[[1]])^2 + (Out[13] \[CapitalDelta]rj[[         1]])^2     + (Out[14] \[CapitalDelta]kij[[1]])^2 + (Out[         15] \[CapitalDelta]yi[[1]])^2     + (Out[16] \[CapitalDelta]phm[[1]])^2 + (Out[         17] \[CapitalDelta]ylm[[1]])^2     + (Out[18] \[CapitalDelta]plm[[1]])^2 + (Out[         19] \[CapitalDelta]yhm[[1]])^2     + (Out[20] \[CapitalDelta]si[[1]])^2 + (Out[         21] \[CapitalDelta]mi[[1]])^2     + (Out[22] \[CapitalDelta]tsi[[1]])^2 + (Out[         23] \[CapitalDelta]\[Delta]i[[1]])^2     + (Out[24] \[CapitalDelta]lij[[1]])^2)] 

So i only need to change the "Position" of List by changing [[1]] to [[2]]

ri = ri[[2]] rj = rj[[2]] kij = kij[[2]] yi = yi[[2]] phm = phm[[2]] ylm = ylm[[2]] plm = plm[[2]] yhm = yhm[[2]] si = si[[1]] ss = ss[[1]] sf = sf[[1]] mi = mi[[1]] tsi = tsi[[2]] \[Delta]i = \[Delta]i[[1]] dri = dri[[1]] drj = drj[[1]] lij = lij[[1]] \[CapitalDelta] lns50 = Sqrt[(    (Out[12] \[CapitalDelta]ri[[1]])^2 + (Out[13] \[CapitalDelta]rj[[         1]])^2     + (Out[14] \[CapitalDelta]kij[[1]])^2 + (Out[         15] \[CapitalDelta]yi[[1]])^2     + (Out[16] \[CapitalDelta]phm[[1]])^2 + (Out[         17] \[CapitalDelta]ylm[[1]])^2     + (Out[18] \[CapitalDelta]plm[[1]])^2 + (Out[         19] \[CapitalDelta]yhm[[1]])^2     + (Out[20] \[CapitalDelta]si[[1]])^2 + (Out[         21] \[CapitalDelta]mi[[1]])^2     + (Out[22] \[CapitalDelta]tsi[[1]])^2 + (Out[         23] \[CapitalDelta]\[Delta]i[[1]])^2     + (Out[24] \[CapitalDelta]lij[[1]])^2)] 

my Problem is, that Mathematica gives the Errormessage `Part specification is longer then depth of objekt┬┤

Please tell me if you got any clue what I need to tell Mathematica instead.

I tried ClearAll but it doesnt worked

FunctionCompile returns Part::partd: Part specification 151345[[1]] is longer than depth of object

Today, I install mathematica 12.3 on my computer(windows), then I run the FunctionCompile code

cf = FunctionCompile[Function[Typed[arg, "MachineInteger"], arg + 1]] 

but it goes wrong, and return the information

Part::partd: Part specification 151345[[1]] is longer than depth of object 

I test on my another computer, FunctionCompile works well, so what’s happening here?

What does this semantic specification do about shuffling a single card of a Deck?

I have 2 constructor functions and 2 additional function:

declare: d,d' = deck; c, c' = card

Constructor 1)


Constructor 2)


additional 1)

addCardRandomly(d', c');

additional 2)

CardsInTheDeck(d');  (it returns "CardsInTheDeck(d)+1" when called with addCard(d,c) constructor obviously) 

now, what happens when the function addCardRandomly(d',c') is called with the addCard(d,c) constructor? This is the semantic specification given by the book:

if    random(CardsInTheDeck(d') = CardsInTheDeck(d')+1): then  addCard(d',c');  else addCard(addCardRandomly(d, c'), c); 

What I think it does is: Given that a deck of card can be treated as a queue, we can take the card c that our constructor has to insert inside the deck and: if the random gives back the first position of the queue then simply put the card on that position;

else swap that card with the card we just randomized and insert the cards over the card in that position once at time over the card we randomized itself. Eg:

Cards are 1 2 3 4 5 6 7 8

We have to insert 9

if random = 5

it becomes 1 2 3 4 9 5 6 7 8

(case where random = 9 omitted because trivial)

Is it correct? What makes this recursive specification so complex? How can i visualize and understand this kind of ideas generally? How can I explain this concept once the final solution is met? This looks so complex to me. Thanks!

Deriving recursive definition from function specification

Given this function specification, where name xs is bound to a list, # denotes its cardinality and . is the list index operator…

$ $ \left( \sum i: 0 \leq i < \#xs: xs.i * (i + 1) \right)$ $

I need to derive a recursive function using induction.

Base case: []

\begin{align} \left( \sum i: 0 \leq i < \#[]: xs.i * (i + 1) \right) && \text{(Textual substitution – xs is free)} \ \left( \sum i: 0 \leq i < 0: xs.i * (i + 1) \right) && \text{(Def. of #)} \ \left( \sum i: False: xs.i * (i + 1) \right) && \text{(Algebra)} \ \left( \sum i: 0 \leq i < \#xs: xs.i * (i + 1) \right) && \text{(Empty range)} \end{align}

Inductive case: (x:xs)

\begin{align} \left( \sum i: 0 \leq i < \#(x:xs): (x:xs).i * (i + 1) \right) && \text{(Textual substitution – xs is free)} \ \left( \sum i: 0 \leq i < 1 + \#xs: (x:xs).i * (i + 1) \right) && \text{(Def. of #)} \end{align}

How can I proceed from here ?

Difference between Field Specification and Field Domain?

I’m currently in the process of learning (Relational) Database Design based on two popular books, online tutorials and articles.

Some places, when they talk about attributes constraints, they call it an Attribute Domain. Some other places, when they talk about attributes specification, they call it an Attribute specification.

However, some other places, they say that they are both the same, but attribute domain seems to me to be part of the attribute specifications since by definition, attribute domain sounds like the Physical Element part of attribute specification:

Physical elements: Data type, Length, Decimal Places, Character support, input mask, display format

What is it now?

Where is the original literature for the specification of an Associative Array ADT?

I’m looking for the formal specification for the Abstract Data Type Algebra for the Associative Array, Associative List (AKA multimap), and other similar ADT to cite for use in a data specification similar to Binary JSON. The Wikipedia Associative Array entry uses non-standard math terminology and their sources are all secondary sources with no original sources. There is an algebra for the Dictionary and it starts with Let x be a set and it defines operations on that set. Who invented the dictionary and when? It should be pretty old, possible from the Journal of the Association of Computer Machinery or similar publication.

Why does the JSON specification disallow single quoted strings? [on hold]

I understand that only double quoted strings are allowed in JSON but why would this limitation be introduced from a software engineering perspective? In JavaScript you can use single quotes when defining object literals, so why would the writers of the JSON specification deviate from JavaScript language semantics in this way?

Could this have been done purely to make the specification simpler?

Could other issues related to performance or security have come into play when making the choice to allow only one type of quotes for string?

Also is there any background to why double quoted strings were only allowed even though single quotes also happen to be easier to type as they are accessible without having to use the shift modifier on a keyboard? For example, was this done because single quotes are more common in text strings (hence there would be more instances of having to escape single quotes if only single quotes were allowed for strings versus the opposite scenario)? Or was this done primarily due to the popularity of double quotes relative to single quotes as string delimiters.

Robots Exclusion Protocol Specification

3 articles regarding changes to the Robots Exclusion Protocol from Google:


For 25 years, the Robots Exclusion Protocol (REP) has been one of the most basic and critical components of the web. It allows website owners to exclude automated clients, for example web crawlers, from accessing their sites – either partially or completely….

…the REP was never turned into an official Internet standard, which means that developers have interpreted the protocol somewhat differently over the years. And since its inception, the REP hasn’t been updated to cover today’s corner cases….

…Together with the original author of the protocol, webmasters, and other search engines, we’ve documented how the REP is used on the modern web, and submitted it to the IETF…

Full article with specifics on the changes: Formalizing the Robots Exclusion Protocol Specification July 01, 2019


… we open sourced the C++ library that our production systems use for parsing and matching rules in robots.txt files. This library has been around for 20 years and it contains pieces of code that were written in the 90’s. Since then, the library evolved; we learned a lot about how webmasters write robots.txt files and corner cases that we had to cover for, and added what we learned over the years also to the internet draft when it made sense.
We also included a testing tool in the open source package to help you test a few rules….

Read more about Google’s robots.txt parser is now open source July 01, 2019


…In the interest of maintaining a healthy ecosystem and preparing for potential future open source releases, we’re retiring all code that handles unsupported and unpublished rules (such as noindex) on September 1, 2019. For those of you who relied on the noindex indexing directive in the robots.txt file, which controls crawling, there are a number of alternative options:

Read the full article related to unsupported rules in robots.txt July 02, 2019

Ensure model fits specification

I am trying to write a tiny FIX protocol implementation. The specification states several data types. Here is a screenshot of the int types:

enter image description here

Now I have created a type Length like this:

public class Length  {     [Range(1, int.MaxValue)]     public int Value { get; set; } } 

I would have have expected some kind of exception if a value gets assigned which is out of the defined range. This is not whats happening. I guess I have a wrong understanding of how ValidationAttributes work.

So the question is:

What would be the best way to ensure the property only holds data that fullfills the specification?

This are the solutions I can think of:

  • Using some kind of ‘Guard’ library
  • Add checks to the setter method
  • Run validation after object creation

As you already have realized I am not very firm on this topics. So please bare with me.

Does formal specification of UX needs special language apart from the general specification languages?

I am fan of Alloy and CASL specification languages and my question is – what is the common practice regarding the formal methods in UX? Does UX require distinct specification languages? Generally one can use any specification language to describe: 1) the graphical layout of the screen and available commands; 2) the content of the available commands. UX just gives additional constraints on the specification, some non-logical (outside, empirical) guidelines of the content on the specification. Or I am wrong and computer science community has special methods for modern graphical web/mobile/TV/device/wearable programming and for modern UX programming?