Search Results

Search found 14 results on 1 pages for 'duder'.

Page 1/1 | 1 

  • Reading xml within xml as String in flex/AS3

    - by duder
    I'm getting XML input that looks like this <?xml version="1.0" encoding="utf-8"?> <data1>this is data 1</data1> <data2>this is data 2</data2> <data3> <3a>this is data 3a</3a> <3b>this is data 3b</3b> <3c> <TextFlow xmlns="http://ns.adobe.com/textLayout/2008"> <p direction="ltr" > <span>some text</span> <span>some additional text</span> </p> <p direction="ltr"> <span>some text</span> <span>some additional text</span> </p> </TextFlow> </3c> </data3> I can read <data1> with event.result.data1 which outputs a string this is data1 But when I do the same thing to event.result.data3.3c, it prints object [object] so I guess it's trying to dig deeper into the tree. But I need the actual string text (not xml tree) starting from and including <TextFlow></TextFlow> to be stored and printed as a string. Any idea what's the syntax for this? The string I'm looking for would look like this: <TextFlow xmlns="http://ns.adobe.com/textLayout/2008"> <p direction="ltr" > <span>some text</span> <span>some additional text</span> </p> <p direction="ltr"> <span>some text</span> <span>some additional text</span> </p> </TextFlow>

    Read the article

  • Can't create file in Ada 95

    - by duder
    Hello, I'm trying to follow a standard reference for opening files but running into a constraint_error at the line when I call Ada.Text_IO.Create(). It says "range check failed". Any help appreciated, here's the code: WITH Ada.Text_IO; WITH Ada.Integer_Text_IO; USE Ada.Text_IO; USE Ada.Integer_Text_IO; PROCEDURE FileManip IS --Variables Start_Int : Integer; Stop_Int : Integer; Max_Length : Integer; --Output File MaxName : CONSTANT Positive := 80; SUBTYPE NameRange IS Positive RANGE 1..MaxName; OutFileName : String(NameRange) := (OTHERS => '#'); OutNameLength : NameRange; OutData : File_Type; --Array TYPE Chain_Array IS ARRAY(1..500) OF Integer; Sum : Integer := 1; BEGIN --Inputs Ada.Text_IO.Put(Item => "Enter a starting Integer: "); Ada.Integer_Text_IO.Get(Item => Start_Int); Ada.Text_IO.New_Line; Ada.Text_IO.Put(Item => "Enter a stopping Integer: "); Ada.Integer_Text_IO.Get(Item => Stop_Int); Ada.Text_IO.New_Line; Ada.Text_IO.Put(Item => "Enter a Maximum Length to search: "); Ada.Integer_Text_IO.Get(Item => Max_Length); Ada.Text_IO.New_Line; Ada.Text_IO.Put(Item => "Enter a output file name > "); Ada.Text_IO.Get_Line( Item => OutFileName, Last => OutNameLength); Ada.Text_IO.Create( File => OutData, Mode => Ada.Text_IO.Out_File, Name => OutFileName(1..OutNameLength)); Ada.Text_IO.New_Line;

    Read the article

  • Item Renderer having trouble updating

    - by duder
    I have a list ItemRenderer that has 2 states. When it initializes, I set it to 1 state and listen for an event that switches it to state 2. protected function onCreationComplete(event:FlexEvent):void{ currentState = "state1"; addEventListener(CustomEvent.Event1, switch); } protected function switch(event:FlexEvent):void{ currentState = "state2"; } The difference between the 2 states is that I hide/show some labels. The problem is that it doesn't work. I still see the visual of the old state, even though if I Alert.show(currentState), it shows the correct state name. I've tried adding the line invalidateDisplayList(); inside the switch function but still no luck. protected function switch(event:FlexEvent):void{ currentState = "state2"; invalidateDisplayList(); } What am I doing wrong. Any ideas how I can get this ItemRenderer to really update?

    Read the article

  • Disabling itemrenderer Hovered state

    - by duder
    My itemrenderer has 2 custom states, no hovered state, and no normal state <s:states> <s:State name="state1" /> <s:State name="state2" /> </s:states> When I initialize it, I force it to go to state2. The problem is that when it's hovered over, it relapses back to the first state state1. It's kind of weird since I don't really have a hovered state. Anyone knows how to prevent this from happening? maybe by somehow disabling the hover effect?

    Read the article

  • Selecting from 2 tables in a single query

    - by duder
    I have a table that I'm querying for value 43 in the second field and I return the value of the third field SELECT t1_field3 FROM table1 WHERE t1_field2=43 this returns 19, 39,73 t1_id t1_field2 t1_field3 ----- --------- --------- 1 43 19//// 2 43 39//// 3 43 73//// 4 73 43 5 13 40 Then I separately query a second table for additional information SELECT * FROM table2 WHERE t2_id=t1_field3 t2_id t2_field2 t2_field3 ----- --------- --------- 19 value19.2 value19.3 39 value39.2 value39.3 73 value73.2 value73.3 Is there a way I could combine both table1 and table2 in the same query?

    Read the article

  • Finding unused classes in C# app.

    - by duder
    I'm a C#/.net/Visual Studio noob. I inherited a half-completed C# application for a mobile phone. In the course of debugging, I came across several half-finished classes that don't seem to be used anywhere else in the code. Is there a way to get determine if a class definition is instantiated anywhere?

    Read the article

  • flex List Size not updating when itemRenderer resizes itself

    - by duder
    I've got a list with a custom itemRenderer that's just a rectangle of specific size. The list <s:List id="thelist" width="100%" dataProvider="{thelistdata}" itemRenderer="ListItem" borderVisible="true" /> Note the list's border is visible to help with debugging The itemRenderer <s:Rect id="box" width="50" height="50"> <s:fill> <s:SolidColor color="blue"/> </s:fill> </s:Rect> When the itemRenderer receives an event, it changes its size to half box.width = 25; box.height = 25; I see the itemRenderers are resizing themselves correctly, but the list itself stays the same size and the border stays where it is. Anyone knows how to fix this bug. Basically the list should refresh its size too to fit the smaller boxes.

    Read the article

  • Selecting MXML siblings with actionscript, like javascript?

    - by duder
    I'm trying to get the sibling of an mxml tag similar to the way siblings are selected in javascript. Is this possible in Actionscript? For example, when I click the TextArea with id textarea1, I need it to tell me that the sibling has an id of rect1 so I can do further processing to it. <s:Group> <s:TextArea id="textarea1" click="getSibling(event)" /> <s:Rect id="rect1" /> </s:Group>

    Read the article

  • Converting string to datetime

    - by duder
    I'm trying to enter a date in a mysql table `ssdate` datetime The function that produces the date can output it in 3 formats: 1276142400000 Thu Jun 10 00:00:00 GMT-0400 2010 Fri Jun 4 2010 I'm wondering which of these would be easiest to convert to this field format? Since I'm trying to save only the date, is there a better option than datetime that would work with one of these output formats?

    Read the article

  • Django left join m2m field.

    - by duder
    Here's my Model: class User(models.Model): pass class Item(models.Model): pass class ItemVote(models.Model): user = models.ForeignKey(User) item = models.ForeignKey(Item) vote = models.BooleanField() I want to retrieve a list of Items, and I want to know if the current user has voted for each Item. How do I alter my query object so that it will generate sql similar to: SELECT ... FROM items LEFT OUTER JOIN item_votes ON (item_votes.user_id = ? AND item_votes.item_id = items.id)

    Read the article

  • Identifying voice as male or female

    - by duder
    I'm not much into audio engineering, so please be easy on me. I'm receiving an audio file as input, and need to detect whether the speaker is male or female. Any ideas how to go about doing this? I'm using php, but am open to using other languages, and don't mind learning a little bit of sound theory as long as the time is proportionate to the task.

    Read the article

  • Selecting id of TextArea (despite RichEditableText)

    - by duder
    I'm trying to select the id of a textArea when it's focused in <s:TextArea id="textarea1" focusIn="selectId(event)" /> selectId(event){ event.target.id; } Problem is TextArea is made up of RichEditableText so target doesn't actually refer to TextArea. I've tried event.target.parent.id but still not getting there. Anyone knows how to get to the bottom of this?

    Read the article

1