c – Find at what array half of the total sum is and show the value of the each array as it goes

So I have this program where I introduce the number of vehicles made in each month with the array and in the end I´m supposed to get the accumulated amount, the total production and at what month did the company achieve or surpassed half of the production. I will give you an example.

January 450 // February 300 // March 250 // April 300 // May 450 // June 300 // July 250 // August 300 // September 450 // October 300 // November 250 // December 300 //

The result has to show:

Accumulated Ammount:
January 450 // February 750 ( 450 + 300) // March 1000 ( 450 + 300 + 250) and so on.

Total: 3900

Month of half of the production (3900/2= 1950): printf “It was in the month of June”

    int months(12), n = 12, i;
    int sum = 0;

        for (i = 0; i < n; i++)
            printf("Final Production of %d: ", (i + 1));
            scanf("%d", &months(i));
            sum += months(i);

    printf("nTotal Production: %dnn", soma);
} ```

App doesn’t show on emulator playstore

  1. I’ve installed the SDK + emulator with both Android 11 and 8 images (separate AVDs).

The app that I’m interested in running isn’t showing in the playstore but it shows just fine on my physical phone:
bank app (shortened link by shortURL extension)

How is it possible for it not to show on emulator playstore?.

  1. I’ve downloaded the apk from apk-pure and sideloaded into the emulator. The app starts (flash screen) and then crashes. Any way to decipher why?.


Is there a way to add graphics to Show and keep the image “still”?

Let’s say I’m writing a PDF presentation such that on slide 1, I want to show a sphere, and on slide 2 I want to continue showing the same sphere plus a point. I could draw these in Mathematica using

sphere1 = Graphics3D[Sphere[{0, 0, 0}]];
point1 = Graphics3D[Point[{0, 0, 2}]];

and then generate two consecutive graphics, using

g1 = Show[sphere1]
g2 = Show[sphere1, point1]

My problem is that from g1 to g2, the point of view changes, so it looks like the presentation is “shaking” as you move from slide to slide.

Of course in this example, you need more room for the point because it is far from the sphere, so it makes sense.

But my question is this: if I know beforehand all the graphics that I want to include in my Show command, is there a way to keep the image still, i.e., so that the point of view is always the same as the graphics are added one by one?

I tried as a little “hack” to make some graphics transparent with Opacity[0], but then they make white shadows on the graphics below them, so they’re not really invisible.

linear algebra – Show the subspace of a set of vectors

If we consider the set $$alpha = {(1, 1, 0),(0, 0, 1),(-2,-2, 3)} {displaystyle subset } {R}^{3} $$ a) Find the subspace: $$ W = { u in {R}^{3} mid left langle {(1, 1, 0),(0, 0, 1),(-2,-2, 3)} right rangle }$$

I understand how to prove a subspace by definition and the “span method”, but I don’t understand how to use $ u $ here. I was thinking of using $a$, $b$ and $c$ with each vector trying to create a system but I have nothing to match these values to.

Maybe i’m confused. Any hints?

graphics – Can a LatticeData image show more than a unit cell?

I have an interactive code for showing the crystallographic in Mathematica.

LatticeData[ Which[Type == "FCC", "FaceCenteredCubic", Type == "BCC", "BodyCenteredCubic", Type == "SC", "SimpleCubic"], "Image"]

However this shows only one unit, which means the planes that don’t fit in the cell won’t be shown. Is there a easy way to show more than one unit cell in the LatticeData image?

Haskell: Implementing the data type LExpR as an instance of show

I am trying to implement the data type LExpr as an instance of show.

data LExpr = Var String        
                | App LExpr LExpr   
                | Lam String LExpr 

This is my code:

 instance Show LExpr where
      showsPrec d (Var str)   = showString' str
      showsPrec d (App e1 e2) = showParen (d>=6) $ showsPrec 6 e1  . showString " " . showsPrec 5  e2
      showsPrec d (Lam str e) = showParen (d>=5) $ showString ("\"++str++" -> ") . showsPrec 5 e

I am looking for some advice on how to further improve my code.

plotting – Is it possible to have two labels for an axis using Show function?

I use this code

P1 := RegionPlot[0 <= Cos[y x] <= 1/2, {y, 0, 3}, {x, 0, 5}, 
  PlotStyle -> LightBlue, 
  FrameLabel -> {{Style[Rotate["F", 270 Degree], 15], 
     None}, {Style["y", 15], None}}, BaseStyle -> 15]

P2 := RegionPlot[0 <= Cos[-y x] <= 1/2, {y, 0, 3}, {x, 0, -5}, 
  PlotStyle -> LightBlue, 
  FrameLabel -> {{Style[Rotate["G", 270 Degree], 15], 
     None}, {Style["y", 15], None}}, BaseStyle -> 15]

Show[{P1, P2}, PlotRange -> All]

and the result is

enter image description here

But here, it only shows one of the FrameLabel; Is it possible to ask Mathematica to give both labels using Show? We can do it by other commands, but this is not my original function, and I want to know is it possible to do it by using Show or not? like this

enter image description here

formulas – How to show blank cells instead of 0s in Google Sheets?

I have 4 empty cells, and a formula in 4 other cells that show data from those cells. The formulas look like this –

=IF(B5 > C5, B5, C5)
=IF(B5 > C5, C5, B5)

==IF(B7 > C7, B7, C7)
=IF(B7 > C7, C7, B7)

The original 4 cells are all blank, and the type is all set to automatic. But the ones in row 5 show as 0s, and the ones in row 7 show blank. I want them to be blank until I put values in the original cells.

How can I change it so the values in row 5 return blank instead of 0s?

How to filter my view of Groups to show results matching Term A or Term B

By default, all Filters get added to the same Filter Group (a filter group is just a group of filters that share a logical operator, e.g. AND or OR). The default behavior is to put all filters into the same group with the logical operator AND. This means that if you have Filter A, Filter B, and Filter C, the view will only produce results that have the value from each filter, Filter A, Filter B and Filter C.

You can review your filter operators and grouping by clicking the Dropdown Button for Filter Criteria and choosing the And/Or Rearrange option.

Views Filter Criteria And/Or Rearrange screen showing Filter A, Filter B, and Filter C in one filter group with logical operator AND

However, it sounds like you want Filter B and Filter C to use an OR Filter group, i.e. you want the view to show results where the content has the value from Filter B or has the value from Filter C.

To do this, you need to make sure that Filter B and Filter C are in their own Filter group and that group’s logical operator is set to OR. If you only have the two filters, you can use the original grouping, but change the operator. However, if you have other filters, e.g. my example with 3 filters, you’ll need to create a new group.

After you create a second filter group, you’ll see that you can control the operator for each filter group and you can also control the operator between the filter groups.

In an example with Filters A, B, and C, if I want to display all results where content has the value from Filter A AND the content has the value from Filter B OR Filter C, I would create two filter groups:

  1. Group 1: with only Filter A
  2. Group 2: with Filter B and Filter C

I would then set the logical operators:

  • Group 1’s logical operator would be set to AND (the default, there’s only one filter here so it shouldn’t matter).
  • Group 2’s logical operator would be set to OR (as we want to get results where the content matches either of the Filter B or Filter C, it does not need to match both).
  • The operator between Group 1 and Group 2 would be set to AND

Views Filter Criteria And/Or Rearrange screen showing Filter A in one Filter Group with logical operator AND, Filter B and Filter C in a second filter group with logical operator OR, with the AND operator between the two groups

magento2.4 – Show product attribute on product page magento 2.4

i need to show an attribute to product page under the name of the product. The attribute is text and the code is plustile

I try to load it to a shopbybrand extension that has a block in the wanted area with the code

// check attribute exists (Where 'dimension' is the attribute code for your attribute)
if ($attribute = $this->getProduct()->getResource()->getAttribute('flooring_width')): ?>
    // get label for the current store (in case you have multiple stores and languages)
    $_attribute_label = $attribute->getStoreLabel(Mage::app()->getStore()->getName());
    // get the attribute value (for other attributes change getDimension to getName where name is the name of your attribute );
    $_attribute_value = $this->getProduct()->getFlooringWidth();
    // check there is a value for the attribute
    if (isset($_attribute_value)): ?>
            <?php echo $_attribute_label . ': ' . $_attribute_value; ?>
    <?php endif; ?>
<?php endif; ?>

or something else like that i get
Error: Call to a member function getResource() on null in

i try to make an extension like

but with no success

Can you advise for the correct way to do it or
Do you know any extension to do this?

Thank you