How to access vector < int > data passed to the function of iteration?

So, basically, I have all the work by accomplished Supercomputing in the Render() function and threw a vector < int > (with all my final pixel already calculated and stored inside values) to the iteration function.

However, when I go to assign: output-> red-> green, out-> blue, out-> alpha , result is a revamped image:Screen Shot 2015-07-03 at 2.33.53 AM.png

My pixel processing function that I pass to the iteration inside the function Render() function looks like this:

IM with the final pixel data in a vector < int > called given that present a size() of (width * height * 4) with values in rgba order.

public static PF_Err

() drawTriangles8

void * Conref.

A_long xL,

A_long yL,

PF_Pixel8 * inP,

PF_Pixel8 * output)

{

PF_Err err = PF_Err_NONE

TriangulateInfo * tInfo = reinterpret_cast<TriangulateInfo* > (Conref);

if (tInfo) {

Output->Red tInfo->data= [(int) ((xL * 4) + (yL * tInfo->width * 4))];

Output->Green tInfo->data= [(int) ((xL * 4 + 1) + (yL * tInfo->width * 4))];

Output->Blue tInfo->data= [(int) ((xL * 4 + 2) + (yL * tInfo->width * 4))];

Output->alpha tInfo->data= [(int) ((xL * 4 + 3) + (yL * tInfo->width * 4))];

}

return err;

}

I tried just to save the values of the original image with no calculations done RGBA and try them back on the resulting image so that it remains unchanged and I get always the same the smeared image search. No idea what's going on?

This is not the point of my last answer.

my point was that you store in your vector, the pixels in this order:

x0y0 x0y1, x0y2... x1y0, x1y1, x1y2...

Maybe the way you shoot you pixels from the vector assume they are

ordered:

x0y0 x1y0, x2y0... x0y1, x1y1, x2y1...

If that's true, which would explain the image being on his side, and the

the offset to the line you see.

Tags: After Effects

Similar Questions

  • How to access a certain date in the date and time field SQL Server

    I have a field named job_date in a table in my database of the 8 SQL Server.

    The data type is datetime.

    Thus, the values for the fields as the 2013-03-11 15:55:52.000 look.

    How to query this field to include only the values of a certain date?

    For example

    < cfquery name = "get_job_name" datasource = 'abc' >

    SELECT FROM job_info job_date WHERE Job_name = March 12, 2013"

    < / cfquery >

    When I query the field now I get NO RECORDS.

    This is because as the fields like this 15:55:52.000 2013-03-11. instead of this March 12, 2013"

    How to access a certain date in the date and time field SQL Server when its formatting as this 15:55:52.000 2013-03-11. ?

    where job_date > = TheDateYouWant

    and job_date<>

    In addition, the format is irrelevent.  The only issue of date formats time is when you want to display.

  • How can I check for dates that are the same for today.

    If I have a bunch of dates in a datetime colum. How can I check for dates that are the same for today.
    "For example, this value of days would be ' #dateFormat (now (),"mm dd yyyy") #

    The best I could come up with was:

    Select * from data where data.userID =
    2635 AND
    "Convert (varchar, dateAdded, 101) = ' #dateFormat (now (),"mm dd yyyy") #


    How can I get this to work smart peeople :)

    It is best to make the comparison on the datetime values. One technique is to get the current date at midnight. Then add one day to get tomorrow's date. In your sql query finds all values is greater than or equal to today and less than tomorrow.

    One solution is to do everything in MS SQL

    WHERE the dateAdded > = convert (datetime, convert (varchar, getdate(), 112), 112)
    AND dateAdded = dateAdd (d, 1, convert (datetime, convert (varchar, getdate(), 112), 112))

    Another option could be to use CF to calculate dates:


    WHERE the dateAdded > =.
    AND dateAdded<>

  • CVI 2013 ' FATAL RUN - TIME ERROR: pointer to free memory passed to the function of library "when you access a struct of struct

    #include 
    #include 
    #include 
    
    typedef struct StringsStruct
    {
      char A[10];
      char AA[10];
    
      char B[10];
      char BB[10];
    
      char C[10];
      char CC[10];
    } StringsStructType;
    
    StringsStructType Strings = {0};
    
    char *const SelectedStrings[3] =
    {
      Strings.A,
      Strings.B,
      Strings.C
    };
    
    int __stdcall WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
                           LPSTR lpszCmdLine, int nCmdShow)
    {
      if (InitCVIRTE (hInstance, 0, 0) == 0)
        return -1;    /* out of memory */
    
      strcpy( SelectedStrings[1], "TEXT" );
      /*** FATAL RUN-TIME ERROR:   "main.c", line 32, col 11, thread id 0xXXXXXXXX:   Pointer to free memory passed to library function. ***/
    
      Breakpoint();
    
      return 0;
    }
    

    Any chance to get this working in 2013 CVI?

    "& Strings.A [0]" does not work either.

    Hello CVI - User!

    Thank you for reporting the issue. I filed the bug report # 423491.

    I did have a chance to get rid of the error by changing the definition of the structure, but I was able to get the program running by disabling execution checking when the fields in the structure are initialized:

    strcpy( (char*)(uintptr_t)SelectedStrings[1], "TEXT" );
    

    Or perhaps a more descriptive workaround solution:

    #define UNCHECKED(x) ((void*)(uintptr_t)(x))
    strcpy( UNCHECKED(SelectedStrings[1]), "TEXT" );
    

    Thank you

    Peter

  • Difficulty accessing data by using the function of Ago - the end of the previous month

    Hey,.

    Recently, I met a problem that I can't fix on my own.


    I need to compare my portfolio to the current date / specified with the portfolio for intelligence and for the end of the previous month (the last day of the previous month).

    It looks like this :

    Capture.JPG

    My fact table consists of the list of contracts of loan that is updated daily. The data for the new day are added to the table, which actually resemble a large sandwich of various portfolios.


    To recover the data for the current/specified date and intelligence is not a problem. Current date - the date is read (can 10.08.2014), the day before - I use the Ago function (e.g., 09.08.2014).

    The real problem is getting the data for the last day of the month previous (e.g. 31.07.2014), since I can't put a specific to the function of Ago offset (10 days in our example), as the number of days from the end of the previous month is constantly - changing is a daily report.


    The best solution would be setting the offset function there is a dynamic value, which would change according to the user selects the date of the report. Can be based on the number of days in the month. BI strictly prohibits using anything that is not an integer in the offset value, so this isn't an option.


    I tried a work around using formulas in columns, like: FILTER ('facts of agreements'. "" Outstanding "USING ("Posting Date". "" Id of the day ' = TIMESTAMPADD (SQL_TSI_DAY, TIMESTAMPADD (1), (SQL_TSI_DAY, 'Date of Report'.) "Number of the day in the month" *-(1) + 1, DATE ' @{report_date}'))). "

    It did not work, since the data I receive are dated the last day of the previous month and date, which is applied to get the data for the current date filter / specified, it cuts.


    Tried to create another time the hierarchy, with the ends of period (week, month, quarter, year) and use it as a level at the Ago. He does work in part, offset the end of 1 month, but I can't bind the data, I get to the date of the report, as the Ago function returns random dates.


    I tried to search if people have had the same problems and it seems I'm the only one. I'm really desperate at this point, not even sure it's possible to get the result I need everything.

    So, please advise!


    Aurore

    Finally got sorted! Hoorey!

    Here's how it's done:

    I created a presentation variable 'report_date' for the user to choose the date of the desired report. That this formula has added to the column:

    FILTER ('facts of agreements'. "" Outstanding "USING ("facts of agreements". (("" Days late max "> 30))-there is (FILTER ('facts of agreements'. "" Outstanding "USING ("facts of agreements". ((("" Days late max "> 30)), TIMESTAMPDIFF (SQL_TSI_DAY, TIMESTAMPADD (SQL_TSI_DAY, DAYOFMONTH (DATE ' @{report_date}') *-1, DATE ' @{report_date}" "), DATE ' @{report_date}'))

    Basically, this formula is used to calculate the difference between the current amount of the portfolio and the amount of portfolio for the last day of the last month (or at the end of last month), where only loans with number of days late over 30 are included.

    In the service there, I used a TIMESTAMPDIFF as a compensation formula to calculate the difference in days between the date of the report and the end of last month. Now no matter what date the user chooses it will give the correct difference in days.

    Really easy, but it took me a little time to get there.

    Hope this helps someone

  • How to access a view of database at the Complutense University of MADRID

    Hello

    I'm working on a project to migrate 10g and 11g.

    I migrated some views of the database to 10g to the ucm 11g schema schema.

    In 10g, I am able to access these objects to display in the Configuration Manager applet and I am not able to do the same thing in 11 g.

    Some can help me on how we get access to views of the DB in 11gUCM.

    Thanks in advance.

    Kind regards

    Vijay

    http://jonathanhult.com/blog/2013/11/use-database-view-WebCenter-content-schema-view/

    Jonathan

    http://jonathanhult.com

  • How do rotate on a date and see the sum of the value of another column

    Hello

    I searched through the forum and cannot find a query similar to my question feels so post this new thread.

    First of all, it is probably useful indicating that I am using Oracle 10 g.

    I have a table that is used to store the details of the booking (essentially a booking system) and I would use this data to display the details of the customers stay on one line.

    The table has the following columns:
    BOOKING_ID
    CUSTOMER_ID
    DATE_OF_ARRIVAL
    NUMBER_OF_NIGHTS
    NUMBER_OF_PEOPLE
    Some example records could be:

    BOOKING_ID    CUSTOMER_ID     DATE_OF_ARRIVAL    NUMBER_OF_NIGHTS   NUMBER_OF_PEOPLE
    --------------------------------------------------------------------------------------------
    1                    201      13-JAN-2010        5                   1
    2                    202      13-JAN-2010        3                   2  
    3                    202      13-JAN-2010        4                   1
    4                    203      15-JAN-2010        2                   3
    On this basis I would like to display the output so that I can show a sum of the NUMBER_OF_PEOPLE reserved to per customer per day, as such:
    CUSTOMER_ID     13-JAN   14-JAN   15-JAN   16-JAN   17-JAN   18-JAN   19-JAN 
    -----------------------------------------------------------------------------------------
    201                   1       1        1        1        1        0        0
    202                   3       3        3        1        0        0        0
    203                   0       0        3        3        0        0        0
    I watched analytical functions in the documentation and several books of Oracle that I have, but have so far struggled to find how to make the performance desired. Even using the excellent response to the previous post on the forum, I got Re: how to count the occurrence of a date in a range I was not able to get a feasible request.

    Any help or advice would be much appreciated.

    Kind regards
    Stu

    Published by: macmanxie on January 10, 2011 21:16

    Hello

    macmanxie wrote:
    ... The suggested approach goes only to return a number if the DATE_OF_ARRIVAL corresponds to the date in the CASE statement, however I have the added complexity of wanting to show a count of all the days that the customer is booked, for, by making use of the NUMBER_OF_NIGHTS. I tried to use some of the examples provided on morganslibrary.org, for example:

    sum( CASE WHEN  TRUNC (arrival_date) between '01/13/2011' and TRUNC (arrival_date+no_of_nights) THEN nvl(no_of_people,0) ELSE 0 END) AS jan_13
    

    but this does not produce the desired result.

    You check if arrival_date is between January 13 and arrival_date + no_of_nights (as if the arrival date could all be posterior to the arrival_date + no_of_nights).
    Are not really interested in whether or not January 13 ib between arrival_date and arrival_date + no_of_nights?

    NVL ( SUM ( CASE
                    WHEN  TO_DATE ( '01/13/2011'
                           , 'MM/DD/YYYY'
                         )          BETWEEN  TRUNC (arrival_date)
                             AND       TRUNC (arrival_date) + no_of_nights
                 THEN  no_of_people
             END
           )
        , 0
        )          AS jan_13
    

    Always format your code. It is important to format your code if you are the only who who will ever read but it is even more important if you are posting on a forum like this and ask other people to read.
    Not to compare the DATEs in the strings; explicitly use a conversion function, like TO_DATE, above, where necessary.
    Both
    SUM (NVL (x, 0)) and
    NVL (SUM (x), 0) get the same results, but the latter is more effective. If you have 1000 lines, the first way is calling NVL 1000 times, but the second way is calling only once.

    If your previous thread
    Re: How to count the occurrence of a date in a range
    Gets you the right data, but it has one row for each distinct combination of customer_id and date, then you can switch it to a form that contains a line by the customer and another column for each date.

    If you need help, post CREATE TABLE and INSERT statements for some examples of data and outcomes from these data. The post you are trying better to a request, including a subquery that gets no cross-the raw table dynamic results.
    There will be a fixed number of columns in the output swing? If this is not the case, how do you deal with that? Which of these options in the thread I posted above)
    Re: County report and the sum of the number of rows by multiple columns
    ) is best for your needs? Than others is acceptable?

  • Is it possible data passing between the screws running simultaneously in 2 separate teststand sequences?

    I have a vi that I want to run in a teststand sequence and then call another vi in a separate sequence, running in parallel. Is there a way of transmitting data dynamically between the two, the execution of vis?

    Just realised I can still use FVGs between the two sequences.

  • Pass values to the function vs object pass to the function

    What is the best way to pass some values to the function?

    It is sufficient to indicate the characters or arrays of char etc something like this: function (float x, float [] z)

    or

    Create class (object)... say ValuesToPass vltp;  with the variables, the set and get methods.

    Assign values: vltp.setX = blah, blah = vltp.setZ

    ...  And not vltp to the function like this: function (vltp) and the values of the extract by using the get methods...

    What sense would be less time and consume of heap space?

    From my point of view - by passing the values as values would be faster, but I'm new to java and can't be 100% sure on this subject...

    Thank you

    If a method will work on three different bits of data, such as arrays of 2 char and int, so I suspect that most people would say just pass these as parameters rather than creating a "temporary" object just to contain these.

  • Do not have precisely the difference ECCAS current date and the date, we pass to the function.

    Hello

    I did a feature where when I go to any expiry date that I must check with the current date... and get the difference in days.

    When I change the value to this fuction 2012-01-05 and my current date is 2011-12-22 that I am getteing diffDays = 45, when I pass 2011-12-25 and my current date is 2011-12-22, then I'm diffDays = 34.

    I didn't know that's why 31 days added in my diffDays? If there are 31 days month so it will add 31 and if the month is 30 we can add 30 days? I didn't know where I am going wrong. I enclose my code that I use. Pls check and tell me where I'm wrong...

     public static String isBookExpired(String date) {
                System.out.println("**********");
                date = date.trim();
                int index = date.indexOf(" ");
                if(index != -1) {
                    date = date.substring(0, index);
                }
                    String strArr[] = stringtoArray(date , "-" );
    
                Calendar substribtionDt = Calendar.getInstance();
                //myCalendar.
                substribtionDt.set(Calendar.YEAR, Integer.parseInt(strArr[0]));
                substribtionDt.set(Calendar.MONTH, Integer.parseInt(strArr[1]));
                substribtionDt.set(Calendar.DATE, Integer.parseInt(strArr[2]));
    
                Calendar today = Calendar.getInstance();
    
                long diffDays = ( substribtionDt.getTime().getTime() - today.getTime().getTime()) / (24 * 60 * 60 * 1000);
    
                if(diffDays < 0) {
                    return "Yes";
                }
                else
                    return "No";
            }
    

    months in a calendar object index starts with 0 rather than 1 in the real world, you must set the value of the months in the calendar by subtracting by the date that you enter.

  • Access error of data while running the script in the script fdm workbench Editor

    Hello Experts,

    I get the error when I run the script in the script of fdqm established client.this editor is the error

    -2147467259 data access error and he navigates the error on line 30 on this script «Set rsAppend = DW.» DataAccess.farsTable (strWorkTableName).

    Please return me asap where I should charge peoplesoft data to one of my database of planning through fdm.

    Thanks in advance...

    You will need to build a script for integration that is an import Script that allows you to import data from SQL in FDM.

    When you create your import format, you will need to configure it with the file Type = Script and then assign the script of integration as an Expression. Assign your import format to the location that you use to import data.

    Then you can test it by going to the import stage and clicking the import button. FDM will run the integration script and data import by running the SQL query that you have defined.

    To the contrary, "Data Pump" import Scripts are used as import expressions in the import formats

    You can run a script to integrate the customer that this script requires input parameters that are passed only when then FDM import step is executed. If you want to see the raised error open the errorlog FDM. You will only be able to run this Workbench script when you want to debug data is being extracted, but in this case, you will need to comment code that inserts the data in the table. Don't forget that the work table is a temporary table that is created when you click on the import button and if you run Workbench this table does not exist

  • How can I keep 'creation date' to copy the files?

    I copy a lot of files to cd and dvd on an external/portable hard drive to save them, but I've found that the 'creation date' and 'date modified' options (in Windows Explorer) are displayed as yesterday's date (the date I copied them to my external hard drive, and not when they were actually created and modified years ago).

    I really need the files, once they are copied, to display the original "creation date", and if possible 'date modified', can anyone tell me how to do what you please?

    I read that I can Zip, copy and unzip them and it should maintain the original dates, but this seems to be a kind of long-term to do things. Y at - it maybe a checkbox somewhere to confirm that you want to keep the original dates before copying them? Also, I am running Windows XP Professional, Version 5.1 (service Pack 3).

    Thank you very much.

    Hello

    I suggest you to refer to this link and check if it helps:

    http://TechNet.Microsoft.com/en-us/library/bb491035.aspx

    It will be useful.

  • How to access internet throug a firewall of the Linksys router?

    Recently, I went to the ADSL2 + Internet broadband.

    So bought router "CISCO Linksys WAG120N" as my hardware firewall (FortiGate60) had no any port to connect to ADSL.

    Now I am accessing internet throug the Linksys router above and do not use the firewall because I don't know how to configure the firewall to get access to the internet through the firewall of the router.

    My previous broadband service was directly connected to the WAN port on the firewall because it was compatible.

    Please help me to configure the firewall to access the internet from the router through the firewall.

    Thank you

    You must configure the WAG120N in Bridge mode and then configure your firewall to your (probably PPPoE) internet connection.

  • How to move from a date format in the report for custom funtions

    Hi all

    I have a funtion customized with 2parameters with dates and it returns a number. I used this function in sql query and return data in the sqldeveloper tool, when I use the same query in report rdf, that it is not all the data is. Please suggest me how it works.

    Thank you

    Ravi

    You must convert the standard date FND that is in canonical format to a regular date using FND_DATE format. CANONICAL_TO_DATE, this conversion must arrive on the date which is accepted as the value of parameter in your SQL report or where ever it is used in the report. I often use in my PL/SQL base concurrent programs and I think that's true in RDF as well.

    Best regards

    Arif.

  • How can I fill a date field when the document is signed?

    I have 4 fields of digital signature in a PDF form.  Next to each signature is a field of date (format dd/mm/yyyy).  I would like it so when a user registers the signature box that fills the date next to her field with today's date, then change to read only (so it cannot be changed).

    In Adobe Acrobat 9 Pro, I have this form and it has the following fields

    Signature1

    Signature2

    Signature3

    Signature4

    DateField1

    DateField2

    DateField3

    DateField4

    Signature fields trigger a Topaz.GemSignPlus driver where the end-user will sign on an electronic signature pad.

    How do I use Javascript to detect when one of these Signature fields is populated and fill in the date in the appropriate date field?  I tried to create Boolean variables initialized as false for each field of GIS.  Then when the signature is complete, I try to change it true, but for some reason any my javascript detect that the value does nothing.

    I searched the net endlessly for this solution.  I can't believe I'm having a difficult time finding an answer.  I mean how many places you go where they ask you to "sign and date here."  Each document signature base I've ever seen also requires a date.

    In any case, here's what I have.  Functions, I have a script called JavaScript Document name populate date:

    function populatedate()
    {
    var bSignature1 = new Boolean();
    var bSignature2 = new Boolean();
    var bSignature3 = new Boolean();
    var bSignature4 = new Boolean();

    If {(bSignature1)
    DateField1.value = util.printd ("d/m/yyyy", new Date());
    }

    If {(bSignature2)
    DateField2.value = util.printd ("d/m/yyyy", new Date());
    }

    If {(bSignature3)
    DateField3.value = util.printd ("d/m/yyyy", new Date());
    }

    If {(bSignature4)
    DateField4.value = util.printd ("d/m/yyyy", new Date());
    }
    }

    In each signature field, I on the signing tab "this script is run when the field is signed:

    var bSignature1 = new Boolean (true);

    I'm changing to true see.  My thought is that if it is true that DateField1.value should print jj/mm/aaaa in her building in the Date() function.

    But maybe I do not get the correct context.  I'm new to Javascript in Adobe.

    It's a round script. Why not just use the signature signature of script to set the value of the field date? The correct syntax for this is:

    this.getField("DateField1").value = util.printd ("d/m/yyyy", new Date());

Maybe you are looking for