Help for writing a mathematical function

Hello again,

I work on a tile game and need to understand an equation... I have a 12 x 11 grid... When I place a tile, I need to check for the existence of other tiles on the same row and column and sum their values...

I need to create an equation with the following variables: -.

Gets a number between 1 and 132: -.

divides or multiplies the number in all the possible divisions of 12 between 1 and 132

Adds or subtracts the correct amount of tiles that are either dependent on its position

(I stretched the grid and, for example, tile 66 has five tiles on each side, tile 121 a 11 to it is because it is in the lower left corner)

Hope this makes some sense to someone... I am now starting work on it, but any help would be appreciated!

Thank you

Martin

F1 will return a 2d array.  the first element of array contains all members of rank and 2nd of all the members of the column.

Function f1(n:int):Array {}
var m:int = n - 1;
var row:int = Math.floor (m/12);
var col: int = %(row*12) m;
var rowA:Array = [];
var colA: Array = [];
for (var i: int = 0; i<12; i+)="">
rowA.push (row * 12 + i + 1);
If (i<11)>
colA.push(col+i*12+1);
}
}
return [rowA, colA];
}

Tags: Adobe Animate

Similar Questions

  • Help for problems with the functionality of Capture from Adobe

    Hello

    I recently installed Adobe Capture on my Smartphone (Android device) and the app is very cool.  However, after a few weeks of use, the software stops working.  I uninstalled the software and reinstalled to see if that would help solve the problem.  Unfortunately, it has not solved the problem.  Adobe does not provide an over-the-phone technical support for this product, so I hope someone here can help.

    Recreation of question:

    When you start the application, there are four 4 functions:

    1. Colors
    2. Forms
    3. Brushes
    4. Looks like

    In the lower right corner of the screen, we see a sign '+', which, depending on which function you select, invite the user to 1) select from the cloud or 3) take a new photo 2) select a picture in the camera.  When you select an option, Adobe Capture executes the designated function and the State final changes / outputs on the picture are visible.

    However, when you try to accept or to save changes / outputs, the screen seems to hang up and return to the initial splash screen.

    Can provide you any assistance?

    Thank you!

    Jerry

    Hi Jerry,

    I'm really sorry that capture does not work as it should. This is a known issue in the app and the team is working on a beta version with a fix. I hope that it will be available before the end of the week, but I'm not totally sure of the timeline.

    I know we'll get it on Adobe Android Apps - community - Google +, then join this page and you will be informed as soon as it is available.

    A couple of other things:

    It's an incredible description of the problem you are experiencing. Thank you very much for going into details so. It makes a huge difference when engineers are trying to understand what is happening.

    If please post here or contact us through the app (tap on the draw icon, then give us Feedback) whenever you need help. Sometimes on the weekends, I'm a little slow, but during the week, I'm trying to reach people as quickly as possible.

    I hope this helps.

    Sue.

  • Seek help for writing a script

    Hello

    I made a form (with Adobe Acrobat Reader 9 Pro), I want to improve the way to display the data entered

    I did a screen capture which summarize the changes wanted.

    (1) I would like to be able to select the short date and display it like this: (jj/mm/aaaa)

    ( 2), I tried a script, but the field in the result column is always equal to 1 when nothing were entered in C1

    var a = this.getField ("result");

    h.Value = 0;

    var b = this.getField ("ValeurB");

    var c = this.getField ("make");

    a.Value = (b.value - c.value) + 1;

    (3) I have always (with my fingers lol) the elapsed time between the date started and finished, it is possible to write a script?

    (I've never used JavaScript before, this is my first experience)

    Thanks in advance for your help.

    english picture.jpg

    For the calculation of the #2, you can use the custom calculation script next to the field "result":

    // Custom Calculate script
    (function () {
    
        var b = getField("ValeurB").valueAsString;
        var c = getField("ValeurA").valueAsString;
    
        // Only perform the calculation if both fields have an entry
        if (b && c) {
    
            // Convert the string values to numbers
            b = +b;
            c = +c;
    
            // Set this field value
            event.value = b - c + 1;
    
        } else {
            event.value = 0;
        }
    
    })();
    
  • Help for writing an analytical application

    Hi all

    This is my first question, please be patient with my English, I'm Italian and do not write in a foreign language. ^_^

    I have a 'simple' with a large table problem.

    My table is really simple

    CREATE TABLE HH24

    (

    ACR VARCHAR2 (50 BYTE) NOT NULL,

    IDENTIFICATION NUMBER NOT NULL,

    DATAORA DATE NOT NULL,

    E0 NUMBER DEFAULT 0 NOT NULL,

    C0 NUMBER 0 NOT NULL DEFAULT,

    BY DEFAULT 0 NOT NULL NUMBER B0

    )

    It is large (> 50 GB) and partitioned on column DATAORA

    Now I need to extract a set of well defined data

    In a range of Data1 to data2 where data1 and data2 are ' dd/mm/yyyy hh24.

    sum of the E0 and B0 and C0 value for each day of the time range

    So, if I

    Data1 = to_date (January 7, 2015 07:00 ',' dd/mm/yyyy hh24 ')

    data2 = to_date (July 31, 2015 11:00 ',' dd/mm/yyyy hh24 ')

    I need an aggregation where a thake every day in the range from 07-11

    rank 1-> 07/01/2015 beetween 07:00 and 11:00

    Row 2-> 07/02/2015 beetween 07:00 and 11:00

    rank 3-> 07/03/2015 beetween 07:00 and 11:00

    ...

    line n-> 31/07/2015 beetween 07:00 and 11:00

    of course, I write a first step request to extract the sum, like this

    SELECT cab, id,

    SUM (c0) c0,

    SUM (e0) e0,

    SUM (b0) b0

    FROM (SELECT hh24.acr, hh24.id,

    HH24. C0 c0,

    HH24. E0 e0,

    HH24. B0 b0

    OF hh24

    WHERE hh24.acr =: nameacr

    AND hh24.dataora > = data1

    AND hh24.dataora < = data2)

    GROUP BY cab, id

    It works to gather data in an extraction of the day (00:00 to 23:59)

    Can someone help me to retrieve data only in the necessary time slot?

    P.S. obiouvsly problem is'n in the size of the table (or in my bad English, it's another problem)

    ^__^

    Thank you

    It won't be quick, but try something like this (note that it is not necessary for online viewing):

    SELECT cab, id,

    SUM (c0) c0,

    SUM (e0) e0,

    SUM (b0) b0

    OF hh24

    WHERE hh24.acr =: nameacr

    AND hh24.dataora > = data1

    AND hh24.dataora<=>

    AND TO_CHAR(hh24.dataora,'HH24:MI:SS') BETWEEN TO_CHAR(data1,'HH24:MI:SS') AND TO_CHAR(data2,'HH24:MI:SS')

    GROUP BY cab, id

  • Need your help for writing query complex!

    Kindly give me your suggestion to write a query for some situation...

    suupose he is 10 in a circle Distributor. and also in each Distributor, there are 10 FOS under each Distributor... and to each FSO, there are also numbers retailers...

    Please suggest how to write the query, there look like... (possible may through XML...

    Distributor1, FOS1, rt_count, FOS2, rt_count, FOS3, rt_count
    Distributor2, FOS1, rt_count, FOS2, rt_count, FOS3, rt_count
    ...
    ...
    ...
    8751090151, 8751090147:10, 8751090148:25, 8751090149:11... .etc


    Here it is the data...

    date_crt dist_msisdn f os_msisdn rt_count
    26 MARCH 13 7399998263 7399998263 1
    26 MARCH 13 8751090151 8751090147 10
    26 MARCH 13 8751090151 8751090148 25
    26 MARCH 13 8751090151 8751090149 11
    26 MARCH 13 8751090151 8751090151 1
    26 MARCH 13 8751090151 8751090152 40
    26 MARCH 13 8751090151 8751090326 11
    26 MARCH 13 8751090151 8751090327 70
    26 MARCH 13 8751090151 8751090328 29
    26 MARCH 13 8751090151 8751090335 1
    26 MARCH 13 8751090151 9577162731 8
    26 MARCH 13 8751090151 9613381589 38
    26 MARCH 13 8751090151 9613381790 14
    26 MARCH 13 8751090151 9613381969 13
    26 MARCH 13 8751090151 9613385207 42
    26 MARCH 13 8751090151 9613385284 12
    26 MARCH 13 8751090151 9613386523 52
    26 MARCH 13 8751090151 9613389220 91
    26 MARCH 13 8751090151 9613530655 1

    Published by: user3558544 on 1 April 2013 05:36

    Published by: user3558544 on 1 April 2013 07:09

    You can validate the query in the exactly the way you are runnin it and the text of the error?

    The query with the name of the table that you post could look like this:

    Select dist_msisdn, rtrim (xmlagg (xmlelement (e, os_msisdn |': ' | rt_count |))) ",") stopped by os_msisdn |': ' | (rt_count) .extract ('/ / text()'), ',') combinatoria_b
    of LBA_ALERT
    Dist_msisdn group

  • Help for writing an extension for SQL Developer

    Hi all
    I want to write an extension for SQL using JDeveloper and Oracle Extension SDK developer and I have a few questions.
    (1) is there some imports I need to sign up for the use of certain classes for SQL Developer?
    (2) how can I do a new item from the context menu in the area of connections in the left?
    (3) is there an example for this, because I have read a few posts of Sue and Kris Rice, but I figured out how to make the extensions only for JDeveloper.

    Thanks in advance!

    SQL Developer Connection browser uses a different site from the JDeveloper Application browser id. The site id OK to use for a listener from context menu is "db_nav". If your listener statement would look like this:


         
              My.listener.Class
         

    Note that a listener can be registered on several sites (if, for example, you wanted as your listener to trigger for publishers, you can use "db_nav; Editor"for the site id.

    You can post questions on the development of SQL Developer extensions on the developer forum SQL: SQL Developer this forum is monitored by the staff of SQL Developer.

    -John McGinnis
    SQL development team

    Published by: John Mcginnis, August 22, 2011 11:34

    Published by: John Mcginnis, August 22, 2011 11:36

  • Help for writing a loop

    Hello

    Can someone show me please how to change this code in a loop. At this point, it is only 10 but could be later if I wanted to learn the right way.

    _level0. Copy1.unloadMovie ();

    _level0.copy2.unloadMovie ();

    _level0.copy3.unloadMovie ();

    _level0.copy4.unloadMovie ();

    _level0.copy5.unloadMovie ();

    _level0.copy6.unloadMovie ();

    _level0.copy7.unloadMovie ();

    _level0.copy8.unloadMovie ();

    _level0.copy9.unloadMovie ();

    _level0.copy10.unloadMovie ();

    I tried this, but it did not work:

    xvar = 0;
    While (xvar < 11)
    {
    Yvar = "_level0.copy" + xvar

    yvar.unloadMovie ();

    xvar = xvar + 1;
    }

    Thank you

    Try...

    for (i = 1; i<11;>

    _level0 ["Copy" + i] .unloadMovie ();

    }

  • Help for writing xml

    Hi all
    I want to write an application of cfm to manage mp3 files by editing the ASX file, which is an xml-formatted file, as below:
    < version ASX = "3.0" >
    < Entry >
    Enya < TITLE > < /title >
    "< ref href =" http://www.xxx.com/mp3/enya.mp3 "/ > "
    < / Entry >
    < Entry >
    love < TITLE > < /title >
    "< ref href =" http://www.xxx.com/mp3/love.mp3 "/ > "
    < / Entry >
    < / ASX >
    but when I edit the ASX file and write to the server, coldfusion adds a line <? XML version = "1.0" encoding = "utf-8"? > to the header of the ASX file and Microsoft Media Player can analyze it, how can I write an ASX file or XML file without the line <? XML version = "1.0" encoding = "gb2312"? > to the header of the file?

    David
    Thank you very much.

    OK, I did it. Thank you all.

  • Need help to write a Boolean function

    Hello

    I would appreciate you help for writing a Boolean function!


    Below are the possible expressions:

    ${brand.name}

    ${model.name}

    ${franchise.name}

    ${supercategory.name}

    ${category.name}


    VALIDATE any combination of the expressions above (upper and lower case) in a string.


    For example:

    «It's the best brand of ${brand.name} template category, ${model.name} franchise ${franchise.name} supercategory $ {supercategory.name} and ${category.name} category.»


    If one of the above expressions is incorrect in the string, the function returns error.

    I'd appreciate your kind help!


    Thanks in advance!

    Mustak

    Maybe (watching scary)

    with

    data in the form of

    (select txt "this is the best brand of ${brand.name} of model category ${model.name} franchise ${franchise.name} supercategory $ {supercategory.name} and ${category.name} category".)

    of the double

    Union of all the

    Select txt ' is the best brand of ${Brand.name} of model category ${Modl.name} franchise ${Franchise.name} supercategory $ {Supercategoory.name} and ${Category.name} category.

    of the double

    )

    Select sys_connect_by_path (case when instr (lower (txt),' ${' | level case when 1 then 'brand'}))

    When 2 then 'model '.

    When 3 then 'franchise '.

    When 4 then 'supercategory.

    else 'category.

    end: '. (name}') > 0

    then '1'

    else ' 0'

    end,' ') boolean,.

    txt

    from the data

    where connect_by_isleaf = 1

    connect by level<=>

    and prior txt = txt

    and prior sys_guid() is not null

    BOOLEAN TXT
    1 0 1 0 1 It's the best brand of ${Brand.name} template category, ${Modl.name} franchise ${Franchise.name} supercategory $ {Supercategoory.name} and ${Category.name} category.
    1 1 1 1 1 It's the best brand of ${brand.name} template category, ${model.name} franchise ${franchise.name} supercategory $ {supercategory.name} and ${category.name} category.

    Concerning

    Etbin

  • I downloaded the latest version of the DNG Converter Camera Raw version 9.1.1 for windows. However, I get error install the update saying "error opening file for writing. Also on my help menu updates is not active?

    I downloaded the latest version of the DNG Converter Camera Raw version 9.1.1 for windows. However, I get error install the update saying "error opening file for writing. Also on my help menu updates is not active?

    If the installation program itself fails to open and run. Download it again maybe your current download is corrupted. Also, what OS you are using and you are an administrator with permission to install.

  • Method to check the VISA resources is ready for writing.

    Dear Forum, I have a piece of equipment that I connect to LabView via serial. The companion of the Instrument is of course completely useless, which fails for inexplicable reasons, but everything works perfectly in hyperterminal.

    When I try to adapt the example "basic series write and Read.vi" at my request, the implementation is very simple. However, it does not work despite working in hyperterminal. After a bit of investigation, I have determined that the problem is that after "VISA set up Serial Port" port is not * actually * available for writing quite yet, most likely because it is a very old computer.

    By inserting a delay between the "VISA set up Serial Port" and the "VISA Write" I am able to get the program works as expected 100% of the time. However, it is a very bad solution, because this long delay can be totally useless and performance on the computer to an end user (which may be much better than this one). Especially because this piece of equipment has 8 analog inputs, 8 analog outputs, 4 relay, 20 outputs 24VDC, 8 DIOs and 3 ports RS232 passthrough so it communicates a lot of data.

    Is there a function I can use to * guarantee * that the COM port is really ready for writing? If I could do this, then it can return almost immediately on a fast computer, while leaving enough time for computers slower finish opening the port. It may well be something that happens on the side of the pilot of the command windows open port.

    It comes to LabView 8.20 running on a Windows XP in VirtualBox on Linux host. Please don't just tell me that I shouldn't use virtualized Windows, I am sure that this problem occurs for the disabled of old material as well as it is the only significant in terms of series API difference. The virtualized instance is only likely to be more slow material dealing with than it would be otherwise.

    You can get information on the creation of an Instrument Driver Networkdriver.

    If your instrument does not return an ID and you can not do a reset, then obviously your initialize function would not code for this. Having the code that defines the instrument on certain default configuration is common.

    I don't know how this driver is intended to be used. Do you want that he NOR certified. The driver needs to be distributed outside of your company? It seems that the problem with your com port is unique to your pc and the installation program. How many times this would appear to other users?

  • Difficult to see the details for the traditional DAQ functions

    I'm migrating a Tradtional DAQ to DAQmx applications and manage to LV 8.6 to see 'details' for traditional data acquisition functions.  I looked to the traditional manual online user DAQ & a few other pubs and impossible to find a good explanation, parameters of entry and exit to functions.  Can someone help me?

    Thank you... PacMan

    In talking with Kent Lau, an applications engineer at NOR, told me I was missing the file nidaq.chm for a reason any.  Even after trying it from reinstalling drivers traditional DAQ of Q4, 2008 software distribution, it is still missing.  So, I installed an older version of the driver on a computer that has never had LabVIEW, then copied the file nidaq.chm in the folder 8.6\Help of LabVIEW & was able to then see the traditional DAQ work details.  Thanks Kent!

  • Need help for optical safety circuit.

    I buy these parts and prototype with real components, but since I multisim, I thought it would be nice to create the circuit and maybe work through issues I can practically.

    I need a circuit that takes 120 VCA, generates 5 VDC and 1.5Vdc power of optical transmitter and receiver.  I actually use a data port because he has great range and is pretty cheap.  Rather than send the binary code well I just send a light stead that is broken or not broken through doors and windows in my house.  Then the receiver sees this as an entry and order a relay.

    I tried several voltage regulators that come with multisim, but I get an error of execution of my circuit.  Really I can't the 120 VAC to power levels necessary for the functioning of the optics.

    Otherwise I might want to run on a system 120Vdc with battery backup, so throw a 120Vdc up to 20 v DC switching power supply - but I have not found a SMP in the library which takes 120 as input and as output 20.

    Basic plan: 120VAC source-> transform to 24Vac-> Full bridge rectifier to ~ 20 v DC-> voltage capacitor filter on the input of two voltage regulators (1 to 5 VDC, 1 to 1.5Vdc) - then circuit since the two power supply of the transmitter and the receiver.

    I just need help for 5V and 1.5V, from there, I know that the real world circuit will work component tests already carried out.  Thanks for reading.

    I didn't Multism so I can't advise you on the compatible models. I ran the model on semiconductors with slight modifications of format on my SPICE simulator based on Berkeley Spice 3f5. I had to change the format of model resistance semiconductors appeal but has not changed any values.

    The output of your power supply circuit 3 (with 5 V, not the 1.5 V regulator regulator) was 4.99995 V.

    There are a few messages about changing templates published for compatibility Multisim woth. You can search those to see if there are any suggestions on what you'll need to fix in the model.

    Lynn

  • response of psr tmadmin: failed to get a temporary file for writing

    Hello

    I have a problem with my local Tuxedo instalation. My servers and services works fine but when I try to list them using psr (printserver) or printclient tmadmin response: pg: failed to get a temporary file for writing. Can you tell me where can I find the possible cause?

    Thank you,.

    main problem was no space in /var. thank you for your help.

  • Mathematical functions in a table

    Hi all;

    I'm building a choise multipul quiz.  There are two buttons, one with a value of '1' and the other with the value "0".  They are fed in a table called (responses).  How to add all the elements of the array, and then how do I perform mathematical functions on this new issue of analyzed the percentage of correct answers and logically if the person has passed or not

    Thank you

    James

    As I said in the first response, you can simply loop through the array and the amount that you will...

    var sum = 0;

    for (var I: uint = 0; i)

    sum yourArray += [i];

    }

Maybe you are looking for