Iterate through AS3 object

Can anybody help me iterate through an Actionscript object in C
The equivalant AS3 code would be:
For (var key:String in someObject) {
Thanks

Hi,
see this: https://blogs.oracle.com/groundside/entry/refresh_problems_using_adaptive_bindings
Also, please read this:
SQL injection - Wikipedia, the free encyclopedia
Because this is what you will have to implement protection for to defend your database from damage.
Frank

Similar Messages

  • Iterate through a treemap object

    how can 'iterate' through treemap object like you can with an ArrayLIst
    like:
    Iterator it = arraylist.iterator();

    Here is an example:
    TreeMap users = (TreeMap)session.getAttribute("users");
    Iterator i = users.entrySet().iterator();
    while (i.hasNext()) {
    Map.Entry e = (Map.Entry)i.next();
    if (e != null) {
    String key = (String)e.getKey();
    if (key != null && key.length() > 0) {
    String value = (String)e.getValue();
    } // end if key not null
    } // end if entry not null
    } // end while

  • How can I iterate through the TextObjects of a Report object?

    Post Author: EMoscosoCam
    CA Forum: Other
    Hello(Using Crystal Reports XI Release 2 and Visual Basic 6)I have the name of a TextObject as a string. I would like to make something like this:Dim objReport As CRAXDRT.Report' once initialized from an RPT fileobjReport.TextObjects(strName).Supress = TrueOf course, there is not such a thing as a TextObjects collection. Is there a similar way to do what I want? Consider that the TextObject's name to be supressed is a string, and that I do not have it before-hand.Thanks a lot.

    Post Author: JonathanP
    CA Forum: Other
    Hi;
    You can loop through every section, then through every object, and check to see if it is a TextObject or not.
    ie:
    Dim I As IntegerDim X As IntegerFor I = 1 To Report.Sections.Count    For X = 1 To Report.Sections.Item(I).ReportObjects.Count        If Report.Sections(I).ReportObjects.Item(X).Kind = crTextObject Then            Report.Sections(I).ReportObjects.Item(X).TextColor = vbRed        End If    Next XNext I
    Regards,
    Jonathan

  • Iterate through the child Objects in a components

    I have a custom component named myComp that has three TextInputs. And in the main application there is a button that adds this component dynamically to the VBox named myVBox, I would like to know how to iterate through the added components and show the text inside each of the TextInputs in an Alret box. I am pretty new to flex and I couldn't find any examples for it.
    Thanks,

    Sample code,
    Custom Component
    MyComp1.mxml
    <?xml version="1.0" encoding="utf-8"?>
    <mx:HBox xmlns:mx="http://www.adobe.com/2006/mxml">
         <mx:TextInput id="txt1" width="100" />
         <mx:TextInput id="txt2" width="100" />
         <mx:TextInput id="txt3" width="100" />
    </mx:HBox>
    Application
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application
         xmlns:mx="http://www.adobe.com/2006/mxml"
         layout="absolute"
         creationComplete="init()">
         <mx:Script>
              <![CDATA[
                   import mx.controls.Alert;
                   import com.MyComp1;
                   private function addComponent(event: MouseEvent): void {
                        var myComp1: MyComp1 = new MyComp1();
                        myVBox.addChild(myComp1);
                   private function getText(event: MouseEvent): void {
                        var alertMsg: String = "";
                        for (var i: int = 0; i < myVBox.getChildren().length; i++) {
                             if (myVBox.getChildAt(i) is MyComp1) {
                                  var myComp: MyComp1 = myVBox.getChildAt(i) as MyComp1;
                                  alertMsg += myComp.txt1.text + "\t" +
                                                 myComp.txt2.text + "\t" +
                                                 myComp.txt3.text + " \n"
                        Alert.show(alertMsg);
              ]]>
         </mx:Script>
         <mx:VBox width="100%" height="100%">
              <mx:Button label="Add Comp" click="addComponent(event)" />
              <mx:Button label="Get Value" click="getText(event)" />
              <mx:VBox id="myVBox" width="100%" height="95%">
              </mx:VBox>
         </mx:VBox>
    </mx:Application>
    Hope this helps you

  • Iterate through all the records in a table using Java API

    Hi All,
    What is the easiest way to iterate through all the records in a given table using Java API? I cannot find any methods that will return all records in a table and the only way I can use is to perform a free form search with a condition that is always true. The code works but is pretty ugly. Is there an alternative to this approach?
    Thanks!
    Kenny

    Hi Kenny,
    You can construct a new Search object with your table's code name, a new ResultSetDefinition object for your table and just execute this search using the GetResultSet method of CatalogData.
    Please look at the following code:
    Search search = new Search(<code name of your table>);
    ResultSetDefinition rsd = new ResultSetDefinition(<code name of your table>);
    rsd.AddField<code name of a field>);
    rsd.AddField(<code name of a field>);
    String sortField = <code name of your sort field>;
    boolean sortAscending = true;
    int page = 0; //page number
    A2iResultSet rs = <your CatalogData object>.GetResultSet(search, rsd, sortField, sortAscending, page);
    for (int i = 0; i < rs.GetRecordCount(); i++)
        Value fieldValue = rs.GetValueAt(i, <code name of a field>);
    Hope this helps,
    Nir
    PS - I really recommend you to start using the new API, as it is much more efficient and straight-forward.

  • Iterate Through Lists Instead of Document Libraries, Or both

    System Info: SharePoint 2010 Enterprise w DEC 2013 CU. 2 WFEs (load balanced), App Server, SSRS Server, Dedicated CA Server (All running Win 2k8 R2).
    Background:I have a large (5,000 user) application that is completely customized on top of SP2010. I am the admin, and have been on the team for many years. Previously, we had a development team,
    but client has scaled costs back, and now its just me on the technical side. We have a Web app that houses multiple Site Collections, and each site collection has various subsites.
    My Problem: We have increased the LVT to 10k items (system has plenty of HP, although we do see performance degradation). Each subsite in the Site Collection holds data specific to an organization
    wtihin the Line of Business. There are two lists that frequently approach the 10k mark, and we have mitigation steps in place (essentially, we just create a new SubSite for them once they reach 10k). What I need is a single script that will traverse ALL subsites
    and return a count of their lists, perhaps I can work a couple of if statements in there to have specific data written to a SP List (if count is greater than 5000), and other wise everything gets written to the output file.
    I am trying to iterate through all lists and return a count of folders + items ... The script below works just fine, but it goes through Document Libraries only (per the baseType eq tag).
    I've tried changing baseType from DocumentLibrary to GenericList, but I continually get an error.
    I've also removed the where baseType = DocLib clause completely, and this has the desired results (all lists and doclibs are listed), except the 'WebUrl' field in the csv output is blank.
    Any thoughts on how I can make a small tweak to this script to get my desired results?
    Start-SPAssignment -Global
    $OutputFile ="D:\folder\DocCount3.csv"
    $results = @()
    $webApps = Get-SPWebApplication http://WebAppURL
    foreach($webApp in $webApps)
    foreach($siteColl in $webApp.Sites)
    foreach($web in $siteColl.AllWebs)
    $webUrl = $web.url
    $docLibs = $web.Lists | Where-Object {$_.baseType -eq "DocumentLibrary"}
    $docLibs | Add-Member -MemberType ScriptProperty -Name WebUrl -Value {$webUrl}
    $results += ($docLibs | Select-Object -Property WebUrl, Title, ItemCount)
    $results | Export-Csv -Path $OutputFile -NoTypeInformation
    Stop-SPAssignment –Global

    You guys won't believe this ... But, the script actually works as intended if I change the baseType tag to "GenericList"... I had been getting errors (about 14 of them) through PowerShell and
    assuming the script didn't process, but after looking at the output CSV, it seems that everything worked properly. I think the 14 errors MAY have been corrupted sites (or something?) as it gives me NullValueNotAllowed when trying to "Add-Member" and points
    to $WebUrl as being null.
    Next up -- working on getting this script to write specific objects to a SP list!

  • Iterate through all documents

    Hi,
    We have a container which contains *1 million* documents, each of which has size 5K. Container type is wholedocument. We need to iterate through all document regualrly using container.getAllDocuments(containerTxn, DBXML_LAZY_DOCS | DBXML_NO_INDEX_NODES). For each document, we will perform a xpath query in xml document in memory.
    The problem here is about whether we should use transaction. If transaction is used, getAllDocuments will report "Lock table is out of available lock entries" error when it scan about 9383 ducuments. Here are lock setting:
    envp->set_lk_max_lockers(6000);
    envp->set_lk_max_locks(6000);
    envp->set_lk_max_objects(8000);
    We have 1 million documents, it is impossible to set lock object to 1 million.
    My questions:
    (1) Is this normal? If so, why performing a dbxml query on the container doesn't cause such an error. I believe dbxml query has to iterate all of documents too.
    (2) Is it possible to use a seek position for getAllDocuments? Thus we can commit transaction every iterating 1000 documents, and then continue the iteration from the last seek position.
    (3) if we don't use transaction to call getAllDocuments, what possible problems will happen? Other threads are using transaction to read/update the documents.
    Thanks.
    -Yuan

    Yuan,
    The quickest thing to try is to add the flag DB_READ_COMMITTED to getAllDocuments(). That may reduce the number of locks you need. While you may not be able to set the various lock parameters to 1 million, you should set them much larger than you have now (e.g. 50k - 100k) for this sort of operation.
    Not using transactions at all can lead to inconsistent data mostly related to index consistency with document content. Depending on the nature of your updates it may be safe. You could get stray exceptions but nothing should crash. E.g. if you are only adding/removing documents you are probably safe without transactions; although you might iterate to a document that's been removed so you'll see an exception which would have to be ignored. I'm not 100% certain this will work well but if you can test it in a high-update environment and see no issues that will tell you. The read side will not interfere with the updates.
    As for "seeking" if you look under the covers getAllDocuments() is really just a wrapper for an index lookup on the name index. The XmlIndexLookup API is quite flexible in terms of returning ranges. If you want to look into returning ranges of documents, do this:
    1. look at the code in XmlContainer.cpp in the function "getDocs()". It uses XmlIndexLookup to perform the operation.
    2. look at the XmlIndexLookup API to figure out how to turn the lookup into a range lookup vs looking up ALL items in the index
    Using XmlIndexLookup and tracking the name of your last-used document you can easily ask for all documents "higher" than that one. Further, if you know how your documents are named lexicographically you can give it a maximum as well if you wanted, but given that you can set your XmlQueryContext to be lazy you can simply iterate N times to get the next N documents without paying a penalty retrieving any documents you don't need.
    For the sort of thing you are doing I highly recommend using XmlIndexLookup directly (with or without transactions) to get the flexibility you need. XmlContainer::getAllDocuments() is merely a "convenience" layer on that class.
    Regards,
    George

  • Iterate through RichTable with custom cells

    Hi.
    I create a RichTable by drag and drop a view in DataControls. View is from table xxx and table contains only one column, binding description field in the table.
    This description is shown in an OutputText UI component.
    Then, I add a column with a SelectOneRadio component (to check Yes/No).
    Finally, I add another column with an Input Text to write comments.
    So, when I click one button, I capture the action event and want to process table content. But, how can I iterate through this table?
    How can I get each row, and each cell in its row (each radio, each text)?
    My JDeveloper version is 11.1.1.7.0
    Thanks in advance. Best regards
    EDIT: _________Final solution_________
    Add two transient attributes and iterate the VO object is very easy.
    For the specific issue about radio button, add a switcher and bind the radio group with the transient attribute.

    Hi,
    You could do something like
                   <af:switcher id="s1" defaultFacet="input" facetName="#{row.type eq 0?'radio':'input'"}>
                    <f:facet name="input">
                        <af:inputText id="it2" value="#{row.answer.inputValue"}/>
                    </f:facet>
                    <f:facet name="radio">
                        <af:selectBooleanRadio id="sbr1" value="#[row.answer.inputValue"}/>
                    </f:facet>
                    </af:switcher>
    -Arun

  • Iterate through selected characters

    Hi guys and girls!
    Has anybody a code snippet to show me how to iterate through the selected text (not the frame!, not the words, only the selected chars) and make any change on the characterAttributes (size, color, etc.)?
    Deeper into it:
    In the property "app.activeDocument.selection" usually the selected objects are stored as an array. Now when I select characters in a textframe (or TextPath, whatever) there is a [Textrange] in it.
    I already tried some combinations like this snippet underneath but I still get errors, that selectedChars[i] is undefined.
    FYI: I'm on Illustrator CS4, Mac OS X, Javascript
    var selectedChars = app.activeDocument.selection.characters;
    for (i = 0; i < selectedChars.length; i++ ){                           
         selectedChars[i].characterAttributes.fillColor = myNewCMYKColor;
    I hope I have gathered all relevant information. If not, please do not kill me and just ask back
    So has anybody a smart hint for me?
    Thanks a lot in advance!

    Here's a Change Size script that I found in my collection that somebody posted severat years ago. I'm sorry I don't remember who it was to give proper credit.
    #target illustrator
    // change size of paragraph text
    //$.bp();
    ChangeSize();
    function ChangeSize()
        selectedItems = selection;
        // check to make sure something is selected.
        if (selectedItems.length == 0)
            alert("Nothing is selected");
            return;
        endIndex = selectedItems.length;
        for (index = 0; index < endIndex; index++)
            pageObject = selectedItems[index];
            pageItemType = pageObject.typename;
            if (pageItemType == "TextFrame")
                // get the paragraphs from the selection.
                theTextRange = pageObject.textRange;
                paraTextRange = theTextRange.paragraphs;           
                numParagraphs = paraTextRange.length;
                for (i = 0 ; i < numParagraphs ; i++)
                    aParagraph = paraTextRange[i];
                    charTextRange = aParagraph.characters;
                    charCount = charTextRange.length;
                    if (charCount > 1)
                        end = charCount;
                        fontSizeChanger = 14/end;
                        currentFontSize = 18;
                        for (j = 0 ; j < end; j++)
                            theChar = charTextRange[j];
                            theChar.size = currentFontSize;  
                            currentFontSize = currentFontSize - fontSizeChanger;
    and here's the output.
    You should be able to go from there.

  • Iterate through all dynamic text variables

    Hello,
    I'd like to be able to iterate through all of the dynamic
    text variables in my flash movie, and I'd like it so that if I add
    new text to this movie, it will show up in the iteration.
    Essentially, I want to do something like this:
    for (i in _root) {
    trace(i);
    While this seems to print out all the variables in root, it
    prints more than just the dynamic text variables, and also doesn't
    iterate down through various objects to find the dynamic text
    variable.
    Is there any way I can accomplish this in action script?
    Thanks!

    Great! That code helps me a lot.
    There are still two weird issues.
    1) the test for tl[obj].text seems to always turn out to be
    false. However, if I trace the value of text, I'll see the text.
    Example:
    trace(tl[obj].text); // This will display the value in the
    text field
    if (tl[obj].text) // This is always returning false.
    Any ideas?
    The 2nd issue might be more difficult - some of my text
    objects don't appear until later in the movie (i.e. frame 10). It
    sort of looks like this looping doesn't see objects that appear in
    the future. Do I need to advance the frame 1 by 1 and repeat this
    looping process until the text appears? Maybe instead I can always
    have the text in the first frame, but have it be invisible or
    something?

  • Iterate through list

    i have a list and i want to iterate through the list and get the names of the classes present in that..
    i have the following code
    Iterator it= list.iterator();
    String value;
    while(it.hasNext())
         Object obj= it.next();
         Class cls= obj.getClass();
         value = cls.getName();
    now if i want to check whether a class called test is present in that list how to do that...pls help

    mgv wrote:
    i have a list and i want to iterate through the list and get the names of the classes present in that..
    i have the following code
    Iterator it= list.iterator();
    String value;
    while(it.hasNext())
         Object obj= it.next();
         Class cls= obj.getClass();
         value = cls.getName();
    now if i want to check whether a class called test is present in that list how to do that...pls help
    while(it.hasNext()){
    Object obj = it.next();
    if(obj instanceof test){
        //do something
    }

  • Iterate through HashMap ?

    Hello,
    is it possible to iterate through a Java HashMap somehow?
    Or is there any other iterable data structure i could use (I need to get objects from the data structure by using an integer value as key ) ?
    thanks!

    It depends...
    Simple answer: you can use keySet() or values() to get respectively a Set or a Collection, then you iterate on them (using iterator()).
    But you have no guarantee on the order of iteration.
    Now, a data structure using an integer as key is commonly called... an array! Half joking, it works well if these integers are consecutive or of limited range.
    If you need to iterate in increasing key values, use a TreeMap.

  • Iterate through CR on BOE

    I am a .NET developer given the task to extract all table values from all reports on our BOE server - could you please point me in the right direction as to which portion of your BOE API will allow me to:
    1. Iterate through all reports on a BOE server
    2. Iterate through all table values in a CR Report
    If you have any other suggestions or samples on the best way to do this please let me know.
    Thank you!

    Thank you for the references.  I can see now how to iterate through the infoobjects:
    InfoStore infoStore = (InfoStore) enterpriseSession.GetService("InfoStore");
    string queryString = "SELECT SI_NAME, SI_DESCRIPTION "
         + "FROM          CI_INFOOBJECTS "
         + "WHERE      SI_KIND = 'CrystalReport'";
    InfoObjects infoObjects = infoStore.Query( queryString );
    IEnumerator infoObjectsEnumer = infoObjects.GetEnumerator();
    while(infoObjectsEnumer.MoveNext())
        InfoObject crReport = (InfoObject) infoObjectsEnumer.Current;
        // iterate through object and extract values
       Report report = (Report)crReport;
    Can you please tell me what object I will need to cast the info object to in order to access it's table fields?

  • Can anyone tell me how to iterate through a cmponent tree in JSF

    HI,
    I am new to JSF.Can any one help me in iterating through a component tree.
    For eaxmple , i have a JSF page.When i send a request for the first time for a page ,
    it will build the component tree.So i want to iterate through that component tree.
    Actullay my requirement is that in my page, i will have a datatable and some command buttons.
    when i select a row in a datatable,it should be highlighted.But again onpage load, highlighting is missing.
    So i want to save the id of the element, which i selected in the table in the request object.
    Pls help me out....

    The view root is available by FacesContext#getViewRoot(). Its getChildren() returns a List<UIComponent>. For every UIComponent you can get the children by UIComponent#getChildren() which on its turn also returns a List<UIComponent>. You can easily write a recursive method for that.

  • Iterate through a list containing Map items using struts

    Hi friends,
    I have a small problem. I want to iterate through a list of items, using struts.
    The list actually contains map structres for example:
    list(0)
         map(..key..value..)
         map(..key..value..)
         map(..key..value..)
    list(1)
         map(..key..value..)
         map(..key..value..)
         map(..key..value..)
    list(2)
         map(..key..value..)
         map(..key..value..)
         map(..key..value..)can I use <logic:iterate/> for this? if yes how? Because I have used this tag for list containing bean objects not Map.
    Any suggestions are much appreciated.
    Thanks,
    Vishal

    Normally, each object exposed by the iterate tag is an element of the underlying collection you are iterating over. However, if you iterate over a Map, the exposed object is of type Map.Entry that has two properties:
    key - The key under which this item is stored in the underlying Map.
    value - The value that corresponds to this key.
    So, if you wish to iterate over the values of a Hashtable, you would implement code like the following:
    <logic:iterate id="element" name="myhashtable">
    Next element is <bean:write name="element" property="value"/>
    </logic:iterate>
    Best Regards
    Maruthi

Maybe you are looking for

  • 9.0.5 do not support jdk131

    I'm tring to add jdk131 as system library in 10g preview, it pop up a error message says: can't not find main class. Does 10g support jdk1.3 or older?

  • Blocking a Program (at "start up")

    Hey, I need help with blocking a program which starts itself every time I turn on the Mac. It is HP Scanjet Helper and I don't have any idea really why it is opened and why I need it. I really need a solution with this because this program restricts

  • Up to date program email support?

    Is there an email where i can get any information about what to do as my up to date code has been rejected saying it has already been used, i wish Apple would commuicate better in situations like these.

  • G4 and QT.

    I'm considering taking my G4 into use again and find that I've got QT 7.6 on it which I think is too late a version. Can/will someone tell me what version is required of QT for the G4 using OS 10.4.11? ( I have FCP 3 installed.) Thanks anyone.

  • MS Access Query to Oracle

    Hi Gurus I am trying to convert a MS Access query to Oracle query, Having some trouble Need some help Please. This is the MS Access Query: Sum(IIf(LOAD1!ARRIVDATE<+Date()+7,LOADLINE1!QTY,0)/ITEM1!UOM) AS Loadtbl What would be the Oracle Query??? Than