Search Results

Search found 4347 results on 174 pages for 'devils child'.

Page 131/174 | < Previous Page | 127 128 129 130 131 132 133 134 135 136 137 138  | Next Page >

  • Switch back to previously selected tab after the activity is recreated

    - by ZelluX
    In my TabActivity the user may be asked to switch to browser activity for OAuth phase, and if the phase takes too much time, my activity will be killed. After the user switches back to my activity, its onCreate() method is invoked again and tabs are recreated. So I would like to know if there is any simple way to switch back to previous tab, and keep the tab as what it was. For example, one of the tab views contains a ViewSwitcher child, and I want to switch back to the switched view after recreating the activity.

    Read the article

  • How to handle inputs in a C shell program during exec

    - by hits_lucky
    I am currently writing my own shell program. This simple shell can just execute commands. When executing commands like vi or calc which require input from the terminal , the command is getting executed and is waiting for the input from the user. But I am unable to give any input on the screen. How should the input be handled during the fork and exec. Here is the piece of code which is executing commands: if((pid = fork()) < 0) { perror("Fork failed"); exit(errno); } if(pid == 0) { // Child process if(execvp(arguments[0], arguments) == -1) { child_status = errno; switch(child_status) { case ENOENT: printf(" command not found \n"); break; } exit(errno); } } else { // parent process int wait_stat; if(waitpid(pid , &wait_stat, WNOHANG) == -1) { printf(" waitpid failed \n"); return; } } } ~ Thanks,

    Read the article

  • how to call a javascript function in the top frame?

    - by Rory
    This seems really simple, but how do I call a javascript function that's defined in the top-level html, from a child frame? top html doc - 1st level frame - 2nd level frame my top html doc has a function called testFn(). In the 2nd level frame I have a button with onclick="top.testFn();" but this doesn't call the testFn(). In Firebug if I use a watch to execute top.testFn(); it says TypeError: testFn() is not a function. Should this all just work - in which case it's a problem with my documents, or is there some other way to call functions in the top-level window?

    Read the article

  • Considering HorizontalAlignment and VerticalAlignment while creating a custom panel

    - by sudarsanyes
    I am trying to create a custom panel in wpf. Here the doubts I have, How do I consider the HorizontalAlignment and VerticalAlignment factors while placing the items within my panel. Should I check for these flags in my ArrangeOverride method ?? Consider that I want to write a WrapPanel clone. If the panel's width is set to "Auto", how do I get the actual width of the panel to arrange my child items. I always get the ActualWidth/ActualHeight as 0. Am I missing something??? Please help.

    Read the article

  • Safari on the iPhone & iPad gives colour feedback on touch, I want to stop this.

    - by Owen
    Clicking on an element which has a Javascript handler makes the element go have a 'grey overlay'. This is normally fine but I'm using event delegation to handle the touchdown events of many child elements. Because of the delegation the 'grey overlay' is appearing over the parent element and looks bad and confusing. I could attach event handlers to the individual elements to avoid the problem but this would be computationally very wasteful. I'd rather have some webkit css property that I can override to turn it off. I already have visual feedback in my app so the 'grey overlay' is not needed. Any ideas?

    Read the article

  • Getting info about a screen session from an external script

    - by valadil
    I have a screen session. I'd like to be able to figure out what's running in it from an external script. I've gotten this far: ps --ppid $PID -o comm= That prints a list of all the child processes of the screen. What I haven't been able to figure out so far is: What window is selected/active in a screen session. If $PID is an attached screen it has no children. How do I find out what session it's attached to? I imagine the solution will involve some 'screen -X' voodoo, but I haven't figured out how to make that happen yet and google has been less than helpful.

    Read the article

  • how can we call one class's method through another class's object in php

    - by hello
    I want to know that is there any method in PHP by which i can call one class's method from another class object. let me clear here is one class class A() { public function showData(){ //here is method of class A } } // here is another class class B(){ public function getData(){ //some method in class B } } //now i create two objects $objA= new class A(); $objB=new class B(); now i want to call this $objB->showData();<--- is that possible .. by any how method( using public, inheritence,child parent etc...) please help me

    Read the article

  • When Web page is displayed in a div, Error: Unable to modify the parent container element before the

    - by Jean
    Hello, A url is being displayed in a div as shown below <div id="ipage"> <? $url = "http://www.yahoo.com"; $file1 = fopen($url, "r"); $content = file_get_contents($url); echo $content; ?> </div> And I receive this error Webpage error details Message: HTML Parsing Error: Unable to modify the parent container element before the child element is closed (KB927917) Bright idea to solve this. Thanks Jean

    Read the article

  • 'Recursive' LINQ calls

    - by Sir Psycho
    Hi, I'm trying to build an XML tree of some data with a parent child relationship, but in the same table. The two fields of importance are CompetitionID ParentCompetitionID Some data might be CompetitionID=1, ParentCompetitionID=null CompetitionID=2, ParentCompetitionID=1 CompetitionID=3, ParentCompetitionID=1 The broken query I have simply displays results in a flat format. Seeing that I'm working with XML, some sort of recursive functionality is required. I can do this using recursion, but would like to see the linq version. Any help appreciated. var results = from c1 in comps select new { c.CompetitionID, SubComps= from sc in comps.Where (c2 => c2.CompetitionID == c1.CompetitionID) select sc };

    Read the article

  • database modeling for google app engine for multiple revison of entity.

    - by iamgopal
    hi, in my application ( kind of wiki clone ) - an article is frequently changing. and i need to track all changes that are done on that article. { text only. } one crude way i have done it, is to add a datetime property and create a new entity everytime something change. which is too much database wasting. { and also un-necessary index waste too. } and also need to re-create parent-child and entity relationships. i also have log which can show changes -- but i want some thing easier , so that jumping from one version to another version could be easier. ideas ? thanks.

    Read the article

  • Why does PHP 5.2 disallow abstract static class methods?

    - by Artem Russakovskii
    After enabling strict warnings in PHP 5.2, I saw a load of strict standards warnings from a project that was originally written without strict warnings: Strict Standards: Static function Program::getSelectSQL() should not be abstract in Program.class.inc The function in question belongs to an abstract parent class Program and is declared abstract static because it should be implemented in its child classes, such as TVProgram. I did find references to this change here: Dropped abstract static class functions. Due to an oversight, PHP 5.0.x and 5.1.x allowed abstract static functions in classes. As of PHP 5.2.x, only interfaces can have them. My question is: can someone explain in a clear way why there shouldn't be an abstract static function in PHP?

    Read the article

  • Instance where embedded C++ compilers don't support multiple inheritance?

    - by Nathan
    I read a bit about a previous attempt to make a C++ standard for embedded platforms where they specifically said multiple inheritance was bad and thus not supported. From what I understand, this was never implemented as a mainstream thing and most embedded C++ compilers support most standard C++ constructs. Are there cases where a compiler on a current embedded platform (i.e. something not more than a few years old) absolutely does not support multiple inheritance? I don't really want to do multiple inheritance in a sense where I have a child with two full implementations of a class. What I am most interested in is inheriting from a single implementation of a class and then also inheriting one or more pure virtual classes as interfaces only. This is roughly equivalent to Java/.Net where I can extend only one class but implement as many interfaces as I need. In C++ this is all done through multiple inheritance rather than being able to specifically define an interface and declare a class implements it.

    Read the article

  • CSS3 selector to find the 2nd div of the same class

    - by mpeters
    I need a CSS selector that can find the 2nd div of 2 that has the same class. I've looked at nth-child() but it's not what I want since I can't see a way to further clarify what class I want. These 2 divs will be siblings in the document if that helps. My HTML looks something like this: <div class="foo">...</div> <div class="bar">...</div> <div class="baz">...</div> <div class="bar">...</div> And I want the 2nd div.bar (or the last div.bar would work too).

    Read the article

  • How to launch a program as as a normal user from a UAC elevated installer

    - by KZ
    I'm writing an NSIS installer and the setup program elevates "as administrator" as needed on Windows 7 / vista. I need to run the installed program at the end of the install and don't want to launch it with the same privileges as the installer. The regular NSIS exec commands run the child process with the same permissions as the installer. There is a UAC plugin for NSIS, but the documentation on it isn't great and it seems v. new; I'd prefer not to use that plugin. Ideally, I'm looking for a small .exe I can include that'll launch the target program without UAC elevation. Does this exist? Any other suggestions? Thanks!

    Read the article

  • C - fork() and sharing memory

    - by Ben
    I need my parent and child process to both be able to read and write the same variable (of type int) so it is "global" between the two processes. I'm assuming this would use some sort of cross-process communication and have one variable on one process being updated. I did a quick google and IPC and various techniques come up but I don't know which is the most suitable for my situation. So what technique is best and could you provide a link to a noobs tutorial for it. Thanks.

    Read the article

  • How to get ListView to grow to the size of content

    - by Jared
    So I have a fairly complex activity the parent being a linearlayout with a table with some basic info and buttons. Then a couple listviews that the user can add items to. So these listviews grow more and more as the user uses the app. The problem I'm running into is the Linearlayout is bigger then the resolution of the screen and so it needs to scroll. So the scrolling doesn't work on the Listviews. I've tried playing with changing the layout_height of the listview and its child element with no success. Is there a way to make these couple listviews expand out to the amount of children? Or am I going about this all wrong? If so what other controls can I use? I'm open to any ideas. I really just don't know how to go about this. Thanks

    Read the article

  • How do you manage web navigation info in your application?

    - by Dave
    I’m building an application where different users will have different menu items available to them depending on what they’ve paid for. There will also be multiple levels to the menu hierarchy. What’s the best approach to this problem? I’m assuming I need a database table that represents the menu hierarchy, including the parent-child relationships of the nodes in the navigation as well as the sorting of the items. Then another table which I use to manage whether a user is authorized to access a particular item in that table. When I render the view, I’d reference the menus, and the access rights of the user to output the menu, and I’d also need a function to check that same authorization from each controller in case a user manually types in a URL of a controller they’re not supposed to have access to. Is this the right approach? Any suggestions for caching this to prevent the constant look-ups of this type of info? I’m open to any suggestions on how you may have approached this type of requirement.

    Read the article

  • Is it possible to position an element relative to the border-box of its parent?

    - by Timwi
    Consider the following jsfiddle for reference: http://jsfiddle.net/apmmw2ma/ As you can see, the “inner” box (with the red border) is positioned relative to the outer’s padding-box: left:0 positions it just to the right of outer’s border, and top:100% appears to mean “100% of the content plus padding, but not the border”. Unfortunately, adding box-sizing: border-box to the outer div seems to have no effect. I want to position a child element directly below its parent’s border-box, i.e. the two borders should abut no matter how thick they are. Is this possible?

    Read the article

  • How to make multiple windows using Win32 API

    - by Steven Lu
    I see plenty of tutorials and articles showing me how to make a simple windows program, which is great but none of them show me how to make multiple windows. Right now I have working code that creates and draws a layered window and I can blit stuff using GDI to draw anything I want on it, drag it around, even make it transparent, etc. But I wanted a second rectangular area that I can draw to, drag around, etc. In other words, a second window. Probably want it to be a child window. Question is, how do I make it? Also, if anybody knows any good resources (online preferably) like articles or tutorials for window management in the Windows API, please share.

    Read the article

  • Inheriting database connection in PHP OOP

    - by vrode
    My abstract class Database is made for database interaction and any child of this class (UserDatabase, ActionDatabase, EventDatabase) inherits its database connection which is defined as static. `abstract class Database { static $connection = mysql_connect( ); } class UserDatabase extends Database { ... public function __construct( ) { $connection ? "connected" : "not connected"; $this-table = "users"; mysql_query( "FROM " . $this-table . " SELECT *" ); } } ` Does that mean, that my database connection is only set up and stored in memory once and passed on to subclasses as reference without being replicated for each instance? Is this how you would implement you OOP-correct database interface?

    Read the article

  • Accessing children of loaded swf in Flex Image component

    - by pfunc
    I am loading an external swf into an component. It loads everything fine and I can see buttons working in the swf, but I can't seem to figure out how to add children to this swf from the core mxml file. I have tried tracing out all the children of the image component but can't find where or how to do this. This is the image component: <Image id="image" mask="{ maskCanvas }" source="{ _source }" mouseDown="image.startDrag()" visible="{ _source != null &amp;&amp; image.percentLoaded == 100 }" showEffect="{ fadeInEffect }" complete="imageComplete()" doubleClickEnabled="true" doubleClick="onDoubleClick()" /> And in my AS, I am trying to do something like this: myComponent.image.addChild("myMC"); But i either don;t see the clip or there I get an error about not being able to add the child to a ui component.

    Read the article

  • How to check if a process is running or got segfaulted or terminated in linux from its pid in my mai

    - by rkbang
    Hello all, I am invoking several processes in my main and I can get the pid of that processes. Now I want to wait until all this processes have been finished and then clear the shared memory block from my parent process. Also if any of the process not finished and segfaulted I want to kill that process. So how to check from the pid of processes in my parent process code that a process is finished without any error or it gave broke down becoz of runtime error or any other cause, so that I can kill that process. Also what if I want to see the status of some other process which is not a child process but its pid is known. Code is appreciated( I am not looking for script but code ).

    Read the article

  • How to hash and check for equality of objects with circular references

    - by mfya
    I have a cyclic graph-like structure that is represented by Node objects. A Node is either a scalar value (leaf) or a list of n=1 Nodes (inner node). Because of the possible circular references, I cannot simply use a recursive HashCode() function, that combines the HashCode() of all child nodes: It would end up in an infinite recursion. While the HashCode() part seems at least to be doable by flagging and ignoring already visited nodes, I'm having some troubles to think of a working and efficient algorithm for Equals(). To my surprise I did not find any useful information about this, but I'm sure many smart people have thought about good ways to solve these problems...right? Example (python): A = [ 1, 2, None ]; A[2] = A B = [ 1, 2, None ]; B[2] = B A is equal to B, because it represents exactly the same graph. BTW. This question is not targeted to any specific language, but implementing hashCode() and equals() for the described Node object in Java would be a good practical example.

    Read the article

  • Design patter for extending Android's activities?

    - by Carl
    While programming on Android, I end up writing a parent activity which is extended by several others. A bit like ListActivity. My parent activity extends Activity. if I intend to use a Map or a List, I can't use my parent activity as superclass - the child activity can only extend one activity obviously. As such I end up writing my parent activities with the same logic for Activity, ListActivity, MapActivity and so forth. What am I looking for is some sort of trait functionality/design pattern which would help in this case. Any suggestions?

    Read the article

  • How to get the Jquery Grid entire row values on click..

    - by kumar
    I need to Get the Entire Row values when I click on jquery grid row.. here is the code I am using for that var RowClick = function(e) { var resultArray = $("#Grid td:first:child").closest('tr').find('td').map(function() { alert(resultArray); }); }; For this RowClick I defined in Grid property server side for the jquery grid grid.ClientSideEvents.RowSelect = "RowClick"; Can any one tell me on click on Row I need to get entire values or 4th and 5th columns values? thanks

    Read the article

< Previous Page | 127 128 129 130 131 132 133 134 135 136 137 138  | Next Page >