Search Results

Search found 25747 results on 1030 pages for 'tree view'.

Page 63/1030 | < Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >

  • Retractable button bar using animations

    - by AndroidDev
    I want to create a button bar that is retractable: when the user clicks on a special "handle" button, the button bar should slide out of view partially so only the handle remains visible. When the bar is in retracted state only the handle is visible. Clicking on the handle should "slide out" the button bar so it is completely visible again. Ideally, the bar would start out in retracted state. I have tried some approaches using TranslateAnimation, including using a layout animation or calling "View.startAnimation" when the handle is clicked, but no luck so far. Do you guys have any tips how to approach this? Is there any decent documentation out there regarding Android animations? The documentation I find is sketchy at best. For instance, I found examples that cause a view to slide into view automatically using TranslateAnimation and a LayoutAnimationController when calling "addView", but when I call removeView no animation seems to be triggered at all, even if I set an animation that should create the opposite motion.

    Read the article

  • findNode in binary search tree

    - by Weadadada Awda
    Does this look right? I mean I am trying to implement the delete function. Node* BST::findNode(int tofind) { Node* node = new Node; node = root; while (node != NULL) { if (node->val == tofind) { return node; } else if (tofind < node->val) { node = node->left; } else { node = node->right; } } } Here is the delete, it's not even close to done but, void BST::Delete(int todelete) { // bool found = false; Node* toDelete = new Node(); toDelete=findNode(todelete); if(toDelete->val!=NULL) { cout << toDelete->val << endl; } } This causes a segmentation fault just running that, any ideas?

    Read the article

  • How to parse a directory tree in python?

    - by chutsu
    I have a directory called "notes" within the notes I have categories which are named "science", "maths" ... within those folder are sub-categories, such as "Quantum Mechanics", "Linear Algebra". ./notes --> ./notes/maths ------> ./notes/maths/linear_algebra --> ./notes/physics/ ------> ./notes/physics/quantum_mechanics My problem is that I don't know how to put the categories and subcategories into TWO SEPARATE list/array.

    Read the article

  • XSLT: Transform XML files tree

    - by Myniva
    I have the following file structure (XML files 'index.xml' in nested folders): index.xml foo/index.xml foo/sub/index.xml foo/.../index.xml bar/.../index.xml Now I have to transform each of this XML files with a given XSL stylesheet. The result should be the same folder structure (overwriting would be OK). What would be your approach to achieve this? My system: OS X 10.6, Saxon XSLT processor

    Read the article

  • How to use C# nested structures to access tree of data

    - by zotty
    I'm importing some XML to C#, and want to be able to access data from the XML in the form of what I think is a nested structure. (I may be wrong!) What I have in my XML is in the following form: <hardwareSettings initial="true> <cameraSettings width="1024" height="768" depth="8" /> <tiltSettings theta="35" rho="90"> </hardwareSettings> I can import each setting alright, so I have them all in individual ints, but I would like to be able to access it in the form int x=hardwaresettings.camerasettings.width; int rho=hardwaresettings.tiltsettings.rho; I've tried various arrangements of structs within structs, but I don't seem able to cast a new object (hardwaresettings) that contains the appropriate children (camerasettings.width & tiltsettings.rho). Sorry if I'm not using the right lingo... I'm reading myself in circles here!

    Read the article

  • A marketing view of SQLBits

    - by simonsabin
    One of the most enjoyable things about SQLBits is reading all the blog posts/reviews after the event. We are normally fortunate enough not to have pissed anyone off and so the posts are generally positive. Most pieces are from attendees however this piece is from a wife of a sponsor http://iknowmarketing.wordpress.com/2012/04/02/events-community-vs-commercial/ . Its a nice piece for us as it highlights how we work and that how we focus on making the event personal for all those involved. We deal...(read more)

    Read the article

  • get attributes from xml tree using linq

    - by nelsonwebs
    I'm working with an xml file that looks like this: <?xml version="1.0" encoding="UTF-8"?> <element1 xmlns="http://namespace1/"> <element2> <element3> <element4 attr1="2009-11-09"> <element5 attr2="NAME1"> <element6 attr3="1"> <element7 attr4="1" attr5="5.5" attr6="3.4"/> </element6> </element5> <element5 attr2="NAME2"> <element6 attr3="1"> <element7 attr4="3" attr5="4" attr6="4.5"/> </element6> </element5> </element4> </element3> </element2> </element1> Where I need to loop through element5 and retrieve the attributes in an Ienumberable like this: attr1, attr2, attr3, attr4, attr5, attr6 using linq to xml and c#. I can loop through the element5 and get all the attribute2 info using but I can't figure out how to get the parent or child attributes I need. UPDATE: Thanks for the feeback thus far. For clarity, I need to do a loop through attribute5. So basically, what I have right now (which isn't much) is . . . XElement xel = XElement.Load(xml); IEnumberable<XElement> cList = from el in xel.Elements(env + "element2").Element (n2 + "element3").Elements(n2 + "element4").Elements(ns + "element5") select el; foreach (XElement e in cList) Console.WriteLine(e.Attribute("attr2").Value.ToString()); This will give me the value all the attr 2 in the loop but I could be going about this all wrong for what I'm trying to acheive. I also need to collect the other attributes mentioned above in a collection (the Console reference is just me playing with this right now but the end result I need is a collection). So the end results would be a collection like attr1, attr2, attr3, attr4, attr5, attr6 2009-11-09, name1, 1, 1, 5.5, 3.4 2009-11-09, name2, 1, 3, 4, 4.5 Make Sense?

    Read the article

  • Tree + Recursion..

    - by RBA
    Hi.. I came across an article on Binary Trees Search . It uses intensive Recursive Algorithms.. I am just so confused with these stuff.. Please guide my path so as I understand these problems at ease, or any good website to read about recursion first and then solving these problems.. Please share your experience on it.. Its very urgent, and I want to learn these concepts as soon as possible.. Thankss... Regards.

    Read the article

  • Render different view depending on the type of the data

    - by Miau
    Hi there So lets suppose we have an action in a controller that looks a bit like this: public ViewResult SomeAction(int id) { var data = _someService.GetData(id); ... //create new view model based on the data here return View(viewModel); } What I m trying to figure out is the best way to render a diferent view based on the type fo the data. the "_someService.GetData method returns an data that knows its out type (ie not only you can do typeof(data) but also you can do data.DataType and you ll get an enum value so I could achieve what I m trying to do doing something kinda like this public ViewResult SomeAction(int id) { var data = _someService.GetData(id); //I m mapping fields to the viewModel here var viewModel = GetViewModel(data); swtich(data.DataType) case DataType.TypeOne: return View("TypeOne", viewModel); break; ... } But this does not seem to be the nicest way, (I dont event know if it would work) Is this the way to go? Should I use some sort of RenderPartial Aproach? after all , waht will change in the view is mostly the order of the data (ie the rest of the view would be quite similar) Cheers

    Read the article

  • hierarchical data from self referencing table in tree form

    - by Beta033
    It looks like this has been asked and answered in all the simple cases, excluding the one that I'm having trouble with. I've tried using a recursive CTE to generate this; however maybe a cursor would be better? Or maybe a set of recursive functions will do the trick? Can this be done in a cte? consider the following table PrimaryKey ParentKey 1 NULL 2 1 3 6 4 7 5 2 6 1 7 NULL should yield PK 1 -2 --5 -6 --3 7 -4 where the number of - marks equal the depth, my primary difficulty is the ordering.

    Read the article

  • php $_SESSION[document_root] too far down the tree

    - by Idealflip
    Hi, I have multiple sub-domains within the document_root. And multiple folders/classes within those sub-domain folders. I need something that will help me with my include_once paths, but $_SESSION[DOCUMENT_ROOT] goes too far down. And if I were to use this, and transfer the website folder later, all my include_once paths will/might break. Hope my question is clear... Any recommendations?

    Read the article

  • How to create and Expression tree to do the same as "StartsWith"

    - by Jonathan
    Hi to all. Currently, I have this method to compare two numbers Private Function ETForGreaterThan(ByVal query As IQueryable(Of T), ByVal propertyValue As Object, ByVal propertyInfo As PropertyInfo) As IQueryable(Of T) Dim e As ParameterExpression = Expression.Parameter(GetType(T), "e") Dim m As MemberExpression = Expression.MakeMemberAccess(e, propertyInfo) Dim c As ConstantExpression = Expression.Constant(propertyValue, propertyValue.GetType()) Dim b As BinaryExpression = Expression.GreaterThan(m, c) Dim lambda As Expression(Of Func(Of T, Boolean)) = Expression.Lambda(Of Func(Of T, Boolean))(b, e) Return query.Where(lambda) End Function It works fine and is consumed in this way query = ETForGreaterThan(query, Value, propertyInfo) As you can see, I give it an IQueryable collection and it add a where clause to it, base on a property and a value. Y can construct Lessthan, LessOrEqualThan etc equivalents as Expression has this operators predefined. ¿How can I transform this code to do the same with strings? Expression don't give me a predefined operator like "contains" or "startwith" and I'm really noob with Expression trees. Thanks, and please Post your answer in C#/VB. Choose the one that make you feel more confortable.

    Read the article

  • Assigning Object to View, big MySQL resultset.

    - by A Finn
    Hello (Sorry for my bad English) Is it bad practice to assign object to view and call its methods in there? I use smarty as my template engine. In my controller I could do like this 1# $this->view->assign("name", $this->model->getName); and in my view <p>{$name}</p> OR 2# $this->view->assign("Object", $this->model); and in my view <p>{$Report->getName()}</p> Well my biggest problem is that I have to handle a big amount of data coming out from the MySQL and I thought that if I would made a method that would print out the data while looping mysql_fetch_row. Well at least I know that using html-tags in the model is a bad thing to do. So I would assign the object to the view to get the result to the right position on the page.. Reading a mysql-result to an array first may cause memory problems am I right? So what is the solution doing things MVC style.. And yes Im using a framework of my own.

    Read the article

  • Converting keys of an array/object-tree to lowercase

    - by tstenner
    Im currently optimizing a PHP application and found one function being called around 10-20k times, so I'd thought I'd start optimization there. function keysToLower($obj) { if(!is_object($obj) && !is_array($obj)) return $obj; foreach($obj as $key=>$element) { $element=keysToLower($element); if(is_object($obj)) { $obj->{strtolower($key)}=$element; if(!ctype_lower($key)) unset($obj->{$key}); } else if(is_array($obj) && ctype_upper($key)) { $obj[strtolower($key)]=$element; unset($obj[$key]); } } return $obj; } Most of the time is spent in recursive calls (which are quite slow in PHP), but I don't see any way to convert it to a loop. What would you do?

    Read the article

  • Storing tree data in Javascript

    - by Ozh
    I need to store data to represent this: Water + Fire = Steam Water + Earth = Mud Mud + Fire = Rock The goal is the following: I have draggable HTML divs, and when <div id="Fire"> and <div id="Mud"> overlap, I add <div id="Rock"> to the screen. Ever played Alchemy on iPhone or Android? Same stuff Right now, the way I'm doing this is a JS object : var stuff = { 'Steam' : { needs: [ 'Water', 'Fire'] }, 'Mud' : { needs: [ 'Water', 'Earth'] }, 'Rock' : { needs: [ 'Mud', 'Fire'] }, // etc... }; and every time a div overlaps with another one, I traverse the object keys and check the 'needs' array. I can deal with that structure but I was wondering if I could do any better? Edit: I should add that I also need to store a few other things, like a short description or an icon name. So typicall I have Steam: { needs: [ array ], desc: "short desc", icon:"steam.png"},

    Read the article

  • Defining EditText imeOptions when using InputMethodManager.showSoftInput(View, int, ResultReceiver)

    - by TuomasR
    In my application I have a custom view which requires some text input. As the view in itself doesn't contain any actual views (it's a Surface with custom drawing being done), I have a FrameLayout which contains the custom view and underneath it an EditText -view. When the user does a specific action, the custom view is hidden and the EditText takes over for user input. This works fine, but android:imeOptions seem to be ignored for this view. I'm currently doing this: InputMethodManager inputMethodManager = (InputMethodManager)parent.getSystemService(Context.INPUT_METHOD_SERVICE); EditText t = (EditText)parent.findViewById(R.id.DummyEditor); t.setImeOptions(EditorInfo.IME_ACTION_DONE); inputMethodManager.showSoftInput(t, 0, new ResultReceiver(mHandler) { @Override protected void onReceiveResult( int resultCode, Bundle resultData) { // We're done System.out.println("Editing done : " + ((EditText)parent.findViewById(R.id.DummyEditor)).getText()); } } ); It seems that the setImeOptions(EditorInfo.IME_ACTION_DONE) has no effect. I've also tried adding the option to the layout XML with android:imeOptions="actionDone". No help. Any ideas?

    Read the article

  • What is the most efficient approach to fetch category tree, products, brands, counts by subcategory

    - by alex227
    Symfony 1.4 + Doctrine 1.2. What is the best way to minimize the number of queries to retrieve products, subcategories of current category, product counts by subcategory and brand for the result set of the query below? Categories are a nested set. Here is my query: $q = Doctrine_Query::create() ->select('c.*, p.product,p.price, b.brand') ->from('Category c') ->leftJoin('c.Product p') ->leftJoin('p.Brand b') ->where ('c.root_id = ?', $this->category->getRootId()) ->andWhere('c.lft >= ?', $this->category->getLft()) ->andWhere('c.rgt <= ?', $this->category->getRgt()) ->setHydrationMode(Doctrine_Core::HYDRATE_ARRAY); $treeObject = Doctrine::getTable('Category')->getTree(); $treeObject->setBaseQuery($q); $this->treeObject = $treeObject; $treeObject->resetBaseQuery(); $this->products = $q->execute();

    Read the article

  • Android camera being landscaped in some devices

    - by nala4ever
    Im new to Android and I tried a tutorial for camera API. The tutorial works fine. When I use HTC desire I can see the camera view in both portrait and landscape, but when I use Samsung Galaxy I get a the camera view only in a landscaped view. I tried the following code to rotate the camera view as well.. Camera.Parameters parameters = camera.getParameters(); parameters.setRotation(90); then the camera doesn't work as expected. (screen splits into 4 and not clear). Does anyone have an idea for this issue ? Thanks.

    Read the article

  • View, Control, Instruct with iTalc

    <b>Linux.com:</b> "If you work in an educational or training environment where you instruct users on the ins and outs of using computers, or you need to be able to (for whatever reason) control the PC user's use of a machine, the tools available are often quite expensive or quite difficult to use. Neither is the case in the Linux environment, where tools like iTalc are available."

    Read the article

  • For a 1view/scene to 2view/scene app, what application should I choose in Xcode?

    - by Tony Xu
    The question may be simple to some others, but I have been struggling with this for a while. The app I want would be like this: first scene/view with two big buttons (no toolbar item), click each one to get into two new scenes. So totally three scenes. In Xcode, what application should I choose? And in storyboard how/should I drag/draw? Thanks. Update: thanks for the link, the big-number-user. I actually read that tutorial before I asked. A little update on what I got so far: 1, I selected "single view", so there's view controller 1 (VC1) in the storyboard. 2, dragged a navigation controller (NC), and move the initial view arrow pointing to NC 3, control-drag to link NC and VC1, selected "relationship segue root view controller" when some small dialog popup. IS THIS CORRECT? 4, created two additional VC, VC3 and VC4, control-drag link each to NC. selected "push", IS THIS CORRECT? 5, in VC1, I added two buttons, showVC3 and showVC4. NOW I DON'T KNOW how to add IBAction to button showVC3 and showVC4. I tried to control-drag it to ViewController.m file @interface and @end section, but failed. What should I do next?

    Read the article

  • SQL VIEW Basics

    SQL Views are essential for the database developer. However, it is common to see them misued, or neglected. Joe Celko tackles an introduction to the subject, but there is something about the topic that makes it likely that even the experienced developer will find out something new from reading it. Get smart with SQL Backup ProGet faster, smaller backups with integrated verification.Quickly and easily DBCC CHECKDB your backups. Learn more.

    Read the article

< Previous Page | 59 60 61 62 63 64 65 66 67 68 69 70  | Next Page >