How you can show a certain number of products for guests in Magento?

# Tag: certain

## Why do game engines define the a certain way to do things and not allow a lot of flexibility?

I understand that game engines have their own level design methods and different implementations of levels but why don’t they allow full control of the level design to the game developer? Without actually stating that, "The game developer should do/ use this to get this." rather than "Use these tools to get this done. Have full control over your product." ideology?

I guess its because not all game developers are interested in dealing with low level aspects of the game development phase but wouldn’t it be more efficient if the user can optimize certain aspects of the game to better suit for their product? For example, a mesh object, resource submissions, or other areas which game engines define a certain method?

## How do I calculate a line segment that is a certain number of degrees from another line segment?

I have a line segment that is at an arbitrary angle in 3D space. I want to (in code) draw another line that shares an end point with the first line and has an angle of X degrees between them. The second line will partially overlap the first in the XZ plane.

## Finding which value I will be on after a certain number of steps

I have a fixed array: `[a,b,c]`

, I wanna loop through this 3-items-sized array for 7 times in order to find what I would get at that exact step.

The "value stack" for `7`

would look like `a b c a b c a`

.

Question is, how can I find what value would be at step `10`

, for example?

Input: `getValueForStep( [a,b,c], 7 )`

Output: `a`

## i want to count the number of occurrences of certain values of my TagName column

i want to count the number of occurrences of different sensor rows in SQL, but i seem to be doing it wrong and seemingly i am not visualizing it correctly.

if i was doing this in pseudocode in a c style language i would do it like this:

`FOR i in range(taglist[i]): print(taglist[i], count(taglist[i]) ) `

i have been trying this:

`Select Count(a) FROM ( SELECT Distinct [TagName] FROM [A2ALMDB].[dbo].[AlarmMaster] where (TagName like '%Sensor%' or GroupName like'%Sensors%') ) a `

it returns ’66’, but i want it to return the count of each of the distinct tagnames that are returned in Select A.

Can anyone help me with how i should be trying to get all the counts of my different sensor occurrences to total instead of a count of all the distinct tagnames?

thanks for the help!

## Why does Mathematica crash at a certain recursion depth?

If I enter

`Block[{$ RecursionLimit = 70000}, x = x + 1] `

I get

`$ RecursionLimit: Recursion depth of 70000 exceeded during evaluation of 1+x. `

But at `$ RecursionLimit = 80000`

, Mathematica crashes (i.e. goes unresponsive for a little while and then clears all variables). Why is this? Is there some limiting factor that I can increase to go even further?

## NMinimize: How to avoid solutions that do not satisfy constraints within a certain tolerance?

I just started to use Mathematica a few weeks ago. Using NMinimze, I would like to avoid solutions that do not satisfy certain constraints (although they "almost" satisfy them). Do you know how to change the following command to find a solution satisfying "completely" all the constraints, solving the same minimization problem?

`NMinimize[{((e*(1 - Sqrt[(g - e)^2 + (f - h)^2]) + (g - e)*(1 - Sqrt[f^2 + e^2])) + (h*(1 - Sqrt[(g - e)^2 + (f - h)^2]) + (f - h)*(1 - Sqrt[g^2 + h^2])))/((g + f)* Max[1 - Sqrt[(g - e)^2 + (f - h)^2], 1 - Sqrt[g^2 + h^2]]), 0 <= e <= 1, 0 <= f <= 1, e^2 + f^2 == 1, e <= g <= 1, 0 <= h <= f, Sqrt[(g - e)^2 + (f - h)^2] <= 1, g^2 + h^2 <= 1}, {e, f, g, h}] `

## What target numbers would be a certain level of difficulty under this system?

I’m writing a homebrew game system, and I found that I have an action resolution mechanic but not a good system for target numbers (I call them Success Thresholds, or STs, in this game, and from now on I’ll use that term to refer to *the minimum number a player gets that can succeed*).

To resolve an action, most of the time players roll 2d6 and add a modifier ranging from +0 to +3, depending on the stat. With Advantage, it is (3d6 drop lowest)+mod, and Disadvantage is (3d6 drop highest)+mod.

There are also 4 (well, 5, but one auto succeeds) levels of difficulty. The Trivial tasks are automatically successful. Easy tasks should succeed about 75-80 percent of the time, Moderate tasks should be successful 50-60% of the time, Hard tasks should be successful between 25 and 40 percent of the time, and impossible tasks shouldn’t succeed more than 25% and often more like succeeding below 10-15% or the time even with Advantage and a +3 mod.

This is an anydice program with the base probabilities for a +0 mod. I want to know **what number should the ST be for each level of difficulty?** I had initially considered 7 as a base difficulty for Moderate tasks, before I added modifiers to rolls.

## How do hackers search for vulnerabilities on certain ports?

Hackers usually attack open ports and services, but I want to know how they find security holes in specific ports or services.