## sumsets – Trying to produce equation for this function

This function produce N number of items (np) hat increase as number of its loop increase (T).
Can we get an equation that return number of (np) based on number of (T)?
Also, (s) decrease at differnt rate.But that is another equation.
_———————-+/

c =0 T = 10 np=1 s=88 r=1

While (c <T):

``````     Print ("  " *  s  + '*' * np)

c= c+1

np = np * 2  +1

s = s - r

r= r * 2
``````

————-++++++++++++++++

## Strange characters using the excerpt function and hellip

I’m using this function on single php

``````<?php echo substr(get_the_excerpt(), 0,110); ?><?php _e('&hellip;', 'movies'); ?>
``````

but somethimes i see special carachters at the end of the excerpt. Plese help me!

proof:  ## Probability Function for Transistors – Mathematics Stack Exchange

A box of 5 transistors is known to contain 3 that are defective. The transistors
are to be tested, one at a time, until the defective ones are identified. Denote by N1 the
number of tests made until the first defective is spotted and by N2 the number of additional
tests until the second defective is spotted. Specify the values N1 and N2 can take. Find the
joint probability mass function of N1 and N2.

## Extracting city names in the text form from the function CountryData

I was planning to create an array with all capital cities in Europe using the following command:

`CountryData["Europe", "CapitalCity"]`

But unfortunately, it returns all results in rectangular frames. How can I get rid of them and get a simple text?

## worksheet function – Need to fill large data field

I have downloaded some data that need sorting individually into date order, however the date only appears on a single title line per category, and is in text form. The only way I can see of doing it is to add the date to each line, I know I can copy and paste but there is about 4k lines so am looking for something that might speed the process up a bit.
I am fine with changing the text to a date, and deleting what currently occupies the field separately if required.
Have attached an example, any help would be appreciated
example

## combinatorics – Generating Function for (2nCn)

Using this relation $$frac{1}{1-y-x y}=sum_{n geq 0} sum_{m geq 0}left(begin{array}{c}n \ mend{array}right) x^{m} y^{n}$$ ,
We need to form the generating function for $$left(begin{array}{c}2 n \ nend{array}right)$$.

I am not able to prove the first relation but can’t form the generating function.

## ¿Cómo ejecutar function de javascript dentro de react?

Es traer una función de la api de dropbox por medio de un script y ejecutar desde react:

``````<script type="text/javascript" src="https://www.dropbox.com/static/api/2/dropins.js" id="dropboxjs" data-app-key="-----------------------">
</script>
``````

## javascript – Is it an antipattern to pass an object that stores the application state from one function to another?

The program is written in JavaScript. To give you a rough idea what I am thinking of:

``````function State() {
return {
color: 'green',
size: 100,

// ... there are other properties here
}
}

function init() {
const state = State()
const otherObj = OtherObj()

// ...something like an event fires `foo`
foo(state, otherObj)
}

function foo(state, otherObj) {
state.size = calcNewSize(state) // state changes
state.color = pickNewColor(state, otherObj) // state changes
// ...
}

function pickNewColor(state, otherObj) {
const someInformation = getSomeInformation(state)

// ... do other stuff

return newColor
}

const a1 = init()
const a2 = init()
const a3 = init()

``````

Right now, I have 3 objects that I should pass from function to function, but I am wondering, if this would scale well.

I am also wondering, if is better to pass the entire object, instead of only the properties that are needed by these functions. Maybe it would be a good idea, to draw a line at 2-3 arguments, and if more is necessary, then pass the entire object.

Also, this could possibly be refactored into a single `class`, with methods (like pickNewColor, getSomeInformation) having access to the properties (like size, color), in which case there wouldn’t be any need to pass around objects. However, I was wondering, if the above approach of passing around objects could work well.

## differential equations – What is the syntax for using Reap and Sow and WhenEvent with derivative = 0 with interpolating function?

I have a system of three ODEs. This system oscillates. I need to determine the frequency of each of the three solutions.

I’m new to Mathematica and I know this question has been asked multiple times, but I can’t get it working.

``````{xSol, ySol, zSol} = NDSolveValue({ode1, ode2, ode3, ic2}, {x, y, z}, {t, 0, 200})
``````

Plotting `xSol`, `ySol` and `zSol` (three interpolating functions) gives: Can anyone show me how to determine the frequency of this thing using `Reap` and `Sow` or FFT. I’ve been instructed already how to do this using EcoEvo package, but I’m also wondering how to do it without such a package.

Both the Reap/Sow solution and the FFT come pretty close to what I have and need. But I fail in modifying the mentioned solutions so that it works with my code.

How do I individually determine the frequency of `xSol`, `ySol` and `zSol`?

All suggestions and solutions are highly appreciated! Many thanks😊